From 61afa101d1b5068fc3f7a8260b8bf71cd8787e33 Mon Sep 17 00:00:00 2001 From: robot-ci-heartex Date: Wed, 13 Nov 2024 16:15:53 +0000 Subject: [PATCH] ci: Build frontend Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/11821234753 --- web/dist/apps/labelstudio/724.js | 2 +- web/dist/apps/labelstudio/724.js.map | 2 +- web/dist/apps/labelstudio/main.js | 2 +- web/dist/apps/labelstudio/main.js.map | 2 +- web/dist/apps/labelstudio/vendor.js | 2 +- web/dist/apps/labelstudio/vendor.js.map | 2 +- web/dist/apps/labelstudio/version.json | 6 +++--- web/dist/libs/datamanager/version.json | 6 +++--- web/dist/libs/editor/version.json | 6 +++--- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/web/dist/apps/labelstudio/724.js b/web/dist/apps/labelstudio/724.js index 4fbc3dd777b5..53216e919f40 100644 --- a/web/dist/apps/labelstudio/724.js +++ b/web/dist/apps/labelstudio/724.js @@ -1,2 +1,2 @@ -(self.webpackChunklabelstudio=self.webpackChunklabelstudio||[]).push([[724],{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},3319:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LabelStudio:()=>eH,default:()=>tH});var r={};n.r(r),n.d(r,{drawMask:()=>jt});var o={};n.r(o),n.d(o,{canvasToBinaryMatrix:()=>Rt,createDragBoundFunc:()=>Tt,fixRectToFit:()=>At,getActualZoomingPosition:()=>It,getBoundingBoxAfterChanges:()=>_t,getBoundingBoxAfterTransform:()=>Et,getTransformedImageData:()=>Pt,reverseCoordinates:()=>Ot});var i={};n.r(i),n.d(i,{currentISODate:()=>Dt,msToHMS:()=>Lt,prettyDate:()=>Mt,toISODateString:()=>Kt});var a={};n.r(a),n.d(a,{applySpanStyles:()=>qt,captureSelection:()=>Wt,charsToCodePoints:()=>rn,codePointsToChars:()=>nn,findNodesBetween:()=>Jt,findOnPosition:()=>an,findRange:()=>en,findRangeNative:()=>tn,fixCodePointsInRange:()=>on,highlightRange:()=>Gt,highlightRangePart:()=>Yt,isSelectionContainsSpan:()=>cn,isTextNode:()=>Nt,rangeToGlobalOffset:()=>sn,removeRange:()=>Qt,wrapWithSpan:()=>Xt});var s={};n.r(s),n.d(s,{AudioVolumeControl:()=>mC,FramesControl:()=>rs});var l={};n.r(l),n.d(l,{Brightness:()=>mR,Brush:()=>zO,Contrast:()=>vR,Ellipse:()=>tR,Erase:()=>WO,KeyPoint:()=>UO,MagicWand:()=>xR,Polygon:()=>GO,Rect:()=>JO,Rect3Point:()=>QO,Rotate:()=>uR,Selection:()=>CR,Zoom:()=>lR});var c={};n.r(c),n.d(c,{VideoSettings:()=>RN});n(81117);var d=n(57896),u=n(77099),h=n(43144),g=n(83126),m=n(14041),p=n(56036),f=n(69447),v=n(56351);const y=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]}};y.getTool=y.getTool.bind(y),y.getModelByTag=y.getModelByTag.bind(y);const b=y;var x=n(48862),w=n(5157),C=n.n(w);const S=(e,t)=>{var n;const r=/\$[\w[\].{}]+/gi;return e?(null==(n=e.match(r))?void 0:n[0])===e?null!=(o=C()(t,e.slice(1)))?o:"":e.replace(r,(e=>{var n;return C()(t,null!=(n=e.slice(1))?n:"")})):"";var o},j=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 k=n(84826),O=n(74331);const R=(e=10)=>(0,O.Ak)(e);var E=n(31085);const _="skip",A="stop";const T=(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 P(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,k.VS)(k.cE)&&null!=(o=e.getAttribute("name"))?o:R(),c=Object.assign({},i,{id:l,tagName:e.tagName,type:a});if("repeater"===a){const r=S(i.on,t)||[],o=[];for(let i=0;i{const n=e.cloneNode(!0);return T(n,i,s),P(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=>P(e,t))));else{var d;c.value=(null==(d=e.innerHTML)?void 0:d.trim())||c.value||""}return c}function I(e,t,n=!0){let r=e;if((0,k.VS)(k.cE)){var o;if(!t)return null;r=t.ids.get(M(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,u.Pw)(r),s=a.identifierAttribute,l=a.name,c=b.getViewByModel(l);if(!c)throw new Error(`No view for model: ${l}`);const d=s&&r[s]||R();return(0,E.jsx)(c,{item:r},n?d:void 0)}function L(e,t){const n=e=>{const r=t(e);if(r!==_){if(r===A)return A;if(e.children)for(const t of e.children){if(n(t)===A)return A}}};n(e)}const M=e=>e.replace(/@.*/,"");const K={renderItem:I,renderChildren:function(e,t){return e&&e.children&&e.children.length?e.children.map((e=>I(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 P(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,u.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 L(e,(e=>{for(const t of r)(0,u.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:L,extractNames:function(e){const t=[],n=new Map,r=new Map,o=b.objectTypes().map((e=>e.name.replace("Model","").toLowerCase()));return L(e,(e=>{e.name&&(n.set(M(e.name),e),o.includes(e.type)&&t.push(M(e.name)))})),L(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(M(e.name))):r.set(e.toname,[n.get(M(e.name))])}})),{names:n,toNames:r}},cleanUpId:M},D=()=>{const e=(0,m.useRef)(!0);return(0,m.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),e};var N=n(47895);const V=u.gK.model("CommentMode",{}).volatile((()=>({comment:null}))).views((e=>({get annotation(){return(0,u.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()}}))),z={key:"link_to_comment",model:V},B=u.gK.model("RelationsMode",{}).volatile((()=>({region:null}))).views((e=>({get annotation(){return(0,u.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()}}))),H={key:"create_relation",model:B},F=H.key,W=z.key,$=u.gK.union(z.model,H.model),U=u.gK.model("LinkingModes",{linkingModes:u.gK.optional(u.gK.map($),(()=>({[H.key]:H.model.create({}),[z.key]:z.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=N.A.CHOOSE_CURSOR):e.linkingMode=!1},stopLinkingMode(){document.body.style.cursor=N.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,x.clamp)(e.x,t.x,n.x),(0,x.clamp)(e.y,t.y,n.y)],o=[(0,x.clamp)(e.width+e.x,t.x,n.x),(0,x.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,x.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,k.VS)(k.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,d.lB)(e,o,this.onUpdate,!0)),r)),n)}},re={parent:["zoomScale","zoomingPositionX","zoomingPositionY","rotation","currentImage",...(0,k.VS)(k.v1)?["containerWidth","containerHeight","canvasSize"]:[]]},oe=e=>{if(!!e.from_name)return te;switch(e.type){case"richtextregion":case"paragraphs":return te;case"audioregion":return(0,k.VS)(k.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,x.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--gJBc5",pe="commentItem--aJS6d",fe="commentIcon--X3v6h",ve="commentIconBackground--EofOZ",ye="commentIconLines--uQaUg",be="_highlighting--qltMP",xe="_highlighted--Ksg1R",we=()=>(0,E.jsxs)("g",{className:fe,children:[(0,E.jsx)("path",{className:ve,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,E.jsx)("path",{className:ye,d:"M18 8V9.3333H6V8H18ZM6 16H12V14.6667H6V16ZM6 12.6667H18V11.3333H6V12.6667Z"})]}),Ce=(0,v.PA)((({comment:e,rootRef:t})=>{var n;const r=t.current,o=null==(n=e.regionRef)?void 0:n.overlayNode,i=!o,[a,s]=(0,m.useState)({}),l=(0,m.useCallback)((()=>{e.setHighlighted(!0)}),[e]),c=(0,m.useCallback)((()=>{e.setHighlighted(!1)}),[e]),d=(0,m.useMemo)((()=>o&&r?ce(o,r):null),[o,r]),{shapeBBox:u,positionStyle:h}=(0,m.useMemo)((()=>{const e=d&&r?ge(d,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)`}}}),[d,r,a]);if((0,m.useEffect)((()=>(null==d||d.onUpdate((()=>{s({})})),()=>{null==d||d.destroy()})),[d]),!r||!o||i)return null;if(u.width<1||u.height<1)return null;const g=[pe];return e.isHighlighted&&g.push(xe),(0,E.jsx)("g",{className:g.join(" "),style:h,onMouseEnter:l,onMouseLeave:c,onClick:e.scrollIntoView,children:(0,E.jsx)(we,{})})})),Se=e=>{const{isClassificationTag:t}=e.from_name,n=e.area.classification,r=e.area.selected;return t&&(n||r)},je=(0,v.PA)((({result:e,rootRef:t})=>{const n=t.current,r=e.area,o=!r||r.hidden,[i,a]=(0,m.useState)({}),[s,l]=(0,m.useState)(!1),c=(0,m.useMemo)((()=>e&&n?ce(e,n):null),[e,n]),d=(0,m.useMemo)((()=>c&&n?ge(c,n)[0]:{x:0,y:0,width:0,height:0}),[c,n,i]);if((0,m.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,E.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()}}))})),ke=(0,v.PA)((({annotation:e,commentStore:t})=>{var n;const{overlayComments:r}=t||{},o=(0,m.useRef)(),[i,a]=(0,m.useState)(R()),s=D();(0,m.useEffect)((()=>{(async()=>{await t.listComments({mounted:s,suppressClearComments:t.isRelevantList})})()}),[null==(n=t.annotation)?void 0:n.id]);const l=(0,m.useMemo)((()=>{let e;return new G((t=>{cancelAnimationFrame(e),e=requestAnimationFrame((()=>{a(R())}))}))}),[]);(0,m.useEffect)((()=>()=>{null==l||l.disconnect()}),[]);const c=(0,m.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];return null!=t&&t.isHighlighting&&d.push(be),(0,E.jsx)("svg",{className:d.join(" "),ref:c,xmlns:"http://www.w3.org/2000/svg",children:(0,E.jsxs)("g",{children:[e.linkingMode===W&&e.results.filter(Se).map((e=>(0,E.jsx)(je,{result:e,rootRef:o},e.id))),r.map((e=>{const{id:t}=e;return(0,E.jsx)(Ce,{comment:e,rootRef:o},t)}))]},i)})})),Oe=(0,m.memo)((0,v.PA)((({tags:e,children:t})=>Array.from(e.values()).every((e=>{var t;return!!(0,u._n)(e)&&(null==(t=null==e?void 0:e.isReady)||t)}),!0)?(0,E.jsx)(E.Fragment,{children:t}):null))),Re=(0,v.PA)((e=>{const{annotation:t}=e;return(0,E.jsx)(Oe,{tags:t.names,children:(0,E.jsx)(ke,Object.assign({},e))})}));var Ee=n(39067);const _e="error--SXGAh";var Ae=n(84411);const Te=({error:e})=>{if("string"==typeof e)return(0,E.jsx)("div",{className:_e,dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(e)}});const t=e instanceof Error?e.message:e;return(0,E.jsx)("div",{className:_e,children:t})},Pe=(0,v.WQ)("store")((0,v.PA)((({store:e,errors:t})=>(0,E.jsx)("div",{className:"lsf-errors",children:t.map(((t,n)=>(0,E.jsx)(Te,{error:(0,u._$)(e).messages[t.error](t)},`error-${n}`)))}))));Pe.propTypes={errors:Ee.PropTypes.array.isRequired};const Ie={range:(e=0,t=1)=>u.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:u.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 Le(e){return t=>u.gK.maybeNull(u.gK.array(e(t)))}function Me(e,t){return n=>u.gK.union({dispatcher:r=>{if(n.find((e=>r.type===e)))return e(r.type);throw Error(t+r.type)}})}const Ke=Me(b.getModelByTag,"Not expecting tag: ");const De={unionArray:function(e){const t=u.gK.maybeNull(u.gK.array(Ke(e)));return t.value=e,t},allModelsTypes:function(){const e=[{dispatcher:e=>{if(!e)return u.gK.literal(void 0);if(b.tags.includes(e.type))return b.getModelByTag(e.type);throw Error(`Not expecting tag: ${e.type}`)}},b.modelsArr()],t=[].concat.apply([],e);return u.gK.union.apply(null,t)},unionTag:function(e){return u.gK.maybeNull(u.gK.enumeration("unionTag",e))},tagsTypes:function(e){const t=u.gK.frozen(e.map((e=>e.toLowerCase())));return t.describe=()=>`(${e.join("|")})`,t.value=e,t},isType:function(e,t){const n=(0,u.Pw)(e);for(const e of t)if(n===e)return!0;return!1},getParentOfTypeString:function(e,t){let n=(0,u.PA)(e);for(Array.isArray(t)||(t=[t]);n;){const e=(0,u.Pw)(n).name;if(t.find((t=>t===e)))return n;n=(0,u.jX)(n)?null:(0,u.PA)(n)}return null},getParentTagOfTypeString:function(e,t){let n=(0,u.PA)(e);for(Array.isArray(t)||(t=[t]);n;){const e=n.type;if(t.find((t=>t===e)))return n;n=(0,u.jX)(n)?null:(0,u.PA)(n)}return null},tagsArray:Le(Ke),toolsArray:Le(Me(b.getTool,"Not expecting tool: "))},Ne=u.gK.model("AnnotationMixin",{}).views((e=>({get annotation(){var t;if((0,k.VS)(k.F5)&&!window.STORE_INIT_OK&&console.error("LSF: annotation accessed before store is initialized",e),!(0,u._n)(e))return null;if((0,k.VS)(k.cE)){var n;const t=(0,u.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:De.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,u.Zn)(e);return t===e?e.control?(0,u.Zn)(e.control).annotationStore:e.obj?(0,u.Zn)(e.obj).annotationStore:null:t.annotationStore}}))),Ve=u.gK.model({}).volatile((()=>({_isReady:!0}))).views((e=>({get isReady(){return e._isReady}}))).actions((e=>({setReady(t){e._isReady=t}}))),ze=Ve,Be=Ve.views((e=>({get isReady(){var t;return e._isReady&&!(null!=(t=e.regs)&&t.filter((e=>!e.isReady)).length)}})));var He=n(41880),Fe=n.n(He);const We={csv(e,t={}){var n;const r=!t.headless,{data:o,meta:{fields:i}}=Fe().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:"")}},$e=u.gK.model({resolver:u.gK.maybeNull(u.gK.string)}).actions((e=>({updateLocalValue(t){e._value=t},updateValue(t){var n,r;e._value=S(e.value,null!=(n=null==t||null==(r=t.task)?void 0:r.dataObj)?n:{})},resolveValue:(0,u.L3)((function*(t){if(!e.resolver)return t;const{type:n,options:r}=j(e.resolver);if(!Object.prototype.hasOwnProperty.call(We,n))return console.error(`Resolver "${null!=n?n:e.resolver}" looks unfamiliar`),t;const o=yield fetch(t),i=yield o.text();return We[n](i,r)}))}))),Ue=$e;class Ze{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 Ge={managers:new Map,get(e,t){let n=this.managers.get(e);return!n&&t&&(n=this.managers.get(t)),n||(n=new Ze,this.managers.set(e,n)),n}},Ye=u.gK.model("SyncableMixin",{name:u.gK.string,type:u.gK.string,sync:u.gK.optional(u.gK.string,"")}).volatile((()=>({syncHandlers:new Map,syncManager:null}))).actions((()=>({syncMuted(e){}}))).actions((e=>({afterCreate(){e.sync&&(e.syncManager=Ge.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)}}))),Xe=u.gK.model({meta:u.gK.frozen({}),normInput:u.gK.maybeNull(u.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("")}}))),qe=u.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())}}))),Je=u.gK.model("ReadOnlyRegionMixin",{readonly:u.gK.optional(u.gK.boolean,!1)}).views((e=>({isReadOnly(){var t;return!!(0,u._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 Qe=n(50494),et=n(18094);const tt=100,nt=100,rt="edge",ot="center",it=(0,v.PA)((0,m.forwardRef)((({imageEntity:e,imageTransform:t,updateImageSize:n,usedValue:r,size:o,overlay:i},a)=>{const s=(0,m.useMemo)((()=>({width:1===o.width?"100%":o.width,height:1===o.height?"auto":o.height})),[o]),l=(0,m.useCallback)((t=>{n(t),e.setImageLoaded(!0)}),[n,e]);return(0,E.jsxs)(Qe.eB,{name:"image",style:s,children:[i,(0,E.jsx)(at,{downloading:e.downloading,progress:e.progress,error:e.error,src:e.src,usedValue:r}),e.downloaded?(0,E.jsx)(lt,{alt:"image",ref:a,src:e.currentSrc,onLoad:l,isLoaded:e.imageLoaded,imageTransform:t}):null]})}))),at=(0,v.PA)((({downloading:e,progress:t,error:n,src:r,usedValue:o})=>e?(0,E.jsxs)(Qe.eB,{name:"image-progress",children:[(0,E.jsx)(Qe.Sl,{name:"message",children:"Downloading image"}),(0,E.jsx)(Qe.Sl,{tag:"progress",name:"bar",value:t,min:"0",max:1,step:1e-4})]}):n?(0,E.jsx)(ct,{src:r,value:o}):null)),st={};(0,k.VS)(k.xS)&&(st.crossOrigin="anonymous");const lt=(0,v.PA)((0,m.forwardRef)((({src:e,onLoad:t,imageTransform:n,isLoaded:r},o)=>{const i=(0,m.useMemo)((()=>{const e=null!=n?n:{};return Object.assign({},e,{visibility:r?"visible":"hidden"})}),[n,r]);return(0,E.jsx)("img",Object.assign({},st,{ref:o,alt:"image",src:e,onLoad:t,style:i}))}))),ct=({src:e,value:t})=>{const n=(0,m.useMemo)((()=>et.A.ERR_LOADING_HTTP({url:e,error:"",attr:t})),[e]);return(0,E.jsx)(Te,{error:n})},dt=u.gK.model({pid:u.gK.optional(u.gK.string,R),score:u.gK.maybeNull(u.gK.number),filtered:u.gK.optional(u.gK.boolean,!1),parentID:u.gK.optional(u.gK.string,""),fromSuggestion:!1,dynamic:!1,origin:u.gK.optional(u.gK.enumeration(["prediction","prediction-changed","manual"]),"manual"),item_index:u.gK.maybeNull(u.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,u.Zn)(e)},get parent(){return(0,u.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,u.Zn)(e).annotationStore)?void 0:n.selected)||{},{type:o,labelName:i}=e,a=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)}));return a},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,x.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*tt/e.currentImageEntity.stageWidth,convertYToPerc:t=>t*nt/e.currentImageEntity.stageHeight,convertHDimensionToPerc:t=>t*(e.scaleX||1)*tt/e.currentImageEntity.stageWidth,convertVDimensionToPerc:t=>t*(e.scaleY||1)*nt/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,u.Pw)(e).name.match(/brush/i)?1200:0,r=(0,u._$)(e);e.drawingTimeout=setTimeout((()=>{const n=e.getConnectedDynamicRegions(t);r.events.invoke("regionFinishedDrawing",e,n)}),n)}}}))),ut=u.gK.compose(dt,Je,Ne),ht=u.gK.model("Result",{id:u.gK.optional(u.gK.identifier,R),score:u.gK.maybeNull(u.gK.number),readonly:u.gK.optional(u.gK.boolean,!1),from_name:u.gK.late((()=>u.gK.reference(u.gK.union(...b.modelsArr())))),to_name:u.gK.late((()=>u.gK.reference(u.gK.union(...b.objectTypes())))),type:u.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:u.gK.model({ranker:u.gK.union(u.gK.array(u.gK.string),u.gK.frozen(),u.gK.null),datetime:u.gK.maybe(u.gK.string),number:u.gK.maybe(u.gK.number),rating:u.gK.maybe(u.gK.number),item_index:u.gK.maybeNull(u.gK.number),text:u.gK.maybe(u.gK.union(u.gK.string,u.gK.array(u.gK.string))),choices:u.gK.maybe(u.gK.array(u.gK.union(u.gK.string,u.gK.array(u.gK.string)))),selected:u.gK.maybe(u.gK.enumeration(["left","right"])),labels:u.gK.maybe(u.gK.array(u.gK.string)),htmllabels:u.gK.maybe(u.gK.array(u.gK.string)),hypertextlabels:u.gK.maybe(u.gK.array(u.gK.string)),paragraphlabels:u.gK.maybe(u.gK.array(u.gK.string)),rectanglelabels:u.gK.maybe(u.gK.array(u.gK.string)),keypointlabels:u.gK.maybe(u.gK.array(u.gK.string)),polygonlabels:u.gK.maybe(u.gK.array(u.gK.string)),ellipselabels:u.gK.maybe(u.gK.array(u.gK.string)),brushlabels:u.gK.maybe(u.gK.array(u.gK.string)),timeserieslabels:u.gK.maybe(u.gK.array(u.gK.string)),timelinelabels:u.gK.maybe(u.gK.array(u.gK.string)),taxonomy:u.gK.frozen(),sequence:u.gK.frozen()}),meta:u.gK.frozen()}).views((e=>({get perRegionStates(){const t=e.states;return t&&t.filter((e=>!0===e.perregion))},get store(){return(0,u.Zn)(e)},get area(){return(0,u.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,x.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}},getRegionElement(){var t;return null==(t=e.from_name)||null==t.getRegionElement?void 0:t.getRegionElement()}}))).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,u.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,h=K.cleanUpId(r.from_name),g=K.cleanUpId(r.to_name);if(!c)return null;if(!e.canBeSubmitted)return null;if((0,x.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:h,to_name:g,type:o,origin:e.area.origin}),(0,x.isDefined)(a[l])&&Object.assign(c.value,{[l]:a[l]}),"number"==typeof i&&(c.score=i),e.isSelfReadOnly()&&(c.readonly=!0),(0,k.VS)(k.gF)&&(0,x.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}}))),gt=u.gK.compose("Result",ht,Ne),mt={TAG:"tag",REGION_LIST:"region-list"},pt=u.gK.model({perregion:u.gK.optional(u.gK.boolean,!1),whenlabelvalue:u.gK.maybeNull(u.gK.string),displaymode:u.gK.optional(u.gK.enumeration(Object.values(mt)),mt.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)}}))),ft=pt;let vt=1;const yt=u.gK.model({id:u.gK.optional(u.gK.identifier,R),ouid:u.gK.optional(u.gK.number,(()=>vt++)),results:u.gK.array(gt),parentID:u.gK.maybeNull(u.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,u._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,u._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,k.VS)(k.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===mt.REGION_LIST))},get perRegionFocusTarget(){return e.perRegionTags.find((e=>!1!==e.isVisible&&e.focusable))},get labelName(){var t,n;if((0,u._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,u._n)(e))return e.object},get style(){if(!(0,u._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||N.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,k.VS)(k.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,u.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,u.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()}}))),bt=u.gK.compose("AreaMixin",yt,Je);var xt=n(72902),wt=n(75696),Ct=n.n(wt);const St=(()=>{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 Rt(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 Et(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 _t(e,t,n=0){const r=new kt.A.Transform;return r.translate(t.x,t.y),r.rotate(n),Et(e,r)}function At(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 Tt(e,t={x:0,y:0}){const{parent:n}=e;return r=>n.fixForZoomWrapper(r,(r=>{let{x:o,y:i}=r;(0,k.VS)(k.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,k.VS)(k.MV)?At(p,100,100):At(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,k.VS)(k.MV)?{x:n.internalToCanvasX(o),y:n.internalToCanvasY(i)}:{x:o,y:i}}))}function Pt(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]=It(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 It(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 Lt(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 Mt(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 Kt(e){const t=6e4*(e=e||new Date).getTimezoneOffset();return new Date(e.getTime()-t).toISOString().slice(0,-1)}function Dt(){return Kt()}const Nt=e=>e&&e.nodeType===Node.TEXT_NODE,Vt=e=>e&&/[\w']/i.test(e),zt=e=>e&&/[\s\t]/i.test(e),Bt=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]}},Ht=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(!Nt(n.startContainer)||zt(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(!Nt(n.startContainer)||zt(n.startContainer.textContent[n.startOffset]));t.setEnd(n.endContainer,n.endOffset),e.removeAllRanges(),e.addRange(t)})(e)},Ft=(e,t)=>{const n="symbol"!==t,{startOffset:r,startContainer:o,endOffset:i,endContainer:a,firstSymbol:s,prevSymbol:l,lastSymbol:c,nextSymbol:d}=Bt(e);if(n)t.endsWith("boundary")?((e,t)=>{const{range:n,startOffset:r,startContainer:o,endOffset:i,endContainer:a}=Bt(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}=Bt(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),Ht(e)})(e,t);else{if(!Vt(s)||Vt(l)){e.getRangeAt(0).setEnd(o,r),e.modify("move","backward",t)}if(!Vt(c)||Vt(d)){e.getRangeAt(0).setEnd(a,i),e.modify("extend","forward",t)}}},Wt=(e,{granularity:t,beforeCleanup:n,window:r}={granularity:"symbol"})=>{const o=r.getSelection();if(o.isCollapsed)return;if("symbol"!==t&&Ht(o),o.isCollapsed)return;$t(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":Ft(e,"word");break;case"sentence":Ft(e,"sentenceboundary");break;case"paragraph":Ft(e,"paragraphboundary")}}catch(e){console.warn("Probably, you're using browser that doesn't support granularity.")}},Ut=(e,t,n,r="forward")=>{const o=t===e?t.childNodes[n]:t;if(Nt(o)&&!r.endsWith("next"))return o;const i=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ALL);let a,s=i.nextNode();for(;s&&s!==o;)Nt(s)&&(a=s),s=i.nextNode();if(s&&r.startsWith("backward"))return a;for("forward-next"===r&&(s=i.nextNode());s;){if(Nt(s))return s;s=i.nextNode()}},Zt=e=>{const{endOffset:t,commonAncestorContainer:n}=e;let{startOffset:r,startContainer:o,endContainer:i}=e;if(!Nt(o)){if(o=Ut(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=Ut(n,o,r,"forward-next"),!o)return null}while(a(o));e.setStart(o,0),r=0}if(!Nt(i)){if(i=Ut(n,i,t,"backward"),!i)return null;for(;/^\s*$/.test(i.wholeText);)if(i=Ut(n,i,t,"backward-next"),!i)return null;e.setEnd(i,i.length)}return e},Gt=(e,{index:t,label:n,classNames:r})=>{const{startContainer:o,endContainer:i,commonAncestorContainer:a}=e,{startOffset:s,endOffset:l}=e,c=[],d=(...e)=>Yt(...e,r);if(o===i)c.push(d(o,s,l));else{Jt(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},Yt=(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,k.VS)(k.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=Xt(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=Xt(a,r),n.replaceChild(o,t)}return o},Xt=(e,t,n)=>{const r=e.ownerDocument.createElement("span");return r.appendChild(e),qt(r,{classNames:t,label:n}),r},qt=(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):"")},Jt=(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},Qt=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;Nt(t)&&Nt(e)&&(t.data+=e.data,e.remove())}))}))},en=(e,t,n)=>({startContainer:nn(an(n,e,"right")),endContainer:nn(an(n,t,"left"))}),tn=(e,t,n)=>{var r;const{startContainer:o,endContainer:i}=en(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},nn=({node:e,position:t}={})=>{if(!e)return;return{node:e,position:[...e.textContent].slice(0,t).join("").length}},rn=({node:e,position:t})=>{const n=e.textContent.substr(0,t);return{node:e,position:[...n].length}},on=e=>{const t=rn({node:e.startContainer,position:e.startOffset}),n=rn({node:e.endContainer,position:e.endOffset});return e.setStart(e.startContainer,t.position),e.setEnd(e.endContainer,n.position),e},an=(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,x.clamp)(t-i,0,e)};l=!0}i+=e}a=s,s=o.nextNode()}},sn=(e,t)=>[ln(e.startContainer,e.startOffset,t),ln(e.endContainer,e.endOffset,t)],ln=(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,x.isDefined)(s.length)?[...s.textContent].length:1;n&&(e=Math.min(t,e)),i+=e}s=o.nextNode()}return i},cn=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 dn(e){return e?Object.entries(e).reduce(((e,[t,n])=>(e[`--${t}`]=n,e)),{}):null}const un={Image:o,HTML:Ae,Checkers:x,Colors:xt,UDate:i,guidGenerator:R,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},hn=u.gK.model("AudioUltraRegionModel",{type:"audioregion",object:u.gK.late((()=>u.gK.reference(gj))),start:u.gK.number,end:u.gK.number,channel:u.gK.optional(u.gK.number,0),selectedregionbg:u.gK.optional(u.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,x.clamp)(n,0,a.width),top:o,right:(0,x.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)=>un.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(N.A.LINKING_MODE_CURSOR))},onMouseLeave(){e.annotation.isLinkingMode&&(e.setHighlight(!1),e._ws_region.switchCursor(N.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))}}})),gn=u.gK.model("AudioRegionModel",{type:"audioregion",object:u.gK.late((()=>u.gK.reference(gj))),start:u.gK.number,end:u.gK.number,channel:u.gK.optional(u.gK.number,0),selectedregionbg:u.gK.optional(u.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=un.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,u.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=un.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=N.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:un.Colors.rgbaChangeAlpha(e.selectedregionbg,.8)}),e.onClickRegion(n)},onMouseOver(){e.annotation.isLinkingMode&&(e.setHighlight(!0),e._ws_region.element.style.cursor=N.A.LINKING_MODE_CURSOR)},onMouseLeave(){e.annotation.isLinkingMode&&(e.setHighlight(!1),e._ws_region.element.style.cursor=N.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()}}))),mn=u.gK.model("EditableRegion").volatile((()=>({editorEnabled:!0,editableFields:[]}))).views((e=>({getProperty:t=>e[t],getPropertyType:t=>(0,u.Pw)(e).properties[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}}))),pn=u.gK.model("EditableAudioModel",{}).volatile((()=>({editableFields:[{property:"start",label:"Start"},{property:"end",label:"End"}]}))),fn=u.gK.compose("AudioRegionModel",ut,bt,Xe,mn,pn,gn),vn=u.gK.compose("AudioRegionModel",ut,bt,Xe,mn,pn,hn);let yn=fn;(0,k.VS)(k.vS)&&(yn=vn),b.addRegionType(yn,"audioplus"),b.addRegionType(yn,"audio");var bn=n(8392),xn=n.n(bn),wn=n(26324);const Cn=(e,t,n)=>{const r={type:"",title:""};switch(e){case"error":r.type=wn.A.error,r.title="Error";break;case"warning":r.type=wn.A.warning,r.title="Warning";break;case"success":r.type=wn.A.success,r.title="Success";break;default:r.type=wn.A.info,r.title="Info"}return r.type({title:n||r.title,content:t})},Sn={error:(e,t)=>Cn("error",e,t),warning:(e,t)=>Cn("warning",e,t),success:(e,t)=>Cn("success",e,t),info:(e,t)=>Cn("info",e,t)},jn=u.gK.model("BaseTag"),kn=u.gK.model(Object.assign({},(0,k.VS)(k.cE)?{id:u.gK.identifier,name:u.gK.string}:{name:u.gK.identifier},{_needsUpdate:u.gK.optional(u.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})=>xn()(e,t)))),n||e.regions.find((e=>xn()(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,k.VS)(k.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];Sn.warning(`You can't use ${e.value} more than ${e.maxUsages} time(s)`)}e.annotation.unselectAll()}return o}}})),On=u.gK.compose(kn,jn,Ne),Rn={min:1,max:1500,step:10,default:1},En={min:.5,max:2,step:.01,default:1},_n={min:0,max:1,step:.01,default:1},An=u.gK.model({value:u.gK.maybeNull(u.gK.string),muted:u.gK.optional(u.gK.boolean,!1),zoom:u.gK.optional(u.gK.boolean,!0),defaultzoom:u.gK.optional(u.gK.string,Rn.default.toString()),volume:u.gK.optional(u.gK.boolean,!0),defaultvolume:u.gK.optional(u.gK.string,_n.default.toString()),speed:u.gK.optional(u.gK.boolean,!0),defaultspeed:u.gK.optional(u.gK.string,En.default.toString()),hotkey:u.gK.maybeNull(u.gK.string),showlabels:u.gK.optional(u.gK.boolean,!1),showscores:u.gK.optional(u.gK.boolean,!1),height:u.gK.optional(u.gK.string,"88"),cursorwidth:u.gK.optional(u.gK.string,"2"),cursorcolor:u.gK.optional(Ie.color,"#333"),defaultscale:u.gK.optional(u.gK.string,"1"),autocenter:u.gK.optional(u.gK.boolean,!0),scrollparent:u.gK.optional(u.gK.boolean,!0)}),Tn=u.gK.compose("AudioModel",An,Ye,Ue,On,Ne,ze,u.gK.model("AudioModel",{type:"audio",_value:u.gK.optional(u.gK.string,""),playing:u.gK.optional(u.gK.boolean,!1),regions:u.gK.array(yn)}).volatile((()=>({errors:[]}))).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,u.Zn)(e)},states:()=>e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t&&t.filter((e=>"LabelsModel"===(0,u.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=un.Colors.convertToRGBA(o.getSelectedColor(),.3));const i=yn.create({id:t.id?t.id:R(),pid:t.pid?t.pid:R(),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,x.isDefined)(e._ws)&&(e._ws.destroy(),e._ws=null)}catch(t){e._ws=null,console.warn("Already destroyed")}}})))),Pn=u.gK.model({name:u.gK.identifier,value:u.gK.maybeNull(u.gK.string),muted:u.gK.optional(u.gK.boolean,!1),zoom:u.gK.optional(u.gK.boolean,!0),defaultzoom:u.gK.optional(u.gK.string,1..toString()),volume:u.gK.optional(u.gK.boolean,!0),defaultvolume:u.gK.optional(u.gK.string,1..toString()),speed:u.gK.optional(u.gK.boolean,!0),defaultspeed:u.gK.optional(u.gK.string,1..toString()),hotkey:u.gK.maybeNull(u.gK.string),showlabels:u.gK.optional(u.gK.boolean,!1),showscores:u.gK.optional(u.gK.boolean,!1),height:u.gK.optional(u.gK.string,"96"),waveheight:u.gK.optional(u.gK.string,"32"),cursorwidth:u.gK.optional(u.gK.string,"2"),cursorcolor:u.gK.optional(Ie.color,"#333"),defaultscale:u.gK.optional(u.gK.string,"1"),autocenter:u.gK.optional(u.gK.boolean,!0),scrollparent:u.gK.optional(u.gK.boolean,!0),splitchannels:u.gK.optional(u.gK.boolean,!1),decoder:u.gK.optional(u.gK.enumeration(["ffmpeg","webaudio"]),"webaudio"),player:u.gK.optional(u.gK.enumeration(["html5","webaudio"]),"html5")}),In=u.gK.compose("AudioModel",Pn,Ye,Ue,On,Ne,ze,u.gK.model("AudioModel",{type:"audio",_value:u.gK.optional(u.gK.string,""),regions:u.gK.array(yn)}).volatile((()=>({errors:[],stageRef:(0,m.createRef)(),_ws:null,_wfFrame:null}))).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,u.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,u.Pw)(e).name&&e.isSelected))},get activeState(){const t=e.states();return t&&t.filter((e=>"LabelsModel"===(0,u.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,x.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,d.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=un.Colors.convertToRGBA(o.getSelectedColor(),.3));const i=yn.create({id:t.id?t.id:R(),pid:t.pid?t.pid:R(),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,k.VS)(k.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,u._$)(e.store).messages[n]({attr:e.value,url:e._value,error:t.message});e.errors=[r]},beforeDestroy(){try{n&&clearTimeout(n),t&&t(),(0,x.isDefined)(e._ws)&&(e._ws.destroy(),e._ws=null)}catch(t){e._ws=null,console.warn("Already destroyed")}},setWFFrame(t){e._wfFrame=t}}}))),Ln=({item:e,style:t,className:n,children:r})=>{const o=e.getProps&&e.getProps(),i=(0,Qe.cn)("object").toClassName();return(0,E.jsx)("div",Object.assign({className:[i,n].join(" "),"data-needs-update":e._needsUpdate,style:t},o,{children:r}))},Mn=(0,v.PA)(Ln),Kn=(0,v.PA)(Ln);var Dn=n(92006),Nn=n.n(Dn),Vn=n(53871),zn=n.n(Vn),Bn=n(1474),Hn=n(17022),Fn=n(64381),Wn=n.n(Fn),$n=n(38573),Un=n.n($n),Zn=n(57290),Gn=n.n(Zn);const Yn="wave--XFK_Q",Xn="link--MtZ3P";var qn=n(82149),Jn=n(61747),Qn=n(35455),er=n(34595),tr=n(27078),nr=n(73033),rr=n(37442),or=n.n(rr);const ir=(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)})),ar=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)}},sr=(e,t,n,r=0)=>{let o=0,i=0;const a=((e,t)=>{const n=ar(e),r=ar(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("-")}},lr=e=>{"webkitRequestFullscreen"in e?e.webkitRequestFullscreen():e.requestFullscreen()},cr=()=>{"webkitCancelFullScreen"in document?document.webkitCancelFullScreen():document.exitFullscreen()},dr=()=>{var e;return null!=(e=document.webkitCurrentFullScreenElement)?e:document.fullscreenElement},ur=(e={},t)=>{const n=(0,m.useRef)(e);return(0,m.useEffect)((()=>{n.current=e}),[e,...null!=t?t:[]]),(0,m.useEffect)((()=>{const e=()=>{dr()?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:dr,enter:lr,exit:cr,setHandlers(e={}){n.current=e}}},hr=(0,m.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,m.useRef)(),g=d?e=>{l(e),u.current=e}:u,p=(0,m.useRef)(),[f,v]=(0,m.useState)({}),[y,b]=(0,m.useState)(n?"visible":null),[x,w]=(0,m.useState)(!1),[C,S]=(0,m.useState)("top-center"),j=(0,m.useRef)(),k=(0,m.useCallback)((()=>{const{left:e,top:t,align:n}=sr(s(u.current),p.current,C,10);v({left:e,top:t}),S(n)}),[u.current,p.current]),O=(0,m.useCallback)(((e,t)=>{if(p.current){if(t)return void w(!1);ir(p.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,p]),R=(0,m.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]),_=(0,m.useMemo)((()=>x?(0,E.jsx)(Qe.eB,{ref:p,name:"tooltip",mod:{align:C,theme:i},mix:R,style:Object.assign({},f,null!=a?a:{}),children:(0,E.jsx)(Qe.Sl,{name:"body",children:e})}):null),[x,f,e,R,p]),A=m.Children.only(t),T=(0,m.cloneElement)(A,Object.assign({},A.props,{ref:g}));return(0,m.useEffect)((()=>{x&&O(!0)}),[x]),(0,m.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]),ur({onEnterFullscreen:()=>O(!1,!0),onExitFullscreen:()=>O(!1,!0)},[]),(0,E.jsxs)(E.Fragment,{children:[T,(0,h.createPortal)(_,document.body)]})}));hr.displayName="Tooltip";const gr=e=>(0,E.jsx)(Qe.eB,{name:"hint",tag:"sup",className:e.className,"data-copy":e.copy,style:e.style,children:e.children}),mr=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"}}'),pr=["store","name","children"];if(!(0,k.VS)(k.xB)){const e=mr["image:prev"],t=mr["image:next"];e&&(e.key=e.mac="ctrl+a"),t&&(t.key=t.mac="ctrl+d")}const fr=["key","mac","description","modifier","modifierDescription"],vr=e=>{Object.entries(e).forEach((([e,t])=>{Object.keys(t).forEach((t=>{if(!fr.includes(t))throw new Error(`Unknown keymap property ${t} for key ${e}`)}))}))};vr(mr);const yr="__main__",br="__input__",xr={},wr={},Cr=[],Sr={[yr]:{},[br]:{}};or().filter=e=>{var t;if("__none__"===or().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&&or().setScope(/^(INPUT|TEXTAREA|SELECT)$/.test(n)?br:yr),!0};const jr={plus:"=",minus:"-",",":"¼"},kr=(e="global",t="Hotkeys")=>{var n;let r={};wr[e]=null!=(n=wr[e])?n:{description:t,get keys(){return r},get descriptions(){const e=Object.keys(this.keys).reduce(((e,t)=>(xr[t]&&e.push([t,xr[t]]),e)),[]);return Object.fromEntries(e)}};const o=(t,n)=>{const r=Sr[t];r&&r[n]&&(r[n]=r[n].filter((t=>t.namespace!==e)))},i=(e,t)=>{const n=Sr[e];n&&n[t]&&n[t].forEach((n=>{or()(t,e,n.func)}))},a=e=>[...e.replace(/\s/,"").matchAll(/((?:\w+\+)*(?:[^,]+|,)),?/g)].map((e=>e[1])),s=()=>{for(const e of[yr,br])for(const t of Object.keys(r)){const n=a(t);for(const t of n)(0,k.VS)(k.M3)?(o(e,t),or().unbind(t,e),i(e,t)):or().unbind(t,e),delete xr[t]}r={}};return Cr.push(s),{applyAliases:e=>a(e).map((e=>e.split("+").map((e=>{var t;return null!=(t=jr[e.trim()])?t:e})).join("+"))).join(","),addKey(t,n,o,i=yr){if(!(0,x.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&&(xr[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,k.VS)(k.M3)&&((t,n,r)=>{(0,x.isDefined)(Sr[t])||(Sr[t]={});const o=Sr[t];(0,x.isDefined)(o[n])||(o[n]=[]),o[n].push({namespace:e,func:r})})(t,a,r),or()(a,t,r)}))},overwriteKey(e,t,n,r=yr){(0,x.isDefined)(e)&&(this.hasKey(e)&&this.removeKey(e,r),this.addKey(e,t,n,r))},removeKey(e,t=yr){if(!(0,x.isDefined)(e))return;const n=e.toLowerCase();this.hasKey(n)&&(t.split(",").map((e=>e.trim())).filter(Boolean).forEach((t=>{(0,k.VS)(k.M3)?(o(t,e),or().unbind(n,t),i(t,e)):or().unbind(n,t)})),delete r[n],delete xr[n])},addNamed(e,t,n){const r=kr.keymap[e];if(!(0,x.isDefined)(r))throw new Error(`Unknown named hotkey ${r}`);{var o;const e=(0,x.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=kr.keymap[e];if(!(0,x.isDefined)(n))throw new Error(`Unknown named hotkey ${n}`);{var r;const e=(0,x.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=kr.keymap[e];if(!(0,x.isDefined)(r))throw new Error(`Unknown named hotkey ${e}`);{var o;const e=(0,x.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,x.isDefined)(e))return;const t=e.toLowerCase();return(0,x.isDefined)(r[t])},getKeys:()=>Object.keys(r),getNamespace:()=>wr[e],addDescription(e,t){r[e]||(xr[e]=t)},removeDescription(e){r||xr[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}}};kr.DEFAULT_SCOPE=yr,kr.INPUT_SCOPE=br,kr.keymap=Object.assign({},mr),kr.setKeymap=e=>{vr(e),Object.assign(kr.keymap,e)},kr.keysDescipritions=()=>xr,kr.namespaces=()=>wr,kr.unbindAll=()=>{Cr.forEach((e=>e()))},kr.setScope=e=>{or().setScope(e)},kr.Tooltip=(0,v.WQ)("store")((0,v.PA)((e=>{let{store:t,name:n,children:r}=e,o=(0,nr.A)(e,pr);const i=kr.keymap[n],a=t.settings.enableTooltips&&t.settings.enableHotkeys;if((0,x.isDefined)(i)){var s,l;const e=(0,x.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,m.createElement)(Qe.Sl,{tag:"kbd",name:"key"},e)));n.push((0,m.createElement)(Qe.eB,{name:"key-group",tag:"span",style:{marginLeft:5}},...t))})),(0,m.createElement)(hr,Object.assign({},o,{theme:"light",title:(0,m.createElement)(m.Fragment,{},t,...n)}),r)}return r}))),kr.Hint=(0,v.WQ)("store")((0,v.PA)((({store:e,name:t})=>{const n=kr.keymap[t],r=e.settings.enableTooltips&&e.settings.enableHotkeys;if((0,x.isDefined)(n)&&r){var o;const e=(0,x.isMacOS)()&&null!=(o=n.mac)?o:n.key;return(0,m.createElement)(gr,{},[e])}return null})));function Or(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 Rr(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 Er(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 _r(e){return Math.floor(10/Rr(e))}class Ar extends m.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=zn()((()=>{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=kr("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||et.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:[Wn().create({dragSelection:{slop:5}}),Un().create({container:"#timeline",formatTimeCallback:Or,timeInterval:Rr,primaryLabelInterval:Er,secondaryLabelInterval:_r,primaryColor:"blue",secondaryColor:"blue",primaryFontColor:"#000",secondaryFontColor:"#000"}),Nn().create({wrapper:this.$waveform,showTime:!0,opacity:1})]})),this.wavesurfer=Gn().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=zn()(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,`${kr.DEFAULT_SCOPE},${kr.INPUT_SCOPE}`)}componentWillUnmount(){this.hotkeys.unbindAll(),this.wavesurfer.unAll()}render(){return(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{id:"wave",ref:this.setWaveformRef,className:Yn}),(0,E.jsx)("div",{id:"timeline"}),this.props.zoom&&(0,E.jsxs)(qn.A,{gutter:16,style:{marginTop:"1em"},children:[(0,E.jsx)(Jn.A,{flex:8,style:{textAlign:"right",marginTop:"6px"},children:(0,E.jsxs)("div",{style:{display:"flex"},children:[(0,E.jsx)("div",{style:{marginTop:"6px",marginRight:"5px"},children:(0,E.jsx)(hr,{placement:"topLeft",title:"Horizontal zoom out",children:(0,E.jsx)(Bn.A,{onClick:this.onZoomMinus,className:Xn})})}),(0,E.jsx)("div",{style:{width:"100%"},children:(0,E.jsx)(Qn.A,{min:0,step:10,max:500,value:"number"==typeof this.state.zoom?this.state.zoom:0,onChange:e=>{this.onChangeZoom(e)}})}),(0,E.jsx)("div",{style:{marginTop:"6px",marginLeft:"5px"},children:(0,E.jsx)(hr,{placement:"topLeft",title:"Horizontal zoom in",children:(0,E.jsx)(Hn.A,{onClick:this.onZoomPlus,className:Xn})})})]})}),(0,E.jsx)(Jn.A,{flex:4,style:{textAlign:"right",marginTop:"6px"},children:(0,E.jsxs)("div",{style:{display:"flex"},children:[(0,E.jsx)("div",{style:{marginTop:"6px",marginRight:"5px"},children:(0,E.jsx)(hr,{placement:"topLeft",title:"Vertical zoom out",children:(0,E.jsx)(Bn.A,{onClick:this.onZoomYMinus,className:Xn})})}),(0,E.jsx)("div",{style:{width:"100%"},children:(0,E.jsx)(Qn.A,{min:1,step:.1,max:50,value:"number"==typeof this.state.zoomY?this.state.zoomY:1,onChange:e=>{this.onChangeZoomY(e)}})}),(0,E.jsx)("div",{style:{marginTop:"6px",marginLeft:"5px"},children:(0,E.jsx)(hr,{placement:"topLeft",title:"Vertical zoom in",children:(0,E.jsx)(Hn.A,{onClick:this.onZoomYPlus,className:Xn})})})]})}),(0,E.jsx)(Jn.A,{flex:3,children:this.props.volume&&(0,E.jsxs)("div",{style:{display:"flex",marginTop:"6.5px"},children:[(0,E.jsx)("div",{style:{width:"100%"},children:(0,E.jsx)(Qn.A,{min:0,max:1,step:.1,value:"number"==typeof this.state.volume?this.state.volume:1,onChange:e=>{this.onChangeVolume(e)}})}),(0,E.jsx)("div",{style:{marginLeft:"10px",marginTop:"5px"},children:(0,E.jsx)(tr.A,{})})]})}),(0,E.jsx)(Jn.A,{flex:1,style:{marginTop:"6px"},children:this.props.speed&&(0,E.jsx)(er.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,E.jsxs)(er.A.Option,{value:+e,children:["Speed ",e]},e)))})})]})]})}}var Tr=n(76363),Pr=n(52345),Ir=n(53567);const Lr=(0,v.PA)((({item:e,store:t})=>(0,E.jsx)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"1em"},children:(0,E.jsxs)(Tr.A,{type:"primary",onClick:()=>{e._ws.playPause()},children:[e.playing&&(0,E.jsxs)(m.Fragment,{children:[(0,E.jsx)(Pr.A,{})," ",(0,E.jsx)("span",{children:"Pause"}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,E.jsxs)(gr,{children:["[",e.hotkey,"]"]})]}),!e.playing&&(0,E.jsxs)(m.Fragment,{children:[(0,E.jsx)(Ir.A,{})," ",(0,E.jsx)("span",{children:"Play"}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,E.jsxs)(gr,{children:["[",e.hotkey,"]"]})]})]})}))),Mr=(0,v.WQ)("store")((0,v.PA)((({store:e,item:t})=>{var n;if(!t._value)return null;const r=(0,u._$)(e).messages;return(0,E.jsx)(Kn,{item:t,children:(0,E.jsxs)(m.Fragment,{children:[null==(n=t.errors)?void 0:n.map(((e,t)=>(0,E.jsx)(Te,{error:e},`err-${t}`))),(0,E.jsx)(Ar,{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,E.jsx)(Lr,{item:t,store:e}),(0,E.jsx)("div",{style:{marginBottom:"4px"}})]})})}))),Kr=e=>{const t=(0,m.useRef)(e);return(0,m.useEffect)((()=>{Object.assign(t.current,e)}),[e]),t.current},Dr=(0,m.createContext)({position:0,length:0,regions:[],step:10,playing:!1,settings:{},visibleWidth:0,seekOffset:0,data:void 0}),Nr=Dr.Provider;var Vr,zr=["title","titleId"];function Br(){return Br=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fr=function(e,t){var n=e.title,r=e.titleId,o=Hr(e,zr);return m.createElement("svg",Br({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?m.createElement("title",{id:r},n):null,Vr||(Vr=m.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"})))},Wr=(0,m.forwardRef)(Fr);n.p;var $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 m.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?m.createElement("title",{id:r},n):null,$r||($r=m.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"})))},Xr=(0,m.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 m.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?m.createElement("title",{id:r},n):null,qr||(qr=m.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"})),Jr||(Jr=m.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"})))},ro=(0,m.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 m.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?m.createElement("title",{id:r},n):null,oo||(oo=m.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"})),io||(io=m.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"})))},uo=(0,m.forwardRef)(co);n.p;var ho,go,mo=["title","titleId"];function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=fo(e,mo);return m.createElement("svg",po({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?m.createElement("title",{id:r},n):null,ho||(ho=m.createElement("rect",{x:15,y:5,width:2,height:14,rx:1,fill:"black"})),go||(go=m.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"})))},yo=(0,m.forwardRef)(vo);n.p;n.p;var bo,xo,wo,Co,So=["title","titleId"];function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Oo=function(e,t){var n=e.title,r=e.titleId,o=ko(e,So);return m.createElement("svg",jo({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?m.createElement("title",{id:r},n):null,bo||(bo=m.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})),xo||(xo=m.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"})),wo||(wo=m.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"})),Co||(Co=m.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"})))},Ro=(0,m.forwardRef)(Oo);n.p;var Eo,_o,Ao,To=["title","titleId"];function Po(){return Po=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Lo=function(e,t){var n=e.title,r=e.titleId,o=Io(e,To);return m.createElement("svg",Po({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?m.createElement("title",{id:r},n):null,Eo||(Eo=m.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"})),_o||(_o=m.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"})),Ao||(Ao=m.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"})))},Mo=(0,m.forwardRef)(Lo);n.p;var Ko,Do=["title","titleId"];function No(){return No=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zo=function(e,t){var n=e.title,r=e.titleId,o=Vo(e,Do);return m.createElement("svg",No({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?m.createElement("title",{id:r},n):null,Ko||(Ko=m.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"})))},Bo=(0,m.forwardRef)(zo);n.p;var Ho,Fo=["title","titleId"];function Wo(){return Wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Uo=function(e,t){var n=e.title,r=e.titleId,o=$o(e,Fo);return m.createElement("svg",Wo({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?m.createElement("title",{id:r},n):null,Ho||(Ho=m.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,m.forwardRef)(Uo);n.p;n.p;var 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 m.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?m.createElement("title",{id:r},n):null,Go||(Go=m.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"})))},Qo=(0,m.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 m.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?m.createElement("title",{id:r},n):null,ei||(ei=m.createElement("rect",{x:14,y:4,width:5,height:16,rx:1.5,fill:"black"})),ti||(ti=m.createElement("rect",{x:5,y:4,width:5,height:16,rx:1.5,fill:"black"})))},ai=(0,m.forwardRef)(ii);n.p;var si,li,ci=["title","titleId"];function di(){return di=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hi=function(e,t){var n=e.title,r=e.titleId,o=ui(e,ci);return m.createElement("svg",di({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?m.createElement("title",{id:r},n):null,si||(si=m.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"})),li||(li=m.createElement("rect",{x:7,y:5,width:2,height:14,rx:1,fill:"black"})))},gi=(0,m.forwardRef)(hi);n.p;n.p;var mi,pi,fi,vi,yi=["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 wi=function(e,t){var n=e.title,r=e.titleId,o=xi(e,yi);return m.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?m.createElement("title",{id:r},n):null,mi||(mi=m.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"})),pi||(pi=m.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"})),fi||(fi=m.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"})),vi||(vi=m.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"})))},Ci=(0,m.forwardRef)(wi);n.p;var Si,ji,ki,Oi,Ri=["title","titleId"];function Ei(){return Ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ai=function(e,t){var n=e.title,r=e.titleId,o=_i(e,Ri);return m.createElement("svg",Ei({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?m.createElement("title",{id:r},n):null,Si||(Si=m.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"})),ji||(ji=m.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"})),ki||(ki=m.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"})),Oi||(Oi=m.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"})))},Ti=(0,m.forwardRef)(Ai);n.p;var Pi,Ii=["title","titleId"];function Li(){return Li=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ki=function(e,t){var n=e.title,r=e.titleId,o=Mi(e,Ii);return m.createElement("svg",Li({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?m.createElement("title",{id:r},n):null,Pi||(Pi=m.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"})))},Di=(0,m.forwardRef)(Ki);n.p;var Ni,Vi=["title","titleId"];function zi(){return zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Hi=function(e,t){var n=e.title,r=e.titleId,o=Bi(e,Vi);return m.createElement("svg",zi({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?m.createElement("title",{id:r},n):null,Ni||(Ni=m.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"})))},Fi=(0,m.forwardRef)(Hi);n.p;n.p;var Wi,$i,Ui,Zi=["title","titleId"];function Gi(){return Gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Xi=function(e,t){var n=e.title,r=e.titleId,o=Yi(e,Zi);return m.createElement("svg",Gi({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?m.createElement("title",{id:r},n):null,Wi||(Wi=m.createElement("rect",{x:2,y:5,width:20,height:14,rx:1.5,fill:"white",stroke:"black",strokeWidth:2})),$i||($i=m.createElement("path",{d:"M1 11H23V18H1V11Z",fill:"black",fillOpacity:.15})),Ui||(Ui=m.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"})))},qi=(0,m.forwardRef)(Xi);n.p;var Ji,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 m.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?m.createElement("title",{id:r},n):null,Ji||(Ji=m.createElement("rect",{x:2,y:5,width:20,height:14,rx:1.5,fill:"white",stroke:"black",strokeWidth:2})),Qi||(Qi=m.createElement("path",{d:"M1 11H23V18H1V11Z",fill:"black",fillOpacity:.15})),ea||(ea=m.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"})))},ia=(0,m.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 m.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?m.createElement("title",{id:r},n):null,aa||(aa=m.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"})),sa||(sa=m.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"})))},ha=(0,m.forwardRef)(ua);n.p;var ga,ma,pa=["title","titleId"];function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ya=function(e,t){var n=e.title,r=e.titleId,o=va(e,pa);return m.createElement("svg",fa({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?m.createElement("title",{id:r},n):null,ga||(ga=m.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"})),ma||(ma=m.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"})))},ba=(0,m.forwardRef)(ya);n.p;var xa,wa=["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 ja=function(e,t){var n=e.title,r=e.titleId,o=Sa(e,wa);return m.createElement("svg",Ca({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?m.createElement("title",{id:r},n):null,xa||(xa=m.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})))},ka=(0,m.forwardRef)(ja);n.p;var Oa,Ra=["title","titleId"];function Ea(){return Ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Aa=function(e,t){var n=e.title,r=e.titleId,o=_a(e,Ra);return m.createElement("svg",Ea({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?m.createElement("title",{id:r},n):null,Oa||(Oa=m.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})))},Ta=(0,m.forwardRef)(Aa);n.p;var Pa,Ia=["title","titleId"];function La(){return La=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ka=function(e,t){var n=e.title,r=e.titleId,o=Ma(e,Ia);return m.createElement("svg",La({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?m.createElement("title",{id:r},n):null,Pa||(Pa=m.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})))},Da=(0,m.forwardRef)(Ka);n.p;var Na,Va=["title","titleId"];function za(){return za=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ha=function(e,t){var n=e.title,r=e.titleId,o=Ba(e,Va);return m.createElement("svg",za({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?m.createElement("title",{id:r},n):null,Na||(Na=m.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})))},Fa=(0,m.forwardRef)(Ha);n.p;var Wa,$a=["title","titleId"];function Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ga=function(e,t){var n=e.title,r=e.titleId,o=Za(e,$a);return m.createElement("svg",Ua({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?m.createElement("title",{id:r},n):null,Wa||(Wa=m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 15.5C5 15.2239 4.77614 15 4.5 15H3.5C3.22386 15 3 15.2239 3 15.5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H8.5C8.77614 21 9 20.7761 9 20.5V19.5C9 19.2239 8.77614 19 8.5 19H5.5C5.22386 19 5 18.7761 5 18.5V15.5ZM8.5 5C8.77614 5 9 4.77614 9 4.5V3.5C9 3.22386 8.77614 3 8.5 3H5C4.46957 3 3.96086 3.21071 3.58579 3.58579C3.21071 3.96086 3 4.46957 3 5V8.5C3 8.77614 3.22386 9 3.5 9H4.5C4.77614 9 5 8.77614 5 8.5V5.5C5 5.22386 5.22386 5 5.5 5H8.5ZM19 8.5C19 8.77614 19.2239 9 19.5 9H20.5C20.7761 9 21 8.77614 21 8.5V5C21 3.89 20.1 3 19 3H15.5C15.2239 3 15 3.22386 15 3.5V4.5C15 4.77614 15.2239 5 15.5 5H18.5C18.7761 5 19 5.22386 19 5.5V8.5ZM15.5 19C15.2239 19 15 19.2239 15 19.5V20.5C15 20.7761 15.2239 21 15.5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V15.5C21 15.2239 20.7761 15 20.5 15H19.5C19.2239 15 19 15.2239 19 15.5V18.5C19 18.7761 18.7761 19 18.5 19H15.5ZM14.6875 12.5818C15.1042 12.3232 15.1042 11.6768 14.6875 11.4182L10.9375 9.09101C10.5208 8.83243 10 9.15565 10 9.67281V14.3272C10 14.8443 10.5208 15.1676 10.9375 14.909L14.6875 12.5818Z",fill:"currentColor"})))},Ya=(0,m.forwardRef)(Ga);n.p;const Xa=kr(),qa=(e,t)=>{const n=(0,m.useRef)(null),r=(0,m.useRef)(t),o=(0,m.useRef)(((e,t)=>{null==r.current||r.current(e,t)}));(0,m.useEffect)((()=>{var t;e!==n.current&&(e?(((e,t)=>{kr.keymap[e]?Xa.overwriteNamed(e,t):Xa.overwriteKey(e,t)})(e,o.current),n.current=e):n.current&&!e&&(t=n.current,kr.keymap[t]?Xa.removeNamed(t):Xa.removeKey(t),n.current=null))}),[e]),(0,m.useEffect)((()=>{r.current=t}),[t])},Ja=["children","type","extra","className","size","waiting","icon","tag","look","primary","danger","hotkey","tooltip","tooltipTheme","nopadding"],Qa=(0,m.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:p,tooltipTheme:f="light",nopadding:v}=e,y=(0,nr.A)(e,Ja);const b=null!=c?c:y.href?"a":"button",w={size:a,waiting:s,type:r,danger:h,nopadding:v,look:null!=d?d:[],withIcon:!!l,withExtra:!!o};u&&(w.look="primary");const C=(0,m.useMemo)((()=>{if(!l)return null;if((0,x.isDefined)(l.props.size))return l;switch(a){case"small":return(0,m.cloneElement)(l,Object.assign({},l.props,{size:12,width:12,height:12}));case"compact":return(0,m.cloneElement)(l,Object.assign({},l.props,{size:14,width:14,height:14}));default:return l}}),[l,a]);qa(g,y.onClick);const S=(0,E.jsx)(Qe.eB,Object.assign({name:"button",mod:w,mix:i,ref:t,tag:b,type:r},y,{children:(0,E.jsxs)(E.Fragment,{children:[C&&(0,E.jsx)(Qe.Sl,{tag:"span",name:"icon",children:C}),C&&n?(0,E.jsx)("span",{children:n}):n,void 0!==o?(0,E.jsx)(Qe.Sl,{name:"extra",children:o}):null]})}));return g&&(0,x.isDefined)(kr.keymap[g])?(0,E.jsx)(kr.Tooltip,{name:g,title:p,children:S}):p?(0,E.jsx)(hr,{title:p,theme:f,ref:t,children:S}):S}));Qa.displayName="Button";Qa.Group=({className:e,children:t,collapsed:n})=>(0,E.jsx)(Qe.eB,{name:"button-group",mod:{collapsed:n},mix:e,children:t});const es=["direction","size","className","style","children","spread","stretch","align","collapsed","truncated"],{Block:ts}=(0,Qe.JE)(),ns=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,nr.A)(e,es);return(0,E.jsx)(ts,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}))},rs=({position:e=0,length:t=0,onPositionChange:n})=>{const[r,o]=(0,m.useState)(!1),i=(0,m.useMemo)((()=>t-1),[t]);return(0,E.jsx)(Qe.eB,{name:"frames-control",onClick:()=>o(!0),children:r?(0,E.jsx)(is,{length:i,position:e,onChange:e=>{null==n||n((0,x.clamp)(e,0,t))},onFinishEditing:()=>{o(!1)}}):(0,E.jsxs)(E.Fragment,{children:[(0,x.clamp)(Math.round(e+1),1,i+1)," ",(0,E.jsxs)("span",{children:["of ",i+1]})]})})},os=["ArrowUp","ArrowDown","Backspace","Delete","Enter",/[0-9]/],is=({length:e,position:t,onChange:n,onFinishEditing:r})=>{const o=(0,m.useRef)(),i=t=>{null==n||n((0,x.clamp)(t,1,e))};return(0,E.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=os.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,x.clamp)(a+s,1,e).toString(),t.preventDefault()):"ArrowDown"===n&&(o.current.value=(0,x.clamp)(a-s,1,e).toString(),t.preventDefault())},onBlur:()=>null==r?void 0:r()})};var as,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 m.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?m.createElement("title",{id:r},n):null,as||(as=m.createElement("path",{d:"M15 24H19C21.7614 24 24 21.7614 24 19V19C24 16.2386 21.7614 14 19 14H13",stroke:"currentColor",strokeWidth:2})),ss||(ss=m.createElement("path",{d:"M16 10L12 14L16 18",stroke:"currentColor",strokeWidth:2})))},hs=(0,m.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 m.createElement("svg",fs({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?m.createElement("title",{id:r},n):null,gs||(gs=m.createElement("path",{d:"M21 24H17C14.2386 24 12 21.7614 12 19V19C12 16.2386 14.2386 14 17 14H23",stroke:"currentColor",strokeWidth:2})),ms||(ms=m.createElement("path",{d:"M20 10L24 14L20 18",stroke:"currentColor",strokeWidth:2})))},bs=(0,m.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 m.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?m.createElement("title",{id:r},n):null,xs||(xs=m.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"})))},ks=(0,m.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 m.createElement("svg",_s({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?m.createElement("title",{id:r},n):null,Os||(Os=m.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"})),Rs||(Rs=m.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"})))},Ps=(0,m.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 m.createElement("svg",Ms({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?m.createElement("title",{id:r},n):null,Is||(Is=m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0V6H14V8H8V14H6V8H0V6H6V0H8Z",fill:"currentColor"})))},Ns=(0,m.forwardRef)(Ds);n.p;var Vs,zs,Bs=["title","titleId"];function Hs(){return Hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ws=function(e,t){var n=e.title,r=e.titleId,o=Fs(e,Bs);return m.createElement("svg",Hs({viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Vs||(Vs=m.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"})),zs||(zs=m.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"})))},$s=(0,m.forwardRef)(Ws);n.p;var 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 m.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?m.createElement("title",{id:r},n):null,Us||(Us=m.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"})))},qs=(0,m.forwardRef)(Xs);n.p;var Js,Qs=["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 nl=function(e,t){var n=e.title,r=e.titleId,o=tl(e,Qs);return m.createElement("svg",el({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?m.createElement("title",{id:r},n):null,Js||(Js=m.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"})))},rl=(0,m.forwardRef)(nl);n.p;var ol,il,al=["title","titleId"];function sl(){return sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var cl=function(e,t){var n=e.title,r=e.titleId,o=ll(e,al);return m.createElement("svg",sl({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?m.createElement("title",{id:r},n):null,ol||(ol=m.createElement("rect",{width:20,height:20,rx:4,fill:"#5CDBD3",fillOpacity:.18})),il||(il=m.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"})))},dl=(0,m.forwardRef)(cl);n.p;var ul,hl,gl=["title","titleId"];function ml(){return ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var fl=function(e,t){var n=e.title,r=e.titleId,o=pl(e,gl);return m.createElement("svg",ml({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?m.createElement("title",{id:r},n):null,ul||(ul=m.createElement("rect",{width:20,height:20,rx:4,fill:"#FF85C0",fillOpacity:.18})),hl||(hl=m.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"})))},vl=(0,m.forwardRef)(fl);n.p;n.p;n.p;n.p;var yl,bl,xl,wl,Cl=["title","titleId"];function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var kl=function(e,t){var n=e.title,r=e.titleId,o=jl(e,Cl);return m.createElement("svg",Sl({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?m.createElement("title",{id:r},n):null,yl||(yl=m.createElement("path",{d:"M13 21H25V23H13V21Z",fill:"currentColor"})),bl||(bl=m.createElement("path",{d:"M11 13H23V15H11V13Z",fill:"currentColor"})),xl||(xl=m.createElement("rect",{x:10.5,y:19.5,width:5,height:5,rx:2.5,fill:"currentColor"})),wl||(wl=m.createElement("rect",{x:20.5,y:11.5,width:5,height:5,rx:2.5,fill:"currentColor"})))},Ol=(0,m.forwardRef)(kl);n.p;var Rl,El=["title","titleId"];function _l(){return _l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Tl=function(e,t){var n=e.title,r=e.titleId,o=Al(e,El);return m.createElement("svg",_l({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?m.createElement("title",{id:r},n):null,Rl||(Rl=m.createElement("path",{d:"M0 14V16H6V14H0ZM0 2V4H10V2H0ZM10 18V16H18V14H10V12H8V18H10ZM4 6V8H0V10H4V12H6V6H4ZM18 10V8H8V10H18ZM12 6H14V4H18V2H14V0H12V6Z",fill:"currentColor"})))},Pl=(0,m.forwardRef)(Tl);n.p;var Il,Ll=["title","titleId"];function Ml(){return Ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Dl=function(e,t){var n=e.title,r=e.titleId,o=Kl(e,Ll);return m.createElement("svg",Ml({viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Il||(Il=m.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"})))},Nl=(0,m.forwardRef)(Dl);n.p;var Vl,zl=["title","titleId"];function Bl(){return Bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fl=function(e,t){var n=e.title,r=e.titleId,o=Hl(e,zl);return m.createElement("svg",Bl({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?m.createElement("title",{id:r},n):null,Vl||(Vl=m.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"})))},Wl=(0,m.forwardRef)(Fl);n.p;var $l,Ul,Zl,Gl=["title","titleId"];function Yl(){return Yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ql=function(e,t){var n=e.title,r=e.titleId,o=Xl(e,Gl);return m.createElement("svg",Yl({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?m.createElement("title",{id:r},n):null,$l||($l=m.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Ul||(Ul=m.createElement("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:3,y:3,width:14,height:14},m.createElement("rect",{x:3.5,y:3.5,width:13,height:13,rx:6.5,fill:"#fff"}))),Zl||(Zl=m.createElement("g",{mask:"url(#mask0)"},m.createElement("rect",{x:3.5,y:3.5,width:13,height:13,rx:6.5,fill:"currentColor",fillOpacity:.3}),m.createElement("rect",{x:4.5,y:4.5,width:11,height:11,rx:5.5,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2}),m.createElement("path",{d:"M5 5L15 15",stroke:"currentColor",strokeWidth:2}))))},Jl=(0,m.forwardRef)(ql);n.p;var Ql,ec=["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 rc=function(e,t){var n=e.title,r=e.titleId,o=nc(e,ec);return m.createElement("svg",tc({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Ql||(Ql=m.createElement("g",{opacity:.25},m.createElement("circle",{cx:12,cy:13,r:3,stroke:"black",strokeWidth:2}),m.createElement("path",{d:"M4 12C4 12 7 7 12 7C17 7 20 12 20 12",stroke:"black",strokeWidth:2,strokeLinecap:"square"}))))},oc=(0,m.forwardRef)(rc);n.p;var ic,ac,sc,lc,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 m.createElement("svg",hc({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,ic||(ic=m.createElement("path",{d:"M20.5 12.5L18 10",stroke:"black",strokeWidth:2})),ac||(ac=m.createElement("path",{d:"M17 15L15.5 12",stroke:"black",strokeWidth:2})),sc||(sc=m.createElement("path",{d:"M12 16V13",stroke:"black",strokeWidth:2})),lc||(lc=m.createElement("path",{d:"M7 15L8.5 12",stroke:"black",strokeWidth:2})),cc||(cc=m.createElement("path",{d:"M3.5 12.5L6 10",stroke:"black",strokeWidth:2})),dc||(dc=m.createElement("path",{d:"M4 8C4 8 7 13 12 13C17 13 20 8 20 8",stroke:"black",strokeWidth:2,strokeLinecap:"square"})))},pc=(0,m.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 m.createElement("svg",yc({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?m.createElement("title",{id:r},n):null,fc||(fc=m.createElement("path",{d:"M7 15L12 10L17 15",strokeWidth:2})))},wc=(0,m.forwardRef)(xc);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 m.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?m.createElement("title",{id:r},n):null,Cc||(Cc=m.createElement("path",{d:"M8 14L12 18L16 14",stroke:"black",strokeWidth:2})),Sc||(Sc=m.createElement("path",{d:"M8 10L12 6L16 10",stroke:"black",strokeWidth:2})))},Ec=(0,m.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 m.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?m.createElement("title",{id:r},n):null,_c||(_c=m.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"})))},Lc=(0,m.forwardRef)(Ic);n.p;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 m.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?m.createElement("title",{id:r},n):null,Mc||(Mc=m.createElement("path",{d:"M8 18L12 14L16 18",stroke:"black",strokeWidth:2})),Kc||(Kc=m.createElement("path",{d:"M8 6L12 10L16 6",stroke:"black",strokeWidth:2})))},Bc=(0,m.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 m.createElement("svg",Wc({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?m.createElement("title",{id:r},n):null,Hc||(Hc=m.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"})))},Zc=(0,m.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 m.createElement("svg",qc({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?m.createElement("title",{id:r},n):null,Gc||(Gc=m.createElement("rect",{x:6,y:6,width:12,height:12,rx:2,stroke:"currentColor",strokeWidth:2})),Yc||(Yc=m.createElement("rect",{x:9,y:8,width:6,height:2,rx:1,fill:"currentColor"})))},ed=(0,m.forwardRef)(Qc);n.p;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 m.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?m.createElement("title",{id:r},n):null,td||(td=m.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"})))},ad=(0,m.forwardRef)(id);n.p;var sd,ld,cd=["title","titleId"];function dd(){return dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hd=function(e,t){var n=e.title,r=e.titleId,o=ud(e,cd);return m.createElement("svg",dd({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?m.createElement("title",{id:r},n):null,sd||(sd=m.createElement("g",{opacity:.4},m.createElement("rect",{width:28,height:28,rx:14,fill:"white"}),m.createElement("rect",{x:.5,y:.5,width:27,height:27,rx:13.5,stroke:"currentColor",strokeOpacity:.5,strokeDasharray:"2 2"}))),ld||(ld=m.createElement("g",{opacity:.6},m.createElement("path",{d:"M13 6H15V22H13V6Z",fill:"currentColor"}),m.createElement("path",{d:"M6 13H22V15H6V13Z",fill:"currentColor"}))))},gd=(0,m.forwardRef)(hd);n.p;var md,pd,fd,vd,yd,bd=["title","titleId"];function xd(){return xd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=wd(e,bd);return m.createElement("svg",xd({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?m.createElement("title",{id:r},n):null,md||(md=m.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"})),pd||(pd=m.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"})),fd||(fd=m.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"})),vd||(vd=m.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"})),yd||(yd=m.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"})))},Sd=(0,m.forwardRef)(Cd);n.p;var jd,kd,Od,Rd,Ed,_d=["title","titleId"];function Ad(){return Ad=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Pd=function(e,t){var n=e.title,r=e.titleId,o=Td(e,_d);return m.createElement("svg",Ad({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?m.createElement("title",{id:r},n):null,jd||(jd=m.createElement("path",{d:"M17 20H13V18H15C16.1046 18 17 18.8954 17 20Z",fill:"currentColor"})),kd||(kd=m.createElement("circle",{cx:6.5,cy:18,r:2,fill:"currentColor"})),Od||(Od=m.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"})),Rd||(Rd=m.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"})),Ed||(Ed=m.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"})))},Id=(0,m.forwardRef)(Pd);n.p;var Ld,Md=["title","titleId"];function Kd(){return Kd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Nd=function(e,t){var n=e.title,r=e.titleId,o=Dd(e,Md);return m.createElement("svg",Kd({viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Ld||(Ld=m.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"})))},Vd=(0,m.forwardRef)(Nd);n.p;var zd,Bd=["title","titleId"];function Hd(){return Hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wd=function(e,t){var n=e.title,r=e.titleId,o=Fd(e,Bd);return m.createElement("svg",Hd({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,zd||(zd=m.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"})))},$d=(0,m.forwardRef)(Wd);n.p;var 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 m.createElement("svg",Gd({viewBox:"0 0 20 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Ud||(Ud=m.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"})))},qd=(0,m.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 m.createElement("svg",eu({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?m.createElement("title",{id:r},n):null,Jd||(Jd=m.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"})))},ru=(0,m.forwardRef)(nu);n.p;var ou,iu,au=["title","titleId"];function su(){return su=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var cu=function(e,t){var n=e.title,r=e.titleId,o=lu(e,au);return m.createElement("svg",su({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?m.createElement("title",{id:r},n):null,ou||(ou=m.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"})),iu||(iu=m.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"})))},du=(0,m.forwardRef)(cu);n.p;var uu,hu=["title","titleId"];function gu(){return gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var pu=function(e,t){var n=e.title,r=e.titleId,o=mu(e,hu);return m.createElement("svg",gu({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?m.createElement("title",{id:r},n):null,uu||(uu=m.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"})))},fu=(0,m.forwardRef)(pu);n.p;var 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 m.createElement("svg",bu({viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,vu||(vu=m.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,m.forwardRef)(wu);n.p;n.p;var Su,ju=["title","titleId"];function ku(){return ku=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ru=function(e,t){var n=e.title,r=e.titleId,o=Ou(e,ju);return m.createElement("svg",ku({viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Su||(Su=m.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})))},Eu=(0,m.forwardRef)(Ru);n.p;n.p;n.p;n.p;n.p;var _u,Au,Tu=["title","titleId"];function Pu(){return Pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=Iu(e,Tu);return m.createElement("svg",Pu({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?m.createElement("title",{id:r},n):null,_u||(_u=m.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"})),Au||(Au=m.createElement("path",{d:"M2 5.5L17 16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})))},Mu=(0,m.forwardRef)(Lu);n.p;var Ku,Du,Nu=["title","titleId"];function Vu(){return Vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bu=function(e,t){var n=e.title,r=e.titleId,o=zu(e,Nu);return m.createElement("svg",Vu({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?m.createElement("title",{id:r},n):null,Ku||(Ku=m.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"})),Du||(Du=m.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"})))},Hu=(0,m.forwardRef)(Bu);n.p;var Fu,Wu,$u,Uu=["title","titleId"];function Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Yu=function(e,t){var n=e.title,r=e.titleId,o=Gu(e,Uu);return m.createElement("svg",Zu({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?m.createElement("title",{id:r},n):null,Fu||(Fu=m.createElement("path",{d:"M18 6C18 6 21 8 21 12C21 16 18 18 18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Wu||(Wu=m.createElement("path",{d:"M16 8C16 8 18 9.5 18 12C18 14.5 16 16 16 16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),$u||($u=m.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"})))},Xu=(0,m.forwardRef)(Yu);n.p;var qu,Ju,Qu=["title","titleId"];function eh(){return eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var nh=function(e,t){var n=e.title,r=e.titleId,o=th(e,Qu);return m.createElement("svg",eh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,qu||(qu=m.createElement("defs",null,m.createElement("linearGradient",{id:"paint0_linear",x1:10.4999,y1:10,x2:28.9999,y2:27,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopOpacity:.8,stopColor:"var(--text-color-hover)"}),m.createElement("stop",{offset:1,stopOpacity:.4,stopColor:"var(--text-color-hover)"})))),Ju||(Ju=m.createElement("g",{opacity:.5},m.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)"}))))},rh=(0,m.forwardRef)(nh);n.p;var oh,ih,ah,sh=["title","titleId"];function lh(){return lh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var dh=function(e,t){var n=e.title,r=e.titleId,o=ch(e,sh);return m.createElement("svg",lh({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,oh||(oh=m.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)"})),ih||(ih=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),ah||(ah=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:.541016,y:10.5414,width:14.9172,height:14.9172,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("linearGradient",{id:"paint0_linear",x1:11.4999,y1:10,x2:29.9999,y2:27,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopColor:"#7F64FF",stopOpacity:.8}),m.createElement("stop",{offset:1,stopColor:"#7F64FF",stopOpacity:.4})))))},uh=(0,m.forwardRef)(dh);n.p;var hh,gh,mh,ph=["title","titleId"];function fh(){return fh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var yh=function(e,t){var n=e.title,r=e.titleId,o=vh(e,ph);return m.createElement("svg",fh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,hh||(hh=m.createElement("rect",{opacity:.4,x:5,y:5,width:22,height:22,rx:11,fill:"currentColor"})),gh||(gh=m.createElement("g",{filter:"url(#filter0_d)"},m.createElement("rect",{x:13.5,y:13.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),mh||(mh=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:10.5,y:11.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},bh=(0,m.forwardRef)(yh);n.p;var xh,wh,Ch,Sh=["title","titleId"];function jh(){return jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Oh=function(e,t){var n=e.title,r=e.titleId,o=kh(e,Sh);return m.createElement("svg",jh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,xh||(xh=m.createElement("rect",{opacity:.6,x:5,y:5,width:22,height:22,rx:11,fill:"#7F64FF"})),wh||(wh=m.createElement("g",{filter:"url(#filter0_d)"},m.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=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:8.54102,y:9.54144,width:14.9172,height:14.9172,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Rh=(0,m.forwardRef)(Oh);n.p;var Eh,_h,Ah,Th=["title","titleId"];function Ph(){return Ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Lh=function(e,t){var n=e.title,r=e.titleId,o=Ih(e,Th);return m.createElement("svg",Ph({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Eh||(Eh=m.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"})),_h||(_h=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),Ah||(Ah=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:3.5,y:4.5,width:23,height:25,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Mh=(0,m.forwardRef)(Lh);n.p;var Kh,Dh,Nh,Vh,zh,Bh=["title","titleId"];function Hh(){return Hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=Fh(e,Bh);return m.createElement("svg",Hh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Kh||(Kh=m.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"})),Dh||(Dh=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),Nh||(Nh=m.createElement("g",{filter:"url(#filter1_d)"},m.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"}))),Vh||(Vh=m.createElement("g",{filter:"url(#filter2_d)"},m.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"}))),zh||(zh=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:14.8691,y:17.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:14.8691,y:3.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter2_d",x:2.86914,y:10.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},$h=(0,m.forwardRef)(Wh);n.p;var Uh,Zh,Gh,Yh,Xh,qh=["title","titleId"];function Jh(){return Jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var eg=function(e,t){var n=e.title,r=e.titleId,o=Qh(e,qh);return m.createElement("svg",Jh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Uh||(Uh=m.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"})),Zh||(Zh=m.createElement("g",{filter:"url(#filter0_d)"},m.createElement("rect",{x:21.5,y:5.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),Gh||(Gh=m.createElement("g",{filter:"url(#filter1_d)"},m.createElement("rect",{x:5.5,y:5.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),Yh||(Yh=m.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"})),Xh||(Xh=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:18.5,y:3.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:2.5,y:3.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},tg=(0,m.forwardRef)(eg);n.p;var ng,rg,og,ig,ag,sg=["title","titleId"];function lg(){return lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var dg=function(e,t){var n=e.title,r=e.titleId,o=cg(e,sg);return m.createElement("svg",lg({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,ng||(ng=m.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"})),rg||(rg=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),og||(og=m.createElement("g",{filter:"url(#filter1_d)"},m.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"}))),ig||(ig=m.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"})),ag||(ag=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:17.8691,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:1.86914,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},ug=(0,m.forwardRef)(dg);n.p;var hg,gg,mg,pg,fg=["title","titleId"];function vg(){return vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var bg=function(e,t){var n=e.title,r=e.titleId,o=yg(e,fg);return m.createElement("svg",vg({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,hg||(hg=m.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"})),gg||(gg=m.createElement("g",{filter:"url(#filter0_d)"},m.createElement("rect",{x:23,y:21,width:5,height:5,rx:2.5,fill:"currentColor"}))),mg||(mg=m.createElement("g",{filter:"url(#filter1_d)"},m.createElement("rect",{x:4,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),pg||(pg=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:20,y:19,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:1,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},xg=(0,m.forwardRef)(bg);n.p;var wg,Cg,Sg,jg,kg=["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 Eg=function(e,t){var n=e.title,r=e.titleId,o=Rg(e,kg);return m.createElement("svg",Og({viewBox:"0 0 34 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,wg||(wg=m.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=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),Sg||(Sg=m.createElement("g",{filter:"url(#filter1_d)"},m.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"}))),jg||(jg=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:20.8691,y:18.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},_g=(0,m.forwardRef)(Eg);n.p;var Ag,Tg,Pg,Ig,Lg,Mg=["title","titleId"];function Kg(){return Kg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ng=function(e,t){var n=e.title,r=e.titleId,o=Dg(e,Mg);return m.createElement("svg",Kg({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Ag||(Ag=m.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"})),Tg||(Tg=m.createElement("g",{filter:"url(#filter0_d)"},m.createElement("rect",{x:23,y:21,width:5,height:5,rx:2.5,fill:"currentColor"}))),Pg||(Pg=m.createElement("g",{filter:"url(#filter1_d)"},m.createElement("rect",{x:4,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),Ig||(Ig=m.createElement("g",{filter:"url(#filter2_d)"},m.createElement("rect",{x:23,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),Lg||(Lg=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:20,y:19,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:1,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter2_d",x:20,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Vg=(0,m.forwardRef)(Ng);n.p;var zg,Bg,Hg,Fg,Wg,$g=["title","titleId"];function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Gg=function(e,t){var n=e.title,r=e.titleId,o=Zg(e,$g);return m.createElement("svg",Ug({viewBox:"0 0 34 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,zg||(zg=m.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"})),Bg||(Bg=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),Hg||(Hg=m.createElement("g",{filter:"url(#filter1_d)"},m.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"}))),Fg||(Fg=m.createElement("g",{filter:"url(#filter2_d)"},m.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"}))),Wg||(Wg=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:20.8691,y:18.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter2_d",x:20.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Yg=(0,m.forwardRef)(Gg);n.p;var Xg,qg,Jg=["title","titleId"];function Qg(){return Qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var tm=function(e,t){var n=e.title,r=e.titleId,o=em(e,Jg);return m.createElement("svg",Qg({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?m.createElement("title",{id:r},n):null,Xg||(Xg=m.createElement("defs",null,m.createElement("linearGradient",{id:"paint0_linear",x1:10.4999,y1:10,x2:28.9999,y2:27,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopOpacity:.8,stopColor:"var(--text-color-hover)"}),m.createElement("stop",{offset:1,stopOpacity:.4,stopColor:"var(--text-color-hover)"})))),qg||(qg=m.createElement("g",{opacity:.5},m.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)"}))))},nm=(0,m.forwardRef)(tm);n.p;var rm,om,im,am=["title","titleId"];function sm(){return sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=lm(e,am);return m.createElement("svg",sm({viewBox:"0 0 33 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,rm||(rm=m.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)"})),om||(om=m.createElement("rect",{x:11.0722,y:12.6907,width:13.354,height:1.94005,transform:"rotate(45 11.0722 12.6907)",fill:"white"})),im||(im=m.createElement("defs",null,m.createElement("linearGradient",{id:"paint0_linear",x1:26.7953,y1:3.64455,x2:26.7953,y2:26.9253,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopColor:"#617ADA"}),m.createElement("stop",{offset:.572917,stopColor:"#617ADA"}),m.createElement("stop",{offset:.625,stopColor:"#FF2A2A"}),m.createElement("stop",{offset:1,stopColor:"#FF2A2A"})))))},dm=(0,m.forwardRef)(cm);n.p;var um,hm=["title","titleId"];function gm(){return gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var pm=function(e,t){var n=e.title,r=e.titleId,o=mm(e,hm);return m.createElement("svg",gm({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,um||(um=m.createElement("g",{opacity:.4},m.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"}),m.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"}),m.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"}),m.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"}),m.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"}),m.createElement("path",{d:"M7.0002 15.0001C9.50018 17.5 10.5002 25 15.4289 25.4",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round"}))))},fm=(0,m.forwardRef)(pm);n.p;var vm,ym=["title","titleId"];function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var wm=function(e,t){var n=e.title,r=e.titleId,o=xm(e,ym);return m.createElement("svg",bm({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,vm||(vm=m.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,m.forwardRef)(wm);n.p;var Sm,jm=["title","titleId"];function km(){return km=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Rm=function(e,t){var n=e.title,r=e.titleId,o=Om(e,jm);return m.createElement("svg",km({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Sm||(Sm=m.createElement("g",{opacity:.4},m.createElement("mask",{id:"path-1-inside-1",fill:"white"},m.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"})),m.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"}),m.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)"}))))},Em=(0,m.forwardRef)(Rm);n.p;var _m,Am,Tm,Pm=["title","titleId"];function Im(){return Im=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=Lm(e,Pm);return m.createElement("svg",Im({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?m.createElement("title",{id:r},n):null,_m||(_m=m.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"})),Am||(Am=m.createElement("rect",{x:11,y:12,width:6,height:2,rx:.5,fill:"currentColor"})),Tm||(Tm=m.createElement("rect",{x:13,y:10,width:2,height:6,rx:.5,fill:"currentColor"})))},Km=(0,m.forwardRef)(Mm);n.p;var Dm,Nm,Vm=["title","titleId"];function zm(){return zm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Hm=function(e,t){var n=e.title,r=e.titleId,o=Bm(e,Vm);return m.createElement("svg",zm({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?m.createElement("title",{id:r},n):null,Dm||(Dm=m.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"})),Nm||(Nm=m.createElement("rect",{x:11,y:12,width:6,height:2,rx:.5,fill:"currentColor"})))},Fm=(0,m.forwardRef)(Hm);n.p;var Wm,$m,Um,Zm,Gm,Ym=["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 Jm=function(e,t){var n=e.title,r=e.titleId,o=qm(e,Ym);return m.createElement("svg",Xm({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?m.createElement("title",{id:r},n):null,Wm||(Wm=m.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"})),$m||($m=m.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"})),Um||(Um=m.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"})),Zm||(Zm=m.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"})),Gm||(Gm=m.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})))},Qm=(0,m.forwardRef)(Jm);n.p;var ep,tp,np,rp=["title","titleId"];function op(){return op=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ap=function(e,t){var n=e.title,r=e.titleId,o=ip(e,rp);return m.createElement("svg",op({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,ep||(ep=m.createElement("path",{opacity:.4,d:"M12.5 9.5L19.4 24",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round"})),tp||(tp=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),np||(np=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:8,y:5.16357,width:17.6347,height:20.5406,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},sp=(0,m.forwardRef)(ap);n.p;var lp,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 m.createElement("svg",up({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,lp||(lp=m.createElement("g",{clipPath:"url(#clip0)"},m.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"}),m.createElement("path",{opacity:.4,d:"M6.00007 14C5.00007 9 9.00007 4 15.0001 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),m.createElement("g",{filter:"url(#filter0_d)"},m.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"})))),cp||(cp=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:-.0964355,y:10,width:12.1927,height:11.1972,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("clipPath",{id:"clip0"},m.createElement("rect",{width:32,height:32,fill:"white"})))))},mp=(0,m.forwardRef)(gp);n.p;var pp,fp,vp=["title","titleId"];function yp(){return yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var xp=function(e,t){var n=e.title,r=e.titleId,o=bp(e,vp);return m.createElement("svg",yp({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,pp||(pp=m.createElement("g",{clipPath:"url(#clip0)"},m.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"}),m.createElement("path",{opacity:.4,d:"M25.9999 14C26.9999 9 22.9999 4 16.9999 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),m.createElement("g",{filter:"url(#filter0_d)"},m.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"})))),fp||(fp=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:19.9036,y:10,width:12.1927,height:11.1972,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("clipPath",{id:"clip0"},m.createElement("rect",{width:32,height:32,fill:"white",transform:"matrix(-1 0 0 1 32 0)"})))))},wp=(0,m.forwardRef)(xp);n.p;var 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 m.createElement("svg",jp({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Cp||(Cp=m.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"})))},Rp=(0,m.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 m.createElement("svg",Ap({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Ep||(Ep=m.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"})))},Ip=(0,m.forwardRef)(Pp);n.p;var Lp,Mp,Kp=["title","titleId"];function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Vp=function(e,t){var n=e.title,r=e.titleId,o=Np(e,Kp);return m.createElement("svg",Dp({viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Lp||(Lp=m.createElement("rect",{x:14,y:14,width:12,height:12,rx:2,fill:"white",stroke:"currentColor",strokeWidth:2})),Mp||(Mp=m.createElement("rect",{x:10,y:10,width:12,height:12,rx:2,fill:"white",stroke:"currentColor",strokeWidth:2})))},zp=(0,m.forwardRef)(Vp);n.p;var Bp,Hp=["title","titleId"];function Fp(){return Fp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var $p=function(e,t){var n=e.title,r=e.titleId,o=Wp(e,Hp);return m.createElement("svg",Fp({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Bp||(Bp=m.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"})))},Up=(0,m.forwardRef)($p);n.p;var Zp,Gp,Yp,Xp,qp=["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 ef=function(e,t){var n=e.title,r=e.titleId,o=Qp(e,qp);return m.createElement("svg",Jp({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?m.createElement("title",{id:r},n):null,Zp||(Zp=m.createElement("rect",{x:9,y:9,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Gp||(Gp=m.createElement("rect",{x:9,y:18.3334,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Yp||(Yp=m.createElement("rect",{x:18.333,y:9,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Xp||(Xp=m.createElement("rect",{x:18.333,y:18.3334,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})))},tf=(0,m.forwardRef)(ef);n.p;var nf,rf=["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 sf=function(e,t){var n=e.title,r=e.titleId,o=af(e,rf);return m.createElement("svg",of({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?m.createElement("title",{id:r},n):null,nf||(nf=m.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"})))},lf=(0,m.forwardRef)(sf);n.p;var cf,df=["title","titleId"];function uf(){return uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gf=function(e,t){var n=e.title,r=e.titleId,o=hf(e,df);return m.createElement("svg",uf({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?m.createElement("title",{id:r},n):null,cf||(cf=m.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"})))},mf=(0,m.forwardRef)(gf);n.p;var pf,ff=["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=yf(e,ff);return m.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?m.createElement("title",{id:r},n):null,pf||(pf=m.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"})))},xf=(0,m.forwardRef)(bf);n.p;var wf,Cf=["title","titleId"];function Sf(){return Sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var kf=function(e,t){var n=e.title,r=e.titleId,o=jf(e,Cf);return m.createElement("svg",Sf({viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,wf||(wf=m.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"})))},Of=(0,m.forwardRef)(kf);n.p;var Rf,Ef,_f,Af=["title","titleId"];function Tf(){return Tf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var If=function(e,t){var n=e.title,r=e.titleId,o=Pf(e,Af);return m.createElement("svg",Tf({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?m.createElement("title",{id:r},n):null,Rf||(Rf=m.createElement("circle",{cx:9,cy:9,r:1.5,fill:"currentColor"})),Ef||(Ef=m.createElement("circle",{cx:3.75,cy:9,r:1.5,fill:"currentColor"})),_f||(_f=m.createElement("circle",{cx:14.25,cy:9,r:1.5,fill:"currentColor"})))},Lf=(0,m.forwardRef)(If);n.p;n.p;var Mf,Kf,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 m.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?m.createElement("title",{id:r},n):null,Mf||(Mf=m.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"})),Kf||(Kf=m.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"})),Df||(Df=m.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"})))},Hf=(0,m.forwardRef)(Bf);n.p;var Ff,Wf,$f=["title","titleId"];function Uf(){return Uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Gf=function(e,t){var n=e.title,r=e.titleId,o=Zf(e,$f);return m.createElement("svg",Uf({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?m.createElement("title",{id:r},n):null,Ff||(Ff=m.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"})),Wf||(Wf=m.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"})))},Yf=(0,m.forwardRef)(Gf);n.p;var Xf,qf=["title","titleId"];function Jf(){return Jf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ev=function(e,t){var n=e.title,r=e.titleId,o=Qf(e,qf);return m.createElement("svg",Jf({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?m.createElement("title",{id:r},n):null,Xf||(Xf=m.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"})))},tv=(0,m.forwardRef)(ev);n.p;var nv,rv=["title","titleId"];function ov(){return ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var av=function(e,t){var n=e.title,r=e.titleId,o=iv(e,rv);return m.createElement("svg",ov({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?m.createElement("title",{id:r},n):null,nv||(nv=m.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"})))},sv=(0,m.forwardRef)(av);n.p;var lv,cv=["title","titleId"];function dv(){return dv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hv=function(e,t){var n=e.title,r=e.titleId,o=uv(e,cv);return m.createElement("svg",dv({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?m.createElement("title",{id:r},n):null,lv||(lv=m.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"})))},gv=(0,m.forwardRef)(hv);n.p;var mv,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 m.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?m.createElement("title",{id:r},n):null,mv||(mv=m.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"})),pv||(pv=m.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"})),fv||(fv=m.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"})))},wv=(0,m.forwardRef)(xv);n.p;var Cv,Sv=["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 Ov=function(e,t){var n=e.title,r=e.titleId,o=kv(e,Sv);return m.createElement("svg",jv({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?m.createElement("title",{id:r},n):null,Cv||(Cv=m.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"})))},Rv=(0,m.forwardRef)(Ov);n.p;var Ev,_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 m.createElement("svg",Tv({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?m.createElement("title",{id:r},n):null,Ev||(Ev=m.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"})),_v||(_v=m.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"})))},Lv=(0,m.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 m.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?m.createElement("title",{id:r},n):null,Mv||(Mv=m.createElement("path",{d:"M16 11L12 7L8 11",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})),Kv||(Kv=m.createElement("path",{d:"M12 17L12 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})))},Bv=(0,m.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 m.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?m.createElement("title",{id:r},n):null,Hv||(Hv=m.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})))},Zv=(0,m.forwardRef)(Uv);n.p;var Gv,Yv,Xv=["title","titleId"];function qv(){return qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Qv=function(e,t){var n=e.title,r=e.titleId,o=Jv(e,Xv);return m.createElement("svg",qv({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?m.createElement("title",{id:r},n):null,Gv||(Gv=m.createElement("path",{d:"M8 13L12 17L16 13",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})),Yv||(Yv=m.createElement("path",{d:"M12 7V16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})))},ey=(0,m.forwardRef)(Qv);n.p;var ty,ny=["title","titleId"];function ry(){return ry=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var iy=function(e,t){var n=e.title,r=e.titleId,o=oy(e,ny);return m.createElement("svg",ry({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?m.createElement("title",{id:r},n):null,ty||(ty=m.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"})))},ay=(0,m.forwardRef)(iy);n.p;n.p;n.p;n.p;var sy,ly=["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 uy=function(e,t){var n=e.title,r=e.titleId,o=dy(e,ly);return m.createElement("svg",cy({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?m.createElement("title",{id:r},n):null,sy||(sy=m.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"})))},hy=(0,m.forwardRef)(uy);n.p;var gy,my=["title","titleId"];function py(){return py=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var vy=function(e,t){var n=e.title,r=e.titleId,o=fy(e,my);return m.createElement("svg",py({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?m.createElement("title",{id:r},n):null,gy||(gy=m.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"})))},yy=(0,m.forwardRef)(vy);n.p;var by,xy=["title","titleId"];function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Sy=function(e,t){var n=e.title,r=e.titleId,o=Cy(e,xy);return m.createElement("svg",wy({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?m.createElement("title",{id:r},n):null,by||(by=m.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"})))},jy=(0,m.forwardRef)(Sy);n.p;var ky,Oy=["title","titleId"];function Ry(){return Ry=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _y=function(e,t){var n=e.title,r=e.titleId,o=Ey(e,Oy);return m.createElement("svg",Ry({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?m.createElement("title",{id:r},n):null,ky||(ky=m.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"})))},Ay=(0,m.forwardRef)(_y);n.p;var Ty,Py=["title","titleId"];function Iy(){return Iy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var My=function(e,t){var n=e.title,r=e.titleId,o=Ly(e,Py);return m.createElement("svg",Iy({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?m.createElement("title",{id:r},n):null,Ty||(Ty=m.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"})))},Ky=(0,m.forwardRef)(My);n.p;var Dy,Ny,Vy,zy=["title","titleId"];function By(){return By=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fy=function(e,t){var n=e.title,r=e.titleId,o=Hy(e,zy);return m.createElement("svg",By({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?m.createElement("title",{id:r},n):null,Dy||(Dy=m.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"})),Ny||(Ny=m.createElement("circle",{r:2.69819,transform:"matrix(1 0 0 -1 21.3018 12)",fill:"currentColor"})),Vy||(Vy=m.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"})))},Wy=(0,m.forwardRef)(Fy);n.p;var $y,Uy,Zy,Gy=["title","titleId"];function Yy(){return Yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qy=function(e,t){var n=e.title,r=e.titleId,o=Xy(e,Gy);return m.createElement("svg",Yy({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?m.createElement("title",{id:r},n):null,$y||($y=m.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"})),Uy||(Uy=m.createElement("circle",{cx:21.3018,cy:38,r:2.69819,fill:"currentColor"})),Zy||(Zy=m.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"})))},Jy=(0,m.forwardRef)(qy);n.p;var Qy,eb,tb,nb=["title","titleId"];function rb(){return rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ib=function(e,t){var n=e.title,r=e.titleId,o=ob(e,nb);return m.createElement("svg",rb({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?m.createElement("title",{id:r},n):null,Qy||(Qy=m.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"})),eb||(eb=m.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"})),tb||(tb=m.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"})))},ab=(0,m.forwardRef)(ib);n.p;var sb,lb,cb,db=["title","titleId"];function ub(){return ub=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gb=function(e,t){var n=e.title,r=e.titleId,o=hb(e,db);return m.createElement("svg",ub({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?m.createElement("title",{id:r},n):null,sb||(sb=m.createElement("path",{d:"M2 2H3V10H2V2Z",fill:"currentColor"})),lb||(lb=m.createElement("path",{d:"M2 9H10V10H2V9Z",fill:"currentColor"})),cb||(cb=m.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"})))},mb=(0,m.forwardRef)(gb);n.p;var pb,fb,vb,yb=["title","titleId"];function bb(){return bb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var wb=function(e,t){var n=e.title,r=e.titleId,o=xb(e,yb);return m.createElement("svg",bb({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?m.createElement("title",{id:r},n):null,pb||(pb=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.3})),fb||(fb=m.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"})),vb||(vb=m.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"})))},Cb=(0,m.forwardRef)(wb);n.p;var Sb,jb,kb,Ob=["title","titleId"];function Rb(){return Rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _b=function(e,t){var n=e.title,r=e.titleId,o=Eb(e,Ob);return m.createElement("svg",Rb({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?m.createElement("title",{id:r},n):null,Sb||(Sb=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),jb||(jb=m.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"})),kb||(kb=m.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"})))},Ab=(0,m.forwardRef)(_b);n.p;var Tb,Pb,Ib,Lb,Mb,Kb,Db,Nb=["title","titleId"];function Vb(){return Vb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bb=function(e,t){var n=e.title,r=e.titleId,o=zb(e,Nb);return m.createElement("svg",Vb({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?m.createElement("title",{id:r},n):null,Tb||(Tb=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),Pb||(Pb=m.createElement("rect",{x:7,y:7,width:10,height:10,fill:"currentColor",fillOpacity:.3})),Ib||(Ib=m.createElement("rect",{x:8,y:8,width:8,height:8,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2})),Lb||(Lb=m.createElement("rect",{x:14,y:14,width:4,height:4,rx:2,fill:"currentColor"})),Mb||(Mb=m.createElement("rect",{x:6,y:14,width:4,height:4,rx:2,fill:"currentColor"})),Kb||(Kb=m.createElement("rect",{x:14,y:6,width:4,height:4,rx:2,fill:"currentColor"})),Db||(Db=m.createElement("rect",{x:6,y:6,width:4,height:4,rx:2,fill:"currentColor"})))},Hb=(0,m.forwardRef)(Bb);n.p;var Fb,Wb,$b,Ub,Zb,Gb=["title","titleId"];function Yb(){return Yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qb=function(e,t){var n=e.title,r=e.titleId,o=Xb(e,Gb);return m.createElement("svg",Yb({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?m.createElement("title",{id:r},n):null,Fb||(Fb=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),Wb||(Wb=m.createElement("path",{d:"M7 7H17V9L16 14L15 9H9V15L14 16L9 17H7V7Z",fill:"currentColor",fillOpacity:.3})),$b||($b=m.createElement("rect",{x:6.5,y:14.5,width:3,height:3,rx:1.5,fill:"currentColor"})),Ub||(Ub=m.createElement("rect",{x:14.5,y:6.5,width:3,height:3,rx:1.5,fill:"currentColor"})),Zb||(Zb=m.createElement("rect",{x:6,y:6,width:4,height:4,rx:2,fill:"currentColor"})))},Jb=(0,m.forwardRef)(qb);n.p;var Qb,ex,tx,nx,rx,ox=["title","titleId"];function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sx=function(e,t){var n=e.title,r=e.titleId,o=ax(e,ox);return m.createElement("svg",ix({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?m.createElement("title",{id:r},n):null,Qb||(Qb=m.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),ex||(ex=m.createElement("path",{d:"M5 5H15V7L14 12L13 7H7V13L12 14L7 15H5V5Z",fill:"currentColor",fillOpacity:.3})),tx||(tx=m.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"})),nx||(nx=m.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"})),rx||(rx=m.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"})))},lx=(0,m.forwardRef)(sx);n.p;var cx,dx,ux,hx=["title","titleId"];function gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=mx(e,hx);return m.createElement("svg",gx({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?m.createElement("title",{id:r},n):null,cx||(cx=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),dx||(dx=m.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"})),ux||(ux=m.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"})))},fx=(0,m.forwardRef)(px);n.p;var vx,yx,bx,xx=["title","titleId"];function wx(){return wx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Sx=function(e,t){var n=e.title,r=e.titleId,o=Cx(e,xx);return m.createElement("svg",wx({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?m.createElement("title",{id:r},n):null,vx||(vx=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),m.createElement("mask",{id:"mask0_1972_16465",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:5,y:5,width:14,height:14},yx||(yx=m.createElement("rect",{x:5,y:5,width:14,height:14,rx:7,fill:"currentColor"}))),bx||(bx=m.createElement("g",{mask:"url(#mask0_1972_16465)"},m.createElement("rect",{x:5,y:5,width:14,height:14,rx:7,fill:"currentColor",fillOpacity:.3}),m.createElement("rect",{x:6,y:6,width:12,height:12,rx:6,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2}),m.createElement("path",{d:"M7 7L17 17",stroke:"currentColor",strokeWidth:2}))))},jx=(0,m.forwardRef)(Sx);n.p;var kx,Ox,Rx,Ex=["title","titleId"];function _x(){return _x=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Tx=function(e,t){var n=e.title,r=e.titleId,o=Ax(e,Ex);return m.createElement("svg",_x({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?m.createElement("title",{id:r},n):null,kx||(kx=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),Ox||(Ox=m.createElement("rect",{x:5,y:16,width:14,height:3,rx:1.5,fill:"currentColor"})),Rx||(Rx=m.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"})))},Px=(0,m.forwardRef)(Tx);n.p;var Ix,Lx,Mx,Kx=["title","titleId"];function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Vx=function(e,t){var n=e.title,r=e.titleId,o=Nx(e,Kx);return m.createElement("svg",Dx({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?m.createElement("title",{id:r},n):null,Ix||(Ix=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Lx||(Lx=m.createElement("rect",{x:7.75732,y:6.34314,width:14,height:2,rx:1,transform:"rotate(45 7.75732 6.34314)",fill:"#DD0000"})),Mx||(Mx=m.createElement("rect",{width:14,height:2,rx:1,transform:"matrix(-0.707107 0.707107 0.707107 0.707107 16.2427 6.34314)",fill:"#DD0000"})))},zx=(0,m.forwardRef)(Vx);n.p;var Bx,Hx,Fx,Wx,$x=["title","titleId"];function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Gx=function(e,t){var n=e.title,r=e.titleId,o=Zx(e,$x);return m.createElement("svg",Ux({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?m.createElement("title",{id:r},n):null,Bx||(Bx=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Hx||(Hx=m.createElement("rect",{x:5,y:10.2441,width:12.3358,height:3.52451,rx:1.76226,fill:"currentColor"})),Fx||(Fx=m.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"})),Wx||(Wx=m.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"})))},Yx=(0,m.forwardRef)(Gx);n.p;var Xx,qx,Jx=["title","titleId"];function Qx(){return Qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var tw=function(e,t){var n=e.title,r=e.titleId,o=ew(e,Jx);return m.createElement("svg",Qx({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?m.createElement("title",{id:r},n):null,Xx||(Xx=m.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.3})),qx||(qx=m.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"})))},nw=(0,m.forwardRef)(tw);n.p;var rw,ow,iw,aw,sw=["title","titleId"];function lw(){return lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var dw=function(e,t){var n=e.title,r=e.titleId,o=cw(e,sw);return m.createElement("svg",lw({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?m.createElement("title",{id:r},n):null,rw||(rw=m.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),ow||(ow=m.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})),iw||(iw=m.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})),aw||(aw=m.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"})))},uw=(0,m.forwardRef)(dw);n.p;var hw,gw=["title","titleId"];function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var fw=function(e,t){var n=e.title,r=e.titleId,o=pw(e,gw);return m.createElement("svg",mw({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?m.createElement("title",{id:r},n):null,hw||(hw=m.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"})))},vw=(0,m.forwardRef)(fw);n.p;var yw,bw=["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 Cw=function(e,t){var n=e.title,r=e.titleId,o=ww(e,bw);return m.createElement("svg",xw({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?m.createElement("title",{id:r},n):null,yw||(yw=m.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"})))},Sw=(0,m.forwardRef)(Cw);n.p;var jw,kw=["title","titleId"];function Ow(){return Ow=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ew=function(e,t){var n=e.title,r=e.titleId,o=Rw(e,kw);return m.createElement("svg",Ow({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?m.createElement("title",{id:r},n):null,jw||(jw=m.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"})))},_w=(0,m.forwardRef)(Ew);n.p;var Aw,Tw=["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 Lw=function(e,t){var n=e.title,r=e.titleId,o=Iw(e,Tw);return m.createElement("svg",Pw({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?m.createElement("title",{id:r},n):null,Aw||(Aw=m.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"})))},Mw=(0,m.forwardRef)(Lw);n.p;var Kw,Dw=["title","titleId"];function Nw(){return Nw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zw=function(e,t){var n=e.title,r=e.titleId,o=Vw(e,Dw);return m.createElement("svg",Nw({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?m.createElement("title",{id:r},n):null,Kw||(Kw=m.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"})))},Bw=(0,m.forwardRef)(zw);n.p;var Hw,Fw,Ww,$w,Uw,Zw,Gw=["title","titleId"];function Yw(){return Yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qw=function(e,t){var n=e.title,r=e.titleId,o=Xw(e,Gw);return m.createElement("svg",Yw({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?m.createElement("title",{id:r},n):null,Hw||(Hw=m.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"})),Fw||(Fw=m.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"})),Ww||(Ww=m.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"})),$w||($w=m.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"})),Uw||(Uw=m.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"})),Zw||(Zw=m.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"})))},Jw=(0,m.forwardRef)(qw);n.p;var Qw,eC,tC,nC,rC,oC,iC=["title","titleId"];function aC(){return aC=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var lC=function(e,t){var n=e.title,r=e.titleId,o=sC(e,iC);return m.createElement("svg",aC({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?m.createElement("title",{id:r},n):null,Qw||(Qw=m.createElement("path",{d:"M4 2C2.9 2 2 2.89 2 4V7H4V4H7V2H4Z",fill:"currentColor"})),eC||(eC=m.createElement("path",{d:"M22 7V4C22 2.89 21.1 2 20 2H17V4H20V7H22Z",fill:"currentColor"})),tC||(tC=m.createElement("path",{d:"M2 17V20C2 21.11 2.9 22 4 22H7V20H4V17H2Z",fill:"currentColor"})),nC||(nC=m.createElement("path",{d:"M14 2H10V4H14V2Z",fill:"currentColor"})),rC||(rC=m.createElement("path",{d:"M4 10H2V14H4V10Z",fill:"currentColor"})),oC||(oC=m.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"})))},cC=(0,m.forwardRef)(lC);n.p;const dC=(e,t=!1)=>t?[...e].reverse():e,uC=({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:p,onMaxIconClick:f})=>{var v;const y=null!=(v=null!=e?e:t)?v:n?[0,100]:0,[b,w]=((e,t)=>{const n=(0,m.useMemo)((()=>{var n;return null!=(n=null!=e?e:t)?n:""}),[e,t]),[r,o]=(0,m.useState)(n);return(0,m.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,x.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)&&(w(i),(t||o||r)&&(null==g||g(e)),C=i)},O=(0,m.useCallback)((e=>(e-i)/(a-i)*100),[i,a]),R=(0,m.useCallback)((e=>{const t=a-i;return(0,x.clamp)(t*(e/l)+i,i,a)}),[i,a,l]),_=(0,m.useCallback)((()=>{if(!n)return f?f(b):void k(b+s)}),[s,n,b]),A=(0,m.useCallback)((()=>{if(!n)return p?p(b):void k(b-s)}),[s,n,b]),T=(0,m.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,x.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,E.jsxs)(Qe.eB,{name:"range",mod:{align:c},style:{[P]:l},children:[r?h&&(0,E.jsx)(Qe.Sl,{name:"icon",onMouseDown:_,children:h}):u&&(0,E.jsx)(Qe.Sl,{name:"icon",onMouseDown:A,children:u}),(0,E.jsxs)(Qe.Sl,{name:"body",onClick:T,children:[(0,E.jsx)(Qe.Sl,{name:"line"}),(0,E.jsx)(gC,{align:c,reverse:r,value:b,valueConvert:O}),S?dC(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,x.clamp)(e,i,r):(0,x.clamp)(e,r,a),t[o]=b[o],t};return(0,E.jsx)(hC,{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,E.jsx)(hC,{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,E.jsx)(Qe.Sl,{name:"icon",onMouseDown:A,children:u}):h&&(0,E.jsx)(Qe.Sl,{name:"icon",onMouseDown:_,children:h})]})},hC=({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,E.jsx)(Qe.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,x.clamp)(o+c/100*s,0,s);i=n(a),requestAnimationFrame((()=>{null==r||r(i)}))},d=e=>{e.stopPropagation(),(0,x.isDefined)(i)&&(null==o||o(i)),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",d)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",d)},onDoubleClick:()=>{(0,x.isDefined)(i)&&(null==o||o(i))}})},gC=({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,E.jsx)(Qe.Sl,{name:"indicator",style:o})},mC=({volume:e=.5,onVolumeChange:t})=>{const n=(0,m.useRef)(e),r={color:"#99A0AE"},o=(0,m.useMemo)((()=>e>.5?(0,E.jsx)(Xu,{style:r}):e>0?(0,E.jsx)(Hu,{style:r}):(0,E.jsx)(Mu,{style:r})),[e]);return(0,E.jsx)(uC,{continuous:!0,min:_n.min,max:_n.max,step:_n.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))}})},pC=({text:e})=>(0,E.jsxs)(Qe.eB,{name:"control-info",children:[(0,E.jsx)(Fa,{}),(0,E.jsx)(Qe.Sl,{name:"tooltip",children:e})]}),fC=({description:e,info:t,max:n,min:r,value:o,step:i=1,onChange:a})=>{const s=(0,m.useRef)(),[l,c]=(0,m.useState)();(0,m.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,m.useState)(!1);(0,m.useEffect)((()=>{i(e<=0)}),[e]);const a=e=>{const n=Number.parseInt(e.currentTarget.value);n?n>vC?null==t||t(1):n<0?null==t||t(0):null==t||t(n/vC):null==t||t(0)},s=()=>{i(!o),null==t||t(o?1:0)},l=()=>(0,E.jsx)(Qe.Sl,{name:"mute",children:(0,E.jsx)(Qe.Sl,{name:"mute-button",onClick:s,children:o?"Unmute":"Mute"})});return(0,E.jsxs)(Qe.eB,{name:"audio-control",onClick:e=>e.stopPropagation(),children:[(0,E.jsx)(AC,{look:r?"active":void 0,onClick:n,children:o?(0,E.jsx)(Da,{}):(0,E.jsx)(Ta,{})}),r&&(0,E.jsxs)(Qe.Sl,{name:"modal",children:[(0,E.jsx)(fC,{min:0,max:vC,value:Math.round(e*vC),onChange:a,description:"Volume",info:"Increase or decrease the volume of the audio"}),l()]})]})},bC=({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,m.useState)(!0),[u,h]=(0,m.useState)(!0);(0,m.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)},p=()=>{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,E.jsxs)(Qe.eB,{name:"audio-config",onClick:e=>e.stopPropagation(),children:[(0,E.jsx)(AC,{look:e?"active":void 0,onClick:o,children:(0,E.jsx)(ka,{})}),e&&(0,E.jsxs)(Qe.Sl,{name:"modal",children:[(0,E.jsx)(fC,{min:.5,max:2.5,step:.1,value:l,description:"Playback speed",info:"Increase or decrease the playback speed",onChange:f}),(0,E.jsx)(fC,{min:1,max:150,step:.1,value:n,description:"Audio zoom y-axis",info:"Increase or decrease the appearance of amplitude",onChange:v}),(0,E.jsxs)(Qe.Sl,{name:"buttons",children:[(0,E.jsxs)(Qe.Sl,{name:"menu-button",onClick:g,children:[c?"Hide":"Show"," timeline"]}),(0,E.jsxs)(Qe.Sl,{name:"menu-button",onClick:p,children:[u?"Hide":"Show"," audio wave"]})]})]})]})};class xC{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 wC=(0,m.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,E.jsxs)(Qe.eB,{ref:d,name:"field-label",mod:h,tag:u,style:s,"data-required":n,children:[(0,E.jsx)(Qe.Sl,{name:"text",children:(0,E.jsxs)(Qe.Sl,{name:"content",children:[e,o&&(0,E.jsx)(Qe.Sl,{name:"description",children:o})]})}),(0,E.jsx)(Qe.Sl,{name:"field",children:t})]})})),CC=wC,SC=["sidepanel","value","readonly","onChange","label"],jC=e=>{let{sidepanel:t=!1,value:n,readonly:r=!1,onChange:o,label:i}=e,a=(0,nr.A)(e,SC);const s=m.createRef(),[l,c]=(0,m.useState)(n);(0,m.useEffect)((()=>{s.current&&new xC(s.current,"11:11:11:111",(e=>{c(e)}))}),[]),(0,m.useEffect)((()=>{c(d(n||0,!0))}),[n]);const d=(0,m.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,E.jsx)(Qe.eB,Object.assign({name:"time-box",mod:{sidepanel:t}},a,{children:(0,E.jsx)(Qe.Sl,{name:"input-time",maxLength:12,tag:"input",ref:s,type:"text",readOnly:r,value:l,onKeyDown:h,onChange:()=>{},onBlur:u})}));return i?(0,E.jsx)(CC,{size:"small",flat:!0,text:i,children:g}):g},kC=({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,E.jsxs)(Qe.eB,{name:"timer-duration-control",children:[(0,E.jsx)(jC,{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,E.jsx)(jC,{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,E.jsx)(jC,{sidepanel:e,readonly:!0,value:n-t,onChange:()=>{},"data-testid":"timebox-duration-time",label:u?"Duration":void 0})]})},OC=["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"],RC=["children"],EC=({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")},_C=(0,m.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:p,onForward:f,onPlay:v,onPause:y,onFullScreenToggle:b,onStepBackward:w,onPositionChange:C,onStepForward:S,onSpeedChange:j,onToggleCollapsed:O,formatPosition:R,toggleVisibility:_,layerVisibility:A,mediaType:T}=e,P=(0,nr.A)(e,OC);const{settings:I}=(0,m.useContext)(Dr),[L,M]=(0,m.useState)(!1),[K,D]=(0,m.useState)(!1),[N,V]=(0,m.useState)(!1),[z,B]=[1===n,n===t],H=(0,m.useMemo)((()=>Math.max((t-1)/r,0)),[t,r]),F=(0,m.useMemo)((()=>(n-1)/r),[n,r]),W=LC(P.customControls),$=(e,t)=>n=>{e(n,null!=t?t:void 0)},U=(0,m.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,m.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,E.jsxs)(Qe.eB,{name:"timeline-controls",tag:ns,spread:!0,style:{gridAutoColumns:"auto"},children:[(0,k.VS)(k.vS)&&"audio"===T?(0,E.jsxs)(Qe.Sl,{name:"group",tag:ns,size:"small",style:{gridAutoColumns:"auto"},children:[(0,E.jsx)(bC,{onSetModal:G,onAmpChange:P.onAmpChange,configModal:K,onSpeedChange:e=>null==j?void 0:j(e),speed:P.speed||0,amp:P.amp||0,toggleVisibility:_,layerVisibility:A}),(0,E.jsx)(yC,{volume:P.volume||0,onVolumeChange:P.onVolumeChange,onSetModal:Z,audioModal:N})]}):(0,E.jsxs)(Qe.Sl,{name:"group",tag:ns,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,x.isDefined)(o)&&(0,E.jsx)(o,{length:t,position:n-1,volume:P.volume,onPositionChange:C,onVolumeChange:P.onVolumeChange},e)})),null==W?void 0:W.left]}),(0,E.jsxs)(Qe.Sl,{name:"main-controls",children:[(0,E.jsx)(Qe.Sl,{name:"group",tag:ns,collapsed:!0,children:l}),(0,E.jsxs)(Qe.Sl,{name:"group",tag:ns,collapsed:!0,children:[null==W?void 0:W.leftCenter,(0,E.jsx)(IC,{showAlterantive:L&&!u,main:(0,E.jsxs)(E.Fragment,{children:[(null==I?void 0:I.stepSize)&&!u&&(0,E.jsx)(AC,{onClick:$(w,I.stepSize),hotkey:null==I?void 0:I.stepAltBack,disabled:z,children:(0,E.jsx)(ha,{})}),(0,E.jsx)(AC,{onClick:$(w),hotkey:null==I?void 0:I.stepBackHotkey,disabled:z,children:(0,E.jsx)(Wr,{})})]}),alt:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(AC,{onClick:()=>null==p?void 0:p(),disabled:z,hotkey:null==I?void 0:I.skipToBeginning,children:(0,E.jsx)(gi,{})}),(0,E.jsx)(AC,{onClick:()=>null==p?void 0:p(d),disabled:z,hotkey:null==I?void 0:I.hopBackward,children:(0,E.jsx)(uo,{})})]})}),(0,E.jsx)(AC,{"data-testid":"playback-button:"+(o?"pause":"play"),onClick:U,hotkey:null==I?void 0:I.playpauseHotkey,children:o?(0,E.jsx)(ai,{}):(0,E.jsx)(Qo,{})}),(0,E.jsx)(IC,{showAlterantive:L&&!u,main:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(AC,{onClick:$(S),hotkey:null==I?void 0:I.stepForwardHotkey,disabled:B,children:(0,E.jsx)(Xr,{})}),(null==I?void 0:I.stepSize)&&!u&&(0,E.jsx)(AC,{disabled:B,onClick:$(S,I.stepSize),hotkey:null==I?void 0:I.stepAltForward,children:(0,E.jsx)(ba,{})})]}),alt:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(AC,{onClick:()=>null==f?void 0:f(d),disabled:B,hotkey:null==I?void 0:I.hopForward,children:(0,E.jsx)(ro,{})}),(0,E.jsx)(AC,{onClick:()=>null==f?void 0:f(),disabled:B,hotkey:null==I?void 0:I.skipToEnd,children:(0,E.jsx)(yo,{})})]})}),null==W?void 0:W.rightCenter]}),(0,E.jsxs)(Qe.Sl,{name:"group",tag:ns,collapsed:!0,children:[!u&&g&&(0,E.jsx)(AC,{tooltip:"Toggle Timeline",onClick:()=>null==O?void 0:O(!i),children:i?(0,E.jsx)(ia,{}):(0,E.jsx)(qi,{})}),h&&(0,E.jsx)(AC,{tooltip:"Fullscreen",onClick:()=>null==b?void 0:b(!1),children:c?(0,E.jsx)(Ti,{}):(0,E.jsx)(Ci,{})})]})]}),(0,E.jsx)(Qe.Sl,{name:"group",tag:ns,size:"small",children:(0,k.VS)(k.vS)&&"audio"===T?(0,E.jsxs)(E.Fragment,{children:[null==W?void 0:W.right,(0,E.jsx)(kC,{startTime:0,endTime:a,minTime:0,maxTime:a,endTimeReadonly:!0,currentTime:n,onChangeStartTime:e=>{C(e)}})]}):(0,E.jsxs)(E.Fragment,{children:[null==W?void 0:W.right,(0,E.jsx)(TC,{currentTime:F,duration:H,length:t,position:n,framerate:r,formatPosition:R})]})})]})})),AC=e=>{let{children:t}=e,n=(0,nr.A)(e,RC);return(0,E.jsx)(Qa,Object.assign({},n,{type:"text",style:{width:36,height:36,padding:0},children:t}))},TC=({currentTime:e,position:t,duration:n,framerate:r,length:o,formatPosition:i})=>{const a=null!=i?i:EC,s={position:t-1,fps:r,length:o},l=a(Object.assign({time:e},s)),c=a(Object.assign({time:n},s));return(0,E.jsxs)(Qe.Sl,{name:"time",children:[(0,E.jsx)(Qe.Sl,{name:"time-section",children:(0,E.jsx)(PC,{time:e,position:l})}),(0,E.jsx)(Qe.Sl,{name:"time-section",children:(0,E.jsx)(PC,{time:Math.max(n,0),position:c})})]})},PC=({time:e,position:t})=>{const n=new Date(1e3*e).toISOString(),r=e>3600?n.substr(11,8):n.substr(14,5);return(0,E.jsxs)(E.Fragment,{children:[r,t?(0,E.jsx)("span",{children:t}):null]})},IC=e=>e.hidden?null:e.showAlterantive?e.alt:e.main,LC=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 MC=n(45250);const KC=["position","length","seekOffset","seekVisible","onIndicatorMove","onSeek","minimap","step"],DC=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,nr.A)(e,KC).leftOffset)?t:150)/c,u=(0,m.useRef)(),h=(0,m.useRef)(),g=(0,m.useRef)(),p=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,m.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,MC.clamp)(Math.ceil(r*(s/l)),0,c);null==a||a(d);const h=e=>{const t=(0,MC.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,m.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,MC.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,m.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),e.target===g.current?x(e):w(e)}),[x,w]);return(0,E.jsxs)(Qe.eB,{name:"seeker",ref:u,onMouseDown:C,children:[(0,E.jsx)(Qe.Sl,{name:"track"}),p&&(0,E.jsx)(Qe.Sl,{name:"indicator",ref:g,style:{left:y,width:f}}),(0,E.jsx)(Qe.Sl,{name:"position",ref:h,style:{left:`${b}%`}}),(0,E.jsx)(Qe.Sl,{name:"minimap",children:l})]})},NC=(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,m.useContext)(Dr),{label:c,color:d,visible:u,sequence:h,selected:g,timeline:p}=t,f=(0,m.useMemo)((()=>Math.round(s/2)),[s]),v=(0,m.useMemo)((()=>(0,x.clamp)(a-f,0,l)),[a,f,l]),y=(0,m.useMemo)((()=>(0,x.clamp)(a+s+f,0,l)),[a,s,f,l]),b=h[0],w=b?b.frame-1:0,C=b?w*i:n,S=(0,m.useMemo)((()=>({"--offset":`${n}px`,"--color":d,"--point-color":Ct()(d).alpha(1).css(),"--lifespan-color":Ct()(d).alpha(u?.4:1).css()})),[n,d,u]),j=(0,m.useMemo)((()=>r?NC(h,i).map((e=>(e.points=e.points.filter((({frame:e})=>e>=v&&e<=y)),e))):[]),[h,w,i,r,v,y]),k=(0,m.useCallback)(((e,n)=>{e.stopPropagation(),null==o||o(e,t.id,n)}),[t.id,o]);return(0,E.jsxs)(Qe.eB,{name:"keypoints",style:S,mod:{selected:g,timeline:p},"data-id":t.id,children:[(0,E.jsxs)(Qe.Sl,{name:"label",onClick:k,children:[(0,E.jsx)(Qe.Sl,{name:"name",children:c}),(0,E.jsx)(Qe.Sl,{name:"data",children:(0,E.jsx)(Qe.Sl,{name:"data-item",mod:{faded:!0},children:e})})]}),(0,E.jsx)(Qe.Sl,{name:"keypoints",onClick:e=>k(e,!0),children:(0,E.jsx)(BC,{lifespans:j,step:i,visible:u,offset:C})})]})},BC=({lifespans:e,step:t,offset:n,visible:r})=>(0,E.jsx)(E.Fragment,{children:e.map(((o,i)=>{const a=i+1===e.length,{points:s}=o,l=(0,nr.A)(o,VC);return(0,E.jsx)(HC,Object.assign({mainOffset:n,step:t,isLast:a,visible:r,points:s.map((({frame:e})=>e))},l),`${i}-${s.length}-${a}-${r}`)}))}),HC=(0,m.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,m.useMemo)((()=>({left:c,width:u,right:d})),[c,d,u]);return(0,E.jsx)(Qe.Sl,{name:"lifespan",mod:{hidden:!a,instant:!t},style:h,children:l.map(((e,t)=>{const o=(e-n)*r;return(0,E.jsx)(Qe.Sl,{name:"point",style:{left:o},mod:{last:!!o}},t)}))})})),FC=["offset","position","length","step","regions","onScroll","onPositionChange","onResize","onSelectRegion"],WC=(e,t)=>Math.floor(e/t),$C=(e,t)=>WC(e,t)*t,UC=({regions:e,startOffset:t,scrollTop:n,disabled:r,onSelectRegion:o})=>{const i=(0,m.useMemo)((()=>{const t=(0,MC.clamp)(Math.ceil(n/24)-1,0,e.length),r=(0,MC.clamp)(t+(Math.ceil(6.875)-1),0,e.length);return[(0,MC.clamp)(t-5,0,e.length),(0,MC.clamp)(r+5,0,e.length)]}),[n,e.length]);return(0,E.jsx)(Qe.Sl,{name:"keypoints",style:{height:24*e.length},children:e.map(((e,n)=>e.sequence.length>0||e.timeline?(0,E.jsx)(zC,{idx:e.index,region:e,startOffset:t,onSelectRegion:r?void 0:o,renderable:i[0]<=n&&n<=i[1]},e.id):null))})},ZC={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,nr.A)(e,FC);const h=null!=(t=u.leftOffset)?t:150,g=(0,m.useRef)(),p=(0,m.useRef)(0),f=(0,m.useRef)(r),[v,y]=(0,m.useState)(!0),[b,w]=(0,m.useState)(null),[C,S]=(0,m.useState)(n),j=(0,m.useRef)(C),[k,O]=(0,m.useState)(0),[R,_]=(0,m.useState)(!1);j.current=C;const A=(0,m.useMemo)((()=>o*i),[o,i]),T=(0,m.useMemo)((()=>{var e,t;return WC($C((null!=(e=null==(t=g.current)?void 0:t.clientWidth)?e:0)-h,i),i)}),[g.current,i,h]),P=Kr({onPositionChange:l}),I=(0,m.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,m.useCallback)((({left:e,top:t})=>{if(o&&(w(null),(0,x.isDefined)(t)&&k!==t&&O(t),(0,x.isDefined)(e)&&C!==e)){S(e);const t=WC($C(e,i),i);null==s||s((0,MC.clamp)(t,1,o))}}),[C,k,i,o]),M=(0,m.useCallback)((e=>{const t=WC($C(e,i),i);null==P.onPositionChange||P.onPositionChange((0,MC.clamp)(t+1,1,o))}),[i,o,r]),K=(0,m.useCallback)((e=>{const t=g.current;if(Math.abs(e.deltaX)>Math.abs(e.deltaY)){const n=t.scrollWidth-t.clientWidth,r=(0,MC.clamp)(C+1.25*e.deltaX,0,n);L({left:r})}else{const n=t.scrollHeight-t.clientHeight,r=(0,MC.clamp)(k+1.25*e.deltaY,0,n);L({top:r})}}),[g,C,k,L]),D=(0,m.useMemo)((()=>$C(C,i)),[C,i,o]),N=(0,m.useMemo)((()=>k),[k]),V=(0,m.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=$C(e.pageX-r,i),s=(0,MC.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,m.useCallback)((e=>{if(g.current){const t=e.pageX-g.current.getBoundingClientRect().left-h;w(t>0?t:null)}}),[D,i]),B=(0,m.useCallback)((()=>{b&&(M(b+D),w(null))}),[b,D,i,M]),H=(0,m.useMemo)((()=>{const e=(0,MC.clamp)(r,0,o)*i;return $C(e-D,i)+h}),[r,D,i,o]),F=(0,m.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=WC(d,i)+1;M(d),s&&(l=null==u.onStartDrawing?void 0:u.onStartDrawing(m));const p=e=>{const t=c(e),n=WC(t,i)+1;if(t>=0&&t<=o&&(y(!1),_(!0),M(t)),l){const[e,t]=n>m?[m,n]:[n,m];l.setRanges([e,t])}},f=()=>{y(!0),_(!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,m.useEffect)((()=>{g.current&&(g.current.scrollLeft=D,g.current.scrollTop=N)}),[D,N]),(0,m.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,m.useEffect)((()=>{null==c||c(WC(g.current.clientWidth,i))}),[A,i]),(0,m.useEffect)((()=>{const e=g.current;if((0,x.isDefined)(e)){const t=(0,MC.clamp)(n*i,0,e.scrollWidth-e.clientWidth);p.current=$C(t,i),S(t)}}),[n,i]),(0,m.useEffect)((()=>{const e=g.current;if(!(0,x.isDefined)(e)||T<1)return;const t=WC($C(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,MC.clamp)(n*i,0,e.scrollWidth-e.clientWidth);p.current=$C(t,i),L({left:t})}return}const a=$C(r-1,T),s=(r-1)*i-p.current;(s>(T-1)*i||s<0)&&(L({left:a*i}),p.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,E.jsxs)(Qe.eB,{name:"timeline-frames",style:W,children:[(0,E.jsxs)(Qe.Sl,{name:"controls",children:[(0,E.jsx)(Qe.Sl,{name:"indicator",onMouseDown:V,style:{left:(0,MC.clamp)(H-i,h-i,A)}}),(0,x.isDefined)(b)&&v&&(0,E.jsx)(Qe.Sl,{name:"hover",style:{left:$C(b,i),marginLeft:h},"data-frame":WC(D+b,i)+1})]}),(0,E.jsx)(Qe.Sl,{name:"labels-bg",style:{width:h}}),(0,E.jsx)(Qe.Sl,{name:"scroll",ref:g,onWheel:K,onMouseMove:z,onMouseLeave:()=>w(null),onClickCapture:B,onMouseDown:F,children:(0,E.jsx)(Qe.Sl,{name:"filler",children:(0,E.jsx)(UC,{regions:a,scrollTop:N,startOffset:h,onSelectRegion:d,disabled:R})})}),(0,E.jsx)(Qe.Sl,{name:"background",style:{backgroundImage:I}})]})},Minimap:()=>{const{regions:e,length:t}=(0,m.useContext)(Dr),n=(0,m.useRef)(),[r,o]=(0,m.useState)(0),i=(0,m.useMemo)((()=>e.map((({id:e,color:t,sequence:n})=>({id:e,color:t,lifespans:NC(n,r)})))),[r,e]);return(0,m.useEffect)((()=>{(0,x.isDefined)(n.current)&&t>0&&o(n.current.clientWidth/t)}),[t]),(0,E.jsx)(Qe.eB,{ref:n,name:"minimap",children:i.slice(0,5).map((({id:e,color:t,lifespans:n})=>(0,E.jsx)(Qe.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,E.jsx)(Qe.Sl,{name:"connection",style:{left:a,width:s}},`${e}${o}`)}))},e)))})},Controls:({onAction:e})=>{const{position:t,regions:n}=(0,m.useContext)(Dr),r=n.some((({selected:e,timeline:t})=>e&&!t)),o=(0,m.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,m.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,m.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,m.useMemo)((()=>i?(0,E.jsx)(Bo,{}):(0,E.jsx)(Zo,{})),[i,o]),d=(0,m.useMemo)((()=>a?(0,E.jsx)(Ro,{}):(0,E.jsx)(Mo,{})),[o,a]);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(AC,{onClick:s,disabled:!r,tooltip:"Toggle Keypoint",children:c}),(0,E.jsx)(AC,{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"}},GC=ZC;var YC=n(35775),XC=n(41128);const qC=(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)},JC=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},QC=e=>Math.floor(10/JC(e));var eS=n(25345);const tS=({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:p})=>{const f=(0,m.useRef)();return(0,m.useEffect)((()=>{var m,v;const y=e.current,b=Gn().create(Object.assign({autoCenter:!0,scrollParent:!0},i,{barHeight:1,container:y,height:Number(null!=(m=null==e||null==(v=e.current)||null==(v=v.parentElement)?void 0:v.offsetHeight)?m:146),hideScrollbar:!0,maxCanvasWidth:8e3,waveColor:"#D5D5D5",progressColor:"#656F83",cursorWidth:0,backend:"MediaElement",loopSelection:!0,audioRate:r,pixelRatio:1,minPxPerSec:Rn.default,plugins:[YC.A.create({slop:5,deferInit:!0,dragSelection:!0}),XC.A.create({deferInit:!0,container:t.current,formatTimeCallback:qC,timeInterval:JC,secondaryLabelInterval:QC,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}),eS.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,x.clamp)(e,0,t),b.seekTo(e/b.getDuration()))};const w=()=>{Object.values(b.regions.list).filter((e=>!(0,x.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 w(),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(Rn.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==p?void 0:p(e))),b.on("seek",(()=>{const e=b.getCurrentTime();s(1e3*e)})),o._value&&b.load(o._value),f.current=b;const C=()=>{w()};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},nS={frames:GC,wave:{View:({position:e,length:t,regions:n,volume:r=1,zoom:o=Rn.default,speed:i=En.default,onReady:a,onPositionChange:s,onSeek:l,onAddRegion:c,onZoom:d,onPlay:u,onPause:h,onSpeedChange:g})=>{const{data:p}=(0,m.useContext)(Dr),f=(0,m.useRef)(null),v=(0,m.useRef)(),y=(0,m.useRef)(),b=(0,m.useRef)(),w=(0,m.useRef)(),[C,S]=(0,m.useState)(o),[j,k]=(0,m.useState)(!0),[O,R]=(0,m.useState)(0),[_,A]=(0,m.useState)(0),[T,P]=(0,m.useState)(Number.parseInt(p.defaultscale,10)||1),I=(0,m.useRef)({zoom:C,scroll:O}),L=(0,m.useRef)(!1),M=(0,m.useCallback)((e=>{const t=(0,x.clamp)(e,Rn.min,Rn.max);I.current.zoom=t,S(t)}),[]),K=(0,m.useCallback)((()=>{L.current||(L.current=!0)}),[]),D=(0,m.useCallback)((()=>{L.current&&(L.current=!1)}),[]),N=(0,m.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,m.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,m.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,m.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,m.useCallback)((()=>{K(),z()}),[z,K]),F=Kr({onZoom:d,onSeek:l,onPositionChange:s,onFinish:H,onPlay:V,onPause:z}),W=tS({containter:y,timelineContainer:b,speed:i,regions:n,data:p,params:{autoCenter:p.autocenter,scrollParent:p.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,m.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,m.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,m.useEffect)((()=>{(()=>{const t=W.current,n=null==t?void 0:t.getDuration(),r=null==t?void 0:t.getCurrentTime(),o=(0,x.clamp)(e/1e3,0,null!=n?n:0);t&&(t.isPlaying()||n&&!isNaN(n)&&o!==r&&t.setCurrentTime(o))})()}),[e]),(0,m.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,m.useEffect)((()=>{var e;null==(e=W.current)||e.setPlaybackRate(i)}),[i]),(0,m.useEffect)((()=>{B(O)}),[O]),(0,m.useEffect)((()=>{var e;null==(e=W.current)||e.setVolume(r)}),[r]),(0,m.useEffect)((()=>{const e=W.current;e&&(e.params.barHeight=T,e.drawBuffer())}),[T]),(0,m.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,m.useEffect)((()=>{const e=w.current,t=e.querySelector("wave"),n=(0,x.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,x.clamp)(t.scrollLeft+1.25*r,0,t.scrollWidth)})())};return e.addEventListener("wheel",r),()=>e.removeEventListener("wheel",r)}),[C]);const U=(0,m.useMemo)((()=>{var e;return{left:_,width:Number(null!=(e=p.cursorwidth)?e:2),background:p.cursorcolor}}),[_]);return(0,E.jsxs)(Qe.eB,{name:"wave",ref:v,children:[(0,E.jsx)(Qe.Sl,{name:"controls",children:(0,E.jsxs)(ns,{spread:!0,style:{gridAutoColumns:"auto"},children:[(0,E.jsx)(uC,{continuous:!0,value:i,resetValue:En.default,step:En.step,min:En.min,max:En.max,minIcon:(0,E.jsx)(Sd,{style:{color:"#99A0AE"}}),maxIcon:(0,E.jsx)(Id,{style:{color:"#99A0AE"}}),onChange:e=>null==g?void 0:g(Number(e))}),(0,E.jsx)(uC,{continuous:!0,value:C,resetValue:Rn.default,step:Rn.step,min:Rn.min,max:Rn.max,minIcon:(0,E.jsx)(Fm,{}),maxIcon:(0,E.jsx)(Km,{}),onChange:e=>M(Number(e))})]})}),(0,E.jsxs)(Qe.Sl,{name:"wrapper",children:[(0,E.jsxs)(Qe.Sl,{name:"body",ref:w,onClick:$,children:[(0,E.jsx)(Qe.Sl,{name:"cursor",style:U}),(0,E.jsx)(Qe.Sl,{name:"surfer",ref:y,onClick:e=>e.stopPropagation()}),(0,E.jsx)(Qe.Sl,{name:"timeline",ref:b}),j&&(0,E.jsx)(Qe.Sl,{name:"loader",mod:{animated:!0}})]}),(0,E.jsx)(Qe.Sl,{name:"scale",children:(0,E.jsx)(uC,{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"}}},rS=["regions","zoom","mode","length","position","framerate","hopSize","playing","fullscreen","disableView","defaultStepSize","allowSeek","allowFullscreen","allowViewCollapse","controlsOnTop","data","speed","className","formatPosition"],oS=(0,v.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:p=!0,allowFullscreen:f=!0,allowViewCollapse:v=!0,controlsOnTop:y=!0,data:b,speed:w,className:C,formatPosition:S}=e,j=(0,nr.A)(e,rS);const k=nS[i],[O,R]=(0,m.useState)((0,x.clamp)(s,1,Number.POSITIVE_INFINITY)),[_,A]=(0,m.useState)(0),[T,P]=(0,m.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,m.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,m.useRef)((()=>O)),K=(0,m.useMemo)((()=>g*o),[o,g]),D=Kr({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,x.clamp)(e,1,a);return n!==t?(null==D.onPositionChange||D.onPositionChange(n),n):t}))},V=(0,m.useMemo)((()=>({position:s,length:a,regions:r,step:K,data:b,playing:d,seekOffset:_,settings:k.settings,visibleWidth:T})),[s,_,T,a,r,K,d,k.settings,b]);(0,m.useEffect)((()=>{const e=M.current();s!==e&&R((0,x.clamp)(s,1,a))}),[s,a]);const z=(0,E.jsxs)(Qe.Sl,{name:"topbar",children:[(0,E.jsx)(_C,{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,x.isDefined)(e)?O-e:0),onForward:e=>N((0,x.isDefined)(e)?O+e:a),onPositionChange:N,onToggleCollapsed:L,formatPosition:S,extraControls:k.Controls&&!h?(0,E.jsx)(k.Controls,{onAction:(e,t,n)=>{null==D.onAction||D.onAction(e,t,n)}}):null,mediaType:"timeline"}),p&&(0,E.jsx)(DC,{length:a,step:K,leftOffset:null==(t=k.settings)?void 0:t.leftOffset,position:O,seekOffset:_,seekVisible:T,onIndicatorMove:A,onSeek:N,minimap:k.Minimap?(0,E.jsx)(k.Minimap,{}):null})]});r.map((e=>(0,x.fixMobxObserve)(e.sequence)));const B=!I&&!h&&(0,E.jsx)(Qe.Sl,{name:"view",children:(0,E.jsx)(k.View,{step:K,length:a,regions:r,playing:d,zoom:o,speed:w,volume:j.volume,controls:j.controls,height:j.height,position:O,offset:_,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,E.jsx)(Nr,{value:V,children:(0,E.jsx)(Qe.eB,{name:"timeline",className:C,children:y?(0,E.jsxs)(E.Fragment,{children:[z,B]}):(0,E.jsxs)(E.Fragment,{children:[B,z]})})})})),iS=(e,t)=>{const n=Number(e);return isNaN(e)?t.default:nt.max?t.max:n},aS=(0,v.PA)((({item:e})=>{const[t,n]=(0,m.useState)(!1),[r,o]=(0,m.useState)(1),[i,a]=(0,m.useState)(0),[s,l]=(0,m.useState)(iS(e.defaultzoom,Rn)),[c,d]=(0,m.useState)(iS(e.defaultvolume,_n)),[u,h]=(0,m.useState)(iS(e.defaultspeed,En)),g=(0,m.useCallback)((t=>{a(1e3*t.duration),e.onLoad(t.surfer),e.onReady()}),[]),p=(0,m.useCallback)((e=>{o(e)}),[]),f=(0,m.useCallback)((t=>{o(t),e.handleSeek()}),[]),v=(0,m.useCallback)((t=>{h(t),e.handleSpeed(t)}),[]),y=(0,m.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,m.useCallback)((()=>{n((t=>!!e._ws&&(!1===e._ws.isPlaying()&&e._ws.play(),!1===t?(e.triggerSyncPlay(),!0):t)))}),[e,t]),x=(0,m.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,E.jsx)(Mn,{item:e,children:(0,E.jsx)(Qe.eB,{mode:"wave",name:"audio",tag:oS,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:p,onSeek:f,onPlay:b,onPause:x,onZoom:l,onVolumeChange:d,onSpeedChange:v,formatPosition:y})})})),sS=!1,lS="OffscreenCanvas"in globalThis;let cS=function(e){return e[e.timelineHeight=32]="timelineHeight",e.timelinePlacement="top",e}({});const dS=(e="log")=>(...e)=>{sS},uS=(dS("log"),dS("warn")),hS=(dS("error"),dS("info")),gS=(e,t,n)=>Math.max(t,Math.min(n,e)),mS=(e,t=2)=>{const n=10**t;return Math.round(e*n)/n},pS=(e,t,n)=>e>=t&&e<=n,fS=(e,t)=>Array.from({length:t}).map((()=>e)).join(""),vS=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,bS=e=>e.getBoundingClientRect().top,xS=(e,t)=>e.clientX-yS(t),wS=(e,t)=>e.clientY-bS(t),CS=(e,t,n)=>e/t*n,SS=(e,t,n)=>{const{zoomedWidth:r,container:o}=t,i=xS(e,o)+t.getScrollLeftPx();return CS(i,r,n)},jS=(e,t,n)=>((e,t)=>Math.abs(e-t)<1e-6)(e/n,t/n);class kS{constructor(){this.destroyed=!1}get isDestroyed(){return this.destroyed}destroy(){this.destroyed=!0,this.destroy=()=>null}}class OS extends kS{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 RS extends OS{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||hS("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,hS("decode:cleanup",this.src)}}class ES extends RS{constructor(...e){super(...e),this.arraybuffer=void 0,this.context=void 0}async init(e){this.arraybuffer=e,hS("decode:worker:ready",this.src)}async decode(e){if(this.sourceDecoded)hS("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 hS("decode:inprogress",this.src),this.decodingPromise;if(!this.arraybuffer)throw new Error("WebAudioDecoder not initialized, did you call decoder.init()?");hS("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,hS("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 _S=n(55961),AS=n(14280);class TS{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)}))}}TS.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 PS extends kS{constructor(e){super(),this.channelCount=1,PS.usage++,PS.worker||(PS.worker=new TS(new Worker(new URL(n.p+n.u(559),n.b)))),this.channelCount=e}destroy(){var e;(PS.usage--,0===PS.usage)&&(null==(e=PS.worker)||e.destroy(),PS.worker=void 0);super.destroy()}async split(e){if(!PS.worker)throw new Error("AudioDecoder: worker not initialized");return PS.worker.compute({value:e,channelCount:this.channelCount})}}PS.usage=0,PS.worker=void 0;class IS extends RS{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,_S.vy)(AS.A,e),hS("decode:worker:ready",this.src))}async decode(e){if(this.sourceDecoded)return void hS("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 hS("decode:inprogress",this.src),this.decodingPromise;if(!this.worker)throw new Error("AudioDecoder: Worker not initialized, did you call decoder.init()?");let t;hS("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 PS(this._channelCount):void 0;const i=Array.from({length:this._channelCount}).map((()=>Array.from({length:r})));for(hS("decode:chunk:start",this.src,n,r),this.invoke("progress",[0,r]);n{i[t][n]=e}))}this.invoke("progress",[n+1,r]),hS("decode:chunk:process",this.src,n,r),n++}if(e.done)break}this.chunks=i,hS("decode:complete",this.src)}finally{var n;null==(n=t)||n.destroy(),this.dispose()}}dispose(){this.worker&&(this.worker.dispose(),this.worker=void 0,hS("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=gS(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 LS{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 IS(t):new ES(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),hS("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((()=>{hS("decodepool:destroy",i),e.delete(i)}),5e3),e.set(i,t),r.bind(t)(...n)):r}}})}(LS.cache,e,t,n);return r}}LS.cache=new Map;const MS=new LS;class KS extends OS{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,k.VS)(k.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,k.VS)(k.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=MS.getDecoder(this.src,this.splitChannels,this.decoderType),this.decoder.on("progress",((e,t)=>{this.invoke("decodingProgress",[e,t])})))}}class DS extends kS{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 KS(e),this.audio.on("decodingProgress",((e,t)=>{this.wf.setDecodingProgress(e,t)}))),this.audio}}class NS extends kS{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=gS(e,0,this.duration);this.currentTime=t,this.playing&&this.updatePlayback()}seekSilent(e){const t=gS(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=gS(this.loop.end,0,this.duration),e=gS(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=gS(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:gS(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 VS extends NS{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 zS extends NS{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 BS=e=>Number.parseInt(e.replace(/_/g,""),36),HS="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=BS(t.substring(0,3)),r=BS(t.substring(3)).toString(16);let o="";for(let e=0;e<6-r.length;e++)o+="0";return e[n]=`${o}${r}`,e}),{}),FS=new RegExp(`^#${fS("([a-f0-9])",3)}([a-f0-9])?$`,"i"),WS=new RegExp(`^#${fS("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),$S=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${fS(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),US=/^[a-z]+$/i;class ZS{constructor(e){this.base=void 0,this.rgba=void 0,this.base=e,this.rgba=e}update(e){const t=YS(e);return this.rgba=t.rgba,this.base=t.base,this}reset(){return this.rgba=this.base,this}clone(){return new ZS(this.rgba)}opaque(e){const t=[this.r,this.g,this.b,gS(mS(this.a+this.a*e,1),0,1)];return this.rgba=t,this}translucent(e){const t=[this.r,this.g,this.b,gS(mS(this.a-this.a*e,1),0,1)];return this.rgba=t,this}darken(e){const t=[gS(Math.round(this.r-this.r*e),0,255),gS(Math.round(this.g-this.g*e),0,255),gS(Math.round(this.b-this.b*e),0,255),this.a];return this.rgba=t,this}lighten(e){const t=[gS(Math.round(this.r+this.r*e),0,255),gS(Math.round(this.g+this.g*e),0,255),gS(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 GS=new ZS([0,0,0,0]),YS=e=>{if("string"!=typeof e&&!(e instanceof ZS))throw new Error(`Color must be a string or an instanceof RgbaColorArray. Received ${JSON.stringify(e)}`);if(e instanceof ZS)return e;if("transparent"===(e=e.toString()).trim().toLowerCase())return GS;let t=e.trim();t=US.test(e)?(e=>{const t=e.toLowerCase().trim(),n=HS[(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=FS.exec(t);if(n){const e=Array.from(n).slice(1);return new ZS([...e.slice(0,3).map((e=>Number.parseInt(fS(e,2),16))),Number.parseInt(fS(e[3]||"f",2),16)/255])}const r=WS.exec(t);if(r){const e=Array.from(r).slice(1);return new ZS([...e.slice(0,3).map((e=>Number.parseInt(e,16))),Number.parseInt(e[3]||"ff",16)/255])}const o=$S.exec(t);if(o){const e=Array.from(o).slice(1);return new ZS([...e.slice(0,3).map((e=>Number.parseInt(e,10))),Number.parseFloat(e[3]||"1")])}return GS};class XS{constructor(e){var t,n,r,o,i;this.id="tooltip",this.visible=!1,this.color=YS("#fff"),this.fontWeight="500",this.backgroundColor=YS("#000"),this.fontSize=16,this.paddingInline=8,this.paddingBlock=4,this.borderRadius=4,this.id=`tooltip-${(0,O.Ak)()}`,this.color=null!=e&&e.color?YS(e.color):this.color,this.backgroundColor=null!=e&&e.backgroundColor?YS(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?YS(e.color):this.color,this.backgroundColor=null!=e&&e.backgroundColor?YS(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 qS=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 JS extends OS{constructor(e,t){var n,r,o;super(),this.visualizer=void 0,this.symbol=qS.default,this.focusId="",this.id="cursor",this.color=YS("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=yS(t),this.offsetY=bS(t),this.x=xS(e,t),this.y=wS(e,t),this.invoke("mouseMove",[e,this]),this.visualizer.invoke("mouseMove",[e,this])},this.id=`cursor-${(0,O.Ak)()}`,this.visualizer=t,this.color=null!=e&&e.color?YS(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 QS.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?gS(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 ej?(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?gS(1.5*this.opacity,0,1):this.opacity,this._context.globalCompositeOperation=this.compositeOperation,this._context.imageSmoothingEnabled=!1,n}createOffscreenCanvas(){let e;if(lS){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?gS(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(lS){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?gS(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 tj extends ej{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 ej(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 nj extends OS{constructor(e,t,n){var r,o,i,a,s,l,c;if(super(),this.id=void 0,this.color=YS("#ccc"),this.fillColor=YS("#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(qS.grabbing,"playhead");const t=e=>{if(this.isDragging){e.preventDefault(),e.stopPropagation();const t=this.visualizer.container.getBoundingClientRect(),n=e.clientX-t.left,r=gS(n,0,this.visualizer.width);r!==this._x&&(this.setX(r),this.wf.currentTime=SS(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(qS.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(qS.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(qS.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,O.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?gS(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 rj 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",rj);class oj extends OS{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=YS("rgba(0, 0, 0, 0.1)"),this.backgroundColor=YS("#fff"),this.waveColor=YS("#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=cS.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=gS(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=gS(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?YS(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?YS(e.gridColor):this.gridColor,this.gridWidth=null!=(m=e.gridWidth)?m:this.gridWidth,this.backgroundColor=e.backgroundColor?YS(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 nj(Object.assign({},e.playhead,{x:0,color:YS("#000"),fillColor:YS("#BAE7FF"),width:null!=(v=e.cursorWidth)?v:1}),this,this.wf),this.initialRender(),this.attachEvents()}init(e){this.init=()=>uS("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=gS(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 uS("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=gS(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=gS(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=gS(n*this.samplesPerPx,0,t),o=gS(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=gS(this.width+u-2,0,this.width)),c=gS(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+(cS.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=gS(o-this.samplesPerPx,0,r)}}catch(e){}}e.stroke(),e.restore()}renderChunk(e,t,n,r,o){t.save();vS(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 ej(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 tj({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(gS(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 ij extends OS{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=YS("#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=SS(e,o,a),l=CS(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(qS.colResize):this.switchCursor(qS.grab))},this.handleMouseUp=e=>{this.updateable&&(this.isDragging&&(this.switchCursor(qS.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=xS(e,s)+d;u<0&&(u=0);const h=CS(u-r,l,c),g=i-o,m=n?o+h:gS(o+h,0,this.duration-g),p=t?o:m,f=n?i:gS(i+h,m+(a?0:g),this.duration);t||n?this.switchCursor(qS.colResize):this.switchCursor(qS.grabbing),this.updatePosition(gS(p,0,c),gS(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=xS(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,O.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=YS(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===cS.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||cS.timelineHeight}get timelinePlacement(){return this.visualizer.timelinePlacement||cS.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![qS.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 aj extends ij{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?YS(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?YS(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 sj{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=YS("#787878"),this.drawingColor=YS("#787878"),this.labels=void 0,this.createable=!0,this.updateable=!0,this.deleteable=!0,this.drawableTarget=ij,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 aj(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=gS(xS(e,r)+l,0,i);const c=CS(n,o,s),d=CS(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=gS(xS(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(qS.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?YS(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=aj}segmentDrawableTarget(){this.drawableTarget=ij}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===aj?new aj(e,this.waveform,this.visualizer,this):new ij(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 aj(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 ij(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=YS(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===cS.timelinePlacement&&null!=l&&l.isVisible?a:0,d=xS(e,o),u=wS(e,o);if(!pS(d,n,n+r))return!1;return pS(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 lj{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=cS.timelineHeight,this.initHeight=cS.timelineHeight,this.fontSize=12,this.gridWidth=1,this.fontFamily="Arial",this.fontColor=YS("#413C4A"),this.selectionColor=YS("rgba(65, 60, 74, 0.08)"),this.gridColor=YS("rgba(137,128,152,0.16)"),this.backgroundColor=YS("#fff"),this._labeMaxWidth={true:0,false:0},this.waveform=t,this.visualizer=n,this.placement=(null==e?void 0:e.placement)||cS.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:cS.timelinePlacement)?null!=(a=null==e?void 0:e.height)?a:cS.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?YS(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?YS(null==e?void 0:e.gridColor):this.gridColor,this.backgroundColor=null!=e&&e.backgroundColor?YS(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=mS(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 cj extends OS{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(qS.crosshair)}),1);const n=SS(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(qS.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 DS(this,{src:this.src}),this.tooltip=new XS(null==(e=this.params)?void 0:e.tooltip),this.visualizer=new oj(this.params,this),this.cursor=new JS(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 lj(Object.assign({gridColor:this.params.gridColor,gridWidth:this.params.gridWidth},null==(o=this.params)?void 0:o.timeline),this,this.visualizer),this.regions=new sj(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 VS(this):new zS(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=gS(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 dj=["waveform"],uj=(0,v.PA)((({item:e})=>{var t;const n=(0,m.useRef)(),r=((e,t)=>{var n,r,o,i;const a=(0,m.useRef)(),{showLabels:s=!0}=t,[l,c]=(0,m.useState)(1),[d,u]=(0,m.useState)(null!=(n=null==t?void 0:t.volume)?n:1),[h,g]=(0,m.useState)(!1),[p,f]=(0,m.useState)(0),[v,y]=(0,m.useState)(0),[b,x]=(0,m.useState)(null!=(r=null==t?void 0:t.amp)?r:1),[w,C]=(0,m.useState)(null!=(o=null==t?void 0:t.rate)?o:1),[S,j]=(0,m.useState)(null!=(i=null==t?void 0:t.muted)&&i),[k,O]=(0,m.useState)([]),[R,E]=(0,m.useState)(new Map),_=(0,m.useRef)(null==t?void 0:t.onFrameChanged);_.current=null==t?void 0:t.onFrameChanged;const A=(0,m.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,m.useEffect)((()=>{const n=new cj(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&&!jS(e,v,p)&&(null==t||null==t.onSeek||t.onSeek(e)),y(e)})),n.on("seek",(e=>{jS(e,v,p)||(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,m.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.zoom=l)}),[l]),(0,m.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.volume=d)}),[d]),(0,m.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.rate=w)}),[w]),(0,m.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.amp=b)}),[b]),(0,m.useEffect)((()=>{null==t||null==t.onPlaying||t.onPlaying(h)}),[h]),(0,m.useEffect)((()=>{a.current&&(a.current.muted=S)}),[S]),(0,m.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:p,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,nr.A)(r,dj);return(0,m.useEffect)((()=>{var t,n,r,i,a,s;const l=kr("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,E.jsxs)(Qe.eB,{name:"audio-tag",children:[null==(t=e.errors)?void 0:t.map(((e,t)=>(0,E.jsx)(Te,{error:e},`err-${t}`))),(0,E.jsx)("div",{ref:t=>{n.current=t,e.stageRef.current=t}}),(0,E.jsx)(_C,{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 hj=Mr,gj=Tn;(0,k.VS)(k.sg)&&(hj=aS),(0,k.VS)(k.vS)&&(hj=uj,gj=In),b.addTag("audio",gj,hj),b.addTag("audioplus",gj,hj),b.addObjectType(gj);var mj=n(78401);const pj=(0,v.PA)(class extends m.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,E.jsx)(mj.Wd,{opacity:.15,name:"ruler",children:Object.values(t).map(((t,n)=>(0,E.jsx)(mj.rw,{x:t.x,y:t.y,width:e.gridsize,height:e.gridsize,stroke:e.gridcolor,strokeWidth:1},n)))})}}),fj=(0,m.createContext)({expanded:!1}),vj=fj.Provider,yj=kr("SegmentationToolbar","Segmentation Tools"),bj={plus:"+",minus:"-"},xj=({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,p;let f=u;const v=null!=(g=null==o?void 0:o.dynamic)&&g,{expanded:y,alignment:b}=(0,m.useContext)(fj),[w,C]=(0,m.useState)(!1),S=(0,m.useMemo)((()=>{if(!(0,x.isDefined)(u))return null;const e=u.split(",").map((e=>e.trim()));return(0,E.jsx)(Qe.Sl,{name:"shortcut",children:e.map(((e,t)=>{const n=e.split("+");return(0,E.jsx)(m.Fragment,{children:n.map((e=>{var t;return(0,E.jsx)(Qe.Sl,{name:"key",tag:"kbd",children:null!=(t=bj[e])?t:e},e)}))},`${n.join("-")}-${t}`)}))})}),[u]);(0,m.useEffect)((()=>{const e=()=>{f&&yj.hasKey(f)&&yj.removeKey(f)};return e(),f=u,u&&!yj.hasKey(u)&&yj.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,m.useEffect)((()=>(e&&Object.entries(a).forEach((([e,[t,n]])=>{yj.hasKey(e)||yj.overwriteKey(e,n,t)})),()=>{Object.keys(a).forEach((e=>{yj.hasKey(e)&&yj.removeKey(e)}))})),[a,e]);const j=(0,m.useMemo)((()=>n&&r?(0,E.jsx)(Qe.Sl,{name:"extra",children:r}):null),[n,r]),k=!1===v&&(null==l?void 0:l.length)&&(e||i&&w),O=null==o||null==(p=o.annotation)?void 0:p.isDrawing,R=t||O;return(0,E.jsxs)(Qe.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,E.jsx)(Qe.Sl,{name:"icon",children:c}),!1===v&&!1===i&&(y?(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)(Qe.Sl,{name:"label",children:[j,d,S]})}):((0,x.isDefined)(d)||(0,x.isDefined)(S))&&!k&&(0,E.jsx)(Qe.Sl,{name:"tooltip",mod:{controlled:!(!n||!r)},children:(0,E.jsxs)(Qe.Sl,{name:"tooltip-body",children:[j,d,S]})})),k&&(0,E.jsx)(Qe.Sl,{name:"controls",onClickCapture:e=>e.stopPropagation(),children:(0,E.jsx)(Qe.Sl,{name:"controls-body",children:l})})]})},wj=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{ariaLabel:(0,g.toKebabCase)((0,u.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)}}))),Cj=u.gK.model("BaseTool",{smart:!1,unselectRegionOnToolChange:!1,removeDuplicatesNamed:u.gK.maybeNull(u.gK.string)}).volatile((()=>({dynamic:!1,index:1,canInteractWithRegions:!0}))).views((e=>({get toolName(){return(0,u.Pw)(e).name},get isSeparated(){return e.control.isSeparated},get viewClass(){return()=>e.shouldRenderView?(0,E.jsx)(wj,{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,E.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,u._$)(e),n=(0,u.Pw)(e),r=Object.assign({},(0,u.dV)(e),{smart:!1,default:!1}),o=Object.assign({},t),i=n.create(r,o);i.makeDynamic(),(0,u._$)(e).manager.addTool(`${n.name}-smart`,i,e.control.removeDuplicatesNamed)}},makeDynamic(){e.dynamic=!0}}))),Sj={X:3,Y:3},jj={width:30,height:30},kj={radius:30},Oj={length:30},Rj=Cj;const Ej=n.p+"rotate.90d3fb3da9d2ac1e3ee9dd0b990c641c.svg";function _j(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 Aj(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,_j(e))}class Tj extends kt.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=_j(r),i=n.x-o.x,a=n.y-o.y,s=Math.PI/2-Math.atan2(-a,i);t.content.style.cursor=`url(${Ej}) 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=kt.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(${Ej}) 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()}}}kt.A.LSTransformer=Tj;class Pj extends kt.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()}}}kt.A.LSTransformerOld=Pj;class Ij extends m.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,k.VS)(k.pG)?t.x:0,o+=a):a+e.width>t.width&&(o=t.width-a),s<0?(r=(0,k.VS)(k.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,k.VS)(k.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,E.jsx)(E.Fragment,{children:(0,E.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,E.jsx)(E.Fragment,{children:(0,E.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,k.VS)(k.id)?this.renderLSTransformer():this.renderOldLSTransformer():null}}const Lj={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"},Mj={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=et.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:""})},Kj=(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)&&Kj(e,e,o,r)}return r},Dj=(e,t)=>{const{name:n}=t.properties;return n&&!n.optionalValues&&void 0===e.name?Mj.required(t.name,"name"):null},Nj=(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 Mj.tagNotFound(t.name,"toname",e);if(r&&r.validate(o.tagName).length)return Mj.tagUnsupported(t.name,"toname",o.tagName,r)}return null},Vj=(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:Mj.parentTagUnexpected(t.name,"parent",e.tagName,t.properties.parentTypes)},zj=(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(Mj.badAttributeValueType(t.name,i,o,a))}return r},Bj=e=>{const t=[];return e.perregion&&e.peritem&&t.push(Mj.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 Hj=n(41984);const Fj=(0,v.WQ)("store")((0,v.PA)((({store:e,tools:t,expanded:n})=>{const[r,o]=(0,m.useState)(null),i=(()=>{const[e,t]=(0,m.useState)({width:window.innerWidth,height:window.innerWidth});return(0,m.useEffect)((()=>{const e=()=>{t({width:window.innerWidth,height:window.innerWidth})};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e})(),a=(0,m.useMemo)((()=>{if(!(0,x.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,E.jsx)(vj,{value:{expanded:n,alignment:a},children:(0,E.jsxs)(Qe.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,E.jsx)(Qe.Sl,{name:"group",children:r.sort(((e,t)=>e.index-t.index)).map(((e,t)=>{const n=e.viewClass;return(0,E.jsx)(n,{},`${e.toolName}-${t}`)}))},`toolset-${e}-${n}`):null})),e.autoAnnotation&&(0,E.jsx)(Wj,{tools:l})]})})}))),Wj=(0,v.PA)((({tools:e})=>{const[t,n]=(0,m.useState)(Math.max(e.findIndex((e=>e.selected)),0)),r=(0,m.useMemo)((()=>e[t]),[t]),o=e.some((e=>e.selected));return e.length>0&&(0,E.jsx)(Qe.Sl,{name:"group",children:(0,E.jsx)(xj,{smart:!0,label:"Auto-Detect",active:o,icon:r.iconClass,shortcut:"M",extra:e.length>1?(0,E.jsx)(Qe.Sl,{name:"smart",children:e.map(((e,t)=>{const r=e.viewClass;return(0,E.jsx)("div",{onClickCapture:r=>{r.preventDefault(),n(t),e.manager.selectTool(e,!0)},children:(0,E.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)}})})})),$j=(0,m.createContext)({suggestion:!1}),Uj=$j.Provider;var Zj=n(21015);const Gj=(0,m.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,m.useState)(!1);return(0,E.jsxs)(Qe.eB,{name:"pagination",mod:{size:e,outline:i,align:a,noPadding:s},children:[(0,E.jsxs)(Qe.Sl,{name:"navigation",children:[(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Yj,{mod:["arrow-left","arrow-left-double"],onClick:()=>null==d?void 0:d(1),disabled:1===n}),(0,E.jsx)(Qe.Sl,{name:"divider"})]}),(0,E.jsx)(Yj,{mod:["arrow-left"],onClick:()=>null==d?void 0:d(n-1),hotkey:null==c?void 0:c.prev,disabled:1===n}),(0,E.jsx)(Qe.Sl,{name:"input",children:h?(0,E.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,E.jsxs)(Qe.Sl,{name:"page-indicator",onClick:()=>{g(!0)},children:[n," ",(0,E.jsxs)("span",{children:["of ",o]}),(0,E.jsx)("div",{onClick:()=>{}})]})}),(0,E.jsx)(Yj,{mod:["arrow-right"],onClick:()=>null==d?void 0:d(n+1),disabled:n===o,hotkey:null==c?void 0:c.next}),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"divider"}),(0,E.jsx)(Yj,{mod:["arrow-right","arrow-right-double"],onClick:()=>null==d?void 0:d(o),disabled:n===o})]})]}),l&&(0,E.jsx)(Qe.Sl,{name:"page-size",children:(0,E.jsx)("select",{value:r,onChange:e=>{null==d||d(1,e.currentTarget.value)},children:t.map(((e,t)=>(0,E.jsxs)("option",{value:e,children:[e," per page"]},t)))})})]})})),Yj=({mod:e,disabled:t,hotkey:n,onClick:r})=>{const o=Object.fromEntries(e.map((e=>[e,!0]))),i=(0,m.useCallback)((()=>{t||r()}),[t,r]);return o.disabled=!0===t,qa(n,i),n?(0,E.jsx)(kr.Tooltip,{name:n,children:(0,E.jsx)(Qe.Sl,{name:"btn",mod:o,onClick:i})}):(0,E.jsx)(Qe.Sl,{name:"btn",mod:o,onClick:i})},Xj=["item"];kt.A.showWarnings=!1;const qj=kr("Image"),Jj={};(0,k.VS)(k.xS)&&(Jj.crossOrigin="anonymous");const Qj=e=>{const t=[],n=[],r=e.length;let o=0;for(;o(0,k.VS)(k.Kg)?(0,Zj.q3)((()=>K.renderItem(e,e.annotation,!0))):(0,Zj.q3)((()=>e.inSelection!==t?null:K.renderItem(e,e.annotation,!1))))),tk=(0,m.memo)((({regions:e,name:t,useLayers:n,showSelected:r=!1})=>{const o=e.map((e=>(0,E.jsx)(ek,{region:e,showSelected:r},`region-${e.id}`)));return!1===n?o:(0,E.jsx)(mj.Wd,{name:t,children:o})})),nk=(0,m.memo)((({regions:e,useLayers:t=!0,chunkSize:n=15,suggestion:r=!1,showSelected:o=!1})=>(0,E.jsx)(Uj,{value:{suggestion:r},children:(n?(0,x.chunks)(e,n):e).map(((e,n)=>(0,E.jsx)(tk,{name:`chunk-${n}`,regions:e,useLayers:t,showSelected:o},`chunk-${n}`)))}))),rk=(0,v.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?m.Fragment:mj.Wd;return(0,E.jsx)(n,{children:t?(0,E.jsx)(ek,{region:t},"drawing"):t})})),ok="#40A9FF",ik="white",ak=[3,3],sk=(0,v.PA)((({item:e,selectionArea:t})=>{const{selectionBorders:n}=t;(0,k.VS)(k.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,k.VS)(k.MV)?6/e.stageScale:6;return(0,E.jsxs)(E.Fragment,{children:[n&&(0,E.jsx)(mj.rw,{name:"regions_selection",x:n.left,y:n.top,width:n.right-n.left,height:n.bottom-n.top,stroke:ok,strokeWidth:1,strokeScaleEnabled:!1,listening:!1}),r.map(((e,t)=>(0,E.jsx)(mj.rw,{x:e.x-o/2,y:e.y-o/2,width:o,height:o,fill:ok,stroke:ik,strokeWidth:2,strokeScaleEnabled:!1,listening:!1},t)))]})})),lk=(0,v.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,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(mj.rw,Object.assign({},i,{stroke:ok,dash:ak,strokeScaleEnabled:!1})),(0,E.jsx)(mj.rw,Object.assign({},i,{stroke:ik,dash:ak,dashOffset:ak[0],strokeScaleEnabled:!1}))]})})),ck="transformer_back",dk=(0,v.PA)((({item:e})=>{const{selectedRegionsBBox:t}=e,n=1===e.selectedRegions.length,r=(0,m.useRef)({x:0,y:0});return(0,E.jsx)(mj.Wd,{children:t&&!n&&(0,E.jsx)(mj.rw,{id:ck,fill:"rgba(0,0,0,0)",draggable:!0,onClick:()=>{e.annotation.unselectAreas()},onMouseOver:t=>{e.annotation.isLinkingMode||(t.target.getStage().container().style.cursor=N.A.POINTER_CURSOR)},onMouseOut:e=>{e.target.getStage().container().style.cursor=N.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=At(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}}})})})),uk=(0,v.PA)((({item:e,selectedRegions:t})=>{if(!t)return null;const{brushRegions:n=[],shapeRegions:r=[]}=Qj(t);return(0,E.jsxs)(E.Fragment,{children:[(0,k.VS)(k.q$)?null:(0,E.jsx)(dk,{item:e}),n.length>0&&(0,E.jsx)(nk,{name:"brushes",regions:n,useLayers:!1,showSelected:!0,chankSize:0},"brushes"),r.length>0&&(0,E.jsx)(nk,{name:"shapes",regions:r,showSelected:!0,chankSize:0},"shapes")]})})),hk=(0,v.PA)((({item:e,selectionArea:t})=>{var n,r,o,i;const a=(0,k.VS)(k.MV)?1:1/(e.zoomScale||1),[s,l]=(0,m.useState)(!1),[c,d]=(0,m.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,m.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 p=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,E.jsxs)(mj.Wd,{scaleX:a,scaleY:a,children:[t.isActive?(0,E.jsx)(lk,{item:t}):!f&&e.selectedRegions.length>1?(0,E.jsx)(sk,{item:e,selectionArea:t}):null,(0,E.jsx)(Ij,{item:e,rotateEnabled:v,supportsTransform:!p&&f,supportsScale:y,selectedShapes:e.selectedRegions,singleNodeMode:1===e.selectedRegions.length,useSingleNodeRotation:1===e.selectedRegions.length&&v,draggableBackgroundSelector:`#${ck}`})]})})),gk=(0,v.PA)((e=>{let{item:t}=e,n=(0,nr.A)(e,Xj);const{selectionArea:r}=t;return(0,E.jsxs)(E.Fragment,{children:[(0,k.VS)(k.Kg)?(0,E.jsx)(mj.Wd,{name:"selection-regions-layer"}):(0,E.jsx)(uk,Object.assign({item:t,selectedRegions:t.selectedRegions},n)),(0,E.jsx)(hk,{item:t,selectionArea:r})]})})),mk=(0,m.memo)((0,m.forwardRef)((({width:e,height:t},n)=>{const[r,o]=(0,m.useState)([50,0,50,t]),[i,a]=(0,m.useState)([0,100,e,100]),[s,l]=(0,m.useState)(100),[c,d]=(0,m.useState)(50),[u,h]=(0,m.useState)(!1),g=[3,3],p=!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,E.jsxs)(mj.Wd,{name:"crosshair",listening:!1,opacity:u?.6:0,children:[(0,E.jsxs)(mj.YJ,{children:[(0,E.jsx)(mj.N1,{name:"v-white",points:i,stroke:"#fff",strokeWidth:1,strokeScaleEnabled:p}),(0,E.jsx)(mj.N1,{name:"v-black",points:i,stroke:"#000",strokeWidth:1,dash:g,strokeScaleEnabled:p})]}),(0,E.jsxs)(mj.YJ,{children:[(0,E.jsx)(mj.N1,{name:"h-white",points:r,stroke:"#fff",strokeWidth:1,strokeScaleEnabled:p}),(0,E.jsx)(mj.N1,{name:"h-black",points:r,stroke:"#000",strokeWidth:1,dash:g,strokeScaleEnabled:p})]})]})}))),pk=(0,v.PA)((({item:e})=>(0,k.VS)(k.bP)?(0,E.jsx)("canvas",{className:Lj.overlay,ref:t=>{e.setOverlayRef(t)},style:e.imageTransform}):null)),fk=(0,v.PA)(class extends m.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,m.createRef)(),this.crosshairRef=(0,m.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.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,x.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.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,u._$)(t).messages.ERR_LOADING_HTTP({attr:e.value,error:"",url:e.currentSrc});n.addErrors([Mj.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,E.jsxs)(mj.YJ,{name:"ruler",onClick:e=>{e.cancelBubble=!1},children:[(0,E.jsx)(mj.N1,{x:0,y:e.cursorPositionY,points:[0,0,e.stageWidth,0],strokeWidth:1,stroke:t,tension:0,dash:[4,4],closed:!0}),(0,E.jsx)(mj.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(),qj.addDescription("shift","Pan image")}componentWillUnmount(){this.detachObserver(),window.removeEventListener("resize",this.onResize),qj.removeDescription("shift")}componentDidUpdate(){this.onResize(),this.updateReadyStatus()}updateReadyStatus(){const{item:e}=this.props,{imageRef:t}=this;e&&(0,u._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,E.jsx)(Fj,{tools:n})}render(){const{item:e,store:t}=this.props;if(!(0,u._n)(e))return null;if(!t.task||!e.currentSrc)return null;const n={},r=Lj.container,o=!!e.isMultiItem;!1===(0,u.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=[Lj.image_position,Lj[`image_position__${"center"===e.verticalalignment?"middle":e.verticalalignment}`],Lj[`image_position__${e.horizontalalignment}`]],a=[Lj.wrapperComponent,e.images.length>1?Lj.withGallery:Lj.wrapper];o&&a.push(Lj.withPagination);const[s,l]=(0,k.VS)(k.F2)?[!0,!1]:[e.hasTools,e.stageWidth<=1],c=e.imageIsLoaded||!(0,k.VS)(k.F2);return(0,E.jsxs)(Kn,{item:e,className:a.join(" "),children:[o?(0,E.jsx)("div",{className:Lj.pagination,children:(0,E.jsx)(Gj,{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,E.jsxs)("div",{ref:t=>{e.setContainerRef(t),this.attachObserver(t)},className:r,style:n,children:[(0,E.jsx)("div",{ref:e=>{this.filler=e},className:Lj.filler,style:{width:"100%",marginTop:e.fillerHeight}}),(0,k.VS)(k.F2)?(0,E.jsx)(it,{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,E.jsx)(pk,{item:e})}):(0,E.jsxs)("div",{className:[Lj.frame,...i].join(" "),style:e.canvasSize,children:[(0,E.jsx)("img",{ref:t=>{e.setImageRef(t),this.imageRef.current=t},loading:(0,k.VS)(k.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,E.jsx)(pk,{item:e})]}),l||!s?(0,E.jsx)("div",{className:Lj.loading,children:(0,E.jsx)(Hj.A,{})}):c?(0,E.jsx)(vk,{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,E.jsx)("div",{className:Lj.gallery,children:e.images.map(((t,n)=>(0,m.createElement)("img",Object.assign({},Jj,{alt:"",key:t,src:t,className:n===e.currentImage&&Lj.active,height:"60",onClick:()=>e.setCurrentImage(n)}))))})]})}}),vk=(0,v.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,k.VS)(k.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,E.jsx)(mj.BI,{ref:t=>{e.setStageRef(t)},className:[Lj["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,E.jsx)(yk,{item:e,store:h,state:n,crosshairRef:u})})})),yk=(0,v.PA)((({item:e,store:t,state:n,crosshairRef:r})=>{if(!(0,u._n)(e))return null;if(!t.task||!e.currentSrc)return null;const o=e.regs,i=!!e.isMultiItem,a=[Lj.wrapperComponent,e.images.length>1?Lj.withGallery:Lj.wrapper];i&&a.push(Lj.withPagination);const{brushRegions:s,shapeRegions:l}=Qj(o),{brushRegions:c,shapeRegions:d}=Qj(e.suggestions),h=Object.entries({brush:s,shape:l,suggestedBrush:c,suggestedShape:d});return(0,E.jsxs)(E.Fragment,{children:[0===o.length&&(0,E.jsx)(mj.Wd,{children:(0,E.jsx)(mj.N1,{points:[0,0,0,1],stroke:"rgba(0,0,0,0)"})}),e.grid&&e.sizeUpdated&&(0,E.jsx)(pj,{item:e}),(0,k.VS)(k.q$)?(0,E.jsx)(dk,{item:e}):null,h.map((([e,t])=>{const n=null!==e.match(/brush/i),r=null!==e.match("suggested");return t.length>0?(0,E.jsx)(nk,{name:e,regions:t,useLayers:!1===n,suggestion:r},e):(0,E.jsx)(m.Fragment,{},e)})),(0,E.jsx)(gk,{item:e,isPanning:n.isPanning}),(0,E.jsx)(rk,{item:e}),e.crosshair&&(0,E.jsx)(mk,{ref:r,width:(0,k.VS)(k.pG)?e.containerWidth:e.stageWidth,height:(0,k.VS)(k.pG)?e.containerHeight:e.stageHeight})]})}));var bk=n(78438);const xk=[4,4,0,0],wk=({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 p;const f=20,v=1/a,[y,b]=(0,m.useState)(),x=r?34:0,w=Math.max(0,l*a-25-x),C=!!w,{suggestion:S}=null!=(p=(0,m.useContext)($j))?p:{},j=(0,m.useMemo)((()=>{if(!o||!y||!l)return null;return(n?y.measureSize(n).width:0)>w?w:null}),[y,n,l,v]),k=(0,m.useCallback)(((e,t)=>{const n=h&&C?xk: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,E.jsxs)(mj.YJ,{strokeScaleEnabled:!1,x:e,y:t,rotation:i,children:[!!r&&(0,E.jsxs)(mj.JU,{y:-20*v,scaleX:v,scaleY:v,onClick:()=>!1,children:[(0,E.jsx)(mj.vw,{fill:un.Colors.getScaleGradient(r),cornerRadius:2}),(0,E.jsx)(mj.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,E.jsxs)(mj.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,E.jsx)(mj.vw,{fill:s,cornerRadius:4,sceneFunc:k,offsetX:20}),(0,E.jsx)(mj.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:N.A.SHOW_LABEL_FILL,padding:0})]}),(0,E.jsx)(mj.wA,{x:2*v+x*v,y:2*v-f*v,scaleX:v,scaleY:v,fill:N.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},Ck=(0,v.PA)((({item:e,color:t,strokewidth:n})=>{const r=!!e.texting,o=e.getLabelText(","),i=e.parent,a=e.parent.zoomScale||1;return(0,E.jsx)(wk,{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,u.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})})),Sk=(0,v.PA)((({item:e,color:t,strokewidth:n})=>{const r=!!e.texting,o=e.getLabelText(","),i=e.parent,a=e.parent.zoomScale||1;return(0,E.jsx)(wk,{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,u.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,rotation:e.rotation,color:t,maxWidth:i.internalToCanvasX(e.width)+n,adjacent:!0,onClickLabel:e.onClickLabel})})),jk=(0,v.PA)((({item:e,color:t})=>{var n;const r=!!e.texting,o=e.getLabelText(","),i=e.bboxCoordsCanvas;if(!i)return null;const a=(0,u.Zn)(e).settings;return(0,E.jsxs)(m.Fragment,{children:[a.showLabels&&(0,E.jsx)(mj.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,E.jsx)(wk,{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})]})})),kk=(0,v.PA)((({item:e,color:t})=>{var n;const r=(0,u.Zn)(e).settings;if(!r.showLabels)return null;const o=!!e.texting,i=e.getLabelText(","),a=e.bboxCoordsCanvas;return a?(0,E.jsxs)(mj.YJ,{name:"region-label",children:[(0,E.jsx)(mj.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,E.jsx)(wk,{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})),Ok=(0,v.PA)((({item:e,color:t})=>{const n=!!e.texting,r=e.getLabelText(",");return(0,E.jsx)(wk,{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,u.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})})),Rk=(0,v.PA)((({reg:e,box:t,color:n,scale:r,strokeWidth:o,adjacent:i=!1})=>{const a=!!e.texting,s=e.getLabelText(",");return(0,E.jsx)(wk,{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})})),Ek=u.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.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 _k=n(87261);const Ak=["item"],Tk=(e,t)=>{const n=(0,v.PA)(e);return(0,v.PA)((e=>{let{item:r}=e,o=(0,nr.A)(e,Ak);const i=(null==t?void 0:t.renderHidden)||!r.hidden,a=!(0,k.VS)(k.Kg)||(null==t?void 0:t.shouldNotUsePortal),s=a?m.Fragment:_k.ZL,l=a?{}:{selector:".selection-regions-layer",enabled:r.inSelection},c=!!r.annotation,d=(0,m.useCallback)((e=>{(0,u._n)(r)&&r.setShapeRef(e)}),[r]);return c&&(0,u._n)(r)&&i?(0,E.jsx)(s,Object.assign({},l,{children:(0,E.jsx)(n,Object.assign({item:r},o,{setShapeRef:d}))})):null}))},Pk=(0,v.PA)((({item:e,useLayer:t})=>{const n=(e=>{const{shapeRef:t,bboxCoordsCanvas:n}=e;let r,o,i,a;if((0,x.isDefined)(n))[r,o,i,a]=[n.right-n.left,n.bottom-n.top,n.left,n.top];else{if(!(0,x.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,m.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,E.jsxs)(mj.YJ,Object.assign({},a,s,{opacity:e.highlighted||r?1:.5,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[(0,E.jsx)(mj.rw,{x:0,y:0,width:64,height:32,fill:"#000",cornerRadius:16}),(0,E.jsx)(Ik,{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,E.jsx)(Ik,{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,E.jsx)(mj.Wd,Object.assign({},a,l,{children:c})):c}return null})),Ik=({x:e=0,fill:t,iconColor:n,onClick:r,icon:o})=>{const[i,a]=(0,m.useState)(new window.Image),s=Ct()(null!=n?n:"#fff"),[l,c]=(0,m.useState)(!1);(0,m.useEffect)((()=>{const e=new window.Image;e.onload=()=>{a(e)},e.width=12,e.height=12,e.src=o}),[o]);const d=(0,m.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,E.jsxs)(mj.YJ,{x:e,width:32,height:32,onClick:r,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:[(0,E.jsx)(mj.jl,{x:16,y:16,radius:14,opacity:l?1:.2,fill:l?t:"#fff"}),(0,E.jsx)(mj._V,{ref:e=>d(e),x:8,y:8,width:16,height:16,image:i,filters:[kt.A.Filters.RGB]})]})},Lk=(0,v.PA)((({item:e,children:t})=>{var n;const{suggestion:r}=null!=(n=(0,m.useContext)($j))?n:{};return(0,E.jsxs)(m.Fragment,{children:[t,r&&(0,E.jsx)(Pk,{item:e,useLayer:"brushregion"===e.type})]})})),Mk={shadowColor:"red",shadowBlur:1,shadowOffsetY:2,shadowOffsetX:2,shadowOpacity:1},Kk=u.gK.model("Points",{id:u.gK.optional(u.gK.identifier,R),type:u.gK.optional(u.gK.enumeration(["add","eraser"]),"add"),points:u.gK.array(u.gK.number),relativePoints:u.gK.array(u.gK.number),strokeWidth:u.gK.optional(u.gK.number,25),relativeStrokeWidth:u.gK.optional(u.gK.number,25),eraserSize:u.gK.optional(u.gK.number,25)}).views((e=>({get store(){return(0,u.Zn)(e)},get parent(){return(0,u.p7)(e,2)?(0,u.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}))),Dk=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"brushregion",object:u.gK.late((()=>u.gK.reference(BR))),coordstype:u.gK.optional(u.gK.enumeration(["px","perc"]),"perc"),rle:u.gK.frozen(),maskDataURL:u.gK.frozen(),touches:u.gK.array(Kk),currentTouch:u.gK.maybeNull(u.gK.reference(Kk))}).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,u._n)(e)?e.object:null},get colorParts(){const t=e.style||e.tag||N.l;return(0,xt.colorToRGBAArray)(t.strokecolor)},get strokeColor(){return(0,xt.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,k.VS)(k.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,k.VS)(k.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=Kk.create({id:R(),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=bk.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=bk.A.Region2RLE(e,n);if(!t||!t.length)return null;r.rle=Array.from(t)}return e.parent.createSerializedResult(e,r)}}})),Nk=u.gK.compose("BrushRegionModel",ut,Xe,bt,Ek,ze,Dk),Vk=(0,v.PA)((({item:e,setShapeRef:t,pointsList:n})=>{const r=(0,m.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,m.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,E.jsx)(mj.yp,{ref:e=>t(e),sceneFunc:o,hitFunc:i})})),zk=Tk((({item:e,setShapeRef:t})=>{var n,r,o,i,a,s,l,c,d,h,g,p;const[f,v]=(0,m.useState)(),{suggestion:y}=null!=(n=(0,m.useContext)($j))?n:{};(0,m.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,k.VS)(k.bP)?t=await bk.A.maskDataURL2Image(e.maskDataURL,{color:e.strokeColor}):e.rle&&(t=bk.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,m.useMemo)((()=>{let t;return(n,r)=>{if(f){if(!t){n.drawImage(f,0,0,e.parent.stageWidth,e.parent.stageHeight),t=(0,k.VS)(k.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,xt.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,m.useRef)(new window.Image),C=(0,m.useRef)(),S=(0,m.useRef)({});S.current.highlighted=e.highlighted,S.current.highlight=S.current.highlighted?Mk:{shadowOpacity:0};const j=(0,m.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==(h=e.parent)?void 0:h.stageWidth,null==(g=e.parent)?void 0:g.stageHeight,e.maskDataURL,e.rle,f]),O=(0,m.useCallback)((t=>{(0,u._n)(e)&&e.setLayerRef(t)}),[e]);if(!e.parent)return null;const R=null==(p=e.parent)?void 0:p.stageRef,_=(0,k.VS)(k.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,k.VS)(k.pG)?{x:0,y:0,width:e.parent.stageWidth,height:e.parent.stageHeight}:null;return(0,E.jsxs)(Lk,{item:e,children:[(0,E.jsx)(mj.Wd,{id:e.cleanId,ref:e=>{O(e),C.current=e},onDraw:()=>{setTimeout(j)},clearBeforeDraw:!e.isDrawing,visible:!e.hidden,clip:A,children:(0,E.jsxs)(mj.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,k.VS)(k.pG)){const t=e.parent.getToolsManager().findSelectedTool(),n=t&&"MoveTool"===(0,u.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,E.jsx)(mj._V,{image:f,hitFunc:b,width:e.parent.stageWidth,height:e.parent.stageHeight}),(0,E.jsx)(mj.YJ,{children:(0,E.jsx)(Vk,{store:x,item:e,pointsList:e.touches,setShapeRef:t})}),(0,E.jsx)(mj._V,Object.assign({name:"highlight",image:w.current,sceneFunc:S.current.highlighted?null:()=>{},hitFunc:()=>{}},S.current.highlight,_,{listening:!1}))]})}),(0,E.jsx)(mj.Wd,{id:`${e.cleanId}_labels`,ref:t=>{t&&(t.canvas._canvas.style.opacity=e.opacity)},children:(0,E.jsx)(mj.YJ,{children:(0,E.jsx)(kk,{item:e,color:e.strokeColor})})})]})}),{renderHidden:!0,shouldNotUsePortal:!0});b.addTag("brushregion",Nk,zk),b.addRegionType(Nk,"image",(e=>e.rle||e.touches||e.maskDataURL));const Bk={defaultOpacity:N.l.opacity,defaultFillColor:N.l.fillcolor,defaultStrokeColor:N.l.strokecolor,defaultStrokeColorHighlighted:N.A.HIGHLIGHTED_STROKE_COLOR,defaultStrokeWidth:N.l.strokewidth,defaultStrokeWidthHighlighted:N.A.HIGHLIGHTED_STROKE_WIDTH,defaultSuggestionWidth:N.A.SUGGESTION_STROKE_WIDTH},Hk=(e,t={})=>{var n,r;const{suggestion:o}=null!=(n=(0,m.useContext)($j))?n:{},[i,a]=(0,m.useState)(e.highlighted),[s,l]=(0,m.useState)(null!=(r=e.fill)?r:t.useStrokeAsFill||t.includeFill),c=(0,m.useMemo)((()=>(({region:e,highlighted:t=!1,shouldFill:n=!1,useStrokeAsFill:r=!1,sameStrokeWidthForSelected:o=!1,suggestion:i=!1,defaultOpacity:a=N.l.opacity,defaultFillColor:s=N.l.fillcolor,defaultStrokeColor:l=N.l.strokecolor,defaultStrokeColorHighlighted:c=N.A.HIGHLIGHTED_STROKE_COLOR,defaultStrokeWidth:d=N.l.strokewidth,defaultStrokeWidthHighlighted:u=N.A.HIGHLIGHTED_STROKE_WIDTH,defaultSuggestionWidth:h=N.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,x.isDefined)(y)?y:null==f?void 0:f.opacity,w=n?Ct()(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:Ct()(null!=(p=null==f?void 0:f.strokecolor)?p:l).css(),fillColor:w,strokeWidth:i?h:v&&!o?u:+(null!=(C=null==f?void 0:f.strokewidth)?C:d)}})(Object.assign({},Bk,null!=t?t:{},{highlighted:i,shouldFill:s,region:e,suggestion:o}))),[e,o,t,i,s]);return(0,m.useEffect)((()=>{const t=["highlighted","fill"].map((t=>{try{return(0,d.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 Fk(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,x.minMax)(s.map((e=>e.x))),[d,u]=(0,x.minMax)(s.map((e=>e.y)));return{left:l+n.x,right:c+n.x,top:d+n.y,bottom:u+n.y}}const Wk=u.gK.model({coordstype:u.gK.optional(u.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)*tt,e.relativeY=n/(null==(s=e.parent)?void 0:s.stageHeight)*nt,e.relativeRadiusX=r/(null==(l=e.parent)?void 0:l.stageWidth)*tt,e.relativeRadiusY=o/(null==(c=e.parent)?void 0:c.stageHeight)*nt,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/tt,e.y=o*e.relativeY/nt,e.radiusX=r*e.relativeRadiusX/tt,e.radiusY=o*e.relativeRadiusY/nt):"perc"===e.coordstype&&(e.x=r*e.x/tt,e.y=o*e.y/nt,e.radiusX=r*e.radiusX/tt,e.radiusY=o*e.radiusY/nt,e.coordstype="px")}}))),$k=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"ellipseregion",object:u.gK.late((()=>u.gK.reference(BR))),x:u.gK.number,y:u.gK.number,radiusX:u.gK.number,radiusY:u.gK.number,rotation:0}).volatile((()=>({startX:0,startY:0,scaleX:1,scaleY:1,opacity:u.gK.number,fill:!0,fillColor:N.A.FILL_COLOR,fillOpacity:.2,strokeColor:N.A.STROKE_COLOR,strokeWidth:N.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,u.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:Fk(t,e.rotation,{x:e.x,y:e.y},e.parent.whRatio)},get canvasX(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasRadiusX(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.radiusX):e.radiusX},get canvasRadiusY(){var t;return(0,k.VS)(k.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=Hk(e),a=null==(n=e.parent)?void 0:n.stageRef,{suggestion:s}=null!=(r=(0,m.useContext)($j))?r:{};return e.parent&&e.inViewPort?(0,E.jsxs)(m.Fragment,{children:[(0,E.jsx)(mj.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:Tt(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=N.A.LINKING_MODE_CURSOR):a.container().style.cursor=N.A.POINTER_CURSOR},onMouseOut:()=>{a.container().style.cursor=N.A.DEFAULT_CURSOR,o.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||(o.annotationStore.selected.isLinkingMode&&(a.container().style.cursor=N.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))},draggable:!e.isReadOnly(),listening:!s}),(0,E.jsx)(Ck,{item:e,color:i.strokeColor,strokewidth:i.strokeWidth})]}):null}));b.addTag("ellipseregion",Uk,Zk),b.addRegionType(Uk,"image");const Gk=u.gK.model({coordstype:u.gK.optional(u.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*tt,e.relativeY=e.y/n*nt)}},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*tt,e.relativeY=o.y/e.parent.stageHeight*nt},updateImageSize(t,n,r,o){"px"===e.coordstype&&(e.x=r*e.relativeX/tt,e.y=o*e.relativeY/nt),"perc"===e.coordstype&&(e.x=r*e.x/tt,e.y=o*e.y/nt,e.width=r*e.width/tt,e.coordstype="px")}}))),Yk=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"keypointregion",object:u.gK.late((()=>u.gK.reference(BR))),x:u.gK.number,y:u.gK.number,width:u.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,u.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,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasWidth(){var t;return(0,k.VS)(k.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,k.VS)(k.MV)?e.x:e.convertXToPerc(e.x),y:(0,k.VS)(k.MV)?e.y:e.convertYToPerc(e.y),width:(0,k.VS)(k.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}}))),Xk=u.gK.compose("KeyPointRegionModel",ut,bt,Xe,Ek,mn,Yk,...(0,k.VS)(k.MV)?[]:[Gk]),qk=Tk((({item:e,setShapeRef:t})=>{var n,r,o,i;const{store:a}=e,{suggestion:s}=null!=(n=(0,m.useContext)($j))?n:{},l=Hk(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,E.jsxs)(m.Fragment,{children:[(0,E.jsx)(mj.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:Tt(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=N.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))}},c,{draggable:!e.isReadOnly(),listening:!s})),(0,E.jsx)(Ok,{item:e,color:l.strokeColor})]}):null}));b.addTag("keypointregion",Xk,qk),b.addRegionType(Xk,"image",(e=>"x"in e&&"y"in e&&"width"in e&&!("height"in e)));const Jk=u.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*tt,e.relativeY=e.y/e.stage.stageHeight*nt)},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*tt,e.relativeY=e.y/e.stage.stageHeight*nt},_setPos(t,n){e.initX=t,e.initY=n,e.relativeX=t/e.stage.stageWidth*tt,e.relativeY=n/e.stage.stageHeight*nt,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)}}))),Qk=u.gK.model("PolygonPoint",{id:u.gK.optional(u.gK.identifier,R),x:u.gK.number,y:u.gK.number,index:u.gK.number,style:"circle",size:"small"}).volatile((()=>({selected:!1}))).views((e=>({get parent(){return(0,u.p7)(e,2)?(0,u.PA)(e,2):null},get stage(){var t;return null==(t=e.parent)?void 0:t.parent},get annotation(){return(0,u.Zn)(e).annotationStore.selected},get canvasX(){var t;return(0,k.VS)(k.MV)?null==(t=e.stage)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,k.VS)(k.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()}))),eO=(0,k.VS)(k.MV)?Qk:u.gK.compose("PolygonPoint",Qk,Jk),tO=(0,v.PA)((({item:e,name:t})=>{if(!e.parent)return;const[n,r]=(0,m.useState)(!0),o=Hk(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,E.jsx)(mj.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,k.VS)(k.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,E.jsx)(mj.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 nO=n(67695);const rO=u.gK.model({coordstype:u.gK.optional(u.gK.enumeration(["px","perc"]),"perc")}).actions((e=>({updateImageSize(t,n,r,o){"px"===e.coordstype&&e.points.forEach((e=>{const t=r*e.relativeX/tt,n=o*e.relativeY/nt;e._setPos(t,n)})),e.annotation.sentUserGenerate||"perc"!==e.coordstype||e.points.forEach((t=>{const n=r*t.x/tt,i=o*t.y/nt;e.coordstype="px",t._setPos(n,i)}))}}))),oO=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"polygonregion",object:u.gK.late((()=>u.gK.reference(BR))),points:u.gK.array(u.gK.union(eO,u.gK.array(u.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,u.Zn)(e)},get bboxCoords(){var t;if(null==(t=e.points)||!t.length||!(0,u._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,k.VS)(k.MV)||(0,x.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:R(),x:t,y:n,size:e.pointSize,style:e.pointStyle,index:r})))),(0,k.VS)(k.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]=aO({flattenedPoints:n,cursorX:i,cursorY:a});!function({point:e,group:t,layer:n,zoom:r}){const o=sO({layer:n})||function({point:e,group:t,layer:n,zoom:r}){const o=new kt.A.Circle({name:"hoverAnchor",x:e[0],y:e[1],stroke:nO.green.primary,fill:nO.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}){lO({layer:e.currentTarget.getLayer()})},handleLineClick({e:t,flattenedPoints:n,insertIdx:r}){if(!e.closed||!e.selected)return;t.cancelBubble=!0,lO({layer:t.currentTarget.getLayer()});const{offsetX:o,offsetY:i}=t.evt,[a,s]=e.parent.fixZoomedCoords([o,i]),l=aO({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,u.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:R(),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:R(),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,u.Yo)(e.points),(0,u.zr)(e.points)},afterUnselectRegion(){e.selectedPoint&&(e.selectedPoint.selected=!1)},setScale(t,n){e.scaleX=t,e.scaleY=n},updateImageSize(){},serialize(){if(!(0,k.VS)(k.vz)&&e.points.length<3)return null;const t=Object.assign({points:(0,k.VS)(k.MV)?e.points.map((e=>[e.x,e.y])):e.points.map((t=>[e.convertXToPerc(t.x),e.convertYToPerc(t.y)]))},(0,k.VS)(k.vz)?{closed:e.closed}:{});return e.parent.createSerializedResult(e,t)}}))),iO=u.gK.compose("PolygonRegionModel",ut,bt,Xe,Ek,oO,...(0,k.VS)(k.MV)?[]:[rO]);function aO({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 sO({layer:e}){return e.findOne(".hoverAnchor")}function lO({layer:e}){const t=sO({layer:e});t&&(t.destroy(),e.draw())}const cO=(0,m.memo)((0,v.PA)((({item:e,colors:t,dragProps:n,draggable:r})=>{const{flattenedPoints:o}=e,i="poly";return(0,E.jsx)(mj.YJ,{name:i,children:(0,E.jsx)(mj.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)}))),dO=(0,v.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,E.jsx)(mj.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,E.jsx)(mj.N1,Object.assign({lineJoin:"round",opacity:1,points:l,hitStrokeWidth:20,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1},c))},e)})),uO=(0,m.memo)((0,v.PA)((({item:e,regionStyles:t})=>{const{points:n,closed:r}=e,o="borders";return!e.closed||!e.parent.useTransformer&&e.selected?(0,E.jsx)(mj.YJ,{name:o,children:n.map(((o,i)=>{const a=i,s=i===n.length-1?0:i+1;return r||0!==s?(0,E.jsx)(dO,{name:`border_${a}_${s}`,item:e,idx:a,p1:n[i],p2:n[s],closed:r,regionStyles:t},`border_${a}_${s}`):null}))},o):null}))),hO=Tk((({item:e,setShapeRef:t})=>{var n,r,o,i;const{store:a}=e,{suggestion:s}=null!=(n=(0,m.useContext)($j))?n:{},l=Hk(e,{useStrokeAsFill:!0});const c=(0,m.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:Tt(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,m.useEffect)((()=>{(0,k.VS)(k.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,E.jsxs)(mj.YJ,Object.assign({name:e.id,ref:e=>t(e),onMouseOver:()=>{a.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),d.container().style.cursor=N.A.LINKING_MODE_CURSOR):d.container().style.cursor=N.A.POINTER_CURSOR},onMouseOut:()=>{d.container().style.cursor=N.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=N.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,E.jsx)(jk,{item:e,color:l.strokeColor}),e.mouseOverStartPoint,e.points&&e.closed?(0,E.jsx)(cO,{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,E.jsx)(uO,{item:e,regionStyles:l}):null,e.points&&!e.isReadOnly()?function(t){const n="anchors";return!e.closed||!e.parent.useTransformer&&e.selected?(0,E.jsx)(mj.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,E.jsx)(tO,{item:o,name:r},r)}({points:t,idx:r})))},n):null}(e.points):null]}),e.id?e.id:R(5))}));b.addTag("polygonregion",iO,hO),b.addRegionType(iO,"image",(e=>!!e.points));const gO=u.gK.model({coordstype:u.gK.optional(u.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)*tt,e.relativeY=n/(null==(s=e.parent)?void 0:s.stageHeight)*nt,e.relativeWidth=r/(null==(l=e.parent)?void 0:l.stageWidth)*tt,e.relativeHeight=o/(null==(c=e.parent)?void 0:c.stageHeight)*nt,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/tt,e.y=o*e.relativeY/nt,e.width=r*e.relativeWidth/tt,e.height=o*e.relativeHeight/nt):"perc"===e.coordstype&&(e.x=r*e.x/tt,e.y=o*e.y/nt,e.width=r*e.width/tt,e.height=o*e.height/nt,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)}}))),mO=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"rectangleregion",object:u.gK.late((()=>u.gK.reference(BR))),x:u.gK.number,y:u.gK.number,width:u.gK.number,height:u.gK.number,rotation:0,rotationAtCreation:0}).volatile((()=>({startX:0,startY:0,scaleX:1,scaleY:1,opacity:1,fill:!0,fillColor:"#ff8800",fillOpacity:.2,strokeColor:N.A.STROKE_COLOR,strokeWidth:N.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,u.Zn)(e)},get parent(){return(0,u._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?Fk(t,e.rotation,{x:e.x,y:e.y},e.parent.whRatio):t},get canvasX(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasWidth(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.width):e.width},get canvasHeight(){var t;return(0,k.VS)(k.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)>tt||(null==s?void 0:s.bottom)>nt)&&(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,k.VS)(k.MV)?e.convertXToPerc(e.x):e.x,y:e.parent.stageWidth>1&&!(0,k.VS)(k.MV)?e.convertYToPerc(e.y):e.y,width:e.parent.stageWidth>1&&!(0,k.VS)(k.MV)?e.convertHDimensionToPerc(e.width):e.width,height:e.parent.stageWidth>1&&!(0,k.VS)(k.MV)?e.convertVDimensionToPerc(e.height):e.height,rotation:e.rotation};return e.parent.createSerializedResult(e,t)}}))),pO=u.gK.compose("RectRegionModel",ut,Xe,bt,Ek,mn,mO,...(0,k.VS)(k.MV)?[]:[gO]),fO=Tk((({item:e,setShapeRef:t})=>{var n,r,o;const{store:i}=e,{suggestion:a}=null!=(n=(0,m.useContext)($j))?n:{},s=Hk(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=Tt(e,{x:e.x-e.bboxCoords.left,y:e.y-e.bboxCoords.top})),(0,E.jsxs)(Lk,{item:e,children:[(0,E.jsx)(mj.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=N.A.LINKING_MODE_CURSOR):l.container().style.cursor=N.A.POINTER_CURSOR},onMouseOut:()=>{l.container().style.cursor=N.A.DEFAULT_CURSOR,i.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||(i.annotationStore.selected.isLinkingMode&&(l.container().style.cursor=N.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))},listening:!(a||null!=(o=e.annotation)&&o.isDrawing)})),(0,E.jsx)(Sk,{item:e,color:s.strokeColor,strokewidth:s.strokeWidth})]})):null}));function vO(e){const t=(0,u.dV)(e);return(0,u.Pw)(e).create(Object.assign({},t,{id:R()}))}b.addTag("rectangleregion",pO,fO),b.addRegionType(pO,"image");const yO=u.gK.model({selected:u.gK.optional(u.gK.boolean,!1),group:u.gK.optional(u.gK.string,"default"),shortcut:u.gK.optional(u.gK.maybeNull(u.gK.string),null)}).views((e=>({get obj(){var t,n;return null!=(t=null==(n=e.manager)?void 0:n.obj)?t:(0,u._$)(e).object},get manager(){return(0,u._$)(e).manager},get control(){return(0,u._$)(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=>vO(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,u.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}}))),bO=u.gK.compose(yO,Ne),xO=u.gK.model("DrawingTool",{default:!0,mode:u.gK.optional(u.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,k.VS)(k.MV)?{X:Sj.X/e.obj.stageScale/e.obj.stageWidth*tt,Y:Sj.Y/e.obj.stageScale/e.obj.stageHeight*nt}:{X:Sj.X/e.obj.stageScale,Y:Sj.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,k.VS)(k.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"}}))),wO=xO.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:zn()(((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,k.VS)(k.MV)?tt:e.obj.stageWidth,a=(0,k.VS)(k.MV)?nt:e.obj.stageHeight;let{x1:s,y1:l,x2:c,y2:d}=o?{x1:r.startX,y1:r.startY,x2:t,y2:n}:un.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,k.VS)(k.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)}}}})),CO=xO.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,k.VS)(k.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()}}})),SO=xO.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,k.VS)(k.MV)?tt:e.obj.stageWidth,i=(0,k.VS)(k.MV)?nt:e.obj.stageHeight;let{x1:a,y1:s,x2:l,y2:c}=un.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,k.VS)(k.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 jO=n(18229),kO=n(51366),OO=n(20963),RO=n(15311);const EO=({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}),_O=["node"],AO={RichTextRegionModel:{name:"HTML",icon:Up,getContent:e=>(0,E.jsx)("span",{style:{color:"#5a5a5a"},children:e.text}),fullContent:e=>(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{children:e.start}),(0,E.jsx)("div",{children:e.startOffset}),(0,E.jsx)("div",{children:JSON.stringify(e.globalOffsets,null,2)})]})},ParagraphsRegionModel:EO({name:"Paragraphs",icon:Up,getContent:e=>(0,E.jsx)("span",{style:{color:"#5a5a5a"},children:e.text})}),AudioRegionModel:EO({name:"Audio",icon:jO.A}),TimeSeriesRegionModel:EO({name:"TimeSeries",icon:kO.A}),TextAreaRegionModel:EO({name:"Input",icon:OO.A,getContent:e=>(0,E.jsx)("span",{style:{color:"#5a5a5a"},children:e._value})}),RectRegionModel:EO({name:"Rect",icon:xg,altIcon:_g}),Rect3PointRegionModel:EO({name:"Rect3Point",icon:Vg,altIcon:Yg}),VideoRectangleRegionModel:EO({name:"Video Rect",icon:xg,altIcon:_g,getContent:e=>{var t;return(0,E.jsxs)("span",{style:{color:"#5a5a5a"},children:["from ",null==(t=e.sequence[0])?void 0:t.frame," frame"]})}}),PolygonRegionModel:EO({name:"Polygon",icon:tg,altIcon:ug}),EllipseRegionModel:EO({name:"Ellipse",icon:bh,altIcon:Rh}),KeyPointRegionModel:EO({name:"KeyPoint",icon:Mh,altIcon:$h}),BrushRegionModel:EO({name:"Brush",icon:rh,altIcon:uh}),ChoicesModel:EO({name:"Classification",icon:RO.A}),TextAreaModel:EO({name:"Input",icon:OO.A}),TimelineRegionModel:EO({name:"Timeline Span",icon:Ya})},TO=(0,v.PA)((({className:e,node:t})=>{const n=MO(t);n in AO||console.error(`No ${n} in NodeView`);const{getContent:r,fullContent:o}=AO[n],i=t.labelName;return(0,E.jsxs)(Qe.eB,{name:"node",className:[e].filter(Boolean).join(" "),children:[i,(0,E.jsx)("br",{}),r(t),o&&o(t)]})})),PO=(0,v.PA)((({className:e,node:t})=>{var n,r;const o=MO(t);if(!o||!(o in AO))return console.error(`No ${o} in NodeView`),null;const{getContent:i}=AO[o],a=t.labelName;return(0,E.jsxs)(Qe.eB,{name:"node",tag:"span",className:e,children:[a,t.isDrawing&&(0,E.jsx)(Qe.Sl,{tag:"span",name:"incomplete",children:(0,E.jsx)(hr,{title:`Incomplete ${null!=(n=null==(r=t.type)?void 0:r.replace("region",""))?n:"region"}`,children:(0,E.jsx)(qd,{})})})," ",i(t)]})})),IO=(0,v.PA)((e=>{let{node:t}=e,n=(0,nr.A)(e,_O);const r=MO(t);if(!(r in AO))return console.error(`No ${r} in NodeView`),null;const{icon:o}=AO[r];return(0,E.jsx)(o,Object.assign({},n))})),LO=(0,v.PA)((({node:e})=>{const{sortedRegions:t}=KO(e),n=t.indexOf(e),r=MO(e);if(!(r in AO))return console.error(`No ${r} in NodeView`),null;const{name:o,icon:i}=AO[r];return(0,E.jsxs)(Qe.eB,{name:"node-minimal",tag:"span",children:[n>=0&&(0,E.jsx)(Qe.Sl,{name:"counter",children:n+1}),(0,E.jsx)(Qe.Sl,{name:"icon",tag:i}),o]})})),MO=e=>e.$treenode?(0,u.Pw)(e).name:null,KO=e=>(0,u.Zn)(e).annotationStore.selected.regionStore,DO=({size:e})=>(0,E.jsx)("span",{style:{display:"block",width:e,height:e,background:"rgba(0, 0, 0, 0.25)",borderRadius:"100%"}}),NO=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{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}))),VO=u.gK.model("BrushTool",{strokeWidth:u.gK.optional(u.gK.number,15),group:"segmentation",shortcut:"B",smart:!0,unselectRegionOnToolChange:!(0,k.VS)(k.bP)}).volatile((()=>({canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,E.jsx)(NO,{item:e})},get iconComponent(){return e.dynamic?AO.BrushRegionModel.altIcon:AO.BrushRegionModel.icon},get tagTypes(){return{stateTypes:"brushlabels",controlTagTypes:["brushlabels","brush"]}},get controls(){return[(0,E.jsx)(uC,{value:e.strokeWidth,min:1,max:50,reverse:!0,align:"vertical",minIcon:(0,E.jsx)(DO,{size:8}),maxIcon:(0,E.jsx)(DO,{size:16}),onChange:t=>{e.setStroke(t)}},"brush-size")]},get extraShortcuts(){return{"[":["Decrease size",()=>{e.setStroke((0,x.clamp)(e.strokeWidth-5,1,50))}],"]":["Increase size",()=>{e.setStroke((0,x.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('",bk.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,x.findClosestParent)(t.target,(t=>t===e.obj.stageRef.content),(e=>e.parentElement))&&e.addPoint(r,o)},mousedownEv(r,o,[i,a]){if(!(0,x.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,k.VS)(k.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)}}}})),zO=u.gK.compose(VO.name,bO,Rj,xO,VO),BO=({size:e})=>(0,E.jsx)("span",{style:{display:"block",width:e,height:e,background:"rgba(0, 0, 0, 0.25)",borderRadius:"100%"}}),HO=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{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}))),FO=u.gK.model("EraserTool",{strokeWidth:u.gK.optional(u.gK.number,10),group:"segmentation",unselectRegionOnToolChange:!1}).volatile((()=>({index:9999,canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,E.jsx)(HO,{item:e})},get iconComponent(){return dm},get controls(){return[(0,E.jsx)(uC,{value:e.strokeWidth,min:1,max:50,reverse:!0,align:"vertical",minIcon:(0,E.jsx)(BO,{size:8}),maxIcon:(0,E.jsx)(BO,{size:16}),onChange:t=>{e.setStroke(t)}},"eraser-size")]},get extraShortcuts(){return{"[":["Decrease size",()=>{e.setStroke((0,x.clamp)(e.strokeWidth-5,1,50))}],"]":["Increase size",()=>{e.setStroke((0,x.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('",bk.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,x.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,x.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)))}}})),WO=u.gK.compose(FO.name,bO,Rj,xO,FO),$O=u.gK.model("KeyPointTool",{default:u.gK.optional(u.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?AO.KeyPointRegionModel.altIcon:AO.KeyPointRegionModel.icon}}))).actions((e=>({clickEv(t,[n,r]){var o;if((0,k.VS)(k.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,k.VS)(k.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()}}))),UO=u.gK.compose($O.name,bO,Rj,xO,$O),ZO=u.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,k.VS)(k.vz)&&t&&!(0,u._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?AO.PolygonRegionModel.altIcon:AO.PolygonRegionModel.icon},get defaultDimensions(){return Oj},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,d.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.vz)){const{currentArea:t}=e;e.setDrawing(!1),e.currentArea=null,t&&t.deleteRegion()}else t.deleteRegion()}}})),GO=u.gK.compose(ZO.name,bO,Rj,CO,ZO),YO=u.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 jj},createRegionOptions:({x:n,y:r})=>t.createRegionOptions({x:n,y:r,height:(0,k.VS)(k.MV)?e.obj.canvasToInternalY(1):1,width:(0,k.VS)(k.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}}))),XO=u.gK.model("RectangleTool",{shortcut:"R"}).views((e=>({get viewTooltip(){return"Rectangle"},get iconComponent(){return e.dynamic?AO.RectRegionModel.altIcon:AO.RectRegionModel.icon}}))),qO=u.gK.model("Rectangle3PointTool",{shortcut:"shift+R"}).views((e=>({get viewTooltip(){return"3 Point Rectangle"},get iconComponent(){return e.dynamic?AO.Rect3PointRegionModel.altIcon:AO.Rect3PointRegionModel.icon}}))),JO=u.gK.compose(XO.name,bO,Rj,wO,YO,XO,Ne),QO=u.gK.compose(qO.name,bO,Rj,SO,YO,qO,Ne),eR=u.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?AO.EllipseRegionModel.altIcon:AO.EllipseRegionModel.icon},get defaultDimensions(){const{radius:e}=kj;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}}))),tR=u.gK.compose(eR.name,bO,Rj,wO,eR),nR=kr("SegmentationToolbar","Segmentation Tools"),rR={plus:"+",minus:"-"},oR=e=>{if(!e)return null;const t=e.split(",").map((e=>e.trim()));return(0,E.jsx)(Qe.Sl,{name:"shortcut",children:t.map(((e,t)=>{const n=e.split("+");return(0,E.jsx)(m.Fragment,{children:n.map((e=>{var t;return(0,E.jsx)(Qe.Sl,{name:"key",tag:"kbd",children:null!=(t=rR[e])?t:e},e)}))},`${n.join("-")}-${t}`)}))})},iR=({items:e,icon:t})=>{const[n,r]=(0,m.useState)(!1);return(0,m.useEffect)((()=>{const t=()=>{e.forEach((e=>{const t=e.shortcut;t&&nR.hasKey(t)&&nR.removeKey(t)}))};return t(),e.forEach((e=>{const t=e.shortcut;t&&!nR.hasKey(t)&&nR.addKey(t,(()=>{null==e||null==e.onClick||e.onClick(),r(!1)}),e.label)})),()=>{t()}}),[e]),(0,m.useEffect)((()=>{const e=()=>{n&&r(!1)};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}})),(0,E.jsxs)(Qe.eB,{name:"flyoutmenu",tag:"div",className:""+(n?"hovered":""),onClick:e=>{e.stopPropagation(),r(!n)},children:[(0,E.jsx)(Qe.Sl,{name:"icon",className:""+(n?"isClicked":""),title:"Zoom presets (click to see options)",children:t}),(0,E.jsx)(Qe.eB,{name:"tooltips",tag:"div",children:e.map(((e,t)=>(0,E.jsx)(Qe.Sl,{name:"tooltip",onClick:t=>{t.stopPropagation(),null==e||null==e.onClick||e.onClick(),r(!1)},children:(0,E.jsxs)(Qe.Sl,{name:"tooltip-body",children:[(0,E.jsx)(Qe.Sl,{name:"label",children:e.label}),oR(e.shortcut)]})},t)))})]})},aR=(0,v.PA)((({item:e})=>(0,E.jsxs)(m.Fragment,{children:[(0,E.jsx)(xj,{active:e.selected,icon:(0,E.jsx)(fm,{}),ariaLabel:"pan",label:"Pan Image",shortcut:"H",onClick:()=>{const t=e.selected;e.manager.selectTool(e,!t)}}),(0,E.jsx)(xj,{icon:(0,E.jsx)(Km,{}),ariaLabel:"zoom-in",label:"Zoom In",shortcut:"ctrl+plus",onClick:()=>{e.handleZoom(1)}}),(0,E.jsx)(iR,{icon:(0,E.jsx)(Qm,{}),items:[{label:"Zoom to fit",shortcut:"shift+1",onClick:()=>{e.sizeToFit()}},{label:"Zoom to actual size",shortcut:"shift+2",onClick:()=>{e.sizeToOriginal()}}]}),(0,E.jsx)(xj,{icon:(0,E.jsx)(Fm,{}),ariaLabel:"zoom-out",label:"Zoom Out",shortcut:"ctrl+minus",onClick:()=>{e.handleZoom(-1)}})]}))),sR=u.gK.model("ZoomPanTool",{group:"control"}).volatile((()=>({canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,E.jsx)(aR,{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()}}))),lR=u.gK.compose(sR.name,bO,Rj,sR),cR=(0,v.PA)((({item:e})=>(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(xj,{active:e.selected,icon:(0,E.jsx)(mp,{}),ariaLabel:"rotate-left",label:"Rotate Left",shortcut:"alt+left",onClick:()=>{e.rotate(-90)}}),(0,E.jsx)(xj,{active:e.selected,icon:(0,E.jsx)(wp,{}),ariaLabel:"rotate-right",label:"Rotate Right",shortcut:"alt+right",onClick:()=>{e.rotate(90)}})]}))),dR=u.gK.model("RotateTool",{group:"control"}).views((e=>({get viewClass(){return()=>(0,E.jsx)(cR,{item:e})}}))).actions((e=>({rotate(t){e.obj.rotate(t)}}))),uR=u.gK.compose(dR.name,bO,Rj,dR),hR=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{active:e.selected,ariaLabel:"brightness",label:"Brightness",controlsOnHover:!0,controls:[(0,E.jsx)(uC,{align:"vertical",reverse:!0,continuous:!0,minIcon:(0,E.jsx)(Cm,{style:{width:22,height:22,opacity:.2}}),maxIcon:(0,E.jsx)(Cm,{style:{width:22,height:22,opacity:.8}}),value:e.brightness,max:N.A.BRIGHTNESS_MAX,onChange:t=>{e.setStroke(t)}},"brightness")],icon:(0,E.jsx)(Cm,{})}))),gR=u.gK.model({brightness:u.gK.optional(u.gK.number,N.A.BRIGHTNESS_VALUE)}).views((e=>({get viewClass(){return()=>(0,E.jsx)(hR,{item:e})}}))).actions((e=>({setStroke(t){e.brightness=t,e.obj.setBrightnessGrade(t)}}))),mR=u.gK.compose(gR.name,bO,Rj,gR),pR=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{active:e.selected,ariaLabel:"contrast",label:"Contrast",controlsOnHover:!0,controls:[(0,E.jsx)(uC,{align:"vertical",reverse:!0,continuous:!0,minIcon:(0,E.jsx)(Em,{style:{width:22,height:22,opacity:.2}}),maxIcon:(0,E.jsx)(Em,{style:{width:22,height:22,opacity:.8}}),value:e.contrast,max:N.A.CONTRAST_MAX,onChange:t=>{e.setStroke(t)}},"contrast")],icon:(0,E.jsx)(Em,{})}))),fR=u.gK.model("ContrastTool",{contrast:u.gK.optional(u.gK.number,N.A.CONTRAST_VALUE)}).views((e=>({get viewClass(){return()=>(0,E.jsx)(pR,{item:e})}}))).actions((e=>({setStroke(t){e.contrast=t,e.obj.setContrastGrade(t)}}))),vR=u.gK.compose(fR.name,bO,Rj,fR),yR=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{label:"Magic Wand",ariaLabel:"magicwand",shortcut:"W",active:e.selected,icon:e.iconClass,tool:e,onClick:()=>{e.selected||e.manager.selectTool(e,!0)}}))),bR=u.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,E.jsx)(yR,{item:e})},get tagTypes(){return{stateTypes:"brushlabels",controlTagTypes:["brushlabels","magicwand"]}},get iconComponent(){return nm},get defaultthreshold(){return Number.parseInt(e.control.defaultthreshold,10)},get opacity(){return Number.parseFloat(e.control.opacity)},get fillcolor(){const t=Ct()(N.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,Ct()(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,u.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]=Pt(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=jt(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:R(),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=jt(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,u.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=bk.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]=It(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}}))),xR=u.gK.compose(bR.name,bO,Rj,xO,bR),wR=u.gK.model("SelectionTool",{shortcut:"V",group:"control"}).views((()=>({get isSeparated(){return!0},get viewTooltip(){return"Move"},get iconComponent(){return sp},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,k.VS)(k.q$)&&(t=!1,e.obj.resetSelection(),n.ctrlKey||n.metaKey||e.annotation.unselectAreas())}}})),CR=u.gK.compose("MoveTool",bO,Rj,Ne,wR),SR=new Map;let jR=null;class kR{static getInstance({name:e}={}){if(!e)return;if(SR.has(e))return SR.get(e);const t=new kR({name:e});return SR.set(e,t),t}static allInstances(){return Array.from(SR.values())}static setRoot(e){jR=e}static removeAllTools(){SR.forEach((e=>e.removeAllTools())),SR.clear()}constructor({name:e}={}){this.name=e,this.tools={},this._default_tool=null,this._prefix=R()}get preservedTool(){return window.localStorage.getItem(`selected-tool:${this.name}`)}get obj(){return jR.annotationStore.names.get(this.name)}addTool(e,t,n=null,r=R()){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,k.VS)(k.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}={}){SR.delete(this.name),SR.set(e,this),this.removeAllTools(),this.name=e}removeAllTools(){Object.values(this.tools).forEach((e=>(0,u.zr)(e))),this.tools={},this._default_tool=null}get hasSelected(){return Object.values(this.tools).some((e=>e.selected))}}window.ToolManager=kR;const OR=kR,RR=u.gK.union({dispatcher(e){if(!e)return u.gK.null;const t=e.object.name||e.object,n=window.Htx.annotationStore.names.get(t),r=b.getAvailableAreas(n.type,e);return u.gK.union(...r,u.gK.null)}});const ER=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}))}},_R=u.gK.model({id:u.gK.identifier,src:u.gK.string,index:u.gK.number,rotation:u.gK.optional(u.gK.number,0),naturalWidth:u.gK.optional(u.gK.integer,1),naturalHeight:u.gK.optional(u.gK.integer,1),stageWidth:u.gK.optional(u.gK.number,1),stageHeight:u.gK.optional(u.gK.number,1),zoomScale:u.gK.optional(u.gK.number,1),zoomingPositionX:u.gK.optional(u.gK.number,0),zoomingPositionY:u.gK.optional(u.gK.number,0),brightnessGrade:u.gK.optional(u.gK.number,100),contrastGrade:u.gK.optional(u.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),ER.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:()=>ER.isError(e.src)?(e.setDownloading(!1),e.setError(!0),!0):!!ER.isPreloaded(e.src)&&(e.setDownloading(!1),e.setDownloaded(!0),e.setProgress(1),e.setCurrentSrc(ER.getPreloadedURL(e.src)),!0),setImageLoaded(t){e.imageLoaded=t},setProgress(t){e.progress=(0,x.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}}))),AR=u.gK.model({currentImageEntity:u.gK.maybeNull(u.gK.reference(_R)),imageEntities:u.gK.optional(u.gK.array(_R),[])}).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,u._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,u._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,u._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,u._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))}}))),TR=u.gK.model({x:u.gK.number,y:u.gK.number}),PR=u.gK.model({start:u.gK.maybeNull(TR),end:u.gK.maybeNull(TR)}).views((e=>({get obj(){return(0,u.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,k.VS)(k.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,k.VS)(k.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}}))),IR=u.gK.model({valuelist:u.gK.maybeNull(u.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,x.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}}))),LR=u.gK.model({value:u.gK.maybeNull(u.gK.string),valuelist:u.gK.maybeNull(u.gK.string),resize:u.gK.maybeNull(u.gK.number),width:u.gK.optional(u.gK.string,"100%"),height:u.gK.maybeNull(u.gK.string),maxwidth:u.gK.optional(u.gK.string,"100%"),maxheight:u.gK.optional(u.gK.string,"calc(100vh - 194px)"),smoothing:u.gK.maybeNull(u.gK.boolean),grid:u.gK.optional(u.gK.boolean,!1),gridsize:u.gK.optional(u.gK.string,"30"),gridcolor:u.gK.optional(Ie.color,"#EEEEF4"),zoom:u.gK.optional(u.gK.boolean,!0),negativezoom:u.gK.optional(u.gK.boolean,!1),zoomby:u.gK.optional(u.gK.string,"1.1"),showlabels:u.gK.optional(u.gK.boolean,!1),zoomcontrol:u.gK.optional(u.gK.boolean,!0),brightnesscontrol:u.gK.optional(u.gK.boolean,!1),contrastcontrol:u.gK.optional(u.gK.boolean,!1),rotatecontrol:u.gK.optional(u.gK.boolean,!1),crosshair:u.gK.optional(u.gK.boolean,!1),selectioncontrol:u.gK.optional(u.gK.boolean,!0),lazyoff:u.gK.optional(u.gK.boolean,!1),horizontalalignment:u.gK.optional(u.gK.enumeration(["left","center","right"]),"left"),verticalalignment:u.gK.optional(u.gK.enumeration(["top","center","bottom"]),"top"),defaultzoom:u.gK.optional(u.gK.enumeration(["auto","original","fit"]),"fit"),crossorigin:u.gK.optional(u.gK.enumeration(["none","anonymous","use-credentials"]),"none")}),MR="rectanglelabels",KR="brushlabels",DR="ellipselabels",NR=u.gK.model({type:"image",sizeUpdated:u.gK.optional(u.gK.boolean,!1),cursorPositionX:u.gK.optional(u.gK.number,0),cursorPositionY:u.gK.optional(u.gK.number,0),brushControl:u.gK.optional(u.gK.string,"brush"),brushStrokeWidth:u.gK.optional(u.gK.number,15),mode:u.gK.optional(u.gK.enumeration(["drawing","viewing","brush","eraser"]),"viewing"),regions:u.gK.array(u.gK.union(Nk,pO,Uk,iO,Xk),[]),drawingRegion:u.gK.optional(RR,null),selectionArea:u.gK.optional(PR,{start:null,end:null})}).volatile((()=>({currentImage:void 0,supportSuggestions:!0}))).views((e=>({get store(){return(0,u.Zn)(e)},get multiImage(){return!!e.isMultiItem},get currentItemIndex(){return e.currentImage},get parsedValue(){return S(e.value,e.store.task.dataObj)},get parsedValueList(){return S(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,k.VS)(k.xS)||t&&"none"!==t?(0,k.VS)(k.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,k.VS)(k.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!==MR&&e.type!==KR&&e.type!==DR||(n=e)})),n},get controlButtonType(){const t=e.controlButton();return(0,u.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,k.VS)(k.aT)?e.naturalHeight*e.stageZoomX:Math.round(e.naturalHeight*e.stageZoomX),height:(0,k.VS)(k.aT)?e.naturalWidth*e.stageZoomY:Math.round(e.naturalWidth*e.stageZoomY)}:{width:(0,k.VS)(k.aT)?e.naturalWidth*e.stageZoomX:Math.round(e.naturalWidth*e.stageZoomX),height:(0,k.VS)(k.aT)?e.naturalHeight*e.stageZoomY:Math.round(e.naturalHeight*e.stageZoomY)}},get alignmentOffset(){const t={x:0,y:0};if((0,k.VS)(k.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=OR.getInstance({name:e.name}),n={manager:t,control:e,object:e};return{afterAttach:function(){e.selectioncontrol&&t.addTool("MoveTool",CR.create({},n)),e.zoomcontrol&&t.addTool("ZoomPanTool",lR.create({},n)),e.brightnesscontrol&&t.addTool("BrightnessTool",mR.create({},n)),e.contrastcontrol&&t.addTool("ContrastTool",vR.create({},n)),e.rotatecontrol&&t.addTool("RotateTool",uR.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,k.VS)(k.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:R(),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,u.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,k.VS)(k.F2)&&e.preloadImages())},preloadImages(){if(e.currentImageEntity.setImageLoaded(!1),e.currentImageEntity.preload(),e.multiImage){const[t,n]=[e.currentImage,e.imageEntities.length],r=(0,x.clamp)(t-3,0,t),o=(0,x.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,x.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,k.VS)(k.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,x.clamp)(t,i,0),e.zoomingPositionY=(0,x.clamp)(n,a,0)},resetZoomPositionToCenter(){const{stageComponentSize:t,zoomScale:n}=e,{width:r,height:o}=t,[i,a]=(0,k.VS)(k.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,k.VS)(k.aT)?e.naturalWidth*e.stageZoom:Math.round(e.naturalWidth*e.stageZoom),e.stageHeight=(0,k.VS)(k.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,k.VS)(k.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)}}))),VR=u.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,k.VS)(k.MV)?e.stageWidth/e.stageHeight:1},canvasToInternalX:t=>t/e.stageWidth*tt,canvasToInternalY:t=>t/e.stageHeight*nt,internalToCanvasX:t=>t/tt*e.stageWidth,internalToCanvasY:t=>t/nt*e.stageHeight}))),zR=VR.views((()=>({canvasToInternalX:e=>e,canvasToInternalY:e=>e,internalToCanvasX:e=>e,internalToCanvasY:e=>e}))),BR=u.gK.compose("ImageModel",LR,On,...(0,k.VS)(k.gF)?[IR]:[],Ne,Be,AR,NR,(0,k.VS)(k.MV)?VR:zR),HR=(0,v.WQ)("store")(fk);b.addTag("image",BR,HR),b.addObjectType(BR);var FR=n(7976),WR=n.n(FR);const $R=u.gK.model().views((()=>({}))).actions((e=>({updateSpansColor(t,n){e._spans&&e._spans.forEach((e=>{t&&(e.style.backgroundColor=t),n&&(e.style.backgroundColor=un.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,Ae.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||N.l).fillcolor;return t&&(t=un.Colors.convertToRGBA(t,.3)),t},applyCSSClass(t){if(!t)return;const n=["htx-highlight","htx-highlight-last"],r=(0,u.Zn)(e).settings;if(e.parent.showlabels||r.showLabels){var o;const r=null==(o=e.labeling)?void 0:o.mainValue,i=un.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=N.A.LINKING_MODE_CURSOR,n.stopPropagation()):t.style.cursor=N.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=N.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=N.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=N.A.DEFAULT_CURSOR}))):e.updateAppearenceFromState(),null==t||t.stopPropagation()},find:t=>e._spans&&e._spans.indexOf(t)>=0?e:void 0}))),UR=u.gK.model("LabelMixin"),ZR=u.gK.model().volatile((()=>({isSeparated:!1}))).views((e=>({get tiedChildren(){return K.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,x.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,x.isDefined)(t)||e.value===t||!(0,x.isDefined)(e.value)&&!(0,x.isDefined)(t))),get emptyLabel(){return e.allowempty?e.findLabel(null):null}}))).actions((e=>({unselectAll(){e.tiedChildren.forEach((e=>e.setSelected(!1)))},checkMaxUsages(){if((0,k.VS)(k.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)}}}))),GR=ZR,YR=u.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,u.Zn)(e);e.children=null!=(o=e.children)?o:[],(0,u.Ze)(i),t(n,r,e),(0,u.yQ)(i)},updateValue(t){setTimeout((()=>{e.updateDynamicChildren(t)}))},updateDynamicChildren(t){if(!0!==e.locked){var n;const r=S(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)}}}})),XR=u.gK.compose(Ue,YR),qR=u.gK.model(Object.assign({},(0,k.VS)(k.cE)?{id:u.gK.identifier,name:u.gK.string}:{name:u.gK.identifier},{smart:!0,smartonly:!1,isControlTag:!0})).volatile((()=>({snapMode:rt}))).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,u.Zn)(e))?void 0:r.autoAnnotation)&&n&&o||e.smartonly||!1}}))),JR=u.gK.compose(qR,jn),QR=["className","style","color","empty","hidden","selected","margins","onClick","children","hotkey"],eE=m.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,nr.A)(e,QR);const g=(0,m.useMemo)((()=>{if(!o)return null;const e=Ct()(o).alpha(.15);return Object.assign({},null!=r?r:{},dn({color:o,background:e}))}),[o]);return(0,E.jsxs)(Qe.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,E.jsx)(Qe.Sl,{tag:"span",name:"text",children:d}),u?(0,E.jsx)(Qe.Sl,{tag:"span",name:"hotkey",children:u}):null]}))})),tE=u.gK.model("AnnotationMixin",{parentTypes:De.tagsTypes([])}).views((e=>({get parent(){return De.getParentTagOfTypeString(e,e.parentTypes)}}))),nE=u.gK.model(Object.assign({value:u.gK.maybeNull(u.gK.string),selected:u.gK.optional(u.gK.boolean,!1),maxusages:u.gK.maybeNull(u.gK.string),alias:u.gK.maybeNull(u.gK.string),hint:u.gK.maybeNull(u.gK.string),hotkey:u.gK.maybeNull(u.gK.string),showalias:u.gK.optional(u.gK.boolean,!1),aliasstyle:u.gK.optional(u.gK.string,"opacity: 0.6"),size:u.gK.optional(u.gK.string,"medium"),background:u.gK.optional(Ie.color,N.A.LABEL_BACKGROUND),selectedcolor:u.gK.optional(Ie.color,"#ffffff"),granularity:u.gK.maybeNull(u.gK.enumeration(["symbol","word","sentence","paragraph"])),groupcancontain:u.gK.maybeNull(u.gK.string)},(0,k.VS)(k.bT)?{html:u.gK.maybeNull(u.gK.string)}:{})),rE=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"label",visible:u.gK.optional(u.gK.boolean,!0),_value:u.gK.optional(u.gK.string,""),parentTypes:De.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 Sn.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=OR.getInstance({name:e.parent.toname}),n=Object.values((null==(i=e.parent)?void 0:i.tools)||{})[0],o=t.findSelectedTool(),l=!(!n||!o)&&(0,u.Pw)(o).name===(0,u.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===N.A.LABEL_BACKGROUND&&(e.background=WR().make_color({seed:t})[0])},afterCreate(){e._updateBackgroundColor(e._value||e.value)},updateValue(t){e._value=S(e.value,t.task.dataObj)||N.A.EMPTY_LABEL}}))),oE=u.gK.compose("LabelModel",tE,nE,Ue,rE,Ne),iE=(0,v.WQ)("store")((0,v.PA)((({item:e,store:t})=>{const n=(t.settings.enableTooltips||t.settings.enableLabelTooltips)&&t.settings.enableHotkeys&&e.hotkey,r=(0,E.jsxs)(eE,{color:e.background,margins:!0,empty:e.isEmpty,hotkey:n,hidden:!e.visible,selected:e.selected,onClick:e.onClick,children:[e.html?(0,E.jsx)("div",{title:e._value,dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(e.html)}}):e._value,!0===e.showalias&&e.alias&&(0,E.jsxs)("span",{style:un.styleToProp(e.aliasstyle),children:[" ",e.alias]})]});return e.hint?(0,E.jsx)(hr,{title:e.hint,children:r}):r})));b.addTag("label",oE,iE);const aE=u.gK.model({toname:u.gK.maybeNull(u.gK.string),choice:u.gK.optional(u.gK.enumeration(["single","multiple"]),"single"),maxusages:u.gK.maybeNull(u.gK.string),showinline:u.gK.optional(u.gK.boolean,!0),groupdepth:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.2"),fillcolor:u.gK.optional(Ie.color,"#f48a42"),strokewidth:u.gK.optional(u.gK.string,"1"),strokecolor:u.gK.optional(Ie.color,"#f48a42"),fillopacity:u.gK.maybeNull(Ie.range()),allowempty:u.gK.optional(u.gK.boolean,!1),value:u.gK.optional(u.gK.string,"")}),sE=u.gK.model({pid:u.gK.optional(u.gK.string,R),type:"labels",children:De.unionArray(["label","header","view","text","hypertext","richtext"]),visible:u.gK.optional(u.gK.boolean,!0)}),lE=UR.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:N.l.fillcolor};e.children?e.children.unshift(n):e.children=(0,u.wg)([n]),t=e.children[0]}t.setEmpty()}}}))),cE=u.gK.compose("LabelsModel",JR,sE,aE,Ne,XR,lE,GR.props({_child:"LabelModel"})),dE=(0,v.PA)((({item:e})=>(0,E.jsx)(Qe.eB,{name:"labels",mod:{hidden:!e.visible,inline:e.showinline},children:K.renderChildren(e,e.annotation)})));b.addTag("labels",cE,dE);const uE=u.gK.model("ParagraphLabelsModel",{pid:u.gK.optional(u.gK.string,R),type:"paragraphlabels",children:De.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}}))),hE=UR.props({_type:"paragraphlabels"}),gE=u.gK.compose(JR,cE,uE,hE,GR.props({_child:"LabelModel"})),mE=u.gK.compose("ParagraphLabelsModel",gE),pE=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("paragraphlabels",mE,pE);var fE=n(92806),vE=n(47956),yE=n(33250),bE=function(e){return e[e.inertial=0]="inertial",e[e.instant=1]="instant",e}(bE||{});const xE=500,wE=u.gK.model({leadTime:0}).volatile((()=>({leadTimeLogic:bE.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+xE}}))).actions((e=>({countTime(){e.leadTimeLogic===bE.inertial?e._countTimeInertial():e.leadTimeLogic===bE.instant&&e._countTimeInstant()},resetLeadTimeCounters(){e.lastRecordedTime=0,e.debouncedTime=0}}))),CE=u.gK.model({peritem:u.gK.optional(u.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})}}))),SE=CE,jE=u.gK.model({required:u.gK.optional(u.gK.boolean,!1),requiredmessage:u.gK.maybeNull(u.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,k.VS)(k.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,u.PA)(e,2))?void 0:r.isVisible))return e.requiredModal(),!1}return!0}}})),kE=jE,OE="lsf-mark",RE="lsf-selected",EE="lsf-highlighted",_E="lsf-relation";var AE=n(6757),TE=n(39984);const PE={input:"input--GGvVi",editing:"editing--TQ89C",enter:"enter--FWKNX",delete:"delete--hGoXe"},IE=["className","rows","onlyEdit","name","onFocus","onChange","onDelete","isEditable","isDeleteable","ignoreShortcuts"],LE=["onChange","onDelete","isEditable","isDeleteable","text","ignoreShortcuts","onlyEdit"],{Paragraph:ME}=AE.A;class KE extends m.Component{constructor(...e){super(...e),this.state={editing:!1,height:0,value:this.props.text},this.textRef=m.createRef(),this.inputRef=m.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=zn()((()=>{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,nr.A)(e,IE),{height:l,value:c}=this.state,d={name:o,className:`ant-input ${PE.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,E.jsxs)(ME,Object.assign({},s,{className:`${t} ant-typography-edit-content ${PE.editing}`,children:[n>1?(0,E.jsx)("textarea",Object.assign({},d)):(0,E.jsx)("input",Object.assign({},d)),!r&&(0,E.jsx)(hr,{title:"Save: [shift+enter]",children:(0,E.jsx)(TE.A,{className:`ant-typography-edit-content-confirm ${PE.enter}`,onClick:this.save})})]}))}renderView(){const e=this.props,{onChange:t,onDelete:n,isEditable:r,isDeleteable:o,text:i}=e,a=(0,nr.A)(e,LE);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ME,Object.assign({},a,{children:(0,E.jsx)("span",{ref:this.textRef,children:i})})),r&&t&&(0,E.jsx)(Qa,{type:"text",className:PE.button,tooltip:"Edit",tooltipTheme:"Dark",style:{padding:0},icon:(0,E.jsx)(hy,{}),"aria-label":"Edit Region",onClick:this.startEditing}),o&&n&&(0,E.jsx)(Qa,{type:"text",look:"danger",className:PE.button,tooltip:"Delete",tooltipTheme:"Dark",style:{padding:0},icon:(0,E.jsx)(xf,{}),"aria-label":"Delete Region",onClick:n})]})}render(){return(this.state.editing||this.props.onlyEdit)&&this.props.isEditable?this.renderEdit():this.renderView()}}const DE=u.gK.model("TextAreaRegionModel",{id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"textarearegion",_value:u.gK.string}).volatile((()=>({classification:!0,perRegionTags:[],results:[],selected:!1}))).views((e=>({get parent(){return(0,u.k2)(e,GE)},getRegionElement:()=>document.querySelector(`#TextAreaRegion-${e.id}`),getOneColor:()=>null}))).actions((e=>({setValue(t){(!(0,k.VS)(k.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}}))),NE=u.gK.compose("TextAreaRegionModel",ut,Xe,DE),VE=(0,v.PA)((({item:e,onFocus:t})=>{var n;const r=[OE],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(_E),e.selected?r.push(RE):e.highlighted&&r.push(EE),(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,E.jsx)("div",Object.assign({},c,{className:(0,Qe.cn)("row").toString(),"data-testid":"textarea-region",children:(0,E.jsx)(KE,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}))}))}));b.addTag("textarearegion",NE,VE);const zE=u.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:m.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))},getRegionElement:()=>e.elementRef.current}))).actions((e=>({validate:()=>e.perregion?e._validatePerRegion():e.peritem&&(0,k.VS)(k.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:BE}=yE.A,HE=(0,m.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,m.useState)(null!=t?t:"");(0,k.VS)(k.q_)&&(0,m.useEffect)((()=>{t!==u&&h(t)}),[t]);const g=(0,m.useMemo)((()=>{var e;return l?null!=(e=(null!=t?t:"").split(/\n/)[0])?e:"":(0,k.VS)(k.q_)?u:t}),[t,l,...(0,k.VS)(k.q_)?[u]:[]]),p=(0,k.VS)(k.q_)?(0,m.useCallback)((e=>{h(e.target.value)}),[]):t=>{l||r(e,t.target.value)},f=(0,m.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 ${PE.input}`,value:g,autoSize:d?{minRows:1}:null,onChange:p,readOnly:n||l,onFocus:i};return(0,k.VS)(k.q_)&&(v.onBlur=f),((0,k.VS)(k.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,E.jsxs)(Qe.Sl,{name:"item",children:[(0,E.jsx)(Qe.Sl,Object.assign({name:"input",tag:d?BE:yE.A},v,{ref:c})),!l&&!n&&(0,E.jsx)(Qe.Sl,{name:"action","aria-label":"Delete Region",tag:fE.default,icon:(0,E.jsx)(Ps,{}),size:"small",type:"text",onClick:()=>{o(e)}})]})})),FE=(0,v.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,m.useCallback)(((t,n)=>{if(e.from_name.isReadOnly())return;const r=i.toJSON();r.splice(t,1,n),e.setValue(r)}),[i]),l=(0,m.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,E.jsx)(HE,{idx:c,value:i,readOnly:!a,onChange:s,onDelete:l,control:t,ref:0===c?n:null,onFocus:r,collapsed:o,validate:(0,k.VS)(k.q_)?e.from_name.validateText:null},c)))})),WE=(0,v.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,h=t.isCompleted&&t.perRegionFocusTarget===e&&t.perRegionFocusRequest,g=d?e._value:"",p=t.results.find((t=>t.from_name===e)),f=(0,m.useCallback)((()=>{n&&(r(!1),t.isSelected||t.annotation.selectArea(t))}),[n]),v=(0,m.useCallback)((()=>{p?(e.addTextToResult(e._value,p),e.setValue("")):(e.addText(e._value),e.setValue(""))}),[e,p]),y=(0,m.useRef)(),b=(0,m.useRef)(),x=(0,m.useRef)(0),w=(0,m.useMemo)((()=>i?{"--border-color":i}:{}),[i]);(0,m.useEffect)((()=>{var e;d&&h&&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=(!p||!(null!=p&&null!=(s=p.mainValue)&&s.length)||e.maxsubmissions&&p.mainValue.length(e.allowsubmit&&e._value&&!e.annotation.isReadOnly()&&v(),!1),onClick:e=>{e.stopPropagation()},children:(0,E.jsx)(Qe.Sl,Object.assign({name:"input",tag:c?BE:yE.A},C,{onClick:e=>{e.stopPropagation()}}))})]}):null}));b.addPerRegionView("textarea",mt.REGION_LIST,WE);const{TextArea:$E}=yE.A,UE=u.gK.model(Object.assign({toname:u.gK.maybeNull(u.gK.string),allowsubmit:u.gK.optional(u.gK.boolean,!0),label:u.gK.optional(u.gK.string,""),value:u.gK.maybeNull(u.gK.string),rows:u.gK.optional(u.gK.string,"1"),showsubmitbutton:u.gK.maybeNull(u.gK.boolean),placeholder:u.gK.maybeNull(u.gK.string),maxsubmissions:u.gK.maybeNull(u.gK.string),editable:u.gK.optional(u.gK.boolean,!1),transcription:!1},(0,k.VS)(k.eB)?{skipduplicates:u.gK.optional(u.gK.boolean,!1)}:{})),ZE=u.gK.model({type:"textarea",regions:u.gK.array(NE),_value:u.gK.optional(u.gK.string,""),children:De.unionArray(["shortcut"])}).volatile((()=>({focusable:!0,textareaRef:(0,m.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,k.VS)(k.y8)?{}:{countTime:()=>{}})).actions((e=>{let t=null,n=null;const r=(t,n)=>!!(t&&n&&(0,u._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(){Sn.warning(e.requiredmessage||`Input for the textarea "${e.name}" is required.`)},uniqueModal(){Sn.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,u.zr)(t),e.onChange(t))},perRegionCleanup(){e.regions=[]},createRegion(t,n,r){const o=NE.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,k.VS)(k.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,k.VS)(k.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,u.zr)(e)},onShortcut(o){if(!r(t,n)){if(!(0,k.VS)(k.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()}}})),GE=u.gK.compose("TextAreaModel",JR,zE,UE,...(0,k.VS)(k.y8)?[wE]:[],Ue,kE,ft,...(0,k.VS)(k.gF)?[SE]:[],Ne,qe,ZE),YE=(0,v.PA)((({item:e})=>{var t;const n=Number.parseInt(e.rows),r=(0,m.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,Qe.cn)("text-area").toClassName();return a&&(s.marginBottom=0),i.marginTop="4px",e.displaymode===mt.TAG?(0,E.jsxs)("div",{className:l,style:i,ref:e.elementRef,children:[K.renderChildren(e,e.annotation),e.showSubmit&&(0,E.jsx)(vE.A,{onFinish:()=>(e.allowsubmit&&e._value&&!e.annotation.isReadOnly()&&(e.addText(e._value),e.setValue("")),!1),children:(0,E.jsxs)(vE.A.Item,{style:s,children:[1===n?(0,E.jsx)(yE.A,Object.assign({},o,{"aria-label":"TextArea Input"})):(0,E.jsx)($E,Object.assign({},o,{"aria-label":"TextArea Input"})),a&&(0,E.jsx)(vE.A.Item,{children:(0,E.jsx)(fE.default,{style:{marginTop:"10px"},type:"primary",htmlType:"submit",children:"Add"})})]})}),e.regions.length>0&&(0,E.jsx)("div",{style:{marginBottom:"1em"},children:e.regions.map((e=>(0,E.jsx)(VE,{item:e,onFocus:r},e.id)))})]}):null}));b.addTag("textarea",GE,YE);const XE=u.gK.model({visiblewhen:u.gK.maybeNull(u.gK.string),whentagname:u.gK.maybeNull(u.gK.string),whenchoicevalue:u.gK.maybeNull(u.gK.string),whenlabelvalue:u.gK.maybeNull(u.gK.string)}).views((e=>({get isVisible(){var t;if(!1===(null==(t=(0,u.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}}))),qE=XE;var JE=n(51129),QE=n(84779);var e_=n(94714),t_=n(42197);const n_=(e=!1)=>{const[t,n]=(0,m.useState)(e),[r,o,i]=(0,m.useMemo)((()=>[n.bind(null,!0),n.bind(null,!1),()=>n((e=>!e))]),[]);return[t,r,o,i]};var r_=n(84392);const o_=e=>{let t=0,n=e.length;for(;n--;){t++;const r=e[n].children;r&&(t+=o_(r))}return t},i_=(e,t)=>({label:"",depth:t,path:e,isOpen:!0});let a_={};const s_=({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,m.useState)(),[p,f]=(0,m.useState)({}),[v,y]=(0,m.useState)(0),[b,x]=(0,m.useState)(i),w=(0,m.useRef)(),C=(0,m.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})())},O=t=>{const n=l?{[t]:2!==p[t]?2:1}:{[t]:1!==p[t]?1:2};f(Object.assign({},p,n)),g(A({items:e,toggleItem:n})),y(.01*o*u),a_={},w.current.resetAfterIndex(0)},R=t=>{c&&(g(A(t?{items:e,addInsideId:t}:{items:e})),j())},_=({data:e,index:t,rowStyle:n,rowComponent:o})=>{const i=e(t),s=(0,m.useCallback)((e=>{const n=`${t}`,o=(null==S?void 0:S.offsetWidth)-(null==S?void 0:S.clientWidth)||0,i=((0,k.VS)(k.c0)?e.scrollWidth:e.offsetWidth)+o+5,s=e.scrollHeight;b{const i=[];for(let a=0;a{g(A({items:e}))}),[e]),(0,m.useEffect)((()=>{0===(null==h?void 0:h.length)&&j()}),[h]),(0,E.jsx)("div",{ref:C,children:(0,E.jsx)(r_._m,{ref:w,height:v+4,itemCount:(null==h?void 0:h.length)||0,itemSize:e=>a_[`${e}`]||r,width:b,itemData:e=>({row:h&&h[e],toggle:O,addInside:R}),children:({data:e,index:n,style:r})=>(0,E.jsx)(_,{data:e,rowStyle:r,index:n,rowComponent:t})})})},l_={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"},c_=["title","wrapper","children"],d_=m.createContext([[],()=>{}]),u_=m.createContext({}),h_=({onAddLabel:e,onFinish:t,path:n})=>{const r=(0,m.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,m.useEffect)((()=>{var e;return null==(e=r.current)?void 0:e.focus()}),[]),(0,E.jsx)("div",{className:l_.taxonomy__newitem,children:(0,E.jsx)("input",{name:"taxonomy__add",onKeyDownCapture:o,onBlur:o,ref:r})})},g_=({isEditable:e,flatItems:t})=>{const[n,r]=(0,m.useContext)(d_),{showFullPath:o,pathSeparator:i=" / "}=(0,m.useContext)(u_),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,E.jsx)("div",{className:["htx-taxonomy-selected",l_.taxonomy__selected].join(" "),children:a.map(((t,a)=>(0,E.jsxs)("div",{children:[(0,E.jsx)("span",{children:o?t.join(i):t[t.length-1]}),e?(0,E.jsx)("input",{type:"button",onClick:()=>r(n[a],!1),value:"×"}):null]},t.join("|"))))})};const m_=e=>{let{title:t,wrapper:n,children:r}=e,o=(0,nr.A)(e,c_);const i=n?(0,E.jsx)(n,{children:r}):r;return t?(0,E.jsx)(hr,Object.assign({title:t,mouseEnterDelay:500},o,{children:i})):i},p_=({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:p},toggle:f,addInside:v}=t,[y,b]=(0,m.useContext)(d_),{leafsOnly:w,maxUsages:C,maxUsagesReached:S,onAddLabel:j,onDeleteLabel:O}=(0,m.useContext)(u_),R=y.some((e=>(0,x.isArraysEqual)(e,u))),_=y.some((e=>function(e,t){return!(e.length<=t.length)&&t.every(((t,n)=>e[n]===t))}(e,u))),A=w&&!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,m.useCallback)((e=>{e&&(e.indeterminate=!R&&_)}),[R,_]),K=(0,m.useCallback)((()=>{null==O||O(u),v()}),[t,O]),D="session"===t.row.origin?l_.taxonomy__item_session:"user"===t.row.origin?l_.taxonomy__item_user:"",N=""===d&&j,V=(0,m.useRef)(),z=r-h-(r-(null==(i=V.current)?void 0:i.parentElement.offsetWidth)||0)-90;return(0,m.useEffect)((()=>{const e=null==V?void 0:V.current;e&&(e.toggle=f,n(e))}),[]),(0,E.jsx)("div",{ref:V,style:Object.assign({paddingLeft:h,maxWidth:r},e,{width:"fit-content"}),children:N?(0,E.jsx)(h_,{onAddLabel:j,onFinish:()=>v(),path:u},""):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("div",{className:[l_.taxonomy__measure,!!(0,k.VS)(k.c0)&&l_.taxonomy__measure_ff_dev4075].filter(Boolean).join(" "),children:[(0,E.jsx)("label",{children:d}),(0,k.VS)(k.c0)&&!c&&(0,E.jsx)("div",{className:l_.taxonomy__extra,children:(0,E.jsx)("span",{className:l_.taxonomy__extra_count,children:l})})]}),(0,E.jsx)(m_,{title:p,children:(0,E.jsxs)("div",{className:[l_.taxonomy__item,D].join(" "),children:[(0,E.jsx)("div",{className:l_.taxonomy__grouping,onClick:()=>f(a),children:(0,E.jsx)(wc,{stroke:"#09f",style:I})}),(0,E.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,E.jsx)("label",{htmlFor:a,style:(0,k.VS)(k.c0)?{}:{maxWidth:`${z}px`},onClick:o?()=>A&&f(a):void 0,title:L,className:P?l_.taxonomy__collapsable:void 0,children:d}),!c&&(0,E.jsxs)("div",{className:l_.taxonomy__extra,children:[(0,E.jsx)("span",{className:l_.taxonomy__extra_count,children:l}),o&&j&&(0,E.jsx)("div",{className:l_.taxonomy__extra_actions,children:(0,E.jsx)(e_.A,{destroyPopupOnHide:!0,trigger:["click"],overlay:(0,E.jsxs)(t_.A,{children:[(0,E.jsx)(t_.A.Item,{className:l_.taxonomy__action,onClick:()=>{v(a)},children:"Add Inside"},"add-inside"),"session"===t.row.origin&&(0,E.jsx)(t_.A.Item,{className:l_.taxonomy__action,onClick:K,children:"Delete"},"delete")]}),children:(0,E.jsx)("div",{children:"..."})})})]})]})})]})})},f_=({show:e,flatten:t,items:n,dropdownRef:r,isEditable:o})=>{const i=(0,m.useRef)(null),[a,s]=(0,m.useState)(""),{onAddLabel:l,minWidth:c,maxWidth:d}=(0,m.useContext)(u_),[u,h,g]=n_(!1),p=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,m.useEffect)((()=>{const t=i.current;e&&t&&(t.value="",t.focus(),s(""))}),[e]);return(0,E.jsxs)("div",{className:l_.taxonomy__dropdown,ref:r,style:{display:e?"block":"none"},children:[(0,E.jsx)("input",{autoComplete:"off",className:l_.taxonomy__search,name:"taxonomy__search",placeholder:"Search...",onInput:e=>s(e.currentTarget.value.toLocaleLowerCase()),ref:i}),(0,E.jsx)(s_,{items:p,isEditable:o,rowComponent:p_,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,E.jsx)("div",{className:l_.taxonomy__add__container,children:u?(0,E.jsx)(h_,{path:[],onAddLabel:l,onFinish:g}):o?(0,E.jsx)("div",{className:l_.taxonomy__add,children:(0,E.jsx)("button",{type:"button",onClick:h,children:"Add"})}):null})]})},v_=({items:e,selected:t,onChange:n,onAddLabel:r,onDeleteLabel:o,options:i={},isEditable:a=!0})=>{const s=(0,m.useRef)(null),l=(0,m.useRef)(null),[c,d]=(0,m.useState)(!1),u=(0,m.useCallback)((()=>d(!1)),[]),h=(0,m.useCallback)((e=>{var t;const n=l_.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?l_.taxonomy_open:"",p=(0,m.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,m.useState)(t),y=(0,m.useMemo)((()=>[f,(e,t)=>{const r=t?[...f,e]:f.filter((t=>!(0,x.isArraysEqual)(t,e)));(!1!==i.canRemoveItems||r.length)&&(v(r),n&&n(null,r))}]),[f]),b=(0,m.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]),w=(0,m.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,m.useEffect)((()=>{v(t)}),[t]),(0,m.useEffect)((()=>(document.body.addEventListener("click",h,!0),document.body.addEventListener("keydown",w),()=>{document.body.removeEventListener("click",h),document.body.removeEventListener("keydown",w)})),[]),(0,E.jsx)(d_.Provider,{value:y,children:(0,E.jsxs)(u_.Provider,{value:b,children:[(0,E.jsx)(g_,{isEditable:a,flatItems:p}),(0,E.jsxs)("div",{className:["htx-taxonomy",l_.taxonomy,g].join(" "),ref:l,children:[(0,E.jsxs)("span",{onClick:()=>d((e=>!e)),children:[i.placeholder||"Click to add...",(0,E.jsx)(wc,{stroke:"#09f"})]}),(0,E.jsx)(f_,{show:c,isEditable:a,items:e,flatten:p,dropdownRef:s})]})]})})},y_=u.gK.model(Object.assign({},(0,k.VS)(k.cE)?{id:u.gK.identifier}:{},{selected:u.gK.optional(u.gK.boolean,!1),alias:u.gK.maybeNull(u.gK.string),value:u.gK.maybeNull(u.gK.string),hotkey:u.gK.maybeNull(u.gK.string),style:u.gK.maybeNull(u.gK.string),html:u.gK.maybeNull(u.gK.string),color:u.gK.maybeNull(u.gK.string),hint:u.gK.maybeNull(u.gK.string)})),b_=u.gK.model({type:"choice",visible:u.gK.optional(u.gK.boolean,!0),_value:u.gK.optional(u.gK.string,""),children:De.unionArray(["choice"]),parentTypes:De.tagsTypes(["Choices","Taxonomy"]),readonly:u.gK.optional(u.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 De.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()}:{}})),x_=u.gK.compose("ChoiceModel",tE,y_,Ue,b_,Ne),w_=(0,v.WQ)("store")((0,v.PA)((({item:e,store:t})=>{var n;let r={};e.style&&(r=K.cssConverter(e.style));const o=(t.settings.enableTooltips||t.settings.enableLabelTooltips)&&t.settings.enableHotkeys&&e.hotkey,i=(0,m.useCallback)((t=>{e.isReadOnly()||(e.toggleSelected(),t.nativeEvent.target.blur())}),[]),[a,s]=(0,m.useState)(!1),l=(0,m.useCallback)((()=>s((e=>!e))),[]);return(0,E.jsxs)(Qe.eB,{name:"choice",mod:{layout:e.parent.layout,leaf:e.isLeaf,notLeaf:!e.isLeaf,hidden:!e.visible},children:[(0,E.jsxs)(Qe.Sl,{name:"item",mod:{notLeaf:!e.isLeaf},style:r,children:[(0,E.jsx)(Qe.Sl,{name:"checkbox",component:(c=e.isCheckbox?QE.A:JE.Ay,d=e._value,e=>(0,E.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,E.jsxs)(m_,{title:e.hint,wrapper:"span",children:[e.html?(0,E.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(e.html)}}):e._value,o&&(0,E.jsxs)(gr,{children:["[",e.hotkey,"]"]})]})}),!e.isLeaf&&(0,E.jsx)(Qe.Sl,{name:"toggle",mod:{collapsed:a},component:fE.default,type:"text",onClick:l,children:(0,E.jsx)(wc,{})})]}),e.nestedResults&&null!=(n=e.children)&&n.length?(0,E.jsx)(Qe.Sl,{name:"children",mod:{collapsed:a},children:K.renderChildren(e,e.annotation)}):null]});var c,d})));b.addTag("choice",x_,w_);const C_=u.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,x.isDefined)(r)&&(0,x.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:S_}=er.A,j_=u.gK.model({toname:u.gK.maybeNull(u.gK.string),showinline:u.gK.maybeNull(u.gK.boolean),choice:u.gK.optional(u.gK.enumeration(["single","single-radio","multiple"]),"single"),layout:u.gK.optional(u.gK.enumeration(["select","inline","vertical"]),"vertical"),value:u.gK.optional(u.gK.string,""),allownested:u.gK.optional(u.gK.boolean,!1)}),k_=u.gK.model({pid:u.gK.optional(u.gK.string,R),visible:u.gK.optional(u.gK.boolean,!0),type:"choices",children:De.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(){Sn.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&&Sn.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})`)}}})),O_=u.gK.compose("ChoicesModel",JR,zE,GR.props({_child:"ChoiceModel"}),kE,ft,...(0,k.VS)(k.gF)?[SE]:[],qe,C_,qE,XR,Ne,j_,k_),R_=(0,v.PA)((({item:e})=>(0,E.jsx)(er.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,E.jsx)(S_,{value:e._value,children:(0,E.jsx)(m_,{title:e.hint,wrapper:"div",children:e._value})},e._value)))}))),E_=(0,v.PA)((({item:e})=>(0,E.jsx)(Qe.eB,{name:"choices",mod:{hidden:!e.isVisible||!e.perRegionVisible(),layout:e.layout},ref:e.elementRef,children:"select"===e.layout?(0,E.jsx)(R_,{item:e}):K.renderChildren(e,e.annotation)})));b.addTag("choices",O_,E_);var __=n(55454),A_=n(99811);const T_=u.gK.model({toname:u.gK.maybeNull(u.gK.string),maxrating:u.gK.optional(u.gK.string,"5"),icon:u.gK.optional(u.gK.string,"star"),size:u.gK.optional(u.gK.string,"medium"),defaultvalue:u.gK.optional(u.gK.string,"0"),hotkey:u.gK.maybeNull(u.gK.string)}),P_=u.gK.model({pid:u.gK.optional(u.gK.string,R),type:"rating",rating:u.gK.maybeNull(u.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(){Sn.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()}))),I_=u.gK.compose("RatingModel",JR,zE,kE,ft,...(0,k.VS)(k.gF)?[SE]:[],Ne,T_,P_),L_=(0,v.WQ)("store")((0,v.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,E.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,E.jsx)(__.A,{character:(0,E.jsx)(A_.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,E.jsxs)("sup",{style:{fontSize:"9px"},children:["[",e.hotkey,"]"]})]})})));b.addTag("rating",I_,L_);const M_=u.gK.model("ParagraphsRegionModel",{type:"textrange",object:u.gK.late((()=>u.gK.reference(F_))),startOffset:u.gK.integer,start:u.gK.string,endOffset:u.gK.integer,end:u.gK.string,states:u.gK.maybeNull(u.gK.array(u.gK.union(mE,GE,O_,I_)))}).volatile((()=>({text:"",hideable:!0}))).views((e=>({get parent(){return(0,u._n)(e)?e.object:null},getRegionElement(){var t;return null==(t=e._spans)?void 0:t[0]}}))).actions((e=>({beforeDestroy(){un.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}}))),K_=u.gK.compose("ParagraphsRegionModel",ut,bt,Xe,M_,$R);b.addRegionType(K_,"paragraphs");const D_={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"},N_=u.gK.model("ParagraphsModel",{value:u.gK.maybeNull(u.gK.string),valuetype:u.gK.optional(u.gK.enumeration(["json","url"]),(()=>window.LS_SECURE_MODE?"url":"json")),audiourl:u.gK.maybeNull(u.gK.string),showplayer:!1,highlightcolor:u.gK.maybeNull(u.gK.string),showlabels:u.gK.optional(u.gK.boolean,!1),layout:u.gK.optional(u.gK.enumeration(["none","dialogue"]),"none"),savetextresult:u.gK.optional(u.gK.enumeration(["none","no","yes"]),(()=>window.LS_SECURE_MODE?"no":"yes")),namekey:u.gK.optional(u.gK.string,"author"),textkey:u.gK.optional(u.gK.string,"text"),contextscroll:u.gK.optional(u.gK.boolean,!1)}),V_=u.gK.model("ParagraphsModel",{type:"paragraphs",_update:u.gK.optional(u.gK.number,1)}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,u.Zn)(e)},get audio(){if(!e.audiourl)return null;if("$"===e.audiourl[0]){const t=(0,u.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=WR().make_color({seed:n})[0];return(0,k.VS)(k.LG)?{phrase:{"--highlight-color":r,"--background-color":"#FFF"},name:{color:r},inactive:{phrase:{"--highlight-color":un.Colors.convertToRGBA(r,.4),"--background-color":"#FAFAFA"},name:{color:un.Colors.convertToRGBA(r,.9)}}}:{phrase:{backgroundColor:un.Colors.convertToRGBA(r,.25)}}}return{}},get layoutClasses(){return"dialogue"===e.layout?{phrase:D_.phrase,name:D_.dialoguename,text:D_.dialoguetext}:{phrase:D_.phrase,name:D_.name,text:D_.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,k.VS)(k.fw)||(!e.filterByAuthor.length||e.filterByAuthor.includes(t[e.namekey]))}))),z_=u.gK.model().volatile((()=>({_value:null,filterByAuthor:[],searchAuthor:"",playingId:-1,playing:!1,audioRef:(0,m.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,x.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,x.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}}))),B_=u.gK.model().actions((e=>({needsUpdate(){e._update=e._update+1},updateValue(t){const n=S(e.value,t.task.dataObj);if("url"===e.valuetype){const r=n;if(!(0,x.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([Mj.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=et.A.ERR_LOADING_HTTP({attr:e.value,error:String(n),url:r});t.annotationStore.addErrors([Mj.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([Mj.generalError(`${t}
    ${n.map((e=>`
  • ${e}
  • `)).join("")}
`)])}const r=(0,k.VS)(k.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=K_.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,k.VS)(k.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,k.VS)(k.Gd))return e.addRegions([t])[0];const n=(0,k.VS)(k.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}}))),H_=[ut,N_,Ye,On,Ne,V_,z_,B_].filter(Boolean),F_=u.gK.compose("ParagraphsModel",...H_);var W_=n(8009);const $_=m.createContext(null),U_=["animated","visible"];let Z_=1;const G_=(0,m.forwardRef)(((e,t)=>{var n;let{animated:r=!0,visible:o=!1}=e,i=(0,nr.A)(e,U_);const a=(0,Qe.cn)("dropdown"),s=(0,m.useRef)(),{triggerRef:l,minIndex:c}=null!=(n=(0,m.useContext)($_))?n:{},d=void 0===l,{children:u}=i,[g,p]=(0,m.useState)(o),[f,v]=(0,m.useState)({}),[y,b]=(0,m.useState)(o?"visible":null),x=(0,m.useCallback)((()=>{var e;const t=s.current,n=null!=(e=null==l?void 0:l.current)?e:t.parentNode,{left:r,top:o}=sr(n,t,i.alignment||"bottom-left");v({left:r,top:o})}),[l,c]),w=(0,m.useMemo)((()=>Z_++),[]),C=(0,m.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();ir(o,{transition:()=>{b(e?"appear":"disappear")},beforeTransition:()=>{b(e?"before-appear":"before-disappear")},afterTransition:()=>{b(e?"visible":null),n()}})}))}),[r]),S=(0,m.useCallback)((async(e,t)=>{const n=null!=e?e:!g;g!==n&&(null==i.onToggle||i.onToggle(n),await C(n,t),p(n))}),[g,C,i.onToggle]),j=(0,m.useCallback)((async e=>{await S(!1,e)}),[S]),O=(0,m.useCallback)((async e=>{await S(!0,e)}),[S]);ur({onEnterFullscreen:()=>j(!0),onExitFullscreen:()=>j(!0)},[]),(0,m.useEffect)((()=>{S(!1)}),[d]),(0,m.useEffect)((()=>{if(!t)return;const e={dropdown:s.current,visible:null!==y,toggle:S,open:O,close:j};t instanceof Function?t(e):t.current=e}),[j,O,t,S,s,y]),(0,m.useEffect)((()=>{p(o)}),[o]),(0,m.useEffect)((()=>{d||"before-appear"!==y||x()}),[y,x,d]),(0,m.useEffect)((()=>{!1===i.enabled&&C(!1)}),[i.enabled]),(0,m.useEffect)((()=>{o?O():j()}),[o]);const R=(0,m.useMemo)((()=>{const e=u;return e.props&&"Menu"===e.props.type?(0,m.cloneElement)(e,Object.assign({},e.props,{className:a.elem("menu").mix(e.props.className)})):u}),[u]),_=(0,m.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,m.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,E.jsx)(Qe.eB,{ref:s,name:"dropdown","data-testid":i.dataTestId,mix:[i.className,_],style:Object.assign({},A,{borderRadius:(0,k.VS)(k.bA)&&4}),onClick:e=>e.stopPropagation(),children:R});return!0===i.inline?T:(0,h.createPortal)(T,document.body)}));G_.displayName="Dropdown";const Y_=["tag","children","content","toggle","closeOnClickOutside","disabled"],X_=(0,m.forwardRef)(((e,t)=>{var n;let{tag:r,children:o,content:i,toggle:a,closeOnClickOutside:s=!0,disabled:l=!1}=e,c=(0,nr.A)(e,Y_);const d=null!=t?t:(0,m.useRef)(),u=m.Children.only(o),h=(0,m.useRef)(new Set),[g,p]=(0,m.useState)(1e3),f=(0,m.useRef)(null==u||null==(n=u.props)||null==(n=n.ref)?void 0:n.current),v=(0,m.useContext)($_),y=(0,m.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,m.useCallback)((e=>{var t;s&&(y(e.target)||null==(t=d.current)||null==t.close||t.close())}),[s,y]),x=(0,m.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,m.useMemo)((()=>Object.assign({},u.props,{tag:r,key:"dd-trigger",ref:e=>{var t;f.current=null!=(t=f.current)?t:e,f.current&&p(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,Qe.cn)("dropdown").elem("trigger").mix(c.className),onClickCapture:x})),[u,f,c.className,x]),C=(0,m.useMemo)((()=>(0,m.cloneElement)(u,w)),[u,w]),S=i?(0,E.jsx)(G_,Object.assign({},c,{ref:d,children:i})):null;(0,m.useEffect)((()=>(document.addEventListener("click",b,{capture:!0}),()=>document.removeEventListener("click",b,{capture:!0}))),[b]);const j=(0,m.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,m.useEffect)((()=>{if(v)return v.addChild(j),()=>v.removeChild(j)}),[]),(0,E.jsxs)($_.Provider,{value:j,children:[C,S]})})),q_=()=>(0,m.useContext)($_),J_=Object.assign(G_,{Trigger:X_}),Q_=(0,m.createContext)({multiple:!1,focused:!1,currentValue:[],setCurrentValue(){}}),{Block:eA,Elem:tA}=(0,Qe.JE)(),nA=(e,t)=>m.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=nA(e,t[0])):"Select.OptGroup"===o.displayName&&(n=nA(i.children,t)),n}),null),rA=({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,m.useRef)(),p=(0,m.useRef)(),[f,v]=(0,m.useState)(i?[].concat(null!=e?e:[]).flat(10):e),[y,b]=(0,m.useState)(),w=m.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,m.useMemo)((()=>{var e;if((0,k.VS)(k.fw)&&i&&a)return a(Array.isArray(f)?f:[f||""]);if(i&&Array.isArray(f)&&(null==f?void 0:f.length)>1)return(0,E.jsx)(E.Fragment,{children:"Multiple values selected"});const n=nA(r,null!=t?t:f),o=null==n||null==(e=n.props)?void 0:e.children;return o?(0,m.cloneElement)((0,E.jsx)(E.Fragment,{children:o})):null}),[f,t,r,e,a]),j=e=>{const t=w[null!=e?e:0];b(t.props.value)},O=(0,m.useCallback)((e=>{const t=w.findIndex((e=>e.props.value===y));let n=-1===t?0:t+e;n>=w.length?n=0:n<0&&(n=w.length-1),j(n)}),[y]);return(0,m.useEffect)((()=>{var t;i&&Array.isArray(e)&&Array.isArray(f)?!1===(0,W_.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,E.jsx)(Q_.Provider,{value:C,children:(0,E.jsx)(eA,{ref:p,name:"select",mod:{size:n,surface:c},style:o,tabIndex:u,onKeyDown:e=>{var t;document.activeElement===p.current&&(["ArrowDown","ArrowUp"].includes(e.key)?null!=g&&g.current.visible?O("ArrowDown"===e.key?1:-1):(null==(t=g.current)||t.open(),j()):"Space"!==e.code&&"Enter"!==e.code||!(0,x.isDefined)(y)||C.setCurrentValue(y))},children:(0,E.jsx)(J_.Trigger,{ref:g,className:(0,Qe.cn)("select",{elem:"dropdown",mod:{variant:l}}).toClassName(),content:(0,E.jsx)(tA,{name:"list",children:r}),onToggle:e=>{e||b(null)},children:(0,E.jsxs)(tA,{name:"selected","data-testid":d,children:[(0,E.jsx)(tA,{name:"value",children:null!=S?S:h}),(0,E.jsx)(tA,{name:"icon"})]})})})})};rA.displayName="Select";const oA=({value:e,children:t,style:n})=>{const{setCurrentValue:r,multiple:o,currentValue:i,focused:a}=(0,m.useContext)(Q_),s=(0,m.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,m.useMemo)((()=>String(e)===String(a)),[e,a]);return(0,E.jsx)(tA,{name:"option",mod:{selected:s,focused:l},onClick:t=>{t.stopPropagation(),r(e)},style:n,children:t})};oA.displayName="Select.Option";const iA=({label:e,children:t,style:n})=>(0,E.jsxs)(tA,{name:"optgroup",style:n,children:[(0,E.jsx)(tA,{name:"optgroup-label",children:e}),(0,E.jsx)(tA,{name:"optgroup-list",children:t})]});iA.displayName="Select.OptGroup",rA.Option=oA,rA.OptGroup=iA;const aA=({name:e,selected:t})=>{const n={border:`2px solid ${un.Colors.convertToRGBA(WR().make_color({seed:e})[0])}`};return(0,E.jsx)("span",{className:[D_.authorFilter__select__item,t&&D_.authorFilter__select__item_selected].join(" "),style:n,children:e})},sA=e=>0===e.length?null:(0,E.jsx)("div",{className:D_.authorFilter__select,children:e.map((e=>(0,E.jsx)(aA,{name:e},e)))}),lA=(0,v.PA)((({item:e,onChange:t})=>{const n=(0,m.useMemo)((()=>(0,E.jsx)("span",{className:D_.authorFilter__placeholder,children:"Show all authors"})),[]),r=e.filterByAuthor,o=(0,m.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,m.useCallback)((n=>{!n||null!=n&&n.includes(null)?e.setAuthorFilter([]):e.setAuthorFilter(n),null==t||t()}),[e.setAuthorFilter]);return(0,E.jsx)("div",{className:D_.authorFilter,children:(0,E.jsxs)(rA,{placeholder:n,value:r,options:o,onChange:a,renderMultipleSelected:sA,size:"compact",variant:"rounded",surface:"emphasis",multiple:!0,children:[(0,E.jsx)("div",{className:D_.authorFilter__search,children:(0,E.jsx)("input",{autoComplete:"off",className:D_.authorFilter__search__input,name:"search_author",placeholder:"Search",onInput:t=>e.setAuthorSearch(t.target.value)})}),(0,E.jsx)(rA.Option,{value:null,exclude:!0,children:(0,E.jsx)("span",{className:D_.authorFilter__showall,children:"Show all authors"})},"showAllAuthors"),i.map((e=>(0,E.jsx)(rA.Option,{value:e,children:(0,E.jsx)(aA,{name:e,selected:!1})},e)))]})})})),cA=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")}`},dA=(0,v.PA)((({item:e,playingId:t,activeRef:n,setIsInViewport:r})=>{const[o,i]=(0,m.useState)(null),[a,s]=(0,m.useState)(0),[l,c]=(0,m.useState)(null),d=e.layoutClasses,h=!!e.audio;let g;const p=(0,m.useCallback)(((t,n,r,o=!0)=>{if(!t||!(0,k.VS)(k.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,m.useCallback)((r=>{var o,i,s,l,d,u,h,g;if(!(0,k.VS)(k.LG)||!e.contextscroll)return;const m=(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/m;v>0&&v<100?p(null==(g=n.current)?void 0:g.querySelector(".reading-line"),v,f,a.playing):c(r)}),[a,t]),v=(0,m.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)||p(n,0,s,e.playing),g=new IntersectionObserver((e=>{r(e[0].isIntersecting)}),{rootMargin:"0px"}),g.observe(n)}}),[t]);if((0,m.useEffect)((()=>{var t;if((0,k.VS)(k.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,m.useEffect)((()=>{f(!0)}),[a]),(0,m.useEffect)((()=>{l&&f(!1)}),[t]),(0,m.useEffect)((()=>{(0,k.VS)(k.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,k.VS)(k.LG)&&!a?e.layoutStyles(o).inactive:e.layoutStyles(o),c=[d.phrase],g=e.isVisibleForAuthorFilter(o);return h&&c.push(D_.withAudio),g||c.push(D_.collapsed),(0,u.Zn)(e).settings.showLineNumbers&&c.push(D_.numbered),(0,E.jsxs)("div",{ref:a?n:null,"data-testid":`phrase:${i}`,className:`${c.join(" ")} ${(0,k.VS)(k.LG)&&D_.newUI}`,style:null==l?void 0:l.phrase,children:[g&&h&&!isNaN(o.start)&&(0,E.jsx)(Tr.A,{type:"text",className:(0,k.VS)(k.LG)?D_.playNewUi:D_.play,"aria-label":s?"pause":"play",icon:s?(0,k.VS)(k.LG)?(0,E.jsx)(du,{}):(0,E.jsx)(Pr.A,{}):(0,k.VS)(k.LG)?(0,E.jsx)(ru,{}):(0,E.jsx)(Ir.A,{}),onClick:()=>{r(!0),e.play(i)}}),(0,k.VS)(k.LG)?(0,E.jsxs)("span",{className:D_.titleWrapper,"data-skip-node":"true",children:[(0,E.jsx)("span",{className:null==d?void 0:d.name,style:null==l?void 0:l.name,children:o[e.namekey]}),(0,E.jsx)("span",{className:D_.time,children:(e=>{var t,n,r,o,a;return`${cA(null==(t=e._value[i])?void 0:t.start)} - ${cA(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,E.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,k.VS)(k.LG)?(0,E.jsxs)("span",{className:D_.wrapperText,children:[a&&(0,E.jsx)("span",{ref:v,className:`${D_.readingLine} reading-line`,"data-skip-node":"true"}),(0,E.jsx)("span",{className:`${null==d?void 0:d.text}`,children:o[e.textkey]})]}):(0,E.jsx)("span",{className:`${null==d?void 0:d.text}`,children:o[e.textkey]})]},`${e.name}-${i}`)}))})),uA=["className","label","labelProps","description","checked","defaultChecked","onChange","required","style"],hA=(0,m.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,nr.A)(e,uA);const g=(0,Qe.cn)("toggle"),p=(0,m.useMemo)((()=>{var e;return null!=(e=null!=l?l:s)&&e}),[l,s]),[f,v]=(0,m.useState)(null!=(n=null!=l?l:s)&&n),y={};(0,m.useEffect)((()=>{v(p)}),[p]),f&&(y.checked=f),y.disabled=h.disabled;const b=(0,E.jsxs)(Qe.eB,{name:"toggle",className:r,mod:y,style:u,children:[(0,E.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,E.jsx)(Qe.Sl,{tag:"span",name:"indicator"})]});return o?(0,E.jsx)(wC,Object.assign({ref:t,placement:"right",required:d,text:o,children:b,description:a},null!=i?i:{})):b})),gA={};(0,k.VS)(k.xS)&&(gA.crossOrigin="anonymous");class mA extends m.Component{constructor(e){super(e),this._regionSpanSelector=".htx-highlight",this.mainContentSelector=`.${(0,Qe.cn)("main-content").toClassName()}`,this.mainViewAnnotationSelector=`.${(0,Qe.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)&&cn(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,Ae.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,k.VS)(k.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,Ae.findNodeAt)(a,l)),i.setEnd(...(0,Ae.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,Ae.findNodeAt)(a,l)),i.setEnd(...(0,Ae.findNodeAt)(s,c)),n.fixOffsets(l,c)}}else!n.text&&i.toString()&&n.setText(this._getResultText(+n.start,+n.end,l,c));(0,Ae.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,k.VS)(k.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,k.VS)(k.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,E.jsxs)("div",{className:D_.wrapper_header,children:[(0,k.VS)(k.fw)&&(0,E.jsx)(lA,{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,E.jsxs)("div",{className:D_.wrapper_header__buttons,children:[(0,E.jsx)(hA,{"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,E.jsx)(hr,{placement:"topLeft",title:"Automatically sync transcript scrolling with audio playback",children:(0,E.jsx)(fu,{})})]})]})}render(){const{item:e}=this.props,t=!!e.audio,n=(0,k.VS)(k.LG)&&this.props.item.contextscroll;return!e.playing&&(0,k.VS)(k.LG)&&this._disposeTimeout(),(0,k.VS)(k.fw)&&!e._value?null:(0,E.jsxs)(Kn,{item:e,className:(0,Qe.cn)("paragraphs").toClassName(),children:[t&&(0,E.jsx)("audio",Object.assign({},gA,{controls:e.showplayer&&!e.syncedAudio,className:D_.audio,src:e.audio,ref:e.audioRef,onLoadedMetadata:e.handleAudioLoaded,onEnded:e.reset,onError:e.handleError,onCanPlay:e.handleCanPlay})),(0,k.VS)(k.LG)?this.renderWrapperHeader():(0,k.VS)(k.fw)&&(0,E.jsx)(lA,{item:e}),(0,E.jsx)("div",{ref:this.myRef,"data-testid":"phrases-wrapper","data-update":e._update,className:n?D_.scroll_container:D_.container,onMouseUp:this.onMouseUp.bind(this),children:(0,E.jsx)(dA,Object.assign({setIsInViewport:this.setIsInViewPort.bind(this),item:e,playingId:e.playingId},(0,k.VS)(k.LG)?{activeRef:this.activeRef}:{}))})]})}}const pA=(0,v.WQ)("store")((0,v.PA)(mA));b.addTag("paragraphs",F_,pA),b.addObjectType(F_);class fA{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 fA(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 yA(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 vA{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 yA?n.findTextElement(e,t):n instanceof fA?n:void 0}findElementByNode(e){for(const t of this.children){if(t.node===e)return t;if(t instanceof yA){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 yA(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 fA;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 yA)).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 yA&&(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 fA&&(0===t.length||t[t.length-1].node.nextSibling===e.node)?t.push(e):(r(),n.push(e));r(),this.children=n}}class yA extends vA{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 bA extends vA{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 fA(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 xA{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 wA{constructor(){this.elements=[],this.endPos=void 0,this.displayedText="",this.displayedTextPos=0,this.endPos=0}createDynamicBlock(e){const{endPos:t}=this,n=new bA(t,e);return this.elements.push(n),n}setDisplayedText(e){this.displayedText=e}addStaticElement(e,t){this.elements.push(new xA(e,this.endPos,t.toString()))}addExtraText(e){let t=this.elements.length-1;for(;!(this.elements[t]instanceof bA)&&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 xA||this.elements[t+1]instanceof bA);)if(t++,t>=this.elements.length-1)return;return this.elements[t+1]}getEndOf(e){if(e instanceof yA||e instanceof fA)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 xA){if(t.node===e)return t}else if(t instanceof bA){const n=t.findElementByNode(e);if(n)return n}}findTextBlock(e,t="start"){const n=this.elements.find((n=>n instanceof bA&&n.start<=e&&n.end>=e&&n[t]!==e));return(0,x.isDefined)(n),n}indexOfTextBlock(e,t="start"){return this.elements.findIndex((n=>n instanceof bA&&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 bA))}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 CA{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 SA{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 CA,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 wA,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 CA,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`${jA}-${e.identifier}`},get classNames(){var t;const n=[jA,e.className];return(null!=(t=e.parent.showlabels)?t:e.store.settings.showLabels)||n.push(kA),(0,x.isDefined)(e.parent.showlabels)&&n.push("htx-manual-label"),n},get styles(){const{className:t}=e,n=e.getLabelColor(),r=un.Colors.rgbaChangeAlpha(n,.8);return`\n .${t} {\n background-color: ${n} !important;\n border: 1px dashed transparent;\n }\n .${t}.${RA.active}:not(.${RA.hidden}) {\n color: ${un.Colors.contrastColor(r)} !important;\n background-color: ${r} !important;\n }\n `}}))).actions((e=>({applyHighlight(t=!1){var n,r;if((0,k.VS)(k.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=R(5),d=EA(s.ownerDocument,c,l),u=["htx-highlight",d.className];return(null!=(r=e.parent.showlabels)?r:e.store.settings.showLabels)||u.push(kA),(0,x.isDefined)(e.parent.showlabels)&&u.push("htx-manual-label"),e._stylesheet=d,e._spans=un.Selection.highlightRange(a,{classNames:u,index:e.region_index,label:e.getLabels()}),e._spans},updateHighlightedText(){if(!e.text){if((0,k.VS)(k.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,k.VS)(k.Er)&&null!=(t=e._spans)&&t.length){const t=e._spans[e._spans.length-1];un.Selection.applySpanStyles(t,{index:e.region_index,label:e.getLabels()})}},clearSpans(){e._spans=null},removeHighlight(){if((0,k.VS)(k.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 un.Selection.removeRange(e._spans)},updateAppearenceFromState(){var t;if(null==(t=e._spans)||!t.length)return;const n=e._spans[e._spans.length-1];(0,k.VS)(k.Er)?null==e.parent.setStyles||e.parent.setStyles({[e.identifier]:e.styles}):e._stylesheet.setColor(e.getLabelColor()),un.Selection.applySpanStyles(n,{index:e.region_index,label:e.getLabels()})},selectRegion(){var t;e.annotation.setHighlightedNode(e),e.addClass(RA.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,k.VS)(k.Er)?RA.active:null==(t=e._stylesheet)?void 0:t.state.active)},beforeDestroy(){var t;if((0,k.VS)(k.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,k.VS)(k.Er)&&e._spans)&&(e._highlighted=t,e.highlighted?(0,k.VS)(k.Er)?e.addClass(RA.highlighted):(e.addClass(e._stylesheet.state.highlighted),null==(n=e._stylesheet)||n.setCursor(N.A.LINKING_MODE_CURSOR)):(0,k.VS)(k.Er)?e.removeClass(RA.highlighted):(e.removeClass(e._stylesheet.state.highlighted),null==(r=e._stylesheet)||r.setCursor(N.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||N.l).fillcolor;return un.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()}}))),RA={active:"__active",highlighted:"__highlighted",collapsed:"__collapsed",hidden:"__hidden",noLabel:kA},EA=(e,t,n)=>{var r;const o=`.htx-highlight-${t}`,i={color:`--background-color-${t}`,cursor:`--cursor-style-${t}`},a=`${o}.${RA.active}:not(.${RA.hidden})`,s=`${o}.${RA.highlighted}`,l=e=>un.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: ${un.Colors.contrastColor(c)} !important;\n ${i.color}: ${c}\n `,[s]:"\n position: relative;\n border-color: rgb(0, 174, 255);\n ",[`${o}.${RA.hidden}`]:`\n border: none;\n padding: 0;\n pointer-events: none;\n ${i.color}: transparent;\n `,[`${o}.${RA.hidden}::before`]:"\n display: none\n ",[`${o}.${RA.hidden}::after`]:"\n display: none\n ",[`${o}.${RA.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:RA,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=un.Colors.contrastColor(n)},setCursor:e=>{u.ownerDocument.documentElement.style.setProperty(i.cursor,e)},remove:()=>{u.remove()}}},_A=()=>"Do not put text directly in task data if you use valueType=url.",AA=e=>`URL (${(0,x.escapeHtml)(e)}) is not valid.`,TA=()=>'In SECURE MODE valueType is set to "url" by default.',PA=u.gK.model("RichTextModel",{value:u.gK.maybeNull(u.gK.string),valuetype:u.gK.optional(u.gK.enumeration(["text","url"]),(()=>window.LS_SECURE_MODE?"url":"text")),inline:!1,savetextresult:u.gK.optional(u.gK.enumeration(["none","no","yes"]),(()=>window.LS_SECURE_MODE?"no":"none")),selectionenabled:u.gK.optional(u.gK.boolean,!0),clickablelinks:!1,highlightcolor:u.gK.maybeNull(Ie.color),showlabels:u.gK.maybeNull(u.gK.boolean),encoding:u.gK.optional(u.gK.enumeration(["none","base64","base64unicode"]),"none"),granularity:u.gK.optional(u.gK.enumeration(["symbol","word","sentence","paragraph"]),"symbol")}),IA=u.gK.model("RichTextModel",{type:"richtext",_value:u.gK.optional(u.gK.maybeNull(u.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.${RA.highlighted} {\n position: relative;\n cursor: ${N.A.LINKING_MODE_CURSOR};\n border-color: rgb(0, 174, 255);\n }\n .htx-highlight.${RA.hidden} {\n border: none;\n padding: 0;\n background: transparent !important;\n cursor: inherit;\n // pointer-events: none;\n }\n .htx-highlight.${RA.hidden}::before,\n .htx-highlight.${RA.hidden}::after,\n .htx-highlight.${RA.noLabel}::after {\n display: none;\n }\n `}}))).volatile((()=>({visibleNodeRef:(0,m.createRef)(),workingNodeRef:(0,m.createRef)(),originalContentRef:(0,m.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,k.VS)(k.Er)&&(r=new SA(e.visibleNodeRef.current))},onDispose(){e.regs.forEach((e=>{e.clearSpans()}))},updateValue:(0,u.L3)((function*(t){const n=S(e.value,t.task.dataObj),r=yield e.resolveValue(n);if("url"===e.valuetype){const t=r;if(!(0,x.isValidObjectURL)(t,!0)){const n=[AA(t),_A()];return window.LS_SECURE_MODE&&n.unshift(TA()),e.annotationStore.addErrors([Mj.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=et.A.ERR_LOADING_HTTP({attr:e.value,error:String(n),url:t});e.annotationStore.addErrors([Mj.generalError(r)]),e.setRemoteValue("")}}else e.setRemoteValue(r)})),setRemoteValue(t){e.loaded=!0,"base64"===e.encoding&&(t=atob(t)),"base64unicode"===e.encoding&&(t=un.Checkers.atobUnicode(t)),(0,k.VS)(k.pN)&&"text"===e.type?e._value=String(t):e._value=(0,Ae.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,k.VS)(k.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,k.VS)(k.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},h=l.map((e=>vO(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;h.forEach((e=>{g.setValue(e),(0,u.zr)(e)})),g._range=t._range;const[f,v]=sn(t._range,p);if(g.updateGlobalOffsets(f,v),t.isText)g.updateTextOffsets(f,v);else if((0,k.VS)(k.Er))g.updateXPathsFromGlobalOffsets();else{const e=g._getRootNode(!0),t=tn(f,v,e);t&&g._fixXPaths(t,e)}return g.applyHighlight(),g.notifyDrawingFinished(),g}}})),LA=u.gK.compose("RichTextModel",Ue,On,ut,Ne,ze,PA,IA);var MA=n(71161);class KA extends m.Component{constructor(...e){super(...e),this._regionSpanSelector=".htx-highlight",this._regionVisibleSpanSelector=".htx-highlight:not(.__hidden)",this.loadingRef=m.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,k.VS)(k.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();un.Selection.captureSelection((({selectionText:t,range:n})=>{if(!n||n.collapsed||!d.contains(n.startContainer)||!d.contains(n.endContainer))return;on(n);const r=MA.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,Ae.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=Ae.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,u._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,k.VS)(k.Er)||e.setNeedsUpdateCallbacks(this._moveElementsToWorkingNode,this._returnElementsFromWorkingNode),e.inline||(this.dispose=(0,d.lB)(e,"_isReady",this.updateLoadingVisibility,!0))}componentWillUnmount(){var e;const{item:t}=this.props;t&&(0,u._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,u._n)(e)&&(e.setLoaded(!0),this.updateLoadingVisibility(),setTimeout((()=>this._handleUpdate(!0))))}render(){const{item:e}=this.props;if(!(0,x.isDefined)(e._value))return null;let t=e._value||"";const n=this.props.store.settings,r="text"===e.type;if(r){const e=(0,Qe.cn)("richtext",{elem:"line"});t=(0,Ae.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,E.jsxs)(Qe.eB,{name:"richtext",tag:Kn,item:e,children:[(0,E.jsx)(Qe.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,k.VS)(k.Er)?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"orig-container",ref:e.originalContentRef,className:"htx-richtext-orig",dangerouslySetInnerHTML:{__html:t}},"orig"),(0,E.jsx)(Qe.Sl,{name:"work-container",ref:e.workingNodeRef,className:"htx-richtext-work"},"work")]})]})}return(0,E.jsxs)(Qe.eB,{name:"richtext",tag:Kn,item:e,children:[(0,E.jsx)(Qe.Sl,{name:"loading",ref:this.loadingRef,children:(0,E.jsx)(Hj.A,{})}),(0,E.jsx)(Qe.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,k.VS)(k.Er)?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.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,E.jsx)(Qe.Sl,{name:"work-iframe",tag:"iframe",referrerPolicy:"no-referrer",sandbox:"allow-same-origin allow-scripts",ref:e.workingNodeRef,className:"htx-richtext-work"},"work")]})]})}}const DA=(0,v.WQ)("store"),NA=DA((0,v.PA)(KA)),VA=({isText:e=!1}={})=>DA((0,v.PA)((t=>(0,E.jsx)(NA,Object.assign({},t,{isText:e})))));b.addTag("text",LA,VA({isText:!0})),b.addTag("hypertext",LA,VA({isText:!1})),b.addObjectType(LA);var zA=n(23350);const BA=u.gK.model({type:"table",value:u.gK.maybeNull(u.gK.string),_value:u.gK.frozen([]),valuetype:u.gK.optional(u.gK.string,"json")}).views((e=>({get dataSource(){const{type:t}=j(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,u.L3)((function*(t){const{type:n,options:r}=j(e.valuetype);let o=S(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,u._$)(e).messages.ERR_LOADING_HTTP({attr:e.value,error:String(t),url:o});e.annotationStore.addErrors([Mj.generalError(n)])}if("csv"===n)Fe().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}))}))),HA=u.gK.compose("TableModel",On,Ue,Ne,BA),FA=(0,v.WQ)("store")((0,v.PA)((({item:e})=>(0,E.jsx)(zA.A,{bordered:!0,dataSource:e.dataSource,columns:e.columns,pagination:{hideOnSinglePage:!0}}))));b.addTag("table",HA,FA),b.addObjectType(HA);var WA=n(46288);const $A=()=>(window.screen&&window.screen.width||1440)*(window.devicePixelRatio||2),UA=(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||N.l).fillcolor;return un.Colors.convertToRGBA(n,t)},GA=e=>!WA.f0J.sourceEvent||(e?WA.f0J.sourceEvent.type===e:["start","brush","end"].includes(WA.f0J.sourceEvent.type)),YA=e=>new Date(e).toUTCString(),XA=u.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,u.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,u.Zn)(e).task)?void 0:t.id))return;const r=n.values||{};for(const t of Object.keys(r))e[t]=r[t]}}))),qA=u.gK.model({legend:"",units:"",displayformat:u.gK.optional(u.gK.string,".1f"),interpolation:u.gK.optional(u.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:u.gK.optional(u.gK.string,"200"),strokewidth:u.gK.optional(u.gK.string,"1"),strokecolor:u.gK.optional(u.gK.string,"#1f77b4"),markersize:u.gK.optional(u.gK.string,"0"),markercolor:u.gK.optional(u.gK.string,"#1f77b4"),markersymbol:u.gK.optional(u.gK.string,"circle"),datarange:u.gK.maybe(u.gK.string),timerange:u.gK.maybe(u.gK.string),showaxis:u.gK.optional(u.gK.boolean,!0),fixedscale:u.gK.maybe(u.gK.boolean),column:u.gK.string}),JA=u.gK.model("ChannelModel",Object.assign({},(0,k.VS)(k.cE)?{id:u.gK.identifier}:{id:u.gK.optional(u.gK.identifier,R)},{type:"channel",children:De.unionArray(["channel","view"]),parentTypes:De.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}}))),QA=u.gK.compose("ChannelModel",tE,JA,qA);class eT extends m.Component{constructor(...e){super(...e),this.ref=m.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(GA("end")||!WA.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(WA.f0J.selection,o.instant);i.start===o.start&&i.end===o.end?(null==n||n.annotation.unselectAreas(),o.onClickRegion(WA.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(GA("end"))return;if(!WA.f0J.selection){const e=WA.grR(WA.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=>vO(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(WA.f0J.sourceEvent):null==n||n.annotation.unselectAreas())}const a=this.getRegion(WA.f0J.selection);this.brushCreator.move(this.gCreator,null);const s=WA.f0J.sourceEvent.ctrlKey||WA.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(WA.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(WA.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(WA.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=WA.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=WA.Ltv(this),n=WA.n55().extent(i);n.on("brush",(function(){if(GA("brush"))return;const n=u(WA.f0J.selection,e.instant);a.move(t,[s(n.start),s(n.end)+.5*e.instant]),d(WA.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=WA.Ltv(this),n=t.selectAll(".selection");t.style("display",e.hidden?"none":"block");const r=ZA(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=WA.n55().extent([[0,0],[this.state.width,this.height]]).on("brush",(function(){if(GA("brush")||!WA.f0J.selection)return;const i=n(WA.f0J.selection);o.move(t,[r(i.start),r(i.end)]),e(WA.grR(this)[0],i.end-i.start)})).on("end",this.newBrushHandler).filter((()=>!WA.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=WA.f0J;if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();const{range:t}=this.props,n=t.map((e=>WA.Jjl(o,e))),[r]=WA.grR(WA.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,h=this.height;this.zoomStep=d;const g=`marker_${n.id}`,m=`clip_${n.id}`;let{series:p}=this.props;const f=$A()*this.zoomStep;let v,y;this.useOptimizedData=p.length>f,(0,k.VS)(k.dY)&&(v=p.filter((e=>null!==e[i])),y=v.map((e=>e[o]))),this.useOptimizedData&&(this.optimizedSeries=UA(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,u.Zn)(n).annotationStore.addErrors([Mj.generalError(r)])}this.slices=null==(e=n.parent)?void 0:e.dataSlices;const w=WA.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=WA.Xxv(b);const j=(a?WA.Pps():WA.m4Y()).domain(this.extent).range([0,S]),O=WA.m4Y().domain(WA.Xxv(x)).range([h-c.max,c.min]);this.x=j,this.y=O,this.plotX=j.copy(),this.stick=e=>{const t=j.invert(e),n=(0,k.VS)(k.dY)?y:b;let r=WA.Jjl(n,t,0,n.length-1);return n[r]-t>t-n[r-1]&&r--,[n[r],(0,k.VS)(k.dY)?v[r][i]:x[r]]},this.line=WA.n8j().y((e=>this.y(e[i]))).x((e=>this.plotX(e[o]))),this.lineSlice=WA.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=WA.Ltv(this.ref.current).append("svg").attr("viewBox",[0,0,S+c.left+c.right,h+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",WA.HRO().type(WA.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",WA.HRO().type(WA.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",WA.HRO().type(WA.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",WA.HRO().type(WA.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",h).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=WA.Jjl(t[n],e[0]);const a=WA.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=WA.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,x.fixMobxObserve)(e.start,e.end,e.selected,e.inSelection,e.highlighted,e.hidden,null==(t=e.style)?void 0:t.fillcolor)})),(0,x.fixMobxObserve)(this.props.range.map(Number)),(0,E.jsx)("div",{className:"htx-timeseries-channel",ref:this.ref})}}const tT=(0,v.PA)(eT),nT=(0,v.PA)((({item:e})=>{var t,n,r,o,i,a;return null!=(t=e.parent)&&t.dataObj?(0,E.jsx)(tT,{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}));b.addTag("channel",QA,nT);const rT=u.gK.model({value:u.gK.string,valuetype:u.gK.optional(u.gK.enumeration(["url","json"]),"url"),timecolumn:"",sep:",",timeformat:"",timedisplayformat:"",durationdisplayformat:".0f",overviewchannels:"",overviewwidth:"25%",fixedscale:!1,multiaxis:u.gK.optional(u.gK.boolean,!1),hotkey:u.gK.maybeNull(u.gK.string)}),oT=u.gK.model("TimeSeriesModel",{type:"timeseries",children:De.unionArray(["channel","timeseriesoverview","view","hypertext"]),width:840,margin:u.gK.frozen({top:20,right:20,bottom:30,left:50,min:10,max:10}),brushRange:u.gK.array(u.gK.number),_needsUpdate:u.gK.optional(u.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,u.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?WA.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,u.Pw)(e).name)):null},formatTime(t){if(!e._format){const{timedisplayformat:t,isDate:n}=e;e._format="date"===t?YA:t?n?WA.aLc(t):WA.GPZ(t):String}return e._format(t)},formatDuration(t){if(!e._formatDuration){const{durationdisplayformat:t,isDate:n}=e;e._formatDuration=t?n?WA.aLc(t):WA.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:()=>zn()(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(S(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([Mj.generalError(n)])}const r=S(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([Mj.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([Mj.loadingError(`${i.status} ${i.statusText}`,r,e.value,(0,u._$)(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([Mj.loadingError(o,r,e.value,s?(0,u._$)(t).messages.ERR_LOADING_CORS:void 0)])}try{let n=(e=>{if((0,x.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(x.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([Mj.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([Mj.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([Mj.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 iT=(0,v.PA)((({item:e,data:t,series:n})=>{const r=e.regs,[o,i,a]=function(){const[e,t]=m.useState(840),[n,r]=m.useState(null),o=m.useCallback((e=>{r(e)}),[]);return m.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=m.useRef(),g=m.useRef(),p=m.useRef(),f=m.useRef(),v=m.useRef(),y=(e.isDate?WA.w7C():WA.m4Y()).domain(WA.Xxv(t[c])).range([0,d]),b=m.useCallback(e.throttledRangeUpdate(),[]),w=[0,d>>2],C=m.useRef(w),S=10;let j;const k=WA.n55().extent([[0,0],[d,s]]).on("start",(function(){const[e,t]=WA.f0J.selection;j=e===t?e:null})).on("brush",(function(){if(WA.f0J.selection&&!GA("brush")&&!GA("wheel")){let[t,n]=WA.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=WA.m4Y().domain([WA.jkA(t[r]),WA.T9B(t[r])]).range([s-l.max,l.min]);p.current.append("path").datum(UA(n,$A())).attr("class","channel").attr("fill","none").attr("stroke",i).attr("d",WA.n8j().y((e=>a(e[r]))).defined((e=>e[c])).x((e=>y(e[c]))))};return m.useEffect((()=>{a&&(h.current=WA.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)"),p.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,w),v.current.select(".handle--w").style("transform","translate(-1px, 0)"),v.current.select(".handle--e").style("transform","translate(1px, 0)"))}),[a]),m.useEffect((()=>{if(a){WA.Ltv(a).selectAll("svg").attr("viewBox",[0,0,d+l.left+l.right,s+l.bottom]),p.current.selectAll("path").remove();for(const e of u)O(e);f.current.call(WA.l78(y).ticks(d/80).tickSizeOuter(0)),v.current.call(k).call(k.move,e.brushRange.map(y))}}),[d,a]),m.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=>ZA(e,e.selected?.8:.3))).style("display",(e=>e.hidden?"none":"block")),t.exit().remove()})(r)})),e.regs.map((e=>{var t;return(0,x.fixMobxObserve)(e.start,e.end,e.selected,e.hidden,null==(t=e.style)?void 0:t.fillcolor)})),(0,E.jsx)("div",{className:"htx-timeseries-overview",ref:o})})),aT=u.gK.compose("TimeSeriesModel",On,XA,Ne,rT,oT),sT=(0,v.WQ)("store")((0,v.PA)((({item:e})=>{var t;const n=m.createRef();return m.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,E.jsx)("div",{ref:n,className:"htx-timeseries",children:(0,E.jsxs)(Kn,{item:e,children:[K.renderChildren(e,e.annotation),(0,E.jsx)(iT,{data:e.dataObj,series:e.dataHash,item:e,range:e.brushRange})]})}):(0,E.jsx)("div",{style:{textAlign:"center",height:100},children:(0,E.jsx)(f.A,{size:"large",delay:300})})})));b.addTag("timeseries",aT,sT),b.addObjectType(aT);const lT=u.gK.model({id:u.gK.identifier,type:"pagedview",children:De.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"])}),cT=u.gK.compose("PagedViewModel",lT,Ne),dT="view_page",uT=kr("Repeater"),hT=`.${(0,Qe.cn)("sidepanels").elem("content").toClassName()}`,gT=[1,5,10,25,50,100],mT=()=>{const e=new URLSearchParams(window.location.search).get(dT);return e?Number.parseInt(e):1};let pT=null;const fT=(e,t=null)=>{const n=new URLSearchParams(window.location.search),r=pT&&t!==pT;pT=t,r?n.delete(dT):1!==e?n.set(dT,e.toString()):n.delete(dT),window.history.replaceState(void 0,void 0,`${window.location.pathname}?${n}`)},vT=(0,v.PA)((({item:e})=>{const[t,n]=(0,m.useState)(mT),[r,o]=(0,m.useState)(1),i=(0,m.useCallback)((t=>{var r;n(t),fT(t,null==(r=e.annotationStore)||null==(r=r.store)?void 0:r.task.id)}),[]),a=Math.ceil(e.children.length/r);(0,m.useEffect)((()=>{o(((e,t)=>{const n=localStorage.getItem(`pages:${e}`);return n?Number.parseInt(n):null!=t?t:void 0})("repeater",1))}),[]),(0,m.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,m.useEffect)((()=>{var e,n;(0,k.VS)(k.LE)?null==(e=document.querySelector(hT))||e.scrollTo(0,0):null==(n=document.querySelector("#label-studio-dm"))||n.scrollTo(0,0);return setTimeout((()=>{uT.addNamed("repeater:next-page",(()=>{t{t>1&&i(t-1)}))})),()=>{uT.removeNamed("repeater:next-page"),uT.removeNamed("repeater:previous-page")}}),[t]),(0,m.useEffect)((()=>{var t;return fT(mT(),null==(t=e.annotationStore)||null==(t=t.store)?void 0:t.task.id),()=>{var t;fT(1,null==(t=e.annotationStore)||null==(t=t.store)?void 0:t.task.id)}}),[]);const s=(0,m.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))}})]})}));b.addTag("pagedview",cT,vT);const yT=m.createContext(),bT=["name","children","label","icon","to","className","href","danger","exact","forceReload","active","onClick"],xT=(0,m.forwardRef)((({children:e,className:t,style:n,size:r,selectedKeys:o,closeDropdownOnItemClick:i,allowClickSelected:a},s)=>{const l=q_(),c=(0,m.useMemo)((()=>new Set(null!=o?o:[])),[o]),d=(0,m.useCallback)((e=>{const t=(0,Qe.cn)("menu").elem("item").closest(e.target);l&&t&&!1!==i&&l.close()}),[l]),u=(0,m.useMemo)((()=>!!l),[l]),h=(0,m.useMemo)((()=>({selected:c,allowClickSelected:a})),[c,a]);return(0,E.jsx)(yT.Provider,{value:h,children:(0,E.jsx)(Qe.eB,{ref:s,tag:"ul",name:"menu",mod:{size:r,collapsed:u},mix:t,style:n,onClick:d,children:e})})}));xT.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,nr.A)(e,bT);const{selected:p,allowClickSelected:f}=m.useContext(yT),v=(0,Qe.cn)("menu",{elem:"item"}),y=(()=>{const e=window.location.pathname.replace(/\/$/,""),n=null!=i?i:s;return!!p.has(t)||(c?e===n:e.includes(n))})(),b=(0,m.useMemo)((()=>(0,E.jsxs)(E.Fragment,{children:[o&&(0,E.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,E.jsx)("li",{children:s?(0,E.jsx)("a",Object.assign({href:null!=s?s:"#"},x,{children:b})):(0,E.jsx)("div",Object.assign({},x,{children:b}))})},xT.Spacer=()=>(0,E.jsx)("li",{className:(0,Qe.cn)("menu",{elem:"spacer"})}),xT.Divider=()=>(0,E.jsx)("li",{className:(0,Qe.cn)("menu",{elem:"divider"})}),xT.Builder=(e,t)=>(null!=t?t:[]).map(((t,n)=>{if("SPACER"===t)return(0,E.jsx)(xT.Spacer,{},n);if("DIVIDER"===t)return(0,E.jsx)(xT.Divider,{},n);const[r,o]=t,i=`${e}${r}`.replace(/([/]+)/g,"/");return(0,E.jsx)(xT.Item,{to:i,exact:!0,children:o},n)})),xT.Group=({children:e,title:t,className:n,style:r})=>{const o=(0,Qe.cn)("menu-group");return(0,E.jsxs)("li",{className:o.mix(n),style:r,children:[(0,E.jsx)("div",{className:o.elem("title"),children:t}),(0,E.jsx)("ul",{className:o.elem("list"),children:e})]})};const wT=(0,m.forwardRef)(((e,t)=>{const n=(0,m.useRef)(),r=(0,m.useRef)(null),o=e=>{t instanceof Function?t(e):t&&(t.current=e)};return(0,m.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,m.useEffect)((()=>{r.current&&(r.current.width=e.width,r.current.height=e.height)}),[e.width,e.height]),(0,m.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,E.jsx)("div",{ref:n})})),CT={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"},ST=(0,m.forwardRef)(((e,t)=>{const n=(0,m.useRef)(null),r=(0,m.useRef)(null),o=(0,m.useRef)([]),i=(0,m.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=CT[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||Sn.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,m.useCallback)((()=>{const t=document.createElement("video");t.muted=!!e.muted,t.controls=!1,t.preload="auto",(0,k.VS)(k.xS)&&(t.crossOrigin="anonymous"),Object.assign(t.style,{top:"-9999px",width:0,height:0,position:"absolute"}),n.current=t}),[]),s=(0,m.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,m.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,m.useEffect)((()=>{c(),l()})),(0,m.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,m.useEffect)((()=>{n.current&&void 0!==e.muted&&(n.current.muted=e.muted)}),[e.muted]),null})),jT=e=>(0,x.clamp)(e,.1,10),kT=(e,t,n,r)=>Math.min(1,Math.min(e/n,t/r)),OT=(0,m.memo)((0,m.forwardRef)(((e,t)=>{var n,r,o,i,a;const s=(0,m.useRef)(),l=(0,m.useRef)(),c=(0,m.useRef)(),d=(0,m.useRef)(),u=(0,m.useRef)(),h=(0,m.useRef)(null),g=(0,m.useRef)(!1),p=(0,m.useMemo)((()=>{var t;return null!=(t=e.width)?t:600}),[e.width]),f=(0,m.useMemo)((()=>{var t;return null!=(t=e.height)?t:600}),[e.height]),v=null!=(n=e.framerate)?n:29.97,[y,b]=(0,m.useState)(!0),[w,C]=(0,m.useState)(0),[S,j]=(0,m.useState)(null!=(r=e.position)?r:1),[O,R]=(0,m.useState)(!1),[_,A]=(0,m.useState)(!1),[T,P]=(0,m.useState)(null!=(o=e.zoom)?o:1),[I,L]=(0,m.useState)(null!=(i=e.pan)?i:{x:0,y:0}),[M,K]=(0,m.useState)({width:0,height:0,ratio:1}),[D,N]=(0,m.useState)(1),[V,z]=(0,m.useState)(1),[B,H]=(0,m.useState)(1),F=(0,m.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,m.useCallback)((t=>{const{width:n,height:r}=M,o=n*T,i=r*T,a=(0,x.clamp)((o-p)/2,0,Number.POSITIVE_INFINITY),s=(0,x.clamp)((i-f)/2,0,Number.POSITIVE_INFINITY);return{x:e.allowPanOffscreen?t.x:(0,x.clamp)(t.x,-a,a),y:e.allowPanOffscreen?t.y:(0,x.clamp)(t.y,-s,s)}}),[e.allowPanOffscreen,p,f,T]),$=(0,m.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=(p-r)/2+I.x,a=(f-o)/2+I.y;e.clearRect(0,0,p,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,p,f]),U=(0,m.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,x.clamp)(a,1,w||1),l=null!=(o=e.onFrameChange)?o:()=>{};s===S&&!0!==t||(j(s),$(),l(s,w))}),[v,S,$,e.onFrameChange,w]),Z=(0,m.useCallback)((()=>{if(!u.current)return;if(!d.current)return;const e=u.current;e&&(O||U(!0),e.networkState===e.NETWORK_IDLE?(g.current=!0,A(!1)):A(!0))}),[O,U]),G=(0,m.useCallback)((()=>{R(!0),A(!1),null==e.onPlay||e.onPlay()}),[e.onPlay]),Y=(0,m.useCallback)((()=>{R(!1),A(!1),null==e.onPause||e.onPause()}),[e.onPause]),X=(0,m.useCallback)((()=>{A(!1),Z()}),[Z]),q=(0,m.useCallback)((()=>{A(!0)}),[]),J=(0,m.useCallback)((()=>{R(!1),A(!1),null==e.onSeeked||e.onSeeked(),null==e.onEnded||e.onEnded(),null==e.onPause||e.onPause()}),[e.onEnded]),Q=(0,m.useCallback)((()=>{if(!(0,k.VS)(k.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(),O?s.current=requestAnimationFrame(ee):cancelAnimationFrame(s.current)};(0,m.useEffect)((()=>{O||$()}),[$,O]),(0,m.useEffect)((()=>(O&&(s.current=requestAnimationFrame(ee)),()=>{cancelAnimationFrame(s.current)})),[O]),(0,m.useEffect)((()=>{u.current&&e.speed&&(u.current.playbackRate=e.speed)}),[e.speed]),(0,m.useEffect)((()=>{u.current&&e.position&&(u.current.currentTime=e.position/v)}),[v,e.position]),(0,m.useEffect)((()=>{u.current&&e.currentTime&&(u.current.currentTime=e.currentTime)}),[e.currentTime]),(0,m.useEffect)((()=>{u.current&&(e.playing&&!O?u.current.play():!1===e.playing&&O&&u.current.pause())}),[O,e.playing]),(0,m.useEffect)((()=>{var t;e.allowInteractions&&(null==(t=l.current)||t.addEventListener("wheel",(e=>{e.preventDefault()})))}),[]),(0,m.useEffect)((()=>{(0,x.isDefined)(e.zoom)&&P(jT(e.zoom))}),[e.zoom]),(0,m.useEffect)((()=>{(0,x.isDefined)(e.pan)&&L(W(e.pan))}),[e.pan,W]),(0,m.useEffect)((()=>{(0,x.isDefined)(e.brightness)&&z(e.brightness)}),[e.brightness]),(0,m.useEffect)((()=>{(0,x.isDefined)(e.contrast)&&N(e.contrast)}),[e.contrast]),(0,m.useEffect)((()=>{(0,x.isDefined)(e.saturation)&&H(e.saturation)}),[e.saturation]),(0,m.useEffect)((()=>{$()}),[F,T,I,p,f]),(0,m.useEffect)((()=>{const t=new ResizeObserver((()=>{null==e.onResize||e.onResize(M)}));return t.observe(l.current),()=>t.disconnect()}),[M]);const te={currentFrame:S,length:w,playing:O,zoom:T,pan:I,videoDimensions:M,width:p,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(jT(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,x.clamp)(e,0,this.duration),requestAnimationFrame((()=>$()))},goToFrame(e){const t=(0,x.clamp)(e,1,w);this.currentTime=t/v,requestAnimationFrame((()=>$()))}};return t instanceof Function?t(te):t&&(t.current=te),(0,m.useEffect)((()=>{const{width:t,height:n}=M,r=kT(p,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,p,f,M]),(0,m.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:kT(p,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,m.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,E.jsxs)(Qe.eB,{ref:l,name:"video-canvas",children:[y&&(0,E.jsx)(Qe.Sl,{name:"loading",children:(0,E.jsx)(Qe.eB,{name:"spinner"})}),(0,E.jsxs)(Qe.Sl,{name:"view",onClick:e.onClick,style:{width:p,height:f},children:[(0,E.jsx)(wT,{ref:e=>{e&&c.current!==e&&(c.current=e,d.current=e.getContext("2d"))},width:p,height:f}),!y&&_&&(0,E.jsx)(Qe.Sl,{name:"buffering"})]}),(0,E.jsx)(ST,{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})]})})));OT.displayName="VideoCanvas";const RT=u.gK.model("TimeTraveller",{undoIdx:0,targetPath:"",skipNextUndoState:u.gK.optional(u.gK.boolean,!1),lastAdditionTime:u.gK.optional(u.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,u.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,u.dV)(t)],e.undoIdx=0,e.createdIdx=0,s(n)},afterCreate(){if(t=e.targetPath?(0,u.o1)(e,e.targetPath):(0,u._$)(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,u.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,u.Nh)(t,e.history[n]),s(),(0,k.VS)(k.$b)&&setTimeout((()=>{e.setSkipNextUndoState(!1)}))},reset(){(0,u.Nh)(t,e.history[e.createdIdx]),s()}}})),ET=u.gK.model("GlobalOffset",{start:u.gK.number,end:u.gK.number,calculated:!1}).views((e=>({get serialized(){return{start:e.start,end:e.end}}}))),_T=u.gK.model("RichTextRegionModel",{type:"richtextregion",object:u.gK.late((()=>u.gK.reference(LA))),startOffset:u.gK.integer,endOffset:u.gK.integer,start:u.gK.string,end:u.gK.string,text:u.gK.maybeNull(u.gK.string),isText:u.gK.optional(u.gK.boolean,!1),globalOffsets:u.gK.maybeNull(ET)}).volatile((()=>({hideable:!0,cachedRange:null}))).views((e=>({get parent(){return(0,u.$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,x.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,k.VS)(k.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=tn(e.globalOffsets.start,e.globalOffsets.end,n);if(!r)throw new Error;const o=MA.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,x.isDefined)(e.text)&&(t.value.text=e.text),t},updateTextOffsets(t,n){Object.assign(e,{startOffset:t,endOffset:n})},updateGlobalOffsets(t,n){e.globalOffsets=ET.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=tn(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,k.VS)(k.Er)||(e.cachedRange=tn(t,r,n)))}if((0,k.VS)(k.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]=sn(r,t);return e.globalOffsets={start:o,end:i,calculated:!0},void(e.cachedRange=tn(o,i,n))}if(r=e._getRange({useOriginalContent:!1}),r){const[t,o]=sn(r,n);return e.globalOffsets={start:t,end:o,calculated:!0},void(e.cachedRange=r)}if(e.globalOffsets&&(0,x.isDefined)(n)){const{start:t,end:r}=e.globalOffsets;return e.cachedRange=tn(t,r,n),void(e.cachedRange&&(e._fixXPaths(e.cachedRange,n),e.globalOffsets.calculated=!0))}}},_fixXPaths(t,n){const r=MA.fromRange(t,n);(0,x.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,x.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,k.VS)(k.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 MA.toRange(r,o,i,a,n)}catch(e){console.warn("can't locate xpath",{start:r,end:i},e)}}}))),AT=u.gK.compose("RichTextRegionModel",ut,bt,Xe,_T,OA);b.addRegionType(AT,"text"),b.addRegionType(AT,"hypertext"),b.addRegionType(AT,"richtext");const TT=u.gK.model({value:u.gK.maybeNull(u.gK.string),hotkey:u.gK.maybeNull(u.gK.string),framerate:u.gK.optional(u.gK.string,"24"),height:u.gK.optional(u.gK.string,"600"),timelineheight:u.gK.maybeNull(u.gK.string),muted:!1}),PT=u.gK.model({type:"video",_value:u.gK.optional(u.gK.string,""),mergeLabelsAndResults:!0}).volatile((()=>({errors:[],speed:1,ref:m.createRef(),frame:1,length:1,drawingRegion:null}))).views((e=>({get store(){return(0,u.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(S(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}}))),IT=u.gK.compose("VideoModel",Ye,TT,Ue,On,Ne,PT,ze),LT=u.gK.model("TimelineRange",{start:u.gK.maybeNull(u.gK.integer),end:u.gK.maybeNull(u.gK.integer)});function MT(e){const{start:t,end:n}=e;return(0,x.isDefined)(t)?(0,x.isDefined)(n)?t===n?{frame:t,enabled:!1}:[{frame:t,enabled:!0},{frame:n,enabled:!1}]:{frame:t,enabled:!0}:(0,x.isDefined)(n)?{frame:n,enabled:!1}:[]}const KT=u.gK.model("TimelineRegionModel",{type:"timelineregion",object:u.gK.late((()=>u.gK.reference(IT))),ranges:u.gK.array(LT)}).volatile((()=>({hideable:!0,editableFields:[{property:"start",label:"Start frame"},{property:"end",label:"End frame"}]}))).views((e=>({get parent(){return(0,u._n)(e)?e.object:null},get sequence(){return e.ranges.flatMap(MT)},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}]}}))),DT=u.gK.compose("TimelineRegionModel",ut,bt,Xe,mn,KT);b.addRegionType(DT,"video");const NT=kr("TimeSeries","Time Series Segmentation"),VT=u.gK.model("TimeSeriesRegionModel",{id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"timeseriesregion",object:u.gK.late((()=>u.gK.reference(aT))),start:u.gK.union(u.gK.number,u.gK.string),end:u.gK.union(u.gK.number,u.gK.string),instant:!1}).volatile((()=>({hideable:!0}))).views((e=>({get parent(){return e.object},get annotation(){var t;const n=(0,u.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;NT.addNamed("ts:grow-left",(()=>e.growLeft(t))),NT.addNamed("ts:grow-right",(()=>e.growRight(t))),NT.addNamed("ts:shrink-left",(()=>e.shrinkLeft(t))),NT.addNamed("ts:shrink-right",(()=>e.shrinkRight(t))),NT.addNamed("ts:grow-left-largre",(()=>e.growLeft(n))),NT.addNamed("ts:grow-right-largre",(()=>e.growRight(n))),NT.addNamed("ts:shrink-left-largre",(()=>e.shrinkLeft(n))),NT.addNamed("ts:shrink-right-largre",(()=>e.shrinkRight(n))),e.parent.scrollToRegion(e)},updateAppearenceFromState(){e.labelsState&&e.parent.updateView()},afterUnselectRegion(){NT.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?WA.aLc(e.parent.timeformat):Number;return{value:{start:t(e.start),end:t(e.end),instant:e.instant}}}}))),zT=u.gK.compose("TimeSeriesRegionModel",ut,bt,Xe,Ne,VT);b.addTag("timeseriesregion",zT,(()=>{})),b.addRegionType(zT,"timeseries");const BT=(e,t)=>Object.fromEntries(e.map((e=>[e,t[e]]))),HT=u.gK.model("VideoRegionModel",{id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),object:u.gK.late((()=>u.gK.reference(IT))),sequence:u.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,u.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,k.VS)(k.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}}))),FT=u.gK.compose("VideoRegionModel",ut,bt,Xe,HT);function WT(e){let t=e;for(;t>0;)t-=360;return(t-180)%360+180}const $T=(e,t,n,r)=>{const o=(n-e.frame)/(t.frame-e.frame);if("rotation"===r){const n=WT(t[r]-e[r]);return WT(e[r]+n*o)}return e[r]+(t[r]-e[r])*o},UT=u.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 BT(e.props,o);if(o.frame>t){r=o;break}n=o}return n?r?Object.fromEntries(e.props.map((e=>[e,$T(n,r,t,e)]))):BT(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))]}}}))),ZT=u.gK.compose("VideoRectangleRegionModel",ut,FT,bt,Xe,UT);b.addRegionType(ZT,"video");const GT=u.gK.compose("ClassificationArea",ut,Xe,bt,u.gK.model({object:u.gK.late((()=>u.gK.reference(u.gK.union(...b.objectTypes())))),classification:!0}).views((e=>({get supportSuggestions(){return!1},get type(){return""}}))).actions((()=>({serialize:()=>({})})))),YT=u.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 GT;const t=K.cleanUpId(e.object.name||e.object),n=window.Htx.annotationStore.names.get(t),r=b.getAvailableAreas(n.type,e);var o;return"video"===n.type?e.sequence||null!=(o=e.value)&&o.sequence?ZT:DT:r.length?u.gK.union(...r,GT):GT}},yn,K_,DT,zT,pO,AT,Xk,Uk,iO,Nk,ZT,GT),XT=YT;var qT=n(87835),JT=n.n(qT);const QT=e=>e?e.map((e=>e.map((e=>({label:e,value:e}))))):[],eP={pathSeparator:"/",showFullPath:!0},tP=u.gK.model("UserExtended",{id:u.gK.identifierNumber,firstName:u.gK.maybeNull(u.gK.string),lastName:u.gK.maybeNull(u.gK.string),username:u.gK.maybeNull(u.gK.string),email:u.gK.maybeNull(u.gK.string),lastActivity:u.gK.maybeNull(u.gK.string),avatar:u.gK.maybeNull(u.gK.string),initials:u.gK.maybeNull(u.gK.string),phone:u.gK.maybeNull(u.gK.string)}).preProcessSnapshot((e=>(0,x.camelizeKeys)(null!=e?e:{}))),nP=(u.gK.model("UserStore",{id:u.gK.maybeNull(u.gK.integer),pk:u.gK.maybeNull(u.gK.integer),firstName:u.gK.maybeNull(u.gK.string),lastName:u.gK.maybeNull(u.gK.string)}).views((e=>({get displayName(){return e.firstName||e.lastName?`${e.firstName} ${e.lastName}`:""}}))),["id"]),rP=u.gK.model({regionId:u.gK.maybe(u.gK.string),controlName:u.gK.maybe(u.gK.string)}).views((e=>({get comment(){return(0,u.PA)(e)},get annotation(){return e.comment.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,n;const{result:r,region:o}=e;if(e.comment.isResolved||e.comment.isDeleted)return null;if(!o||o.hidden)return null;if(!((null!=(t=o.item_index)?t:0)===(null!=(n=o.object.currentItemIndex)?n:0)))return null;if(r){const e=r.from_name,t=e.isClassificationTag,n=!1!==e.isVisible,o=e.result;if(t&&n&&o===r)return r}return e.region},get targetKey(){const t=[e.regionId];return(0,x.isDefined)(e.controlName)&&t.push(e.controlName),t.join("-")}}))).actions((e=>({serialize(){const t=e.toJSON();return(0,nr.A)(t,nP)},setRegion(t){e.regionId=t.cleanId}}))),oP=u.gK.model("CommentBase",Object.assign({text:u.gK.string},isFF(k.v1)?{regionRef:u.gK.optional(u.gK.maybeNull(rP),null),classifications:u.gK.optional(u.gK.frozen({}),null)}:{})).views((e=>({get commentsStore(){try{return De.getParentOfTypeString(e,"CommentStore")}catch(e){return null}},get annotation(){const t=(0,u._$)(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))}}))),iP=oP.named("Comment").props({id:u.gK.identifierNumber,text:u.gK.string,createdAt:u.gK.optional(u.gK.string,un.UDate.currentISODate()),updatedAt:u.gK.optional(u.gK.string,un.UDate.currentISODate()),resolvedAt:u.gK.optional(u.gK.maybeNull(u.gK.string),null),createdBy:u.gK.optional(u.gK.maybeNull(u.gK.safeReference(tP)),null),isResolved:!1,isEditMode:u.gK.optional(u.gK.boolean,!1),isDeleted:u.gK.optional(u.gK.boolean,!1),isConfirmDelete:u.gK.optional(u.gK.boolean,!1),isUpdating:u.gK.optional(u.gK.boolean,!1)}).preProcessSnapshot((e=>(0,x.camelizeKeys)(null!=e?e:{}))).volatile((e=>({_commentRef:(0,m.createRef)()}))).views((e=>({get sdk(){return(0,u._$)(e).events},get isPersisted(){return e.id>0&&!e.isUpdating},get canResolveAny(){return(0,u.Zn)(e).interfaces.includes("comments:resolve-any")}}))).actions((e=>{const t=(0,u.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,u.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,u.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,x.snakeizeKeys)(t)));if(n.error)return void(e.isUpdating=!1);const r=(0,x.camelizeKeys)(n);(0,u.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,u.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})},setResultLink:function(t){const n={regionId:t.area.cleanId,controlName:t.from_name.name};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"}))}}})),aP=u.gK.model("CommentStore",{loading:u.gK.optional(u.gK.maybeNull(u.gK.string),"list"),comments:u.gK.optional(u.gK.array(iP),[]),highlightedComment:u.gK.safeReference(iP)}).volatile((()=>({addedCommentThisSession:!1,commentFormSubmit:()=>{},currentComment:{},inputRef:{},tooltipMessage:"",commentsKey:null}))).views((e=>({get store(){return(0,u.PA)(e)},get task(){return(0,u.PA)(e).task},get annotationStore(){return(0,u.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,u.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,u.Zn)(e).commentClassificationConfig)},get sdk(){return(0,u._$)(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,k.VS)(k.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,u.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,x.snakeizeKeys)(t),{id:n,task:e.taskId,created_by:e.currentUser.id,created_at:un.UDate.currentISODate()});let o=!1;const{annotation:i}=e;if(!(0,k.VS)(k.K3)||e.annotationId||e.draftId||(i.history.hasChanges&&!i.draftSaved?(i.saveDraftImmediately(),yield(0,d.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,u.L3)((function*(){e.currentComment&&(yield t(e.currentComment))}));const r=(0,u.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,u.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=JT()([...t.comments,...(0,u.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,u.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,k.VS)(k.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}}})),sP=u.gK.union(yn,Nk,Uk,zT,Xk,iO,pO,NE,AT,zT,DT,K_,ZT);var lP,cP,dP;const uP=kr("RegionStore"),hP="outliner:sort",gP="outliner:sort-direction",mP="outliner:group",pP="regionstore:view",fP=u.gK.model({selected:u.gK.optional(u.gK.map(u.gK.safeReference(sP)),{}),drawingSelected:u.gK.optional(u.gK.map(u.gK.safeReference(sP)),{})}).views((e=>({get keys(){return Array.from(e.selected.keys())},get annotation(){return(0,u.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)}}})),vP=u.gK.model("RegionStore",{sort:u.gK.optional(u.gK.enumeration(["date","score"]),null!=(lP=window.localStorage.getItem(hP))?lP:"date"),sortOrder:u.gK.optional(u.gK.enumeration(["asc","desc"]),null!=(cP=window.localStorage.getItem(gP))?cP:"asc"),group:u.gK.optional(u.gK.enumeration(["type","label","manual"]),(()=>{var e;return null!=(e=window.localStorage.getItem(mP))?e:"manual"})),filter:u.gK.maybeNull(u.gK.array(u.gK.safeReference(sP)),null),view:u.gK.optional(u.gK.enumeration(["regions","labels"]),null!=(dP=window.localStorage.getItem(pP))?dP:"regions"),selection:u.gK.optional(fP,{})}).views((e=>{let t;const n=n=>(r,o)=>{if(r.shiftKey){const r=((e,n)=>{const r=[];let o=0;return K.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?A: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,u.PA)(e)},get classifications(){const t=Array.from(e.annotation.names.values()).filter((e=>(0,x.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,k.VS)(k.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,k.VS)(k.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(pP))?t:e.view}}})).actions((e=>({addRegion(t){e.regions.push(t),(0,u._$)(e).events.invoke("entityCreate",t)},toggleSortOrder(){"asc"===e.sortOrder?e.sortOrder="desc":e.sortOrder="asc"},setView(t){(0,k.VS)(k.TU)&&window.localStorage.setItem(pP,t),e.view=t},setSort(t){e.sort===t?e.toggleSortOrder():(e.sortOrder="asc",e.sort=t),window.localStorage.setItem(hP,e.sort),window.localStorage.setItem(gP,e.sortOrder),e.initHotkeys()},setGrouping(t){e.group=t,window.localStorage.setItem(mP,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,u.Yo)(t);const n=e.filterByParentID(t.id);n&&n.forEach((e=>e.setParentID(t.parentID))),(0,u._$)(e).events.invoke("entityDelete",t),(0,u.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,u.k4)(e,(t=>{"add"!==t.op&&"delete"!==t.op||-1===t.path.indexOf("/regions/")||e.initHotkeys()})),e.view=null!=(t=window.localStorage.getItem(pP))?t:e.annotation.store.settings.displayLabelsByDefault?"labels":"regions"},initHotkeys(){uP.unbindAll(),e.sortedRegions.forEach(((t,n)=>{uP.addKey("alt+shift+"+(n+1),(()=>{e.unselectAll(),t.selectRegion()}))})),uP.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,x.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,x.isDefined)(n)||(n=!e.selection.isSelected(t)),n?e.selection.select(t):e.selection.unselect(t)}})));var yP;const bP="relations:order",xP=u.gK.model("Relation",{id:u.gK.optional(u.gK.identifier,R),node1:u.gK.reference(XT),node2:u.gK.reference(XT),direction:u.gK.optional(u.gK.enumeration(["left","right","bi"]),"right"),labels:u.gK.maybeNull(u.gK.array(u.gK.string))}).volatile((()=>({showMeta:!1,visible:!0}))).views((e=>({get parent(){return(0,u.k2)(e,wP)},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,u._n)(e))return!1;const{node1:t,node2:n}=e,[r,o]=[t.item_index,n.item_index];return(!(0,x.isDefined)(r)||!t.object.multiImage||r===t.object.currentImage)&&(!(0,x.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}}))),wP=u.gK.model("RelationStore",{relations:u.gK.array(xP),order:u.gK.optional(u.gK.enumeration(["asc","desc"]),null!=(yP=window.localStorage.getItem(bP))?yP:"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,u.Zn)(e);let n=null;K.traverseTree(t.annotationStore.root,(e=>{if("relations"===e.type)return n=e,_})),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=xP.create({node1:t,node2:n});return e.relations.push(r),r},deleteRelation(t){e.relations=e.relations.filter((e=>e.id!==t.id)),(0,u.zr)(t)},deleteNodeRelation(t){const n=e.findRelations(t);n.length&&n.forEach(e.deleteRelation)},deleteAllRelations(){e.relations.forEach((e=>(0,u.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(bP,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}}))),CP=wP,SP=["id","value","type"],jP=kr("Annotations","Annotations");const kP=u.gK.model("TrackedState",{areas:u.gK.map(XT),relationStore:u.gK.optional(CP,{})}),OP=u.gK.model("AnnotationBase",Object.assign({id:u.gK.identifier,pk:u.gK.maybeNull(u.gK.string),selected:u.gK.optional(u.gK.boolean,!1),type:u.gK.enumeration(["annotation","prediction","history"]),createdDate:u.gK.optional(u.gK.string,un.UDate.currentISODate()),createdAgo:u.gK.maybeNull(u.gK.string),createdBy:u.gK.optional(u.gK.string,"Admin"),user:u.gK.optional(u.gK.maybeNull(u.gK.safeReference(tP)),null),parent_prediction:u.gK.maybeNull(u.gK.integer),parent_annotation:u.gK.maybeNull(u.gK.integer),last_annotation_history:u.gK.maybeNull(u.gK.integer),comment_count:u.gK.maybeNull(u.gK.integer),unresolved_comment_count:u.gK.maybeNull(u.gK.integer),loadedDate:u.gK.optional(u.gK.Date,(()=>new Date)),leadTime:u.gK.maybeNull(u.gK.number),draftSaved:u.gK.maybe(u.gK.string),userGenerate:u.gK.optional(u.gK.boolean,!0),sentUserGenerate:u.gK.optional(u.gK.boolean,!1),localUpdate:u.gK.optional(u.gK.boolean,!1),ground_truth:u.gK.optional(u.gK.boolean,!1),skipped:!1,trackedState:u.gK.optional(kP,{}),history:u.gK.optional(RT,{targetPath:"../trackedState"}),dragMode:u.gK.optional(u.gK.boolean,!1),editable:u.gK.optional(u.gK.boolean,!0),readonly:u.gK.optional(u.gK.boolean,!1),suggestions:u.gK.map(XT),regionStore:u.gK.optional(vP,{regions:[]}),isDrawing:u.gK.optional(u.gK.boolean,!1),commentStore:u.gK.optional(aP,{comments:[]})},(0,k.VS)(k.cE)?{root:De.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,k.VS)(k.cE)&&(l=d(e.root.toJSON())),c&&"number"!=typeof c&&(c=c.id),Object.assign({},e,(0,k.VS)(k.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,k.VS)(k.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,u.Zn)(e)},get list(){return(0,u.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,u._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,x.isDefined)(e.versions.result),n=(0,x.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,k.VS)(k.cE)?{names:new Map,toNames:new Map,ids:new Map}:{})).views((e=>({get canBeReviewed(){var t,n,r;const o=e.store;return(0,k.VS)(k.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,u._$)(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()},setEditable(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,u.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,u._$)(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,u.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,u.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,u.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 A})),null==(t=n)||t},traverseTree:t=>K.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,u._$)(e).events.invoke("entityDelete",t),e.relationStore.deleteNodeRelation(t),"polygonregion"===t.type&&(0,u.Yo)(t),(0,u.zr)(t),e.setIsDrawing(!1)},deleteArea(e){(0,u.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,k.VS)(k.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,u.L3)((function*(){if((0,u._$)(e).events.hasEvent("submitDraft")&&!e.isReadOnly()){if(yield(0,x.delay)(0),e.autosave)return e.autosave.cancel(),void(e.autosave.paused=!1);e.autosave=zn()((()=>{e.autosave.paused||e.saveDraft()}),e.autosaveDelay,{leading:!1}),(0,u.aQ)(e.areas,e.autosave)}})),async saveDraft(t){if(e.submissionStarted)return;if(!e.editable)return;const n=e.serializeAnnotation({fast:!0});return(0,k.VS)(k.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(un.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,k.VS)(k.cE)){const{names:t,toNames:n}=K.extractNames(e.root);t.forEach(((t,n)=>e.names.set(n,t))),n.forEach(((t,n)=>e.toNames.set(n,t))),K.traverseTree(e.root,(t=>{var n;const r=null!=(n=t.id)?n:t.name;r&&e.ids.set(K.cleanUpId(r),t),e.store.task&&t.updateValue&&t.updateValue(e.store)}))}e.userGenerate&&!e.sentUserGenerate&&(e.loadedDate=new Date)},setupHotKeys(){jP.unbindAll();let t=0,n=null;const r="shift+space";let o=r;e.traverseTree((e=>{e&&e.onHotKey&&e.hotkey&&jP.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,jP.addKey(o,e.onHotKey,"Play an audio",`${kr.DEFAULT_SCOPE},${kr.INPUT_SCOPE}`),t++)})),e.traverseTree((e=>{if(e&&e.onHotKey&&!e.hotkey){const t=jP.makeComb();if(!t)return;e.hotkey=t,jP.addKey(e.hotkey,e.onHotKey)}})),n&&t>1&&(n.hotkey=`${r}+1`,jP.addKey(n.hotkey,n.onHotKey),jP.removeKey(r)),kr.setScope(kr.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:R(),object:l},t,{value:t,results:[c]}),h=null==e||null==(s=e.areas)?void 0:s.put(d);if(null==l||null==l.afterResultCreated||l.afterResultCreated(h),h)return h.classification||(0,u._$)(e).events.invoke("entityCreate",h),i||e.afterCreateResult(h,r),h},afterCreateResult(t,n){e.store.settings.selectAfterCreate?t.classification||setTimeout((()=>(0,u._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]=R()),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,k.VS)(k.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,x.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,u.Zn)(e).autoAcceptSuggestions?((0,k.VS)(k.$b)&&e.history.setReplaceNextUndoState(!0),e.acceptAllSuggestions()):e.suggestions.forEach((t=>{t.supportSuggestions||(e.acceptSuggestion(t.id),(0,k.VS)(k.$b)&&n.setReplaceNextUndoState(!0))})),e.isSuggestionsAccepting=!1,(0,k.VS)(k.$b)||n.freeze("richtext:suggestions"),e.names.forEach((e=>null==e.needsUpdate?void 0:e.needsUpdate({suggestions:!0}))),(0,k.VS)(k.$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([Mj.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,nr.A)(t,SP);let{from_name:d,to_name:u}=c;const h=null!=(o=e.names.get(c.to_name))?o:{},g=h.type,m=`${a||R()}#${e.id}`,p=`${c.from_name}@${m}`,f=e.prepareValue(s,g);(0,k.VS)(k.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 gt.properties.value.propertyNames.forEach((e=>{delete t[e]})),t}(f),{value:f})),(0,k.VS)(k.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,x.isDefined)(e.start)&&(0,x.isDefined)(e.end),n=!(0,x.isDefined)(e.startOffset)&&!(0,x.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,k.VS)(k.$b))},rejectAllSuggestions(){Array.from(e.suggestions.keys()).forEach((t=>{e.suggestions.delete(t)})),e.deleteAllDynamicregions((0,k.VS)(k.$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,k.VS)(k.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)))}}))),RP=u.gK.compose("Annotation",U,OP),EP=["reg","box","frame","workingArea","selected","draggable","listening","onDragMove"],_P=(0,v.PA)((e=>{var t;let{reg:n,box:r,frame:o,workingArea:i,selected:a,draggable:s,listening:l,onDragMove:c}=e,d=(0,nr.A)(e,EP);const u=Hk(n,{includeFill:!0}),{realWidth:h,realHeight:g,scale:p}=i,f=(0,m.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,E.jsxs)(mj.YJ,{children:[(0,E.jsx)(Rk,{reg:n,box:f,scale:p,color:u.strokeColor,strokeWidth:u.strokeWidth,adjacent:!0}),(0,E.jsx)(mj.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(Sj.X,e.width()*n)),e.height(Math.max(Sj.Y,e.height()*r)));e.scaleX(1),e.scaleY(1)})(e.target,"rect")},onTransformEnd:v,onDragMove:v,onDragEnd:v},d))]})})),AP=(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)}},TP=(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=AP(t,n,0,0,i),s=AP(t,n,r,0,i),l=AP(t,n,r,o,i),c=AP(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},PP=(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)}))},IP=["reg","frame","stageRef"],LP=e=>(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(mj.rw,Object.assign({},e,{strokeWidth:2,stroke:"#fff"})),(0,E.jsx)(mj.rw,Object.assign({},e,{fill:Ct()("#617ADA").alpha(.1).css(),strokeWidth:2,stroke:"#617ADA",dash:[2,2]}))]}),MP=(0,v.PA)((({regions:e,item:t,locked:n,isDrawing:r,workinAreaCoordinates:o,stageRef:i,onDragMove:a})=>(0,E.jsx)(E.Fragment,{children:e.map((e=>(0,E.jsx)(KP,{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)))}))),KP=(0,v.PA)((e=>{let{reg:t,frame:n,stageRef:r}=e,o=(0,nr.A)(e,IP);const i=t.getShape(n);return t.isInLifespan(n)&&i&&(0,E.jsx)(_P,Object.assign({reg:t,box:i,frame:n,onClick:e=>{const n=(0,u.k2)(t,RP);n&&n.isLinkingMode&&(r.current.container().style.cursor=N.A.DEFAULT_CURSOR),t.setHighlight(!1),t.onClickRegion(e)}},o))})),DP=(0,v.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,m.useState)(),[p,f]=(0,m.useState)(!1),v=t.filter((t=>(t.selected||t.inSelection)&&!t.hidden&&!t.isReadOnly()&&t.isInLifespan(e.frame))),y=!a;t.map((e=>(0,x.fixMobxObserve)(e.sequence)));const b=(0,m.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]),w=(0,m.useMemo)((()=>({width:b.width,height:b.height,scaleX:o,scaleY:o,position:{x:b.x,y:b.y}})),[b,o]),C=(0,m.useCallback)(((e,t)=>{const{x:n,y:r}=b;return{x:(e-n)/o,y:(t-r)/o}}),[b,o]);(0,m.useEffect)((()=>{if(!p&&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)}}),[p,b,i]);const S=({x:e,y:t})=>s?{x:e,y:t}:{x:(0,MC.clamp)(e,0,b.realWidth),y:(0,MC.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(!p||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(!p||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,E.jsxs)(mj.BI,Object.assign({ref:c,width:n,height:r,style:{position:"absolute",zIndex:1},listening:y},j,{children:[(0,E.jsx)(mj.Wd,Object.assign({},w,{children:(0,E.jsx)(MP,{regions:t,item:e,layerProps:w,locked:a,isDrawing:p,workinAreaCoordinates:b,onDragMove:PP(b,!s),stageRef:c})})),null!=(d=e.annotation)&&d.isReadOnly()||!p?null:(0,E.jsx)(mj.Wd,Object.assign({},w,{children:(0,E.jsx)(LP,Object.assign({},h))})),(null==(u=e.annotation)||!u.isReadOnly())&&(null==v?void 0:v.length)>0?(0,E.jsx)(mj.Wd,{children:(0,E.jsx)(mj.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:TP(b,!s),onDragMove:PP(b,!s)})}):null]}))})),NP=(0,k.VS)(k.vS);const VP=(0,v.WQ)("store")((0,v.PA)((({item:e,store:t})=>{var n,r;if(!e._value)return null;const o=!t.settings.videoDrawOutside,i=(0,m.useRef)(),a=(0,m.useRef)(),s=(0,m.useRef)(),l=(0,m.useRef)(),[c,d]=(0,m.useState)(!1),[u,h]=(0,m.useState)(0),[g,p]=(0,m.useState)(!1),[f,v]=(0,m.useState)(1),[y,b]=(0,m.useState)(null),[w,C]=(0,m.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,m.useState)({zoom:1,pan:{x:0,y:0}}),i=(0,m.useRef)({});i.current.video=e,i.current.canvas=t,i.current.shouldClampPan=n;const a=(0,m.useCallback)(((e,t)=>{if(!n)return e;const r=(0,x.clamp)((i.current.video.width*t-i.current.canvas.width)/2,0,Number.POSITIVE_INFINITY),o=(0,x.clamp)((i.current.video.height*t-i.current.canvas.height)/2,0,Number.POSITIVE_INFINITY);return{x:(0,x.clamp)(e.x,-r,r),y:(0,x.clamp)(e.y,-o,o)}}),[]);return[r,{setZoomAndPan:(0,m.useCallback)((e=>o((t=>{const n=e instanceof Function?e(t):e,{zoom:r,pan:o}=t,i=jT(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,m.useCallback)((e=>o((({zoom:t,pan:n})=>{const r=jT(e instanceof Function?e(t):e);return{zoom:r,pan:{x:n.x/t*r,y:n.y/t*r}}}))),[]),setPan:(0,m.useCallback)((e=>o((t=>(e=e instanceof Function?e(t.pan):e,Object.assign({},t,{pan:e}))))),[])}]}(w,e.ref.current?{width:e.ref.current.width,height:e.ref.current.height}:{width:0,height:0},o),[_,A]=(0,m.useState)(!1),[T,P,I,L]=n_(!1),M=ur({onEnterFullscreen(){P()},onExitFullscreen(){I()}}),K=(0,m.useCallback)((e=>{if(e!==f&&u){const t=(0,x.clamp)(e,1,u);v(t)}}),[f,u]),D=(0,m.useCallback)((e=>{e!==u&&h(e)}),[u]),V=(0,m.useMemo)((()=>(0,x.isDefined)(null==e?void 0:e.videoControl)),[e]),z=(0,m.useMemo)((()=>(0,x.isDefined)(null==e?void 0:e.timelineControl)),[e]);(0,m.useEffect)((()=>{const e=s.current,t=e=>{e.shiftKey&&e.preventDefault()};return e.addEventListener("wheel",t),()=>e.removeEventListener("wheel",t)}),[]),(0,m.useEffect)((()=>{const e=e=>{if(e.code.startsWith("Shift")&&(e.preventDefault(),!_)){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,m.useEffect)((()=>{const e=M.getElement();T&&!e?M.enter(l.current):!T&&e&&M.exit()}),[T]);const B=(0,m.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,x.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,m.useCallback)((t=>{if(!_)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)}),[_,j]),F=(0,m.useCallback)((()=>{O((e=>e+.1))}),[]),W=(0,m.useCallback)((()=>{O((e=>e-.1))}),[]),$=(0,m.useCallback)((()=>{k({zoom:e.ref.current.videoDimensions.ratio,pan:{x:0,y:0}})}),[]),U=(0,m.useCallback)((()=>{k({zoom:1,pan:{x:0,y:0}})}),[]),Z=(0,m.useCallback)(((t,n)=>{K(t),D(n),e.setOnlyFrame(t)}),[e,K,D]),Y=(0,m.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,m.useCallback)((e=>{C(e)}),[]),q=(0,m.useCallback)((()=>{p(!1),K(u)}),[u,K,p]),J=(0,m.useCallback)((()=>{p((t=>NP?(e.ref.current.playing||(e.ref.current.play(),e.triggerSyncPlay()),!0):!1===t?(e.ref.current.play(),e.triggerSyncPlay(),!0):t))}),[]),Q=(0,m.useCallback)((()=>{p((t=>NP?(e.ref.current.playing&&(e.ref.current.pause(),e.triggerSyncPause()),!1):!0===t?(e.ref.current.pause(),e.triggerSyncPause(),!1):t))}),[]),ee=(0,m.useCallback)(((t,n,r)=>{const o=e.findRegion(n),i=(null==o?void 0:o.selected)||(null==o?void 0:o.inSelection);!o||(0,x.isDefined)(r)&&i===r||o.onClickRegion()}),[e]),te=(0,m.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,m.useCallback)((t=>{f!==t&&(e.setFrame(t),K(t))}),[e,f]);(0,m.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:N.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,E.jsx)(Kn,{item:e,children:(0,E.jsxs)(Qe.eB,{name:"video-segmentation",ref:l,mod:{fullscreen:T},children:[null==(r=e.errors)?void 0:r.map(((e,t)=>(0,E.jsx)(Te,{error:e},`err-${t}`))),(0,E.jsx)(Qe.eB,{name:"video",mod:{fullscreen:T},ref:i,children:(0,E.jsx)(Qe.Sl,{name:"main",ref:s,style:{height:Number(e.height)},onMouseDown:H,onWheel:B,children:y&&(0,E.jsxs)(E.Fragment,{children:[c&&V&&(0,E.jsx)(DP,{item:e,zoom:S,pan:j,locked:_,regions:e.regs,width:y[0],height:y[1],workingArea:w,allowRegionsOutsideWorkingArea:!o,stageRef:a}),(0,E.jsx)(OT,{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,E.jsx)(Qe.Sl,{name:"timeline",tag:oS,playing:g,length:u,position:f,regions:re,height:e.timelineheight,altHopSize:t.settings.videoHopSize,allowFullscreen:!1,fullscreen:T,defaultStepSize:16,disableView:!z&&!V,framerate:e.framerate,controls:{FramesControl:!0},customControls:[{position:"left",component:()=>(0,E.jsx)(J_.Trigger,{inline:T,content:(0,E.jsxs)(xT,{size:"auto",closeDropdownOnItemClick:!1,children:[(0,E.jsx)(xT.Item,{onClick:F,children:"Zoom In"}),(0,E.jsx)(xT.Item,{onClick:W,children:"Zoom Out"}),(0,E.jsx)(xT.Item,{onClick:$,children:"Zoom To Fit"}),(0,E.jsx)(xT.Item,{onClick:U,children:"Zoom 100%"})]}),children:(0,E.jsx)(Qa,{size:"small",nopadding:!0,children:(0,E.jsx)(Km,{})})},"dd")}],onPositionChange:ne,onPlay:J,onPause:Q,onFullscreenToggle:L,onSelectRegion:ee,onStartDrawing:e.startDrawing,onFinishDrawing:e.finishDrawing,onAction:te})]})})})));b.addTag("video",IT,VP),b.addObjectType(IT);var zP=n(76694);const BP={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"},HP=e=>{var t;const{item:n,index:r,readonly:o}=e,i=(0,m.useMemo)((()=>n.html?(0,Ae.sanitizeHtml)(n.html):""),[n.html]),[a,s,l]=(0,m.useContext)(ZP),c=null!=(t=s[n.id])&&t,d=a?()=>l(n.id,!c):void 0,u=[BP.item,"htx-ranker-item"];return a&&u.push(c?BP.collapsed:BP.expanded),(0,E.jsx)(zP.sx,{draggableId:n.id,index:r,isDragDisabled:o,children:e=>(0,E.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,E.jsx)("h3",{className:BP.itemTitle,onClick:d,children:n.title}),n.body&&(0,E.jsx)("p",{className:BP.itemLine,children:n.body}),n.html&&(0,E.jsx)("p",{className:BP.itemLine,dangerouslySetInnerHTML:{__html:i}}),(0,E.jsx)("p",{className:BP.itemLine,children:n.id})]}))})},FP=["children"],WP=e=>{let{children:t}=e,n=(0,nr.A)(e,FP);const[r,o]=(0,m.useState)(!1);return(0,m.useEffect)((()=>{const e=requestAnimationFrame((()=>o(!0)));return()=>{cancelAnimationFrame(e)}}),[]),r?(0,E.jsx)(zP.gL,Object.assign({},n,{children:t})):null},$P=({items:e,title:t})=>{const[,n,r]=(0,m.useContext)(ZP),o=e.every((e=>n[e.id]));return(0,E.jsxs)("h1",{className:[BP.columnTitle,o?BP.collapsed:BP.expanded].join(" "),children:[t,(0,E.jsx)("button",{type:"button",onClick:()=>r(e.map((e=>e.id)),!o),children:(0,E.jsx)("span",{})})]})},UP=e=>{const{column:t,items:n,readonly:r}=e,[o]=(0,m.useContext)(ZP),i=o?(0,E.jsx)($P,{items:n,title:t.title}):(0,E.jsx)("h1",{className:BP.columnTitle,children:t.title});return(0,E.jsxs)("div",{className:[BP.column,"htx-ranker-column"].join(" "),children:[i,(0,E.jsx)(WP,{droppableId:t.id,children:e=>(0,E.jsxs)("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:BP.dropArea,children:[n.map(((e,t)=>(0,E.jsx)(HP,{item:e,index:t,readonly:r},e.id))),e.placeholder]}))})]})},ZP=(0,m.createContext)([!0,{},(e,t)=>{}]),GP=({inputData:e,handleChange:t,readonly:n,collapsible:r=!0})=>{const[o,i]=(0,m.useState)(e),[a,s]=(0,m.useState)({}),l=(0,m.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,m.useEffect)((()=>{i(e)}),[e]);return(0,E.jsx)(ZP.Provider,{value:[r,a,l],children:(0,E.jsx)(zP.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,E.jsx)("div",{className:BP.board,children:(0,E.jsx)(E.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,E.jsx)(UP,{column:e,items:i,readonly:n},e.id)}))})})})})},YP=u.gK.model({type:"list",value:u.gK.maybeNull(u.gK.string),_value:u.gK.frozen([]),title:u.gK.optional(u.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=S(e.value,t.task.dataObj);Array.isArray(n)&&(e._value=n.map((e=>Object.assign({},e,{id:String(e.id)}))))}}))),XP=u.gK.compose("ListModel",On,Ue,Ne,YP),qP=(0,v.WQ)("store")((0,v.PA)((({item:e})=>{const t=e.dataSource;return t?e.ranker?null:(0,E.jsx)(m.StrictMode,{children:(0,E.jsx)(GP,{inputData:t,readonly:!0})}):null})));b.addTag("list",XP,qP),b.addObjectType(XP);const JP=e=>(e<10?"0":"")+e,QP=u.gK.model({toname:u.gK.maybeNull(u.gK.string),format:u.gK.maybeNull(u.gK.string),only:u.gK.maybeNull(u.gK.string),min:u.gK.maybeNull(u.gK.string),max:u.gK.maybeNull(u.gK.string),step:u.gK.maybeNull(u.gK.string),defaultvalue:u.gK.maybeNull(u.gK.string),hotkey:u.gK.maybeNull(u.gK.string)}),eI=u.gK.model({pid:u.gK.optional(u.gK.string,R),type:"datetime"}).views((e=>({selectedValues:()=>e.datetime,get holdsState(){return!(e.onlyTime&&!(0,x.isDefined)(e.time))&&((0,x.isDefined)(e.month)||(0,x.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(),JP(n.getMonth()+1),JP(n.getDate())].join("-")},get date(){var t;return null!=(t=e.only)&&t.includes("year")?e.year:e.month&&e.year?[e.year,JP(e.month),JP(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:WA.DCK("%H:%M"),formatDateTime:WA.DCK(t),parseDateTime:WA.T6w(t)}})).volatile((e=>{var t,n;const r=[],o=[],i=WA.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(){Sn.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||(Sn.warning(`Date "${i}" is not valid: ${o.join(", ")}.`),!1)}}})),tI=u.gK.compose("DateTimeModel",JR,zE,kE,qe,ft,...(0,k.VS)(k.gF)?[SE]:[],Ne,QP,eI),nI=(0,v.WQ)("store")((0,v.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,m.useState)("");e.updateValue&&(!e.showDate||void 0!==e.date&&e.date===s||l(e.date||""),e.setNeedsUpdate(!1));return(0,E.jsxs)("div",{className:"htx-datetime",style:r,ref:e.elementRef,children:[e.showMonth&&(0,E.jsxs)("select",Object.assign({},o,{name:`${e.name}-date`,disabled:n,value:e.month,onChange:n?void 0:e.onMonthChange,children:[(0,E.jsx)("option",{value:"",children:"Month..."}),e.months.map(((e,t)=>(0,E.jsx)("option",{value:t+1,children:e},e)))]})),e.showYear&&(0,E.jsxs)("select",Object.assign({},o,{name:`${e.name}-year`,disabled:n,value:e.year||"",onChange:n?void 0:e.onYearChange,children:[(0,E.jsx)("option",{value:"",children:"Year..."}),e.years.map((e=>(0,E.jsx)("option",{value:e,children:e},e)))]})),e.showDate&&(0,E.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,E.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}))]})})));b.addTag("datetime",tI,nI);const rI=u.gK.model({toname:u.gK.maybeNull(u.gK.string),min:u.gK.maybeNull(u.gK.string),max:u.gK.maybeNull(u.gK.string),step:u.gK.maybeNull(u.gK.string),defaultvalue:u.gK.maybeNull(u.gK.string),slider:u.gK.optional(u.gK.boolean,!1),hotkey:u.gK.maybeNull(u.gK.string)}),oI=u.gK.model({pid:u.gK.optional(u.gK.string,R),type:"number",number:u.gK.maybeNull(u.gK.number)}).views((e=>({selectedValues:()=>e.number,get holdsState(){return(0,x.isDefined)(e.number)}}))).actions((e=>{const t={validateValue:e.validateValue};return{validateValue(n){if(!t.validateValue(n))return!1;if(!(0,x.isDefined)(n))return!0;const r=[];if((0,x.isDefined)(e.min)&&ne.max&&r.push(`Value must be less than or equal to ${e.max}`),(0,x.isDefined)(e.step)){const t=Number.parseFloat(e.step),o=(n-((0,x.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||(Sn.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,x.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,x.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,x.isDefined)(e.number)?e.number:"")},updateFromResult(){this.needsUpdate()},requiredModal(){Sn.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()}})),iI=u.gK.compose("NumberModel",JR,zE,kE,qe,ft,...(0,k.VS)(k.gF)?[SE]:[],Ne,rI,oI),aI=(0,v.WQ)("store")((0,v.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,Qe.cn)("number").toClassName();return(0,E.jsxs)("div",{className:d,style:s,ref:e.elementRef,children:[(0,E.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,x.isDefined)(e.min)?Number(e.min):void 0,max:(0,x.isDefined)(e.max)?Number(e.max):void 0,onChange:c?void 0:e.onChange}),e.slider&&(0,E.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,E.jsxs)("sup",{style:{fontSize:"9px"},children:["[",e.hotkey,"]"]})]})})));b.addTag("number",iI,aI);const sI=u.gK.model({toname:u.gK.maybeNull(u.gK.string),selectionstyle:u.gK.maybeNull(u.gK.string),leftclass:u.gK.maybeNull(u.gK.string),rightclass:u.gK.maybeNull(u.gK.string)}),lI=u.gK.model({type:"pairwise",selected:u.gK.maybeNull(u.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]||Sn.error("Incorrect toName parameter on Pairwise, must be two names separated by a comma: name1,name2");let t={};if(e.selectionstyle){const n=K.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)}))}}))),cI=u.gK.compose("PairwiseModel",JR,sI,lI,Ne);b.addTag("pairwise",cI,(()=>null)),b.addObjectType(cI);const dI="_",uI=u.gK.model({type:"ranker",toname:u.gK.maybeNull(u.gK.string),collapsible:u.gK.optional(u.gK.boolean,!0),children:De.unionArray(["bucket"])}).views((e=>({get list(){const t=e.annotation.names.get(e.toname);return"list"===t.type?t:null},get buckets(){return K.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:dI,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[dI]=[...null!=(h=d[dI])?h:[],...r]}}else d=Object.assign({},l,{[null!=(u=e.defaultBucket)?u:dI]: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:dI]=r,e.createResult(o)}}))),hI=u.gK.compose("RankerModel",JR,Ne,uI,qe),gI=(0,v.WQ)("store")((0,v.PA)((({item:e})=>{const t=e.dataSource;return t?(0,E.jsx)(GP,{inputData:t,handleChange:e.updateResult,readonly:e.isReadOnly(),collapsible:e.collapsible}):null}))),mI=u.gK.model("BucketModel",{id:u.gK.optional(u.gK.identifier,R),type:"bucket",name:u.gK.string,title:u.gK.maybeNull(u.gK.string),default:u.gK.optional(u.gK.boolean,!1)}),pI=(0,v.WQ)("store")((0,v.PA)((({item:e})=>(0,E.jsx)("h1",{children:e.name}))));b.addTag("ranker",hI,gI),b.addTag("bucket",mI,pI),b.addObjectType(hI);var fI=n(97141);const vI=u.gK.model({value:u.gK.maybeNull(u.gK.string),alias:u.gK.maybeNull(u.gK.string),background:u.gK.optional(Ie.color,"#333333"),hotkey:u.gK.maybeNull(u.gK.string)}),yI=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"shortcut",_value:u.gK.optional(u.gK.string,"")}).volatile((()=>({hotkeyScope:kr.INPUT_SCOPE}))).actions((e=>({onClick(){const t=(0,u.PA)(e,2);t.onShortcut&&(t.onShortcut(e.value),null==t.returnFocus||t.returnFocus())},onHotKey(t){const n=(0,u.PA)(e,2),r=(t.target||t.srcElement).name;if(n.name===r||r.startsWith(`${n.name}:`))return t.preventDefault(),e.onClick()}}))),bI=u.gK.compose("ShortcutModel",vI,yI,Ue),xI=(0,v.WQ)("store")((0,v.PA)((({item:e,store:t})=>{const n={background:Ct()(e.background).alpha(.15),color:"#333333",cursor:"pointer",margin:"5px"};return(0,E.jsxs)(fI.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,E.jsxs)(gr,{children:["[",e.hotkey,"]"]})]})})));b.addTag("shortcut",bI,xI);var wI=n(44318);const CI=m.forwardRef((({treeData:e,onChange:t},n)=>{(0,m.useImperativeHandle)(n,(()=>({resetValue(){i(""),t(e,[])},focus(){var e;return null==(e=r.current)?void 0:e.focus()}})));const r=(0,m.useRef)(),[o,i]=(0,m.useState)("");(0,m.useEffect)((()=>{const n=l(e,o);t(n.filteredDataTree,null)}),[e]);const a=(0,m.useCallback)((e=>"string"==typeof e?e:"object"==typeof e.props.children?a(e.props.children):e.props.children),[]),s=(0,m.useCallback)(((e,t)=>{const n=String(e).toLowerCase(),r=a(t.title);return!!n&&String(r).toLowerCase().includes(n)}),[]),l=(0,m.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,m.useCallback)((0,MC.debounce)((async n=>{const r=l(e,n.target.value);t(r.filteredDataTree,r.expandedKeys)}),300),[e]);return(0,E.jsx)(Qe.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"})})),SI=({items:e,selected:t,onChange:n,onLoadData:r,defaultSearch:o=!0,options:i})=>{var a;const s=(0,m.useRef)(null),[l,c]=(0,m.useState)([]),[d,u]=(0,m.useState)([]),[h,g]=(0,m.useState)([]),p=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(p))),x=t.map((e=>({value:e.map((e=>e.value)).join(p),label:i.showFullPath?e.map((e=>e.label)).join(p):e.at(-1).label})));(0,m.useEffect)((()=>{c(((e,t,n)=>{const r=e=>{const t=e=>(0,E.jsx)("span",{className:"htx-taxonomy-item-color",style:{background:e.color},children:e.label});return e.hint?(0,E.jsx)(hr,{title:e.hint,mouseEnterDelay:500,children:e.color?t(e):(0,E.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,m.useCallback)((async e=>null==r?void 0:r(e.value.split(p))),[]),C=(0,m.useCallback)(((e,t)=>{u(e),null!=t&&t.length?g(t):g(void 0)}),[]),S=(0,m.useCallback)((e=>(0,E.jsxs)(E.Fragment,{children:[!o&&(0,E.jsx)(CI,{ref:s,treeData:l,onChange:C}),e]})),[l]),j=(0,m.useCallback)((e=>{var t;e?setTimeout((()=>{var e;null==(e=s.current)||e.focus()}),200):null==(t=s.current)||t.resetValue()}),[s]);return(0,E.jsx)(wI.A,{treeData:o?l:d,value:x,labelInValue:!0,onChange:e=>n(null,e.map((e=>e.value.split(p)))),loadData:w,treeCheckable:!0,showSearch:o,showArrow:!o,dropdownRender:S,onDropdownVisibleChange:j,treeExpandedKeys:o?void 0:h,onTreeExpand:e=>{g(e)},treeCheckStrictly:!0,showCheckedStrategy:wI.A.SHOW_ALL,treeExpandAction:!1,dropdownMatchSelectWidth:v,placeholder:i.placeholder||"Click to add...",style:f,className:"htx-taxonomy"})},jI=u.gK.model("SharedStoreModel",{id:u.gK.identifier,locked:!1,children:De.unionArray(["choice"])}).actions((e=>({setChildren(t){e.children=t},clear(){e.children=[]},lock(){e.locked=!0},unlock(){e.locked=!1},destroy(){e.clear(),(0,u.Yo)(e)}}))),kI=new Map,OI=new Set,RI=u.gK.optional(u.gK.maybeNull(u.gK.string),null),EI=u.gK.optional(u.gK.maybeNull(u.gK.late((()=>u.gK.reference(jI)))),null),_I=u.gK.model("SharedStoreMixin",{sharedstore:RI,store:EI}).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=kI.get(e.storeId);De.getParentOfTypeString(e,"AnnotationStore").addSharedStore(t),OI.add(e.storeId),e.store=e.storeId}}}))).preProcessSnapshot((e=>{var t;const n=null!=(t=e.sharedstore)?t:e.name;var r,o;OI.has(n)?e.store=n:kI.set(n,jI.create({id:n,children:null!=(r=null!=(o=e._children)?o:e.children)?r:[]}));return e})),AI=()=>{kI.clear(),OI.clear()},TI={taxonomy:"lsf-taxonomy",taxonomy__loading:"lsf-taxonomy__loading",taxonomy__new:"lsf-taxonomy__new"},PI=["alias","children","isLeaf","value"],II=u.gK.model({toname:u.gK.maybeNull(u.gK.string),labeling:u.gK.optional(u.gK.boolean,!1),leafsonly:u.gK.optional(u.gK.boolean,!1),showfullpath:u.gK.optional(u.gK.boolean,!1),legacy:u.gK.optional(u.gK.boolean,!1),pathseparator:u.gK.optional(u.gK.string," / "),apiurl:u.gK.maybeNull(u.gK.string),placeholder:"",minwidth:u.gK.maybeNull(u.gK.string),maxwidth:u.gK.maybeNull(u.gK.string),dropdownwidth:u.gK.maybeNull(u.gK.string),maxusages:u.gK.maybeNull(u.gK.string),value:u.gK.optional(u.gK.string,"")});const LI=new Map,MI=u.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}}})),KI=u.gK.model({pid:u.gK.optional(u.gK.string,R),type:"taxonomy",[(0,k.VS)(k.Ls)?"_children":"children"]:De.unionArray(["choice"])}).volatile((()=>({maxUsagesReached:!1,selected:[],loading:!0,_api:"",_items:[]}))).views((e=>(0,k.VS)(k.Ls)?{get children(){return e._children},set children(t){e._children=t},get isLabeling(){return(0,k.VS)(k.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 K.filterChildrenOfType(e,"ChoiceModel")},get preselectedValues(){return e.tiedChildren.filter((e=>!0===e.selected&&!e.isSkipped)).map((e=>e.resultValue))},get isLoadedByApi(){return(0,k.VS)(k.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=LI.get(e.name))?t:[];(0,k.VS)(k.Ls)&&e.store&&n.length!==e.children.length?(0,k.VS)(k.xD)?e.updateChildren():setTimeout((()=>e.updateChildren())):e.loading=!1},loadItems:(0,u.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,nr.A)(e,PI);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=et.A.ERR_LOADING_HTTP({attr:"apiUrl",error:String(t),url:e.apiurl});e.annotationStore.addErrors([Mj.generalError(n)]),console.error(t)}e.loading=!1})),beforeDestroy(){LI.delete(e.name)},updateChildren(){var t;const n=null!=(t=LI.get(e.name))?t:[];if(n.length){const t=(0,u.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(),LI.delete(e.name),r(e.children)}e.loading=!1},requiredModal(){Sn.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,k.VS)(k.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&&Sn.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,u.L3)((function*(n){var r;if(!e.isLoadedByApi)return null==t.updateValue?void 0:t.updateValue(n);e._api=S(e.apiurl,n.task.dataObj),e._api=null!=(r=yield n.presignUrlForProject(e._api))?r:e._api,yield e.loadItems()}))}})).preProcessSnapshot((e=>{if((0,k.VS)(k.Ls)){var t;const n=null!=(t=e._children)?t:e.children;n&&!LI.has(e.name)&&LI.set(e.name,n),delete e._children,delete e.children}return e})),DI=u.gK.compose("TaxonomyModel",JR,zE,II,XR,Ne,kE,KI,...(0,k.VS)(k.Ls)?[_I]:[],ft,...(0,k.VS)(k.gF)?[SE]:[],...(0,k.VS)(k.um)?[MI]:[],qe,C_,qE),NI=(0,v.PA)((({item:e})=>{const t=[TI.taxonomy,"taxonomy",(0,k.VS)(k.yD)?TI.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,k.VS)(k.Ls)&&o?(0,E.jsx)("div",{className:t,style:n,children:(0,E.jsx)("div",{className:TI.taxonomy__loading,children:(0,E.jsx)(f.A,{size:"small"})})}):(0,E.jsx)("div",{className:t,style:n,ref:e.elementRef,children:(0,k.VS)(k.yD)&&!e.legacy?(0,E.jsx)(SI,{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,k.VS)(k._m),isEditable:!e.isReadOnly()}):(0,E.jsx)(v_,{items:e.items,selected:e.selected,onChange:e.onChange,onAddLabel:e.userLabels&&e.onAddLabel,onDeleteLabel:e.userLabels&&e.onDeleteLabel,options:r,isEditable:!e.isReadOnly()})})}));b.addTag("taxonomy",DI,NI);const VI=u.gK.model({controlledTags:De.unionTag(["HyperText"])}),zI=u.gK.model("HyperTextLabelsModel",{type:"hypertextlabels",children:De.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"}}))),BI=u.gK.compose(JR,cE,zI,VI,UR,GR.props({_child:"LabelModel"})),HI=u.gK.compose("HyperTextLabelsModel",BI),FI=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("hypertextlabels",HI,FI);const WI=u.gK.model({opacity:u.gK.optional(u.gK.string,"0.9"),fillcolor:u.gK.maybeNull(u.gK.string),strokeWidth:u.gK.optional(u.gK.number,1),strokeColor:u.gK.optional(u.gK.string,"#f48a42")}),$I=u.gK.model("TimeSeriesLabelesModel",{pid:u.gK.optional(u.gK.string,R),type:"timeserieslabels",children:De.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}}))),UI=UR.props({_type:"timeserieslabels"}).views((e=>({get shouldBeUnselected(){return"single"===e.choice}}))),ZI=u.gK.compose(JR,cE,$I,WI,UI,GR.props({_child:"LabelModel"})),GI=u.gK.compose("TimeSeriesLabelsModel",ZI),YI=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("timeserieslabels",GI,YI);const XI=u.gK.model({toname:u.gK.maybeNull(u.gK.string)}),qI=u.gK.model("TimelineLabelsModel",{pid:u.gK.optional(u.gK.string,R),type:"timelinelabels"}),JI=u.gK.compose("TimelineLabelsModel",JR,cE,qI,XI,GR.props({_child:"LabelModel"})),QI=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("timelinelabels",JI,QI);const eL=u.gK.model({toname:u.gK.maybeNull(u.gK.string)}),tL=u.gK.model("VideoRectangleModel",{pid:u.gK.optional(u.gK.string,R),type:"videorectangle"}),nL=u.gK.compose("VideoRectangleModel",JR,tL,eL),rL=(0,v.PA)((()=>null));b.addTag("videorectangle",nL,rL);const oL=u.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:()=>({})}))),iL=u.gK.model().actions((e=>({afterAttach(){var t;const n=null!=(t=e.toolNames)?t:[],r=OR.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)}}))),aL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),strokewidth:u.gK.optional(u.gK.string,"15")}),sL=u.gK.model({type:"brush",removeDuplicatesNamed:"Erase"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["Brush","Erase"]}))),lL=u.gK.compose("BrushModel",JR,Ne,oL,aL,sL,iL);b.addTag("brush",lL,(()=>null));const cL=u.gK.model({controlledTags:De.unionTag(["Image"])}),dL=u.gK.model("BrushLabelsModel",{type:"brushlabels",children:De.unionArray(["label","header","view","hypertext"])}),uL=u.gK.compose("BrushLabelsModel",JR,cE,dL,lL,cL,UR,GR.props({_child:"LabelModel"})),hL=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("brushlabels",uL,hL);const gL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.2"),fillcolor:u.gK.optional(Ie.color,"#f48a42"),strokewidth:u.gK.optional(u.gK.string,"1"),strokecolor:u.gK.optional(Ie.color,"#f48a42"),fillopacity:u.gK.maybeNull(Ie.range()),canrotate:u.gK.optional(u.gK.boolean,!0)}),mL=u.gK.model({type:"ellipse"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["Ellipse"]}))),pL=u.gK.compose("EllipseModel",JR,Ne,oL,gL,mL,iL);b.addTag("ellipse",pL,(()=>null));const fL=u.gK.model("EllipseLabelsModel",{type:"ellipselabels",children:De.unionArray(["label","header","view","hypertext"])}),vL=u.gK.compose(JR,cE,fL,pL,UR,GR.props({_child:"LabelModel"})),yL=u.gK.compose("EllipseLabelsModel",vL),bL=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("ellipselabels",yL,bL);const xL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.9"),fillcolor:u.gK.optional(Ie.color,"#8bad00"),snap:u.gK.optional(u.gK.string,"none"),strokecolor:u.gK.optional(Ie.color,"#8bad00"),strokewidth:u.gK.optional(u.gK.string,"2")}),wL=u.gK.model({type:"keypoint"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["KeyPoint"],snapMode:ot}))),CL=u.gK.compose("KeyPointModel",JR,Ne,oL,xL,wL,iL);b.addTag("keypoint",CL,(()=>null));const SL=u.gK.model({controlledTags:De.unionTag(["Image"])}),jL=u.gK.model("KeyPointLabelsModel",{type:"keypointlabels",children:De.unionArray(["label","header","view","hypertext"])}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))),kL=u.gK.compose(JR,cE,jL,CL,SL,UR,GR.props({_child:"LabelModel"})),OL=u.gK.compose("KeyPointLabelsModel",kL),RL=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("keypointlabels",OL,RL);const EL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.6"),blurradius:u.gK.optional(u.gK.string,"5"),defaultthreshold:u.gK.optional(u.gK.string,"15")}),_L=u.gK.model({type:"magicwand",removeDuplicatesNamed:"Erase"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["MagicWand","Erase"]}))),AL=u.gK.compose("MagicWandModel",JR,Ne,oL,EL,_L,iL);(0,k.VS)(k.bP)&&b.addTag("magicwand",AL,(()=>null));const TL=kr("Polygons"),PL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.2"),fillcolor:u.gK.optional(Ie.color,"#f48a42"),strokewidth:u.gK.optional(u.gK.string,"2"),strokecolor:u.gK.optional(Ie.color,"#f48a42"),snap:u.gK.optional(u.gK.string,"none"),pointsize:u.gK.optional(u.gK.string,"small"),pointstyle:u.gK.optional(u.gK.string,"circle")}),IL=u.gK.model({controlledTags:De.unionTag(["Image"])}),LL=u.gK.model({type:"polygon",_value:u.gK.optional(u.gK.string,"")}).volatile((()=>({toolNames:["Polygon"]}))).actions((e=>({initializeHotkeys(){TL.addNamed("polygon:undo",(()=>{e.annotation.isDrawing&&e.annotation.undo()})),TL.addNamed("polygon:redo",(()=>{e.annotation.isDrawing&&e.annotation.redo()}))},disposeHotkeys(){TL.removeNamed("polygon:undo"),TL.removeNamed("polygon:redo")},afterCreate(){e.initializeHotkeys()},beforeDestroy(){e.disposeHotkeys()}}))),ML=u.gK.compose("PolygonModel",JR,Ne,oL,PL,IL,iL,LL);b.addTag("polygon",ML,(()=>null));const KL=u.gK.model({controlledTags:De.unionTag(["Image"])}),DL=u.gK.model("PolygonLabelsModel",{type:"polygonlabels",children:De.unionArray(["label","header","view","hypertext"])}),NL=u.gK.compose(JR,cE,DL,ML,KL,UR,GR.props({_child:"LabelModel"})),VL=u.gK.compose("PolygonLabelsModel",NL),zL=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("polygonlabels",VL,zL);const BL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.2"),fillcolor:u.gK.optional(Ie.color,"#f48a42"),strokewidth:u.gK.optional(u.gK.string,"1"),strokecolor:u.gK.optional(Ie.color,"#f48a42"),fillopacity:u.gK.maybeNull(Ie.range()),canrotate:u.gK.optional(u.gK.boolean,!0)}),HL=u.gK.model({type:"rectangle"}).volatile((()=>({toolNames:["Rect","Rect3Point"]}))),FL=u.gK.compose("RectangleModel",JR,Ne,oL,BL,HL,iL);b.addTag("rectangle",FL,(()=>null));const WL=u.gK.model({controlledTags:De.unionTag(["Image"])}),$L=u.gK.model("RectangleLabelsModel",{pid:u.gK.optional(u.gK.string,R),type:"rectanglelabels",children:De.unionArray(["label","header","view","hypertext"])}),UL=u.gK.compose(JR,cE,$L,FL,WL,UR,GR.props({_child:"LabelModel"})),ZL=u.gK.compose("RectangleLabelsModel",UL),GL=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("rectanglelabels",ZL,GL);const YL=u.gK.model({choice:u.gK.optional(u.gK.enumeration(["single","multiple"]),"multiple")}),XL=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"relations",children:De.unionArray(["relation"])}).views((e=>({get values(){return e.children.map((e=>e.value))},findRelation:t=>e.children.find((e=>e.value===t))}))).actions((()=>({}))),qL=u.gK.compose("RelationsModel",XL,YL);b.addTag("relations",qL,(()=>null));const JL=u.gK.model({value:u.gK.maybeNull(u.gK.string),background:u.gK.optional(Ie.color,N.A.RELATION_BACKGROUND)}),QL=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"relation"}).actions((()=>({}))),eM=u.gK.compose("RelationModel",JL,QL);b.addTag("relation",eM,(()=>null));var tM=n(68703);const{Panel:nM}=tM.A,rM=u.gK.model({type:"panel",_value:u.gK.optional(u.gK.string,""),value:u.gK.optional(u.gK.string,""),children:De.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"])}),oM=u.gK.model({type:"collapse",size:u.gK.optional(u.gK.string,"4"),style:u.gK.maybeNull(u.gK.string),_value:u.gK.optional(u.gK.string,""),value:u.gK.optional(u.gK.string,""),bordered:u.gK.optional(u.gK.boolean,!1),accordion:u.gK.optional(u.gK.boolean,!0),children:De.unionArray(["panel"])}),iM=u.gK.compose("CollapseModel",oM,Ue),aM=(0,v.PA)((({item:e})=>(0,E.jsx)(tM.A,{bordered:e.bordered,accordion:e.accordion,children:e.children.filter((e=>"panel"===e.type)).map((t=>(0,E.jsx)(nM,{header:t._value,children:K.renderChildren(t,e.annotation)},t._value)))})));b.addTag("panel",u.gK.compose("PanelModel",rM,Ue),(()=>{})),b.addTag("collapse",iM,aM);var sM=n(70821),lM=n(92132);const cM={block:"block--fqozC",block_selected:"block_selected--BXxdo",name:"name--sC49k",tag:"tag--efLdj",date:"date--h1U4a"};class dM extends m.Component{render(){let e,t,n,r=`${cM.block}`;return this.props.hint&&(e=(0,E.jsx)(fI.A,{color:"blue",children:this.props.hint})),this.props.bg&&(t=this.props.bg),this.props.selected&&(r=`${r} ${cM.block_selected}`,e=(0,E.jsx)("div",{children:(0,E.jsx)(fI.A,{color:"magenta",children:"Selected Message"})}),this.props.hint&&(e=(0,E.jsx)("div",{className:cM.tag,children:(0,E.jsx)(fI.A,{color:"magenta",children:this.props.hint})}))),this.props.date&&(n=(0,E.jsx)("span",{className:cM.date,children:this.props.date})),(0,E.jsxs)("div",{className:r,style:{background:t,width:"max-content",maxWidth:"100%"},children:[(0,E.jsxs)("span",{className:cM.name,children:[this.props.name,": "]}),(0,E.jsx)("p",{className:cM.text,children:this.props.text}),n,e]})}}dM.propTypes={name:Ee.PropTypes.string.isRequired,text:Ee.PropTypes.string.isRequired,selected:Ee.PropTypes.bool,date:Ee.PropTypes.string,hint:Ee.PropTypes.string};const uM=u.gK.model({name:u.gK.string,text:u.gK.string,selected:u.gK.optional(u.gK.boolean,!1),date:u.gK.optional(u.gK.string,""),hint:u.gK.optional(u.gK.string,"")}),hM=u.gK.model({value:u.gK.maybeNull(u.gK.string),name:u.gK.maybeNull(u.gK.string)}),gM=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"Dialog",data:u.gK.map(uM)}),mM=u.gK.compose("DialogModel",hM,gM,Ne),pM=(0,v.WQ)("store")((0,v.PA)((({store:e,item:t})=>{if(!e.task||!e.task.dataObj)return(0,E.jsx)(sM.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,xt.convertToRGBA)((0,xt.stringToColor)(e.name),.1)),n.push((0,E.jsx)(dM,{name:e.name,hint:e.hint,text:e.text,selected:e.selected,date:e.date,id:e.id,bg:r},t))})),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{style:{display:"flex",flexFlow:"column",maxHeight:"500px",overflowY:"scroll",paddingRight:"10px",marginTop:"10px"},children:n}),(0,E.jsx)(lM.A,{dashed:!0})]})})));b.addTag("dialog",mM,pM);const fM=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"header",size:u.gK.optional(u.gK.string,"4"),style:u.gK.maybeNull(u.gK.string),_value:u.gK.optional(u.gK.string,""),value:u.gK.optional(u.gK.string,""),underline:u.gK.optional(u.gK.boolean,!1)}),vM=u.gK.compose("HeaderModel",fM,Ue),yM=(0,v.PA)((({item:e})=>{const t=(0,x.clamp)(Number.parseInt(e.size),1,5),n=e.style?K.cssConverter(e.style):{margin:"10px 0"};return!n.fontSize&&t>4&&(n.fontSize=5===t?"1.2em":"1.1em"),(0,E.jsx)(AE.A.Title,{underline:e.underline,level:t,style:n,children:e._value})}));b.addTag("header",vM,yM);const bM=u.gK.model({classname:u.gK.optional(u.gK.string,""),display:u.gK.optional(u.gK.string,"block"),style:u.gK.maybeNull(u.gK.string),idattr:u.gK.optional(u.gK.string,"")}),xM=u.gK.model({id:u.gK.identifier,type:"view",children:De.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"])}),wM=u.gK.compose("ViewModel",bM,xM,qE,Ne),CM=(0,v.PA)((({item:e})=>{let t={};return"inline"===e.display&&(t={display:"inline-block",marginRight:"15px"}),e.style&&(t=K.cssConverter(e.style)),!1===e.isVisible&&(t.display="none"),(0,E.jsx)("div",{id:e.idattr,className:e.classname,style:t,children:K.renderChildren(e,e.annotation)})}));b.addTag("view",wM,CM);const SM=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"style",value:u.gK.optional(u.gK.string,"")}),jM=u.gK.compose("StyleModel",SM),kM=(0,v.PA)((({item:e})=>(0,E.jsx)("style",{dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(e.value)}})));b.addTag("style",jM,kM);var OM=n(31927);const RM=u.gK.model({casesensetive:u.gK.optional(u.gK.boolean,!1),cleanup:u.gK.optional(u.gK.boolean,!0),placeholder:u.gK.optional(u.gK.string,"Quick Filter"),minlength:u.gK.optional(u.gK.string,"3"),hotkey:u.gK.maybeNull(u.gK.string)}),EM=u.gK.model(Object.assign({type:"filter",_value:u.gK.maybeNull(u.gK.string)},(0,k.VS)(k.cE)?{id:u.gK.identifier,name:u.gK.string}:{name:u.gK.identifier},{toname:u.gK.maybeNull(u.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())}}))),_M=u.gK.compose("FilterModel",EM,RM,Ue,Ne),AM=(0,v.PA)((({item:e})=>{const t=e.toTag;return-1===t.type.indexOf("labels")&&-1===t.type.indexOf("choices")?null:(0,E.jsx)(OM.A,{ref:t=>{e.setInputRef(t)},value:e._value,size:"small",onChange:e.applyFilterEv,onPressEnter:e.selectFirstElement,placeholder:e.placeholder})}));function TM(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 PM(e){const t=Object.keys(e);for(const e of t){const t=RegExp(/^__reactProps(\$[^$]+)$/).exec(e);if(t)return t[1]}return""}function IM(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)TM(n[t]),n[t]=null;n.childNodes&&IM(n.childNodes,t)}}}b.addTag("filter",_M,AM);const LM=new WeakMap;function MM(e,t="default"){LM.has(e)||LM.set(e,new Map);const n=LM.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=PM(t);e=null,setTimeout((()=>{IM([t],n)}))}}}()),n.get(t)}function KM({annotation:e,root:t}){return(0,m.useLayoutEffect)((()=>()=>{e&&(0,u._n)(e)&&e.resetReady()}),[e.pk,e.id]),t?K.renderItem(t,e):null}const DM=(0,Qe.cn)("draft-panel"),NM=(0,v.PA)((({item:e})=>{if(!e.draftSaved&&!e.versions.draft)return null;const t=e.draft&&e.draftSaved?` saved ${un.UDate.prettyDate(e.draftSaved)}`:"";return e.selected?e.versions.result&&e.versions.result.length?(0,E.jsxs)("div",{className:DM,children:[(0,E.jsx)(hr,{placement:"topLeft",title:e.draftSelected?"switch to original result":"switch to current draft",children:(0,E.jsx)("button",{type:"button",onClick:()=>e.toggleDraft(),className:DM.elem("toggle"),children:e.draftSelected?"draft":"original"})}),t]}):(0,E.jsx)("div",{className:DM,children:t?`draft${t}`:"not submitted draft"}):e.draft?(0,E.jsxs)("div",{className:DM,children:["draft",t]}):null}));var VM=n(11346);const zM=["badge","className","faded","showUsername","size","src","style","user","username","useRandomBackground","children"],BM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",HM=(0,m.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:p}=e,f=(0,nr.A)(e,zM);const v=null!=(n=null==u?void 0:u.avatar)?n:c,y=(0,m.useRef)(),[b,w]=(0,m.useState)(v),[C,S]=(0,m.useState)(!1),[j,k]=(0,m.useState)(!0);(0,m.useEffect)((()=>{v!==b&&(w(v),S(!1),k(!0))}),[v]),l&&(d=Object.assign({width:l,height:l,fontSize:.4*l},d));const O=(0,m.useMemo)((()=>(0,x.userDisplayName)(u)),[u]),R=(0,m.useMemo)((()=>{if((0,x.isDefined)(u.id)){var e;const t=null!=(e=localStorage.getItem(`userpic-color-${u.id}`))?e:Ct().average([Ct().random(),"#cfcfcf"]).css();return localStorage.setItem(`userpic-color-${u.id}`,t),t}return null}),[u,g]),_=(0,m.useMemo)((()=>{if(R){return Ct().contrast(R,"#fff")>=4.5?"#fff":"#000"}return null}),[R]),A=(0,m.useCallback)((()=>{S(!0),b!==BM&&k(!1)}),[b]),T=Object.assign({},null!=(r=d)?r:{},{background:R,color:_}),P=(0,E.jsxs)(Qe.eB,Object.assign({ref:t,name:"userpic",mix:i,mod:{faded:a},style:T},f,{children:[p||(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{tag:"img",name:"avatar",ref:y,src:b,alt:(null!=O?O:"").toUpperCase(),style:{opacity:C?a?.3:1:0},onLoad:A,onError:()=>w(BM),mod:{faded:a}}),j&&(0,E.jsx)(Qe.Sl,{tag:"span",name:"username",children:(null!=O?O:"").slice(0,2).toUpperCase()})]}),o&&Object.entries(o).map((([e,t],n)=>(0,E.jsx)(Qe.Sl,{name:"badge",mod:{[e]:!0},children:t},`badge-${n}`)))]})),I=(0,m.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,E.jsx)(hr,{title:I,children:P}):P}));HM.displayName="Userpic";const FM=(0,v.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}})),WM=(0,v.PA)((({annotation:e,inline:t,isSelected:n})=>{var r;const o=e.history.hasChanges,i=e.list,a=i.store.hasInterface("annotations:hide-info"),s=a?{email:"Me"}:null,[l,c]=(0,m.useState)(!1);return(0,m.useEffect)((()=>c(!0)),[e.history.history.length]),(0,m.useEffect)((()=>c(!1)),[e.draftSaved]),o||e.versions.draft?(0,E.jsx)(ZM,{user:null!=(r=null!=s?s:e.user)?r:{email:e.createdBy},date:e.draftSaved,extra:e.isDraftSaving?(0,E.jsx)(Qe.Sl,{name:"saving",children:(0,E.jsx)(Qe.Sl,{name:"spin"})}):l?(0,E.jsx)(Qe.Sl,{name:"saving",children:(0,E.jsx)(Qe.Sl,{name:"dot"})}):o?(0,E.jsx)(Qe.Sl,{name:"saving",children:(0,E.jsx)(Qe.Sl,{name:"saved",component:Cu})}):null,inline:t,comment:"",acceptedState:"draft_created",selected:n,hideInfo:a,onClick:()=>{i.selectHistory(null),e.toggleDraft(!0)}},"draft"):null})),$M=({reason:e,comment:t})=>{const[n,r]=(0,m.useState)(!1),[o,i]=(0,m.useState)(!1),a=(0,m.useRef)();return(0,m.useLayoutEffect)((()=>{if(a.current){const{clientHeight:e}=a.current,t=e>66;i(t),r(t)}}),[]),(0,E.jsxs)(Qe.Sl,{name:"comment",ref:a,mod:{collapsed:n},children:[(0,E.jsx)(Qe.Sl,{name:"comment-content","data-reason":`${e}${t?": ":""}`,children:t}),o&&(0,E.jsx)(Qe.Sl,{name:"collapse-comment",mod:{collapsed:n},onClick:e=>{e.stopPropagation(),r((e=>!e))},children:n?"Show more":"Show less"})]})},UM=({type:e})=>{const t=(0,m.useMemo)((()=>{switch(e){case"submitted":case"updated":return(0,E.jsx)(Hb,{style:{color:"#617ADA"}});case"draft_created":return(0,E.jsx)(Jb,{style:{color:"#617ADA"}});case"accepted":return(0,E.jsx)(Cb,{style:{color:"#2AA000"}});case"rejected":return(0,E.jsx)(Ab,{style:{color:"#dd0000"}});case"fixed_and_accepted":return(0,E.jsx)(Cb,{style:{color:"#FA8C16"}});case"prediction":return(0,E.jsx)(fx,{style:{color:"#944BFF"}});case"imported":return(0,E.jsx)(Px,{style:{color:"#2AA000"}});case"skipped":return(0,E.jsx)(jx,{style:{color:"#dd0000"}});case"deleted_review":return(0,E.jsx)(zx,{style:{color:"#dd0000"}});case"propagated_annotation":return(0,E.jsx)(Yx,{style:{color:"#2AA000"}});default:return null}}),[e]);return t&&(0,E.jsx)(Qe.Sl,{name:"history-icon",children:t})},ZM=(0,v.PA)((({entity:e,user:t,date:n,extra:r,comment:o,acceptedState:i,selected:a=!1,disabled:s=!1,inline:l=!1,hideInfo:c,onClick:d})=>{const u="prediction"===(null==e?void 0:e.type),h=(0,m.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}}),[]),g=(0,m.useCallback)((e=>{s||d(e)}),[d,s]);return(0,E.jsxs)(Qe.eB,{name:"history-item",mod:{inline:l,selected:a,disabled:s},onClick:g,children:[(0,E.jsxs)(ns,{spread:!0,size:"medium",truncated:!0,children:[(0,E.jsxs)(ns,{size:"small",truncated:!0,children:[(0,E.jsx)(Qe.Sl,{tag:HM,user:t,name:"userpic",showUsername:!0,username:u?e.createdBy:null,mod:{prediction:u},children:u&&(0,E.jsx)($s,{style:{width:16,height:16}})}),(0,E.jsx)(Qe.Sl,{name:"name",tag:"span",children:u?e.createdBy:(0,x.userDisplayName)(t)})]}),!c&&(0,E.jsxs)(ns,{size:"small",children:[r&&(0,E.jsx)(Qe.Sl,{name:"date",children:r}),n&&(0,E.jsx)(Qe.Sl,{name:"date",children:(0,E.jsx)(VM.A,{placement:"topRight",title:new Date(n).toLocaleString(),children:(0,x.humanDateDiff)(n)})})]})]}),(h||o)&&(0,E.jsxs)(Qe.Sl,{name:"action",tag:ns,size:"small",children:[i&&(0,E.jsx)(UM,{type:i}),(0,E.jsx)($M,{comment:o,reason:h})]})]})}));ZM.displayName="HistoryItem";const GM=FM((0,v.PA)((({annotationStore:e,selectedHistory:t,history:n,enabled:r=!0,showDraft:o=!1,inline:i=!1})=>{var a;const s=e.selected,l=null!=n&&n.length?n[0]:null,c=s.history.hasChanges,u=e.store.hasInterface("annotations:hide-info"),h=null==(a=window.APP_SETTINGS)?void 0:a.user,g=!e.selectedHistory&&(s.draftSelected||!s.versions.draft&&c);return(0,E.jsxs)(Qe.eB,{name:"annotation-history",mod:{inline:i},children:[o&&(0,E.jsx)(WM,{annotation:s,isSelected:g,inline:i}),r&&n.length>0&&n.map((n=>{var r;const{id:a,user:m,createdDate:p}=n,f=(null==l?void 0:l.id)===n.id,v=f&&!t&&o?!g:(null==t?void 0:t.id)===n.id,y=u?{email:(null==h?void 0:h.id)===m.id?"Me":"User"}:null;return(0,E.jsx)(ZM,{inline:i,user:null!=(r=null!=y?y:m)?r:{email:null==n?void 0:n.createdBy},date:p,comment:n.comment,acceptedState:n.actionType,selected:v,disabled:0===n.results.length,hideInfo:u,onClick:async()=>{o?(c&&(s.saveDraftImmediately(),await(0,d.z7)((()=>!s.isDraftSaving))),f||v?(e.selectHistory(null),s.toggleDraft(v)):e.selectHistory(n)):e.selectHistory(v?null:n)}},a)}))]})})));GM.displayName="AnnotationHistory";const YM=e=>{var t;(0,m.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])},XM=(0,v.WQ)("store")((0,v.PA)((({entity:e,showHistory:t=!0})=>{var n;const r=(0,k.VS)(k.Lk);return YM(e),e?(0,E.jsxs)(Qe.eB,{name:"annotation",onClick:e=>e.stopPropagation(),children:[!r&&(0,E.jsx)(NM,{item:e}),t&&(0,E.jsxs)(Qe.Sl,{tag:ns,spread:!0,name:"title",children:["Annotation History",(0,E.jsxs)(Qe.Sl,{name:"id",children:["#",null!=(n=e.pk)?n:e.id]})]}),(0,E.jsx)(GM,{enabled:t,showDraft:r})]}):null})));var qM=n(65604);const JM={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 QM=n(23882),eK=n(50417);const tK=(0,v.PA)((({item:e,setDraggable:t})=>{const[n,r]=(0,m.useState)(!1),o=(0,m.useCallback)((e=>{r((e=>!e)),e.preventDefault(),e.stopPropagation()}),[]),i=e.perRegionDescControls||[];return(0,E.jsxs)(Qe.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,E.jsx)(Qe.Sl,{name:"controls",children:i.map(((t,o)=>{const i=b.getPerRegionView(t.type,mt.REGION_LIST);return i?(0,E.jsx)(i,{item:t,area:e,collapsed:n,setCollapsed:r},o):null}))}),(0,E.jsx)(Qe.Sl,{name:"collapse",tag:Qa,size:"small",type:"text",onClick:o,children:n?(0,E.jsx)(Ec,{}):(0,E.jsx)(Bc,{})})]})})),nK=(0,v.PA)((({idx:e,item:t,setDraggable:n})=>{const r=(0,m.useRef)();return(0,m.useEffect)((()=>{if(t.selected){const e=r.current;if(!e)return;(e.scrollIntoViewIfNeeded||e.scrollIntoView).call(e)}}),[t.selected]),(0,E.jsxs)(Qe.eB,{ref:r,name:"region-item",mod:{hidden:t.hidden},"data-testid":`regionitem:selected=${t.selected}`,children:[(0,E.jsxs)(Qe.Sl,{name:"header",tag:"div",children:[(0,E.jsx)(Qe.Sl,{name:"counter",children:(0,x.isDefined)(e)?e+1:""}),(0,E.jsx)(Qe.Sl,{name:"title",tag:PO,node:t,mix:JM.node}),(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{tag:"span",name:"id",children:(0,E.jsx)(IO,{node:t})}),(0,E.jsx)(Qe.Sl,{name:"prediction",children:"prediction"===t.origin&&(0,E.jsx)($s,{style:{width:16,height:16}})}),t.isReadOnly()&&(0,E.jsx)(QM.A,{count:"ro",style:{backgroundColor:"#ccc"}}),t.score&&(0,E.jsx)(Qe.Sl,{tag:"span",name:"score",style:{color:un.Colors.getScaleGradient(t.score)},children:t.score.toFixed(2)}),t.hideable&&(0,E.jsx)(Qe.Sl,{tag:Qa,name:"toggle",size:"small",type:"text",mod:{active:!t.hidden},onClick:t.toggleHidden,children:t.hidden?(0,E.jsx)(pc,{}):(0,E.jsx)(oc,{})})]})]}),(0,E.jsx)(tK,{item:t,setDraggable:n})]})})),rK=(0,v.PA)((({item:e,idx:t,flat:n,setDraggable:r,onClick:o})=>{const i=(0,m.useMemo)((()=>{let t;return()=>{if(!t){const n=e.getOneColor();t=n?dn({labelColor:n,labelBgColor:Ct()(n).alpha(.15)}):null}return t}}),[(0,u._n)(e)&&e.getOneColor()]);if(!(0,u._n)(e))return null;const a=[JM.lstitem,n&&JM.flat,!0===e.hidden&&JM.hidden,e.inSelection&&JM.selected].filter(Boolean),s=i();return(0,E.jsx)(eK.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,E.jsx)(nK,{idx:t,item:e,setDraggable:r})},e.id)})),oK=(0,v.PA)((({regionStore:e})=>{const[t,n]=(0,m.useState)(!0),r=(0,m.useCallback)((()=>n(!1)),[]);(0,m.useEffect)((()=>{setTimeout(r)}),[r]);const o=(0,m.useRef)(!0),i=(0,m.useCallback)((e=>{o.current=e}),[]);if(t)return(0,E.jsx)("div",{style:{textAlign:"center"},children:(0,E.jsx)(f.A,{})});const a=!e.sortedRegions.some((e=>e.parentID)),s=e.asTree(((e,t,n)=>({key:e.id,title:(0,E.jsx)(rK,{item:e,idx:t,flat:a,setDraggable:i,onClick:n})}))),l=[...e.classifications.map((e=>({classification:!0,key:e.id,title:(0,E.jsx)(rK,{item:e,flat:!0,setDraggable:i})}))),...s];return(0,E.jsx)(qM.A,{className:JM.treelabels,treeData:l,draggable:!0,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,switcherIcon:(0,E.jsx)(wc,{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=un.Checkers.flatten(t.map((e=>e.groupcancontain.split(",")))),r=un.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)}}})})),iK=(0,v.PA)((({item:e,regions:t,regionStore:n})=>{const r=e.background,o=dn({color:r}),i=Object.values(t).reduce(((e,t)=>e&&t.hidden),!0),a=Object.values(t).length;return(0,E.jsx)(Qe.eB,{name:"list-item",tag:eK.Ay.Item,style:o,children:(0,E.jsxs)(ns,{spread:!0,children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:[e.isNotLabel?(0,E.jsx)(E.Fragment,{children:"Not labeled"}):(0,E.jsx)(eE,{color:r,empty:e.isEmpty,children:e._value}),(0,E.jsx)(Qe.Sl,{name:"counter",children:`${a} Region${0===a||a>1?"s":""}`})]}),(0,E.jsx)(Qe.Sl,{name:"visibility",tag:Qa,type:"text",icon:i?(0,E.jsx)(pc,{}):(0,E.jsx)(oc,{}),onClick:()=>n.setHiddenByLabel(!i,e),mod:{hidden:i}})]})},e.id)})),{localStorage:aK}=window,sK="collapsed-label-pos",lK=(0,v.PA)((({regionStore:e})=>{const t=e.asLabelsTree(((t,n,r,o,i)=>({key:t.id,title:o=>r?(0,E.jsx)(iK,{item:t,idx:n,regions:o.children,regionStore:e}):(0,E.jsx)(rK,{item:t,idx:n,onClick:i})})));if((0,k.VS)(k.TU)){var n,r,o;const[e,i]=(0,m.useState)(null!=(n=null==(r=aK.getItem(sK))||null==r.split||null==(r=r.split(","))?void 0:r.filter((e=>!!e)))?n:[]),a=e=>{aK.setItem(sK,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,E.jsx)(qM.A,{className:JM.treelabels,treeData:t,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,expandedKeys:c,switcherIcon:(0,E.jsx)(wc,{className:JM.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,E.jsx)(qM.A,{className:JM.treelabels,treeData:t,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,switcherIcon:(0,E.jsx)(wc,{opacity:"0.25"})})}));var cK=n(53312);const dK=({sortKey:e})=>{switch(e){case"date":return(0,E.jsx)(ed,{});case"score":return(0,E.jsx)(cK.A,{});default:return null}},uK=(0,v.PA)((({regionStore:e})=>(0,E.jsxs)(Qe.eB,{name:"sort-menu",tag:t_.A,selectedKeys:[e.sort],children:[(0,E.jsx)(t_.A.Item,{children:(0,E.jsxs)(Qe.Sl,{name:"option-inner",onClick:t=>(e.setSort("date"),t.preventDefault(),!1),children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:[(0,E.jsx)(Qe.Sl,{name:"icon",tag:"span",children:(0,E.jsx)(dK,{sortKey:"date"})})," ","Date"]}),(0,E.jsx)("span",{children:"date"===e.sort&&("asc"===e.sortOrder?"↓":"↑")})]})},"date"),(0,E.jsx)(t_.A.Item,{children:(0,E.jsxs)(Qe.Sl,{name:"option-inner",onClick:t=>(e.setSort("score"),t.preventDefault(),!1),children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:[(0,E.jsx)(Qe.Sl,{name:"icon",tag:"span",children:(0,E.jsx)(dK,{sortKey:"score"})})," ","Score"]}),(0,E.jsx)("span",{children:"score"===e.sort&&("asc"===e.sortOrder?"↓":"↑")})]})},"score")]}))),hK=({value:e,children:t,className:n})=>{const r=m.Children.toArray(t),o=(0,m.useMemo)((()=>r.find((t=>t.props.case===e))||null),[r,e]);return o?(0,m.cloneElement)(o,Object.assign({},o.props,{className:[n,o.props.className].join(" ")})):null},gK=["size","value","defaultValue","onChange","children"],mK=m.createContext(),pK=e=>{let{size:t,value:n,defaultValue:r,onChange:o,children:i}=e,a=(0,nr.A)(e,gK);const[s,l]=(0,m.useState)(r);return(0,E.jsx)(mK.Provider,{value:{value:null!=n?n:s,onChange:e=>{l(e.target.value),null==o||o(e)},defaultValue:r},children:(0,E.jsx)("div",{className:(0,Qe.cn)("radio-group").mod({size:t}),style:a.style,children:(0,E.jsx)("div",{className:(0,Qe.cn)("radio-group").elem("buttons"),children:i})})})};pK.Button=({value:e,disabled:t,children:n})=>{const{onChange:r,value:o}=m.useContext(mK),i=e===o;return(0,E.jsxs)("label",{className:(0,Qe.cn)("radio-group").elem("button").mod({checked:i,disabled:t}),children:[(0,E.jsx)("input",{className:(0,Qe.cn)("radio-group").elem("input"),type:"radio",value:e,checked:e===o,onChange:r,disabled:t}),n]})};const{Block:fK,Elem:vK}=(0,Qe.JE)();class yK extends m.Component{constructor(e){var t;super(e),this.modalRef=(0,m.createRef)(),this.onClickOutside=e=>{const t=(0,Qe.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,E.jsx)(fK,{name:"modal",ref:this.modalRef,mod:t,mix:n,onClick:this.onClickOutside,children:(0,E.jsx)(vK,{name:"wrapper",children:(0,E.jsxs)(vK,{name:"content",style:this.props.style,children:[!e&&(0,E.jsxs)(yK.Header,{children:[(0,E.jsx)(vK,{name:"title",children:this.state.title}),!1!==this.props.allowClose&&(0,E.jsx)(vK,{tag:Qa,name:"close",type:"text",style:{color:"0099FF"},icon:(0,E.jsx)(ks,{})})]}),(0,E.jsx)(vK,{name:"body",mod:{bare:e},children:this.body}),this.state.footer&&(0,E.jsx)(yK.Footer,{children:this.state.footer})]})})});return(0,h.createPortal)(r,document.body)}transition(e,t){var n=this;return ir(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,E.jsx)(e,{}):e}return this.props.children}}yK.Header=({children:e,divided:t})=>(0,E.jsx)(vK,{name:"header",mod:{divided:t},children:e}),yK.Footer=({children:e})=>(0,E.jsx)(vK,{name:"footer",children:e});const bK=["okText","onOk","cancelText","onCancel","buttonLook"],xK=["okText","onOkPress"],wK=e=>{const t=(0,m.createRef)(),n=document.createElement("div");n.className=(0,Qe.cn)("modal-holder").toClassName(),document.body.appendChild(n);const r=(e,r)=>{(0,h.render)((0,E.jsx)(yK,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()}}},CK=e=>{let{okText:t,onOk:n,cancelText:r,onCancel:o,buttonLook:i}=e,a=(0,nr.A)(e,bK);const s=wK(Object.assign({},a,{allowClose:!1,footer:(0,E.jsxs)(ns,{align:"end",children:[(0,E.jsx)(Qa,{onClick:()=>{null==o||o(),s.close()},size:"compact",autoFocus:!0,children:null!=r?r:"Cancel"}),(0,E.jsx)(Qa,{onClick:()=>{null==n||n(),s.close()},size:"compact",look:null!=i?i:"primary",children:null!=t?t:"OK"})]})}));return s};Object.assign(yK,{info:e=>{let{okText:t,onOkPress:n}=e,r=(0,nr.A)(e,xK);const o=wK(Object.assign({},r,{footer:(0,E.jsx)(ns,{align:"end",children:(0,E.jsx)(Qa,{onClick:()=>{null==n||n(),o.close()},look:"primary",size:"compact",children:null!=t?t:"OK"})})}));return o},confirm:CK,modal:wK});const SK=(0,v.PA)((({regionStore:e,annotation:t})=>{const{classifications:n,regions:r,view:o}=e,i=r.length+("regions"===o?n.length:0);return(0,E.jsxs)(Qe.eB,{name:"entities",children:[(0,E.jsx)(Qe.Sl,{name:"source",children:(0,E.jsxs)(ns,{spread:!0,children:[(0,E.jsxs)(pK,{size:"small",value:o,style:{width:240},onChange:t=>{e.setView(t.target.value)},children:[(0,E.jsxs)(pK.Button,{value:"regions",children:["Regions",i?(0,E.jsxs)(Qe.Sl,{name:"counter",children:[" ",i]}):null]}),(0,E.jsx)(pK.Button,{value:"labels",children:"Labels"})]}),t.isReadOnly()&&(0,E.jsx)(hr,{title:"Delete All Regions",children:(0,E.jsx)(Qa,{look:"danger",type:"text","aria-label":"Delete All Regions",icon:(0,E.jsx)(Ps,{}),style:{height:36,width:36,padding:0},onClick:()=>{CK({title:"Removing all regions",body:"Do you want to delete all annotated regions?",buttonLook:"destructive",onOk:()=>t.deleteAllRegions()})}})})]})}),i?(0,E.jsx)(Qe.Sl,{name:"header",children:(0,E.jsxs)(ns,{spread:!0,align:"regions"===o?null:"end",children:["regions"===o&&(0,E.jsx)(e_.A,{overlay:(0,E.jsx)(uK,{regionStore:e}),placement:"bottomLeft",children:(0,E.jsxs)(Qe.Sl,{name:"sort",onClick:e=>e.preventDefault(),children:[(0,E.jsx)(Qe.Sl,{name:"sort-icon",children:(0,E.jsx)(dK,{sortKey:e.sort})})," ",`Sorted by ${e.sort[0].toUpperCase()}${e.sort.slice(1)}`]})}),(0,E.jsx)(ns,{size:"small",align:"end",children:r.length>0?(0,E.jsx)(Qe.Sl,{name:"visibility",tag:Qa,size:"small",type:"link",style:{padding:0},onClick:t=>{t.preventDefault(),t.stopPropagation(),e.toggleVisibility()},mod:{hidden:e.isAllHidden},children:e.isAllHidden?(0,E.jsx)(pc,{}):(0,E.jsx)(oc,{})}):null})]})}):null,(0,E.jsxs)(hK,{value:o,children:[(0,E.jsx)(Qe.Sl,{name:"regions",case:"regions",children:i?(0,E.jsx)(oK,{regionStore:e}):(0,E.jsx)(Qe.Sl,{name:"empty",children:"No Regions created yet"})}),(0,E.jsx)(Qe.Sl,{name:"labels",case:"labels",children:i?(0,E.jsx)(lK,{regionStore:e}):(0,E.jsx)(Qe.Sl,{name:"empty",children:"No Labeled Regions created yet"})})]})]})}));var jK=n(98065),kK=n(91846),OK=n(37142),RK=n(29961),EK=n(88841);const _K="block--U6qY7",AK="button--XQcyF",TK="labels--aLxIm",PK="statesblk--aVJvV",IK="row--BJ8uf",LK="long--bEvKZ",MK={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"},KK=({className:e,style:t,size:n,color:r,solid:o=!1,children:i})=>{const a=((e,t)=>{const n=Ct()(e);return t?{color:Ct().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=MK[s])?l:s:MK.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,E.jsx)(Qe.eB,{tag:"span",name:"tag",mod:{size:n},mix:e,style:d,children:i})},{Paragraph:DK,Text:NK}=AE.A,VK=e=>{return e.type.endsWith("labels")?null!=(n=(t=e).selectedLabels)&&n.length?(0,E.jsxs)(NK,{className:TK,children:["Labels: ",t.selectedLabels.map((e=>{const t=e.background||"#000000";return(0,E.jsx)(KK,{color:t,solid:!0,children:e.value},e.id)}))]},t.pid):null:"rating"===e.type?(0,E.jsxs)(DK,{children:["Rating: ",e.mainValue]}):"textarea"!==e.type||e.from_name.perregion&&e.from_name.displaymode===mt.REGION_LIST?"choices"===e.type?(0,E.jsxs)(DK,{children:["Choices: ",e.mainValue.join(", ")]}):null:(0,E.jsxs)(DK,{className:IK,children:[(0,E.jsx)(NK,{children:"Text: "}),(0,E.jsx)(NK,{mark:!0,className:LK,children:e.mainValue.join("\n")})]});var t,n},zK=(0,v.PA)((({store:e,annotation:t})=>{var n;const{highlightedNode:r,selectedRegions:o,selectionSize:i}=t,[a,s]=m.useState(!1),l=[],c=!!o.find((e=>!e.isReadOnly())),d=!!o.find((e=>!e.isReadOnly()&&!e.classification)),u=window.HTX_DEBUG?TO:LO;d&&(l.push((0,E.jsx)(kr.Tooltip,{placement:"topLeft",name:"region:relation",children:(0,E.jsxs)(Qa,{"aria-label":"Create Relation",className:AK,onClick:()=>{t.startLinkingMode(F,r)},disabled:!r,children:[(0,E.jsx)(kK.A,{}),e.settings.enableHotkeys&&e.settings.enableTooltips&&(0,E.jsx)(gr,{children:"[ alt + r ]"})]})},"relations")),l.push((0,E.jsx)(hr,{placement:"topLeft",title:"Add Meta Information",children:(0,E.jsx)(Qa,{className:AK,onClick:()=>{s(!0)},disabled:!r,children:(0,E.jsx)(OK.A,{})})},"meta"))),l.push((0,E.jsx)(kr.Tooltip,{placement:"topLeft",name:"region:unselect",children:(0,E.jsxs)(Qa,{className:AK,type:"dashed",onClick:()=>{t.unselectAll()},children:[(0,E.jsx)(RK.A,{}),(0,E.jsx)(kr.Hint,{name:"region:unselect"})]})},"unselect"));const h=(0,Qe.cn)("entity-states").toClassName(),g=(0,Qe.cn)("entity-buttons").toClassName();return(0,E.jsxs)(Qe.eB,{name:"entity",children:[(0,E.jsxs)(Qe.Sl,{name:"info",tag:ns,spread:!0,children:[(0,E.jsx)(Qe.Sl,{name:"node",children:r?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(u,{node:r})," (ID: ",r.id,")"]}):`${i} Region${i>1?"s are":" is"} selected`}),!c&&(0,E.jsx)(QM.A,{count:"readonly",style:{backgroundColor:"#ccc"}})]}),(0,E.jsxs)("div",{className:`${PK} ${h}`,children:[(null==r?void 0:r.score)&&(0,E.jsx)(m.Fragment,{children:(0,E.jsxs)(NK,{children:["Score: ",(0,E.jsx)(NK,{underline:!0,children:r.score})]})}),(null==r||null==(n=r.meta)?void 0:n.text)&&(0,E.jsxs)(NK,{children:["Meta: ",(0,E.jsx)(NK,{code:!0,children:r.meta.text})," ",(0,E.jsx)(EK.A,{type:"delete",style:{cursor:"pointer"},onClick:()=>{r.deleteMetaText()}})]}),(0,E.jsx)(m.Fragment,{children:null==r?void 0:r.results.map(VK)})]}),(null==r?void 0:r.isDrawing)&&(0,E.jsxs)(Qe.Sl,{name:"warning",children:[(0,E.jsx)(qd,{}),(0,E.jsxs)(Qe.Sl,{name:"warning-text",children:["Incomplete ",r.type.replace("region","")]})]}),(0,E.jsx)("div",{className:`${_K} ${g}`,children:(0,E.jsxs)(ns,{spread:!0,children:[(0,E.jsx)(ns,{children:l}),c&&(0,E.jsx)(kr.Tooltip,{placement:"topLeft",name:"region:delete",children:(0,E.jsxs)(Qa,{look:"danger",className:AK,onClick:()=>{t.deleteSelectedRegions()},children:[(0,E.jsx)(EK.A,{}),(0,E.jsx)(kr.Hint,{name:"region:delete"})]})})]})}),a&&(0,E.jsxs)(jK.A,{style:{marginTop:"0.5em",marginBottom:"0.5em"},onFinish:()=>{r.setMetaText(r.normInput),s(!1)},children:[(0,E.jsx)(OM.A,{autoFocus:!0,onChange:e=>{const{value:t}=e.target;r.setNormInput(t)},style:{marginBottom:"0.5em"},placeholder:"Meta Information"}),(0,E.jsx)(Qa,{type:"primary",htmlType:"submit",style:{marginRight:"0.5em"},children:"Add"}),(0,E.jsx)(Qa,{type:"danger",htmlType:"reset",onClick:e=>(s(!1),e.preventDefault(),!1),children:"Cancel"})]})]})}));var BK=n(79834),HK=n(37720),FK=n(72992),WK=n(74383);const $K={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 UK=n(38451),ZK=n(9099);const{Option:GK}=er.A,YK=(0,v.PA)((({rl:e})=>{const t=e.relations,n=t.getSelected().map((e=>e.value));return(0,E.jsxs)("div",{style:{marginTop:"10px"},children:[(0,E.jsx)("h4",{className:$K.header,children:"LABELS"}),(0,E.jsx)(er.A,{mode:"multiple"===t.choice?"multiple":"",style:{width:"100%"},placeholder:"Please select",defaultValue:n,onChange:e=>{const n=(0,x.wrapArray)(e);t.unselectAll(),n.forEach((e=>t.findRelation(e).setSelected(!0)))},children:t.children.map((e=>(0,E.jsx)(GK,{style:{background:e.background},children:e.value},e.value)))})]})})),XK=(0,v.PA)((({rl:e})=>{if(!(0,u.aF)((()=>e.node1))||!(0,u.aF)((()=>e.node2)))return null;const t={left:(0,E.jsx)(BK.A,{}),right:(0,E.jsx)(HK.A,{}),bi:(0,E.jsx)(FK.A,{})};return(0,E.jsx)("div",{children:(0,E.jsxs)("div",{className:$K.section__blocks,children:[(0,E.jsx)("div",{children:(0,E.jsx)(LO,{node:e.node1})}),(0,E.jsx)(Tr.A,{onClick:()=>e.rotateDirection(),size:"small",className:$K.relationbtn,children:t[e.direction]}),(0,E.jsx)("div",{children:(0,E.jsx)(LO,{node:e.node2})})]})})})),qK=(0,v.PA)((({item:e})=>{const t=(0,u.Zn)(e).annotationStore.selected.highlightedNode,n=t===e.node1||t===e.node2;return(0,E.jsxs)(eK.Ay.Item,{className:n&&$K.selected,actions:[],onMouseEnter:()=>{e.toggleHighlight(),e.setSelfHighlight(!0)},onMouseLeave:()=>{e.toggleHighlight(),e.setSelfHighlight(!1)},children:[(0,E.jsxs)("div",{className:$K.item,children:[(0,E.jsx)("div",{children:(0,E.jsx)(XK,{rl:e})}),(0,E.jsxs)("div",{children:[e.hasRelations&&(0,E.jsx)(Tr.A,{size:"small",onClick:()=>{e.toggleMeta()},className:$K.button,children:(0,E.jsx)(WK.A,{})})," ",(0,E.jsx)(Tr.A,{size:"small",className:$K.button,onClick:()=>(e.node1.setHighlight(!1),e.node2.setHighlight(!1),e.parent.deleteRelation(e),!1),danger:!0,children:(0,E.jsx)(EK.A,{})})]})]}),e.showMeta&&(0,E.jsx)(YK,{rl:e})]},e.id)})),JK=(0,v.PA)((({store:e})=>{const t=e.annotationStore.selected,{relations:n}=t.relationStore,r=n.length>0,o=t.relationStore.showConnections;return(0,E.jsxs)(Qe.eB,{name:"relations",children:[(0,E.jsxs)(Qe.Sl,{name:"header",children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:["Relations (",n.length,")"]}),r&&(0,E.jsx)(Tr.A,{size:"small",type:"link",icon:o?(0,E.jsx)(UK.A,{}):(0,E.jsx)(ZK.A,{}),onClick:()=>t.relationStore.toggleConnections(),className:[o?$K.uihidden:$K.uivisible,Xn]})]}),(0,E.jsx)(Qe.Sl,{name:"content",children:r?(0,E.jsx)(eK.Ay,{size:"small",bordered:!0,itemLayout:"vertical",className:$K.list,dataSource:t.relationStore.relations,renderItem:e=>(0,E.jsx)(qK,{item:e})}):(0,E.jsx)("p",{children:"No Relations added yet"})})]})})),QK=JK;var eD,tD=["title","titleId"];function nD(){return nD=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var oD=function(e,t){var n=e.title,r=e.titleId,o=rD(e,tD);return m.createElement("svg",nD({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?m.createElement("title",{id:r},n):null,eD||(eD=m.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"})))},iD=(0,m.forwardRef)(oD);n.p;function aD(...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 sD=["ref","actionRef","onChange","onInput","onSubmit","value","autoSize","rows","maxRows","className"],lD=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,nr.A)(e,sD);const h=!!i,g=[(0,Qe.cn)("textarea").mod({inline:h,autosize:s}),d].join(" ").trim(),p=(0,m.useRef)({rows:l,maxRows:Math.max(c-1,1),lineHeight:24,maxHeight:Number.POSITIVE_INFINITY}),f=(0,m.useRef)(null),v=(0,m.useCallback)((0,MC.debounce)((()=>{const e=f.current;if(!e||!p.current||!f.current)return;if(p.current.maxHeight===Number.POSITIVE_INFINITY){e.style.height="auto";const t=f.current.value;f.current.value="",p.current.lineHeight=f.current.scrollHeight/p.current.rows,p.current.maxHeight=p.current.lineHeight*p.current.maxRows,f.current.value=t}let t;e.scrollHeight>p.current.maxHeight?(e.style.overflowY="scroll",t=p.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,m.useCallback)((e=>{null==o||o(e.target.value),v()}),[o]),b=(0,m.useCallback)((e=>{null==r||r(e.target.value),v()}),[r]);return(0,m.useEffect)((()=>{const e=new ResizeObserver(v);return e.observe(f.current),()=>{f.current&&e.unobserve(f.current)}}),[]),(0,m.useEffect)((()=>{f.current&&(f.current.value=a||"",v())}),[a]),(0,m.useEffect)((()=>{if(!i)return;const e=e=>{f.current&&"Enter"===e.key&&(e.ctrlKey||(0,x.isMacOS)()&&e.metaKey)&&i(f.current.value)};return f.current&&f.current.addEventListener("keydown",e),()=>{f.current&&f.current.removeEventListener("keydown",e)}}),[i]),(0,E.jsx)("textarea",Object.assign({ref:aD(f,t),className:g,rows:p.current.rows,onChange:b,onInput:y},u))},cD=(0,v.PA)((({commentStore:e,annotationStore:t,inline:n=!0,onChange:r,rows:o=1,maxRows:i=4})=>{const a=(0,m.useRef)(null),s=(0,m.useRef)({}),l=()=>e.setTooltipMessage(""),c=(0,m.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,m.useCallback)((t=>{e.setCurrentComment(t||"")}),[e]);(0,m.useEffect)((()=>((0,k.VS)(k.bA)||(e.setAddedCommentThisSession(!1),l()),()=>l())),[]),(0,m.useEffect)((()=>{var t;(0,k.VS)(k.bA)&&(e.tooltipMessage&&(null==(t=s.current)||null==(t=t.el)||null==(t=t.current)||t.focus({preventScroll:!0})))}),[e.tooltipMessage]),(0,m.useEffect)((()=>{e.setInputRef(s.current.el),e.setCommentFormSubmit((()=>c()))}),[s,e]);const u=e.currentComment[t.selected.id]||"";return(0,E.jsxs)(Qe.eB,{ref:a,tag:"form",name:"comment-form",mod:{inline:n},onSubmit:c,children:[(0,E.jsx)(lD,{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,E.jsx)(Qe.Sl,{tag:"div",name:"primary-action",children:(0,E.jsx)("button",{type:"submit",children:(0,E.jsx)(iD,{})})}),e.tooltipMessage&&(0,E.jsx)(Qe.Sl,{name:"tooltipMessage",children:e.tooltipMessage})]})})),dD=(0,v.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,E.jsx)(Qe.eB,{name:"labels-list",children:n.map(((e,t)=>{const n=e.background||"#000000";return[t?", ":null,(0,E.jsx)(Qe.Sl,{style:{color:n},children:e.value||"No label"},e.id)]}))})}return t.includes("tool")?e.value:void 0})),uD=({linking:e,region:t,result:n,onUnlink:r,interactive:o})=>{const i=e||t,a=(0,m.useMemo)((()=>e?{action:!0}:t?{display:!0}:void 0),[e,t]);return i?(0,E.jsxs)(Qe.eB,{tag:"div",name:"link-state",mod:a,children:[(0,E.jsx)(Qe.Sl,{tag:"div",name:"prefix",children:(0,E.jsx)(cC,{})}),(null==a?void 0:a.action)&&"Select an object to link it to this comment.",(null==a?void 0:a.display)&&(0,E.jsx)(hD,{region:t,result:n,onUnlink:r,interactive:o})]}):null},hD=(0,v.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,m.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,m.useMemo)((()=>{const e=Ct()(null!=i?i:"#666").alpha(1);return{"--icon-color":e.css(),"--text-color":e.css()}}),[i]);return(0,E.jsxs)(Qe.eB,{name:"link-state-region",mod:{interactive:n},style:d,onMouseEnter:s,onMouseLeave:l,onClick:c,children:[!a&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"icon",children:(0,E.jsx)(IO,{node:e})}),(0,E.jsx)(Qe.Sl,{name:"index",children:e.region_index})]}),t?(0,E.jsx)(Qe.Sl,{name:"title",children:(0,E.jsx)(gD,{result:t})}):(0,E.jsxs)(Qe.Sl,{name:"title",children:[(0,E.jsx)(Qe.Sl,{name:"label",children:(0,E.jsx)(dD,{item:e})}),(null==e?void 0:e.text)&&(0,E.jsx)(Qe.Sl,{name:"text",children:e.text.replace(/\\n/g,"\n")})]}),r&&(0,E.jsx)(Qe.Sl,{name:"close",children:(0,E.jsx)(Tr.A,{size:"small",type:"text",icon:(0,E.jsx)(ad,{}),onClick:r})})]})})),gD=(0,v.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(": ")})),mD=({region:e,linking:t,onLinkTo:n})=>(0,E.jsx)(Qe.eB,{name:"comment-form-buttons",children:(0,E.jsxs)(Qe.Sl,{name:"buttons",children:[n&&!e&&(0,E.jsx)(hr,{title:"Link to...",mouseEnterDelay:.8,children:(0,E.jsx)(Qe.Sl,{name:"action",tag:"button",mod:{highlight:t},onClick:n,children:(0,E.jsx)(cC,{})})}),(0,E.jsx)(Qe.Sl,{name:"action",tag:"button",type:"submit",children:(0,E.jsx)(iD,{})})]})}),pD=(0,v.PA)((({commentStore:e,annotationStore:t,inline:n=!0})=>{var r;const o=(0,m.useRef)(null),i=(0,m.useRef)({}),a=()=>e.setTooltipMessage(""),s=t.selected&&t.selected.linkingMode===W,[l,c]=(0,m.useState)(),d=(0,m.useCallback)(((t=!0)=>{let n=e.commentInProgress;return!n&&t&&(n=oP.create({text:""},{annotationStore:e.annotationStore}),e.setCurrentComment(n)),n}),[e]),u=(0,m.useCallback)((e=>{d().setText(e)}),[e,t]),h=(0,m.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,m.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,m.useEffect)((()=>((0,k.VS)(k.bA)||(e.setAddedCommentThisSession(!1),a()),()=>a())),[]),(0,m.useEffect)((()=>{var t;(0,k.VS)(k.bA)&&(e.tooltipMessage&&(null==(t=i.current)||null==(t=t.el)||null==(t=t.current)||t.focus({preventScroll:!0})))}),[e.tooltipMessage]),(0,m.useEffect)((()=>{var t;e.setInputRef(null==(t=i.current)?void 0:t.el),e.setCommentFormSubmit((()=>g()))}),[i,e]);const p=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&&p===l&&s,S=C||x,j=(0,m.useMemo)((()=>{var e;return QT(null==b||null==(e=b.default)?void 0:e.values)}),[b]),O=e.commentClassificationsItems,R=(0,m.useCallback)((e=>{d().setClassifications(e)}),[d]),_=(0,m.useCallback)((async(e,t)=>{const n=t.length>0?{default:{type:"taxonomy",values:t}}:null;R(n)}),[R]);return(0,E.jsxs)(Qe.eB,{ref:o,tag:"form",name:"comment-form-new",mod:{inline:n,linked:!!x},onSubmit:g,children:[(0,E.jsxs)(Qe.Sl,{name:"text-row",children:[(0,E.jsx)(lD,{actionRef:i,name:"comment",placeholder:"Add a comment",value:v,rows:1,maxRows:4,onInput:u,onSubmit:n?g:void 0,onBlur:a}),0===O.length&&(0,E.jsx)(mD,{region:x,linking:C,onLinkTo:h})]}),O.length>0&&(0,E.jsxs)(Qe.Sl,{name:"classifications-row",children:[(0,E.jsx)(Qe.Sl,{name:"category-selector",children:(0,E.jsx)(SI,{selected:j,items:O,onChange:_,options:eP,defaultSearch:!1})}),(0,E.jsx)(mD,{region:x,linking:C,onLinkTo:h})]}),S&&(0,E.jsx)(Qe.Sl,{name:"link-state",children:(0,E.jsx)(uD,{linking:C,region:x,result:w,onUnlink:null==f?void 0:f.unsetLink})}),e.tooltipMessage&&(0,E.jsx)(Qe.Sl,{name:"tooltipMessage",children:e.tooltipMessage})]})})),fD=(0,v.PA)((({value:e="",inline:t=!0,onChange:n,onSubmit:r,onBlur:o,rows:i=1,maxRows:a=4,classifications:s})=>{const l=(0,m.useRef)(null),c=(0,m.useRef)({}),d=(0,m.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,m.useCallback)((e=>{null==n||n(e||"")}),[n]);return(0,E.jsxs)(Qe.eB,{ref:l,tag:"form",name:"comment-form",mod:{inline:t},onSubmit:d,children:[(0,E.jsx)(lD,{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,E.jsx)(Qe.Sl,{tag:"div",name:"primary-action",children:(0,E.jsx)("button",{type:"submit",children:(0,E.jsx)(iD,{})})})]})})),vD=(0,v.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:p},listComments:f})=>{var v;const y=null==(v=window.APP_SETTINGS)?void 0:v.user,b=(null==y?void 0:y.id)===a.id,[w,C]=(0,m.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,E.jsx)(Qe.Sl,{name:"date",children:(0,E.jsx)(VM.A,{placement:"topRight",title:new Date(a).toLocaleString(),children:`${i?"updated":""} ${(0,x.humanDateDiff)(a)}`})}):null};return(0,E.jsxs)(Qe.eB,{name:"comment-item",mod:{resolved:l},children:[(0,E.jsxs)(ns,{spread:!0,size:"medium",truncated:!0,children:[(0,E.jsxs)(ns,{size:"small",truncated:!0,children:[(0,E.jsx)(Qe.Sl,{tag:HM,user:a,name:"userpic",showUsername:!0,username:a}),(0,E.jsx)(Qe.Sl,{name:"name",tag:"span",children:(0,x.userDisplayName)(a)})]}),(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{name:"resolved",component:Cu}),(0,E.jsx)(Qe.Sl,{name:"saving",mod:{hide:o},children:(0,E.jsx)(Qe.Sl,{name:"dot"})}),(0,E.jsx)(S,{})]})]}),(0,E.jsxs)(Qe.Sl,{name:"content",children:[(0,E.jsx)(Qe.Sl,{name:"text",children:t?(0,E.jsx)(fD,{value:w,onSubmit:async e=>{await c(e),C(e),await f({suppressClearComments:!0})}}):n?(0,E.jsxs)(Qe.Sl,{name:"confirmForm",children:[(0,E.jsx)(Qe.Sl,{name:"question",children:"Are you sure?"}),(0,E.jsxs)(Qe.Sl,{name:"controls",children:[(0,E.jsx)(Qa,{onClick:()=>d(),size:"compact",look:"danger",autoFocus:!0,children:"Yes"}),(0,E.jsx)(Qa,{onClick:()=>u(!1),size:"compact",children:"No"})]})]}):(0,E.jsx)(E.Fragment,{children:w})}),(0,E.jsx)(Qe.Sl,{name:"actions",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:o&&(b||p)&&(0,E.jsx)(J_.Trigger,{content:(0,E.jsxs)(xT,{size:"auto",children:[(0,E.jsx)(xT.Item,{onClick:g,children:l?"Unresolve":"Resolve"}),b&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(xT.Item,{onClick:()=>{const e=!t;h(e),e||C(s)},children:t?"Cancel edit":"Edit"}),!n&&(0,E.jsx)(xT.Item,{onClick:()=>{u(!0)},children:"Delete"})]})]}),children:(0,E.jsx)(Qa,{size:"small",type:"text",icon:(0,E.jsx)($d,{})})})})]})]})})),yD=(0,v.PA)((({commentStore:e})=>(0,E.jsx)(Qe.eB,{name:"comments-list",children:e.comments.map((t=>(0,E.jsx)(vD,{comment:t,listComments:e.listComments},t.id)))}))),bD=(0,v.PA)((({comment:e,listComments:t,classificationsItems:n})=>{var r,o,i,a;const{classifications:s,updatedAt:l,isEditMode:c,isConfirmDelete:d,createdAt:u,isPersisted:h,isDeleted:g,createdBy:p,text:f,regionRef:v,isResolved:y,updateComment:b,deleteComment:w,setConfirmMode:C,setClassifications:S,setEditMode:j,toggleResolve:k,canResolveAny:O,isHighlighted:R,setHighlighted:_,_commentRef:A}=e,{startLinkingMode:T,currentComment:P,globalLinking:I}=(0,m.useContext)(xD),L=null==(r=window.APP_SETTINGS)?void 0:r.user,M=(null==L?void 0:L.id)===p.id,K=null==(o=e.commentsStore)||null==(o=o.store)?void 0:o.hasInterface("annotations:hide-info"),D=K?{email:M?"Me":"User"}:null,[N,V]=(0,m.useState)(f),[z,B]=(0,m.useState)(),H=null==v?void 0:v.region,F=null==v?void 0:v.result,W=!(!z||P!==z||!I),$=W||H,U=(0,m.useCallback)((e=>{B(e),T(e)}),[T]),Z=(0,m.useCallback)((()=>{null!=v&&v.region?e.unsetLink():U(e)}),[e,U,null==v?void 0:v.region]),G=(0,m.useCallback)((async(e,t)=>{const n=t.length>0?{default:{type:"taxonomy",values:t}}:null;S(n)}),[S]),Y=(0,m.useMemo)((()=>{var e;return QT(null==s||null==(e=s.default)?void 0:e.values)}),[s]),X=(0,m.useCallback)((async e=>{await b(e,s),V(e),await t({suppressClearComments:!0})}),[b,t,s]);if(g)return null;const q=()=>{const e=new Date(l),t=new Date(u);e.setMilliseconds(0),t.setMilliseconds(0);const n=e>t,r=n?l:u;return h&&r?(0,E.jsx)(Qe.Sl,{name:"date",children:(0,E.jsx)(VM.A,{placement:"topRight",title:new Date(r).toLocaleString(),children:`${n?"updated":""} ${(0,x.humanDateDiff)(r)}`})}):null};return(0,E.jsxs)(Qe.eB,{name:"comment-item",mod:{resolved:y,highlighted:R},onMouseEnter:()=>{_(!0)},onMouseLeave:()=>{_(!1)},ref:A,children:[(0,E.jsxs)(ns,{spread:!0,size:"medium",truncated:!0,children:[(0,E.jsxs)(ns,{size:"small",truncated:!0,children:[(0,E.jsx)(Qe.Sl,{tag:HM,user:null!=D?D:p,name:"userpic",showUsername:!0,username:p}),(0,E.jsx)(Qe.Sl,{name:"name",tag:"span",children:(0,x.userDisplayName)(null!=D?D:p)})]}),(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{name:"resolved",component:Cu}),(0,E.jsx)(Qe.Sl,{name:"saving",mod:{hide:h},children:(0,E.jsx)(Qe.Sl,{name:"dot"})}),!K&&(0,E.jsx)(q,{})]})]}),(0,E.jsxs)(Qe.Sl,{name:"content",children:[(0,E.jsx)(Qe.Sl,{name:"text",children:c?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(fD,{value:N,onSubmit:X,classifications:s}),n.length>0&&(0,E.jsx)(Qe.Sl,{name:"classifications-row",children:(0,E.jsx)(SI,{selected:Y,items:n,onChange:G,options:eP,defaultSearch:!1})})]}):d?(0,E.jsxs)(Qe.Sl,{name:"confirmForm",children:[(0,E.jsx)(Qe.Sl,{name:"question",children:"Are you sure?"}),(0,E.jsxs)(Qe.Sl,{name:"controls",children:[(0,E.jsx)(Qa,{onClick:()=>w(),size:"compact",look:"danger",autoFocus:!0,children:"Yes"}),(0,E.jsx)(Qa,{onClick:()=>C(!1),size:"compact",children:"No"})]})]}):(0,E.jsxs)(E.Fragment,{children:[(null==s||null==(i=s.default)||null==(i=i.values)?void 0:i.length)>0&&(0,E.jsx)(Qe.Sl,{name:"classifications",tag:"ul",children:null==s||null==(a=s.default)||null==(a=a.values)?void 0:a.map(((e,t)=>(0,E.jsx)("li",{children:e.join("/")},t)))}),N,$&&(0,E.jsx)(Qe.Sl,{name:"linkState",children:(0,E.jsx)(uD,{linking:W,region:H,result:F,interactive:!0})})]})}),(0,E.jsx)(Qe.Sl,{name:"actions",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:h&&(M||O)&&(0,E.jsx)(J_.Trigger,{content:(0,E.jsxs)(xT,{size:"auto",children:[(0,E.jsx)(xT.Item,{onClick:k,children:y?"Unresolve":"Resolve"}),M&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(xT.Item,{onClick:()=>{const e=!c;j(e),e||V(f)},children:c?"Cancel edit":"Edit"}),(0,E.jsx)(xT.Item,{onClick:Z,children:null!=v&&v.region?"Unlink":"Link to..."}),!d&&(0,E.jsx)(xT.Item,{onClick:()=>{C(!0)},children:"Delete"})]})]}),children:(0,E.jsx)(Qa,{size:"small",type:"text",icon:(0,E.jsx)($d,{})})})})]})]})})),xD=(0,m.createContext)({startLinkingMode:()=>{},globalLinking:!1,currentComment:null}),wD=(0,v.PA)((({commentStore:e})=>{var t,n;const r=(0,m.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,m.useMemo)((()=>({startLinkingMode:r,currentComment:i,globalLinking:o})),[r,i,o]);return(0,E.jsx)(xD.Provider,{value:a,children:(0,E.jsx)(CD,{commentStore:e})})})),CD=(0,v.PA)((({commentStore:e})=>(0,E.jsx)(Qe.eB,{name:"comments-list",children:e.comments.map((t=>(0,E.jsx)(bD,{comment:t,listComments:e.listComments,classificationsItems:e.commentClassificationsItems},t.id)))}))),SD=(0,k.VS)(k.v1),jD=SD?pD:cD,kD=SD?wD:yD,OD=(0,v.PA)((({annotationStore:e,commentStore:t,cacheKey:n})=>{const r=D();return(0,m.useEffect)((()=>{(async()=>{const e={mounted:r};SD&&(e.suppressClearComments=t.isRelevantList),await t.listComments(e),(0,k.VS)(k.K3)||t.restoreCommentsFromCache(n)})()}),[t.annotation.id]),(0,m.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,E.jsxs)(Qe.eB,{name:"comments",children:[(0,E.jsx)(jD,{commentStore:t,annotationStore:e,inline:!0}),(0,E.jsx)(kD,{commentStore:t})]})})),RD=(0,v.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,E.jsxs)(E.Fragment,{children:[e.hasInterface("annotations:current")&&(0,E.jsx)(XM,{entity:n.selected,showControls:e.hasInterface("controls"),canDelete:e.hasInterface("annotations:delete"),showHistory:e.hasInterface("annotations:history"),showGroundTruth:e.hasInterface("ground-truth")}),o?(0,E.jsx)(zK,{store:e,annotation:r}):i?(0,E.jsx)("p",{style:{marginTop:12,marginBottom:0,paddingInline:15},children:"No Region selected"}):null,i&&(0,E.jsx)(SK,{store:e,annotation:r,regionStore:r.regionStore}),i&&(0,E.jsx)(QK,{store:e,item:r}),e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,E.jsxs)(Qe.eB,{name:"comments-section",children:[(0,E.jsx)(Qe.Sl,{name:"header",children:(0,E.jsx)(Qe.Sl,{name:"title",children:"Comments"})}),(0,E.jsx)(Qe.Sl,{name:"content",children:(0,E.jsx)(OD,{annotationStore:n,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})]})]})})),ED=(0,v.PA)((({entity:e})=>{const{history:t}=e;return(0,E.jsxs)(Qe.eB,{name:"history-buttons",children:[(0,E.jsx)(hr,{title:"Undo",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",type:"text","aria-label":"Undo",disabled:!(null!=t&&t.canUndo),onClick:()=>e.undo(),icon:(0,E.jsx)(hs,{})})}),(0,E.jsx)(hr,{title:"Redo",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",type:"text","aria-label":"Redo",disabled:!(null!=t&&t.canRedo),onClick:()=>e.redo(),icon:(0,E.jsx)(bs,{})})}),(0,E.jsx)(hr,{title:"Reset",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",type:"text","aria-label":"Reset",disabled:!(null!=t&&t.canUndo),onClick:()=>null==t?void 0:t.reset(),icon:(0,E.jsx)(ks,{})})})]})})),_D=(0,v.WQ)("store")((0,v.PA)((({store:e})=>{const t=e.hasInterface("auto-annotation")&&!e.forceAutoAnnotation;return(0,m.useEffect)((()=>{t||e.setAutoAnnotation(!1)}),[t]),t?(0,E.jsx)(Qe.eB,{name:"dynamic-preannotations",children:(0,E.jsx)(Qe.Sl,{name:"wrapper",children:(0,E.jsx)(ns,{spread:!0,children:(0,E.jsx)(hA,{checked:e.autoAnnotation,onChange:t=>{const n=t.target.checked;e.setAutoAnnotation(n),n||OR.allInstances().forEach((e=>e.selectDefault()))},label:"Auto-Annotation",style:{color:"#7F64FF"}})})})}):null}))),AD=(0,v.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}})),TD=AD((0,v.PA)((({store:e,annotation:t,suggestions:n})=>{if(!e.autoAnnotation)return null;const r=t.hasSuggestionsSupport&&!e.forceAutoAcceptSuggestions,o=e.awaitingSuggestions;return(0,E.jsxs)(Qe.eB,{name:"auto-accept",children:[r&&(0,E.jsx)(Qe.Sl,{name:"wrapper",mod:{loading:o},children:(0,E.jsx)(ns,{spread:!0,children:n.size>0?(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsxs)(Qe.Sl,{name:"info",children:[n.size," suggestion",n.size>0&&"s"]}),(0,E.jsx)(Qe.Sl,{name:"action",tag:Qa,mod:{type:"reject"},onClick:()=>t.rejectAllSuggestions(),children:(0,E.jsx)(Eu,{})}),(0,E.jsx)(Qe.Sl,{name:"action",tag:Qa,mod:{type:"accept"},onClick:()=>t.acceptAllSuggestions(),children:(0,E.jsx)(Cu,{})})]}):(0,E.jsx)(hA,{checked:e.autoAcceptSuggestions,onChange:t=>e.setAutoAcceptSuggestions(t.target.checked),label:"Auto-Accept Suggestions",style:{color:"#7F64FF"}})})}),o&&(0,E.jsx)(Qe.Sl,{name:"spinner"})]})}))),{Block:PD,Elem:ID}=(0,Qe.JE)(),LD=(0,v.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,E.jsx)(PD,{name:"ground-truth",mod:{disabled:t,size:n},children:(0,E.jsx)(hr,{placement:"topLeft",title:r,children:(0,E.jsx)(ID,{tag:Qa,name:"toggle",size:"small",type:"link",onClick:t=>{t.preventDefault(),e.setGroundTruth(!e.ground_truth)},children:(0,E.jsx)(ID,{name:"indicator",tag:(0,k.VS)(k.bA)&&!e.ground_truth?Wl:Nl,mod:{active:e.ground_truth,dark:(0,k.VS)(k.bA)}})})})})})),MD=({store:e})=>{const t=e.annotationStore,n=t.selected,r="prediction"===(null==n?void 0:n.type),o=!0===t.viewingAll;return(0,E.jsxs)(Qe.Sl,{name:"section",children:[!r&&!o&&e.hasInterface("edit-history")&&(0,E.jsx)(ED,{entity:n}),e.description&&e.hasInterface("instruction")&&(0,E.jsx)(hr,{placement:"topLeft",title:"Show instructions",children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(Rp,{style:{width:20,height:20}}),type:"text","aria-label":"Instructions",onClick:()=>e.toggleDescription(),style:{height:36,width:36,padding:0}})}),(0,E.jsx)(hr,{placement:"topLeft",title:"Settings",children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(Pl,{}),type:"text","aria-label":"Settings",onClick:()=>e.toggleSettings(),style:{height:36,width:36,padding:0}})}),e.hasInterface("ground-truth")&&(0,E.jsx)(LD,{entity:n}),!o&&(0,E.jsxs)(Qe.Sl,{name:"section",children:[(0,E.jsx)(_D,{}),(0,E.jsx)(TD,{})]})]})};function KD(e){const t=(0,v.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 DD=KD((0,v.PA)((({store:e,title:t,children:n})=>(0,E.jsx)(hr,{title:t,enabled:e.settings.enableTooltips,mouseEnterDelay:.8,children:n})))),ND=(0,m.memo)((0,v.PA)((({disabled:e,history:t,store:n})=>(0,E.jsx)(DD,{title:"Accept annotation: [ Ctrl+Enter ]",children:(0,E.jsx)(Qa,{"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")))),VD={id:"reject",name:"reject",title:"Reject",look:void 0,ariaLabel:"reject-annotation",tooltip:"Reject annotation: [ Ctrl+Space ]",disabled:!1},zD=(0,m.memo)((0,v.PA)((({disabled:e,store:t,onSkipWithComment:n})=>(0,E.jsx)(DD,{title:"Cancel (skip) task: [ Ctrl+Space ]",children:(0,E.jsx)(Qa,{"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")))),BD=(0,m.memo)((0,v.PA)((({disabled:e,store:t})=>(0,E.jsx)(DD,{title:"Cancel skip: []",children:(0,E.jsx)(Qa,{"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")))),HD=(0,v.PA)((({button:e,disabled:t,onClick:n})=>{var r;const o=e.disabled||t?"disabled":e.look;return(0,E.jsx)(DD,{title:null!=(r=e.tooltip)?r:"",children:(0,E.jsx)(Qa,{"aria-label":e.ariaLabel,disabled:e.disabled||t,look:o,onClick:n,children:e.title})})})),FD=KD((0,v.PA)((({store:e,history:t,annotation:n})=>{const r=e.hasInterface("review")||n.canBeReviewed,o=e.hasInterface("topbar:prevnext"),i=(0,x.isDefined)(e.annotationStore.selectedHistory),{userGenerate:a,sentUserGenerate:s,versions:l,results:c,editable:d}=n,u=(0,Qe.cn)("dropdown").elem("trigger").toClassName(),h=e.customButtons,g=[],[p,f]=(0,m.useState)(!1),v=!d||e.isSubmitting||i||p,y=e.hasInterface("annotations:deny-empty")&&0===c.length,b=(0,m.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(p)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,p]),w=h.get("_before"),C=h.get("_replace"),S=null!=C?C:w;if(S){const n=(0,x.toArray)(S);for(const r of n)"string"==typeof r?"accept"===r&&g.push((0,E.jsx)(ND,{disabled:v,history:t,store:e})):g.push((0,E.jsx)(HD,{disabled:v,button:r,onClick:()=>null==e.handleCustomButton?void 0:e.handleCustomButton(r.name)},r.name))}if(C);else if(r){const n=(0,x.toArray)(h.get("reject")),r=n.length>0,o=VD;(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,E.jsx)(HD,{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,E.jsx)(ND,{disabled:v,history:t,store:e}))}else if(n.skipped)g.push((0,E.jsxs)(Qe.Sl,{name:"skipped-info",children:[(0,E.jsx)(Jl,{color:"#d00"})," Was skipped"]},"skipped")),g.push((0,E.jsx)(BD,{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,E.jsx)(zD,{disabled:v,store:e,onSkipWithComment:t}))}const r=v||y,i=r?"disabled":"primary",c=!r&&o,d=({isUpdate:t,onClickMethod:n})=>(0,E.jsx)(Qa,{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,E.jsx)(DD,{title:t,children:(0,E.jsx)(Qe.Sl,{name:"tooltip-wrapper",children:(0,E.jsx)(Qa,{"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,E.jsx)(J_.Trigger,{alignment:"top-right",content:(0,E.jsx)(d,{onClickMethod:e.submitAnnotation,isUpdate:!1}),children:(0,E.jsx)("div",{children:(0,E.jsx)(wc,{})})}):void 0,children:"Submit"})})},"submit"))}if(a&&s||!a&&e.hasInterface("update")){const o=Boolean((0,k.VS)(k.I8)||s||l.result),a=(0,k.VS)(k.I8)&&!t.canUndo&&!n.draftId,h=r||a,m=(0,E.jsx)(DD,{title:a?"No changes were made":"Update this task: [ Ctrl+Enter ]",children:(0,E.jsx)(Qa,{"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,E.jsx)(J_.Trigger,{alignment:"top-right",content:(0,E.jsx)(d,{onClickMethod:e.updateAnnotation,isUpdate:o}),children:(0,E.jsx)("div",{children:(0,E.jsx)(wc,{})})}):void 0,children:o?"Update":"Submit"})},"update");g.push(m)}}return(0,E.jsx)(Qe.eB,{name:"controls",children:g})}))),WD=(0,v.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,E.jsxs)(Qe.eB,{name:"bottombar",style:{borderTop:(0,k.VS)(k.bA)&&"1px solid rgba(0,0,0,0.1)"},children:[(0,E.jsx)(Qe.Sl,{name:"group",children:(0,E.jsx)(MD,{store:e})}),(0,E.jsx)(Qe.Sl,{name:"group",children:e.hasInterface("controls")&&(e.hasInterface("review")||!r)&&(0,E.jsx)(Qe.Sl,{name:"section",mod:{flat:!0},children:(0,E.jsx)(FD,{annotation:n})})})]}):null})),$D=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},UD=(0,v.PA)((({store:e})=>{const t=(0,m.useRef)(),n=(0,m.useRef)(),r=(0,m.useRef)(),o=(0,m.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,m.useCallback)((()=>{const t=r.current;if(!t)return;const n=e.annotationStore.selected,o=[$D(n)];t.value=JSON.stringify(o,null,2)}),[]),a=(0,m.useCallback)((()=>{const t=r.current;if(!t)return;const{annotations:n,predictions:o}=e.annotationStore,i=[...n,...o].map($D);t.value=JSON.stringify(i,null,2)}),[]);return(0,E.jsxs)("div",{style:{width:"100%"},children:[(0,E.jsx)("br",{}),(0,E.jsx)("h2",{children:"Debug"}),(0,E.jsxs)("div",{children:[(0,E.jsx)(Tr.A,{onClick:a,children:"↓ Serialize All Annotations"}),(0,E.jsx)(Tr.A,{onClick:i,children:"↓ Serialize Current Annotation"}),(0,E.jsx)(Tr.A,{onClick:o,children:"↑ Simulate Loading Task"})]}),(0,E.jsx)(jK.A,{children:(0,E.jsxs)("div",{style:{display:"flex"},children:[(0,E.jsxs)("div",{style:{flexBasis:"50%"},children:[(0,E.jsx)("p",{children:"Data"}),(0,E.jsx)("textarea",{style:{width:"100%"},ref:n,rows:4,defaultValue:e.task.data,className:"is-search"}),(0,E.jsx)("p",{children:"Config"}),(0,E.jsx)("textarea",{style:{width:"100%"},ref:t,rows:16,defaultValue:e.config,className:"is-search"})]}),(0,E.jsxs)("div",{style:{flexBasis:"50%"},children:[(0,E.jsx)("p",{children:"Annotations"}),(0,E.jsx)("textarea",{style:{width:"100%"},ref:r,rows:22,className:"is-search"})]})]})})]})}));var ZD=n(18869),GD=n(83764);const YD="grid--e4IWo",XD="container--CXRH5",qD="left--_1fAk",JD="right--LGT3p",QD=(0,v.PA)((0,m.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,u=e.store.hasInterface("annotations:hide-info");return(0,E.jsx)(Qe.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,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{name:"userpic",tag:HM,showUsername:!0,username:i?e.createdBy:null,user:u?{}:null!=(l=e.user)?l:{email:e.createdBy},mod:{prediction:i},children:i&&(0,E.jsx)($s,{style:{width:16,height:16}})}),!u&&(0,E.jsxs)(Qe.Sl,{name:"identifier",children:["ID ",null!=(c=e.pk)?c:e.id," ",d&&"*"]}),a&&e.ground_truth&&(0,E.jsx)(Qe.Sl,{name:"ground-truth",tag:Nl}),e.skipped&&(0,E.jsx)(Qe.Sl,{name:"skipped",tag:Jl})]})})})));class eN extends m.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,d.lB)(e,"isReady",(()=>{n(),t()}))}))))).then((()=>{setTimeout(this.props.onFinish,32)}))}render(){return(0,E.jsx)(KM,{root:this.props.root,annotation:this.props.annotation})}}class tN extends m.Component{constructor(...e){super(...e),this.state={item:0,loaded:new Set},this.container=m.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),kt.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,Ae.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,k.VS)(k.cE)||this.props.annotations[0]===this.props.store.selected||this.startRenderCycle()}startRenderCycle(){this.renderNext(0)}renderNext(e){this.setState({item:(0,x.isDefined)(e)?e:this.state.item+1},(()=>{this.state.item!e.hidden)).map((e=>(0,E.jsxs)("div",{id:`c-${e.id}`,style:{position:"relative"},children:[(0,E.jsx)(QD,{entity:e,onClick:()=>this.select(e),prediction:"prediction"===e.type,bordered:!1,style:{height:44}}),(0,k.VS)(k.cE)?(0,E.jsx)(KM,{root:this.props.root,annotation:e}):!this.state.loaded.has(e.id)&&(0,E.jsx)("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,E.jsx)(f.A,{size:"large"})})]},`anno-${e.id}`))),r&&(0,E.jsxs)("div",{id:"c-tmp",style:{opacity:0,position:"relative",right:99999},children:[(0,E.jsx)(QD,{entity:n,prediction:"prediction"===n.type,bordered:!1,style:{height:44}}),(0,E.jsx)(eN,{root:this.props.root,onFinish:this.onFinish,annotation:n},e)]},"anno-tmp")]}),(0,E.jsx)(Tr.A,{type:"text",onClick:this.left,className:qD,icon:(0,E.jsx)(ZD.A,{})}),(0,E.jsx)(Tr.A,{type:"text",onClick:this.right,className:JD,icon:(0,E.jsx)(GD.A,{})})]})}}const nN=({title:e,children:t,visible:n,onCancel:r})=>{const o={padding:"0 24px 24px",whiteSpace:"pre-wrap"};return(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)(wn.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,E.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,E.jsx)("p",{style:o,dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(t)}}):(0,E.jsx)("p",{style:o,children:t})]})})};var rN=n(19686);const oN=["relation","startNode","endNode","visible"],iN=["tags","taskData"],aN=({id:e,color:t})=>(0,E.jsx)("marker",{id:`arrow-${e}`,viewBox:"0 0 10 10",refX:8,refY:5,markerWidth:4,markerHeight:4,orient:"auto-start-reverse",children:(0,E.jsx)("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:t})}),sN=({x:e,y:t,width:n,height:r})=>(0,E.jsx)("rect",{x:e,y:t,width:n,height:r,fill:"none"}),lN=({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,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("defs",{children:(0,E.jsx)(aN,{id:e,color:i})}),o&&(0,E.jsx)("path",Object.assign({},a,{stroke:n,opacity:.1,strokeWidth:6})),(0,E.jsx)("path",Object.assign({},a,{opacity:o?1:.6,strokeWidth:2},s))]})},cN=({label:e,position:t})=>{const[n,r]=t,o=(0,m.useRef)(),[i,a]=(0,m.useState)({width:0,height:0,x:0,y:0}),s={transform:`translate(${n}, ${r})`,textAnchor:"middle",dominantBaseline:"middle"};return(0,m.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,E.jsxs)("g",Object.assign({},s,{children:[(0,E.jsx)("rect",Object.assign({},i,{stroke:"#fff",strokeWidth:2,fill:"#a0a",rx:"3"})),(0,E.jsx)("text",Object.assign({ref:o},{fill:"white",style:{fontSize:12,fontFamily:"arial"}},{children:e}))]}))},dN=({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,m.useState)(),h=de({id:e,startNode:t,endNode:n,direction:r,labels:s},c),{start:g,end:p}=ue(Object.assign({root:c},h)),[f,v]=he(g,p);return(0,m.useEffect)((()=>(h.onChange((()=>u({}))),()=>h.destroy())),[]),g.width<1||g.height<1||p.width<1||p.height<1?null:(0,E.jsxs)("g",{opacity:a&&!i?.5:1,visibility:d?"hidden":"visible",children:[(0,E.jsx)(sN,Object.assign({},g)),(0,E.jsx)(sN,Object.assign({},p)),(0,E.jsx)(lN,{id:h.id,command:f,color:h.color,direction:h.direction,highlight:i}),h.label&&(0,E.jsx)(cN,{label:h.label,position:v})]})},uN=(0,v.PA)((e=>{let{relation:t,startNode:n,endNode:r,visible:o}=e,i=(0,nr.A)(e,oN);const a=[n.getRegionElement?n.getRegionElement():n,r.getRegionElement?r.getRegionElement():r],[s,l]=(0,m.useState)(a[0]&&a[1]);(0,m.useEffect)((()=>{let e;const t=()=>{const n=(0,x.isDefined)(a[0])&&(0,x.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,E.jsx)(dN,Object.assign({id:t.id,startNode:n,endNode:r,direction:t.direction,visible:c,labels:t.selectedValues},i)):null}));class hN extends m.PureComponent{constructor(...e){super(...e),this.rootNode=(0,m.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,E.jsx)(rN.Ay,{onResize:this.onResize,children:()=>(0,E.jsxs)("svg",{className:"relations-overlay",ref:this.rootNode,xmlns:"http://www.w3.org/2000/svg",style:o,children:[(0,E.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,E.jsx)(uN,{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 gN=(0,v.PA)(hN),mN=(0,v.PA)((0,m.forwardRef)((({store:e,tags:t},n)=>{var r;const{relations:o,showConnections:i,highlighted:a}=e;return(0,E.jsx)(gN,{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 pN=null;const fN=(e,t)=>{if(clearTimeout(pN),(0,k.VS)(k.cE)){if(![...e.values()].every(u._n))return!1}else if(!(0,u._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||(pN=setTimeout((()=>{fN(e,t)}),100))},vN=(0,v.PA)((0,m.forwardRef)(((e,t)=>{let{tags:n,taskData:r}=e,o=(0,nr.A)(e,iN);const[i,a]=(0,m.useState)(!1);return(0,m.useEffect)((()=>(fN(n,(e=>{a(e)})),()=>clearTimeout(pN))),[r,n]),i&&(0,E.jsx)(mN,Object.assign({ref:t},o))}))),yN="block--sSl0y";class bN extends m.Component{componentDidMount(){const{annotation:e}=this.props;e&&e.updateObjects()}render(){let e=yN;return this.props.className&&(e=`${e} ${this.props.className}`),(0,E.jsx)("div",{className:e,children:this.props.children})}}bN.propTypes={children:Ee.PropTypes.array.isRequired};var xN=n(23091),wN=n(54710);const CN={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}},SN={videoDrawOutside:{description:"Allow drawing outside of video boundaries",defaultValue:!1,type:"boolean",ff:k.PR},videoHopSize:{description:"Video hop size",defaultValue:10,type:"number"}},jN=(0,v.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,E.jsx)(Qe.Sl,{name:"field",children:"boolean"===n.type?(0,E.jsx)(wN.S,Object.assign({},r,{children:n.description})):(0,E.jsxs)("label",{children:[n.description,(0,E.jsx)(OM.A,Object.assign({},r))]})},t)})),kN=(0,v.PA)((({store:e,settings:t})=>(0,E.jsx)(Qe.eB,{name:"settings",children:Object.entries(t).map((([t,n])=>n.ff&&!(0,k.VS)(n.ff)?null:(0,E.jsx)(jN,{name:t,store:e,value:n},t)))}))),ON=({store:e})=>(0,E.jsx)(kN,{store:e,settings:SN});ON.displayName="VideoSettings",ON.tagName="Video",ON.title="Video";const RN=(0,Zj.PA)(ON),EN=(0,k.VS)(k.bA)?{newUI:!0}:{},_N=Object.keys(CN);if((0,k.VS)(k.bA)){const e=_N.findIndex((e=>"enableTooltips"===e)),t=_N.findIndex((e=>"enableLabelTooltips"===e)),n=_N[e];_N[e]=_N[t],_N[t]=n}const AN=({children:e})=>(0,E.jsx)(Qe.eB,{name:"settings-tag",children:e}),TN=(0,v.PA)((({store:e})=>(0,E.jsx)(Qe.eB,{name:"settings",mod:EN,children:_N.map(((t,n)=>{var r;return(0,E.jsx)(Qe.Sl,{name:"field",tag:"label",children:(0,k.VS)(k.bA)?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(Qe.eB,{name:"settings__label",children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:[CN[t].newUI.title,null==(r=CN[t].newUI.tags)?void 0:r.split(",").map((e=>(0,E.jsx)(AN,{children:e},e)))]}),(0,E.jsx)(Qe.eB,{name:"description",children:CN[t].newUI.description})]}),(0,E.jsx)(hA,{checked:e.settings[t],onChange:e.settings[CN[t].onChangeEvent],description:CN[t].description},n)]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(wN.S,{checked:e.settings[t],onChange:e.settings[CN[t].onChangeEvent],children:CN[t].description},n),(0,E.jsx)("br",{})]})},n)}))}))),PN=(0,v.PA)((({store:e})=>(0,E.jsxs)(Qe.eB,{name:"settings",mod:EN,children:[(0,E.jsx)(Qe.Sl,{name:"field",children:(0,E.jsx)(wN.S,{checked:e.settings.bottomSidePanel,onChange:()=>{e.settings.toggleBottomSP(),setTimeout(x.triggerResizeEvent)},children:"Move sidepanel to the bottom"})}),(0,E.jsx)(Qe.Sl,{name:"field",children:(0,E.jsx)(wN.S,{checked:e.settings.displayLabelsByDefault,onChange:e.settings.toggleSidepanelModel,children:"Display Labels by default in Results panel"})}),(0,E.jsx)(Qe.Sl,{name:"field",children:(0,E.jsx)(wN.S,{value:"Show Annotations panel",defaultChecked:e.settings.showAnnotationsPanel,onChange:()=>{e.settings.toggleAnnotationsPanel()},children:"Show Annotations panel"})}),(0,E.jsx)(Qe.Sl,{name:"field",children:(0,E.jsx)(wN.S,{value:"Show Predictions panel",defaultChecked:e.settings.showPredictionsPanel,onChange:()=>{e.settings.togglePredictionsPanel()},children:"Show Predictions panel"})})]}))),IN={General:{name:"General",component:TN},Hotkeys:{name:"Hotkeys",component:()=>{const e=[{title:"Shortcut",dataIndex:"combo",key:"combo"},{title:"Description",dataIndex:"descr",key:"descr"}],t=kr.namespaces();return(0,E.jsx)(Qe.eB,{name:"keys",children:(0,E.jsx)(xN.A,{size:"small",children:Object.entries(t).map((([t,n])=>{var r,o;return 0===Object.keys(n.descriptions).length?null:(0,E.jsx)(xN.A.TabPane,{tab:null!=(r=n.description)?r:t,children:(0,E.jsx)(zA.A,{columns:e,dataSource:(o=n.descriptions,Object.keys(o).filter((e=>o[e])).map((e=>({key:e,combo:e.split(",").map((e=>(0,E.jsx)(Qe.Sl,{name:"key-group",children:e.trim().split("+").map((e=>(0,E.jsx)(Qe.Sl,{tag:"kbd",name:"key",children:e},e)))},e))),descr:o[e]})))),size:"small"})},t)}))})})}}};(0,k.VS)(k.bA)||(IN.Layout={name:"Layout",component:PN});const LN=Object.keys(IN)[0],MN=(0,k.VS)(k.bA)?{name:"settings-modal",title:"Labeling Interface Settings",closeIcon:(0,E.jsx)(ad,{})}:{name:"settings-modal-old",title:"Settings",bodyStyle:{paddingTop:"0"}},KN=(0,v.PA)((({store:e})=>{const t=(0,m.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,E.jsx)(Qe.eB,Object.assign({tag:wn.A,visible:e.showingSettings,onCancel:e.toggleSettings,footer:""},MN,{children:(0,E.jsxs)(xN.A,{defaultActiveKey:LN,children:[Object.entries(IN).map((([t,{name:n,component:r}])=>(0,E.jsx)(xN.A.TabPane,{tab:n,children:m.createElement(r,{store:e})},t))),t.map((t=>(0,E.jsx)(xN.A.TabPane,{tab:t.title,children:(0,E.jsx)(t,{store:e})},t.tagName)))]})}))})),DN=({children:e})=>(0,E.jsx)(Qe.eB,{name:"sidebar-tabs",children:(0,E.jsx)(Qe.Sl,{name:"content",children:e})}),NN=(e,t=[])=>{(0,m.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)},VN=320,zN=300,BN=500,HN=24,FN=["top-left","top-right","bottom-left","bottom-right","top","bottom","right","left"],WN=({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:p,zIndex:f,tooltip:v,locked:y=!1,positioning:b=!1,onSnap:w,onResize:C,onResizeStart:S,onResizeEnd:j,onVisibilityChange:k,onPositionChange:O,onPositionChangeBegin:R,children:_})=>{const A=(0,m.useRef)(),T=(0,m.useRef)(),P=(0,m.useRef)(),I=(0,m.useRef)({onResize:C,onResizeStart:S,onResizeEnd:j,onPositionChange:O,onPositionChangeBegin:R,onVisibilityChange:k,onSnap:w}),[L,M]=(0,m.useState)(),K=(0,m.useCallback)((t=>{t.stopPropagation(),t.preventDefault(),null==k||k(e,!1)}),[k]),D=(0,m.useCallback)((()=>{null==k||k(e,!0)}),[k]),N=(0,m.useMemo)((()=>{const e=s?{height:l&&null!=a?a:"100%",width:d?"100%":null!=o?o:VN}:{width:l?null!=o?o:VN:"100%",height:l?26:void 0};return Object.assign({},e,{zIndex:f})}),[o,a,s,l,d,f]),V=(0,m.useMemo)((()=>l&&!y?{top:`${g}%`,left:`${p}%`}:{}),[l,g,p,y]),z=(0,m.useMemo)((()=>({detached:!y&&l,resizing:(0,x.isDefined)(L),hidden:!s,alignment:l?"left":null!=c?c:"left",disabled:y})),[c,s,l,L,y]),B=(0,m.useMemo)((()=>l?s?(0,E.jsx)(vw,{}):(0,E.jsx)(Sw,{}):"left"===c?s?(0,E.jsx)(yy,{}):(0,E.jsx)(Ay,{}):"right"===c?s?(0,E.jsx)(Ay,{}):(0,E.jsx)(yy,{}):null),[l,s,c]),H=(0,m.useMemo)((()=>`${s?"Collapse":"Expand"} ${v}`),[s,v]);return(0,m.useEffect)((()=>{Object.assign(I.current,{onResize:C,onResizeStart:S,onResizeEnd:j,onPositionChangeBegin:R,onPositionChange:O,onVisibilityChange:k,onSnap:w})}),[C,S,j,O,k,R,w]),NN({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]),NN({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,x.isDefined)(d)&&["left","top-left"].includes(d),f=(0,x.isDefined)(d)&&["top","top-left"].includes(d),v=(0,x.clamp)(p?o-g:o+g,VN,a),y=(0,x.clamp)(f?i-m:i+m,zN,s+i),b=f?s+(i-y):s,w=p?l+(o-v):l;I.current.onResize(e,v,y,b,w)}},onMouseUp(){null==I.current.onResizeEnd||I.current.onResizeEnd(),M(void 0)}},[I,l,o,i,a,u,h,s,y,b]),(0,E.jsxs)(Qe.eB,{ref:T,name:"panel",mix:e,mod:z,style:Object.assign({},N,V),children:[(0,E.jsxs)(Qe.Sl,{name:"content",children:[!y&&(0,E.jsxs)(Qe.Sl,{ref:A,name:"header",onClick:l?void 0:D,children:[(s||l)&&(0,E.jsx)(Qe.Sl,{name:"title",children:r}),(0,E.jsx)(Qe.Sl,{name:"toggle",mod:{enabled:s},onClick:l&&!s?D:K,"data-tooltip":H,children:B})]}),s&&(0,E.jsx)(Qe.Sl,{name:"body",children:(0,E.jsx)(Qe.eB,{name:e,mix:t,children:_})})]}),s&&!b&&!y&&(0,E.jsx)(Qe.Sl,{name:"resizers",ref:P,mod:{locked:b||y},children:FN.map((e=>("left"===e||"right"===e)&&c!==e||l||l?(0,E.jsx)(Qe.Sl,{name:"resizer",mod:{drag:e===L},"data-resize":e},e):null))})]})},$N={container:"container--d7fgb",labelText:"labelText--ZGgO7",input:"input--HLuCD"},UN=["label","value","onChange","region","min","max"],ZN=(0,v.PA)((({region:e})=>{const{start:t,end:n}=e.ranges[0],r=e.object.length;return(0,E.jsxs)("div",{className:$N.container,children:[(0,E.jsx)(GN,{label:"Start frame",value:t,onChange:t=>{+t!==e.ranges[0].start&&e.setRanges([+t,e.ranges[0].end])},region:e,min:1,max:n}),(0,E.jsx)(GN,{label:"End frame",value:n,onChange:t=>{+t!==e.ranges[0].end&&e.setRanges([e.ranges[0].start,+t])},region:e,min:t,max:r}),(0,E.jsx)(GN,{label:"Duration",value:n-t+1,region:e})]})})),GN=e=>{let{label:t,value:n,onChange:r,min:o,max:i}=e,a=(0,nr.A)(e,UN);const s=!r,l=e=>{let t=+e.target.value;o&&t<+o&&(e.target.value=o,t=+o),i&&t>+i&&(e.target.value=i,t=+i),null==r||r(t)};return(0,E.jsxs)("label",{className:$N.label,children:[(0,E.jsx)("span",{className:$N.labelText,children:t}),(0,E.jsx)("input",Object.assign({className:$N.input,type:"number",step:1,readOnly:s,onBlur:l,onClick:l,onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()},[s?"value":"defaultValue"]:n,min:o,max:i},a))]})},YN=["onChange","type","value","step"],XN=e=>{const t=(e=>{if((0,u.fn)(e)){const t=e.getSubTypes();return(0,u.Cb)(t)?t.name:null}return(0,u.Cb)(e)?e.name:null})(e);return"number"===t?"number":"text"},qN={angle:mb},JN=({region:e})=>{var t;const n=null!=(t=e.editableFields)?t:[];return(0,E.jsx)(Qe.Sl,{name:"wrapper",children:e.editorEnabled&&n.map(((t,n)=>(0,E.jsx)(eV,{property:t.property,label:t.label,region:e},`${t.property}-${n}`)))})},QN=({region:e})=>{var t;return(0,E.jsx)(Qe.Sl,{name:"wrapper-time-control",children:(0,E.jsx)(kC,{startTime:e.start,endTime:e.end,minTime:0,maxTime:null==e||null==(t=e._ws_region)?void 0:t.duration,isSidepanel:!0,onChangeStartTime:t=>{e.setProperty("start",t)},onChangeEndTime:t=>{e.setProperty("end",t)},showLabels:!0,showDuration:!0})})},eV=({property:e,label:t,region:n})=>{const r=(0,Qe.KE)(),[o,i]=(0,m.useState)(n.getProperty(e)),a=(0,m.useMemo)((()=>n.getPropertyType(e)),[n,e]),s=(0,m.useMemo)((()=>(0,u.Cb)(a)),[a]),l=(0,m.useMemo)((()=>{if(s)return null;let e=null;if((0,u.CK)(a)){const t=(0,u.fn)(a)?a.getSubTypes().getSubTypes():a.getSubTypes();e=t.some((e=>(0,u.aw)(e)||(0,u.Cb)(e)))?t.map((e=>e.value)):null}return e}),[a,s]),c=(0,m.useMemo)((()=>{if(!s)return!1;return((0,u.fn)(a)?a.getSubTypes():a)===u.gK.boolean}),[a,s]),h=(0,m.useCallback)((t=>{if(t!==n.getProperty(e))try{n.setProperty(e,t)}catch(e){console.error(e)}}),[a,c]);return(0,m.useEffect)((()=>{const t=(0,d.lB)(n,e,(({newValue:e,oldValue:t})=>{t.storedValue!==e.storedValue&&i(e.storedValue)}));return()=>t()}),[n]),(0,E.jsxs)(Qe.Sl,{name:"property",tag:"label",children:[c?(0,E.jsx)(wN.S,{className:null==r?void 0:r.elem("input").toClassName(),checked:o,onChange:e=>h(e.target.checked)}):s?(0,E.jsx)(tV,{type:XN(a),step:"0.01",value:o,onChange:e=>h(Number(e))}):l?(0,E.jsx)("select",{value:o,onChange:e=>h(e.target.value),className:null==r?void 0:r.elem("select").toClassName(),children:l.map(((e,t)=>(0,E.jsx)("option",{value:e,children:e},`${e}-${t}`)))}):null,(0,E.jsx)(nV,{label:t})]})},tV=e=>{let{onChange:t,type:n,value:r,step:o}=e,i=(0,nr.A)(e,YN);const a=(0,Qe.KE)(),[s,l]=(0,m.useState)(r),c=(0,m.useCallback)(((e,n=!0)=>{const r=e;l(r),n&&(null==t||t(r))}),[t,n]),d=(0,m.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,m.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,m.useEffect)((()=>{c(r)}),[r]),(0,E.jsx)("input",Object.assign({},i,{className:null==a?void 0:a.elem("input").toClassName(),type:"text",step:o,onChange:d,onKeyDown:u,value:s}))},nV=({label:e})=>{const t=(0,m.useMemo)((()=>{if(e.startsWith("icon:")){var t;const n=e.split(":")[1];return null!=(t=qN[n])?t:null}return null}),[e]);return(0,E.jsx)(Qe.Sl,{name:"text",tag:"span",children:t?(0,E.jsx)(t,{}):e})},rV=(0,v.PA)((({region:e})=>{const t=(0,k.VS)(k.vS)&&"audioregion"===e.type,n="timelineregion"===e.type?ZN:t?QN:JN;return(0,E.jsx)(Qe.eB,{name:"region-editor",mod:{disabled:e.isReadOnly()},children:(0,E.jsx)(n,{region:e})})})),{Text:oV}=AE.A,iV=(0,v.PA)((({mainValue:e})=>(0,E.jsx)(oV,{mark:!0,children:e.map(((e,t)=>(0,E.jsx)("p",{"data-counter":t+1,children:e},`${e}-${t}`)))}))),aV=(0,v.PA)((({mainValue:e})=>(0,E.jsx)(oV,{mark:!0,children:e.join(", ")}))),sV=(0,v.PA)((({mainValue:e})=>(0,E.jsx)("span",{children:e}))),lV=(0,v.PA)((({result:e})=>{const{type:t,mainValue:n}=e,r=(0,m.useMemo)((()=>"rating"===t?(0,E.jsxs)(Qe.Sl,{name:"result",children:[(0,E.jsx)(oV,{children:"Rating: "}),(0,E.jsx)(Qe.Sl,{name:"value",children:(0,E.jsx)(sV,{mainValue:n})})]}):"textarea"===t?(0,E.jsxs)(Qe.Sl,{name:"result",children:[(0,E.jsx)(oV,{children:"Text: "}),(0,E.jsx)(Qe.Sl,{name:"value",children:(0,E.jsx)(iV,{mainValue:n})})]}):"choices"===t?(0,E.jsxs)(Qe.Sl,{name:"result",children:[(0,E.jsx)(oV,{children:"Choices: "}),(0,E.jsx)(Qe.Sl,{name:"value",children:(0,E.jsx)(aV,{mainValue:n})})]}):"taxonomy"===t?(0,E.jsxs)(Qe.Sl,{name:"result",children:[(0,E.jsx)(oV,{children:"Taxonomy: "}),(0,E.jsx)(Qe.Sl,{name:"value",children:(0,E.jsx)(aV,{mainValue:n.map((e=>e.join("/")))})})]}):void 0),[t,n]);return r?(0,E.jsx)(Qe.eB,{name:"region-meta",children:r}):null})),cV=(0,v.PA)((({region:e})=>(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(Qe.Sl,{name:"result",children:[(null==e?void 0:e.results).map((e=>(0,E.jsx)(lV,{result:e},e.pid))),null!=e&&e.text?(0,E.jsx)(Qe.eB,{name:"region-meta",children:(0,E.jsx)(Qe.Sl,{name:"item",children:(0,E.jsx)(Qe.Sl,{name:"content",mod:{type:"text"},children:e.text.replace(/\\n/g,"\n")})})}):null]}),(0,E.jsx)(rV,{region:e})]}))),dV=(0,v.PA)((({region:e,editMode:t,cancelEditMode:n,enterEditMode:r})=>{var o,i;const a=(0,Qe.KE)(),s=(0,m.useRef)(),l=t=>{e.setMetaText(t),e.setNormInput(t)};return(0,m.useEffect)((()=>{if(t&&s.current){const{current:e}=s;e.focus(),e.setSelectionRange(e.value.length,e.value.length)}}),[t]),(0,E.jsx)(E.Fragment,{children:t?(0,E.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,E.jsx)(Qe.Sl,{name:"meta-text",onClick:()=>null==r?void 0:r(),children:null==(i=e.meta)?void 0:i.text})})})),uV=["children","onClick"],hV=e=>{var t;let{children:n,onClick:r}=e,o=(0,nr.A)(e,uV);return(0,E.jsx)(Qa,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}))},gV=(0,v.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,k.VS)(k.bA)){const t=Object.assign({},a,{display:e.isReadOnly()||r?void 0:"none"});return(0,E.jsx)(hV,{disabled:c,onClick:s,hotkey:o,look:i,style:t,children:l?(0,E.jsx)(tv,{}):(0,E.jsx)(sv,{})})}return e&&(n||e.isReadOnly()||r)&&(0,E.jsx)(hV,{disabled:c,onClick:s,hotkey:o,look:i,style:a,children:l?(0,E.jsx)(tv,{}):(0,E.jsx)(sv,{})})})),mV=(0,v.PA)((({region:e})=>{const t=e.labelings.map((e=>e.selectedLabels||[])),n=[].concat(...t);return n.length?(0,E.jsx)(Qe.eB,{name:"labels-list",children:n.map(((e,t)=>{const n=e.background||"#000000";return[t?", ":null,(0,E.jsx)("span",{style:{color:n},children:e.value},e.id)]}))}):(0,E.jsx)(Qe.eB,{name:"labels-list",children:"No label"})})),pV=["children"],fV=(0,v.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,m.useState)(!1),h=(0,m.useMemo)((()=>!!c.find((e=>!e.isReadOnly()&&!e.classification))),[c]),g=(0,m.useMemo)((()=>{var t,n;const r=null!=(t=null!=(n=e.background)?n:e.getOneColor())?t:"#666";return Ct()(r).alpha(1)}),[e.background,e.style]);return(0,E.jsxs)(Qe.eB,{name:"detailed-region",mod:{compact:t},children:[(0,E.jsxs)(Qe.Sl,{name:"head",style:{color:g.css()},children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:[(0,E.jsx)(Qe.Sl,{name:"icon",children:(0,E.jsx)(IO,{node:e})}),(0,E.jsx)(mV,{region:e})]}),r&&(0,E.jsx)("span",{children:e.cleanId})]}),o&&(0,E.jsx)(Qe.Sl,{name:"content",children:(0,E.jsx)(o,{region:e})}),e.isDrawing&&(0,E.jsxs)(Qe.Sl,{name:"warning",children:[(0,E.jsx)(qd,{}),(0,E.jsxs)(Qe.Sl,{name:"warning-text",children:["Incomplete ",null!=(a=null==(s=e.type)?void 0:s.replace("region",""))?a:"region"]})]}),n&&(0,E.jsx)(vV,{region:e,editMode:d,annotation:l,hasEditableRegions:h,onEditModeChange:u}),i&&(0,E.jsx)(Qe.Sl,{name:"content",children:(0,E.jsx)(i,{region:e,editMode:d,enterEditMode:()=>u(!0),cancelEditMode:()=>u(!1)})})]})})),vV=(0,v.PA)((({region:e,annotation:t,editMode:n,onEditModeChange:r})=>{const o=[];return o.push((0,E.jsx)(yV,{icon:(0,E.jsx)(lf,{}),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,E.jsx)(yV,{icon:(0,E.jsx)(mf,{}),primary:n,onClick:()=>r(!n),hotkey:"region:meta","aria-label":"Edit region's meta"},"meta")),(0,E.jsxs)(Qe.eB,{name:"region-actions",children:[(0,E.jsx)(Qe.Sl,{name:"group",mod:{align:"left"},children:!e.isReadOnly()&&o}),(0,E.jsxs)(Qe.Sl,{name:"group",mod:{align:"right"},children:[(0,E.jsx)(gV,{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,E.jsx)(yV,{icon:e.hidden?(0,E.jsx)(Fi,{}):(0,E.jsx)(Di,{}),onClick:e.toggleHidden}),(0,E.jsx)(yV,{danger:!0,disabled:e.isReadOnly(),icon:(0,E.jsx)(Ps,{}),onClick:()=>t.deleteRegion(e)})]})]})})),yV=e=>{let{children:t}=e,n=(0,nr.A)(e,pV);return(0,E.jsx)(Qa,Object.assign({},n,{look:"alt",style:{padding:0},children:t}))},bV=(0,v.PA)((({relations:e})=>(0,E.jsx)(E.Fragment,{children:e.map(((e,t)=>(0,E.jsx)(xV,{relation:e},t)))}))),xV=(0,v.PA)((({relation:e})=>{const[t,n]=(0,m.useState)(!1),r=(0,m.useCallback)((()=>{e.node1&&e.node2&&(n(!0),e.toggleHighlight(),e.setSelfHighlight(!0))}),[]),o=(0,m.useCallback)((()=>{e.node1&&e.node2&&(n(!1),e.toggleHighlight(),e.setSelfHighlight(!1))}),[]),i=(0,m.useMemo)((()=>{const{direction:t}=e;switch(t){case"left":return(0,E.jsx)(Jy,{"data-direction":e.direction});case"right":return(0,E.jsx)(Wy,{"data-direction":e.direction});case"bi":return(0,E.jsx)(ab,{"data-direction":e.direction});default:return null}}),[e.direction]);return(0,E.jsxs)(Qe.Sl,{name:"item",mod:{hidden:!e.visible},onMouseEnter:r,onMouseLeave:o,children:[(0,E.jsxs)(Qe.Sl,{name:"content",children:[(0,E.jsx)(Qe.Sl,{name:"icon",onClick:e.rotateDirection,children:(0,E.jsx)(Qe.Sl,{name:"direction",children:i})}),(0,E.jsxs)(Qe.Sl,{name:"nodes",children:[(0,E.jsx)(fV,{compact:!0,withActions:!1,withIds:!1,region:e.node1}),(0,E.jsx)(fV,{compact:!0,withActions:!1,withIds:!1,region:e.node2})]}),(0,E.jsxs)(Qe.Sl,{name:"actions",children:[(0,E.jsx)(Qe.Sl,{name:"action",children:(t||e.showMeta)&&e.hasRelations&&(0,E.jsx)(Qa,{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,E.jsx)(Lf,{})})}),(0,E.jsx)(Qe.Sl,{name:"action",children:(t||!e.visible)&&(0,E.jsx)(Qa,{type:"text",onClick:e.toggleVisibility,"aria-label":(e.visible?"Hide":"Show")+" Relation",children:e.visible?(0,E.jsx)(Di,{}):(0,E.jsx)(Fi,{})})}),(0,E.jsx)(Qe.Sl,{name:"action",children:t&&(0,E.jsx)(Qa,{type:"text",danger:!0,"aria-label":"Delete Relation",onClick:()=>{e.node1.setHighlight(!1),e.node2.setHighlight(!1),e.parent.deleteRelation(e)},children:(0,E.jsx)(Ps,{})})})]})]}),e.showMeta&&(0,E.jsx)(wV,{relation:e})]})})),wV=(0,v.PA)((({relation:e})=>{const{selectedValues:t,control:n}=e,{children:r,choice:o}=n,i=(0,m.useMemo)((()=>"multiple"===o?"multiple":void 0),[o]),a=(0,m.useCallback)((t=>{const n=(0,x.wrapArray)(t);e.setRelations(n)}),[e]);return(0,E.jsx)(Qe.eB,{name:"relation-meta",children:(0,E.jsx)(er.A,{mode:i,style:{width:"100%"},placeholder:"Select labels",value:t,onChange:a,children:r.map((e=>(0,E.jsx)(er.A.Option,{value:e.value,style:{background:e.background},children:e.value},e.value)))})})})),CV=(0,v.PA)((({relationStore:e})=>{const t=e.orderedRelations;return(0,E.jsx)(Qe.eB,{name:"relations",children:(0,E.jsx)(bV,{relations:t})})})),SV=(0,v.PA)((({relationStore:e})=>{var t;const n=(0,m.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleAllVisibility()}),[e]),r=!(null!=e&&null!=(t=e.relations)&&t.length),o=!(!r&&e.isAllHidden);return(0,E.jsx)(Qe.Sl,{tag:Qa,type:"text",disabled:r,onClick:n,mod:{hidden:o},"aria-label":o?"Show all":"Hide all",icon:o?(0,E.jsx)(Jw,{}):(0,E.jsx)(Bw,{}),tooltip:o?"Show all":"Hide all",tooltipTheme:"dark"})})),jV=(0,v.PA)((({relationStore:e})=>{var t;const n=(0,m.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleOrder()}),[e]),r=!(null!=e&&null!=(t=e.relations)&&t.length),o="asc"===e.order;return(0,E.jsx)(Qe.Sl,{tag:Qa,type:"text",onClick:n,disabled:r,mod:{order:e.order},"aria-label":o?"Order by oldest":"Order by newest",icon:o?(0,E.jsx)(Zv,{}):(0,E.jsx)(ay,{}),tooltip:o?"Order by oldest":"Order by newest",tooltipTheme:"dark"})})),kV=(0,v.PA)((({relationStore:e})=>(0,E.jsxs)(Qe.eB,{name:"relation-controls",children:[(0,E.jsx)(SV,{relationStore:e}),(0,E.jsx)(jV,{relationStore:e})]}))),OV=["currentEntity","regions"],RV=(0,v.PA)((({selection:e,currentEntity:t})=>(0,E.jsx)(E.Fragment,{children:e.size?(0,E.jsx)(IV,{regions:e}):(0,E.jsx)(PV,{currentEntity:t})}))),EV=(0,v.WQ)("store")((0,v.PA)((({store:e})=>(0,E.jsx)(E.Fragment,{children:e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,E.jsx)(Qe.eB,{name:"comments-panel",children:(0,E.jsx)(Qe.Sl,{name:"section-tab",children:(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(OD,{annotationStore:e.annotationStore,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})})})})))),_V=(0,v.WQ)("store")((0,v.PA)((({currentEntity:e})=>{const{relationStore:t}=e;return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(Qe.eB,{name:"relations",children:(0,E.jsxs)(Qe.Sl,{name:"section-tab",children:[(0,E.jsxs)(Qe.Sl,{name:"view-control",children:[(0,E.jsxs)(Qe.Sl,{name:"section-head",children:["Relations (",t.size,")"]}),(0,E.jsx)(kV,{relationStore:t})]}),(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(CV,{relationStore:t})})]})})})}))),AV=(0,v.WQ)("store")((0,v.PA)((({store:e,currentEntity:t})=>{var n;const r=e.hasInterface("annotations:history"),o=(0,k.VS)(k.Lk);return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(Qe.eB,{name:"history",children:o?(0,E.jsxs)(Qe.Sl,{name:"section-tab",children:[(0,E.jsxs)(Qe.Sl,{name:"section-head",children:["Annotation History",(0,E.jsxs)("span",{children:["#",null!=(n=t.pk)?n:t.id]})]}),(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(GM,{inline:!0,showDraft:o,enabled:r})})]}):(0,E.jsx)(NM,{item:t})})})}))),TV=(0,v.WQ)("store")((0,v.PA)((({selection:e})=>(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(Qe.eB,{name:"info",children:(0,E.jsxs)(Qe.Sl,{name:"section-tab",children:[(0,E.jsx)(Qe.Sl,{name:"section-head",children:"Selection Details"}),(0,E.jsx)(IV,{regions:e})]})})})))),PV=(0,v.WQ)("store")((0,v.PA)((({store:e,currentEntity:t})=>{var n;const{relationStore:r}=t,o=e.hasInterface("annotations:history"),i=(0,k.VS)(k.Lk);return(0,E.jsxs)(E.Fragment,{children:[i?(0,E.jsxs)(Qe.Sl,{name:"section",children:[(0,E.jsxs)(Qe.Sl,{name:"section-head",children:["Annotation History",(0,E.jsxs)("span",{children:["#",null!=(n=t.pk)?n:t.id]})]}),(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(GM,{inline:!0,showDraft:i,enabled:o})})]}):(0,E.jsx)(NM,{item:t}),(0,E.jsxs)(Qe.Sl,{name:"section",children:[(0,E.jsxs)(Qe.Sl,{name:"view-control",children:[(0,E.jsxs)(Qe.Sl,{name:"section-head",children:["Relations (",r.size,")"]}),(0,E.jsx)(kV,{relationStore:r})]}),(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(CV,{relationStore:r})})]}),e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,E.jsxs)(Qe.Sl,{name:"section",children:[(0,E.jsx)(Qe.Sl,{name:"section-head",children:"Comments"}),(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(OD,{annotationStore:e.annotationStore,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})]})]})})));PV.displayName="GeneralPanel";const IV=(0,v.PA)((({regions:e})=>(0,E.jsx)("div",{children:e.list.map((e=>(0,E.jsx)(LV,{region:e},e.id)))}))),LV=(0,v.PA)((({region:e})=>(0,E.jsx)(fV,{region:e,mainDetails:cV,metaDetails:dV}))),MV=EV,KV=AV,DV=_V,NV=TV,VV=((0,v.PA)((({currentEntity:e,regions:t})=>{const n=t.selection;return(0,E.jsx)(Qe.eB,{name:"details-tab",children:(0,E.jsx)(RV,{selection:n,currentEntity:e})})})),(0,v.PA)((e=>{let{currentEntity:t,regions:n}=e,r=(0,nr.A)(e,OV);const o=n.selection;return(0,E.jsx)(WN,Object.assign({},r,{currentEntity:t,name:"details",title:"Details",children:(0,E.jsx)(RV,{selection:o,currentEntity:t})}))})));var zV,BV=n(99305),HV=["title","titleId"];function FV(){return FV=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var $V=function(e,t){var n=e.title,r=e.titleId,o=WV(e,HV);return m.createElement("svg",FV({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?m.createElement("title",{id:r},n):null,zV||(zV=m.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"})))},UV=(0,m.forwardRef)($V);n.p;const ZV=["item","label","isArea"],{localStorage:GV}=window,YV="collapsed-label-pos",XV=(0,m.createContext)({regions:null}),qV=({entity:e})=>(0,E.jsx)(rz,{node:e}),JV=({isLeaf:e})=>(0,E.jsx)(nz,{isLeaf:e}),QV=(0,v.PA)((({regions:e,regionsTree:t})=>{const n=(0,m.useRef)(),[r,o]=(0,m.useState)(0);let i=(0,m.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,m.useEffect)((()=>()=>{var e;null==(e=i)||e.disconnect(),i=null}),[]);const a=(0,m.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=tz(),l=e.selection.keys,c=(0,Qe.cn)("tree");let d,u;const h=(0,k.VS)(k.TU)&&"label"===e.group;if((0,k.VS)(k.TU)){var g,p,f;const[e,n]=(0,m.useState)(null!=(g=null==(p=GV.getItem(YV))||null==p.split||null==(p=p.split(","))?void 0:p.filter((e=>!!e)))?g:[]),r=e=>{GV.setItem(YV,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,E.jsx)(Qe.eB,Object.assign({name:"outliner-tree"},(0,k.VS)(k.sI)?{ref:a}:{},{children:(!!r||!(0,k.VS)(k.sI))&&(0,E.jsx)(BV.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:qV,switcherIcon:JV},(0,k.VS)(k.sI)?{virtual:!0,itemHeight:34,height:r}:{},s,h?{expandedKeys:d,onExpand:u}:{}),e.group)}))})),ez=({regions:e,rootClass:t,footer:n})=>{const r=(0,m.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=Ct()(null!=u?u:"#666").alpha(1),g={hidden:c,type:l,isDrawing:d},m=(0,E.jsx)(dD,{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,E.jsx)(oz,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},tz=()=>{const e=(0,m.useCallback)(((e,t)=>{const n=t.nativeEvent.ctrlKey||(0,x.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,k.VS)(k.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,m.useRef)(),n=(0,m.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,m.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,m.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,m.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,x.flatten)(e.map((e=>e.groupcancontain.split(",")))),r=(0,x.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}},nz=(0,v.PA)((({isLeaf:e})=>e?null:(0,E.jsx)(UV,{}))),rz=(0,v.PA)((({node:e})=>e?(0,E.jsx)(IO,{node:e}):null)),oz=(0,v.PA)((e=>{var t,n;let{item:r,label:o,isArea:i}=e,a=(0,nr.A)(e,ZV);const s=null==r?void 0:r.highlighted,[l,c]=(0,m.useState)(!1),d=(0,m.useMemo)((()=>{var e;return i&&null!=(e=r.perRegionDescControls)?e:[]}),[null==r?void 0:r.perRegionDescControls,i]),u=(0,m.useMemo)((()=>d.length>0),[d.length]),h=(0,m.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),c(!l)}),[l]);return(0,E.jsxs)(Qe.eB,{name:"outliner-item",children:[(0,E.jsxs)(Qe.Sl,{name:"content",children:[!a.isGroup&&(0,E.jsx)(Qe.Sl,{name:"index",children:a.idx+1}),(0,E.jsxs)(Qe.Sl,{name:"title",children:[o,(null==r?void 0:r.text)&&(0,E.jsx)(Qe.Sl,{name:"text",children:r.text.replace(/\\n/g,"\n")}),(null==r?void 0:r.isDrawing)&&(0,E.jsx)(Qe.Sl,{tag:"span",name:"incomplete",children:(0,E.jsx)(hr,{title:`Incomplete ${null!=(t=null==(n=r.type)?void 0:n.replace("region",""))?t:"region"}`,children:(0,E.jsx)(qd,{})})})]}),(0,E.jsx)(iz,{hovered:s,item:r,entity:a.entity,regions:a.children,type:a.type,collapsed:l,hasControls:u&&i,toggleCollapsed:h})]}),u&&i&&(0,E.jsx)(Qe.Sl,{name:"ocr",children:(0,E.jsx)(az,{item:r,controls:d,collapsed:l,setCollapsed:c,selected:a.selected})})]})})),iz=(0,v.PA)((({hovered:e,item:t,entity:n,collapsed:r,regions:o,hasControls:i,type:a,toggleCollapsed:s})=>{const{regions:l}=(0,m.useContext)(XV),c=(0,m.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,m.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,m.useCallback)((e=>{s(e)}),[s]),h=(0,m.useCallback)((()=>{t.setLocked((e=>!e))}),[]);return(0,E.jsxs)(Qe.Sl,{name:"controls",mod:{withControls:i,newUI:(0,k.VS)(k.bA)},children:[(0,k.VS)(k.bA)?(0,E.jsx)(hr,{title:"Confidence Score",children:(0,E.jsxs)(Qe.Sl,{name:"control-wrapper",children:[(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"predict"},children:"prediction"===(null==t?void 0:t.origin)&&(0,E.jsx)($s,{style:{width:18,height:18}})}),(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"score"},children:(0,x.isDefined)(null==t?void 0:t.score)&&t.score.toFixed(2)})]})}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"score"},children:(0,x.isDefined)(null==t?void 0:t.score)&&t.score.toFixed(2)}),(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"dirty"}}),(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"predict"},children:"prediction"===(null==t?void 0:t.origin)&&(0,E.jsx)($s,{style:{width:18,height:18}})})]}),(0,E.jsxs)(Qe.Sl,{name:"wrapper",children:[(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"lock"},children:(0,E.jsx)(gV,{item:t,annotation:null==t?void 0:t.annotation,hovered:e,locked:null==t?void 0:t.locked,onClick:h})}),(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"visibility"},children:(0,k.VS)(k.bA)?(0,E.jsx)(hV,{onClick:d,style:c?void 0:{display:"none"},children:c?(0,E.jsx)(Fi,{}):(0,E.jsx)(Di,{})}):(0,E.jsx)(hV,{onClick:d,children:c?(0,E.jsx)(Fi,{}):(0,E.jsx)(Di,{})})}),i&&(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"visibility"},children:(0,E.jsx)(hV,{onClick:u,children:(0,E.jsx)(Wr,{style:{transform:`rotate(${r?-90:90}deg)`}})})})]})]})})),az=(0,v.PA)((({item:e,collapsed:t,setCollapsed:n,selected:r})=>{const o=e.perRegionDescControls||[],i=(0,m.useCallback)((t=>{t.stopPropagation(),r||e.annotation.selectArea(e)}),[e,r,t]);return(0,E.jsx)(Qe.eB,{name:"ocr",mod:{collapsed:t,empty:!((null==o?void 0:o.length)>0)},onClick:i,onDragStart:e=>e.stopPropagation(),children:(0,E.jsx)(Qe.Sl,{name:"controls",children:o.map(((r,o)=>{const i=b.getPerRegionView(r.type,mt.REGION_LIST),a=e.getOneColor(),s=a?Ct()(a).alpha(.2).css():void 0;return i?(0,E.jsx)(i,{item:r,area:e,collapsed:t,setCollapsed:n,color:s,outliner:!0},o):null}))})})})),sz=(0,v.PA)((({regions:e,footer:t})=>{const n=(0,Qe.cn)("tree"),r=ez({regions:e,rootClass:n,footer:t,grouping:e.group});return(0,E.jsx)(XV.Provider,{value:{regions:e},children:(0,E.jsx)(QV,{regions:e,regionsTree:r})})})),lz=(0,m.createContext)({locked:!1}),{Block:cz,Elem:dz}=(0,Qe.JE)(),uz=(0,v.PA)((({ordering:e,regions:t,orderingDirection:n,onOrderingChange:r,onGroupingChange:o,onFilterChange:i})=>{const a=t.group,s=(0,m.useContext)(lz),l=(0,m.useCallback)((e=>{switch(e){case"manual":return{label:"Group Manually",selectedLabel:(0,k.VS)(k.bA)?"Manual":"Manual Grouping",icon:(0,E.jsx)(wv,{}),tooltip:"Manually Grouped"};case"label":return{label:"Group by Label",selectedLabel:(0,k.VS)(k.bA)?(0,k.VS)(k.CZ)?"By Label":"Label":"Grouped by Label",icon:(0,E.jsx)(Lv,{}),tooltip:"Grouped by Label"};case"type":return{label:"Group by Tool",selectedLabel:(0,k.VS)(k.bA)?(0,k.VS)(k.CZ)?"By Tool":"Tool":"Grouped by Tool",icon:(0,E.jsx)(gv,{}),tooltip:"Grouped by Tool"}}}),[]),c=(0,m.useCallback)((e=>{switch(e){case"date":return{label:"Order by Time",selectedLabel:"By Time",icon:(0,E.jsx)(Yf,{})};case"score":return{label:"Order by Score",selectedLabel:"By Score",icon:(0,E.jsx)(Rv,{})}}}),[]),d="asc"===n?(0,E.jsx)(Zv,{style:{color:"#898098"}}):(0,E.jsx)(ay,{style:{color:"#898098"}});return(0,E.jsxs)(cz,{name:"view-controls",mod:{collapsed:s.locked,FF_LSDV_4992:(0,k.VS)(k.CZ)},children:[(0,E.jsx)(hz,{value:a,options:["manual","type","label"],onChange:e=>o(e),readableValueForKey:l}),"manual"===a&&(0,E.jsx)(dz,{name:"sort",children:(0,E.jsx)(hz,{value:e,direction:n,options:["score","date"],onChange:e=>r(e),readableValueForKey:c,allowClickSelected:!0,extraIcon:d})}),(0,k.VS)(k.CZ)?(0,E.jsx)(pz,{regions:t}):null]})})),hz=({value:e,options:t,direction:n,allowClickSelected:r,onChange:o,readableValueForKey:i,extraIcon:a})=>{const s=(0,m.useMemo)((()=>i(e)),[e]),l=(0,m.useMemo)((()=>t.map((e=>[e,i(e)]))),[]),c=(0,m.useMemo)((()=>(0,E.jsx)(xT,{size:"medium",style:{width:200,minWidth:200,borderRadius:(0,k.VS)(k.bA)&&4},selectedKeys:[e],allowClickSelected:r,children:l.map((([t,r])=>(0,E.jsx)(gz,{name:t,value:e,direction:n,label:r,onChange:e=>o(e)},t)))})),[e,l,s,n,o]),d=(0,k.VS)(k.bA)?{mod:{newUI:!0}}:void 0,u=(0,k.VS)(k.CZ)?{}:{padding:"0",whiteSpace:"nowrap"};return(0,k.VS)(k.bA)&&(u.padding="0 12px 0 2px"),(0,E.jsx)(J_.Trigger,{content:c,style:{width:200},children:(0,E.jsx)(Qa,Object.assign({type:"text","data-testid":`grouping-${e}`},d,{icon:s.icon,style:u,extra:(0,k.VS)(k.bA)?a:(0,E.jsx)(mz,{direction:n,name:e,value:e,wrap:!1}),tooltip:(0,k.VS)(k.CZ)&&s.tooltip||void 0,tooltipTheme:"dark",children:s.selectedLabel}))})},gz=({value:e,name:t,label:n,direction:r,onChange:o})=>(0,E.jsx)(xT.Item,{name:t,onClick:()=>o(t),children:(0,E.jsxs)(dz,{name:"label",children:[n.label,(0,E.jsx)(mz,{direction:r,name:t,value:e})]})}),mz=({direction:e,value:t,name:n,wrap:r=!0})=>{const o="asc"===e?(0,E.jsx)(Bv,{}):(0,E.jsx)(ey,{});return!e||t!==n||(0,k.VS)(k.bA)?null:r?(0,E.jsx)("span",{children:o}):o},pz=(0,v.PA)((({regions:e})=>{var t;const n=(0,m.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleVisibility()}),[e]),r=!(null!=e&&null!=(t=e.regions)&&t.length),o=!r&&e.isAllHidden;return(0,E.jsx)(dz,{tag:Qa,type:"text",disabled:r,onClick:n,mod:{hidden:o},"aria-label":o?"Show all regions":"Hide all regions",icon:o?(0,E.jsx)(Jw,{}):(0,E.jsx)(Bw,{}),tooltip:o?"Show all regions":"Hide all regions",tooltipTheme:"dark"})})),fz=["regions"],vz=[];(0,k.VS)(k.CZ)&&vz.push("ff_hide_all_regions"),(0,k.VS)(k.sI)&&vz.push("ff_outliner_optim");const yz=(0,v.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,m.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,E.jsx)(E.Fragment,{children:a?(0,E.jsxs)(Qe.eB,{name:"filters-info",children:[(0,E.jsx)(Mw,{width:21,height:20}),(0,E.jsx)(Qe.Sl,{name:"filters-title",children:"All regions hidden"}),(0,E.jsx)(Qe.Sl,{name:"filters-description",children:"Adjust or remove the filters to view"})]}):(null==e||null==(i=e.regions)?void 0:i.length)>0?(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(sz,{regions:e,footer:s>0&&(0,E.jsxs)(Qe.eB,{name:"filters-info",children:[(0,E.jsx)(Mw,{width:21,height:20}),(0,E.jsxs)(Qe.Sl,{name:"filters-title",children:["There ",1===s?"is":"are"," ",s," hidden region",s>1&&"s"]}),(0,E.jsx)(Qe.Sl,{name:"filters-description",children:"Adjust or remove filters to view"})]})})}):(0,E.jsx)(Qe.Sl,{name:"empty",children:"Regions not added"})})})),bz=(0,v.PA)((({regions:e})=>{const t=(0,m.useCallback)((t=>{e.setSort(t)}),[e]),n=(0,m.useCallback)((t=>{e.setGrouping(t)}),[e]),r=(0,m.useCallback)((t=>{e.setFilteredRegions(t)}),[e]);return(0,E.jsxs)(Qe.eB,{name:"outliner",mix:vz,children:[(0,E.jsx)(uz,{ordering:e.sort,regions:e,orderingDirection:e.sortOrder,onOrderingChange:t,onGroupingChange:n,onFilterChange:r}),(0,E.jsx)(yz,{regions:e})]})})),xz=(0,v.PA)((e=>{let{regions:t}=e,n=(0,nr.A)(e,fz);const[r,o]=(0,m.useState)(),i=(0,m.useCallback)((e=>{t.setSort(e)}),[t]),a=(0,m.useCallback)((e=>{t.setGrouping(e),o(e)}),[t]),s=(0,m.useCallback)((e=>{t.setFilteredRegions(e)}),[t]);return(0,m.useEffect)((()=>{o(t.group)}),[]),t.setGrouping(r),(0,E.jsxs)(WN,Object.assign({},n,{name:"outliner",mix:vz,title:"Outliner",children:[(0,E.jsx)(uz,{ordering:t.sort,regions:t,orderingDirection:t.sortOrder,onOrderingChange:i,onGroupingChange:a,onFilterChange:s}),(0,E.jsx)(yz,{regions:t})]}))})),wz=e=>{const[t,n]=(0,m.useState)(window.matchMedia(e));return(0,m.useEffect)((()=>{const t=()=>{n(window.matchMedia(e))};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[]),(0,m.useEffect)((()=>{n(window.matchMedia(e))}),[e]),t},Cz=980,Sz=(e,t)=>{const n=window.localStorage.getItem(`panel:${e}`);return n?Object.assign({},t,JSON.parse(n)):t},jz=(e,t)=>{window.localStorage.setItem(`panel:${e}`,JSON.stringify(t))},kz={outliner:{title:"Outliner",component:xz,icon:Hf},details:{title:"Details",component:VV,icon:Yf}},Oz=(0,v.PA)((({currentEntity:e,panelsHidden:t,children:n})=>{const r=e.regionStore,o=(0,m.useRef)({width:0,height:0}),i=wz("screen and (max-width: 980px)"),[a,s]=(0,m.useState)(500),[l,c]=(0,m.useState)(!1),[d,u]=(0,m.useState)(!1),[h,g]=(0,m.useState)(!1),[p,f]=(0,m.useState)(!1),v=(0,m.useRef)(),[y,b]=(0,m.useState)(),w=(0,m.useRef)(y),[C,S]=(0,m.useState)({outliner:Sz("outliner",{top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:VN,height:zN,visible:!0,detached:!1,alignment:"left",maxHeight:BN}),details:Sz("details",{top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:VN,height:zN,visible:!0,detached:!1,alignment:"right",maxHeight:BN})});YM(e);const j=(0,m.useMemo)((()=>l||i.matches),[l,i.matches]),O=(0,m.useCallback)(((e,t)=>{S((n=>{const r=Object.assign({},n[e],t);return jz(e,r),Object.assign({},n,{[e]:r})}))}),[C]),R=(0,m.useCallback)(((e,t)=>{const n=C[e],r=T(e,n.top,n.left,t);O(e,{visible:t,storedTop:r.top/o.current.height*100,storedLeft:r.left/o.current.width*100})}),[O]),_=(0,m.useCallback)((e=>(0,k.VS)(k.bA)||void 0===Object.values(C).find((t=>t.alignment===e&&!t.detached))),[C]),A=(0,m.useCallback)(((e,t,n)=>{const r=e+n,o=t-5;e>=0&&e<=5&&_("left")?b("left"):r<=t&&r>=o&&_("right")?b("right"):b(void 0)}),[_]),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,x.clamp)(n,0,c-l.width),top:(0,x.clamp)(t,0,(null!=(a=null==(s=v.current)?void 0:s.clientHeight)?a:0)-d)}},P=(0,m.useCallback)((e=>{const t=Object.entries(C).reduce(((e,[t,n])=>{const r=Object.assign({},n,{zIndex:1});return g(!0),jz(t,r),Object.assign({},e,{[t]:r})}),Object.assign({},C));t[e]=Object.assign({},t[e],{zIndex:15}),jz(e,t[e]),S(t)}),[C]),I=(0,m.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((()=>{O(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})}))}),[O,A,C]),L=(0,m.useCallback)((()=>{u((()=>!0))}),[]),M=(0,m.useCallback)((()=>{u((()=>!1))}),[]),K=(0,m.useCallback)((e=>Object.keys(C).filter((t=>{var n;return(null==(n=C[t])?void 0:n.alignment)===e}))),[C]),D=(0,m.useCallback)(((e,t,n,r,i)=>{const{left:s,top:l}=T(e,r,i),c=o.current.height-l;requestAnimationFrame((()=>{if((0,k.VS)(k.bA)){var r;K(null==(r=C[e])?void 0:r.alignment).forEach((e=>{O(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,x.clamp)(t,VN,a),height:(0,x.clamp)(n,zN,c)})}))}else O(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,x.clamp)(t,VN,a),height:(0,x.clamp)(n,zN,c)})}))}),[O,a,C]),N=(0,m.useCallback)((e=>{if(g(!1),!w.current)return;const t={alignment:w.current,detached:!1};if((0,k.VS)(k.bA)){var n;const o=null==(n=K(w.current).filter((t=>t!==e)))?void 0:n[0];var r;if(o)t.width=(0,x.clamp)(null==(r=C[o])?void 0:r.width,VN,a)}O(e,t),b(void 0)}),[O]),V=(0,m.useMemo)((()=>({onResize:D,onResizeStart:L,onResizeEnd:M,onPositionChange:I,onVisibilityChange:R,onPositionChangeBegin:P,onSnap:N})),[D,L,M,I,R,N]),z=(0,m.useMemo)((()=>Object.assign({},V,{root:v,regions:r,selection:r.selection,currentEntity:e})),[V,v,r,r.selectio,e]),B=(0,m.useMemo)((()=>{if(t&&(0,k.VS)(k.bA))return{};const e={paddingLeft:0,paddingRight:0};return j?e:Object.values(C).reduce(((e,n)=>{const r=(0,k.VS)(k.bA)||!t&&!n.detached&&n.visible?n.width:HN,o="left"===n.alignment?"paddingLeft":"paddingRight";return n.detached?e:Object.assign({},e,{[o]:r})}),e)}),[t,C,j]),H=(0,m.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=kz[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,E.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,m.useEffect)((()=>{w.current=y}),[y]),(0,m.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<=Cz||(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,m.useMemo)((()=>({locked:j})),[j]);return(0,E.jsx)(lz.Provider,{value:F,children:(0,E.jsx)(Qe.eB,{ref:e=>{e&&(v.current=e,c(e.clientWidth<=Cz))},name:"sidepanels",style:Object.assign({},B),mod:{collapsed:j,newLabelingUI:(0,k.VS)(k.bA)},children:p&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"content",mod:{resizing:d||h},children:n}),!0!==t&&(0,E.jsx)(E.Fragment,{children:Object.entries(H).map((([e,t])=>{const n=t.map((({props:e,Component:t},n)=>(0,E.jsx)(t,Object.assign({},e),n)));return"detached"===e?(0,E.jsx)(m.Fragment,{children:n},e):(0,E.jsx)(Qe.Sl,{name:"wrapper",mod:{align:e,snap:y===e},children:n},e)}))})]})})})}));let Rz=function(e){return e.left="left",e.right="right",e}({}),Ez=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}({}),_z=function(e){return e.top="top",e.bottom="bottom",e}({});const Az={order:0,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:VN,height:zN,visible:!0,detached:!0,alignment:Rz.left,maxHeight:BN,panelViews:[]},Tz=(e,t)=>{const n=t||e.target,r=n.clientWidth;return e.pageX-n.getBoundingClientRect().left>r/2?Rz.right:Rz.left},Pz=(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},Iz=(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},Lz=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},Mz=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},Kz=e=>{const t=Object.assign({},e);return Object.keys(t).forEach((e=>{0===t[e].panelViews.length&&delete t[e]})),t},Dz={regions:bz,history:KV,relations:DV,comments:MV,info:NV},Nz=[{name:"regions",title:"Regions",component:Dz.regions,active:!0},{name:"history",title:"History",component:Dz.history,active:!1},{name:"relations",title:"Relations",component:Dz.relations,active:!1},{name:"info",title:"Info",component:Dz.info,active:!0},{name:"comments",title:"Comments",component:Dz.comments,active:!1}],Vz={"info-comments-history":{order:1,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:VN,height:zN,visible:!0,detached:!1,alignment:Rz.right,maxHeight:BN,panelViews:[Nz[3],Nz[4],Nz[1]]},"regions-relations":{order:2,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:VN,height:zN,visible:!0,detached:!1,alignment:Rz.right,maxHeight:BN,panelViews:[Nz[0],Nz[2]]}},zz={"info-history":{order:1,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:VN,height:zN,visible:!0,detached:!1,alignment:Rz.right,maxHeight:BN,panelViews:[Nz[3],Nz[1]]},"regions-relations":{order:2,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:VN,height:zN,visible:!0,detached:!1,alignment:Rz.right,maxHeight:BN,panelViews:[Nz[0],Nz[2]]}},Bz=Object.assign({},Az,{name:"breakpointCollapsed",positioning:!1,height:zN,maxHeight:zN,detached:!1,maxWidth:500,zIndex:10,expanded:!0,locked:!0,alignment:Rz.left,lockPanelContents:!1,attachedKeys:[],sidePanelCollapsed:{[Rz.left]:!1,[Rz.right]:!1},setSidePanelCollapsed:()=>{},dragTop:!1,dragBottom:!1,panelViews:[Nz[0],Nz[1],Nz[2],Nz[3],Nz[4]]}),Hz=["top-left","top-right","bottom-left","bottom-right","top","bottom","right","left"],Fz=e=>{var t;const n=window.localStorage.getItem("panelState"),r=n&&JSON.parse(n),o=r&&r.panelData,i={[Rz.left]:!1,[Rz.right]:!1},a=null!=(t=null==r?void 0:r.collapsedSide)?t:i,s=o&&Object.values(o).flatMap((e=>e.panelViews)),l=Nz.length-(e?0:1);if(!s||s.length!==l){return{panelData:e?Vz:zz,collapsedSide:i}}const c=Kz(o),d=Lz(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:Wz(d),collapsedSide:u}},Wz=e=>{const t=Object.assign({},e);return Object.keys(t).forEach((e=>{t[e].panelViews.forEach((e=>{e.component=Dz[e.name]}))})),t},$z=e=>Object.keys(e).filter((t=>!e[t].detached&&e[t].alignment===Rz.left)),Uz=e=>Object.keys(e).filter((t=>!e[t].detached&&e[t].alignment===Rz.right)),Zz=(e,t)=>t===Rz.left?$z(e).sort(((t,n)=>e[t].order-e[n].order)):t===Rz.right?Uz(e).sort(((t,n)=>e[t].order-e[n].order)):void 0,Gz=(e,t)=>{const n=Object.assign({},e);return[$z(n),Uz(n)].forEach((r=>{const o=r.filter((t=>!e[t].visible)).length,i=r.filter((t=>e[t].visible)),a=HN*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+=HN}))})),n},Yz=(e,t,n)=>{const r=Object.assign({},e),o=Zz(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-HN*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+=HN})),r},Xz=(e,t,n,r,o,i=_z.bottom)=>{const a=Object.assign({},e),s=Zz(a,n),l=s?s.reduce(((t,n)=>t{const o=Object.assign({},e);o[t].order=r===_z.top?0:n.length;let i=r===_z.bottom?0:1;return n.forEach((e=>{t!==e&&(o[e].order=i,i+=1)})),o})(c,t,Zz(c,n),i),u=Jz(d,t);return Yz(u,o,n)},qz=(e,t,n,r,o,i,a)=>{const s=((e,t,n,r,o,i,a)=>Object.assign({},Az,{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=Pz(e,n,r),c=Kz(l),d=Object.assign({},c,{[`${s.name}`]:s}),u=Mz(d),h=Lz(u),g=Jz(h,s.name);return Gz(g,a.current.height)},Jz=(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},Qz=({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:p=!1,onSnap:f,onResize:v,onGroupHeightResize:y,onResizeStart:b,onResizeEnd:w,onVisibilityChange:C,onPositionChange:S,onPositionChangeBegin:j,children:k,panelViews:O,attachedKeys:R,sidePanelCollapsed:_,setSidePanelCollapsed:A,dragTop:T,dragBottom:P,lockPanelContents:I})=>{const L=(0,m.useRef)(),M=(0,m.useRef)(),K=(0,m.useRef)(),D=(0,m.useRef)(),N=(0,m.useRef)({onResize:v,onGroupHeightResize:y,onResizeStart:b,onResizeEnd:w,onPositionChange:S,onPositionChangeBegin:j,onVisibilityChange:C,onSnap:f}),[V,z]=(0,m.useState)(),B=(0,m.useRef)(e),H=_[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:w,onPositionChange:S,onPositionChangeBegin:j,onVisibilityChange:C,onSnap:f},B.current=e;const Z=(0,m.useMemo)((()=>{const e=i?{height:g?zN:H?"100%":null!=o?o:"100%",width:g?"100%":H?HN:null!=n?n:"100%"}:{width:H?"100%":null!=n?n:VN,height:H?"100%":HN};return Object.assign({},e,{zIndex:h})}),[n,o,i,g,H,h]),G=(0,m.useMemo)((()=>a&&!g?{top:`${d}%`,left:`${u}%`}:{}),[a,d,u,g]),Y=(0,m.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]);NN({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]),NN({elementRef:K,disabled:g||p,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,x.isDefined)(c)&&["left","top-left"].includes(c),p=(0,x.isDefined)(c)&&["top","top-left"].includes(c),f=(0,x.clamp)(m?r-h:r+h,VN,i),v=(0,x.clamp)(p?o-g:o+g,55,a+o),y=p?a+(o-v):a,b=m?s+(r-f):s,{current:w}=B;N.current.onResize(w,f,v,y,b)}},onMouseUp(){null==N.current.onResizeEnd||N.current.onResizeEnd(),z(void 0)}},[N,a,n,r,o,l,c,i,g,p]),NN({elementRef:D,disabled:g||p,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,p,D.current]);const X=()=>{A(Object.assign({},_,{[s]:!_[s]}))},q=(0,m.useCallback)((t=>{t.stopPropagation(),t.preventDefault(),null==C||C(e,!i)}),[C,e,i]);return(0,E.jsxs)(Qe.eB,{ref:M,name:"tabs-panel",mod:Y,style:Object.assign({},Z,G),children:[(0,E.jsxs)(Qe.Sl,{name:"content",children:[!g&&$&&(0,E.jsxs)(E.Fragment,{children:[W&&i&&(0,E.jsx)(Qe.Sl,{name:"grouped-top",ref:D,mod:{drag:"grouped-top"===V},"data-resize":"grouped-top"}),(0,E.jsxs)(Qe.Sl,{ref:L,onClick:()=>{H&&X()},id:e,mod:{collapsed:H},name:"header",children:[(0,E.jsxs)(Qe.Sl,{name:"header-left",children:[!H&&(0,E.jsx)(Qe.Sl,{name:"icon",style:{pointerEvents:"none"},tag:_w,width:8}),!i&&!H&&(0,E.jsx)(Qe.Sl,{name:"title",children:O.map((e=>e.title)).join(" ")})]}),(0,E.jsxs)(Qe.Sl,{name:"header-right",children:[(!a||H)&&(0,E.jsx)(Qe.Sl,{name:"toggle",mod:{detached:a,collapsed:H,alignment:s},onClick:X,"data-tooltip":`${U} Group`,children:Rz.left===s?(0,E.jsx)(jy,{}):(0,E.jsx)(Ky,{})}),!H&&(0,E.jsx)(Qe.Sl,{name:"toggle",mod:{detached:a,collapsed:H,alignment:s},onClick:q,"data-tooltip":U,children:i?(0,E.jsx)(Zc,{}):(0,E.jsx)(Lc,{})})]})]})]}),i&&!H&&(0,E.jsxs)(Qe.Sl,{name:"body",children:[I&&(0,E.jsx)(Qe.Sl,{name:"shield"}),k]})]}),i&&!p&&!g&&(0,E.jsx)(Qe.Sl,{name:"resizers",ref:K,mod:{locked:p||g},children:Hz.map((e=>!H&&(("left"===e||"right"===e)&&s!==e||a)?(0,E.jsx)(Qe.Sl,{name:"resizer",mod:{drag:e===V},"data-resize":e},e):null))})]})},eB=[];var tB=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}(tB||{});const nB=()=>{eB.forEach((e=>{null==e||e.classList.remove(tB.tabLeft),null==e||e.classList.remove(tB.tabRight),null==e||e.classList.remove(tB.emptyTabSpace)}))},rB=({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:p,checkSnap:f})=>{const v=(0,m.useRef)(),y=(0,m.useRef)(),b=(0,m.useRef)(!1),x=(0,m.useRef)({panelKey:o,tabIndex:r}),[w,C]=(0,m.useState)(!1);x.current={panelKey:o,tabIndex:r},NN({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);p(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=Tz(e,g);const p=null==(i=y.current)?void 0:i.getBoundingClientRect().height;p&&f(h,l,u,p),nB(),(null==g?void 0:g.id)!==`${o}_${r}_droppable`&&(null!=g&&g.id.includes("droppable-space")&&(m=void 0),((e,t)=>{let n;eB.push(t),e===Rz.left&&(n=tB.tabLeft),e===Rz.right&&(n=tB.tabRight),void 0===e&&(n=tB.emptyTabSpace),n&&(null==t||t.classList.add(n))})(m,g))},onMouseUp(t,n){var r,o;if(nB(),eB.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=Tz(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,E.jsxs)(Qe.Sl,{id:`${o}_${r}_droppable`,name:"tab",mod:{active:c?r===d:s},children:[!c&&(0,E.jsx)(Qe.Sl,{name:"icon",tag:_w,width:8}),n]});return(0,E.jsxs)(Qe.eB,{name:"panel-tabs",children:[(0,E.jsx)(Qe.Sl,{name:"draggable-tab",id:`${n}-draggable`,ref:v,children:(0,E.jsx)(S,{})}),(0,E.jsxs)(Qe.Sl,{ref:y,name:"ghost-tab",style:{width:`${l}px`,height:"fit-content",maxHeight:"300px",overflow:"hidden"},children:[(0,E.jsx)(S,{}),w&&(0,E.jsx)(Qe.Sl,{name:"contents",children:a})]})]})},oB=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,E.jsx)(E.Fragment,{children:(0,E.jsxs)(Qe.eB,{name:"tabs",mix:(0,k.VS)(k.sI)?"ff_outliner_optim":void 0,children:[(0,E.jsxs)(Qe.Sl,{name:"tabs-row",children:[e.panelViews.map(((t,n)=>{const{component:r}=t;return(0,E.jsx)(Qe.Sl,{name:"tab-container",mod:{active:t.active},children:(0,E.jsx)(rB,{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,E.jsx)(Qe.Sl,{name:"content",children:(0,E.jsx)(r,Object.assign({},e,{name:"outliner"}),`${t.title}-${n}-ghost`)})},`${t.title}-tab`)},`${t.title}-${n}-tab`)})),(0,E.jsx)(Qe.Sl,{id:`${e.name}_${e.panelViews.length}-droppable-space`,name:"drop-space-after"})]}),(0,E.jsx)(Qe.Sl,{name:"contents",children:n&&(0,E.jsx)(n,Object.assign({},e))})]})})},iB=980,aB=(0,v.PA)((({currentEntity:e,panelsHidden:t,children:n,showComments:r,focusTab:o})=>{const i=e.regionStore,a=(0,m.useRef)({width:0,height:0}),s=wz("screen and (max-width: 980px)"),[l,c]=(0,m.useState)(500),[d,u]=(0,m.useState)(!1),[h,g]=(0,m.useState)(!1),[p,f]=(0,m.useState)(!1),[v,y]=(0,m.useState)(!1),b=(0,m.useRef)(),[w,C]=(0,m.useState)(),S=(0,m.useMemo)((()=>Fz(r)),[r]),[j,k]=(0,m.useState)(S.panelData),[O,R]=(0,m.useState)(S.collapsedSide),[_,A]=(0,m.useState)(0),T=(0,m.useRef)(w),P=(0,m.useRef)(O);P.current=O,T.current=w,YM(e);const I=(0,m.useMemo)((()=>d||s.matches),[d,s.matches]),L=(0,m.useCallback)(((e,t)=>{k((n=>{const r=Object.assign({},n[e],t);return Object.assign({},n,{[e]:r})}))}),[j]),M=(0,m.useCallback)(((e,t,n,r,o)=>{k((i=>{const s=i[t].panelViews[e];s&&(s.active=!0);const l=Pz(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===Rz.right?1:0);return t===n&&l>0&&(l-=1),s.panelViews.splice(l,0,r),a})(Kz(l),t,n,s,r,o),d=Jz(c,n),u=Mz(d),h=Lz(u);return Gz(h,a.current.height)})),C(void 0)}),[j]),K=(0,m.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]?_z.top:_z.bottom,d=a.current.height;k((i=>{const s=qz(i,e,t,n,r,o,a);return Xz(s,e,l,VN,d,c)}))}else k((i=>qz(i,e,t,n,r,o,a)));C(void 0)}),[j,O,O[Rz.left],O[Rz.right]]),D=(0,m.useCallback)(((e,t)=>k((n=>Iz(n,e,t)))),[j]),N=(0,m.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 Yz(i,a.current.height,r.alignment)}))}),[k,j]),V=(0,m.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===Rz.right)))?void 0:s[1].width)||0),f=e<=((null==(l=Object.entries(j).find((([e,t])=>t.alignment===Rz.left)))?void 0:l[1].width)||0),v=n<=5,y=h>=m-5;let b;null!=(c=P.current)&&c[Rz.left]||!f||(e<=5&&(b=Ez.left),v&&(b=Ez.topLeft),y&&(b=Ez.bottomLeft)),null!=(d=P.current)&&d[Rz.right]||!p||(u>=g-5&&(b=Ez.right),v&&(b=Ez.topRight),y&&(b=Ez.bottomRight)),C(b)}),[j]),z=(0,m.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:HN,h=c.detached?u:c.height,g=c.height!==(null==(a=b.current)?void 0:a.clientHeight)&&c.detached?h:zN;return{left:(0,x.clamp)(n,0,d-c.width),top:(0,x.clamp)(t,0,(null!=(s=null==(l=b.current)?void 0:l.clientHeight)?s:0)-g)||1}}),[j]),B=(0,m.useCallback)((e=>{g((()=>!0)),k((t=>Jz(t,e)))}),[j]),H=(0,m.useCallback)(((e,t,n,r)=>{const o=j[e],{left:i,top:s}=z(e,t,n,o.visible),l=a.current.height-s;p||j[e].detached||(f(!0),k((t=>((e,t,n)=>{const r=Object.assign({},e),o=r[t].alignment,i={width:VN,detached:!0,height:zN},a=Object.assign({},r,{[t]:Object.assign({},r[t],i)}),s=Zz(r,o);return null==s||s.forEach(((e,t)=>{r[e].order=t})),Yz(a,n,o)})(t,e,a.current.height)))),V(i,o.width,s,zN),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,p]),F=(0,m.useCallback)((()=>{g((()=>!0))}),[]),W=(0,m.useCallback)((()=>{g((()=>!1))}),[]),$=(0,m.useCallback)(((e,t,n)=>{requestAnimationFrame((()=>{k((r=>((e,t,n,r,o)=>{var i;const a=Object.assign({},e),s=Zz(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,x.clamp)(i,55,o)}))}));const g=s.filter((e=>!a[e].visible)).length*HN,m=s.filter((e=>a[e].visible)).reduce(((e,t)=>e+a[t].height),0);return Gz(m+g>o?e:a,o)})(r,e,t,n,a.current.height)))}))}),[k]),U=(0,m.useCallback)((e=>Object.keys(j).filter((t=>{var n;return(null==(n=j[t])?void 0:n.alignment)===e}))),[j]),Z=(0,m.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,x.clamp)(t,VN,l),height:j[e].detached?(0,x.clamp)(n,zN,BN):j[e].height})}))}))}),[L,l,j]),Y=(0,m.useCallback)((e=>{var t;if(f(!1),g((()=>!1)),!T.current)return;const n=T.current.split("-"),r=n[0],o="top"===n[1]?_z.top:_z.bottom,i=null==(t=Zz(j,r))?void 0:t.filter((t=>t!==e));i&&i.length>0?k((t=>Xz(t,e,r,VN,a.current.height,o))):L(e,{height:a.current.height,alignment:r,detached:!1}),C(void 0)}),[L,j]),X=(0,m.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,m.useMemo)((()=>Object.assign({},X,{root:b,regions:i,selection:i.selection,currentEntity:e})),[X,i,i.selection,e]),J=(0,m.useMemo)((()=>{const e=$z(j),n=Uz(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?HN:r?0:s,paddingRight:I||t?0:a?HN:o?0:l}}),[t,j,O,I]),Q=(0,m.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=Zz(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:p,maxWidth:l,zIndex:i.zIndex,expanded:O[n],alignment:i.alignment,locked:I,attachedKeys:s,lockPanelContents:h,breakPointActiveTab:_,sidePanelCollapsed:O,setSidePanelCollapsed:R,dragTop:n===Rz.left?w===Ez.topLeft:w===Ez.topRight,dragBottom:n===Rz.left?w===Ez.bottomLeft:w===Ez.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,p,l,O,w]);(0,m.useEffect)((()=>{Object.keys(j).length&&((e,t)=>{window.localStorage.setItem("panelState",JSON.stringify({panelData:e,collapsedSide:t}))})(j,O)}),[j,O]),(0,m.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(Iz(e,n,i)),!s&&O[a]&&R(Object.assign({},O,{[a]:!1})),l||N(n,!0)}}),[o]),(0,m.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<=iB||(a.current.height!==n&&k(Gz(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,m.useMemo)((()=>({locked:I})),[]),te=(0,m.useMemo)((()=>{const e=Object.assign({},Bz);return e.panelViews=Bz.panelViews.filter((e=>"comments"!==e.name||r)),e}),[Bz,r]),ne=Object.assign({},te,q,{breakPointActiveTab:_,setBreakPointActiveTab:A});return(0,E.jsx)(lz.Provider,{value:ee,children:(0,E.jsx)(Qe.eB,{ref:e=>{e&&(b.current=e,u(e.clientWidth<=iB))},name:"sidepanels",mod:{collapsed:I},style:Object.assign({},J),children:v&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"content",mod:{resizing:h||p},children:n}),!0!==t&&I?(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(Qe.Sl,{name:"wrapper",children:(0,E.jsx)(Qz,Object.assign({},ne,{children:(0,E.jsx)(oB,Object.assign({},ne))}))})}):(0,E.jsx)(E.Fragment,{children:Object.entries(Q).map((([e,t],n)=>{const r=t.sort(((e,t)=>e.order-t.order)).map(((t,r)=>(0,E.jsx)(Qz,Object.assign({},t,{children:(0,E.jsx)(oB,Object.assign({},t))}),`${e}-${r}-${n}`)));return"detached"===e?(0,E.jsx)(m.Fragment,{children:r},e):(0,E.jsx)(Qe.Sl,{name:"wrapper",mod:{align:e,snap:w===e},children:r},e)}))})]})})})}));var sB=n(57958),lB=n(8593);const cB=["date"],dB=6e4,uB=[[3e4,3e4],[267e4,dB],[Number.MAX_SAFE_INTEGER,18e5]];const hB=e=>{let{date:t}=e,n=(0,nr.A)(e,cB);const[r,o]=(0,m.useState)(Date.now()),i=(0,m.useMemo)((()=>new Date(t).valueOf()),[t]),a=(0,m.useRef)(),s=(0,m.useCallback)((()=>{const e=Date.now()-i,t=function(e=0){const t=uB.findIndex((([t],n)=>t>e||n===uB.length-1)),n=t>0?uB[t-1][0]:0,r=uB[t][1];return Math.ceil((e-n+1)/r)*r+n}(e);a.current=window.setTimeout((()=>{o(Date.now())}),t-e)}),[t]);(0,m.useEffect)((()=>(s(),()=>{clearTimeout(a.current)})),[t,r]);const l="less than a minute ago"===(0,sB.A)(i,{addSuffix:!0})?"seconds ago":(0,sB.A)(i,{addSuffix:!0});return(0,E.jsx)("time",Object.assign({dateTime:(0,lB.default)(i,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx"),title:(0,lB.default)(i,"PPpp")},n,{children:l}))},gB=e=>e.unresolved_comment_count>0?"Unresolved Comments":e.comment_count>0?"All Comments Resolved":"",mB=(0,v.PA)((({entity:e,capabilities:t,annotationStore:n,onAnnotationChange:r})=>{var o,i,a,s,l;const c="prediction"===e.type,d=(0,x.userDisplayName)(null!=(o=e.user)?o:{firstName:e.createdBy||"Admin"}),[u,h]=(0,m.useState)(),[g,p]=(0,m.useState)(!1),f=null==(i=n.store)?void 0:i.hasInterface("annotations:hide-info");let v=null;if(f){var y;const t=n.store.user;v={email:(null==(y=e.user)?void 0:y.id)===t.id||e.createdBy===t.email?"Me":"User"}}const b=(w=e).unresolved_comment_count>0?vl:w.comment_count>0?dl:null;var w;(0,m.useEffect)((()=>{h(e.ground_truth)}),[e,e.ground_truth]);const C=(0,m.useCallback)((()=>{const{selected:t,id:r,type:o}=e;t||("prediction"===o?n.selectPrediction(r):n.selectAnnotation(r))}),[e]),S=({entity:e,capabilities:t})=>{const o=q_(),i=()=>{null==r||r(),null==o||o.close()},a=(0,m.useCallback)((()=>{e.setGroundTruth(!u),i()}),[e]),s=(0,m.useCallback)((()=>{const t=n.addAnnotationFromPrediction(e);window.setTimeout((()=>{n.selectAnnotation(t.id),i()}))}),[e]),l=(0,m.useCallback)((()=>{i(),CK({title:"Delete annotation?",body:(0,E.jsxs)(E.Fragment,{children:["This will ",(0,E.jsx)("strong",{children:"delete all existing regions"}),". Are you sure you want to delete them?",(0,E.jsx)("br",{}),"This action cannot be undone."]}),buttonLook:"destructive",okText:"Delete",onOk:()=>{e.list.deleteAnnotation(e)}})}),[e]),c="prediction"===e.type,d=!(0,x.isDefined)(e.pk),h=t.groundTruthEnabled&&!c&&!d,g=t.enableCreateAnnotation&&!d;return(0,E.jsxs)(Qe.eB,{name:"AnnotationButtonContextMenu",children:[h&&(0,E.jsxs)(Qe.Sl,{name:"option",mod:{groundTruth:!0},onClick:a,children:[u?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Nl,{color:"#FFC53D",width:37,height:37})," ","Unset "]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Wl,{width:37,height:37}),"Set "]}),"as Ground Truth"]}),g&&(0,E.jsxs)(Qe.Sl,{name:"option",mod:{duplicate:!0},onClick:s,children:[(0,E.jsx)(Qe.Sl,{name:"icon",children:(0,E.jsx)(Vd,{width:20,height:24})}),"Duplicate Annotation"]}),t.enableAnnotationDelete&&!c&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"seperator"}),(0,E.jsxs)(Qe.Sl,{name:"option",mod:{delete:!0},onClick:l,children:[(0,E.jsx)(Qe.Sl,{name:"icon",children:(0,E.jsx)(Of,{width:14,height:18})})," ","Delete Annotation"]})]})]})};return(0,E.jsxs)(Qe.eB,{name:"annotation-button",mod:{selected:e.selected,contextMenuOpen:g},children:[(0,E.jsxs)(Qe.Sl,{name:"mainSection",onClick:C,children:[(0,E.jsx)(Qe.Sl,{name:"picSection",children:(0,E.jsx)(Qe.Sl,{name:"userpic",tag:HM,showUsername:!0,username:c?e.createdBy:null,user:null!=(a=null!=(s=v)?s:e.user)?a:{email:e.createdBy},mod:{prediction:c},size:24,children:c&&(0,E.jsx)($s,{style:{width:18,height:18}})})}),(0,E.jsxs)(Qe.Sl,{name:"main",children:[(0,E.jsxs)(Qe.Sl,{name:"user",children:[(0,E.jsx)(Qe.Sl,{tag:"span",name:"name",children:v?v.email:d}),!f&&(0,E.jsxs)(Qe.Sl,{tag:"span",name:"entity-id",children:["#",null!=(l=e.pk)?l:e.id]})]}),!f&&(0,E.jsx)(Qe.Sl,{name:"created",children:(0,E.jsx)(Qe.Sl,{name:"date",component:hB,date:e.createdDate})})]}),!c&&(0,E.jsxs)(Qe.Sl,{name:"icons",children:[e.draftId>0&&(0,E.jsx)(hr,{title:"Draft",children:(0,E.jsx)(Qe.Sl,{name:"icon",mod:{draft:!0},children:(0,E.jsx)(lx,{color:"#617ADA"})})}),e.skipped&&(0,E.jsx)(hr,{title:"Skipped",children:(0,E.jsx)(Qe.Sl,{name:"icon",mod:{skipped:!0},children:(0,E.jsx)(uw,{color:"#DD0000"})})}),u&&(0,E.jsx)(hr,{title:"Ground-truth",children:(0,E.jsx)(Qe.Sl,{name:"icon",mod:{groundTruth:!0},children:(0,E.jsx)(nw,{})})}),b&&(0,E.jsx)(hr,{title:gB(e),children:(0,E.jsx)(Qe.Sl,{name:"icon",mod:{comments:!0},children:(0,E.jsx)(b,{})})})]})]}),(0,E.jsx)(Qe.Sl,{name:"contextMenu",children:(0,E.jsx)(J_.Trigger,{content:(0,E.jsx)(S,{entity:e,capabilities:t,annotationStore:n}),onToggle:e=>p(e),children:(0,E.jsx)(Qe.Sl,{name:"ellipsisIcon",children:(0,E.jsx)($d,{width:28,height:28})})})})]})})),pB=(0,v.PA)((({store:e,annotationStore:t})=>{const[n,r]=(0,m.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,m.useRef)(),d=(0,m.useRef)(),[u,h]=(0,m.useState)(0),[g,p]=(0,m.useState)(!1),[f,v]=(0,m.useState)(!1),y=(0,m.useCallback)(((e,t=!0)=>{if(d.current&&c.current){const e=d.current.clientWidth,n=c.current.clientWidth,r=(0,x.clamp)(t?u-e:u+e,0,n-e);h(r)}}),[d,c,u]);return(0,m.useEffect)((()=>{var e,t,n,r;p(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,m.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,E.jsxs)(Qe.eB,{name:"annotations-carousel",style:{"--carousel-left":`${u}px`},children:[(0,E.jsx)(Qe.Sl,{ref:d,name:"container",children:(0,E.jsx)(Qe.Sl,{ref:c,name:"carosel",children:(0,x.sortAnnotations)(n).map((e=>(0,E.jsx)(mB,{entity:e,capabilities:{enablePredictions:i,enableCreateAnnotation:a,groundTruthEnabled:s,enableAnnotations:o,enableAnnotationDelete:l},annotationStore:t},null==e?void 0:e.id)))})}),(!g||!f)&&(0,E.jsxs)(Qe.Sl,{name:"carousel-controls",children:[(0,E.jsx)(Qe.Sl,{tag:Qa,name:"nav",disabled:g,mod:{left:!0,disabled:g},"aria-label":"Carousel left",onClick:e=>!g&&y(e,!0),children:(0,E.jsx)(Qe.Sl,{name:"arrow",mod:{left:!0},tag:wc})}),(0,E.jsx)(Qe.Sl,{tag:Qa,name:"nav",disabled:f,mod:{right:!0,disabled:f},"aria-label":"Carousel right",onClick:e=>!f&&y(e,!1),children:(0,E.jsx)(Qe.Sl,{name:"arrow",mod:{right:!0},tag:wc})})]})]}):null})),fB=(0,v.PA)((({entity:e})=>{const{history:t}=e;return(0,E.jsxs)(Qe.eB,{name:"history-buttons",children:[(0,E.jsx)(hr,{title:"Undo",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",type:"text","aria-label":"Undo",disabled:!(null!=t&&t.canUndo),onClick:()=>e.undo(),icon:(0,E.jsx)(hs,{})})}),(0,E.jsx)(hr,{title:"Redo",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",type:"text","aria-label":"Redo",disabled:!(null!=t&&t.canRedo),onClick:()=>e.redo(),icon:(0,E.jsx)(bs,{})})}),(0,E.jsx)(hr,{title:"Reset",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",look:"danger",type:"text","aria-label":"Reset",disabled:!(null!=t&&t.canUndo),onClick:()=>null==t?void 0:t.reset(),icon:(0,E.jsx)(ks,{})})})]})})),vB=({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,m.useCallback)((()=>{t.toggleViewingAllAnnotations()}),[t]);return(0,E.jsxs)(Qe.Sl,{name:"section",children:[e.hasInterface("annotations:view-all")&&(0,E.jsx)(hr,{title:"View all annotations",children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(tf,{}),type:"text","aria-label":"View All",onClick:()=>a(),primary:i,style:{height:36,width:36,padding:0}})}),!i&&e.hasInterface("ground-truth")&&(0,E.jsx)(LD,{entity:n}),!o&&!i&&e.hasInterface("edit-history")&&(0,E.jsx)(fB,{entity:n}),!i&&e.hasInterface("annotations:delete")&&(0,E.jsx)(hr,{title:"Delete annotation",children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(Ps,{}),look:"danger",type:"text","aria-label":"Delete",onClick:()=>{CK({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,E.jsx)(hr,{title:`Create copy of current ${n.type}`,children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(zp,{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,E.jsx)(Qa,{icon:(0,E.jsx)(Ol,{}),type:"text","aria-label":"Settings",onClick:()=>e.toggleSettings(),style:{height:36,width:36,padding:0}}),e.description&&e.hasInterface("instruction")&&(0,E.jsx)(Qa,{icon:(0,E.jsx)(Ip,{style:{width:16,height:16}}),primary:e.showingDescription,type:"text","aria-label":"Instructions",onClick:()=>e.toggleDescription(),style:{height:36,width:36,padding:0}})]})},yB=["entity","selected","onClick","extra"],bB=(0,v.PA)((({store:e,annotationStore:t,commentStore:n})=>{const r=(0,m.useRef)(),[o,i]=(0,m.useState)(!1),a=e.hasInterface("annotations:tabs"),s=e.hasInterface("predictions:tabs"),l=e.hasInterface("annotations:add-new"),c=e.hasInterface("ground-truth"),u=[];s&&u.push(...t.predictions),a&&u.push(...t.annotations);const h=(0,m.useCallback)(((e,n)=>{e.selected||(n?t.selectPrediction(e.id):t.selectAnnotation(e.id))}),[t]);(0,m.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,d.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,E.jsx)(rl,{}):e.comment_count>0?(0,E.jsx)(qs,{}):null,p=(e,n)=>{var r;return(0,E.jsx)(wB,{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,E.jsxs)(Qe.Sl,{name:"icons",children:[(0,E.jsx)(Qe.Sl,{name:"icon-column",children:g(e)}),(0,E.jsx)(Qe.Sl,{name:"icon-column",children:c&&(0,E.jsx)(LD,{entity:e,disabled:!0})})]})},`${null!=(r=e.pk)?r:e.id}${e.type}`)};return a||s||l?(0,E.jsx)(Qe.Sl,{name:"section",mod:{flat:!0},children:(0,E.jsxs)(Qe.eB,{name:"annotations-list",ref:r,children:[(0,E.jsx)(Qe.Sl,{name:"selected",children:(0,E.jsx)(wB,{"aria-label":"Annotations List Toggle",entity:t.selected,onClick:e=>{e.stopPropagation(),i(!o)},extra:u.length>0?(0,E.jsxs)(ns,{size:"none",style:{marginRight:-8,marginLeft:8},children:[(0,E.jsxs)(Qe.Sl,{name:"counter",children:[u.indexOf(t.selected)+1,"/",u.length]}),(0,E.jsx)(Qe.Sl,{name:"toggle",mod:{opened:o}})]}):null})}),o&&(0,E.jsxs)(Qe.Sl,{name:"list",children:[e.hasInterface("annotations:add-new")&&(0,E.jsx)(xB,{annotationStore:t,onClick:()=>i(!1)}),(e=>{const t=[],n=[];return e.forEach(((e,r)=>{e.pk?n.push(p(e,r)):t.push(p(e,r))})),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"draft",children:t}),(0,E.jsx)(Qe.Sl,{name:"annotation",children:n})]})})(u)]})]})}):null})),xB=(0,v.PA)((({annotationStore:e,onClick:t})=>{const n=(0,m.useCallback)((()=>{const n=e.createAnnotation();e.selectAnnotation(n.id),t()}),[e,t]);return(0,E.jsx)(Qe.Sl,{name:"create","aria-label":"Create Annotation",onClick:n,children:(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{name:"userpic",tag:HM,mod:{prediction:!0},children:(0,E.jsx)(gd,{})}),"Create Annotation"]})})})),wB=(0,v.PA)((e=>{var t,n,r;let{entity:o,selected:i,onClick:a,extra:s}=e,l=(0,nr.A)(e,yB);const c="prediction"===o.type,d=(0,x.userDisplayName)(null!=(t=o.user)?t:{firstName:o.createdBy||"Admin"});return(0,E.jsx)(Qe.Sl,Object.assign({},l,{name:"entity",mod:{selected:i},onClick:a,children:(0,E.jsxs)(ns,{spread:!0,children:[(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{name:"userpic",tag:HM,showUsername:!0,username:c?o.createdBy:null,user:null!=(n=o.user)?n:{username:d},mod:{prediction:c},children:c&&(0,E.jsx)($s,{color:"#944BFF",style:{width:18,height:18}})}),(0,E.jsxs)(ns,{direction:"vertical",size:"none",children:[(0,E.jsxs)(Qe.Sl,{name:"user",children:[(0,E.jsx)(Qe.Sl,{tag:"span",name:"name",children:d}),(0,E.jsxs)(Qe.Sl,{tag:"span",name:"entity-id",children:["#",null!=(r=o.pk)?r:o.id]})]}),(0,x.isDefined)(o.acceptedState)?(0,E.jsx)(Qe.Sl,{name:"review",mod:{state:o.acceptedState},children:o.acceptedState}):(0,E.jsxs)(Qe.Sl,{name:"created",children:["created, ",(0,E.jsx)(Qe.Sl,{name:"date",component:hB,date:o.createdDate})]})]})]}),s]})}))})),CB=(0,v.WQ)("store")((0,v.PA)((({store:e,title:t,children:n})=>(0,E.jsx)(hr,{title:t,enabled:e.settings.enableTooltips,mouseEnterDelay:.8,children:n})))),SB=(0,v.WQ)((({store:e})=>{var t;return{store:e,history:null==e||null==(t=e.annotationStore)||null==(t=t.selected)?void 0:t.history}})),jB=SB((0,v.PA)((({store:e,history:t,annotation:n})=>{const r=e.hasInterface("review"),o=(0,x.isDefined)(e.annotationStore.selectedHistory),{userGenerate:i,sentUserGenerate:a,versions:s,results:l,editable:c}=n,d=[],[u,h]=(0,m.useState)(!1),g=!c||e.isSubmitting||o||u,p=e.hasInterface("annotations:deny-empty")&&0===l.length,f=(0,m.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,m.useMemo)((()=>(0,E.jsx)(CB,{title:"Reject annotation: [ Ctrl+Space ]",children:(0,E.jsx)(Qa,{"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,E.jsx)(CB,{title:"Accept annotation: [ Ctrl+Enter ]",children:(0,E.jsx)(Qa,{"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,E.jsxs)(Qe.Sl,{name:"skipped-info",children:[(0,E.jsx)(Jl,{color:"#d00"})," Was skipped"]},"skipped")),d.push((0,E.jsx)(CB,{title:"Cancel skip: []",children:(0,E.jsx)(Qa,{"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,E.jsx)(CB,{title:"Cancel (skip) task: [ Ctrl+Space ]",children:(0,E.jsx)(Qa,{"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=p?"Empty annotations denied in this project":"Save results: [ Ctrl+Enter ]";d.push((0,E.jsx)(CB,{title:t,children:(0,E.jsx)(Qe.Sl,{name:"tooltip-wrapper",children:(0,E.jsx)(Qa,{"aria-label":"submit",disabled:g||p,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,E.jsx)(CB,{title:"Update this task: [ Alt+Enter ]",children:(0,E.jsx)(Qa,{"aria-label":"submit",disabled:g||p,look:"primary",onClick:async()=>{await e.commentStore.commentFormSubmit(),e.updateAnnotation()},children:t?"Update":"Submit"})},"update");d.push(n)}}return(0,E.jsx)(Qe.eB,{name:"controls",children:d})}))),kB=(0,v.PA)((({store:e})=>{var t;const n=(0,m.useMemo)((()=>e.taskHistory.findIndex((t=>t.taskId===e.task.id))+1),[e.taskHistory]),[r,o]=(0,m.useState)(0),[i,a]=(0,m.useState)(0);(0,m.useEffect)((()=>{e.commentStore.setAddedCommentThisSession(!1);const t=(0,d.mJ)((()=>e.commentStore.comments.map((e=>e.isDeleted))),(e=>{a(e.filter((e=>!e)).length)}));return()=>{null==t||t()}}),[]),(0,m.useEffect)((()=>{e.commentStore.addedCommentThisSession&&o(i)}),[e.commentStore.addedCommentThisSession]);const s=e.hasInterface("topbar:prevnext"),l=e.hasInterface("topbar:task-counter");let c=!(0,x.isDefined)(e.annotationStore.selected.pk)&&(!(0,k.VS)(k.JO)||e.hasInterface("skip"))&&!e.canGoNextTask&&!e.hasInterface("review")&&e.hasInterface("postpone");return e.hasInterface("annotations:comments")&&(0,k.VS)(k.ow)&&(c=c&&e.commentStore.addedCommentThisSession&&i>=r),(0,E.jsx)(Qe.Sl,{name:"section",children:(0,E.jsxs)(Qe.eB,{name:"current-task",mod:{"with-history":s},style:{padding:(0,k.VS)(k.bA)&&0,width:(0,k.VS)(k.bA)&&"auto"},children:[(0,E.jsxs)(Qe.Sl,{name:"task-id",style:{fontSize:(0,k.VS)(k.bA)?12:14},children:[null!=(t=e.task.id)?t:R(),s&&l&&((0,k.VS)(k.P2)?(0,E.jsxs)(Qe.Sl,{name:"task-count",children:[e.queuePosition," of ",e.queueTotal]}):(0,E.jsxs)(Qe.Sl,{name:"task-count",children:[n," of ",e.taskHistory.length]}))]}),s&&(0,E.jsxs)(Qe.Sl,{name:"history-controls",mod:{newui:(0,k.VS)(k.bA)},children:[(0,E.jsx)(Qe.Sl,{tag:Qa,name:"prevnext",mod:{prev:!0,disabled:!e.canGoPrevTask,newui:(0,k.VS)(k.bA)},type:"link",disabled:!s||!e.canGoPrevTask,onClick:e.prevTask,style:{background:!(0,k.VS)(k.bA)&&"none",backgroundColor:(0,k.VS)(k.bA)&&"none"}}),(0,E.jsx)(Qe.Sl,{tag:Qa,name:"prevnext","data-testid":"next-task",mod:{next:!0,disabled:!e.canGoNextTask&&!c,postpone:!e.canGoNextTask&&c,newui:(0,k.VS)(k.bA)},type:"link",disabled:!e.canGoNextTask&&!c,onClick:e.canGoNextTask?e.nextTask:e.postponeTask,style:{background:!(0,k.VS)(k.bA)&&"none",backgroundColor:(0,k.VS)(k.bA)&&"none"}})]})]})})})),OB=(0,v.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,E.jsx)(Qe.eB,{name:"topbar",mod:{newLabelingUI:(0,k.VS)(k.bA)},children:(0,k.VS)(k.bA)?(0,E.jsxs)(Qe.Sl,{name:"group",children:[(0,E.jsx)(kB,{store:e}),e.hasInterface("annotations:view-all")&&(0,E.jsx)(hr,{title:"View all annotations",children:(0,E.jsx)(Qa,{className:"topbar__button",icon:(0,E.jsx)(tf,{}),type:"text","aria-label":"View All",onClick:t.toggleViewingAllAnnotations,primary:o,style:{height:36,width:36,padding:0,marginRight:(0,k.VS)(k.bA)&&8}})}),e.hasInterface("annotations:add-new")&&(0,E.jsx)(hr,{placement:"topLeft",title:"Create a new annotation",children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(Ns,{}),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,E.jsx)(pB,{store:e,annotationStore:e.annotationStore,commentStore:e.commentStore})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(Qe.Sl,{name:"group",children:[(0,E.jsx)(kB,{store:e}),!o&&(0,E.jsx)(bB,{store:e,annotationStore:e.annotationStore,commentStore:e.commentStore}),(0,E.jsx)(vB,{store:e})]}),(0,E.jsxs)(Qe.Sl,{name:"group",children:[!o&&(0,E.jsx)(Qe.Sl,{name:"section",children:(0,E.jsx)(_D,{})}),!o&&e.hasInterface("controls")&&(e.hasInterface("review")||!r)&&(0,E.jsx)(Qe.Sl,{name:"section",mod:{flat:!0},style:{width:320,boxSizing:"border-box"},children:(0,E.jsx)(jB,{annotation:n})})]})]})}):null}));class RB extends m.Component{constructor(...e){super(...e),this.relationsRef=m.createRef(),this._notifyScroll=()=>{this.relationsRef.current&&this.relationsRef.current.onResize()}}componentDidMount(){window.blur(),document.body.focus()}renderSuccess(){return(0,E.jsx)(Qe.eB,{name:"editor",children:(0,E.jsx)(p.Ay,{status:"success",title:(0,u._$)(this.props.store).messages.DONE})})}renderNoAnnotation(){return(0,E.jsx)(Qe.eB,{name:"editor",children:(0,E.jsx)(p.Ay,{status:"success",title:(0,u._$)(this.props.store).messages.NO_COMP_LEFT})})}renderNothingToLabel(e){return(0,E.jsxs)(Qe.eB,{name:"editor",style:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",paddingBottom:"30vh"},children:[(0,E.jsx)(p.Ay,{status:"success",title:(0,u._$)(this.props.store).messages.NO_NEXT_TASK}),(0,E.jsx)(Qe.eB,{name:"sub__result",children:"You have completed all tasks in the queue!"}),(0,E.jsx)(Qa,{onClick:t=>e.prevTask(t,!0),look:"outlined",style:{margin:"16px 0"},children:"Go to Previous Task"})]})}renderNoAccess(){return(0,E.jsx)(Qe.eB,{name:"editor",children:(0,E.jsx)(p.Ay,{status:"warning",title:(0,u._$)(this.props.store).messages.NO_ACCESS})})}renderConfigValidationException(e){return(0,E.jsxs)(Qe.eB,{name:"main-view",children:[(0,E.jsx)(Qe.Sl,{name:"annotation",children:(0,E.jsx)(Pe,{errors:this.props.store.annotationStore.validation})}),!(0,k.VS)(k.bA)&&e.hasInterface("infobar")&&(0,E.jsxs)(Qe.Sl,{name:"infobar",children:["Task #",e.task.id]})]})}renderLoader(){return(0,E.jsx)(p.Ay,{icon:(0,E.jsx)(f.A,{size:"large"})})}_renderAll(e){if(1===e.length)return(0,E.jsx)(bN,{annotation:e[0],children:[K.renderItem(e[0].root)]});const t=(0,Qe.cn)("renderall").toClassName(),n=(0,Qe.cn)("fade").toClassName();return(0,E.jsx)("div",{className:t,children:e.map(((e,t)=>(0,E.jsx)("div",{className:n,children:(0,E.jsx)(bN,{annotation:e,children:[K.renderItem(e.root)]})},`all-${t}`)))})}_renderUI(e,t){var n,r;return t.viewingAll?this.renderAllAnnotations():(0,E.jsxs)(Qe.eB,{name:"main-view",onScrollCapture:this._notifyScroll,children:[(0,E.jsxs)(Qe.Sl,{name:"annotation",children:[(0,E.jsx)(KM,{root:e,annotation:t.selected}),this.renderRelations(t.selected),(0,k.VS)(k.v1)&&this.renderCommentsOverlay(t.selected)]}),!(0,k.VS)(k.bA)&&(0,u.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,u.Zn)(e).task;return(0,E.jsxs)(Qe.Sl,{name:"infobar",tag:ns,size:"small",children:[(0,E.jsxs)("span",{children:["Task #",t]}),n&&(0,E.jsx)("span",{children:n})]})}renderAllAnnotations(){const e=this.props.store.annotationStore,t=[...e.annotations,...e.predictions];return(0,k.VS)(k.F5)&&(0,x.sortAnnotations)(t),(0,E.jsx)(tN,{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,E.jsx)(vN,{store:n,ref:this.relationsRef,tags:e.names,taskData:r},R())}renderCommentsOverlay(e){const{store:t}=this.props,{commentStore:n}=t;return t.hasInterface("annotations:comments")&&n.isCommentable?(0,E.jsx)(Re,{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,E.jsx)(Qe.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,k.VS)(k.LE),u=(0,k.VS)(k.bA);return(0,E.jsxs)(Qe.eB,{name:"editor",mod:{fullscreen:s.fullscreen,_auto_height:!d},ref:(0,k.VS)(k.SM)?MM(this):null,children:[(0,E.jsx)(KN,{store:o}),(0,E.jsxs)(v.Kq,{store:o,children:[u?(0,E.jsx)(nN,{visible:o.showingDescription,onCancel:()=>o.toggleDescription(),title:o.hasInterface("review")?"Review Instructions":"Labeling Instructions",children:o.description}):(0,E.jsx)(E.Fragment,{children:o.showingDescription&&(0,E.jsx)(bN,{children:(0,E.jsx)("div",{dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(o.description)}})})}),(0,x.isDefined)(o)&&o.hasInterface("topbar")&&(0,E.jsx)(OB,{store:o}),(0,E.jsx)(Qe.eB,{name:"wrapper",mod:{viewAll:l,bsp:s.bottomSidePanel,outliner:d,showingBottomBar:u},children:d?u?(0,E.jsxs)(aB,{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,E.jsx)(WD,{store:o})]}):(0,E.jsx)(Oz,{panelsHidden:l,currentEntity:null!=(r=i.selectedHistory)?r:i.selected,regions:i.selected.regionStore,children:c}):(0,E.jsxs)(E.Fragment,{children:[c,!1===l&&(0,E.jsx)(Qe.eB,{name:"menu",mod:{bsp:s.bottomSidePanel},children:o.hasInterface("side-column")&&(0,E.jsx)(DN,{children:(0,E.jsx)(RD,{store:o})})}),u&&o.hasInterface("topbar")&&(0,E.jsx)(WD,{store:o})]})})]}),o.hasInterface("debug")&&(0,E.jsx)(UD,{store:o})]})}}const EB=(0,v.PA)(RB),_B={CONFIG:class{static validate(e){const t=[];Kj(e,null,[],t);const n=["id","children","name","toname","controlledTags","parentTypes"],r=[];for(const e of t)try{const o=b.getModelByTag(e.type),i=Dj(e,o);null!==i&&r.push(i);const a=Nj(e,o,t);null!==a&&r.push(a);const s=Vj(e,o);null!==s&&r.push(s),r.push(...Bj(e)),r.push(...zj(e,o,n))}catch(t){r.push(Mj.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:()=>[]}},AB=Object.keys(_B).reduce(((e,t)=>Object.assign({},e,{[t]:t})),{}),TB=u.gK.union(u.gK.string,u.gK.array(u.gK.string)),PB=u.gK.model({modelName:u.gK.string,field:u.gK.string,error:u.gK.string,value:u.gK.maybeNull(u.gK.string),validType:u.gK.maybeNull(TB)}).views((e=>({get identifier(){return[e.modelName,e.field,e.error,e.value].concat(e.validType).filter((e=>null!==e)).join("-")}})));class IB{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=_B[e];let r=[];var o;n?r=(null!=(o=n.validate(t))?o:[]).map((e=>{try{return PB.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 LB=u.gK.model("StoreExtender",{sharedStores:u.gK.optional(u.gK.map(jI),{})}).actions((e=>({addSharedStore(t){e.sharedStores.set(t.id,t)},beforeReset(){e.sharedStores.forEach((e=>{(0,u.Yo)(e)})),e.sharedStores.clear()},afterReset(){kI.forEach((t=>{e.addSharedStore(t)}))},beforeDestroy(){e.sharedStores.forEach((e=>{(0,u.Yo)(e),(0,u.zr)(e)})),e.sharedStores.clear()}}))),MB=u.gK.compose("HistoryItem",RP,u.gK.model({comment:u.gK.optional(u.gK.maybeNull(u.gK.string),null),actionType:u.gK.optional(u.gK.maybeNull(u.gK.string),null)})).preProcessSnapshot((e=>{var t,n;return Object.assign({},e,{pk:R(),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})})),KB=u.gK.union(RP,MB),DB=u.gK.model("AnnotationStore",{selected:u.gK.maybeNull(u.gK.reference(KB)),selectedHistory:u.gK.maybeNull(u.gK.safeReference(KB)),root:De.allModelsTypes(),names:u.gK.map(u.gK.reference(De.allModelsTypes())),toNames:u.gK.map(u.gK.array(u.gK.reference(De.allModelsTypes()))),annotations:u.gK.array(RP),predictions:u.gK.array(RP),history:u.gK.array(MB),viewingAllAnnotations:u.gK.optional(u.gK.boolean,!1),validation:u.gK.maybeNull(u.gK.array(PB))}).volatile((()=>({initialized:!1}))).views((e=>({get store(){return(0,u.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,u._$)(e).events.invoke("selectAnnotation",i,o,null!=r?r:{}),i.pk&&(0,u.PA)(e).addAnnotationToTaskHistory(i.pk),i}function r(t){return t&&e.addErrors([Mj.generalError(t)]),e.root=wM.create({id:"error"})}function o(t){if(e.root)return;if(!t)return e.root=wM.create({id:"empty"});let n;try{n=K.treeToModel(t,e.store)}catch(e){return console.error(e),r(e)}const o=b.getModelByTag(n.type),i=b.objectTypes().map((e=>e.name.replace("Model","").toLowerCase())),a=[];e.validate(AB.CONFIG,n);try{e.root=o.create(n)}catch(e){return console.error(e),r(e)}if((0,k.VS)(k.cE)){const{names:t,toNames:n}=K.extractNames(e.root);return t.forEach((t=>e.names.put(t))),n.forEach(((t,n)=>e.toNames.set(n,t))),K.traverseTree(e.root,(t=>{e.store.task&&t.updateValue&&t.updateValue(e.store)})),e.initialized=!0,e.root}return K.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:un.UDate.currentISODate()},t,{id:R(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 IB,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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.K3)){const r=(0,x.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,u.Zn)(e).user)?void 0:a.id)?r:void 0}(0,k.VS)(k.F5)?e.annotations.push(n):e.annotations.unshift(n);const s=e.annotations.at((0,k.VS)(k.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,u.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,u._$)(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,u._$)(e).events.invoke("deleteAnnotation",e.store,t),(0,u.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=[]}}})),NB=u.gK.compose("AnnotationStore",DB,...(0,k.VS)(k.Ls)?[LB]:[]),VB=u.gK.model("Project",{id:u.gK.identifierNumber}).views((e=>({get app(){return(0,u.PA)(e)}}))),zB="SIDEPANEL_MODE_REGIONS",BB="SIDEPANEL_MODE_LABELS",HB=u.gK.model("SettingsModel",{enableHotkeys:u.gK.optional(u.gK.boolean,!0),enablePanelHotkeys:u.gK.optional(u.gK.boolean,!0),enableTooltips:u.gK.optional(u.gK.boolean,!1),enableLabelTooltips:u.gK.optional(u.gK.boolean,!0),continuousLabeling:!1,selectAfterCreate:!1,fullscreen:u.gK.optional(u.gK.boolean,!1),bottomSidePanel:u.gK.optional(u.gK.boolean,!1),sidePanelMode:u.gK.optional(u.gK.enumeration([zB,BB]),zB),imageFullSize:u.gK.optional(u.gK.boolean,!1),enableAutoSave:u.gK.optional(u.gK.boolean,!1),showLabels:u.gK.optional(u.gK.boolean,!1),showLineNumbers:!1,showAnnotationsPanel:u.gK.optional(u.gK.boolean,!0),showPredictionsPanel:u.gK.optional(u.gK.boolean,!0),preserveSelectedTool:u.gK.optional(u.gK.boolean,!0),enableSmoothing:u.gK.optional(u.gK.boolean,!0),videoHopSize:u.gK.optional(u.gK.number,10),isDestroying:u.gK.optional(u.gK.boolean,!1)}).views((e=>({get annotation(){return(0,u.Zn)(e).annotationStore.selected},get displayLabelsByDefault(){return e.sidePanelMode===BB}}))).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,u._$)(e);Object.keys(CN).map((n=>{"boolean"==typeof t.settings[n]?e[n]=t.settings[n]:e[n]=CN[n].defaultValue}))}(0,u.aQ)(e,(n=>{setTimeout((()=>{e.isDestroying||localStorage.setItem(t,JSON.stringify(n))}))}))},toggleShowLabels(){e.showLabels=!e.showLabels,un.HTML.toggleLabelsAndScores(e.showLabels)},toggleShowLineNumbers(){e.showLineNumbers=!e.showLineNumbers},toggleContinuousLabeling(){e.continuousLabeling=!e.continuousLabeling},toggleSelectAfterCreate(){e.selectAfterCreate=!e.selectAfterCreate},toggleSidepanelModel(){e.sidePanelMode=e.sidePanelMode===BB?zB:BB,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?kr.setScope(kr.DEFAULT_SCOPE):kr.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}}))),FB=u.gK.model({enable:u.gK.optional(u.gK.boolean,!1),username:u.gK.string,password:u.gK.string,to:u.gK.string}),WB=u.gK.model("Task",{id:u.gK.maybeNull(u.gK.number),load:u.gK.optional(u.gK.boolean,!1),auth:u.gK.maybeNull(FB),data:u.gK.maybeNull(u.gK.string),queue:u.gK.optional(u.gK.maybeNull(u.gK.string),null)}).views((e=>({get app(){return(0,u.PA)(e)},get dataObj(){return un.Checkers.isStringJSON(e.data)?JSON.parse(e.data):"object"==typeof e.data?e.data:null}}))),$B=u.gK.model({controls:u.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}}))),UB=u.gK.model("CustomButton",{id:u.gK.optional(u.gK.identifier,R),name:u.gK.string,title:u.gK.string,look:u.gK.maybe(u.gK.enumeration(["primary","danger","destructive","alt","outlined","active","disabled"])),tooltip:u.gK.maybe(u.gK.string),ariaLabel:u.gK.maybe(u.gK.string),disabled:u.gK.maybe(u.gK.boolean)}),ZB=kr("AppStore","Global Hotkeys"),GB=u.gK.model("AppStore",{config:u.gK.string,task:u.gK.maybeNull(WB),project:u.gK.maybeNull(VB),taskHistory:u.gK.array(u.gK.model({taskId:u.gK.number,annotationId:u.gK.maybeNull(u.gK.string)}),[]),interfaces:u.gK.array(u.gK.string),explore:u.gK.optional(u.gK.boolean,!1),annotationStore:u.gK.optional(NB,{annotations:[],predictions:[],history:[]}),commentStore:u.gK.optional(aP,{comments:[]}),user:u.gK.optional(u.gK.maybeNull(u.gK.safeReference(tP)),null),debug:!0===window.HTX_DEBUG,settings:u.gK.optional(HB,{}),description:u.gK.maybeNull(u.gK.string),showingSettings:u.gK.optional(u.gK.boolean,!1),showingDescription:u.gK.optional(u.gK.boolean,!1),isLoading:u.gK.optional(u.gK.boolean,!1),isSubmitting:!1,noTask:u.gK.optional(u.gK.boolean,!1),noAccess:u.gK.optional(u.gK.boolean,!1),labeledSuccess:u.gK.optional(u.gK.boolean,!1),showComments:!1,_autoAnnotation:!1,_autoAcceptSuggestions:!1,awaitingSuggestions:!1,users:u.gK.optional(u.gK.array(tP),[]),userLabels:(0,k.VS)(k.RI)?u.gK.optional($B,{controls:{}}):u.gK.undefined,queueTotal:u.gK.optional(u.gK.number,0),queuePosition:u.gK.optional(u.gK.number,0),commentClassificationConfig:u.gK.maybeNull(u.gK.string),customButtons:u.gK.map(u.gK.union(u.gK.string,UB,u.gK.array(u.gK.union(u.gK.string,UB))))}).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,k.VS)(k.F5)}))).views((e=>({get events(){return(0,u._$)(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,u._$)(e).forceAutoAnnotation},get forceAutoAcceptSuggestions(){return(0,u._$)(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"){Sn[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,x.delay)(200)]),(0,x.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(){OR.setRoot(e),window.Htx=e,e.attachHotkeys(),(0,u._$)(e).events.invoke("labelStudioLoad",e)},assignTask:function(t){t&&!un.Checkers.isString(t.data)&&(t=Object.assign({},t,{data:JSON.stringify(t.data)})),e.task=WB.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(){OR.removeAllTools(),kr.unbindAll(),e.attachHotkeys();const t=e.annotationStore;t&&(null==t.beforeReset||t.beforeReset(),(0,k.VS)(k.C8)&&AI(),(0,u.Yo)(t),(0,u.zr)(t)),e.annotationStore=NB.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,k.VS)(k.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,u._$)(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(){ZB.unbindAll(),e.hasInterface("submit","update","review")&&ZB.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,x.isDefined)(r.pk),s=!r.history.canUndo&&!r.draftId,l=(0,k.VS)(k.I8)&&a&&s;n&&o||t.viewingAll||l||r.isReadOnly()||(null==r||r.submissionInProgress(),i?e.acceptAnnotation():!a&&e.hasInterface("submit")?e.submitAnnotation():e.hasInterface("update")&&e.updateAnnotation())})),e.hasInterface("skip","review")&&ZB.addNamed("annotation:skip",(()=>{if(e.annotationStore.viewingAll)return;const t=e.annotationStore.selected;null==t||t.submissionInProgress(),e.hasInterface("review")?e.rejectAnnotation():e.skipTask()})),ZB.addNamed("region:delete-all",(()=>{const{selected:t}=e.annotationStore;window.confirm((0,u._$)(e).messages.CONFIRM_TO_DELETE_ALL_REGIONS)&&t.deleteAllRegions()})),ZB.addNamed("region:relation",(()=>{const t=e.annotationStore.selected;t&&t.highlightedNode&&!t.isLinkingMode&&t.startLinkingMode(F,t.highlightedNode)})),ZB.addNamed("region:focus",(t=>{t.preventDefault();const n=e.annotationStore.selected;n&&n.highlightedNode&&!n.isLinkingMode&&n.highlightedNode.requestPerRegionFocus()})),ZB.addNamed("region:unselect",(()=>{const t=e.annotationStore.selected;!t||t.isLinkingMode||t.isDrawing||(e.annotationStore.history.forEach((e=>{e.unselectAll()})),t.unselectAll())})),ZB.addNamed("region:visibility",(()=>{const t=e.annotationStore.selected;t&&!t.isLinkingMode&&t.hideSelectedRegions()})),ZB.addNamed("region:visibility-all",(()=>{const{selected:t}=e.annotationStore;t.regionStore.toggleVisibility()})),ZB.addNamed("annotation:undo",(()=>{const t=e.annotationStore.selected;t.isDrawing||t.undo()})),ZB.addNamed("annotation:redo",(()=>{const t=e.annotationStore.selected;t.isDrawing||t.redo()})),ZB.addNamed("region:exit",(()=>{const t=e.annotationStore.selected;t&&t.isLinkingMode?t.stopLinkingMode():t.isDrawing||t.unselectAll()})),ZB.addNamed("region:delete",(()=>{const t=e.annotationStore.selected;t&&t.deleteSelectedRegions()})),ZB.addNamed("region:cycle",(()=>{const t=e.annotationStore.selected;t&&t.regionStore.selectNext()})),ZB.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,u._$)(e).events.invoke("skipTask",e,t),e.incrementQueuePosition()}),"Error during skip, try again")},unskipTask:function(){e.isSubmitting||r((()=>{(0,u._$)(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,u._$)(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,k.VS)(k.Bg)||t.sendUserGenerate(),r((async()=>{if((0,k.VS)(k.Bg)){await e.waitForDraftSubmission();const r=await(0,u._$)(e).events.invoke("beforeSaveAnnotation",e,t,{event:n});if(r&&r.some((e=>!1===e)))return;t.sendUserGenerate()}await(0,u._$)(e).events.invoke(n,e,t),e.incrementQueuePosition(),(0,k.VS)(k.Bg)&&t.dropDraft()})),(0,k.VS)(k.Bg)||t.dropDraft())},updateAnnotation:function(t){if(e.isSubmitting)return;const n=e.annotationStore.selected;n.beforeSend(),n.validate()&&(r((async()=>{if((0,k.VS)(k.Bg)){const t=await(0,u._$)(e).events.invoke("beforeSaveAnnotation",e,n,{event:"updateAnnotation"});if(t&&t.some((e=>!1===e)))return}await(0,u._$)(e).events.invoke("updateAnnotation",e,n,t),e.incrementQueuePosition(),(0,k.VS)(k.Bg)&&(n.dropDraft(),!n.sentUserGenerate&&n.sendUserGenerate())})),(0,k.VS)(k.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,k.VS)(k.Bg)){const n=await(0,u._$)(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,u._$)(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,k.VS)(k.Bg)){const t=await(0,u._$)(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,u._$)(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,u._$)(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(JT()([...(0,u.dV)(e.users),...t],"id"))},enrichUsers:function(t){const n=(0,u.dV)(e.users),r={};n.forEach((e=>{r[e.id]=e}));const o=t.map((e=>Object.assign({},r[e.id],e)));e.setUsers(JT()([...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,u.L3)((function*(t,n){const r=R();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,u._$)(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,u._$)(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,u._$)(e).events.invoke("nextTask"),e.incrementQueuePosition()},incrementQueuePosition:function(t=1){e.queuePosition=(0,x.clamp)(e.queuePosition+t,1,e.queueTotal)},beforeDestroy(){OR.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,u.GG)(e,(n=>{(0,u.jX)(n)||(0,u.PA)(n)!==e||t.push(n)}));n=t.shift();)try{(0,u.zr)(n)}catch(e){console.log("Problem: ",e)}}}})),YB=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=GB.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 XB extends m.Component{constructor(...e){super(...e),this.state={initialized:!1}}componentDidMount(){YB(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,E.jsx)(EB,{store:this.store}):null}}var qB=n(30997);const JB={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 QB{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,d.jK)({isolateGlobalState:!0});class eH{static destroyAll(){eH.instances.forEach((e=>null==e.destroy?void 0:e.destroy())),eH.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 QB;const n=Object.assign({},JB,t);n.keymap&&kr.setKeymap(n.keymap),this.root=e,this.options=n,this.supportLegacyEvents(),this.createApp(),eH.instances.add(this)}on(e,t){this.events.on(e,t)}off(e,t){(0,x.isDefined)(t)?this.events.off(e,t):this.events.removeAll(e)}async createApp(){const{store:e}=await YB(this.options,this.events),t=this.getRootElement(this.root);this.store=e,window.Htx=this.store;const n=!1,r=()=>{(0,h.render)((0,E.jsx)(EB,{store:this.store}),t)},o=()=>{var e;if(null==(e=t.childNodes)||!e.length)return;const n=[...t.childNodes],r=PM(n[0]);(0,h.unmountComponentAtNode)(t),IM(n,r),IM([t],r)};r(),e.setAppControls({isRendered:()=>n,render:r,clear:o}),this.destroy=()=>{(0,k.VS)(k.SM)&&o(),AI(),(0,k.VS)(k.SM)&&this.store.selfDestroy(),(0,u.zr)(this.store),kr.unbindAll(),(0,k.VS)(k.SM)&&(this.store=null,this.destroy=null,eH.instances.delete(this))}}supportLegacyEvents(){Object.keys(qB.A).forEach((e=>{const t=this.options[e];if((0,x.isDefined)(t)){const n=(0,g.toCamelCase)(e.replace(/^on/,""));this.events.on(n,t)}}))}}eH.Component=XB,eH.instances=new Set,window.LabelStudio=eH;const tH=eH},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:()=>de,C8:()=>q,CZ:()=>X,Cw:()=>m,Er:()=>H,F2:()=>N,F5:()=>ie,Fk:()=>oe,Gd:()=>x,H:()=>C,I8:()=>ce,JO:()=>ue,K3:()=>w,Kg:()=>J,LE:()=>s,LG:()=>L,Lk:()=>g,Ls:()=>O,M3:()=>K,MV:()=>A,P2:()=>ne,PR:()=>S,RI:()=>d,SM:()=>F,TJ:()=>G,TU:()=>b,VS:()=>me,Zr:()=>R,_m:()=>ee,aT:()=>j,bA:()=>E,bP:()=>P,bT:()=>h,c0:()=>T,cE:()=>k,dY:()=>Z,eB:()=>B,fw:()=>f,gF:()=>D,id:()=>v,jS:()=>M,ow:()=>I,pG:()=>ae,pN:()=>se,q$:()=>Y,q_:()=>U,sI:()=>W,sg:()=>u,tz:()=>_,um:()=>te,v1:()=>he,vS:()=>y,vz:()=>p,x0:()=>c,xB:()=>le,xD:()=>re,xS:()=>$,y8:()=>z,yD:()=>Q,yP:()=>V});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_fix_front_dev_3730_shortcuts_initial_input_22122022_short",A="fflag_fix_front_dev_3793_relative_coords_short",T="fflag_fix_front_dev_4075_taxonomy_overlap_281222_short",P="fflag_feat_front_dev_4081_magic_wand_tool",I="fflag_fix_back_dev_4174_overlap_issue_experiments_10012023_short",L="fflag_feat_front_lsdv_e_278_contextual_scrolling_short",M="fflag_feat_all_lsdv_e_294_llm_annotations_180723_long",K="fflag_fix_font_lsdv_1148_hotkeys_namespaces_01022023_short",D="fflag_feat_front_lsdv_4583_multi_image_segmentation_short",N="fflag_feat_front_lsdv_4583_6_images_preloading_short",V="fflag_fix_font_lsdv_3009_draft_saving_stuck_130223_short",z="fflag_fix_front_lsdv_4600_lead_time_27072023_short",B="fflag_feat_front_lsdv_4659_skipduplicates_060323_short",H="fflag_feat_front_lsdv_4620_richtext_opimization_060423_short",F="fflag_fix_front_lsdv_4620_memory_leaks_100723_short",W="fflag_feat_front_lsdv_4620_outliner_optimization_310723_short",$="fflag_fix_all_lsdv_4711_cors_errors_accessing_task_data_short",U="fflag_feat_front_lsdv_4712_skipduplicates_editing_110423_short",Z="fflag_fix_front_lsdv_4881_timeseries_points_missing_140423_short",G="fflag_fix_front_lsdv_4988_dynamic_no_label_120523_short",Y="fflag_fix_front_lsdv_4930_selection_tool_fixes_240423_short",X="fflag_fix_front_lsdv_4992_hide_all_regions_04052023_short",q="fflag_fix_front_lsdv_4998_missed_dynamic_children_030523_short",J="fflag_fix_front_lsdv_5248_double_click_delay_280823_short",Q="fflag_feat_front_lsdv_5451_async_taxonomy_110823_short",ee="fflag_fix_front_leap_218_improve_performance_of_taxonomy_search_short",te="fflag_feat_front_lsdv_5452_taxonomy_labeling_110823_short",ne="fflag_fix_all_optic_79_task_count_is_wrong_short",re="fflag_fix_front_leap_149_taxonomy_selected_true_short",oe="fflag_feat_front_leap_187_video_seek_on_select_short",ie="fflag_fix_front_leap_443_select_annotation_once",ae="fflag_fix_front_leap_32_zoom_perf_190923_short",se="fflag_fix_leap_466_text_sanitization",le="fflag_fix_leap_246_multi_object_hotkeys_160124_short",ce="fflag_feat_all_leap_1081_reviewer_flow_updates",de="fflag_feat_all_leap_883_custom_script_270524_short",ue="fflag_feat_front_leap_1173_disable_postpone_skip_short",he="fflag_feat_all_leap_1430_per_field_comments_100924_short";function ge(){var e,t;return Object.assign({},null!=(e=null==(t=window.APP_SETTINGS)?void 0:t.feature_flags)?e:{})}function me(e){var t;const n=ge(),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:ge,isFF:me})},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});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([[724],{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},3319:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LabelStudio:()=>eH,default:()=>tH});var r={};n.r(r),n.d(r,{drawMask:()=>jt});var o={};n.r(o),n.d(o,{canvasToBinaryMatrix:()=>Rt,createDragBoundFunc:()=>Tt,fixRectToFit:()=>At,getActualZoomingPosition:()=>It,getBoundingBoxAfterChanges:()=>_t,getBoundingBoxAfterTransform:()=>Et,getTransformedImageData:()=>Pt,reverseCoordinates:()=>Ot});var i={};n.r(i),n.d(i,{currentISODate:()=>Dt,msToHMS:()=>Lt,prettyDate:()=>Mt,toISODateString:()=>Kt});var a={};n.r(a),n.d(a,{applySpanStyles:()=>qt,captureSelection:()=>Wt,charsToCodePoints:()=>rn,codePointsToChars:()=>nn,findNodesBetween:()=>Jt,findOnPosition:()=>an,findRange:()=>en,findRangeNative:()=>tn,fixCodePointsInRange:()=>on,highlightRange:()=>Gt,highlightRangePart:()=>Yt,isSelectionContainsSpan:()=>cn,isTextNode:()=>Nt,rangeToGlobalOffset:()=>sn,removeRange:()=>Qt,wrapWithSpan:()=>Xt});var s={};n.r(s),n.d(s,{AudioVolumeControl:()=>mC,FramesControl:()=>rs});var l={};n.r(l),n.d(l,{Brightness:()=>mR,Brush:()=>zO,Contrast:()=>vR,Ellipse:()=>tR,Erase:()=>WO,KeyPoint:()=>UO,MagicWand:()=>xR,Polygon:()=>GO,Rect:()=>JO,Rect3Point:()=>QO,Rotate:()=>uR,Selection:()=>CR,Zoom:()=>lR});var c={};n.r(c),n.d(c,{VideoSettings:()=>RN});n(81117);var d=n(57896),u=n(77099),h=n(43144),g=n(83126),m=n(14041),p=n(56036),f=n(69447),v=n(56351);const y=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]}};y.getTool=y.getTool.bind(y),y.getModelByTag=y.getModelByTag.bind(y);const b=y;var x=n(48862),w=n(5157),C=n.n(w);const S=(e,t)=>{var n;const r=/\$[\w[\].{}]+/gi;return e?(null==(n=e.match(r))?void 0:n[0])===e?null!=(o=C()(t,e.slice(1)))?o:"":e.replace(r,(e=>{var n;return C()(t,null!=(n=e.slice(1))?n:"")})):"";var o},j=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 k=n(84826),O=n(74331);const R=(e=10)=>(0,O.Ak)(e);var E=n(31085);const _="skip",A="stop";const T=(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 P(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,k.VS)(k.cE)&&null!=(o=e.getAttribute("name"))?o:R(),c=Object.assign({},i,{id:l,tagName:e.tagName,type:a});if("repeater"===a){const r=S(i.on,t)||[],o=[];for(let i=0;i{const n=e.cloneNode(!0);return T(n,i,s),P(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=>P(e,t))));else{var d;c.value=(null==(d=e.innerHTML)?void 0:d.trim())||c.value||""}return c}function I(e,t,n=!0){let r=e;if((0,k.VS)(k.cE)){var o;if(!t)return null;r=t.ids.get(M(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,u.Pw)(r),s=a.identifierAttribute,l=a.name,c=b.getViewByModel(l);if(!c)throw new Error(`No view for model: ${l}`);const d=s&&r[s]||R();return(0,E.jsx)(c,{item:r},n?d:void 0)}function L(e,t){const n=e=>{const r=t(e);if(r!==_){if(r===A)return A;if(e.children)for(const t of e.children){if(n(t)===A)return A}}};n(e)}const M=e=>e.replace(/@.*/,"");const K={renderItem:I,renderChildren:function(e,t){return e&&e.children&&e.children.length?e.children.map((e=>I(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 P(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,u.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 L(e,(e=>{for(const t of r)(0,u.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:L,extractNames:function(e){const t=[],n=new Map,r=new Map,o=b.objectTypes().map((e=>e.name.replace("Model","").toLowerCase()));return L(e,(e=>{e.name&&(n.set(M(e.name),e),o.includes(e.type)&&t.push(M(e.name)))})),L(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(M(e.name))):r.set(e.toname,[n.get(M(e.name))])}})),{names:n,toNames:r}},cleanUpId:M},D=()=>{const e=(0,m.useRef)(!0);return(0,m.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),e};var N=n(47895);const V=u.gK.model("CommentMode",{}).volatile((()=>({comment:null}))).views((e=>({get annotation(){return(0,u.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()}}))),z={key:"link_to_comment",model:V},B=u.gK.model("RelationsMode",{}).volatile((()=>({region:null}))).views((e=>({get annotation(){return(0,u.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()}}))),H={key:"create_relation",model:B},F=H.key,W=z.key,$=u.gK.union(z.model,H.model),U=u.gK.model("LinkingModes",{linkingModes:u.gK.optional(u.gK.map($),(()=>({[H.key]:H.model.create({}),[z.key]:z.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=N.A.CHOOSE_CURSOR):e.linkingMode=!1},stopLinkingMode(){document.body.style.cursor=N.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,x.clamp)(e.x,t.x,n.x),(0,x.clamp)(e.y,t.y,n.y)],o=[(0,x.clamp)(e.width+e.x,t.x,n.x),(0,x.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,x.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,k.VS)(k.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.element&&(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,d.lB)(e,o,this.onUpdate,!0)),r)),n)}},re={parent:["zoomScale","zoomingPositionX","zoomingPositionY","rotation","currentImage",...(0,k.VS)(k.v1)?["containerWidth","containerHeight","canvasSize"]:[]]},oe=e=>{if(!!e.from_name)return te;switch(e.type){case"richtextregion":case"paragraphs":return te;case"audioregion":return(0,k.VS)(k.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,x.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--gJBc5",pe="commentItem--aJS6d",fe="commentIcon--X3v6h",ve="commentIconBackground--EofOZ",ye="commentIconLines--uQaUg",be="_highlighting--qltMP",xe="_highlighted--Ksg1R",we=()=>(0,E.jsxs)("g",{className:fe,children:[(0,E.jsx)("path",{className:ve,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,E.jsx)("path",{className:ye,d:"M18 8V9.3333H6V8H18ZM6 16H12V14.6667H6V16ZM6 12.6667H18V11.3333H6V12.6667Z"})]}),Ce=(0,v.PA)((({comment:e,rootRef:t})=>{var n;const r=t.current,o=null==(n=e.regionRef)?void 0:n.overlayNode,i=!o,[a,s]=(0,m.useState)({}),l=(0,m.useCallback)((()=>{e.setHighlighted(!0)}),[e]),c=(0,m.useCallback)((()=>{e.setHighlighted(!1)}),[e]),d=(0,m.useMemo)((()=>o&&r?ce(o,r):null),[o,r]),{shapeBBox:u,positionStyle:h}=(0,m.useMemo)((()=>{const e=d&&r?ge(d,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)`}}}),[d,r,a]);if((0,m.useEffect)((()=>(null==d||d.onUpdate((()=>{s({})})),()=>{null==d||d.destroy()})),[d]),!r||!o||i)return null;if(u.width<1||u.height<1)return null;const g=[pe];return e.isHighlighted&&g.push(xe),(0,E.jsx)("g",{className:g.join(" "),style:h,onMouseEnter:l,onMouseLeave:c,onClick:e.scrollIntoView,children:(0,E.jsx)(we,{})})})),Se=e=>{const{isClassificationTag:t}=e.from_name,n=e.area.classification,r=e.area.selected;return t&&(n||r)},je=(0,v.PA)((({result:e,rootRef:t})=>{const n=t.current,r=e.area,o=!r||r.hidden,[i,a]=(0,m.useState)({}),[s,l]=(0,m.useState)(!1),c=(0,m.useMemo)((()=>e&&n?ce(e,n):null),[e,n]),d=(0,m.useMemo)((()=>c&&n?ge(c,n)[0]:{x:0,y:0,width:0,height:0}),[c,n,i]);if((0,m.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,E.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()}}))})),ke=(0,v.PA)((({annotation:e,commentStore:t})=>{var n;const{overlayComments:r}=t||{},o=(0,m.useRef)(),[i,a]=(0,m.useState)(R()),s=D();(0,m.useEffect)((()=>{(async()=>{await t.listComments({mounted:s,suppressClearComments:t.isRelevantList})})()}),[null==(n=t.annotation)?void 0:n.id]);const l=(0,m.useMemo)((()=>{let e;return new G((t=>{cancelAnimationFrame(e),e=requestAnimationFrame((()=>{a(R())}))}))}),[]);(0,m.useEffect)((()=>()=>{null==l||l.disconnect()}),[]);const c=(0,m.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];return null!=t&&t.isHighlighting&&d.push(be),(0,E.jsx)("svg",{className:d.join(" "),ref:c,xmlns:"http://www.w3.org/2000/svg",children:(0,E.jsxs)("g",{children:[e.linkingMode===W&&e.results.filter(Se).map((e=>(0,E.jsx)(je,{result:e,rootRef:o},e.id))),r.map((e=>{const{id:t}=e;return(0,E.jsx)(Ce,{comment:e,rootRef:o},t)}))]},i)})})),Oe=(0,m.memo)((0,v.PA)((({tags:e,children:t})=>Array.from(e.values()).every((e=>{var t;return!!(0,u._n)(e)&&(null==(t=null==e?void 0:e.isReady)||t)}),!0)?(0,E.jsx)(E.Fragment,{children:t}):null))),Re=(0,v.PA)((e=>{const{annotation:t}=e;return(0,E.jsx)(Oe,{tags:t.names,children:(0,E.jsx)(ke,Object.assign({},e))})}));var Ee=n(39067);const _e="error--SXGAh";var Ae=n(84411);const Te=({error:e})=>{if("string"==typeof e)return(0,E.jsx)("div",{className:_e,dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(e)}});const t=e instanceof Error?e.message:e;return(0,E.jsx)("div",{className:_e,children:t})},Pe=(0,v.WQ)("store")((0,v.PA)((({store:e,errors:t})=>(0,E.jsx)("div",{className:"lsf-errors",children:t.map(((t,n)=>(0,E.jsx)(Te,{error:(0,u._$)(e).messages[t.error](t)},`error-${n}`)))}))));Pe.propTypes={errors:Ee.PropTypes.array.isRequired};const Ie={range:(e=0,t=1)=>u.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:u.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 Le(e){return t=>u.gK.maybeNull(u.gK.array(e(t)))}function Me(e,t){return n=>u.gK.union({dispatcher:r=>{if(n.find((e=>r.type===e)))return e(r.type);throw Error(t+r.type)}})}const Ke=Me(b.getModelByTag,"Not expecting tag: ");const De={unionArray:function(e){const t=u.gK.maybeNull(u.gK.array(Ke(e)));return t.value=e,t},allModelsTypes:function(){const e=[{dispatcher:e=>{if(!e)return u.gK.literal(void 0);if(b.tags.includes(e.type))return b.getModelByTag(e.type);throw Error(`Not expecting tag: ${e.type}`)}},b.modelsArr()],t=[].concat.apply([],e);return u.gK.union.apply(null,t)},unionTag:function(e){return u.gK.maybeNull(u.gK.enumeration("unionTag",e))},tagsTypes:function(e){const t=u.gK.frozen(e.map((e=>e.toLowerCase())));return t.describe=()=>`(${e.join("|")})`,t.value=e,t},isType:function(e,t){const n=(0,u.Pw)(e);for(const e of t)if(n===e)return!0;return!1},getParentOfTypeString:function(e,t){let n=(0,u.PA)(e);for(Array.isArray(t)||(t=[t]);n;){const e=(0,u.Pw)(n).name;if(t.find((t=>t===e)))return n;n=(0,u.jX)(n)?null:(0,u.PA)(n)}return null},getParentTagOfTypeString:function(e,t){let n=(0,u.PA)(e);for(Array.isArray(t)||(t=[t]);n;){const e=n.type;if(t.find((t=>t===e)))return n;n=(0,u.jX)(n)?null:(0,u.PA)(n)}return null},tagsArray:Le(Ke),toolsArray:Le(Me(b.getTool,"Not expecting tool: "))},Ne=u.gK.model("AnnotationMixin",{}).views((e=>({get annotation(){var t;if((0,k.VS)(k.F5)&&!window.STORE_INIT_OK&&console.error("LSF: annotation accessed before store is initialized",e),!(0,u._n)(e))return null;if((0,k.VS)(k.cE)){var n;const t=(0,u.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:De.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,u.Zn)(e);return t===e?e.control?(0,u.Zn)(e.control).annotationStore:e.obj?(0,u.Zn)(e.obj).annotationStore:null:t.annotationStore}}))),Ve=u.gK.model({}).volatile((()=>({_isReady:!0}))).views((e=>({get isReady(){return e._isReady}}))).actions((e=>({setReady(t){e._isReady=t}}))),ze=Ve,Be=Ve.views((e=>({get isReady(){var t;return e._isReady&&!(null!=(t=e.regs)&&t.filter((e=>!e.isReady)).length)}})));var He=n(41880),Fe=n.n(He);const We={csv(e,t={}){var n;const r=!t.headless,{data:o,meta:{fields:i}}=Fe().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:"")}},$e=u.gK.model({resolver:u.gK.maybeNull(u.gK.string)}).actions((e=>({updateLocalValue(t){e._value=t},updateValue(t){var n,r;e._value=S(e.value,null!=(n=null==t||null==(r=t.task)?void 0:r.dataObj)?n:{})},resolveValue:(0,u.L3)((function*(t){if(!e.resolver)return t;const{type:n,options:r}=j(e.resolver);if(!Object.prototype.hasOwnProperty.call(We,n))return console.error(`Resolver "${null!=n?n:e.resolver}" looks unfamiliar`),t;const o=yield fetch(t),i=yield o.text();return We[n](i,r)}))}))),Ue=$e;class Ze{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 Ge={managers:new Map,get(e,t){let n=this.managers.get(e);return!n&&t&&(n=this.managers.get(t)),n||(n=new Ze,this.managers.set(e,n)),n}},Ye=u.gK.model("SyncableMixin",{name:u.gK.string,type:u.gK.string,sync:u.gK.optional(u.gK.string,"")}).volatile((()=>({syncHandlers:new Map,syncManager:null}))).actions((()=>({syncMuted(e){}}))).actions((e=>({afterCreate(){e.sync&&(e.syncManager=Ge.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)}}))),Xe=u.gK.model({meta:u.gK.frozen({}),normInput:u.gK.maybeNull(u.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("")}}))),qe=u.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())}}))),Je=u.gK.model("ReadOnlyRegionMixin",{readonly:u.gK.optional(u.gK.boolean,!1)}).views((e=>({isReadOnly(){var t;return!!(0,u._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 Qe=n(50494),et=n(18094);const tt=100,nt=100,rt="edge",ot="center",it=(0,v.PA)((0,m.forwardRef)((({imageEntity:e,imageTransform:t,updateImageSize:n,usedValue:r,size:o,overlay:i},a)=>{const s=(0,m.useMemo)((()=>({width:1===o.width?"100%":o.width,height:1===o.height?"auto":o.height})),[o]),l=(0,m.useCallback)((t=>{n(t),e.setImageLoaded(!0)}),[n,e]);return(0,E.jsxs)(Qe.eB,{name:"image",style:s,children:[i,(0,E.jsx)(at,{downloading:e.downloading,progress:e.progress,error:e.error,src:e.src,usedValue:r}),e.downloaded?(0,E.jsx)(lt,{alt:"image",ref:a,src:e.currentSrc,onLoad:l,isLoaded:e.imageLoaded,imageTransform:t}):null]})}))),at=(0,v.PA)((({downloading:e,progress:t,error:n,src:r,usedValue:o})=>e?(0,E.jsxs)(Qe.eB,{name:"image-progress",children:[(0,E.jsx)(Qe.Sl,{name:"message",children:"Downloading image"}),(0,E.jsx)(Qe.Sl,{tag:"progress",name:"bar",value:t,min:"0",max:1,step:1e-4})]}):n?(0,E.jsx)(ct,{src:r,value:o}):null)),st={};(0,k.VS)(k.xS)&&(st.crossOrigin="anonymous");const lt=(0,v.PA)((0,m.forwardRef)((({src:e,onLoad:t,imageTransform:n,isLoaded:r},o)=>{const i=(0,m.useMemo)((()=>{const e=null!=n?n:{};return Object.assign({},e,{visibility:r?"visible":"hidden"})}),[n,r]);return(0,E.jsx)("img",Object.assign({},st,{ref:o,alt:"image",src:e,onLoad:t,style:i}))}))),ct=({src:e,value:t})=>{const n=(0,m.useMemo)((()=>et.A.ERR_LOADING_HTTP({url:e,error:"",attr:t})),[e]);return(0,E.jsx)(Te,{error:n})},dt=u.gK.model({pid:u.gK.optional(u.gK.string,R),score:u.gK.maybeNull(u.gK.number),filtered:u.gK.optional(u.gK.boolean,!1),parentID:u.gK.optional(u.gK.string,""),fromSuggestion:!1,dynamic:!1,origin:u.gK.optional(u.gK.enumeration(["prediction","prediction-changed","manual"]),"manual"),item_index:u.gK.maybeNull(u.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,u.Zn)(e)},get parent(){return(0,u.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,u.Zn)(e).annotationStore)?void 0:n.selected)||{},{type:o,labelName:i}=e,a=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)}));return a},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,x.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*tt/e.currentImageEntity.stageWidth,convertYToPerc:t=>t*nt/e.currentImageEntity.stageHeight,convertHDimensionToPerc:t=>t*(e.scaleX||1)*tt/e.currentImageEntity.stageWidth,convertVDimensionToPerc:t=>t*(e.scaleY||1)*nt/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,u.Pw)(e).name.match(/brush/i)?1200:0,r=(0,u._$)(e);e.drawingTimeout=setTimeout((()=>{const n=e.getConnectedDynamicRegions(t);r.events.invoke("regionFinishedDrawing",e,n)}),n)}}}))),ut=u.gK.compose(dt,Je,Ne),ht=u.gK.model("Result",{id:u.gK.optional(u.gK.identifier,R),score:u.gK.maybeNull(u.gK.number),readonly:u.gK.optional(u.gK.boolean,!1),from_name:u.gK.late((()=>u.gK.reference(u.gK.union(...b.modelsArr())))),to_name:u.gK.late((()=>u.gK.reference(u.gK.union(...b.objectTypes())))),type:u.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:u.gK.model({ranker:u.gK.union(u.gK.array(u.gK.string),u.gK.frozen(),u.gK.null),datetime:u.gK.maybe(u.gK.string),number:u.gK.maybe(u.gK.number),rating:u.gK.maybe(u.gK.number),item_index:u.gK.maybeNull(u.gK.number),text:u.gK.maybe(u.gK.union(u.gK.string,u.gK.array(u.gK.string))),choices:u.gK.maybe(u.gK.array(u.gK.union(u.gK.string,u.gK.array(u.gK.string)))),selected:u.gK.maybe(u.gK.enumeration(["left","right"])),labels:u.gK.maybe(u.gK.array(u.gK.string)),htmllabels:u.gK.maybe(u.gK.array(u.gK.string)),hypertextlabels:u.gK.maybe(u.gK.array(u.gK.string)),paragraphlabels:u.gK.maybe(u.gK.array(u.gK.string)),rectanglelabels:u.gK.maybe(u.gK.array(u.gK.string)),keypointlabels:u.gK.maybe(u.gK.array(u.gK.string)),polygonlabels:u.gK.maybe(u.gK.array(u.gK.string)),ellipselabels:u.gK.maybe(u.gK.array(u.gK.string)),brushlabels:u.gK.maybe(u.gK.array(u.gK.string)),timeserieslabels:u.gK.maybe(u.gK.array(u.gK.string)),timelinelabels:u.gK.maybe(u.gK.array(u.gK.string)),taxonomy:u.gK.frozen(),sequence:u.gK.frozen()}),meta:u.gK.frozen()}).views((e=>({get perRegionStates(){const t=e.states;return t&&t.filter((e=>!0===e.perregion))},get store(){return(0,u.Zn)(e)},get area(){return(0,u.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,x.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}},getRegionElement(){var t;return null==(t=e.from_name)||null==t.getRegionElement?void 0:t.getRegionElement()}}))).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,u.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,h=K.cleanUpId(r.from_name),g=K.cleanUpId(r.to_name);if(!c)return null;if(!e.canBeSubmitted)return null;if((0,x.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:h,to_name:g,type:o,origin:e.area.origin}),(0,x.isDefined)(a[l])&&Object.assign(c.value,{[l]:a[l]}),"number"==typeof i&&(c.score=i),e.isSelfReadOnly()&&(c.readonly=!0),(0,k.VS)(k.gF)&&(0,x.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}}))),gt=u.gK.compose("Result",ht,Ne),mt={TAG:"tag",REGION_LIST:"region-list"},pt=u.gK.model({perregion:u.gK.optional(u.gK.boolean,!1),whenlabelvalue:u.gK.maybeNull(u.gK.string),displaymode:u.gK.optional(u.gK.enumeration(Object.values(mt)),mt.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)}}))),ft=pt;let vt=1;const yt=u.gK.model({id:u.gK.optional(u.gK.identifier,R),ouid:u.gK.optional(u.gK.number,(()=>vt++)),results:u.gK.array(gt),parentID:u.gK.maybeNull(u.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,u._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,u._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,k.VS)(k.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===mt.REGION_LIST))},get perRegionFocusTarget(){return e.perRegionTags.find((e=>!1!==e.isVisible&&e.focusable))},get labelName(){var t,n;if((0,u._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,u._n)(e))return e.object},get style(){if(!(0,u._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||N.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,k.VS)(k.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,u.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,u.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()}}))),bt=u.gK.compose("AreaMixin",yt,Je);var xt=n(72902),wt=n(75696),Ct=n.n(wt);const St=(()=>{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 Rt(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 Et(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 _t(e,t,n=0){const r=new kt.A.Transform;return r.translate(t.x,t.y),r.rotate(n),Et(e,r)}function At(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 Tt(e,t={x:0,y:0}){const{parent:n}=e;return r=>n.fixForZoomWrapper(r,(r=>{let{x:o,y:i}=r;(0,k.VS)(k.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,k.VS)(k.MV)?At(p,100,100):At(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,k.VS)(k.MV)?{x:n.internalToCanvasX(o),y:n.internalToCanvasY(i)}:{x:o,y:i}}))}function Pt(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]=It(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 It(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 Lt(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 Mt(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 Kt(e){const t=6e4*(e=e||new Date).getTimezoneOffset();return new Date(e.getTime()-t).toISOString().slice(0,-1)}function Dt(){return Kt()}const Nt=e=>e&&e.nodeType===Node.TEXT_NODE,Vt=e=>e&&/[\w']/i.test(e),zt=e=>e&&/[\s\t]/i.test(e),Bt=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]}},Ht=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(!Nt(n.startContainer)||zt(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(!Nt(n.startContainer)||zt(n.startContainer.textContent[n.startOffset]));t.setEnd(n.endContainer,n.endOffset),e.removeAllRanges(),e.addRange(t)})(e)},Ft=(e,t)=>{const n="symbol"!==t,{startOffset:r,startContainer:o,endOffset:i,endContainer:a,firstSymbol:s,prevSymbol:l,lastSymbol:c,nextSymbol:d}=Bt(e);if(n)t.endsWith("boundary")?((e,t)=>{const{range:n,startOffset:r,startContainer:o,endOffset:i,endContainer:a}=Bt(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}=Bt(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),Ht(e)})(e,t);else{if(!Vt(s)||Vt(l)){e.getRangeAt(0).setEnd(o,r),e.modify("move","backward",t)}if(!Vt(c)||Vt(d)){e.getRangeAt(0).setEnd(a,i),e.modify("extend","forward",t)}}},Wt=(e,{granularity:t,beforeCleanup:n,window:r}={granularity:"symbol"})=>{const o=r.getSelection();if(o.isCollapsed)return;if("symbol"!==t&&Ht(o),o.isCollapsed)return;$t(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":Ft(e,"word");break;case"sentence":Ft(e,"sentenceboundary");break;case"paragraph":Ft(e,"paragraphboundary")}}catch(e){console.warn("Probably, you're using browser that doesn't support granularity.")}},Ut=(e,t,n,r="forward")=>{const o=t===e?t.childNodes[n]:t;if(Nt(o)&&!r.endsWith("next"))return o;const i=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ALL);let a,s=i.nextNode();for(;s&&s!==o;)Nt(s)&&(a=s),s=i.nextNode();if(s&&r.startsWith("backward"))return a;for("forward-next"===r&&(s=i.nextNode());s;){if(Nt(s))return s;s=i.nextNode()}},Zt=e=>{const{endOffset:t,commonAncestorContainer:n}=e;let{startOffset:r,startContainer:o,endContainer:i}=e;if(!Nt(o)){if(o=Ut(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=Ut(n,o,r,"forward-next"),!o)return null}while(a(o));e.setStart(o,0),r=0}if(!Nt(i)){if(i=Ut(n,i,t,"backward"),!i)return null;for(;/^\s*$/.test(i.wholeText);)if(i=Ut(n,i,t,"backward-next"),!i)return null;e.setEnd(i,i.length)}return e},Gt=(e,{index:t,label:n,classNames:r})=>{const{startContainer:o,endContainer:i,commonAncestorContainer:a}=e,{startOffset:s,endOffset:l}=e,c=[],d=(...e)=>Yt(...e,r);if(o===i)c.push(d(o,s,l));else{Jt(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},Yt=(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,k.VS)(k.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=Xt(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=Xt(a,r),n.replaceChild(o,t)}return o},Xt=(e,t,n)=>{const r=e.ownerDocument.createElement("span");return r.appendChild(e),qt(r,{classNames:t,label:n}),r},qt=(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):"")},Jt=(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},Qt=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;Nt(t)&&Nt(e)&&(t.data+=e.data,e.remove())}))}))},en=(e,t,n)=>({startContainer:nn(an(n,e,"right")),endContainer:nn(an(n,t,"left"))}),tn=(e,t,n)=>{var r;const{startContainer:o,endContainer:i}=en(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},nn=({node:e,position:t}={})=>{if(!e)return;return{node:e,position:[...e.textContent].slice(0,t).join("").length}},rn=({node:e,position:t})=>{const n=e.textContent.substr(0,t);return{node:e,position:[...n].length}},on=e=>{const t=rn({node:e.startContainer,position:e.startOffset}),n=rn({node:e.endContainer,position:e.endOffset});return e.setStart(e.startContainer,t.position),e.setEnd(e.endContainer,n.position),e},an=(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,x.clamp)(t-i,0,e)};l=!0}i+=e}a=s,s=o.nextNode()}},sn=(e,t)=>[ln(e.startContainer,e.startOffset,t),ln(e.endContainer,e.endOffset,t)],ln=(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,x.isDefined)(s.length)?[...s.textContent].length:1;n&&(e=Math.min(t,e)),i+=e}s=o.nextNode()}return i},cn=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 dn(e){return e?Object.entries(e).reduce(((e,[t,n])=>(e[`--${t}`]=n,e)),{}):null}const un={Image:o,HTML:Ae,Checkers:x,Colors:xt,UDate:i,guidGenerator:R,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},hn=u.gK.model("AudioUltraRegionModel",{type:"audioregion",object:u.gK.late((()=>u.gK.reference(gj))),start:u.gK.number,end:u.gK.number,channel:u.gK.optional(u.gK.number,0),selectedregionbg:u.gK.optional(u.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,x.clamp)(n,0,a.width),top:o,right:(0,x.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)=>un.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(N.A.LINKING_MODE_CURSOR))},onMouseLeave(){e.annotation.isLinkingMode&&(e.setHighlight(!1),e._ws_region.switchCursor(N.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))}}})),gn=u.gK.model("AudioRegionModel",{type:"audioregion",object:u.gK.late((()=>u.gK.reference(gj))),start:u.gK.number,end:u.gK.number,channel:u.gK.optional(u.gK.number,0),selectedregionbg:u.gK.optional(u.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=un.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,u.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=un.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=N.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:un.Colors.rgbaChangeAlpha(e.selectedregionbg,.8)}),e.onClickRegion(n)},onMouseOver(){e.annotation.isLinkingMode&&(e.setHighlight(!0),e._ws_region.element.style.cursor=N.A.LINKING_MODE_CURSOR)},onMouseLeave(){e.annotation.isLinkingMode&&(e.setHighlight(!1),e._ws_region.element.style.cursor=N.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()}}))),mn=u.gK.model("EditableRegion").volatile((()=>({editorEnabled:!0,editableFields:[]}))).views((e=>({getProperty:t=>e[t],getPropertyType:t=>(0,u.Pw)(e).properties[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}}))),pn=u.gK.model("EditableAudioModel",{}).volatile((()=>({editableFields:[{property:"start",label:"Start"},{property:"end",label:"End"}]}))),fn=u.gK.compose("AudioRegionModel",ut,bt,Xe,mn,pn,gn),vn=u.gK.compose("AudioRegionModel",ut,bt,Xe,mn,pn,hn);let yn=fn;(0,k.VS)(k.vS)&&(yn=vn),b.addRegionType(yn,"audioplus"),b.addRegionType(yn,"audio");var bn=n(8392),xn=n.n(bn),wn=n(26324);const Cn=(e,t,n)=>{const r={type:"",title:""};switch(e){case"error":r.type=wn.A.error,r.title="Error";break;case"warning":r.type=wn.A.warning,r.title="Warning";break;case"success":r.type=wn.A.success,r.title="Success";break;default:r.type=wn.A.info,r.title="Info"}return r.type({title:n||r.title,content:t})},Sn={error:(e,t)=>Cn("error",e,t),warning:(e,t)=>Cn("warning",e,t),success:(e,t)=>Cn("success",e,t),info:(e,t)=>Cn("info",e,t)},jn=u.gK.model("BaseTag"),kn=u.gK.model(Object.assign({},(0,k.VS)(k.cE)?{id:u.gK.identifier,name:u.gK.string}:{name:u.gK.identifier},{_needsUpdate:u.gK.optional(u.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})=>xn()(e,t)))),n||e.regions.find((e=>xn()(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,k.VS)(k.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];Sn.warning(`You can't use ${e.value} more than ${e.maxUsages} time(s)`)}e.annotation.unselectAll()}return o}}})),On=u.gK.compose(kn,jn,Ne),Rn={min:1,max:1500,step:10,default:1},En={min:.5,max:2,step:.01,default:1},_n={min:0,max:1,step:.01,default:1},An=u.gK.model({value:u.gK.maybeNull(u.gK.string),muted:u.gK.optional(u.gK.boolean,!1),zoom:u.gK.optional(u.gK.boolean,!0),defaultzoom:u.gK.optional(u.gK.string,Rn.default.toString()),volume:u.gK.optional(u.gK.boolean,!0),defaultvolume:u.gK.optional(u.gK.string,_n.default.toString()),speed:u.gK.optional(u.gK.boolean,!0),defaultspeed:u.gK.optional(u.gK.string,En.default.toString()),hotkey:u.gK.maybeNull(u.gK.string),showlabels:u.gK.optional(u.gK.boolean,!1),showscores:u.gK.optional(u.gK.boolean,!1),height:u.gK.optional(u.gK.string,"88"),cursorwidth:u.gK.optional(u.gK.string,"2"),cursorcolor:u.gK.optional(Ie.color,"#333"),defaultscale:u.gK.optional(u.gK.string,"1"),autocenter:u.gK.optional(u.gK.boolean,!0),scrollparent:u.gK.optional(u.gK.boolean,!0)}),Tn=u.gK.compose("AudioModel",An,Ye,Ue,On,Ne,ze,u.gK.model("AudioModel",{type:"audio",_value:u.gK.optional(u.gK.string,""),playing:u.gK.optional(u.gK.boolean,!1),regions:u.gK.array(yn)}).volatile((()=>({errors:[]}))).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,u.Zn)(e)},states:()=>e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t&&t.filter((e=>"LabelsModel"===(0,u.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=un.Colors.convertToRGBA(o.getSelectedColor(),.3));const i=yn.create({id:t.id?t.id:R(),pid:t.pid?t.pid:R(),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,x.isDefined)(e._ws)&&(e._ws.destroy(),e._ws=null)}catch(t){e._ws=null,console.warn("Already destroyed")}}})))),Pn=u.gK.model({name:u.gK.identifier,value:u.gK.maybeNull(u.gK.string),muted:u.gK.optional(u.gK.boolean,!1),zoom:u.gK.optional(u.gK.boolean,!0),defaultzoom:u.gK.optional(u.gK.string,1..toString()),volume:u.gK.optional(u.gK.boolean,!0),defaultvolume:u.gK.optional(u.gK.string,1..toString()),speed:u.gK.optional(u.gK.boolean,!0),defaultspeed:u.gK.optional(u.gK.string,1..toString()),hotkey:u.gK.maybeNull(u.gK.string),showlabels:u.gK.optional(u.gK.boolean,!1),showscores:u.gK.optional(u.gK.boolean,!1),height:u.gK.optional(u.gK.string,"96"),waveheight:u.gK.optional(u.gK.string,"32"),cursorwidth:u.gK.optional(u.gK.string,"2"),cursorcolor:u.gK.optional(Ie.color,"#333"),defaultscale:u.gK.optional(u.gK.string,"1"),autocenter:u.gK.optional(u.gK.boolean,!0),scrollparent:u.gK.optional(u.gK.boolean,!0),splitchannels:u.gK.optional(u.gK.boolean,!1),decoder:u.gK.optional(u.gK.enumeration(["ffmpeg","webaudio"]),"webaudio"),player:u.gK.optional(u.gK.enumeration(["html5","webaudio"]),"html5")}),In=u.gK.compose("AudioModel",Pn,Ye,Ue,On,Ne,ze,u.gK.model("AudioModel",{type:"audio",_value:u.gK.optional(u.gK.string,""),regions:u.gK.array(yn)}).volatile((()=>({errors:[],stageRef:(0,m.createRef)(),_ws:null,_wfFrame:null}))).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,u.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,u.Pw)(e).name&&e.isSelected))},get activeState(){const t=e.states();return t&&t.filter((e=>"LabelsModel"===(0,u.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,x.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,d.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=un.Colors.convertToRGBA(o.getSelectedColor(),.3));const i=yn.create({id:t.id?t.id:R(),pid:t.pid?t.pid:R(),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,k.VS)(k.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,u._$)(e.store).messages[n]({attr:e.value,url:e._value,error:t.message});e.errors=[r]},beforeDestroy(){try{n&&clearTimeout(n),t&&t(),(0,x.isDefined)(e._ws)&&(e._ws.destroy(),e._ws=null)}catch(t){e._ws=null,console.warn("Already destroyed")}},setWFFrame(t){e._wfFrame=t}}}))),Ln=({item:e,style:t,className:n,children:r})=>{const o=e.getProps&&e.getProps(),i=(0,Qe.cn)("object").toClassName();return(0,E.jsx)("div",Object.assign({className:[i,n].join(" "),"data-needs-update":e._needsUpdate,style:t},o,{children:r}))},Mn=(0,v.PA)(Ln),Kn=(0,v.PA)(Ln);var Dn=n(92006),Nn=n.n(Dn),Vn=n(53871),zn=n.n(Vn),Bn=n(1474),Hn=n(17022),Fn=n(64381),Wn=n.n(Fn),$n=n(38573),Un=n.n($n),Zn=n(57290),Gn=n.n(Zn);const Yn="wave--XFK_Q",Xn="link--MtZ3P";var qn=n(82149),Jn=n(61747),Qn=n(35455),er=n(34595),tr=n(27078),nr=n(73033),rr=n(37442),or=n.n(rr);const ir=(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)})),ar=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)}},sr=(e,t,n,r=0)=>{let o=0,i=0;const a=((e,t)=>{const n=ar(e),r=ar(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("-")}},lr=e=>{"webkitRequestFullscreen"in e?e.webkitRequestFullscreen():e.requestFullscreen()},cr=()=>{"webkitCancelFullScreen"in document?document.webkitCancelFullScreen():document.exitFullscreen()},dr=()=>{var e;return null!=(e=document.webkitCurrentFullScreenElement)?e:document.fullscreenElement},ur=(e={},t)=>{const n=(0,m.useRef)(e);return(0,m.useEffect)((()=>{n.current=e}),[e,...null!=t?t:[]]),(0,m.useEffect)((()=>{const e=()=>{dr()?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:dr,enter:lr,exit:cr,setHandlers(e={}){n.current=e}}},hr=(0,m.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,m.useRef)(),g=d?e=>{l(e),u.current=e}:u,p=(0,m.useRef)(),[f,v]=(0,m.useState)({}),[y,b]=(0,m.useState)(n?"visible":null),[x,w]=(0,m.useState)(!1),[C,S]=(0,m.useState)("top-center"),j=(0,m.useRef)(),k=(0,m.useCallback)((()=>{const{left:e,top:t,align:n}=sr(s(u.current),p.current,C,10);v({left:e,top:t}),S(n)}),[u.current,p.current]),O=(0,m.useCallback)(((e,t)=>{if(p.current){if(t)return void w(!1);ir(p.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,p]),R=(0,m.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]),_=(0,m.useMemo)((()=>x?(0,E.jsx)(Qe.eB,{ref:p,name:"tooltip",mod:{align:C,theme:i},mix:R,style:Object.assign({},f,null!=a?a:{}),children:(0,E.jsx)(Qe.Sl,{name:"body",children:e})}):null),[x,f,e,R,p]),A=m.Children.only(t),T=(0,m.cloneElement)(A,Object.assign({},A.props,{ref:g}));return(0,m.useEffect)((()=>{x&&O(!0)}),[x]),(0,m.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]),ur({onEnterFullscreen:()=>O(!1,!0),onExitFullscreen:()=>O(!1,!0)},[]),(0,E.jsxs)(E.Fragment,{children:[T,(0,h.createPortal)(_,document.body)]})}));hr.displayName="Tooltip";const gr=e=>(0,E.jsx)(Qe.eB,{name:"hint",tag:"sup",className:e.className,"data-copy":e.copy,style:e.style,children:e.children}),mr=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"}}'),pr=["store","name","children"];if(!(0,k.VS)(k.xB)){const e=mr["image:prev"],t=mr["image:next"];e&&(e.key=e.mac="ctrl+a"),t&&(t.key=t.mac="ctrl+d")}const fr=["key","mac","description","modifier","modifierDescription"],vr=e=>{Object.entries(e).forEach((([e,t])=>{Object.keys(t).forEach((t=>{if(!fr.includes(t))throw new Error(`Unknown keymap property ${t} for key ${e}`)}))}))};vr(mr);const yr="__main__",br="__input__",xr={},wr={},Cr=[],Sr={[yr]:{},[br]:{}};or().filter=e=>{var t;if("__none__"===or().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&&or().setScope(/^(INPUT|TEXTAREA|SELECT)$/.test(n)?br:yr),!0};const jr={plus:"=",minus:"-",",":"¼"},kr=(e="global",t="Hotkeys")=>{var n;let r={};wr[e]=null!=(n=wr[e])?n:{description:t,get keys(){return r},get descriptions(){const e=Object.keys(this.keys).reduce(((e,t)=>(xr[t]&&e.push([t,xr[t]]),e)),[]);return Object.fromEntries(e)}};const o=(t,n)=>{const r=Sr[t];r&&r[n]&&(r[n]=r[n].filter((t=>t.namespace!==e)))},i=(e,t)=>{const n=Sr[e];n&&n[t]&&n[t].forEach((n=>{or()(t,e,n.func)}))},a=e=>[...e.replace(/\s/,"").matchAll(/((?:\w+\+)*(?:[^,]+|,)),?/g)].map((e=>e[1])),s=()=>{for(const e of[yr,br])for(const t of Object.keys(r)){const n=a(t);for(const t of n)(0,k.VS)(k.M3)?(o(e,t),or().unbind(t,e),i(e,t)):or().unbind(t,e),delete xr[t]}r={}};return Cr.push(s),{applyAliases:e=>a(e).map((e=>e.split("+").map((e=>{var t;return null!=(t=jr[e.trim()])?t:e})).join("+"))).join(","),addKey(t,n,o,i=yr){if(!(0,x.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&&(xr[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,k.VS)(k.M3)&&((t,n,r)=>{(0,x.isDefined)(Sr[t])||(Sr[t]={});const o=Sr[t];(0,x.isDefined)(o[n])||(o[n]=[]),o[n].push({namespace:e,func:r})})(t,a,r),or()(a,t,r)}))},overwriteKey(e,t,n,r=yr){(0,x.isDefined)(e)&&(this.hasKey(e)&&this.removeKey(e,r),this.addKey(e,t,n,r))},removeKey(e,t=yr){if(!(0,x.isDefined)(e))return;const n=e.toLowerCase();this.hasKey(n)&&(t.split(",").map((e=>e.trim())).filter(Boolean).forEach((t=>{(0,k.VS)(k.M3)?(o(t,e),or().unbind(n,t),i(t,e)):or().unbind(n,t)})),delete r[n],delete xr[n])},addNamed(e,t,n){const r=kr.keymap[e];if(!(0,x.isDefined)(r))throw new Error(`Unknown named hotkey ${r}`);{var o;const e=(0,x.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=kr.keymap[e];if(!(0,x.isDefined)(n))throw new Error(`Unknown named hotkey ${n}`);{var r;const e=(0,x.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=kr.keymap[e];if(!(0,x.isDefined)(r))throw new Error(`Unknown named hotkey ${e}`);{var o;const e=(0,x.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,x.isDefined)(e))return;const t=e.toLowerCase();return(0,x.isDefined)(r[t])},getKeys:()=>Object.keys(r),getNamespace:()=>wr[e],addDescription(e,t){r[e]||(xr[e]=t)},removeDescription(e){r||xr[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}}};kr.DEFAULT_SCOPE=yr,kr.INPUT_SCOPE=br,kr.keymap=Object.assign({},mr),kr.setKeymap=e=>{vr(e),Object.assign(kr.keymap,e)},kr.keysDescipritions=()=>xr,kr.namespaces=()=>wr,kr.unbindAll=()=>{Cr.forEach((e=>e()))},kr.setScope=e=>{or().setScope(e)},kr.Tooltip=(0,v.WQ)("store")((0,v.PA)((e=>{let{store:t,name:n,children:r}=e,o=(0,nr.A)(e,pr);const i=kr.keymap[n],a=t.settings.enableTooltips&&t.settings.enableHotkeys;if((0,x.isDefined)(i)){var s,l;const e=(0,x.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,m.createElement)(Qe.Sl,{tag:"kbd",name:"key"},e)));n.push((0,m.createElement)(Qe.eB,{name:"key-group",tag:"span",style:{marginLeft:5}},...t))})),(0,m.createElement)(hr,Object.assign({},o,{theme:"light",title:(0,m.createElement)(m.Fragment,{},t,...n)}),r)}return r}))),kr.Hint=(0,v.WQ)("store")((0,v.PA)((({store:e,name:t})=>{const n=kr.keymap[t],r=e.settings.enableTooltips&&e.settings.enableHotkeys;if((0,x.isDefined)(n)&&r){var o;const e=(0,x.isMacOS)()&&null!=(o=n.mac)?o:n.key;return(0,m.createElement)(gr,{},[e])}return null})));function Or(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 Rr(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 Er(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 _r(e){return Math.floor(10/Rr(e))}class Ar extends m.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=zn()((()=>{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=kr("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||et.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:[Wn().create({dragSelection:{slop:5}}),Un().create({container:"#timeline",formatTimeCallback:Or,timeInterval:Rr,primaryLabelInterval:Er,secondaryLabelInterval:_r,primaryColor:"blue",secondaryColor:"blue",primaryFontColor:"#000",secondaryFontColor:"#000"}),Nn().create({wrapper:this.$waveform,showTime:!0,opacity:1})]})),this.wavesurfer=Gn().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=zn()(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,`${kr.DEFAULT_SCOPE},${kr.INPUT_SCOPE}`)}componentWillUnmount(){this.hotkeys.unbindAll(),this.wavesurfer.unAll()}render(){return(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{id:"wave",ref:this.setWaveformRef,className:Yn}),(0,E.jsx)("div",{id:"timeline"}),this.props.zoom&&(0,E.jsxs)(qn.A,{gutter:16,style:{marginTop:"1em"},children:[(0,E.jsx)(Jn.A,{flex:8,style:{textAlign:"right",marginTop:"6px"},children:(0,E.jsxs)("div",{style:{display:"flex"},children:[(0,E.jsx)("div",{style:{marginTop:"6px",marginRight:"5px"},children:(0,E.jsx)(hr,{placement:"topLeft",title:"Horizontal zoom out",children:(0,E.jsx)(Bn.A,{onClick:this.onZoomMinus,className:Xn})})}),(0,E.jsx)("div",{style:{width:"100%"},children:(0,E.jsx)(Qn.A,{min:0,step:10,max:500,value:"number"==typeof this.state.zoom?this.state.zoom:0,onChange:e=>{this.onChangeZoom(e)}})}),(0,E.jsx)("div",{style:{marginTop:"6px",marginLeft:"5px"},children:(0,E.jsx)(hr,{placement:"topLeft",title:"Horizontal zoom in",children:(0,E.jsx)(Hn.A,{onClick:this.onZoomPlus,className:Xn})})})]})}),(0,E.jsx)(Jn.A,{flex:4,style:{textAlign:"right",marginTop:"6px"},children:(0,E.jsxs)("div",{style:{display:"flex"},children:[(0,E.jsx)("div",{style:{marginTop:"6px",marginRight:"5px"},children:(0,E.jsx)(hr,{placement:"topLeft",title:"Vertical zoom out",children:(0,E.jsx)(Bn.A,{onClick:this.onZoomYMinus,className:Xn})})}),(0,E.jsx)("div",{style:{width:"100%"},children:(0,E.jsx)(Qn.A,{min:1,step:.1,max:50,value:"number"==typeof this.state.zoomY?this.state.zoomY:1,onChange:e=>{this.onChangeZoomY(e)}})}),(0,E.jsx)("div",{style:{marginTop:"6px",marginLeft:"5px"},children:(0,E.jsx)(hr,{placement:"topLeft",title:"Vertical zoom in",children:(0,E.jsx)(Hn.A,{onClick:this.onZoomYPlus,className:Xn})})})]})}),(0,E.jsx)(Jn.A,{flex:3,children:this.props.volume&&(0,E.jsxs)("div",{style:{display:"flex",marginTop:"6.5px"},children:[(0,E.jsx)("div",{style:{width:"100%"},children:(0,E.jsx)(Qn.A,{min:0,max:1,step:.1,value:"number"==typeof this.state.volume?this.state.volume:1,onChange:e=>{this.onChangeVolume(e)}})}),(0,E.jsx)("div",{style:{marginLeft:"10px",marginTop:"5px"},children:(0,E.jsx)(tr.A,{})})]})}),(0,E.jsx)(Jn.A,{flex:1,style:{marginTop:"6px"},children:this.props.speed&&(0,E.jsx)(er.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,E.jsxs)(er.A.Option,{value:+e,children:["Speed ",e]},e)))})})]})]})}}var Tr=n(76363),Pr=n(52345),Ir=n(53567);const Lr=(0,v.PA)((({item:e,store:t})=>(0,E.jsx)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"1em"},children:(0,E.jsxs)(Tr.A,{type:"primary",onClick:()=>{e._ws.playPause()},children:[e.playing&&(0,E.jsxs)(m.Fragment,{children:[(0,E.jsx)(Pr.A,{})," ",(0,E.jsx)("span",{children:"Pause"}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,E.jsxs)(gr,{children:["[",e.hotkey,"]"]})]}),!e.playing&&(0,E.jsxs)(m.Fragment,{children:[(0,E.jsx)(Ir.A,{})," ",(0,E.jsx)("span",{children:"Play"}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,E.jsxs)(gr,{children:["[",e.hotkey,"]"]})]})]})}))),Mr=(0,v.WQ)("store")((0,v.PA)((({store:e,item:t})=>{var n;if(!t._value)return null;const r=(0,u._$)(e).messages;return(0,E.jsx)(Kn,{item:t,children:(0,E.jsxs)(m.Fragment,{children:[null==(n=t.errors)?void 0:n.map(((e,t)=>(0,E.jsx)(Te,{error:e},`err-${t}`))),(0,E.jsx)(Ar,{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,E.jsx)(Lr,{item:t,store:e}),(0,E.jsx)("div",{style:{marginBottom:"4px"}})]})})}))),Kr=e=>{const t=(0,m.useRef)(e);return(0,m.useEffect)((()=>{Object.assign(t.current,e)}),[e]),t.current},Dr=(0,m.createContext)({position:0,length:0,regions:[],step:10,playing:!1,settings:{},visibleWidth:0,seekOffset:0,data:void 0}),Nr=Dr.Provider;var Vr,zr=["title","titleId"];function Br(){return Br=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fr=function(e,t){var n=e.title,r=e.titleId,o=Hr(e,zr);return m.createElement("svg",Br({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?m.createElement("title",{id:r},n):null,Vr||(Vr=m.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"})))},Wr=(0,m.forwardRef)(Fr);n.p;var $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 m.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?m.createElement("title",{id:r},n):null,$r||($r=m.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"})))},Xr=(0,m.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 m.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?m.createElement("title",{id:r},n):null,qr||(qr=m.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"})),Jr||(Jr=m.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"})))},ro=(0,m.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 m.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?m.createElement("title",{id:r},n):null,oo||(oo=m.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"})),io||(io=m.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"})))},uo=(0,m.forwardRef)(co);n.p;var ho,go,mo=["title","titleId"];function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=fo(e,mo);return m.createElement("svg",po({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?m.createElement("title",{id:r},n):null,ho||(ho=m.createElement("rect",{x:15,y:5,width:2,height:14,rx:1,fill:"black"})),go||(go=m.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"})))},yo=(0,m.forwardRef)(vo);n.p;n.p;var bo,xo,wo,Co,So=["title","titleId"];function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Oo=function(e,t){var n=e.title,r=e.titleId,o=ko(e,So);return m.createElement("svg",jo({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?m.createElement("title",{id:r},n):null,bo||(bo=m.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})),xo||(xo=m.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"})),wo||(wo=m.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"})),Co||(Co=m.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"})))},Ro=(0,m.forwardRef)(Oo);n.p;var Eo,_o,Ao,To=["title","titleId"];function Po(){return Po=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Lo=function(e,t){var n=e.title,r=e.titleId,o=Io(e,To);return m.createElement("svg",Po({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?m.createElement("title",{id:r},n):null,Eo||(Eo=m.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"})),_o||(_o=m.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"})),Ao||(Ao=m.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"})))},Mo=(0,m.forwardRef)(Lo);n.p;var Ko,Do=["title","titleId"];function No(){return No=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zo=function(e,t){var n=e.title,r=e.titleId,o=Vo(e,Do);return m.createElement("svg",No({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?m.createElement("title",{id:r},n):null,Ko||(Ko=m.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"})))},Bo=(0,m.forwardRef)(zo);n.p;var Ho,Fo=["title","titleId"];function Wo(){return Wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Uo=function(e,t){var n=e.title,r=e.titleId,o=$o(e,Fo);return m.createElement("svg",Wo({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?m.createElement("title",{id:r},n):null,Ho||(Ho=m.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,m.forwardRef)(Uo);n.p;n.p;var 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 m.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?m.createElement("title",{id:r},n):null,Go||(Go=m.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"})))},Qo=(0,m.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 m.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?m.createElement("title",{id:r},n):null,ei||(ei=m.createElement("rect",{x:14,y:4,width:5,height:16,rx:1.5,fill:"black"})),ti||(ti=m.createElement("rect",{x:5,y:4,width:5,height:16,rx:1.5,fill:"black"})))},ai=(0,m.forwardRef)(ii);n.p;var si,li,ci=["title","titleId"];function di(){return di=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hi=function(e,t){var n=e.title,r=e.titleId,o=ui(e,ci);return m.createElement("svg",di({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?m.createElement("title",{id:r},n):null,si||(si=m.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"})),li||(li=m.createElement("rect",{x:7,y:5,width:2,height:14,rx:1,fill:"black"})))},gi=(0,m.forwardRef)(hi);n.p;n.p;var mi,pi,fi,vi,yi=["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 wi=function(e,t){var n=e.title,r=e.titleId,o=xi(e,yi);return m.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?m.createElement("title",{id:r},n):null,mi||(mi=m.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"})),pi||(pi=m.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"})),fi||(fi=m.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"})),vi||(vi=m.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"})))},Ci=(0,m.forwardRef)(wi);n.p;var Si,ji,ki,Oi,Ri=["title","titleId"];function Ei(){return Ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ai=function(e,t){var n=e.title,r=e.titleId,o=_i(e,Ri);return m.createElement("svg",Ei({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?m.createElement("title",{id:r},n):null,Si||(Si=m.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"})),ji||(ji=m.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"})),ki||(ki=m.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"})),Oi||(Oi=m.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"})))},Ti=(0,m.forwardRef)(Ai);n.p;var Pi,Ii=["title","titleId"];function Li(){return Li=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ki=function(e,t){var n=e.title,r=e.titleId,o=Mi(e,Ii);return m.createElement("svg",Li({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?m.createElement("title",{id:r},n):null,Pi||(Pi=m.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"})))},Di=(0,m.forwardRef)(Ki);n.p;var Ni,Vi=["title","titleId"];function zi(){return zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Hi=function(e,t){var n=e.title,r=e.titleId,o=Bi(e,Vi);return m.createElement("svg",zi({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?m.createElement("title",{id:r},n):null,Ni||(Ni=m.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"})))},Fi=(0,m.forwardRef)(Hi);n.p;n.p;var Wi,$i,Ui,Zi=["title","titleId"];function Gi(){return Gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Xi=function(e,t){var n=e.title,r=e.titleId,o=Yi(e,Zi);return m.createElement("svg",Gi({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?m.createElement("title",{id:r},n):null,Wi||(Wi=m.createElement("rect",{x:2,y:5,width:20,height:14,rx:1.5,fill:"white",stroke:"black",strokeWidth:2})),$i||($i=m.createElement("path",{d:"M1 11H23V18H1V11Z",fill:"black",fillOpacity:.15})),Ui||(Ui=m.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"})))},qi=(0,m.forwardRef)(Xi);n.p;var Ji,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 m.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?m.createElement("title",{id:r},n):null,Ji||(Ji=m.createElement("rect",{x:2,y:5,width:20,height:14,rx:1.5,fill:"white",stroke:"black",strokeWidth:2})),Qi||(Qi=m.createElement("path",{d:"M1 11H23V18H1V11Z",fill:"black",fillOpacity:.15})),ea||(ea=m.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"})))},ia=(0,m.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 m.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?m.createElement("title",{id:r},n):null,aa||(aa=m.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"})),sa||(sa=m.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"})))},ha=(0,m.forwardRef)(ua);n.p;var ga,ma,pa=["title","titleId"];function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ya=function(e,t){var n=e.title,r=e.titleId,o=va(e,pa);return m.createElement("svg",fa({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?m.createElement("title",{id:r},n):null,ga||(ga=m.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"})),ma||(ma=m.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"})))},ba=(0,m.forwardRef)(ya);n.p;var xa,wa=["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 ja=function(e,t){var n=e.title,r=e.titleId,o=Sa(e,wa);return m.createElement("svg",Ca({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?m.createElement("title",{id:r},n):null,xa||(xa=m.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})))},ka=(0,m.forwardRef)(ja);n.p;var Oa,Ra=["title","titleId"];function Ea(){return Ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Aa=function(e,t){var n=e.title,r=e.titleId,o=_a(e,Ra);return m.createElement("svg",Ea({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?m.createElement("title",{id:r},n):null,Oa||(Oa=m.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})))},Ta=(0,m.forwardRef)(Aa);n.p;var Pa,Ia=["title","titleId"];function La(){return La=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ka=function(e,t){var n=e.title,r=e.titleId,o=Ma(e,Ia);return m.createElement("svg",La({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?m.createElement("title",{id:r},n):null,Pa||(Pa=m.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})))},Da=(0,m.forwardRef)(Ka);n.p;var Na,Va=["title","titleId"];function za(){return za=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ha=function(e,t){var n=e.title,r=e.titleId,o=Ba(e,Va);return m.createElement("svg",za({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?m.createElement("title",{id:r},n):null,Na||(Na=m.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})))},Fa=(0,m.forwardRef)(Ha);n.p;var Wa,$a=["title","titleId"];function Ua(){return Ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ga=function(e,t){var n=e.title,r=e.titleId,o=Za(e,$a);return m.createElement("svg",Ua({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?m.createElement("title",{id:r},n):null,Wa||(Wa=m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 15.5C5 15.2239 4.77614 15 4.5 15H3.5C3.22386 15 3 15.2239 3 15.5V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H8.5C8.77614 21 9 20.7761 9 20.5V19.5C9 19.2239 8.77614 19 8.5 19H5.5C5.22386 19 5 18.7761 5 18.5V15.5ZM8.5 5C8.77614 5 9 4.77614 9 4.5V3.5C9 3.22386 8.77614 3 8.5 3H5C4.46957 3 3.96086 3.21071 3.58579 3.58579C3.21071 3.96086 3 4.46957 3 5V8.5C3 8.77614 3.22386 9 3.5 9H4.5C4.77614 9 5 8.77614 5 8.5V5.5C5 5.22386 5.22386 5 5.5 5H8.5ZM19 8.5C19 8.77614 19.2239 9 19.5 9H20.5C20.7761 9 21 8.77614 21 8.5V5C21 3.89 20.1 3 19 3H15.5C15.2239 3 15 3.22386 15 3.5V4.5C15 4.77614 15.2239 5 15.5 5H18.5C18.7761 5 19 5.22386 19 5.5V8.5ZM15.5 19C15.2239 19 15 19.2239 15 19.5V20.5C15 20.7761 15.2239 21 15.5 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V15.5C21 15.2239 20.7761 15 20.5 15H19.5C19.2239 15 19 15.2239 19 15.5V18.5C19 18.7761 18.7761 19 18.5 19H15.5ZM14.6875 12.5818C15.1042 12.3232 15.1042 11.6768 14.6875 11.4182L10.9375 9.09101C10.5208 8.83243 10 9.15565 10 9.67281V14.3272C10 14.8443 10.5208 15.1676 10.9375 14.909L14.6875 12.5818Z",fill:"currentColor"})))},Ya=(0,m.forwardRef)(Ga);n.p;const Xa=kr(),qa=(e,t)=>{const n=(0,m.useRef)(null),r=(0,m.useRef)(t),o=(0,m.useRef)(((e,t)=>{null==r.current||r.current(e,t)}));(0,m.useEffect)((()=>{var t;e!==n.current&&(e?(((e,t)=>{kr.keymap[e]?Xa.overwriteNamed(e,t):Xa.overwriteKey(e,t)})(e,o.current),n.current=e):n.current&&!e&&(t=n.current,kr.keymap[t]?Xa.removeNamed(t):Xa.removeKey(t),n.current=null))}),[e]),(0,m.useEffect)((()=>{r.current=t}),[t])},Ja=["children","type","extra","className","size","waiting","icon","tag","look","primary","danger","hotkey","tooltip","tooltipTheme","nopadding"],Qa=(0,m.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:p,tooltipTheme:f="light",nopadding:v}=e,y=(0,nr.A)(e,Ja);const b=null!=c?c:y.href?"a":"button",w={size:a,waiting:s,type:r,danger:h,nopadding:v,look:null!=d?d:[],withIcon:!!l,withExtra:!!o};u&&(w.look="primary");const C=(0,m.useMemo)((()=>{if(!l)return null;if((0,x.isDefined)(l.props.size))return l;switch(a){case"small":return(0,m.cloneElement)(l,Object.assign({},l.props,{size:12,width:12,height:12}));case"compact":return(0,m.cloneElement)(l,Object.assign({},l.props,{size:14,width:14,height:14}));default:return l}}),[l,a]);qa(g,y.onClick);const S=(0,E.jsx)(Qe.eB,Object.assign({name:"button",mod:w,mix:i,ref:t,tag:b,type:r},y,{children:(0,E.jsxs)(E.Fragment,{children:[C&&(0,E.jsx)(Qe.Sl,{tag:"span",name:"icon",children:C}),C&&n?(0,E.jsx)("span",{children:n}):n,void 0!==o?(0,E.jsx)(Qe.Sl,{name:"extra",children:o}):null]})}));return g&&(0,x.isDefined)(kr.keymap[g])?(0,E.jsx)(kr.Tooltip,{name:g,title:p,children:S}):p?(0,E.jsx)(hr,{title:p,theme:f,ref:t,children:S}):S}));Qa.displayName="Button";Qa.Group=({className:e,children:t,collapsed:n})=>(0,E.jsx)(Qe.eB,{name:"button-group",mod:{collapsed:n},mix:e,children:t});const es=["direction","size","className","style","children","spread","stretch","align","collapsed","truncated"],{Block:ts}=(0,Qe.JE)(),ns=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,nr.A)(e,es);return(0,E.jsx)(ts,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}))},rs=({position:e=0,length:t=0,onPositionChange:n})=>{const[r,o]=(0,m.useState)(!1),i=(0,m.useMemo)((()=>t-1),[t]);return(0,E.jsx)(Qe.eB,{name:"frames-control",onClick:()=>o(!0),children:r?(0,E.jsx)(is,{length:i,position:e,onChange:e=>{null==n||n((0,x.clamp)(e,0,t))},onFinishEditing:()=>{o(!1)}}):(0,E.jsxs)(E.Fragment,{children:[(0,x.clamp)(Math.round(e+1),1,i+1)," ",(0,E.jsxs)("span",{children:["of ",i+1]})]})})},os=["ArrowUp","ArrowDown","Backspace","Delete","Enter",/[0-9]/],is=({length:e,position:t,onChange:n,onFinishEditing:r})=>{const o=(0,m.useRef)(),i=t=>{null==n||n((0,x.clamp)(t,1,e))};return(0,E.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=os.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,x.clamp)(a+s,1,e).toString(),t.preventDefault()):"ArrowDown"===n&&(o.current.value=(0,x.clamp)(a-s,1,e).toString(),t.preventDefault())},onBlur:()=>null==r?void 0:r()})};var as,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 m.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?m.createElement("title",{id:r},n):null,as||(as=m.createElement("path",{d:"M15 24H19C21.7614 24 24 21.7614 24 19V19C24 16.2386 21.7614 14 19 14H13",stroke:"currentColor",strokeWidth:2})),ss||(ss=m.createElement("path",{d:"M16 10L12 14L16 18",stroke:"currentColor",strokeWidth:2})))},hs=(0,m.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 m.createElement("svg",fs({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?m.createElement("title",{id:r},n):null,gs||(gs=m.createElement("path",{d:"M21 24H17C14.2386 24 12 21.7614 12 19V19C12 16.2386 14.2386 14 17 14H23",stroke:"currentColor",strokeWidth:2})),ms||(ms=m.createElement("path",{d:"M20 10L24 14L20 18",stroke:"currentColor",strokeWidth:2})))},bs=(0,m.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 m.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?m.createElement("title",{id:r},n):null,xs||(xs=m.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"})))},ks=(0,m.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 m.createElement("svg",_s({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?m.createElement("title",{id:r},n):null,Os||(Os=m.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"})),Rs||(Rs=m.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"})))},Ps=(0,m.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 m.createElement("svg",Ms({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?m.createElement("title",{id:r},n):null,Is||(Is=m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0V6H14V8H8V14H6V8H0V6H6V0H8Z",fill:"currentColor"})))},Ns=(0,m.forwardRef)(Ds);n.p;var Vs,zs,Bs=["title","titleId"];function Hs(){return Hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ws=function(e,t){var n=e.title,r=e.titleId,o=Fs(e,Bs);return m.createElement("svg",Hs({viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Vs||(Vs=m.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"})),zs||(zs=m.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"})))},$s=(0,m.forwardRef)(Ws);n.p;var 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 m.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?m.createElement("title",{id:r},n):null,Us||(Us=m.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"})))},qs=(0,m.forwardRef)(Xs);n.p;var Js,Qs=["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 nl=function(e,t){var n=e.title,r=e.titleId,o=tl(e,Qs);return m.createElement("svg",el({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?m.createElement("title",{id:r},n):null,Js||(Js=m.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"})))},rl=(0,m.forwardRef)(nl);n.p;var ol,il,al=["title","titleId"];function sl(){return sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var cl=function(e,t){var n=e.title,r=e.titleId,o=ll(e,al);return m.createElement("svg",sl({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?m.createElement("title",{id:r},n):null,ol||(ol=m.createElement("rect",{width:20,height:20,rx:4,fill:"#5CDBD3",fillOpacity:.18})),il||(il=m.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"})))},dl=(0,m.forwardRef)(cl);n.p;var ul,hl,gl=["title","titleId"];function ml(){return ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var fl=function(e,t){var n=e.title,r=e.titleId,o=pl(e,gl);return m.createElement("svg",ml({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?m.createElement("title",{id:r},n):null,ul||(ul=m.createElement("rect",{width:20,height:20,rx:4,fill:"#FF85C0",fillOpacity:.18})),hl||(hl=m.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"})))},vl=(0,m.forwardRef)(fl);n.p;n.p;n.p;n.p;var yl,bl,xl,wl,Cl=["title","titleId"];function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var kl=function(e,t){var n=e.title,r=e.titleId,o=jl(e,Cl);return m.createElement("svg",Sl({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?m.createElement("title",{id:r},n):null,yl||(yl=m.createElement("path",{d:"M13 21H25V23H13V21Z",fill:"currentColor"})),bl||(bl=m.createElement("path",{d:"M11 13H23V15H11V13Z",fill:"currentColor"})),xl||(xl=m.createElement("rect",{x:10.5,y:19.5,width:5,height:5,rx:2.5,fill:"currentColor"})),wl||(wl=m.createElement("rect",{x:20.5,y:11.5,width:5,height:5,rx:2.5,fill:"currentColor"})))},Ol=(0,m.forwardRef)(kl);n.p;var Rl,El=["title","titleId"];function _l(){return _l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Tl=function(e,t){var n=e.title,r=e.titleId,o=Al(e,El);return m.createElement("svg",_l({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?m.createElement("title",{id:r},n):null,Rl||(Rl=m.createElement("path",{d:"M0 14V16H6V14H0ZM0 2V4H10V2H0ZM10 18V16H18V14H10V12H8V18H10ZM4 6V8H0V10H4V12H6V6H4ZM18 10V8H8V10H18ZM12 6H14V4H18V2H14V0H12V6Z",fill:"currentColor"})))},Pl=(0,m.forwardRef)(Tl);n.p;var Il,Ll=["title","titleId"];function Ml(){return Ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Dl=function(e,t){var n=e.title,r=e.titleId,o=Kl(e,Ll);return m.createElement("svg",Ml({viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Il||(Il=m.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"})))},Nl=(0,m.forwardRef)(Dl);n.p;var Vl,zl=["title","titleId"];function Bl(){return Bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fl=function(e,t){var n=e.title,r=e.titleId,o=Hl(e,zl);return m.createElement("svg",Bl({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?m.createElement("title",{id:r},n):null,Vl||(Vl=m.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"})))},Wl=(0,m.forwardRef)(Fl);n.p;var $l,Ul,Zl,Gl=["title","titleId"];function Yl(){return Yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ql=function(e,t){var n=e.title,r=e.titleId,o=Xl(e,Gl);return m.createElement("svg",Yl({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?m.createElement("title",{id:r},n):null,$l||($l=m.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Ul||(Ul=m.createElement("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:3,y:3,width:14,height:14},m.createElement("rect",{x:3.5,y:3.5,width:13,height:13,rx:6.5,fill:"#fff"}))),Zl||(Zl=m.createElement("g",{mask:"url(#mask0)"},m.createElement("rect",{x:3.5,y:3.5,width:13,height:13,rx:6.5,fill:"currentColor",fillOpacity:.3}),m.createElement("rect",{x:4.5,y:4.5,width:11,height:11,rx:5.5,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2}),m.createElement("path",{d:"M5 5L15 15",stroke:"currentColor",strokeWidth:2}))))},Jl=(0,m.forwardRef)(ql);n.p;var Ql,ec=["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 rc=function(e,t){var n=e.title,r=e.titleId,o=nc(e,ec);return m.createElement("svg",tc({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Ql||(Ql=m.createElement("g",{opacity:.25},m.createElement("circle",{cx:12,cy:13,r:3,stroke:"black",strokeWidth:2}),m.createElement("path",{d:"M4 12C4 12 7 7 12 7C17 7 20 12 20 12",stroke:"black",strokeWidth:2,strokeLinecap:"square"}))))},oc=(0,m.forwardRef)(rc);n.p;var ic,ac,sc,lc,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 m.createElement("svg",hc({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,ic||(ic=m.createElement("path",{d:"M20.5 12.5L18 10",stroke:"black",strokeWidth:2})),ac||(ac=m.createElement("path",{d:"M17 15L15.5 12",stroke:"black",strokeWidth:2})),sc||(sc=m.createElement("path",{d:"M12 16V13",stroke:"black",strokeWidth:2})),lc||(lc=m.createElement("path",{d:"M7 15L8.5 12",stroke:"black",strokeWidth:2})),cc||(cc=m.createElement("path",{d:"M3.5 12.5L6 10",stroke:"black",strokeWidth:2})),dc||(dc=m.createElement("path",{d:"M4 8C4 8 7 13 12 13C17 13 20 8 20 8",stroke:"black",strokeWidth:2,strokeLinecap:"square"})))},pc=(0,m.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 m.createElement("svg",yc({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?m.createElement("title",{id:r},n):null,fc||(fc=m.createElement("path",{d:"M7 15L12 10L17 15",strokeWidth:2})))},wc=(0,m.forwardRef)(xc);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 m.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?m.createElement("title",{id:r},n):null,Cc||(Cc=m.createElement("path",{d:"M8 14L12 18L16 14",stroke:"black",strokeWidth:2})),Sc||(Sc=m.createElement("path",{d:"M8 10L12 6L16 10",stroke:"black",strokeWidth:2})))},Ec=(0,m.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 m.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?m.createElement("title",{id:r},n):null,_c||(_c=m.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"})))},Lc=(0,m.forwardRef)(Ic);n.p;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 m.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?m.createElement("title",{id:r},n):null,Mc||(Mc=m.createElement("path",{d:"M8 18L12 14L16 18",stroke:"black",strokeWidth:2})),Kc||(Kc=m.createElement("path",{d:"M8 6L12 10L16 6",stroke:"black",strokeWidth:2})))},Bc=(0,m.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 m.createElement("svg",Wc({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?m.createElement("title",{id:r},n):null,Hc||(Hc=m.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"})))},Zc=(0,m.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 m.createElement("svg",qc({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?m.createElement("title",{id:r},n):null,Gc||(Gc=m.createElement("rect",{x:6,y:6,width:12,height:12,rx:2,stroke:"currentColor",strokeWidth:2})),Yc||(Yc=m.createElement("rect",{x:9,y:8,width:6,height:2,rx:1,fill:"currentColor"})))},ed=(0,m.forwardRef)(Qc);n.p;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 m.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?m.createElement("title",{id:r},n):null,td||(td=m.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"})))},ad=(0,m.forwardRef)(id);n.p;var sd,ld,cd=["title","titleId"];function dd(){return dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hd=function(e,t){var n=e.title,r=e.titleId,o=ud(e,cd);return m.createElement("svg",dd({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?m.createElement("title",{id:r},n):null,sd||(sd=m.createElement("g",{opacity:.4},m.createElement("rect",{width:28,height:28,rx:14,fill:"white"}),m.createElement("rect",{x:.5,y:.5,width:27,height:27,rx:13.5,stroke:"currentColor",strokeOpacity:.5,strokeDasharray:"2 2"}))),ld||(ld=m.createElement("g",{opacity:.6},m.createElement("path",{d:"M13 6H15V22H13V6Z",fill:"currentColor"}),m.createElement("path",{d:"M6 13H22V15H6V13Z",fill:"currentColor"}))))},gd=(0,m.forwardRef)(hd);n.p;var md,pd,fd,vd,yd,bd=["title","titleId"];function xd(){return xd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=wd(e,bd);return m.createElement("svg",xd({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?m.createElement("title",{id:r},n):null,md||(md=m.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"})),pd||(pd=m.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"})),fd||(fd=m.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"})),vd||(vd=m.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"})),yd||(yd=m.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"})))},Sd=(0,m.forwardRef)(Cd);n.p;var jd,kd,Od,Rd,Ed,_d=["title","titleId"];function Ad(){return Ad=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Pd=function(e,t){var n=e.title,r=e.titleId,o=Td(e,_d);return m.createElement("svg",Ad({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?m.createElement("title",{id:r},n):null,jd||(jd=m.createElement("path",{d:"M17 20H13V18H15C16.1046 18 17 18.8954 17 20Z",fill:"currentColor"})),kd||(kd=m.createElement("circle",{cx:6.5,cy:18,r:2,fill:"currentColor"})),Od||(Od=m.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"})),Rd||(Rd=m.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"})),Ed||(Ed=m.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"})))},Id=(0,m.forwardRef)(Pd);n.p;var Ld,Md=["title","titleId"];function Kd(){return Kd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Nd=function(e,t){var n=e.title,r=e.titleId,o=Dd(e,Md);return m.createElement("svg",Kd({viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Ld||(Ld=m.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"})))},Vd=(0,m.forwardRef)(Nd);n.p;var zd,Bd=["title","titleId"];function Hd(){return Hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wd=function(e,t){var n=e.title,r=e.titleId,o=Fd(e,Bd);return m.createElement("svg",Hd({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,zd||(zd=m.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"})))},$d=(0,m.forwardRef)(Wd);n.p;var 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 m.createElement("svg",Gd({viewBox:"0 0 20 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Ud||(Ud=m.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"})))},qd=(0,m.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 m.createElement("svg",eu({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?m.createElement("title",{id:r},n):null,Jd||(Jd=m.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"})))},ru=(0,m.forwardRef)(nu);n.p;var ou,iu,au=["title","titleId"];function su(){return su=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var cu=function(e,t){var n=e.title,r=e.titleId,o=lu(e,au);return m.createElement("svg",su({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?m.createElement("title",{id:r},n):null,ou||(ou=m.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"})),iu||(iu=m.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"})))},du=(0,m.forwardRef)(cu);n.p;var uu,hu=["title","titleId"];function gu(){return gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var pu=function(e,t){var n=e.title,r=e.titleId,o=mu(e,hu);return m.createElement("svg",gu({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?m.createElement("title",{id:r},n):null,uu||(uu=m.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"})))},fu=(0,m.forwardRef)(pu);n.p;var 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 m.createElement("svg",bu({viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,vu||(vu=m.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,m.forwardRef)(wu);n.p;n.p;var Su,ju=["title","titleId"];function ku(){return ku=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ru=function(e,t){var n=e.title,r=e.titleId,o=Ou(e,ju);return m.createElement("svg",ku({viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Su||(Su=m.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})))},Eu=(0,m.forwardRef)(Ru);n.p;n.p;n.p;n.p;n.p;var _u,Au,Tu=["title","titleId"];function Pu(){return Pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=Iu(e,Tu);return m.createElement("svg",Pu({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?m.createElement("title",{id:r},n):null,_u||(_u=m.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"})),Au||(Au=m.createElement("path",{d:"M2 5.5L17 16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})))},Mu=(0,m.forwardRef)(Lu);n.p;var Ku,Du,Nu=["title","titleId"];function Vu(){return Vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bu=function(e,t){var n=e.title,r=e.titleId,o=zu(e,Nu);return m.createElement("svg",Vu({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?m.createElement("title",{id:r},n):null,Ku||(Ku=m.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"})),Du||(Du=m.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"})))},Hu=(0,m.forwardRef)(Bu);n.p;var Fu,Wu,$u,Uu=["title","titleId"];function Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Yu=function(e,t){var n=e.title,r=e.titleId,o=Gu(e,Uu);return m.createElement("svg",Zu({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?m.createElement("title",{id:r},n):null,Fu||(Fu=m.createElement("path",{d:"M18 6C18 6 21 8 21 12C21 16 18 18 18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Wu||(Wu=m.createElement("path",{d:"M16 8C16 8 18 9.5 18 12C18 14.5 16 16 16 16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),$u||($u=m.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"})))},Xu=(0,m.forwardRef)(Yu);n.p;var qu,Ju,Qu=["title","titleId"];function eh(){return eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var nh=function(e,t){var n=e.title,r=e.titleId,o=th(e,Qu);return m.createElement("svg",eh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,qu||(qu=m.createElement("defs",null,m.createElement("linearGradient",{id:"paint0_linear",x1:10.4999,y1:10,x2:28.9999,y2:27,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopOpacity:.8,stopColor:"var(--text-color-hover)"}),m.createElement("stop",{offset:1,stopOpacity:.4,stopColor:"var(--text-color-hover)"})))),Ju||(Ju=m.createElement("g",{opacity:.5},m.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)"}))))},rh=(0,m.forwardRef)(nh);n.p;var oh,ih,ah,sh=["title","titleId"];function lh(){return lh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var dh=function(e,t){var n=e.title,r=e.titleId,o=ch(e,sh);return m.createElement("svg",lh({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,oh||(oh=m.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)"})),ih||(ih=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),ah||(ah=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:.541016,y:10.5414,width:14.9172,height:14.9172,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("linearGradient",{id:"paint0_linear",x1:11.4999,y1:10,x2:29.9999,y2:27,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopColor:"#7F64FF",stopOpacity:.8}),m.createElement("stop",{offset:1,stopColor:"#7F64FF",stopOpacity:.4})))))},uh=(0,m.forwardRef)(dh);n.p;var hh,gh,mh,ph=["title","titleId"];function fh(){return fh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var yh=function(e,t){var n=e.title,r=e.titleId,o=vh(e,ph);return m.createElement("svg",fh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,hh||(hh=m.createElement("rect",{opacity:.4,x:5,y:5,width:22,height:22,rx:11,fill:"currentColor"})),gh||(gh=m.createElement("g",{filter:"url(#filter0_d)"},m.createElement("rect",{x:13.5,y:13.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),mh||(mh=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:10.5,y:11.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},bh=(0,m.forwardRef)(yh);n.p;var xh,wh,Ch,Sh=["title","titleId"];function jh(){return jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Oh=function(e,t){var n=e.title,r=e.titleId,o=kh(e,Sh);return m.createElement("svg",jh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,xh||(xh=m.createElement("rect",{opacity:.6,x:5,y:5,width:22,height:22,rx:11,fill:"#7F64FF"})),wh||(wh=m.createElement("g",{filter:"url(#filter0_d)"},m.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=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:8.54102,y:9.54144,width:14.9172,height:14.9172,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Rh=(0,m.forwardRef)(Oh);n.p;var Eh,_h,Ah,Th=["title","titleId"];function Ph(){return Ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Lh=function(e,t){var n=e.title,r=e.titleId,o=Ih(e,Th);return m.createElement("svg",Ph({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Eh||(Eh=m.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"})),_h||(_h=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),Ah||(Ah=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:3.5,y:4.5,width:23,height:25,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Mh=(0,m.forwardRef)(Lh);n.p;var Kh,Dh,Nh,Vh,zh,Bh=["title","titleId"];function Hh(){return Hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=Fh(e,Bh);return m.createElement("svg",Hh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Kh||(Kh=m.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"})),Dh||(Dh=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),Nh||(Nh=m.createElement("g",{filter:"url(#filter1_d)"},m.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"}))),Vh||(Vh=m.createElement("g",{filter:"url(#filter2_d)"},m.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"}))),zh||(zh=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:14.8691,y:17.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:14.8691,y:3.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter2_d",x:2.86914,y:10.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},$h=(0,m.forwardRef)(Wh);n.p;var Uh,Zh,Gh,Yh,Xh,qh=["title","titleId"];function Jh(){return Jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var eg=function(e,t){var n=e.title,r=e.titleId,o=Qh(e,qh);return m.createElement("svg",Jh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Uh||(Uh=m.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"})),Zh||(Zh=m.createElement("g",{filter:"url(#filter0_d)"},m.createElement("rect",{x:21.5,y:5.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),Gh||(Gh=m.createElement("g",{filter:"url(#filter1_d)"},m.createElement("rect",{x:5.5,y:5.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),Yh||(Yh=m.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"})),Xh||(Xh=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:18.5,y:3.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:2.5,y:3.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},tg=(0,m.forwardRef)(eg);n.p;var ng,rg,og,ig,ag,sg=["title","titleId"];function lg(){return lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var dg=function(e,t){var n=e.title,r=e.titleId,o=cg(e,sg);return m.createElement("svg",lg({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,ng||(ng=m.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"})),rg||(rg=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),og||(og=m.createElement("g",{filter:"url(#filter1_d)"},m.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"}))),ig||(ig=m.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"})),ag||(ag=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:17.8691,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:1.86914,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},ug=(0,m.forwardRef)(dg);n.p;var hg,gg,mg,pg,fg=["title","titleId"];function vg(){return vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var bg=function(e,t){var n=e.title,r=e.titleId,o=yg(e,fg);return m.createElement("svg",vg({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,hg||(hg=m.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"})),gg||(gg=m.createElement("g",{filter:"url(#filter0_d)"},m.createElement("rect",{x:23,y:21,width:5,height:5,rx:2.5,fill:"currentColor"}))),mg||(mg=m.createElement("g",{filter:"url(#filter1_d)"},m.createElement("rect",{x:4,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),pg||(pg=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:20,y:19,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:1,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},xg=(0,m.forwardRef)(bg);n.p;var wg,Cg,Sg,jg,kg=["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 Eg=function(e,t){var n=e.title,r=e.titleId,o=Rg(e,kg);return m.createElement("svg",Og({viewBox:"0 0 34 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,wg||(wg=m.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=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),Sg||(Sg=m.createElement("g",{filter:"url(#filter1_d)"},m.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"}))),jg||(jg=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:20.8691,y:18.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},_g=(0,m.forwardRef)(Eg);n.p;var Ag,Tg,Pg,Ig,Lg,Mg=["title","titleId"];function Kg(){return Kg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ng=function(e,t){var n=e.title,r=e.titleId,o=Dg(e,Mg);return m.createElement("svg",Kg({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Ag||(Ag=m.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"})),Tg||(Tg=m.createElement("g",{filter:"url(#filter0_d)"},m.createElement("rect",{x:23,y:21,width:5,height:5,rx:2.5,fill:"currentColor"}))),Pg||(Pg=m.createElement("g",{filter:"url(#filter1_d)"},m.createElement("rect",{x:4,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),Ig||(Ig=m.createElement("g",{filter:"url(#filter2_d)"},m.createElement("rect",{x:23,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),Lg||(Lg=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:20,y:19,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:1,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter2_d",x:20,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Vg=(0,m.forwardRef)(Ng);n.p;var zg,Bg,Hg,Fg,Wg,$g=["title","titleId"];function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Gg=function(e,t){var n=e.title,r=e.titleId,o=Zg(e,$g);return m.createElement("svg",Ug({viewBox:"0 0 34 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,zg||(zg=m.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"})),Bg||(Bg=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),Hg||(Hg=m.createElement("g",{filter:"url(#filter1_d)"},m.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"}))),Fg||(Fg=m.createElement("g",{filter:"url(#filter2_d)"},m.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"}))),Wg||(Wg=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:20.8691,y:18.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter1_d",x:.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("filter",{id:"filter2_d",x:20.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Yg=(0,m.forwardRef)(Gg);n.p;var Xg,qg,Jg=["title","titleId"];function Qg(){return Qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var tm=function(e,t){var n=e.title,r=e.titleId,o=em(e,Jg);return m.createElement("svg",Qg({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?m.createElement("title",{id:r},n):null,Xg||(Xg=m.createElement("defs",null,m.createElement("linearGradient",{id:"paint0_linear",x1:10.4999,y1:10,x2:28.9999,y2:27,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopOpacity:.8,stopColor:"var(--text-color-hover)"}),m.createElement("stop",{offset:1,stopOpacity:.4,stopColor:"var(--text-color-hover)"})))),qg||(qg=m.createElement("g",{opacity:.5},m.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)"}))))},nm=(0,m.forwardRef)(tm);n.p;var rm,om,im,am=["title","titleId"];function sm(){return sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=lm(e,am);return m.createElement("svg",sm({viewBox:"0 0 33 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,rm||(rm=m.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)"})),om||(om=m.createElement("rect",{x:11.0722,y:12.6907,width:13.354,height:1.94005,transform:"rotate(45 11.0722 12.6907)",fill:"white"})),im||(im=m.createElement("defs",null,m.createElement("linearGradient",{id:"paint0_linear",x1:26.7953,y1:3.64455,x2:26.7953,y2:26.9253,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopColor:"#617ADA"}),m.createElement("stop",{offset:.572917,stopColor:"#617ADA"}),m.createElement("stop",{offset:.625,stopColor:"#FF2A2A"}),m.createElement("stop",{offset:1,stopColor:"#FF2A2A"})))))},dm=(0,m.forwardRef)(cm);n.p;var um,hm=["title","titleId"];function gm(){return gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var pm=function(e,t){var n=e.title,r=e.titleId,o=mm(e,hm);return m.createElement("svg",gm({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,um||(um=m.createElement("g",{opacity:.4},m.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"}),m.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"}),m.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"}),m.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"}),m.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"}),m.createElement("path",{d:"M7.0002 15.0001C9.50018 17.5 10.5002 25 15.4289 25.4",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round"}))))},fm=(0,m.forwardRef)(pm);n.p;var vm,ym=["title","titleId"];function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var wm=function(e,t){var n=e.title,r=e.titleId,o=xm(e,ym);return m.createElement("svg",bm({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,vm||(vm=m.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,m.forwardRef)(wm);n.p;var Sm,jm=["title","titleId"];function km(){return km=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Rm=function(e,t){var n=e.title,r=e.titleId,o=Om(e,jm);return m.createElement("svg",km({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Sm||(Sm=m.createElement("g",{opacity:.4},m.createElement("mask",{id:"path-1-inside-1",fill:"white"},m.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"})),m.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"}),m.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)"}))))},Em=(0,m.forwardRef)(Rm);n.p;var _m,Am,Tm,Pm=["title","titleId"];function Im(){return Im=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=Lm(e,Pm);return m.createElement("svg",Im({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?m.createElement("title",{id:r},n):null,_m||(_m=m.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"})),Am||(Am=m.createElement("rect",{x:11,y:12,width:6,height:2,rx:.5,fill:"currentColor"})),Tm||(Tm=m.createElement("rect",{x:13,y:10,width:2,height:6,rx:.5,fill:"currentColor"})))},Km=(0,m.forwardRef)(Mm);n.p;var Dm,Nm,Vm=["title","titleId"];function zm(){return zm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Hm=function(e,t){var n=e.title,r=e.titleId,o=Bm(e,Vm);return m.createElement("svg",zm({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?m.createElement("title",{id:r},n):null,Dm||(Dm=m.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"})),Nm||(Nm=m.createElement("rect",{x:11,y:12,width:6,height:2,rx:.5,fill:"currentColor"})))},Fm=(0,m.forwardRef)(Hm);n.p;var Wm,$m,Um,Zm,Gm,Ym=["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 Jm=function(e,t){var n=e.title,r=e.titleId,o=qm(e,Ym);return m.createElement("svg",Xm({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?m.createElement("title",{id:r},n):null,Wm||(Wm=m.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"})),$m||($m=m.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"})),Um||(Um=m.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"})),Zm||(Zm=m.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"})),Gm||(Gm=m.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})))},Qm=(0,m.forwardRef)(Jm);n.p;var ep,tp,np,rp=["title","titleId"];function op(){return op=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ap=function(e,t){var n=e.title,r=e.titleId,o=ip(e,rp);return m.createElement("svg",op({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,ep||(ep=m.createElement("path",{opacity:.4,d:"M12.5 9.5L19.4 24",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round"})),tp||(tp=m.createElement("g",{filter:"url(#filter0_d)"},m.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"}))),np||(np=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:8,y:5.16357,width:17.6347,height:20.5406,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},sp=(0,m.forwardRef)(ap);n.p;var lp,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 m.createElement("svg",up({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,lp||(lp=m.createElement("g",{clipPath:"url(#clip0)"},m.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"}),m.createElement("path",{opacity:.4,d:"M6.00007 14C5.00007 9 9.00007 4 15.0001 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),m.createElement("g",{filter:"url(#filter0_d)"},m.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"})))),cp||(cp=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:-.0964355,y:10,width:12.1927,height:11.1972,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("clipPath",{id:"clip0"},m.createElement("rect",{width:32,height:32,fill:"white"})))))},mp=(0,m.forwardRef)(gp);n.p;var pp,fp,vp=["title","titleId"];function yp(){return yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var xp=function(e,t){var n=e.title,r=e.titleId,o=bp(e,vp);return m.createElement("svg",yp({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,pp||(pp=m.createElement("g",{clipPath:"url(#clip0)"},m.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"}),m.createElement("path",{opacity:.4,d:"M25.9999 14C26.9999 9 22.9999 4 16.9999 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),m.createElement("g",{filter:"url(#filter0_d)"},m.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"})))),fp||(fp=m.createElement("defs",null,m.createElement("filter",{id:"filter0_d",x:19.9036,y:10,width:12.1927,height:11.1972,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.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"}),m.createElement("feOffset",{dy:1}),m.createElement("feGaussianBlur",{stdDeviation:1.5}),m.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"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),m.createElement("clipPath",{id:"clip0"},m.createElement("rect",{width:32,height:32,fill:"white",transform:"matrix(-1 0 0 1 32 0)"})))))},wp=(0,m.forwardRef)(xp);n.p;var 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 m.createElement("svg",jp({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Cp||(Cp=m.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"})))},Rp=(0,m.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 m.createElement("svg",Ap({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Ep||(Ep=m.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"})))},Ip=(0,m.forwardRef)(Pp);n.p;var Lp,Mp,Kp=["title","titleId"];function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Vp=function(e,t){var n=e.title,r=e.titleId,o=Np(e,Kp);return m.createElement("svg",Dp({viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Lp||(Lp=m.createElement("rect",{x:14,y:14,width:12,height:12,rx:2,fill:"white",stroke:"currentColor",strokeWidth:2})),Mp||(Mp=m.createElement("rect",{x:10,y:10,width:12,height:12,rx:2,fill:"white",stroke:"currentColor",strokeWidth:2})))},zp=(0,m.forwardRef)(Vp);n.p;var Bp,Hp=["title","titleId"];function Fp(){return Fp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var $p=function(e,t){var n=e.title,r=e.titleId,o=Wp(e,Hp);return m.createElement("svg",Fp({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,Bp||(Bp=m.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"})))},Up=(0,m.forwardRef)($p);n.p;var Zp,Gp,Yp,Xp,qp=["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 ef=function(e,t){var n=e.title,r=e.titleId,o=Qp(e,qp);return m.createElement("svg",Jp({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?m.createElement("title",{id:r},n):null,Zp||(Zp=m.createElement("rect",{x:9,y:9,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Gp||(Gp=m.createElement("rect",{x:9,y:18.3334,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Yp||(Yp=m.createElement("rect",{x:18.333,y:9,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Xp||(Xp=m.createElement("rect",{x:18.333,y:18.3334,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})))},tf=(0,m.forwardRef)(ef);n.p;var nf,rf=["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 sf=function(e,t){var n=e.title,r=e.titleId,o=af(e,rf);return m.createElement("svg",of({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?m.createElement("title",{id:r},n):null,nf||(nf=m.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"})))},lf=(0,m.forwardRef)(sf);n.p;var cf,df=["title","titleId"];function uf(){return uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gf=function(e,t){var n=e.title,r=e.titleId,o=hf(e,df);return m.createElement("svg",uf({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?m.createElement("title",{id:r},n):null,cf||(cf=m.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"})))},mf=(0,m.forwardRef)(gf);n.p;var pf,ff=["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=yf(e,ff);return m.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?m.createElement("title",{id:r},n):null,pf||(pf=m.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"})))},xf=(0,m.forwardRef)(bf);n.p;var wf,Cf=["title","titleId"];function Sf(){return Sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var kf=function(e,t){var n=e.title,r=e.titleId,o=jf(e,Cf);return m.createElement("svg",Sf({viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?m.createElement("title",{id:r},n):null,wf||(wf=m.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"})))},Of=(0,m.forwardRef)(kf);n.p;var Rf,Ef,_f,Af=["title","titleId"];function Tf(){return Tf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var If=function(e,t){var n=e.title,r=e.titleId,o=Pf(e,Af);return m.createElement("svg",Tf({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?m.createElement("title",{id:r},n):null,Rf||(Rf=m.createElement("circle",{cx:9,cy:9,r:1.5,fill:"currentColor"})),Ef||(Ef=m.createElement("circle",{cx:3.75,cy:9,r:1.5,fill:"currentColor"})),_f||(_f=m.createElement("circle",{cx:14.25,cy:9,r:1.5,fill:"currentColor"})))},Lf=(0,m.forwardRef)(If);n.p;n.p;var Mf,Kf,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 m.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?m.createElement("title",{id:r},n):null,Mf||(Mf=m.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"})),Kf||(Kf=m.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"})),Df||(Df=m.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"})))},Hf=(0,m.forwardRef)(Bf);n.p;var Ff,Wf,$f=["title","titleId"];function Uf(){return Uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Gf=function(e,t){var n=e.title,r=e.titleId,o=Zf(e,$f);return m.createElement("svg",Uf({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?m.createElement("title",{id:r},n):null,Ff||(Ff=m.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"})),Wf||(Wf=m.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"})))},Yf=(0,m.forwardRef)(Gf);n.p;var Xf,qf=["title","titleId"];function Jf(){return Jf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ev=function(e,t){var n=e.title,r=e.titleId,o=Qf(e,qf);return m.createElement("svg",Jf({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?m.createElement("title",{id:r},n):null,Xf||(Xf=m.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"})))},tv=(0,m.forwardRef)(ev);n.p;var nv,rv=["title","titleId"];function ov(){return ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var av=function(e,t){var n=e.title,r=e.titleId,o=iv(e,rv);return m.createElement("svg",ov({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?m.createElement("title",{id:r},n):null,nv||(nv=m.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"})))},sv=(0,m.forwardRef)(av);n.p;var lv,cv=["title","titleId"];function dv(){return dv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hv=function(e,t){var n=e.title,r=e.titleId,o=uv(e,cv);return m.createElement("svg",dv({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?m.createElement("title",{id:r},n):null,lv||(lv=m.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"})))},gv=(0,m.forwardRef)(hv);n.p;var mv,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 m.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?m.createElement("title",{id:r},n):null,mv||(mv=m.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"})),pv||(pv=m.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"})),fv||(fv=m.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"})))},wv=(0,m.forwardRef)(xv);n.p;var Cv,Sv=["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 Ov=function(e,t){var n=e.title,r=e.titleId,o=kv(e,Sv);return m.createElement("svg",jv({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?m.createElement("title",{id:r},n):null,Cv||(Cv=m.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"})))},Rv=(0,m.forwardRef)(Ov);n.p;var Ev,_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 m.createElement("svg",Tv({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?m.createElement("title",{id:r},n):null,Ev||(Ev=m.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"})),_v||(_v=m.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"})))},Lv=(0,m.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 m.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?m.createElement("title",{id:r},n):null,Mv||(Mv=m.createElement("path",{d:"M16 11L12 7L8 11",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})),Kv||(Kv=m.createElement("path",{d:"M12 17L12 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})))},Bv=(0,m.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 m.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?m.createElement("title",{id:r},n):null,Hv||(Hv=m.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})))},Zv=(0,m.forwardRef)(Uv);n.p;var Gv,Yv,Xv=["title","titleId"];function qv(){return qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Qv=function(e,t){var n=e.title,r=e.titleId,o=Jv(e,Xv);return m.createElement("svg",qv({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?m.createElement("title",{id:r},n):null,Gv||(Gv=m.createElement("path",{d:"M8 13L12 17L16 13",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})),Yv||(Yv=m.createElement("path",{d:"M12 7V16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})))},ey=(0,m.forwardRef)(Qv);n.p;var ty,ny=["title","titleId"];function ry(){return ry=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var iy=function(e,t){var n=e.title,r=e.titleId,o=oy(e,ny);return m.createElement("svg",ry({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?m.createElement("title",{id:r},n):null,ty||(ty=m.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"})))},ay=(0,m.forwardRef)(iy);n.p;n.p;n.p;n.p;var sy,ly=["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 uy=function(e,t){var n=e.title,r=e.titleId,o=dy(e,ly);return m.createElement("svg",cy({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?m.createElement("title",{id:r},n):null,sy||(sy=m.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"})))},hy=(0,m.forwardRef)(uy);n.p;var gy,my=["title","titleId"];function py(){return py=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var vy=function(e,t){var n=e.title,r=e.titleId,o=fy(e,my);return m.createElement("svg",py({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?m.createElement("title",{id:r},n):null,gy||(gy=m.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"})))},yy=(0,m.forwardRef)(vy);n.p;var by,xy=["title","titleId"];function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Sy=function(e,t){var n=e.title,r=e.titleId,o=Cy(e,xy);return m.createElement("svg",wy({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?m.createElement("title",{id:r},n):null,by||(by=m.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"})))},jy=(0,m.forwardRef)(Sy);n.p;var ky,Oy=["title","titleId"];function Ry(){return Ry=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _y=function(e,t){var n=e.title,r=e.titleId,o=Ey(e,Oy);return m.createElement("svg",Ry({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?m.createElement("title",{id:r},n):null,ky||(ky=m.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"})))},Ay=(0,m.forwardRef)(_y);n.p;var Ty,Py=["title","titleId"];function Iy(){return Iy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var My=function(e,t){var n=e.title,r=e.titleId,o=Ly(e,Py);return m.createElement("svg",Iy({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?m.createElement("title",{id:r},n):null,Ty||(Ty=m.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"})))},Ky=(0,m.forwardRef)(My);n.p;var Dy,Ny,Vy,zy=["title","titleId"];function By(){return By=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fy=function(e,t){var n=e.title,r=e.titleId,o=Hy(e,zy);return m.createElement("svg",By({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?m.createElement("title",{id:r},n):null,Dy||(Dy=m.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"})),Ny||(Ny=m.createElement("circle",{r:2.69819,transform:"matrix(1 0 0 -1 21.3018 12)",fill:"currentColor"})),Vy||(Vy=m.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"})))},Wy=(0,m.forwardRef)(Fy);n.p;var $y,Uy,Zy,Gy=["title","titleId"];function Yy(){return Yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qy=function(e,t){var n=e.title,r=e.titleId,o=Xy(e,Gy);return m.createElement("svg",Yy({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?m.createElement("title",{id:r},n):null,$y||($y=m.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"})),Uy||(Uy=m.createElement("circle",{cx:21.3018,cy:38,r:2.69819,fill:"currentColor"})),Zy||(Zy=m.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"})))},Jy=(0,m.forwardRef)(qy);n.p;var Qy,eb,tb,nb=["title","titleId"];function rb(){return rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ib=function(e,t){var n=e.title,r=e.titleId,o=ob(e,nb);return m.createElement("svg",rb({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?m.createElement("title",{id:r},n):null,Qy||(Qy=m.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"})),eb||(eb=m.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"})),tb||(tb=m.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"})))},ab=(0,m.forwardRef)(ib);n.p;var sb,lb,cb,db=["title","titleId"];function ub(){return ub=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gb=function(e,t){var n=e.title,r=e.titleId,o=hb(e,db);return m.createElement("svg",ub({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?m.createElement("title",{id:r},n):null,sb||(sb=m.createElement("path",{d:"M2 2H3V10H2V2Z",fill:"currentColor"})),lb||(lb=m.createElement("path",{d:"M2 9H10V10H2V9Z",fill:"currentColor"})),cb||(cb=m.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"})))},mb=(0,m.forwardRef)(gb);n.p;var pb,fb,vb,yb=["title","titleId"];function bb(){return bb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var wb=function(e,t){var n=e.title,r=e.titleId,o=xb(e,yb);return m.createElement("svg",bb({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?m.createElement("title",{id:r},n):null,pb||(pb=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.3})),fb||(fb=m.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"})),vb||(vb=m.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"})))},Cb=(0,m.forwardRef)(wb);n.p;var Sb,jb,kb,Ob=["title","titleId"];function Rb(){return Rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _b=function(e,t){var n=e.title,r=e.titleId,o=Eb(e,Ob);return m.createElement("svg",Rb({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?m.createElement("title",{id:r},n):null,Sb||(Sb=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),jb||(jb=m.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"})),kb||(kb=m.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"})))},Ab=(0,m.forwardRef)(_b);n.p;var Tb,Pb,Ib,Lb,Mb,Kb,Db,Nb=["title","titleId"];function Vb(){return Vb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bb=function(e,t){var n=e.title,r=e.titleId,o=zb(e,Nb);return m.createElement("svg",Vb({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?m.createElement("title",{id:r},n):null,Tb||(Tb=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),Pb||(Pb=m.createElement("rect",{x:7,y:7,width:10,height:10,fill:"currentColor",fillOpacity:.3})),Ib||(Ib=m.createElement("rect",{x:8,y:8,width:8,height:8,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2})),Lb||(Lb=m.createElement("rect",{x:14,y:14,width:4,height:4,rx:2,fill:"currentColor"})),Mb||(Mb=m.createElement("rect",{x:6,y:14,width:4,height:4,rx:2,fill:"currentColor"})),Kb||(Kb=m.createElement("rect",{x:14,y:6,width:4,height:4,rx:2,fill:"currentColor"})),Db||(Db=m.createElement("rect",{x:6,y:6,width:4,height:4,rx:2,fill:"currentColor"})))},Hb=(0,m.forwardRef)(Bb);n.p;var Fb,Wb,$b,Ub,Zb,Gb=["title","titleId"];function Yb(){return Yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qb=function(e,t){var n=e.title,r=e.titleId,o=Xb(e,Gb);return m.createElement("svg",Yb({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?m.createElement("title",{id:r},n):null,Fb||(Fb=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),Wb||(Wb=m.createElement("path",{d:"M7 7H17V9L16 14L15 9H9V15L14 16L9 17H7V7Z",fill:"currentColor",fillOpacity:.3})),$b||($b=m.createElement("rect",{x:6.5,y:14.5,width:3,height:3,rx:1.5,fill:"currentColor"})),Ub||(Ub=m.createElement("rect",{x:14.5,y:6.5,width:3,height:3,rx:1.5,fill:"currentColor"})),Zb||(Zb=m.createElement("rect",{x:6,y:6,width:4,height:4,rx:2,fill:"currentColor"})))},Jb=(0,m.forwardRef)(qb);n.p;var Qb,ex,tx,nx,rx,ox=["title","titleId"];function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sx=function(e,t){var n=e.title,r=e.titleId,o=ax(e,ox);return m.createElement("svg",ix({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?m.createElement("title",{id:r},n):null,Qb||(Qb=m.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),ex||(ex=m.createElement("path",{d:"M5 5H15V7L14 12L13 7H7V13L12 14L7 15H5V5Z",fill:"currentColor",fillOpacity:.3})),tx||(tx=m.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"})),nx||(nx=m.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"})),rx||(rx=m.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"})))},lx=(0,m.forwardRef)(sx);n.p;var cx,dx,ux,hx=["title","titleId"];function gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.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=mx(e,hx);return m.createElement("svg",gx({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?m.createElement("title",{id:r},n):null,cx||(cx=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),dx||(dx=m.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"})),ux||(ux=m.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"})))},fx=(0,m.forwardRef)(px);n.p;var vx,yx,bx,xx=["title","titleId"];function wx(){return wx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Sx=function(e,t){var n=e.title,r=e.titleId,o=Cx(e,xx);return m.createElement("svg",wx({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?m.createElement("title",{id:r},n):null,vx||(vx=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),m.createElement("mask",{id:"mask0_1972_16465",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:5,y:5,width:14,height:14},yx||(yx=m.createElement("rect",{x:5,y:5,width:14,height:14,rx:7,fill:"currentColor"}))),bx||(bx=m.createElement("g",{mask:"url(#mask0_1972_16465)"},m.createElement("rect",{x:5,y:5,width:14,height:14,rx:7,fill:"currentColor",fillOpacity:.3}),m.createElement("rect",{x:6,y:6,width:12,height:12,rx:6,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2}),m.createElement("path",{d:"M7 7L17 17",stroke:"currentColor",strokeWidth:2}))))},jx=(0,m.forwardRef)(Sx);n.p;var kx,Ox,Rx,Ex=["title","titleId"];function _x(){return _x=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Tx=function(e,t){var n=e.title,r=e.titleId,o=Ax(e,Ex);return m.createElement("svg",_x({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?m.createElement("title",{id:r},n):null,kx||(kx=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),Ox||(Ox=m.createElement("rect",{x:5,y:16,width:14,height:3,rx:1.5,fill:"currentColor"})),Rx||(Rx=m.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"})))},Px=(0,m.forwardRef)(Tx);n.p;var Ix,Lx,Mx,Kx=["title","titleId"];function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Vx=function(e,t){var n=e.title,r=e.titleId,o=Nx(e,Kx);return m.createElement("svg",Dx({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?m.createElement("title",{id:r},n):null,Ix||(Ix=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Lx||(Lx=m.createElement("rect",{x:7.75732,y:6.34314,width:14,height:2,rx:1,transform:"rotate(45 7.75732 6.34314)",fill:"#DD0000"})),Mx||(Mx=m.createElement("rect",{width:14,height:2,rx:1,transform:"matrix(-0.707107 0.707107 0.707107 0.707107 16.2427 6.34314)",fill:"#DD0000"})))},zx=(0,m.forwardRef)(Vx);n.p;var Bx,Hx,Fx,Wx,$x=["title","titleId"];function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Gx=function(e,t){var n=e.title,r=e.titleId,o=Zx(e,$x);return m.createElement("svg",Ux({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?m.createElement("title",{id:r},n):null,Bx||(Bx=m.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Hx||(Hx=m.createElement("rect",{x:5,y:10.2441,width:12.3358,height:3.52451,rx:1.76226,fill:"currentColor"})),Fx||(Fx=m.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"})),Wx||(Wx=m.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"})))},Yx=(0,m.forwardRef)(Gx);n.p;var Xx,qx,Jx=["title","titleId"];function Qx(){return Qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var tw=function(e,t){var n=e.title,r=e.titleId,o=ew(e,Jx);return m.createElement("svg",Qx({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?m.createElement("title",{id:r},n):null,Xx||(Xx=m.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.3})),qx||(qx=m.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"})))},nw=(0,m.forwardRef)(tw);n.p;var rw,ow,iw,aw,sw=["title","titleId"];function lw(){return lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var dw=function(e,t){var n=e.title,r=e.titleId,o=cw(e,sw);return m.createElement("svg",lw({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?m.createElement("title",{id:r},n):null,rw||(rw=m.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),ow||(ow=m.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})),iw||(iw=m.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})),aw||(aw=m.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"})))},uw=(0,m.forwardRef)(dw);n.p;var hw,gw=["title","titleId"];function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var fw=function(e,t){var n=e.title,r=e.titleId,o=pw(e,gw);return m.createElement("svg",mw({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?m.createElement("title",{id:r},n):null,hw||(hw=m.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"})))},vw=(0,m.forwardRef)(fw);n.p;var yw,bw=["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 Cw=function(e,t){var n=e.title,r=e.titleId,o=ww(e,bw);return m.createElement("svg",xw({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?m.createElement("title",{id:r},n):null,yw||(yw=m.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"})))},Sw=(0,m.forwardRef)(Cw);n.p;var jw,kw=["title","titleId"];function Ow(){return Ow=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ew=function(e,t){var n=e.title,r=e.titleId,o=Rw(e,kw);return m.createElement("svg",Ow({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?m.createElement("title",{id:r},n):null,jw||(jw=m.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"})))},_w=(0,m.forwardRef)(Ew);n.p;var Aw,Tw=["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 Lw=function(e,t){var n=e.title,r=e.titleId,o=Iw(e,Tw);return m.createElement("svg",Pw({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?m.createElement("title",{id:r},n):null,Aw||(Aw=m.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"})))},Mw=(0,m.forwardRef)(Lw);n.p;var Kw,Dw=["title","titleId"];function Nw(){return Nw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zw=function(e,t){var n=e.title,r=e.titleId,o=Vw(e,Dw);return m.createElement("svg",Nw({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?m.createElement("title",{id:r},n):null,Kw||(Kw=m.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"})))},Bw=(0,m.forwardRef)(zw);n.p;var Hw,Fw,Ww,$w,Uw,Zw,Gw=["title","titleId"];function Yw(){return Yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qw=function(e,t){var n=e.title,r=e.titleId,o=Xw(e,Gw);return m.createElement("svg",Yw({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?m.createElement("title",{id:r},n):null,Hw||(Hw=m.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"})),Fw||(Fw=m.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"})),Ww||(Ww=m.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"})),$w||($w=m.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"})),Uw||(Uw=m.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"})),Zw||(Zw=m.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"})))},Jw=(0,m.forwardRef)(qw);n.p;var Qw,eC,tC,nC,rC,oC,iC=["title","titleId"];function aC(){return aC=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var lC=function(e,t){var n=e.title,r=e.titleId,o=sC(e,iC);return m.createElement("svg",aC({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?m.createElement("title",{id:r},n):null,Qw||(Qw=m.createElement("path",{d:"M4 2C2.9 2 2 2.89 2 4V7H4V4H7V2H4Z",fill:"currentColor"})),eC||(eC=m.createElement("path",{d:"M22 7V4C22 2.89 21.1 2 20 2H17V4H20V7H22Z",fill:"currentColor"})),tC||(tC=m.createElement("path",{d:"M2 17V20C2 21.11 2.9 22 4 22H7V20H4V17H2Z",fill:"currentColor"})),nC||(nC=m.createElement("path",{d:"M14 2H10V4H14V2Z",fill:"currentColor"})),rC||(rC=m.createElement("path",{d:"M4 10H2V14H4V10Z",fill:"currentColor"})),oC||(oC=m.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"})))},cC=(0,m.forwardRef)(lC);n.p;const dC=(e,t=!1)=>t?[...e].reverse():e,uC=({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:p,onMaxIconClick:f})=>{var v;const y=null!=(v=null!=e?e:t)?v:n?[0,100]:0,[b,w]=((e,t)=>{const n=(0,m.useMemo)((()=>{var n;return null!=(n=null!=e?e:t)?n:""}),[e,t]),[r,o]=(0,m.useState)(n);return(0,m.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,x.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)&&(w(i),(t||o||r)&&(null==g||g(e)),C=i)},O=(0,m.useCallback)((e=>(e-i)/(a-i)*100),[i,a]),R=(0,m.useCallback)((e=>{const t=a-i;return(0,x.clamp)(t*(e/l)+i,i,a)}),[i,a,l]),_=(0,m.useCallback)((()=>{if(!n)return f?f(b):void k(b+s)}),[s,n,b]),A=(0,m.useCallback)((()=>{if(!n)return p?p(b):void k(b-s)}),[s,n,b]),T=(0,m.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,x.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,E.jsxs)(Qe.eB,{name:"range",mod:{align:c},style:{[P]:l},children:[r?h&&(0,E.jsx)(Qe.Sl,{name:"icon",onMouseDown:_,children:h}):u&&(0,E.jsx)(Qe.Sl,{name:"icon",onMouseDown:A,children:u}),(0,E.jsxs)(Qe.Sl,{name:"body",onClick:T,children:[(0,E.jsx)(Qe.Sl,{name:"line"}),(0,E.jsx)(gC,{align:c,reverse:r,value:b,valueConvert:O}),S?dC(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,x.clamp)(e,i,r):(0,x.clamp)(e,r,a),t[o]=b[o],t};return(0,E.jsx)(hC,{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,E.jsx)(hC,{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,E.jsx)(Qe.Sl,{name:"icon",onMouseDown:A,children:u}):h&&(0,E.jsx)(Qe.Sl,{name:"icon",onMouseDown:_,children:h})]})},hC=({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,E.jsx)(Qe.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,x.clamp)(o+c/100*s,0,s);i=n(a),requestAnimationFrame((()=>{null==r||r(i)}))},d=e=>{e.stopPropagation(),(0,x.isDefined)(i)&&(null==o||o(i)),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",d)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",d)},onDoubleClick:()=>{(0,x.isDefined)(i)&&(null==o||o(i))}})},gC=({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,E.jsx)(Qe.Sl,{name:"indicator",style:o})},mC=({volume:e=.5,onVolumeChange:t})=>{const n=(0,m.useRef)(e),r={color:"#99A0AE"},o=(0,m.useMemo)((()=>e>.5?(0,E.jsx)(Xu,{style:r}):e>0?(0,E.jsx)(Hu,{style:r}):(0,E.jsx)(Mu,{style:r})),[e]);return(0,E.jsx)(uC,{continuous:!0,min:_n.min,max:_n.max,step:_n.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))}})},pC=({text:e})=>(0,E.jsxs)(Qe.eB,{name:"control-info",children:[(0,E.jsx)(Fa,{}),(0,E.jsx)(Qe.Sl,{name:"tooltip",children:e})]}),fC=({description:e,info:t,max:n,min:r,value:o,step:i=1,onChange:a})=>{const s=(0,m.useRef)(),[l,c]=(0,m.useState)();(0,m.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,m.useState)(!1);(0,m.useEffect)((()=>{i(e<=0)}),[e]);const a=e=>{const n=Number.parseInt(e.currentTarget.value);n?n>vC?null==t||t(1):n<0?null==t||t(0):null==t||t(n/vC):null==t||t(0)},s=()=>{i(!o),null==t||t(o?1:0)},l=()=>(0,E.jsx)(Qe.Sl,{name:"mute",children:(0,E.jsx)(Qe.Sl,{name:"mute-button",onClick:s,children:o?"Unmute":"Mute"})});return(0,E.jsxs)(Qe.eB,{name:"audio-control",onClick:e=>e.stopPropagation(),children:[(0,E.jsx)(AC,{look:r?"active":void 0,onClick:n,children:o?(0,E.jsx)(Da,{}):(0,E.jsx)(Ta,{})}),r&&(0,E.jsxs)(Qe.Sl,{name:"modal",children:[(0,E.jsx)(fC,{min:0,max:vC,value:Math.round(e*vC),onChange:a,description:"Volume",info:"Increase or decrease the volume of the audio"}),l()]})]})},bC=({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,m.useState)(!0),[u,h]=(0,m.useState)(!0);(0,m.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)},p=()=>{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,E.jsxs)(Qe.eB,{name:"audio-config",onClick:e=>e.stopPropagation(),children:[(0,E.jsx)(AC,{look:e?"active":void 0,onClick:o,children:(0,E.jsx)(ka,{})}),e&&(0,E.jsxs)(Qe.Sl,{name:"modal",children:[(0,E.jsx)(fC,{min:.5,max:2.5,step:.1,value:l,description:"Playback speed",info:"Increase or decrease the playback speed",onChange:f}),(0,E.jsx)(fC,{min:1,max:150,step:.1,value:n,description:"Audio zoom y-axis",info:"Increase or decrease the appearance of amplitude",onChange:v}),(0,E.jsxs)(Qe.Sl,{name:"buttons",children:[(0,E.jsxs)(Qe.Sl,{name:"menu-button",onClick:g,children:[c?"Hide":"Show"," timeline"]}),(0,E.jsxs)(Qe.Sl,{name:"menu-button",onClick:p,children:[u?"Hide":"Show"," audio wave"]})]})]})]})};class xC{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 wC=(0,m.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,E.jsxs)(Qe.eB,{ref:d,name:"field-label",mod:h,tag:u,style:s,"data-required":n,children:[(0,E.jsx)(Qe.Sl,{name:"text",children:(0,E.jsxs)(Qe.Sl,{name:"content",children:[e,o&&(0,E.jsx)(Qe.Sl,{name:"description",children:o})]})}),(0,E.jsx)(Qe.Sl,{name:"field",children:t})]})})),CC=wC,SC=["sidepanel","value","readonly","onChange","label"],jC=e=>{let{sidepanel:t=!1,value:n,readonly:r=!1,onChange:o,label:i}=e,a=(0,nr.A)(e,SC);const s=m.createRef(),[l,c]=(0,m.useState)(n);(0,m.useEffect)((()=>{s.current&&new xC(s.current,"11:11:11:111",(e=>{c(e)}))}),[]),(0,m.useEffect)((()=>{c(d(n||0,!0))}),[n]);const d=(0,m.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,E.jsx)(Qe.eB,Object.assign({name:"time-box",mod:{sidepanel:t}},a,{children:(0,E.jsx)(Qe.Sl,{name:"input-time",maxLength:12,tag:"input",ref:s,type:"text",readOnly:r,value:l,onKeyDown:h,onChange:()=>{},onBlur:u})}));return i?(0,E.jsx)(CC,{size:"small",flat:!0,text:i,children:g}):g},kC=({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,E.jsxs)(Qe.eB,{name:"timer-duration-control",children:[(0,E.jsx)(jC,{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,E.jsx)(jC,{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,E.jsx)(jC,{sidepanel:e,readonly:!0,value:n-t,onChange:()=>{},"data-testid":"timebox-duration-time",label:u?"Duration":void 0})]})},OC=["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"],RC=["children"],EC=({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")},_C=(0,m.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:p,onForward:f,onPlay:v,onPause:y,onFullScreenToggle:b,onStepBackward:w,onPositionChange:C,onStepForward:S,onSpeedChange:j,onToggleCollapsed:O,formatPosition:R,toggleVisibility:_,layerVisibility:A,mediaType:T}=e,P=(0,nr.A)(e,OC);const{settings:I}=(0,m.useContext)(Dr),[L,M]=(0,m.useState)(!1),[K,D]=(0,m.useState)(!1),[N,V]=(0,m.useState)(!1),[z,B]=[1===n,n===t],H=(0,m.useMemo)((()=>Math.max((t-1)/r,0)),[t,r]),F=(0,m.useMemo)((()=>(n-1)/r),[n,r]),W=LC(P.customControls),$=(e,t)=>n=>{e(n,null!=t?t:void 0)},U=(0,m.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,m.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,E.jsxs)(Qe.eB,{name:"timeline-controls",tag:ns,spread:!0,style:{gridAutoColumns:"auto"},children:[(0,k.VS)(k.vS)&&"audio"===T?(0,E.jsxs)(Qe.Sl,{name:"group",tag:ns,size:"small",style:{gridAutoColumns:"auto"},children:[(0,E.jsx)(bC,{onSetModal:G,onAmpChange:P.onAmpChange,configModal:K,onSpeedChange:e=>null==j?void 0:j(e),speed:P.speed||0,amp:P.amp||0,toggleVisibility:_,layerVisibility:A}),(0,E.jsx)(yC,{volume:P.volume||0,onVolumeChange:P.onVolumeChange,onSetModal:Z,audioModal:N})]}):(0,E.jsxs)(Qe.Sl,{name:"group",tag:ns,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,x.isDefined)(o)&&(0,E.jsx)(o,{length:t,position:n-1,volume:P.volume,onPositionChange:C,onVolumeChange:P.onVolumeChange},e)})),null==W?void 0:W.left]}),(0,E.jsxs)(Qe.Sl,{name:"main-controls",children:[(0,E.jsx)(Qe.Sl,{name:"group",tag:ns,collapsed:!0,children:l}),(0,E.jsxs)(Qe.Sl,{name:"group",tag:ns,collapsed:!0,children:[null==W?void 0:W.leftCenter,(0,E.jsx)(IC,{showAlterantive:L&&!u,main:(0,E.jsxs)(E.Fragment,{children:[(null==I?void 0:I.stepSize)&&!u&&(0,E.jsx)(AC,{onClick:$(w,I.stepSize),hotkey:null==I?void 0:I.stepAltBack,disabled:z,children:(0,E.jsx)(ha,{})}),(0,E.jsx)(AC,{onClick:$(w),hotkey:null==I?void 0:I.stepBackHotkey,disabled:z,children:(0,E.jsx)(Wr,{})})]}),alt:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(AC,{onClick:()=>null==p?void 0:p(),disabled:z,hotkey:null==I?void 0:I.skipToBeginning,children:(0,E.jsx)(gi,{})}),(0,E.jsx)(AC,{onClick:()=>null==p?void 0:p(d),disabled:z,hotkey:null==I?void 0:I.hopBackward,children:(0,E.jsx)(uo,{})})]})}),(0,E.jsx)(AC,{"data-testid":"playback-button:"+(o?"pause":"play"),onClick:U,hotkey:null==I?void 0:I.playpauseHotkey,children:o?(0,E.jsx)(ai,{}):(0,E.jsx)(Qo,{})}),(0,E.jsx)(IC,{showAlterantive:L&&!u,main:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(AC,{onClick:$(S),hotkey:null==I?void 0:I.stepForwardHotkey,disabled:B,children:(0,E.jsx)(Xr,{})}),(null==I?void 0:I.stepSize)&&!u&&(0,E.jsx)(AC,{disabled:B,onClick:$(S,I.stepSize),hotkey:null==I?void 0:I.stepAltForward,children:(0,E.jsx)(ba,{})})]}),alt:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(AC,{onClick:()=>null==f?void 0:f(d),disabled:B,hotkey:null==I?void 0:I.hopForward,children:(0,E.jsx)(ro,{})}),(0,E.jsx)(AC,{onClick:()=>null==f?void 0:f(),disabled:B,hotkey:null==I?void 0:I.skipToEnd,children:(0,E.jsx)(yo,{})})]})}),null==W?void 0:W.rightCenter]}),(0,E.jsxs)(Qe.Sl,{name:"group",tag:ns,collapsed:!0,children:[!u&&g&&(0,E.jsx)(AC,{tooltip:"Toggle Timeline",onClick:()=>null==O?void 0:O(!i),children:i?(0,E.jsx)(ia,{}):(0,E.jsx)(qi,{})}),h&&(0,E.jsx)(AC,{tooltip:"Fullscreen",onClick:()=>null==b?void 0:b(!1),children:c?(0,E.jsx)(Ti,{}):(0,E.jsx)(Ci,{})})]})]}),(0,E.jsx)(Qe.Sl,{name:"group",tag:ns,size:"small",children:(0,k.VS)(k.vS)&&"audio"===T?(0,E.jsxs)(E.Fragment,{children:[null==W?void 0:W.right,(0,E.jsx)(kC,{startTime:0,endTime:a,minTime:0,maxTime:a,endTimeReadonly:!0,currentTime:n,onChangeStartTime:e=>{C(e)}})]}):(0,E.jsxs)(E.Fragment,{children:[null==W?void 0:W.right,(0,E.jsx)(TC,{currentTime:F,duration:H,length:t,position:n,framerate:r,formatPosition:R})]})})]})})),AC=e=>{let{children:t}=e,n=(0,nr.A)(e,RC);return(0,E.jsx)(Qa,Object.assign({},n,{type:"text",style:{width:36,height:36,padding:0},children:t}))},TC=({currentTime:e,position:t,duration:n,framerate:r,length:o,formatPosition:i})=>{const a=null!=i?i:EC,s={position:t-1,fps:r,length:o},l=a(Object.assign({time:e},s)),c=a(Object.assign({time:n},s));return(0,E.jsxs)(Qe.Sl,{name:"time",children:[(0,E.jsx)(Qe.Sl,{name:"time-section",children:(0,E.jsx)(PC,{time:e,position:l})}),(0,E.jsx)(Qe.Sl,{name:"time-section",children:(0,E.jsx)(PC,{time:Math.max(n,0),position:c})})]})},PC=({time:e,position:t})=>{const n=new Date(1e3*e).toISOString(),r=e>3600?n.substr(11,8):n.substr(14,5);return(0,E.jsxs)(E.Fragment,{children:[r,t?(0,E.jsx)("span",{children:t}):null]})},IC=e=>e.hidden?null:e.showAlterantive?e.alt:e.main,LC=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 MC=n(45250);const KC=["position","length","seekOffset","seekVisible","onIndicatorMove","onSeek","minimap","step"],DC=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,nr.A)(e,KC).leftOffset)?t:150)/c,u=(0,m.useRef)(),h=(0,m.useRef)(),g=(0,m.useRef)(),p=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,m.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,MC.clamp)(Math.ceil(r*(s/l)),0,c);null==a||a(d);const h=e=>{const t=(0,MC.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,m.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,MC.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,m.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),e.target===g.current?x(e):w(e)}),[x,w]);return(0,E.jsxs)(Qe.eB,{name:"seeker",ref:u,onMouseDown:C,children:[(0,E.jsx)(Qe.Sl,{name:"track"}),p&&(0,E.jsx)(Qe.Sl,{name:"indicator",ref:g,style:{left:y,width:f}}),(0,E.jsx)(Qe.Sl,{name:"position",ref:h,style:{left:`${b}%`}}),(0,E.jsx)(Qe.Sl,{name:"minimap",children:l})]})},NC=(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,m.useContext)(Dr),{label:c,color:d,visible:u,sequence:h,selected:g,timeline:p}=t,f=(0,m.useMemo)((()=>Math.round(s/2)),[s]),v=(0,m.useMemo)((()=>(0,x.clamp)(a-f,0,l)),[a,f,l]),y=(0,m.useMemo)((()=>(0,x.clamp)(a+s+f,0,l)),[a,s,f,l]),b=h[0],w=b?b.frame-1:0,C=b?w*i:n,S=(0,m.useMemo)((()=>({"--offset":`${n}px`,"--color":d,"--point-color":Ct()(d).alpha(1).css(),"--lifespan-color":Ct()(d).alpha(u?.4:1).css()})),[n,d,u]),j=(0,m.useMemo)((()=>r?NC(h,i).map((e=>(e.points=e.points.filter((({frame:e})=>e>=v&&e<=y)),e))):[]),[h,w,i,r,v,y]),k=(0,m.useCallback)(((e,n)=>{e.stopPropagation(),null==o||o(e,t.id,n)}),[t.id,o]);return(0,E.jsxs)(Qe.eB,{name:"keypoints",style:S,mod:{selected:g,timeline:p},"data-id":t.id,children:[(0,E.jsxs)(Qe.Sl,{name:"label",onClick:k,children:[(0,E.jsx)(Qe.Sl,{name:"name",children:c}),(0,E.jsx)(Qe.Sl,{name:"data",children:(0,E.jsx)(Qe.Sl,{name:"data-item",mod:{faded:!0},children:e})})]}),(0,E.jsx)(Qe.Sl,{name:"keypoints",onClick:e=>k(e,!0),children:(0,E.jsx)(BC,{lifespans:j,step:i,visible:u,offset:C})})]})},BC=({lifespans:e,step:t,offset:n,visible:r})=>(0,E.jsx)(E.Fragment,{children:e.map(((o,i)=>{const a=i+1===e.length,{points:s}=o,l=(0,nr.A)(o,VC);return(0,E.jsx)(HC,Object.assign({mainOffset:n,step:t,isLast:a,visible:r,points:s.map((({frame:e})=>e))},l),`${i}-${s.length}-${a}-${r}`)}))}),HC=(0,m.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,m.useMemo)((()=>({left:c,width:u,right:d})),[c,d,u]);return(0,E.jsx)(Qe.Sl,{name:"lifespan",mod:{hidden:!a,instant:!t},style:h,children:l.map(((e,t)=>{const o=(e-n)*r;return(0,E.jsx)(Qe.Sl,{name:"point",style:{left:o},mod:{last:!!o}},t)}))})})),FC=["offset","position","length","step","regions","onScroll","onPositionChange","onResize","onSelectRegion"],WC=(e,t)=>Math.floor(e/t),$C=(e,t)=>WC(e,t)*t,UC=({regions:e,startOffset:t,scrollTop:n,disabled:r,onSelectRegion:o})=>{const i=(0,m.useMemo)((()=>{const t=(0,MC.clamp)(Math.ceil(n/24)-1,0,e.length),r=(0,MC.clamp)(t+(Math.ceil(6.875)-1),0,e.length);return[(0,MC.clamp)(t-5,0,e.length),(0,MC.clamp)(r+5,0,e.length)]}),[n,e.length]);return(0,E.jsx)(Qe.Sl,{name:"keypoints",style:{height:24*e.length},children:e.map(((e,n)=>e.sequence.length>0||e.timeline?(0,E.jsx)(zC,{idx:e.index,region:e,startOffset:t,onSelectRegion:r?void 0:o,renderable:i[0]<=n&&n<=i[1]},e.id):null))})},ZC={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,nr.A)(e,FC);const h=null!=(t=u.leftOffset)?t:150,g=(0,m.useRef)(),p=(0,m.useRef)(0),f=(0,m.useRef)(r),[v,y]=(0,m.useState)(!0),[b,w]=(0,m.useState)(null),[C,S]=(0,m.useState)(n),j=(0,m.useRef)(C),[k,O]=(0,m.useState)(0),[R,_]=(0,m.useState)(!1);j.current=C;const A=(0,m.useMemo)((()=>o*i),[o,i]),T=(0,m.useMemo)((()=>{var e,t;return WC($C((null!=(e=null==(t=g.current)?void 0:t.clientWidth)?e:0)-h,i),i)}),[g.current,i,h]),P=Kr({onPositionChange:l}),I=(0,m.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,m.useCallback)((({left:e,top:t})=>{if(o&&(w(null),(0,x.isDefined)(t)&&k!==t&&O(t),(0,x.isDefined)(e)&&C!==e)){S(e);const t=WC($C(e,i),i);null==s||s((0,MC.clamp)(t,1,o))}}),[C,k,i,o]),M=(0,m.useCallback)((e=>{const t=WC($C(e,i),i);null==P.onPositionChange||P.onPositionChange((0,MC.clamp)(t+1,1,o))}),[i,o,r]),K=(0,m.useCallback)((e=>{const t=g.current;if(Math.abs(e.deltaX)>Math.abs(e.deltaY)){const n=t.scrollWidth-t.clientWidth,r=(0,MC.clamp)(C+1.25*e.deltaX,0,n);L({left:r})}else{const n=t.scrollHeight-t.clientHeight,r=(0,MC.clamp)(k+1.25*e.deltaY,0,n);L({top:r})}}),[g,C,k,L]),D=(0,m.useMemo)((()=>$C(C,i)),[C,i,o]),N=(0,m.useMemo)((()=>k),[k]),V=(0,m.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=$C(e.pageX-r,i),s=(0,MC.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,m.useCallback)((e=>{if(g.current){const t=e.pageX-g.current.getBoundingClientRect().left-h;w(t>0?t:null)}}),[D,i]),B=(0,m.useCallback)((()=>{b&&(M(b+D),w(null))}),[b,D,i,M]),H=(0,m.useMemo)((()=>{const e=(0,MC.clamp)(r,0,o)*i;return $C(e-D,i)+h}),[r,D,i,o]),F=(0,m.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=WC(d,i)+1;M(d),s&&(l=null==u.onStartDrawing?void 0:u.onStartDrawing(m));const p=e=>{const t=c(e),n=WC(t,i)+1;if(t>=0&&t<=o&&(y(!1),_(!0),M(t)),l){const[e,t]=n>m?[m,n]:[n,m];l.setRanges([e,t])}},f=()=>{y(!0),_(!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,m.useEffect)((()=>{g.current&&(g.current.scrollLeft=D,g.current.scrollTop=N)}),[D,N]),(0,m.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,m.useEffect)((()=>{null==c||c(WC(g.current.clientWidth,i))}),[A,i]),(0,m.useEffect)((()=>{const e=g.current;if((0,x.isDefined)(e)){const t=(0,MC.clamp)(n*i,0,e.scrollWidth-e.clientWidth);p.current=$C(t,i),S(t)}}),[n,i]),(0,m.useEffect)((()=>{const e=g.current;if(!(0,x.isDefined)(e)||T<1)return;const t=WC($C(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,MC.clamp)(n*i,0,e.scrollWidth-e.clientWidth);p.current=$C(t,i),L({left:t})}return}const a=$C(r-1,T),s=(r-1)*i-p.current;(s>(T-1)*i||s<0)&&(L({left:a*i}),p.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,E.jsxs)(Qe.eB,{name:"timeline-frames",style:W,children:[(0,E.jsxs)(Qe.Sl,{name:"controls",children:[(0,E.jsx)(Qe.Sl,{name:"indicator",onMouseDown:V,style:{left:(0,MC.clamp)(H-i,h-i,A)}}),(0,x.isDefined)(b)&&v&&(0,E.jsx)(Qe.Sl,{name:"hover",style:{left:$C(b,i),marginLeft:h},"data-frame":WC(D+b,i)+1})]}),(0,E.jsx)(Qe.Sl,{name:"labels-bg",style:{width:h}}),(0,E.jsx)(Qe.Sl,{name:"scroll",ref:g,onWheel:K,onMouseMove:z,onMouseLeave:()=>w(null),onClickCapture:B,onMouseDown:F,children:(0,E.jsx)(Qe.Sl,{name:"filler",children:(0,E.jsx)(UC,{regions:a,scrollTop:N,startOffset:h,onSelectRegion:d,disabled:R})})}),(0,E.jsx)(Qe.Sl,{name:"background",style:{backgroundImage:I}})]})},Minimap:()=>{const{regions:e,length:t}=(0,m.useContext)(Dr),n=(0,m.useRef)(),[r,o]=(0,m.useState)(0),i=(0,m.useMemo)((()=>e.map((({id:e,color:t,sequence:n})=>({id:e,color:t,lifespans:NC(n,r)})))),[r,e]);return(0,m.useEffect)((()=>{(0,x.isDefined)(n.current)&&t>0&&o(n.current.clientWidth/t)}),[t]),(0,E.jsx)(Qe.eB,{ref:n,name:"minimap",children:i.slice(0,5).map((({id:e,color:t,lifespans:n})=>(0,E.jsx)(Qe.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,E.jsx)(Qe.Sl,{name:"connection",style:{left:a,width:s}},`${e}${o}`)}))},e)))})},Controls:({onAction:e})=>{const{position:t,regions:n}=(0,m.useContext)(Dr),r=n.some((({selected:e,timeline:t})=>e&&!t)),o=(0,m.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,m.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,m.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,m.useMemo)((()=>i?(0,E.jsx)(Bo,{}):(0,E.jsx)(Zo,{})),[i,o]),d=(0,m.useMemo)((()=>a?(0,E.jsx)(Ro,{}):(0,E.jsx)(Mo,{})),[o,a]);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(AC,{onClick:s,disabled:!r,tooltip:"Toggle Keypoint",children:c}),(0,E.jsx)(AC,{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"}},GC=ZC;var YC=n(35775),XC=n(41128);const qC=(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)},JC=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},QC=e=>Math.floor(10/JC(e));var eS=n(25345);const tS=({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:p})=>{const f=(0,m.useRef)();return(0,m.useEffect)((()=>{var m,v;const y=e.current,b=Gn().create(Object.assign({autoCenter:!0,scrollParent:!0},i,{barHeight:1,container:y,height:Number(null!=(m=null==e||null==(v=e.current)||null==(v=v.parentElement)?void 0:v.offsetHeight)?m:146),hideScrollbar:!0,maxCanvasWidth:8e3,waveColor:"#D5D5D5",progressColor:"#656F83",cursorWidth:0,backend:"MediaElement",loopSelection:!0,audioRate:r,pixelRatio:1,minPxPerSec:Rn.default,plugins:[YC.A.create({slop:5,deferInit:!0,dragSelection:!0}),XC.A.create({deferInit:!0,container:t.current,formatTimeCallback:qC,timeInterval:JC,secondaryLabelInterval:QC,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}),eS.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,x.clamp)(e,0,t),b.seekTo(e/b.getDuration()))};const w=()=>{Object.values(b.regions.list).filter((e=>!(0,x.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 w(),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(Rn.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==p?void 0:p(e))),b.on("seek",(()=>{const e=b.getCurrentTime();s(1e3*e)})),o._value&&b.load(o._value),f.current=b;const C=()=>{w()};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},nS={frames:GC,wave:{View:({position:e,length:t,regions:n,volume:r=1,zoom:o=Rn.default,speed:i=En.default,onReady:a,onPositionChange:s,onSeek:l,onAddRegion:c,onZoom:d,onPlay:u,onPause:h,onSpeedChange:g})=>{const{data:p}=(0,m.useContext)(Dr),f=(0,m.useRef)(null),v=(0,m.useRef)(),y=(0,m.useRef)(),b=(0,m.useRef)(),w=(0,m.useRef)(),[C,S]=(0,m.useState)(o),[j,k]=(0,m.useState)(!0),[O,R]=(0,m.useState)(0),[_,A]=(0,m.useState)(0),[T,P]=(0,m.useState)(Number.parseInt(p.defaultscale,10)||1),I=(0,m.useRef)({zoom:C,scroll:O}),L=(0,m.useRef)(!1),M=(0,m.useCallback)((e=>{const t=(0,x.clamp)(e,Rn.min,Rn.max);I.current.zoom=t,S(t)}),[]),K=(0,m.useCallback)((()=>{L.current||(L.current=!0)}),[]),D=(0,m.useCallback)((()=>{L.current&&(L.current=!1)}),[]),N=(0,m.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,m.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,m.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,m.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,m.useCallback)((()=>{K(),z()}),[z,K]),F=Kr({onZoom:d,onSeek:l,onPositionChange:s,onFinish:H,onPlay:V,onPause:z}),W=tS({containter:y,timelineContainer:b,speed:i,regions:n,data:p,params:{autoCenter:p.autocenter,scrollParent:p.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,m.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,m.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,m.useEffect)((()=>{(()=>{const t=W.current,n=null==t?void 0:t.getDuration(),r=null==t?void 0:t.getCurrentTime(),o=(0,x.clamp)(e/1e3,0,null!=n?n:0);t&&(t.isPlaying()||n&&!isNaN(n)&&o!==r&&t.setCurrentTime(o))})()}),[e]),(0,m.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,m.useEffect)((()=>{var e;null==(e=W.current)||e.setPlaybackRate(i)}),[i]),(0,m.useEffect)((()=>{B(O)}),[O]),(0,m.useEffect)((()=>{var e;null==(e=W.current)||e.setVolume(r)}),[r]),(0,m.useEffect)((()=>{const e=W.current;e&&(e.params.barHeight=T,e.drawBuffer())}),[T]),(0,m.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,m.useEffect)((()=>{const e=w.current,t=e.querySelector("wave"),n=(0,x.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,x.clamp)(t.scrollLeft+1.25*r,0,t.scrollWidth)})())};return e.addEventListener("wheel",r),()=>e.removeEventListener("wheel",r)}),[C]);const U=(0,m.useMemo)((()=>{var e;return{left:_,width:Number(null!=(e=p.cursorwidth)?e:2),background:p.cursorcolor}}),[_]);return(0,E.jsxs)(Qe.eB,{name:"wave",ref:v,children:[(0,E.jsx)(Qe.Sl,{name:"controls",children:(0,E.jsxs)(ns,{spread:!0,style:{gridAutoColumns:"auto"},children:[(0,E.jsx)(uC,{continuous:!0,value:i,resetValue:En.default,step:En.step,min:En.min,max:En.max,minIcon:(0,E.jsx)(Sd,{style:{color:"#99A0AE"}}),maxIcon:(0,E.jsx)(Id,{style:{color:"#99A0AE"}}),onChange:e=>null==g?void 0:g(Number(e))}),(0,E.jsx)(uC,{continuous:!0,value:C,resetValue:Rn.default,step:Rn.step,min:Rn.min,max:Rn.max,minIcon:(0,E.jsx)(Fm,{}),maxIcon:(0,E.jsx)(Km,{}),onChange:e=>M(Number(e))})]})}),(0,E.jsxs)(Qe.Sl,{name:"wrapper",children:[(0,E.jsxs)(Qe.Sl,{name:"body",ref:w,onClick:$,children:[(0,E.jsx)(Qe.Sl,{name:"cursor",style:U}),(0,E.jsx)(Qe.Sl,{name:"surfer",ref:y,onClick:e=>e.stopPropagation()}),(0,E.jsx)(Qe.Sl,{name:"timeline",ref:b}),j&&(0,E.jsx)(Qe.Sl,{name:"loader",mod:{animated:!0}})]}),(0,E.jsx)(Qe.Sl,{name:"scale",children:(0,E.jsx)(uC,{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"}}},rS=["regions","zoom","mode","length","position","framerate","hopSize","playing","fullscreen","disableView","defaultStepSize","allowSeek","allowFullscreen","allowViewCollapse","controlsOnTop","data","speed","className","formatPosition"],oS=(0,v.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:p=!0,allowFullscreen:f=!0,allowViewCollapse:v=!0,controlsOnTop:y=!0,data:b,speed:w,className:C,formatPosition:S}=e,j=(0,nr.A)(e,rS);const k=nS[i],[O,R]=(0,m.useState)((0,x.clamp)(s,1,Number.POSITIVE_INFINITY)),[_,A]=(0,m.useState)(0),[T,P]=(0,m.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,m.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,m.useRef)((()=>O)),K=(0,m.useMemo)((()=>g*o),[o,g]),D=Kr({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,x.clamp)(e,1,a);return n!==t?(null==D.onPositionChange||D.onPositionChange(n),n):t}))},V=(0,m.useMemo)((()=>({position:s,length:a,regions:r,step:K,data:b,playing:d,seekOffset:_,settings:k.settings,visibleWidth:T})),[s,_,T,a,r,K,d,k.settings,b]);(0,m.useEffect)((()=>{const e=M.current();s!==e&&R((0,x.clamp)(s,1,a))}),[s,a]);const z=(0,E.jsxs)(Qe.Sl,{name:"topbar",children:[(0,E.jsx)(_C,{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,x.isDefined)(e)?O-e:0),onForward:e=>N((0,x.isDefined)(e)?O+e:a),onPositionChange:N,onToggleCollapsed:L,formatPosition:S,extraControls:k.Controls&&!h?(0,E.jsx)(k.Controls,{onAction:(e,t,n)=>{null==D.onAction||D.onAction(e,t,n)}}):null,mediaType:"timeline"}),p&&(0,E.jsx)(DC,{length:a,step:K,leftOffset:null==(t=k.settings)?void 0:t.leftOffset,position:O,seekOffset:_,seekVisible:T,onIndicatorMove:A,onSeek:N,minimap:k.Minimap?(0,E.jsx)(k.Minimap,{}):null})]});r.map((e=>(0,x.fixMobxObserve)(e.sequence)));const B=!I&&!h&&(0,E.jsx)(Qe.Sl,{name:"view",children:(0,E.jsx)(k.View,{step:K,length:a,regions:r,playing:d,zoom:o,speed:w,volume:j.volume,controls:j.controls,height:j.height,position:O,offset:_,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,E.jsx)(Nr,{value:V,children:(0,E.jsx)(Qe.eB,{name:"timeline",className:C,children:y?(0,E.jsxs)(E.Fragment,{children:[z,B]}):(0,E.jsxs)(E.Fragment,{children:[B,z]})})})})),iS=(e,t)=>{const n=Number(e);return isNaN(e)?t.default:nt.max?t.max:n},aS=(0,v.PA)((({item:e})=>{const[t,n]=(0,m.useState)(!1),[r,o]=(0,m.useState)(1),[i,a]=(0,m.useState)(0),[s,l]=(0,m.useState)(iS(e.defaultzoom,Rn)),[c,d]=(0,m.useState)(iS(e.defaultvolume,_n)),[u,h]=(0,m.useState)(iS(e.defaultspeed,En)),g=(0,m.useCallback)((t=>{a(1e3*t.duration),e.onLoad(t.surfer),e.onReady()}),[]),p=(0,m.useCallback)((e=>{o(e)}),[]),f=(0,m.useCallback)((t=>{o(t),e.handleSeek()}),[]),v=(0,m.useCallback)((t=>{h(t),e.handleSpeed(t)}),[]),y=(0,m.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,m.useCallback)((()=>{n((t=>!!e._ws&&(!1===e._ws.isPlaying()&&e._ws.play(),!1===t?(e.triggerSyncPlay(),!0):t)))}),[e,t]),x=(0,m.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,E.jsx)(Mn,{item:e,children:(0,E.jsx)(Qe.eB,{mode:"wave",name:"audio",tag:oS,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:p,onSeek:f,onPlay:b,onPause:x,onZoom:l,onVolumeChange:d,onSpeedChange:v,formatPosition:y})})})),sS=!1,lS="OffscreenCanvas"in globalThis;let cS=function(e){return e[e.timelineHeight=32]="timelineHeight",e.timelinePlacement="top",e}({});const dS=(e="log")=>(...e)=>{sS},uS=(dS("log"),dS("warn")),hS=(dS("error"),dS("info")),gS=(e,t,n)=>Math.max(t,Math.min(n,e)),mS=(e,t=2)=>{const n=10**t;return Math.round(e*n)/n},pS=(e,t,n)=>e>=t&&e<=n,fS=(e,t)=>Array.from({length:t}).map((()=>e)).join(""),vS=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,bS=e=>e.getBoundingClientRect().top,xS=(e,t)=>e.clientX-yS(t),wS=(e,t)=>e.clientY-bS(t),CS=(e,t,n)=>e/t*n,SS=(e,t,n)=>{const{zoomedWidth:r,container:o}=t,i=xS(e,o)+t.getScrollLeftPx();return CS(i,r,n)},jS=(e,t,n)=>((e,t)=>Math.abs(e-t)<1e-6)(e/n,t/n);class kS{constructor(){this.destroyed=!1}get isDestroyed(){return this.destroyed}destroy(){this.destroyed=!0,this.destroy=()=>null}}class OS extends kS{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 RS extends OS{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||hS("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,hS("decode:cleanup",this.src)}}class ES extends RS{constructor(...e){super(...e),this.arraybuffer=void 0,this.context=void 0}async init(e){this.arraybuffer=e,hS("decode:worker:ready",this.src)}async decode(e){if(this.sourceDecoded)hS("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 hS("decode:inprogress",this.src),this.decodingPromise;if(!this.arraybuffer)throw new Error("WebAudioDecoder not initialized, did you call decoder.init()?");hS("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,hS("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 _S=n(55961),AS=n(14280);class TS{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)}))}}TS.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 PS extends kS{constructor(e){super(),this.channelCount=1,PS.usage++,PS.worker||(PS.worker=new TS(new Worker(new URL(n.p+n.u(559),n.b)))),this.channelCount=e}destroy(){var e;(PS.usage--,0===PS.usage)&&(null==(e=PS.worker)||e.destroy(),PS.worker=void 0);super.destroy()}async split(e){if(!PS.worker)throw new Error("AudioDecoder: worker not initialized");return PS.worker.compute({value:e,channelCount:this.channelCount})}}PS.usage=0,PS.worker=void 0;class IS extends RS{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,_S.vy)(AS.A,e),hS("decode:worker:ready",this.src))}async decode(e){if(this.sourceDecoded)return void hS("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 hS("decode:inprogress",this.src),this.decodingPromise;if(!this.worker)throw new Error("AudioDecoder: Worker not initialized, did you call decoder.init()?");let t;hS("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 PS(this._channelCount):void 0;const i=Array.from({length:this._channelCount}).map((()=>Array.from({length:r})));for(hS("decode:chunk:start",this.src,n,r),this.invoke("progress",[0,r]);n{i[t][n]=e}))}this.invoke("progress",[n+1,r]),hS("decode:chunk:process",this.src,n,r),n++}if(e.done)break}this.chunks=i,hS("decode:complete",this.src)}finally{var n;null==(n=t)||n.destroy(),this.dispose()}}dispose(){this.worker&&(this.worker.dispose(),this.worker=void 0,hS("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=gS(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 LS{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 IS(t):new ES(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),hS("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((()=>{hS("decodepool:destroy",i),e.delete(i)}),5e3),e.set(i,t),r.bind(t)(...n)):r}}})}(LS.cache,e,t,n);return r}}LS.cache=new Map;const MS=new LS;class KS extends OS{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,k.VS)(k.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,k.VS)(k.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=MS.getDecoder(this.src,this.splitChannels,this.decoderType),this.decoder.on("progress",((e,t)=>{this.invoke("decodingProgress",[e,t])})))}}class DS extends kS{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 KS(e),this.audio.on("decodingProgress",((e,t)=>{this.wf.setDecodingProgress(e,t)}))),this.audio}}class NS extends kS{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=gS(e,0,this.duration);this.currentTime=t,this.playing&&this.updatePlayback()}seekSilent(e){const t=gS(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=gS(this.loop.end,0,this.duration),e=gS(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=gS(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:gS(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 VS extends NS{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 zS extends NS{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 BS=e=>Number.parseInt(e.replace(/_/g,""),36),HS="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=BS(t.substring(0,3)),r=BS(t.substring(3)).toString(16);let o="";for(let e=0;e<6-r.length;e++)o+="0";return e[n]=`${o}${r}`,e}),{}),FS=new RegExp(`^#${fS("([a-f0-9])",3)}([a-f0-9])?$`,"i"),WS=new RegExp(`^#${fS("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),$S=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${fS(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),US=/^[a-z]+$/i;class ZS{constructor(e){this.base=void 0,this.rgba=void 0,this.base=e,this.rgba=e}update(e){const t=YS(e);return this.rgba=t.rgba,this.base=t.base,this}reset(){return this.rgba=this.base,this}clone(){return new ZS(this.rgba)}opaque(e){const t=[this.r,this.g,this.b,gS(mS(this.a+this.a*e,1),0,1)];return this.rgba=t,this}translucent(e){const t=[this.r,this.g,this.b,gS(mS(this.a-this.a*e,1),0,1)];return this.rgba=t,this}darken(e){const t=[gS(Math.round(this.r-this.r*e),0,255),gS(Math.round(this.g-this.g*e),0,255),gS(Math.round(this.b-this.b*e),0,255),this.a];return this.rgba=t,this}lighten(e){const t=[gS(Math.round(this.r+this.r*e),0,255),gS(Math.round(this.g+this.g*e),0,255),gS(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 GS=new ZS([0,0,0,0]),YS=e=>{if("string"!=typeof e&&!(e instanceof ZS))throw new Error(`Color must be a string or an instanceof RgbaColorArray. Received ${JSON.stringify(e)}`);if(e instanceof ZS)return e;if("transparent"===(e=e.toString()).trim().toLowerCase())return GS;let t=e.trim();t=US.test(e)?(e=>{const t=e.toLowerCase().trim(),n=HS[(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=FS.exec(t);if(n){const e=Array.from(n).slice(1);return new ZS([...e.slice(0,3).map((e=>Number.parseInt(fS(e,2),16))),Number.parseInt(fS(e[3]||"f",2),16)/255])}const r=WS.exec(t);if(r){const e=Array.from(r).slice(1);return new ZS([...e.slice(0,3).map((e=>Number.parseInt(e,16))),Number.parseInt(e[3]||"ff",16)/255])}const o=$S.exec(t);if(o){const e=Array.from(o).slice(1);return new ZS([...e.slice(0,3).map((e=>Number.parseInt(e,10))),Number.parseFloat(e[3]||"1")])}return GS};class XS{constructor(e){var t,n,r,o,i;this.id="tooltip",this.visible=!1,this.color=YS("#fff"),this.fontWeight="500",this.backgroundColor=YS("#000"),this.fontSize=16,this.paddingInline=8,this.paddingBlock=4,this.borderRadius=4,this.id=`tooltip-${(0,O.Ak)()}`,this.color=null!=e&&e.color?YS(e.color):this.color,this.backgroundColor=null!=e&&e.backgroundColor?YS(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?YS(e.color):this.color,this.backgroundColor=null!=e&&e.backgroundColor?YS(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 qS=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 JS extends OS{constructor(e,t){var n,r,o;super(),this.visualizer=void 0,this.symbol=qS.default,this.focusId="",this.id="cursor",this.color=YS("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=yS(t),this.offsetY=bS(t),this.x=xS(e,t),this.y=wS(e,t),this.invoke("mouseMove",[e,this]),this.visualizer.invoke("mouseMove",[e,this])},this.id=`cursor-${(0,O.Ak)()}`,this.visualizer=t,this.color=null!=e&&e.color?YS(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 QS.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?gS(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 ej?(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?gS(1.5*this.opacity,0,1):this.opacity,this._context.globalCompositeOperation=this.compositeOperation,this._context.imageSmoothingEnabled=!1,n}createOffscreenCanvas(){let e;if(lS){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?gS(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(lS){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?gS(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 tj extends ej{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 ej(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 nj extends OS{constructor(e,t,n){var r,o,i,a,s,l,c;if(super(),this.id=void 0,this.color=YS("#ccc"),this.fillColor=YS("#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(qS.grabbing,"playhead");const t=e=>{if(this.isDragging){e.preventDefault(),e.stopPropagation();const t=this.visualizer.container.getBoundingClientRect(),n=e.clientX-t.left,r=gS(n,0,this.visualizer.width);r!==this._x&&(this.setX(r),this.wf.currentTime=SS(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(qS.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(qS.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(qS.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,O.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?gS(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 rj 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",rj);class oj extends OS{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=YS("rgba(0, 0, 0, 0.1)"),this.backgroundColor=YS("#fff"),this.waveColor=YS("#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=cS.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=gS(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=gS(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?YS(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?YS(e.gridColor):this.gridColor,this.gridWidth=null!=(m=e.gridWidth)?m:this.gridWidth,this.backgroundColor=e.backgroundColor?YS(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 nj(Object.assign({},e.playhead,{x:0,color:YS("#000"),fillColor:YS("#BAE7FF"),width:null!=(v=e.cursorWidth)?v:1}),this,this.wf),this.initialRender(),this.attachEvents()}init(e){this.init=()=>uS("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=gS(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 uS("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=gS(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=gS(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=gS(n*this.samplesPerPx,0,t),o=gS(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=gS(this.width+u-2,0,this.width)),c=gS(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+(cS.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=gS(o-this.samplesPerPx,0,r)}}catch(e){}}e.stroke(),e.restore()}renderChunk(e,t,n,r,o){t.save();vS(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 ej(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 tj({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(gS(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 ij extends OS{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=YS("#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=SS(e,o,a),l=CS(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(qS.colResize):this.switchCursor(qS.grab))},this.handleMouseUp=e=>{this.updateable&&(this.isDragging&&(this.switchCursor(qS.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=xS(e,s)+d;u<0&&(u=0);const h=CS(u-r,l,c),g=i-o,m=n?o+h:gS(o+h,0,this.duration-g),p=t?o:m,f=n?i:gS(i+h,m+(a?0:g),this.duration);t||n?this.switchCursor(qS.colResize):this.switchCursor(qS.grabbing),this.updatePosition(gS(p,0,c),gS(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=xS(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,O.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=YS(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===cS.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||cS.timelineHeight}get timelinePlacement(){return this.visualizer.timelinePlacement||cS.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![qS.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 aj extends ij{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?YS(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?YS(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 sj{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=YS("#787878"),this.drawingColor=YS("#787878"),this.labels=void 0,this.createable=!0,this.updateable=!0,this.deleteable=!0,this.drawableTarget=ij,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 aj(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=gS(xS(e,r)+l,0,i);const c=CS(n,o,s),d=CS(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=gS(xS(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(qS.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?YS(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=aj}segmentDrawableTarget(){this.drawableTarget=ij}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===aj?new aj(e,this.waveform,this.visualizer,this):new ij(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 aj(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 ij(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=YS(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===cS.timelinePlacement&&null!=l&&l.isVisible?a:0,d=xS(e,o),u=wS(e,o);if(!pS(d,n,n+r))return!1;return pS(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 lj{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=cS.timelineHeight,this.initHeight=cS.timelineHeight,this.fontSize=12,this.gridWidth=1,this.fontFamily="Arial",this.fontColor=YS("#413C4A"),this.selectionColor=YS("rgba(65, 60, 74, 0.08)"),this.gridColor=YS("rgba(137,128,152,0.16)"),this.backgroundColor=YS("#fff"),this._labeMaxWidth={true:0,false:0},this.waveform=t,this.visualizer=n,this.placement=(null==e?void 0:e.placement)||cS.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:cS.timelinePlacement)?null!=(a=null==e?void 0:e.height)?a:cS.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?YS(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?YS(null==e?void 0:e.gridColor):this.gridColor,this.backgroundColor=null!=e&&e.backgroundColor?YS(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=mS(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 cj extends OS{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(qS.crosshair)}),1);const n=SS(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(qS.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 DS(this,{src:this.src}),this.tooltip=new XS(null==(e=this.params)?void 0:e.tooltip),this.visualizer=new oj(this.params,this),this.cursor=new JS(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 lj(Object.assign({gridColor:this.params.gridColor,gridWidth:this.params.gridWidth},null==(o=this.params)?void 0:o.timeline),this,this.visualizer),this.regions=new sj(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 VS(this):new zS(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=gS(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 dj=["waveform"],uj=(0,v.PA)((({item:e})=>{var t;const n=(0,m.useRef)(),r=((e,t)=>{var n,r,o,i;const a=(0,m.useRef)(),{showLabels:s=!0}=t,[l,c]=(0,m.useState)(1),[d,u]=(0,m.useState)(null!=(n=null==t?void 0:t.volume)?n:1),[h,g]=(0,m.useState)(!1),[p,f]=(0,m.useState)(0),[v,y]=(0,m.useState)(0),[b,x]=(0,m.useState)(null!=(r=null==t?void 0:t.amp)?r:1),[w,C]=(0,m.useState)(null!=(o=null==t?void 0:t.rate)?o:1),[S,j]=(0,m.useState)(null!=(i=null==t?void 0:t.muted)&&i),[k,O]=(0,m.useState)([]),[R,E]=(0,m.useState)(new Map),_=(0,m.useRef)(null==t?void 0:t.onFrameChanged);_.current=null==t?void 0:t.onFrameChanged;const A=(0,m.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,m.useEffect)((()=>{const n=new cj(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&&!jS(e,v,p)&&(null==t||null==t.onSeek||t.onSeek(e)),y(e)})),n.on("seek",(e=>{jS(e,v,p)||(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,m.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.zoom=l)}),[l]),(0,m.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.volume=d)}),[d]),(0,m.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.rate=w)}),[w]),(0,m.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.amp=b)}),[b]),(0,m.useEffect)((()=>{null==t||null==t.onPlaying||t.onPlaying(h)}),[h]),(0,m.useEffect)((()=>{a.current&&(a.current.muted=S)}),[S]),(0,m.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:p,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,nr.A)(r,dj);return(0,m.useEffect)((()=>{var t,n,r,i,a,s;const l=kr("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,E.jsxs)(Qe.eB,{name:"audio-tag",children:[null==(t=e.errors)?void 0:t.map(((e,t)=>(0,E.jsx)(Te,{error:e},`err-${t}`))),(0,E.jsx)("div",{ref:t=>{n.current=t,e.stageRef.current=t}}),(0,E.jsx)(_C,{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 hj=Mr,gj=Tn;(0,k.VS)(k.sg)&&(hj=aS),(0,k.VS)(k.vS)&&(hj=uj,gj=In),b.addTag("audio",gj,hj),b.addTag("audioplus",gj,hj),b.addObjectType(gj);var mj=n(78401);const pj=(0,v.PA)(class extends m.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,E.jsx)(mj.Wd,{opacity:.15,name:"ruler",children:Object.values(t).map(((t,n)=>(0,E.jsx)(mj.rw,{x:t.x,y:t.y,width:e.gridsize,height:e.gridsize,stroke:e.gridcolor,strokeWidth:1},n)))})}}),fj=(0,m.createContext)({expanded:!1}),vj=fj.Provider,yj=kr("SegmentationToolbar","Segmentation Tools"),bj={plus:"+",minus:"-"},xj=({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,p;let f=u;const v=null!=(g=null==o?void 0:o.dynamic)&&g,{expanded:y,alignment:b}=(0,m.useContext)(fj),[w,C]=(0,m.useState)(!1),S=(0,m.useMemo)((()=>{if(!(0,x.isDefined)(u))return null;const e=u.split(",").map((e=>e.trim()));return(0,E.jsx)(Qe.Sl,{name:"shortcut",children:e.map(((e,t)=>{const n=e.split("+");return(0,E.jsx)(m.Fragment,{children:n.map((e=>{var t;return(0,E.jsx)(Qe.Sl,{name:"key",tag:"kbd",children:null!=(t=bj[e])?t:e},e)}))},`${n.join("-")}-${t}`)}))})}),[u]);(0,m.useEffect)((()=>{const e=()=>{f&&yj.hasKey(f)&&yj.removeKey(f)};return e(),f=u,u&&!yj.hasKey(u)&&yj.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,m.useEffect)((()=>(e&&Object.entries(a).forEach((([e,[t,n]])=>{yj.hasKey(e)||yj.overwriteKey(e,n,t)})),()=>{Object.keys(a).forEach((e=>{yj.hasKey(e)&&yj.removeKey(e)}))})),[a,e]);const j=(0,m.useMemo)((()=>n&&r?(0,E.jsx)(Qe.Sl,{name:"extra",children:r}):null),[n,r]),k=!1===v&&(null==l?void 0:l.length)&&(e||i&&w),O=null==o||null==(p=o.annotation)?void 0:p.isDrawing,R=t||O;return(0,E.jsxs)(Qe.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,E.jsx)(Qe.Sl,{name:"icon",children:c}),!1===v&&!1===i&&(y?(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)(Qe.Sl,{name:"label",children:[j,d,S]})}):((0,x.isDefined)(d)||(0,x.isDefined)(S))&&!k&&(0,E.jsx)(Qe.Sl,{name:"tooltip",mod:{controlled:!(!n||!r)},children:(0,E.jsxs)(Qe.Sl,{name:"tooltip-body",children:[j,d,S]})})),k&&(0,E.jsx)(Qe.Sl,{name:"controls",onClickCapture:e=>e.stopPropagation(),children:(0,E.jsx)(Qe.Sl,{name:"controls-body",children:l})})]})},wj=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{ariaLabel:(0,g.toKebabCase)((0,u.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)}}))),Cj=u.gK.model("BaseTool",{smart:!1,unselectRegionOnToolChange:!1,removeDuplicatesNamed:u.gK.maybeNull(u.gK.string)}).volatile((()=>({dynamic:!1,index:1,canInteractWithRegions:!0}))).views((e=>({get toolName(){return(0,u.Pw)(e).name},get isSeparated(){return e.control.isSeparated},get viewClass(){return()=>e.shouldRenderView?(0,E.jsx)(wj,{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,E.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,u._$)(e),n=(0,u.Pw)(e),r=Object.assign({},(0,u.dV)(e),{smart:!1,default:!1}),o=Object.assign({},t),i=n.create(r,o);i.makeDynamic(),(0,u._$)(e).manager.addTool(`${n.name}-smart`,i,e.control.removeDuplicatesNamed)}},makeDynamic(){e.dynamic=!0}}))),Sj={X:3,Y:3},jj={width:30,height:30},kj={radius:30},Oj={length:30},Rj=Cj;const Ej=n.p+"rotate.90d3fb3da9d2ac1e3ee9dd0b990c641c.svg";function _j(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 Aj(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,_j(e))}class Tj extends kt.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=_j(r),i=n.x-o.x,a=n.y-o.y,s=Math.PI/2-Math.atan2(-a,i);t.content.style.cursor=`url(${Ej}) 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=kt.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(${Ej}) 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()}}}kt.A.LSTransformer=Tj;class Pj extends kt.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()}}}kt.A.LSTransformerOld=Pj;class Ij extends m.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,k.VS)(k.pG)?t.x:0,o+=a):a+e.width>t.width&&(o=t.width-a),s<0?(r=(0,k.VS)(k.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,k.VS)(k.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,E.jsx)(E.Fragment,{children:(0,E.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,E.jsx)(E.Fragment,{children:(0,E.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,k.VS)(k.id)?this.renderLSTransformer():this.renderOldLSTransformer():null}}const Lj={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"},Mj={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=et.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:""})},Kj=(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)&&Kj(e,e,o,r)}return r},Dj=(e,t)=>{const{name:n}=t.properties;return n&&!n.optionalValues&&void 0===e.name?Mj.required(t.name,"name"):null},Nj=(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 Mj.tagNotFound(t.name,"toname",e);if(r&&r.validate(o.tagName).length)return Mj.tagUnsupported(t.name,"toname",o.tagName,r)}return null},Vj=(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:Mj.parentTagUnexpected(t.name,"parent",e.tagName,t.properties.parentTypes)},zj=(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(Mj.badAttributeValueType(t.name,i,o,a))}return r},Bj=e=>{const t=[];return e.perregion&&e.peritem&&t.push(Mj.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 Hj=n(41984);const Fj=(0,v.WQ)("store")((0,v.PA)((({store:e,tools:t,expanded:n})=>{const[r,o]=(0,m.useState)(null),i=(()=>{const[e,t]=(0,m.useState)({width:window.innerWidth,height:window.innerWidth});return(0,m.useEffect)((()=>{const e=()=>{t({width:window.innerWidth,height:window.innerWidth})};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e})(),a=(0,m.useMemo)((()=>{if(!(0,x.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,E.jsx)(vj,{value:{expanded:n,alignment:a},children:(0,E.jsxs)(Qe.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,E.jsx)(Qe.Sl,{name:"group",children:r.sort(((e,t)=>e.index-t.index)).map(((e,t)=>{const n=e.viewClass;return(0,E.jsx)(n,{},`${e.toolName}-${t}`)}))},`toolset-${e}-${n}`):null})),e.autoAnnotation&&(0,E.jsx)(Wj,{tools:l})]})})}))),Wj=(0,v.PA)((({tools:e})=>{const[t,n]=(0,m.useState)(Math.max(e.findIndex((e=>e.selected)),0)),r=(0,m.useMemo)((()=>e[t]),[t]),o=e.some((e=>e.selected));return e.length>0&&(0,E.jsx)(Qe.Sl,{name:"group",children:(0,E.jsx)(xj,{smart:!0,label:"Auto-Detect",active:o,icon:r.iconClass,shortcut:"M",extra:e.length>1?(0,E.jsx)(Qe.Sl,{name:"smart",children:e.map(((e,t)=>{const r=e.viewClass;return(0,E.jsx)("div",{onClickCapture:r=>{r.preventDefault(),n(t),e.manager.selectTool(e,!0)},children:(0,E.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)}})})})),$j=(0,m.createContext)({suggestion:!1}),Uj=$j.Provider;var Zj=n(21015);const Gj=(0,m.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,m.useState)(!1);return(0,E.jsxs)(Qe.eB,{name:"pagination",mod:{size:e,outline:i,align:a,noPadding:s},children:[(0,E.jsxs)(Qe.Sl,{name:"navigation",children:[(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Yj,{mod:["arrow-left","arrow-left-double"],onClick:()=>null==d?void 0:d(1),disabled:1===n}),(0,E.jsx)(Qe.Sl,{name:"divider"})]}),(0,E.jsx)(Yj,{mod:["arrow-left"],onClick:()=>null==d?void 0:d(n-1),hotkey:null==c?void 0:c.prev,disabled:1===n}),(0,E.jsx)(Qe.Sl,{name:"input",children:h?(0,E.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,E.jsxs)(Qe.Sl,{name:"page-indicator",onClick:()=>{g(!0)},children:[n," ",(0,E.jsxs)("span",{children:["of ",o]}),(0,E.jsx)("div",{onClick:()=>{}})]})}),(0,E.jsx)(Yj,{mod:["arrow-right"],onClick:()=>null==d?void 0:d(n+1),disabled:n===o,hotkey:null==c?void 0:c.next}),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"divider"}),(0,E.jsx)(Yj,{mod:["arrow-right","arrow-right-double"],onClick:()=>null==d?void 0:d(o),disabled:n===o})]})]}),l&&(0,E.jsx)(Qe.Sl,{name:"page-size",children:(0,E.jsx)("select",{value:r,onChange:e=>{null==d||d(1,e.currentTarget.value)},children:t.map(((e,t)=>(0,E.jsxs)("option",{value:e,children:[e," per page"]},t)))})})]})})),Yj=({mod:e,disabled:t,hotkey:n,onClick:r})=>{const o=Object.fromEntries(e.map((e=>[e,!0]))),i=(0,m.useCallback)((()=>{t||r()}),[t,r]);return o.disabled=!0===t,qa(n,i),n?(0,E.jsx)(kr.Tooltip,{name:n,children:(0,E.jsx)(Qe.Sl,{name:"btn",mod:o,onClick:i})}):(0,E.jsx)(Qe.Sl,{name:"btn",mod:o,onClick:i})},Xj=["item"];kt.A.showWarnings=!1;const qj=kr("Image"),Jj={};(0,k.VS)(k.xS)&&(Jj.crossOrigin="anonymous");const Qj=e=>{const t=[],n=[],r=e.length;let o=0;for(;o(0,k.VS)(k.Kg)?(0,Zj.q3)((()=>K.renderItem(e,e.annotation,!0))):(0,Zj.q3)((()=>e.inSelection!==t?null:K.renderItem(e,e.annotation,!1))))),tk=(0,m.memo)((({regions:e,name:t,useLayers:n,showSelected:r=!1})=>{const o=e.map((e=>(0,E.jsx)(ek,{region:e,showSelected:r},`region-${e.id}`)));return!1===n?o:(0,E.jsx)(mj.Wd,{name:t,children:o})})),nk=(0,m.memo)((({regions:e,useLayers:t=!0,chunkSize:n=15,suggestion:r=!1,showSelected:o=!1})=>(0,E.jsx)(Uj,{value:{suggestion:r},children:(n?(0,x.chunks)(e,n):e).map(((e,n)=>(0,E.jsx)(tk,{name:`chunk-${n}`,regions:e,useLayers:t,showSelected:o},`chunk-${n}`)))}))),rk=(0,v.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?m.Fragment:mj.Wd;return(0,E.jsx)(n,{children:t?(0,E.jsx)(ek,{region:t},"drawing"):t})})),ok="#40A9FF",ik="white",ak=[3,3],sk=(0,v.PA)((({item:e,selectionArea:t})=>{const{selectionBorders:n}=t;(0,k.VS)(k.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,k.VS)(k.MV)?6/e.stageScale:6;return(0,E.jsxs)(E.Fragment,{children:[n&&(0,E.jsx)(mj.rw,{name:"regions_selection",x:n.left,y:n.top,width:n.right-n.left,height:n.bottom-n.top,stroke:ok,strokeWidth:1,strokeScaleEnabled:!1,listening:!1}),r.map(((e,t)=>(0,E.jsx)(mj.rw,{x:e.x-o/2,y:e.y-o/2,width:o,height:o,fill:ok,stroke:ik,strokeWidth:2,strokeScaleEnabled:!1,listening:!1},t)))]})})),lk=(0,v.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,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(mj.rw,Object.assign({},i,{stroke:ok,dash:ak,strokeScaleEnabled:!1})),(0,E.jsx)(mj.rw,Object.assign({},i,{stroke:ik,dash:ak,dashOffset:ak[0],strokeScaleEnabled:!1}))]})})),ck="transformer_back",dk=(0,v.PA)((({item:e})=>{const{selectedRegionsBBox:t}=e,n=1===e.selectedRegions.length,r=(0,m.useRef)({x:0,y:0});return(0,E.jsx)(mj.Wd,{children:t&&!n&&(0,E.jsx)(mj.rw,{id:ck,fill:"rgba(0,0,0,0)",draggable:!0,onClick:()=>{e.annotation.unselectAreas()},onMouseOver:t=>{e.annotation.isLinkingMode||(t.target.getStage().container().style.cursor=N.A.POINTER_CURSOR)},onMouseOut:e=>{e.target.getStage().container().style.cursor=N.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=At(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}}})})})),uk=(0,v.PA)((({item:e,selectedRegions:t})=>{if(!t)return null;const{brushRegions:n=[],shapeRegions:r=[]}=Qj(t);return(0,E.jsxs)(E.Fragment,{children:[(0,k.VS)(k.q$)?null:(0,E.jsx)(dk,{item:e}),n.length>0&&(0,E.jsx)(nk,{name:"brushes",regions:n,useLayers:!1,showSelected:!0,chankSize:0},"brushes"),r.length>0&&(0,E.jsx)(nk,{name:"shapes",regions:r,showSelected:!0,chankSize:0},"shapes")]})})),hk=(0,v.PA)((({item:e,selectionArea:t})=>{var n,r,o,i;const a=(0,k.VS)(k.MV)?1:1/(e.zoomScale||1),[s,l]=(0,m.useState)(!1),[c,d]=(0,m.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,m.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 p=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,E.jsxs)(mj.Wd,{scaleX:a,scaleY:a,children:[t.isActive?(0,E.jsx)(lk,{item:t}):!f&&e.selectedRegions.length>1?(0,E.jsx)(sk,{item:e,selectionArea:t}):null,(0,E.jsx)(Ij,{item:e,rotateEnabled:v,supportsTransform:!p&&f,supportsScale:y,selectedShapes:e.selectedRegions,singleNodeMode:1===e.selectedRegions.length,useSingleNodeRotation:1===e.selectedRegions.length&&v,draggableBackgroundSelector:`#${ck}`})]})})),gk=(0,v.PA)((e=>{let{item:t}=e,n=(0,nr.A)(e,Xj);const{selectionArea:r}=t;return(0,E.jsxs)(E.Fragment,{children:[(0,k.VS)(k.Kg)?(0,E.jsx)(mj.Wd,{name:"selection-regions-layer"}):(0,E.jsx)(uk,Object.assign({item:t,selectedRegions:t.selectedRegions},n)),(0,E.jsx)(hk,{item:t,selectionArea:r})]})})),mk=(0,m.memo)((0,m.forwardRef)((({width:e,height:t},n)=>{const[r,o]=(0,m.useState)([50,0,50,t]),[i,a]=(0,m.useState)([0,100,e,100]),[s,l]=(0,m.useState)(100),[c,d]=(0,m.useState)(50),[u,h]=(0,m.useState)(!1),g=[3,3],p=!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,E.jsxs)(mj.Wd,{name:"crosshair",listening:!1,opacity:u?.6:0,children:[(0,E.jsxs)(mj.YJ,{children:[(0,E.jsx)(mj.N1,{name:"v-white",points:i,stroke:"#fff",strokeWidth:1,strokeScaleEnabled:p}),(0,E.jsx)(mj.N1,{name:"v-black",points:i,stroke:"#000",strokeWidth:1,dash:g,strokeScaleEnabled:p})]}),(0,E.jsxs)(mj.YJ,{children:[(0,E.jsx)(mj.N1,{name:"h-white",points:r,stroke:"#fff",strokeWidth:1,strokeScaleEnabled:p}),(0,E.jsx)(mj.N1,{name:"h-black",points:r,stroke:"#000",strokeWidth:1,dash:g,strokeScaleEnabled:p})]})]})}))),pk=(0,v.PA)((({item:e})=>(0,k.VS)(k.bP)?(0,E.jsx)("canvas",{className:Lj.overlay,ref:t=>{e.setOverlayRef(t)},style:e.imageTransform}):null)),fk=(0,v.PA)(class extends m.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,m.createRef)(),this.crosshairRef=(0,m.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.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,x.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.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,u._$)(t).messages.ERR_LOADING_HTTP({attr:e.value,error:"",url:e.currentSrc});n.addErrors([Mj.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,E.jsxs)(mj.YJ,{name:"ruler",onClick:e=>{e.cancelBubble=!1},children:[(0,E.jsx)(mj.N1,{x:0,y:e.cursorPositionY,points:[0,0,e.stageWidth,0],strokeWidth:1,stroke:t,tension:0,dash:[4,4],closed:!0}),(0,E.jsx)(mj.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(),qj.addDescription("shift","Pan image")}componentWillUnmount(){this.detachObserver(),window.removeEventListener("resize",this.onResize),qj.removeDescription("shift")}componentDidUpdate(){this.onResize(),this.updateReadyStatus()}updateReadyStatus(){const{item:e}=this.props,{imageRef:t}=this;e&&(0,u._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,E.jsx)(Fj,{tools:n})}render(){const{item:e,store:t}=this.props;if(!(0,u._n)(e))return null;if(!t.task||!e.currentSrc)return null;const n={},r=Lj.container,o=!!e.isMultiItem;!1===(0,u.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=[Lj.image_position,Lj[`image_position__${"center"===e.verticalalignment?"middle":e.verticalalignment}`],Lj[`image_position__${e.horizontalalignment}`]],a=[Lj.wrapperComponent,e.images.length>1?Lj.withGallery:Lj.wrapper];o&&a.push(Lj.withPagination);const[s,l]=(0,k.VS)(k.F2)?[!0,!1]:[e.hasTools,e.stageWidth<=1],c=e.imageIsLoaded||!(0,k.VS)(k.F2);return(0,E.jsxs)(Kn,{item:e,className:a.join(" "),children:[o?(0,E.jsx)("div",{className:Lj.pagination,children:(0,E.jsx)(Gj,{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,E.jsxs)("div",{ref:t=>{e.setContainerRef(t),this.attachObserver(t)},className:r,style:n,children:[(0,E.jsx)("div",{ref:e=>{this.filler=e},className:Lj.filler,style:{width:"100%",marginTop:e.fillerHeight}}),(0,k.VS)(k.F2)?(0,E.jsx)(it,{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,E.jsx)(pk,{item:e})}):(0,E.jsxs)("div",{className:[Lj.frame,...i].join(" "),style:e.canvasSize,children:[(0,E.jsx)("img",{ref:t=>{e.setImageRef(t),this.imageRef.current=t},loading:(0,k.VS)(k.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,E.jsx)(pk,{item:e})]}),l||!s?(0,E.jsx)("div",{className:Lj.loading,children:(0,E.jsx)(Hj.A,{})}):c?(0,E.jsx)(vk,{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,E.jsx)("div",{className:Lj.gallery,children:e.images.map(((t,n)=>(0,m.createElement)("img",Object.assign({},Jj,{alt:"",key:t,src:t,className:n===e.currentImage&&Lj.active,height:"60",onClick:()=>e.setCurrentImage(n)}))))})]})}}),vk=(0,v.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,k.VS)(k.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,E.jsx)(mj.BI,{ref:t=>{e.setStageRef(t)},className:[Lj["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,E.jsx)(yk,{item:e,store:h,state:n,crosshairRef:u})})})),yk=(0,v.PA)((({item:e,store:t,state:n,crosshairRef:r})=>{if(!(0,u._n)(e))return null;if(!t.task||!e.currentSrc)return null;const o=e.regs,i=!!e.isMultiItem,a=[Lj.wrapperComponent,e.images.length>1?Lj.withGallery:Lj.wrapper];i&&a.push(Lj.withPagination);const{brushRegions:s,shapeRegions:l}=Qj(o),{brushRegions:c,shapeRegions:d}=Qj(e.suggestions),h=Object.entries({brush:s,shape:l,suggestedBrush:c,suggestedShape:d});return(0,E.jsxs)(E.Fragment,{children:[0===o.length&&(0,E.jsx)(mj.Wd,{children:(0,E.jsx)(mj.N1,{points:[0,0,0,1],stroke:"rgba(0,0,0,0)"})}),e.grid&&e.sizeUpdated&&(0,E.jsx)(pj,{item:e}),(0,k.VS)(k.q$)?(0,E.jsx)(dk,{item:e}):null,h.map((([e,t])=>{const n=null!==e.match(/brush/i),r=null!==e.match("suggested");return t.length>0?(0,E.jsx)(nk,{name:e,regions:t,useLayers:!1===n,suggestion:r},e):(0,E.jsx)(m.Fragment,{},e)})),(0,E.jsx)(gk,{item:e,isPanning:n.isPanning}),(0,E.jsx)(rk,{item:e}),e.crosshair&&(0,E.jsx)(mk,{ref:r,width:(0,k.VS)(k.pG)?e.containerWidth:e.stageWidth,height:(0,k.VS)(k.pG)?e.containerHeight:e.stageHeight})]})}));var bk=n(78438);const xk=[4,4,0,0],wk=({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 p;const f=20,v=1/a,[y,b]=(0,m.useState)(),x=r?34:0,w=Math.max(0,l*a-25-x),C=!!w,{suggestion:S}=null!=(p=(0,m.useContext)($j))?p:{},j=(0,m.useMemo)((()=>{if(!o||!y||!l)return null;return(n?y.measureSize(n).width:0)>w?w:null}),[y,n,l,v]),k=(0,m.useCallback)(((e,t)=>{const n=h&&C?xk: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,E.jsxs)(mj.YJ,{strokeScaleEnabled:!1,x:e,y:t,rotation:i,children:[!!r&&(0,E.jsxs)(mj.JU,{y:-20*v,scaleX:v,scaleY:v,onClick:()=>!1,children:[(0,E.jsx)(mj.vw,{fill:un.Colors.getScaleGradient(r),cornerRadius:2}),(0,E.jsx)(mj.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,E.jsxs)(mj.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,E.jsx)(mj.vw,{fill:s,cornerRadius:4,sceneFunc:k,offsetX:20}),(0,E.jsx)(mj.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:N.A.SHOW_LABEL_FILL,padding:0})]}),(0,E.jsx)(mj.wA,{x:2*v+x*v,y:2*v-f*v,scaleX:v,scaleY:v,fill:N.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},Ck=(0,v.PA)((({item:e,color:t,strokewidth:n})=>{const r=!!e.texting,o=e.getLabelText(","),i=e.parent,a=e.parent.zoomScale||1;return(0,E.jsx)(wk,{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,u.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})})),Sk=(0,v.PA)((({item:e,color:t,strokewidth:n})=>{const r=!!e.texting,o=e.getLabelText(","),i=e.parent,a=e.parent.zoomScale||1;return(0,E.jsx)(wk,{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,u.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,rotation:e.rotation,color:t,maxWidth:i.internalToCanvasX(e.width)+n,adjacent:!0,onClickLabel:e.onClickLabel})})),jk=(0,v.PA)((({item:e,color:t})=>{var n;const r=!!e.texting,o=e.getLabelText(","),i=e.bboxCoordsCanvas;if(!i)return null;const a=(0,u.Zn)(e).settings;return(0,E.jsxs)(m.Fragment,{children:[a.showLabels&&(0,E.jsx)(mj.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,E.jsx)(wk,{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})]})})),kk=(0,v.PA)((({item:e,color:t})=>{var n;const r=(0,u.Zn)(e).settings;if(!r.showLabels)return null;const o=!!e.texting,i=e.getLabelText(","),a=e.bboxCoordsCanvas;return a?(0,E.jsxs)(mj.YJ,{name:"region-label",children:[(0,E.jsx)(mj.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,E.jsx)(wk,{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})),Ok=(0,v.PA)((({item:e,color:t})=>{const n=!!e.texting,r=e.getLabelText(",");return(0,E.jsx)(wk,{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,u.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})})),Rk=(0,v.PA)((({reg:e,box:t,color:n,scale:r,strokeWidth:o,adjacent:i=!1})=>{const a=!!e.texting,s=e.getLabelText(",");return(0,E.jsx)(wk,{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})})),Ek=u.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.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 _k=n(87261);const Ak=["item"],Tk=(e,t)=>{const n=(0,v.PA)(e);return(0,v.PA)((e=>{let{item:r}=e,o=(0,nr.A)(e,Ak);const i=(null==t?void 0:t.renderHidden)||!r.hidden,a=!(0,k.VS)(k.Kg)||(null==t?void 0:t.shouldNotUsePortal),s=a?m.Fragment:_k.ZL,l=a?{}:{selector:".selection-regions-layer",enabled:r.inSelection},c=!!r.annotation,d=(0,m.useCallback)((e=>{(0,u._n)(r)&&r.setShapeRef(e)}),[r]);return c&&(0,u._n)(r)&&i?(0,E.jsx)(s,Object.assign({},l,{children:(0,E.jsx)(n,Object.assign({item:r},o,{setShapeRef:d}))})):null}))},Pk=(0,v.PA)((({item:e,useLayer:t})=>{const n=(e=>{const{shapeRef:t,bboxCoordsCanvas:n}=e;let r,o,i,a;if((0,x.isDefined)(n))[r,o,i,a]=[n.right-n.left,n.bottom-n.top,n.left,n.top];else{if(!(0,x.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,m.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,E.jsxs)(mj.YJ,Object.assign({},a,s,{opacity:e.highlighted||r?1:.5,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[(0,E.jsx)(mj.rw,{x:0,y:0,width:64,height:32,fill:"#000",cornerRadius:16}),(0,E.jsx)(Ik,{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,E.jsx)(Ik,{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,E.jsx)(mj.Wd,Object.assign({},a,l,{children:c})):c}return null})),Ik=({x:e=0,fill:t,iconColor:n,onClick:r,icon:o})=>{const[i,a]=(0,m.useState)(new window.Image),s=Ct()(null!=n?n:"#fff"),[l,c]=(0,m.useState)(!1);(0,m.useEffect)((()=>{const e=new window.Image;e.onload=()=>{a(e)},e.width=12,e.height=12,e.src=o}),[o]);const d=(0,m.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,E.jsxs)(mj.YJ,{x:e,width:32,height:32,onClick:r,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:[(0,E.jsx)(mj.jl,{x:16,y:16,radius:14,opacity:l?1:.2,fill:l?t:"#fff"}),(0,E.jsx)(mj._V,{ref:e=>d(e),x:8,y:8,width:16,height:16,image:i,filters:[kt.A.Filters.RGB]})]})},Lk=(0,v.PA)((({item:e,children:t})=>{var n;const{suggestion:r}=null!=(n=(0,m.useContext)($j))?n:{};return(0,E.jsxs)(m.Fragment,{children:[t,r&&(0,E.jsx)(Pk,{item:e,useLayer:"brushregion"===e.type})]})})),Mk={shadowColor:"red",shadowBlur:1,shadowOffsetY:2,shadowOffsetX:2,shadowOpacity:1},Kk=u.gK.model("Points",{id:u.gK.optional(u.gK.identifier,R),type:u.gK.optional(u.gK.enumeration(["add","eraser"]),"add"),points:u.gK.array(u.gK.number),relativePoints:u.gK.array(u.gK.number),strokeWidth:u.gK.optional(u.gK.number,25),relativeStrokeWidth:u.gK.optional(u.gK.number,25),eraserSize:u.gK.optional(u.gK.number,25)}).views((e=>({get store(){return(0,u.Zn)(e)},get parent(){return(0,u.p7)(e,2)?(0,u.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}))),Dk=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"brushregion",object:u.gK.late((()=>u.gK.reference(BR))),coordstype:u.gK.optional(u.gK.enumeration(["px","perc"]),"perc"),rle:u.gK.frozen(),maskDataURL:u.gK.frozen(),touches:u.gK.array(Kk),currentTouch:u.gK.maybeNull(u.gK.reference(Kk))}).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,u._n)(e)?e.object:null},get colorParts(){const t=e.style||e.tag||N.l;return(0,xt.colorToRGBAArray)(t.strokecolor)},get strokeColor(){return(0,xt.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,k.VS)(k.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,k.VS)(k.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=Kk.create({id:R(),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=bk.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=bk.A.Region2RLE(e,n);if(!t||!t.length)return null;r.rle=Array.from(t)}return e.parent.createSerializedResult(e,r)}}})),Nk=u.gK.compose("BrushRegionModel",ut,Xe,bt,Ek,ze,Dk),Vk=(0,v.PA)((({item:e,setShapeRef:t,pointsList:n})=>{const r=(0,m.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,m.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,E.jsx)(mj.yp,{ref:e=>t(e),sceneFunc:o,hitFunc:i})})),zk=Tk((({item:e,setShapeRef:t})=>{var n,r,o,i,a,s,l,c,d,h,g,p;const[f,v]=(0,m.useState)(),{suggestion:y}=null!=(n=(0,m.useContext)($j))?n:{};(0,m.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,k.VS)(k.bP)?t=await bk.A.maskDataURL2Image(e.maskDataURL,{color:e.strokeColor}):e.rle&&(t=bk.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,m.useMemo)((()=>{let t;return(n,r)=>{if(f){if(!t){n.drawImage(f,0,0,e.parent.stageWidth,e.parent.stageHeight),t=(0,k.VS)(k.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,xt.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,m.useRef)(new window.Image),C=(0,m.useRef)(),S=(0,m.useRef)({});S.current.highlighted=e.highlighted,S.current.highlight=S.current.highlighted?Mk:{shadowOpacity:0};const j=(0,m.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==(h=e.parent)?void 0:h.stageWidth,null==(g=e.parent)?void 0:g.stageHeight,e.maskDataURL,e.rle,f]),O=(0,m.useCallback)((t=>{(0,u._n)(e)&&e.setLayerRef(t)}),[e]);if(!e.parent)return null;const R=null==(p=e.parent)?void 0:p.stageRef,_=(0,k.VS)(k.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,k.VS)(k.pG)?{x:0,y:0,width:e.parent.stageWidth,height:e.parent.stageHeight}:null;return(0,E.jsxs)(Lk,{item:e,children:[(0,E.jsx)(mj.Wd,{id:e.cleanId,ref:e=>{O(e),C.current=e},onDraw:()=>{setTimeout(j)},clearBeforeDraw:!e.isDrawing,visible:!e.hidden,clip:A,children:(0,E.jsxs)(mj.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,k.VS)(k.pG)){const t=e.parent.getToolsManager().findSelectedTool(),n=t&&"MoveTool"===(0,u.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,E.jsx)(mj._V,{image:f,hitFunc:b,width:e.parent.stageWidth,height:e.parent.stageHeight}),(0,E.jsx)(mj.YJ,{children:(0,E.jsx)(Vk,{store:x,item:e,pointsList:e.touches,setShapeRef:t})}),(0,E.jsx)(mj._V,Object.assign({name:"highlight",image:w.current,sceneFunc:S.current.highlighted?null:()=>{},hitFunc:()=>{}},S.current.highlight,_,{listening:!1}))]})}),(0,E.jsx)(mj.Wd,{id:`${e.cleanId}_labels`,ref:t=>{t&&(t.canvas._canvas.style.opacity=e.opacity)},children:(0,E.jsx)(mj.YJ,{children:(0,E.jsx)(kk,{item:e,color:e.strokeColor})})})]})}),{renderHidden:!0,shouldNotUsePortal:!0});b.addTag("brushregion",Nk,zk),b.addRegionType(Nk,"image",(e=>e.rle||e.touches||e.maskDataURL));const Bk={defaultOpacity:N.l.opacity,defaultFillColor:N.l.fillcolor,defaultStrokeColor:N.l.strokecolor,defaultStrokeColorHighlighted:N.A.HIGHLIGHTED_STROKE_COLOR,defaultStrokeWidth:N.l.strokewidth,defaultStrokeWidthHighlighted:N.A.HIGHLIGHTED_STROKE_WIDTH,defaultSuggestionWidth:N.A.SUGGESTION_STROKE_WIDTH},Hk=(e,t={})=>{var n,r;const{suggestion:o}=null!=(n=(0,m.useContext)($j))?n:{},[i,a]=(0,m.useState)(e.highlighted),[s,l]=(0,m.useState)(null!=(r=e.fill)?r:t.useStrokeAsFill||t.includeFill),c=(0,m.useMemo)((()=>(({region:e,highlighted:t=!1,shouldFill:n=!1,useStrokeAsFill:r=!1,sameStrokeWidthForSelected:o=!1,suggestion:i=!1,defaultOpacity:a=N.l.opacity,defaultFillColor:s=N.l.fillcolor,defaultStrokeColor:l=N.l.strokecolor,defaultStrokeColorHighlighted:c=N.A.HIGHLIGHTED_STROKE_COLOR,defaultStrokeWidth:d=N.l.strokewidth,defaultStrokeWidthHighlighted:u=N.A.HIGHLIGHTED_STROKE_WIDTH,defaultSuggestionWidth:h=N.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,x.isDefined)(y)?y:null==f?void 0:f.opacity,w=n?Ct()(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:Ct()(null!=(p=null==f?void 0:f.strokecolor)?p:l).css(),fillColor:w,strokeWidth:i?h:v&&!o?u:+(null!=(C=null==f?void 0:f.strokewidth)?C:d)}})(Object.assign({},Bk,null!=t?t:{},{highlighted:i,shouldFill:s,region:e,suggestion:o}))),[e,o,t,i,s]);return(0,m.useEffect)((()=>{const t=["highlighted","fill"].map((t=>{try{return(0,d.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 Fk(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,x.minMax)(s.map((e=>e.x))),[d,u]=(0,x.minMax)(s.map((e=>e.y)));return{left:l+n.x,right:c+n.x,top:d+n.y,bottom:u+n.y}}const Wk=u.gK.model({coordstype:u.gK.optional(u.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)*tt,e.relativeY=n/(null==(s=e.parent)?void 0:s.stageHeight)*nt,e.relativeRadiusX=r/(null==(l=e.parent)?void 0:l.stageWidth)*tt,e.relativeRadiusY=o/(null==(c=e.parent)?void 0:c.stageHeight)*nt,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/tt,e.y=o*e.relativeY/nt,e.radiusX=r*e.relativeRadiusX/tt,e.radiusY=o*e.relativeRadiusY/nt):"perc"===e.coordstype&&(e.x=r*e.x/tt,e.y=o*e.y/nt,e.radiusX=r*e.radiusX/tt,e.radiusY=o*e.radiusY/nt,e.coordstype="px")}}))),$k=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"ellipseregion",object:u.gK.late((()=>u.gK.reference(BR))),x:u.gK.number,y:u.gK.number,radiusX:u.gK.number,radiusY:u.gK.number,rotation:0}).volatile((()=>({startX:0,startY:0,scaleX:1,scaleY:1,opacity:u.gK.number,fill:!0,fillColor:N.A.FILL_COLOR,fillOpacity:.2,strokeColor:N.A.STROKE_COLOR,strokeWidth:N.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,u.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:Fk(t,e.rotation,{x:e.x,y:e.y},e.parent.whRatio)},get canvasX(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasRadiusX(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.radiusX):e.radiusX},get canvasRadiusY(){var t;return(0,k.VS)(k.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=Hk(e),a=null==(n=e.parent)?void 0:n.stageRef,{suggestion:s}=null!=(r=(0,m.useContext)($j))?r:{};return e.parent&&e.inViewPort?(0,E.jsxs)(m.Fragment,{children:[(0,E.jsx)(mj.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:Tt(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=N.A.LINKING_MODE_CURSOR):a.container().style.cursor=N.A.POINTER_CURSOR},onMouseOut:()=>{a.container().style.cursor=N.A.DEFAULT_CURSOR,o.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||(o.annotationStore.selected.isLinkingMode&&(a.container().style.cursor=N.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))},draggable:!e.isReadOnly(),listening:!s}),(0,E.jsx)(Ck,{item:e,color:i.strokeColor,strokewidth:i.strokeWidth})]}):null}));b.addTag("ellipseregion",Uk,Zk),b.addRegionType(Uk,"image");const Gk=u.gK.model({coordstype:u.gK.optional(u.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*tt,e.relativeY=e.y/n*nt)}},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*tt,e.relativeY=o.y/e.parent.stageHeight*nt},updateImageSize(t,n,r,o){"px"===e.coordstype&&(e.x=r*e.relativeX/tt,e.y=o*e.relativeY/nt),"perc"===e.coordstype&&(e.x=r*e.x/tt,e.y=o*e.y/nt,e.width=r*e.width/tt,e.coordstype="px")}}))),Yk=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"keypointregion",object:u.gK.late((()=>u.gK.reference(BR))),x:u.gK.number,y:u.gK.number,width:u.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,u.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,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasWidth(){var t;return(0,k.VS)(k.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,k.VS)(k.MV)?e.x:e.convertXToPerc(e.x),y:(0,k.VS)(k.MV)?e.y:e.convertYToPerc(e.y),width:(0,k.VS)(k.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}}))),Xk=u.gK.compose("KeyPointRegionModel",ut,bt,Xe,Ek,mn,Yk,...(0,k.VS)(k.MV)?[]:[Gk]),qk=Tk((({item:e,setShapeRef:t})=>{var n,r,o,i;const{store:a}=e,{suggestion:s}=null!=(n=(0,m.useContext)($j))?n:{},l=Hk(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,E.jsxs)(m.Fragment,{children:[(0,E.jsx)(mj.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:Tt(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=N.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))}},c,{draggable:!e.isReadOnly(),listening:!s})),(0,E.jsx)(Ok,{item:e,color:l.strokeColor})]}):null}));b.addTag("keypointregion",Xk,qk),b.addRegionType(Xk,"image",(e=>"x"in e&&"y"in e&&"width"in e&&!("height"in e)));const Jk=u.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*tt,e.relativeY=e.y/e.stage.stageHeight*nt)},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*tt,e.relativeY=e.y/e.stage.stageHeight*nt},_setPos(t,n){e.initX=t,e.initY=n,e.relativeX=t/e.stage.stageWidth*tt,e.relativeY=n/e.stage.stageHeight*nt,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)}}))),Qk=u.gK.model("PolygonPoint",{id:u.gK.optional(u.gK.identifier,R),x:u.gK.number,y:u.gK.number,index:u.gK.number,style:"circle",size:"small"}).volatile((()=>({selected:!1}))).views((e=>({get parent(){return(0,u.p7)(e,2)?(0,u.PA)(e,2):null},get stage(){var t;return null==(t=e.parent)?void 0:t.parent},get annotation(){return(0,u.Zn)(e).annotationStore.selected},get canvasX(){var t;return(0,k.VS)(k.MV)?null==(t=e.stage)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,k.VS)(k.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()}))),eO=(0,k.VS)(k.MV)?Qk:u.gK.compose("PolygonPoint",Qk,Jk),tO=(0,v.PA)((({item:e,name:t})=>{if(!e.parent)return;const[n,r]=(0,m.useState)(!0),o=Hk(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,E.jsx)(mj.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,k.VS)(k.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,E.jsx)(mj.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 nO=n(67695);const rO=u.gK.model({coordstype:u.gK.optional(u.gK.enumeration(["px","perc"]),"perc")}).actions((e=>({updateImageSize(t,n,r,o){"px"===e.coordstype&&e.points.forEach((e=>{const t=r*e.relativeX/tt,n=o*e.relativeY/nt;e._setPos(t,n)})),e.annotation.sentUserGenerate||"perc"!==e.coordstype||e.points.forEach((t=>{const n=r*t.x/tt,i=o*t.y/nt;e.coordstype="px",t._setPos(n,i)}))}}))),oO=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"polygonregion",object:u.gK.late((()=>u.gK.reference(BR))),points:u.gK.array(u.gK.union(eO,u.gK.array(u.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,u.Zn)(e)},get bboxCoords(){var t;if(null==(t=e.points)||!t.length||!(0,u._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,k.VS)(k.MV)||(0,x.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:R(),x:t,y:n,size:e.pointSize,style:e.pointStyle,index:r})))),(0,k.VS)(k.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]=aO({flattenedPoints:n,cursorX:i,cursorY:a});!function({point:e,group:t,layer:n,zoom:r}){const o=sO({layer:n})||function({point:e,group:t,layer:n,zoom:r}){const o=new kt.A.Circle({name:"hoverAnchor",x:e[0],y:e[1],stroke:nO.green.primary,fill:nO.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}){lO({layer:e.currentTarget.getLayer()})},handleLineClick({e:t,flattenedPoints:n,insertIdx:r}){if(!e.closed||!e.selected)return;t.cancelBubble=!0,lO({layer:t.currentTarget.getLayer()});const{offsetX:o,offsetY:i}=t.evt,[a,s]=e.parent.fixZoomedCoords([o,i]),l=aO({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,u.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:R(),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:R(),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,u.Yo)(e.points),(0,u.zr)(e.points)},afterUnselectRegion(){e.selectedPoint&&(e.selectedPoint.selected=!1)},setScale(t,n){e.scaleX=t,e.scaleY=n},updateImageSize(){},serialize(){if(!(0,k.VS)(k.vz)&&e.points.length<3)return null;const t=Object.assign({points:(0,k.VS)(k.MV)?e.points.map((e=>[e.x,e.y])):e.points.map((t=>[e.convertXToPerc(t.x),e.convertYToPerc(t.y)]))},(0,k.VS)(k.vz)?{closed:e.closed}:{});return e.parent.createSerializedResult(e,t)}}))),iO=u.gK.compose("PolygonRegionModel",ut,bt,Xe,Ek,oO,...(0,k.VS)(k.MV)?[]:[rO]);function aO({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 sO({layer:e}){return e.findOne(".hoverAnchor")}function lO({layer:e}){const t=sO({layer:e});t&&(t.destroy(),e.draw())}const cO=(0,m.memo)((0,v.PA)((({item:e,colors:t,dragProps:n,draggable:r})=>{const{flattenedPoints:o}=e,i="poly";return(0,E.jsx)(mj.YJ,{name:i,children:(0,E.jsx)(mj.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)}))),dO=(0,v.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,E.jsx)(mj.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,E.jsx)(mj.N1,Object.assign({lineJoin:"round",opacity:1,points:l,hitStrokeWidth:20,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1},c))},e)})),uO=(0,m.memo)((0,v.PA)((({item:e,regionStyles:t})=>{const{points:n,closed:r}=e,o="borders";return!e.closed||!e.parent.useTransformer&&e.selected?(0,E.jsx)(mj.YJ,{name:o,children:n.map(((o,i)=>{const a=i,s=i===n.length-1?0:i+1;return r||0!==s?(0,E.jsx)(dO,{name:`border_${a}_${s}`,item:e,idx:a,p1:n[i],p2:n[s],closed:r,regionStyles:t},`border_${a}_${s}`):null}))},o):null}))),hO=Tk((({item:e,setShapeRef:t})=>{var n,r,o,i;const{store:a}=e,{suggestion:s}=null!=(n=(0,m.useContext)($j))?n:{},l=Hk(e,{useStrokeAsFill:!0});const c=(0,m.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:Tt(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,m.useEffect)((()=>{(0,k.VS)(k.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,E.jsxs)(mj.YJ,Object.assign({name:e.id,ref:e=>t(e),onMouseOver:()=>{a.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),d.container().style.cursor=N.A.LINKING_MODE_CURSOR):d.container().style.cursor=N.A.POINTER_CURSOR},onMouseOut:()=>{d.container().style.cursor=N.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=N.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,E.jsx)(jk,{item:e,color:l.strokeColor}),e.mouseOverStartPoint,e.points&&e.closed?(0,E.jsx)(cO,{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,E.jsx)(uO,{item:e,regionStyles:l}):null,e.points&&!e.isReadOnly()?function(t){const n="anchors";return!e.closed||!e.parent.useTransformer&&e.selected?(0,E.jsx)(mj.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,E.jsx)(tO,{item:o,name:r},r)}({points:t,idx:r})))},n):null}(e.points):null]}),e.id?e.id:R(5))}));b.addTag("polygonregion",iO,hO),b.addRegionType(iO,"image",(e=>!!e.points));const gO=u.gK.model({coordstype:u.gK.optional(u.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)*tt,e.relativeY=n/(null==(s=e.parent)?void 0:s.stageHeight)*nt,e.relativeWidth=r/(null==(l=e.parent)?void 0:l.stageWidth)*tt,e.relativeHeight=o/(null==(c=e.parent)?void 0:c.stageHeight)*nt,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/tt,e.y=o*e.relativeY/nt,e.width=r*e.relativeWidth/tt,e.height=o*e.relativeHeight/nt):"perc"===e.coordstype&&(e.x=r*e.x/tt,e.y=o*e.y/nt,e.width=r*e.width/tt,e.height=o*e.height/nt,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)}}))),mO=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"rectangleregion",object:u.gK.late((()=>u.gK.reference(BR))),x:u.gK.number,y:u.gK.number,width:u.gK.number,height:u.gK.number,rotation:0,rotationAtCreation:0}).volatile((()=>({startX:0,startY:0,scaleX:1,scaleY:1,opacity:1,fill:!0,fillColor:"#ff8800",fillOpacity:.2,strokeColor:N.A.STROKE_COLOR,strokeWidth:N.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,u.Zn)(e)},get parent(){return(0,u._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?Fk(t,e.rotation,{x:e.x,y:e.y},e.parent.whRatio):t},get canvasX(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasWidth(){var t;return(0,k.VS)(k.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.width):e.width},get canvasHeight(){var t;return(0,k.VS)(k.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)>tt||(null==s?void 0:s.bottom)>nt)&&(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,k.VS)(k.MV)?e.convertXToPerc(e.x):e.x,y:e.parent.stageWidth>1&&!(0,k.VS)(k.MV)?e.convertYToPerc(e.y):e.y,width:e.parent.stageWidth>1&&!(0,k.VS)(k.MV)?e.convertHDimensionToPerc(e.width):e.width,height:e.parent.stageWidth>1&&!(0,k.VS)(k.MV)?e.convertVDimensionToPerc(e.height):e.height,rotation:e.rotation};return e.parent.createSerializedResult(e,t)}}))),pO=u.gK.compose("RectRegionModel",ut,Xe,bt,Ek,mn,mO,...(0,k.VS)(k.MV)?[]:[gO]),fO=Tk((({item:e,setShapeRef:t})=>{var n,r,o;const{store:i}=e,{suggestion:a}=null!=(n=(0,m.useContext)($j))?n:{},s=Hk(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=Tt(e,{x:e.x-e.bboxCoords.left,y:e.y-e.bboxCoords.top})),(0,E.jsxs)(Lk,{item:e,children:[(0,E.jsx)(mj.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=N.A.LINKING_MODE_CURSOR):l.container().style.cursor=N.A.POINTER_CURSOR},onMouseOut:()=>{l.container().style.cursor=N.A.DEFAULT_CURSOR,i.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||(i.annotationStore.selected.isLinkingMode&&(l.container().style.cursor=N.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))},listening:!(a||null!=(o=e.annotation)&&o.isDrawing)})),(0,E.jsx)(Sk,{item:e,color:s.strokeColor,strokewidth:s.strokeWidth})]})):null}));function vO(e){const t=(0,u.dV)(e);return(0,u.Pw)(e).create(Object.assign({},t,{id:R()}))}b.addTag("rectangleregion",pO,fO),b.addRegionType(pO,"image");const yO=u.gK.model({selected:u.gK.optional(u.gK.boolean,!1),group:u.gK.optional(u.gK.string,"default"),shortcut:u.gK.optional(u.gK.maybeNull(u.gK.string),null)}).views((e=>({get obj(){var t,n;return null!=(t=null==(n=e.manager)?void 0:n.obj)?t:(0,u._$)(e).object},get manager(){return(0,u._$)(e).manager},get control(){return(0,u._$)(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=>vO(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,u.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}}))),bO=u.gK.compose(yO,Ne),xO=u.gK.model("DrawingTool",{default:!0,mode:u.gK.optional(u.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,k.VS)(k.MV)?{X:Sj.X/e.obj.stageScale/e.obj.stageWidth*tt,Y:Sj.Y/e.obj.stageScale/e.obj.stageHeight*nt}:{X:Sj.X/e.obj.stageScale,Y:Sj.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,k.VS)(k.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"}}))),wO=xO.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:zn()(((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,k.VS)(k.MV)?tt:e.obj.stageWidth,a=(0,k.VS)(k.MV)?nt:e.obj.stageHeight;let{x1:s,y1:l,x2:c,y2:d}=o?{x1:r.startX,y1:r.startY,x2:t,y2:n}:un.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,k.VS)(k.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)}}}})),CO=xO.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,k.VS)(k.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()}}})),SO=xO.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,k.VS)(k.MV)?tt:e.obj.stageWidth,i=(0,k.VS)(k.MV)?nt:e.obj.stageHeight;let{x1:a,y1:s,x2:l,y2:c}=un.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,k.VS)(k.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 jO=n(18229),kO=n(51366),OO=n(20963),RO=n(15311);const EO=({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}),_O=["node"],AO={RichTextRegionModel:{name:"HTML",icon:Up,getContent:e=>(0,E.jsx)("span",{style:{color:"#5a5a5a"},children:e.text}),fullContent:e=>(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{children:e.start}),(0,E.jsx)("div",{children:e.startOffset}),(0,E.jsx)("div",{children:JSON.stringify(e.globalOffsets,null,2)})]})},ParagraphsRegionModel:EO({name:"Paragraphs",icon:Up,getContent:e=>(0,E.jsx)("span",{style:{color:"#5a5a5a"},children:e.text})}),AudioRegionModel:EO({name:"Audio",icon:jO.A}),TimeSeriesRegionModel:EO({name:"TimeSeries",icon:kO.A}),TextAreaRegionModel:EO({name:"Input",icon:OO.A,getContent:e=>(0,E.jsx)("span",{style:{color:"#5a5a5a"},children:e._value})}),RectRegionModel:EO({name:"Rect",icon:xg,altIcon:_g}),Rect3PointRegionModel:EO({name:"Rect3Point",icon:Vg,altIcon:Yg}),VideoRectangleRegionModel:EO({name:"Video Rect",icon:xg,altIcon:_g,getContent:e=>{var t;return(0,E.jsxs)("span",{style:{color:"#5a5a5a"},children:["from ",null==(t=e.sequence[0])?void 0:t.frame," frame"]})}}),PolygonRegionModel:EO({name:"Polygon",icon:tg,altIcon:ug}),EllipseRegionModel:EO({name:"Ellipse",icon:bh,altIcon:Rh}),KeyPointRegionModel:EO({name:"KeyPoint",icon:Mh,altIcon:$h}),BrushRegionModel:EO({name:"Brush",icon:rh,altIcon:uh}),ChoicesModel:EO({name:"Classification",icon:RO.A}),TextAreaModel:EO({name:"Input",icon:OO.A}),TimelineRegionModel:EO({name:"Timeline Span",icon:Ya})},TO=(0,v.PA)((({className:e,node:t})=>{const n=MO(t);n in AO||console.error(`No ${n} in NodeView`);const{getContent:r,fullContent:o}=AO[n],i=t.labelName;return(0,E.jsxs)(Qe.eB,{name:"node",className:[e].filter(Boolean).join(" "),children:[i,(0,E.jsx)("br",{}),r(t),o&&o(t)]})})),PO=(0,v.PA)((({className:e,node:t})=>{var n,r;const o=MO(t);if(!o||!(o in AO))return console.error(`No ${o} in NodeView`),null;const{getContent:i}=AO[o],a=t.labelName;return(0,E.jsxs)(Qe.eB,{name:"node",tag:"span",className:e,children:[a,t.isDrawing&&(0,E.jsx)(Qe.Sl,{tag:"span",name:"incomplete",children:(0,E.jsx)(hr,{title:`Incomplete ${null!=(n=null==(r=t.type)?void 0:r.replace("region",""))?n:"region"}`,children:(0,E.jsx)(qd,{})})})," ",i(t)]})})),IO=(0,v.PA)((e=>{let{node:t}=e,n=(0,nr.A)(e,_O);const r=MO(t);if(!(r in AO))return console.error(`No ${r} in NodeView`),null;const{icon:o}=AO[r];return(0,E.jsx)(o,Object.assign({},n))})),LO=(0,v.PA)((({node:e})=>{const{sortedRegions:t}=KO(e),n=t.indexOf(e),r=MO(e);if(!(r in AO))return console.error(`No ${r} in NodeView`),null;const{name:o,icon:i}=AO[r];return(0,E.jsxs)(Qe.eB,{name:"node-minimal",tag:"span",children:[n>=0&&(0,E.jsx)(Qe.Sl,{name:"counter",children:n+1}),(0,E.jsx)(Qe.Sl,{name:"icon",tag:i}),o]})})),MO=e=>e.$treenode?(0,u.Pw)(e).name:null,KO=e=>(0,u.Zn)(e).annotationStore.selected.regionStore,DO=({size:e})=>(0,E.jsx)("span",{style:{display:"block",width:e,height:e,background:"rgba(0, 0, 0, 0.25)",borderRadius:"100%"}}),NO=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{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}))),VO=u.gK.model("BrushTool",{strokeWidth:u.gK.optional(u.gK.number,15),group:"segmentation",shortcut:"B",smart:!0,unselectRegionOnToolChange:!(0,k.VS)(k.bP)}).volatile((()=>({canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,E.jsx)(NO,{item:e})},get iconComponent(){return e.dynamic?AO.BrushRegionModel.altIcon:AO.BrushRegionModel.icon},get tagTypes(){return{stateTypes:"brushlabels",controlTagTypes:["brushlabels","brush"]}},get controls(){return[(0,E.jsx)(uC,{value:e.strokeWidth,min:1,max:50,reverse:!0,align:"vertical",minIcon:(0,E.jsx)(DO,{size:8}),maxIcon:(0,E.jsx)(DO,{size:16}),onChange:t=>{e.setStroke(t)}},"brush-size")]},get extraShortcuts(){return{"[":["Decrease size",()=>{e.setStroke((0,x.clamp)(e.strokeWidth-5,1,50))}],"]":["Increase size",()=>{e.setStroke((0,x.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('",bk.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,x.findClosestParent)(t.target,(t=>t===e.obj.stageRef.content),(e=>e.parentElement))&&e.addPoint(r,o)},mousedownEv(r,o,[i,a]){if(!(0,x.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,k.VS)(k.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)}}}})),zO=u.gK.compose(VO.name,bO,Rj,xO,VO),BO=({size:e})=>(0,E.jsx)("span",{style:{display:"block",width:e,height:e,background:"rgba(0, 0, 0, 0.25)",borderRadius:"100%"}}),HO=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{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}))),FO=u.gK.model("EraserTool",{strokeWidth:u.gK.optional(u.gK.number,10),group:"segmentation",unselectRegionOnToolChange:!1}).volatile((()=>({index:9999,canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,E.jsx)(HO,{item:e})},get iconComponent(){return dm},get controls(){return[(0,E.jsx)(uC,{value:e.strokeWidth,min:1,max:50,reverse:!0,align:"vertical",minIcon:(0,E.jsx)(BO,{size:8}),maxIcon:(0,E.jsx)(BO,{size:16}),onChange:t=>{e.setStroke(t)}},"eraser-size")]},get extraShortcuts(){return{"[":["Decrease size",()=>{e.setStroke((0,x.clamp)(e.strokeWidth-5,1,50))}],"]":["Increase size",()=>{e.setStroke((0,x.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('",bk.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,x.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,x.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)))}}})),WO=u.gK.compose(FO.name,bO,Rj,xO,FO),$O=u.gK.model("KeyPointTool",{default:u.gK.optional(u.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?AO.KeyPointRegionModel.altIcon:AO.KeyPointRegionModel.icon}}))).actions((e=>({clickEv(t,[n,r]){var o;if((0,k.VS)(k.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,k.VS)(k.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()}}))),UO=u.gK.compose($O.name,bO,Rj,xO,$O),ZO=u.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,k.VS)(k.vz)&&t&&!(0,u._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?AO.PolygonRegionModel.altIcon:AO.PolygonRegionModel.icon},get defaultDimensions(){return Oj},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,d.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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.vz)){const{currentArea:t}=e;e.setDrawing(!1),e.currentArea=null,t&&t.deleteRegion()}else t.deleteRegion()}}})),GO=u.gK.compose(ZO.name,bO,Rj,CO,ZO),YO=u.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 jj},createRegionOptions:({x:n,y:r})=>t.createRegionOptions({x:n,y:r,height:(0,k.VS)(k.MV)?e.obj.canvasToInternalY(1):1,width:(0,k.VS)(k.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}}))),XO=u.gK.model("RectangleTool",{shortcut:"R"}).views((e=>({get viewTooltip(){return"Rectangle"},get iconComponent(){return e.dynamic?AO.RectRegionModel.altIcon:AO.RectRegionModel.icon}}))),qO=u.gK.model("Rectangle3PointTool",{shortcut:"shift+R"}).views((e=>({get viewTooltip(){return"3 Point Rectangle"},get iconComponent(){return e.dynamic?AO.Rect3PointRegionModel.altIcon:AO.Rect3PointRegionModel.icon}}))),JO=u.gK.compose(XO.name,bO,Rj,wO,YO,XO,Ne),QO=u.gK.compose(qO.name,bO,Rj,SO,YO,qO,Ne),eR=u.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?AO.EllipseRegionModel.altIcon:AO.EllipseRegionModel.icon},get defaultDimensions(){const{radius:e}=kj;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}}))),tR=u.gK.compose(eR.name,bO,Rj,wO,eR),nR=kr("SegmentationToolbar","Segmentation Tools"),rR={plus:"+",minus:"-"},oR=e=>{if(!e)return null;const t=e.split(",").map((e=>e.trim()));return(0,E.jsx)(Qe.Sl,{name:"shortcut",children:t.map(((e,t)=>{const n=e.split("+");return(0,E.jsx)(m.Fragment,{children:n.map((e=>{var t;return(0,E.jsx)(Qe.Sl,{name:"key",tag:"kbd",children:null!=(t=rR[e])?t:e},e)}))},`${n.join("-")}-${t}`)}))})},iR=({items:e,icon:t})=>{const[n,r]=(0,m.useState)(!1);return(0,m.useEffect)((()=>{const t=()=>{e.forEach((e=>{const t=e.shortcut;t&&nR.hasKey(t)&&nR.removeKey(t)}))};return t(),e.forEach((e=>{const t=e.shortcut;t&&!nR.hasKey(t)&&nR.addKey(t,(()=>{null==e||null==e.onClick||e.onClick(),r(!1)}),e.label)})),()=>{t()}}),[e]),(0,m.useEffect)((()=>{const e=()=>{n&&r(!1)};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}})),(0,E.jsxs)(Qe.eB,{name:"flyoutmenu",tag:"div",className:""+(n?"hovered":""),onClick:e=>{e.stopPropagation(),r(!n)},children:[(0,E.jsx)(Qe.Sl,{name:"icon",className:""+(n?"isClicked":""),title:"Zoom presets (click to see options)",children:t}),(0,E.jsx)(Qe.eB,{name:"tooltips",tag:"div",children:e.map(((e,t)=>(0,E.jsx)(Qe.Sl,{name:"tooltip",onClick:t=>{t.stopPropagation(),null==e||null==e.onClick||e.onClick(),r(!1)},children:(0,E.jsxs)(Qe.Sl,{name:"tooltip-body",children:[(0,E.jsx)(Qe.Sl,{name:"label",children:e.label}),oR(e.shortcut)]})},t)))})]})},aR=(0,v.PA)((({item:e})=>(0,E.jsxs)(m.Fragment,{children:[(0,E.jsx)(xj,{active:e.selected,icon:(0,E.jsx)(fm,{}),ariaLabel:"pan",label:"Pan Image",shortcut:"H",onClick:()=>{const t=e.selected;e.manager.selectTool(e,!t)}}),(0,E.jsx)(xj,{icon:(0,E.jsx)(Km,{}),ariaLabel:"zoom-in",label:"Zoom In",shortcut:"ctrl+plus",onClick:()=>{e.handleZoom(1)}}),(0,E.jsx)(iR,{icon:(0,E.jsx)(Qm,{}),items:[{label:"Zoom to fit",shortcut:"shift+1",onClick:()=>{e.sizeToFit()}},{label:"Zoom to actual size",shortcut:"shift+2",onClick:()=>{e.sizeToOriginal()}}]}),(0,E.jsx)(xj,{icon:(0,E.jsx)(Fm,{}),ariaLabel:"zoom-out",label:"Zoom Out",shortcut:"ctrl+minus",onClick:()=>{e.handleZoom(-1)}})]}))),sR=u.gK.model("ZoomPanTool",{group:"control"}).volatile((()=>({canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,E.jsx)(aR,{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()}}))),lR=u.gK.compose(sR.name,bO,Rj,sR),cR=(0,v.PA)((({item:e})=>(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(xj,{active:e.selected,icon:(0,E.jsx)(mp,{}),ariaLabel:"rotate-left",label:"Rotate Left",shortcut:"alt+left",onClick:()=>{e.rotate(-90)}}),(0,E.jsx)(xj,{active:e.selected,icon:(0,E.jsx)(wp,{}),ariaLabel:"rotate-right",label:"Rotate Right",shortcut:"alt+right",onClick:()=>{e.rotate(90)}})]}))),dR=u.gK.model("RotateTool",{group:"control"}).views((e=>({get viewClass(){return()=>(0,E.jsx)(cR,{item:e})}}))).actions((e=>({rotate(t){e.obj.rotate(t)}}))),uR=u.gK.compose(dR.name,bO,Rj,dR),hR=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{active:e.selected,ariaLabel:"brightness",label:"Brightness",controlsOnHover:!0,controls:[(0,E.jsx)(uC,{align:"vertical",reverse:!0,continuous:!0,minIcon:(0,E.jsx)(Cm,{style:{width:22,height:22,opacity:.2}}),maxIcon:(0,E.jsx)(Cm,{style:{width:22,height:22,opacity:.8}}),value:e.brightness,max:N.A.BRIGHTNESS_MAX,onChange:t=>{e.setStroke(t)}},"brightness")],icon:(0,E.jsx)(Cm,{})}))),gR=u.gK.model({brightness:u.gK.optional(u.gK.number,N.A.BRIGHTNESS_VALUE)}).views((e=>({get viewClass(){return()=>(0,E.jsx)(hR,{item:e})}}))).actions((e=>({setStroke(t){e.brightness=t,e.obj.setBrightnessGrade(t)}}))),mR=u.gK.compose(gR.name,bO,Rj,gR),pR=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{active:e.selected,ariaLabel:"contrast",label:"Contrast",controlsOnHover:!0,controls:[(0,E.jsx)(uC,{align:"vertical",reverse:!0,continuous:!0,minIcon:(0,E.jsx)(Em,{style:{width:22,height:22,opacity:.2}}),maxIcon:(0,E.jsx)(Em,{style:{width:22,height:22,opacity:.8}}),value:e.contrast,max:N.A.CONTRAST_MAX,onChange:t=>{e.setStroke(t)}},"contrast")],icon:(0,E.jsx)(Em,{})}))),fR=u.gK.model("ContrastTool",{contrast:u.gK.optional(u.gK.number,N.A.CONTRAST_VALUE)}).views((e=>({get viewClass(){return()=>(0,E.jsx)(pR,{item:e})}}))).actions((e=>({setStroke(t){e.contrast=t,e.obj.setContrastGrade(t)}}))),vR=u.gK.compose(fR.name,bO,Rj,fR),yR=(0,v.PA)((({item:e})=>(0,E.jsx)(xj,{label:"Magic Wand",ariaLabel:"magicwand",shortcut:"W",active:e.selected,icon:e.iconClass,tool:e,onClick:()=>{e.selected||e.manager.selectTool(e,!0)}}))),bR=u.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,E.jsx)(yR,{item:e})},get tagTypes(){return{stateTypes:"brushlabels",controlTagTypes:["brushlabels","magicwand"]}},get iconComponent(){return nm},get defaultthreshold(){return Number.parseInt(e.control.defaultthreshold,10)},get opacity(){return Number.parseFloat(e.control.opacity)},get fillcolor(){const t=Ct()(N.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,Ct()(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,u.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]=Pt(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=jt(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:R(),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=jt(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,u.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=bk.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]=It(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}}))),xR=u.gK.compose(bR.name,bO,Rj,xO,bR),wR=u.gK.model("SelectionTool",{shortcut:"V",group:"control"}).views((()=>({get isSeparated(){return!0},get viewTooltip(){return"Move"},get iconComponent(){return sp},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,k.VS)(k.q$)&&(t=!1,e.obj.resetSelection(),n.ctrlKey||n.metaKey||e.annotation.unselectAreas())}}})),CR=u.gK.compose("MoveTool",bO,Rj,Ne,wR),SR=new Map;let jR=null;class kR{static getInstance({name:e}={}){if(!e)return;if(SR.has(e))return SR.get(e);const t=new kR({name:e});return SR.set(e,t),t}static allInstances(){return Array.from(SR.values())}static setRoot(e){jR=e}static removeAllTools(){SR.forEach((e=>e.removeAllTools())),SR.clear()}constructor({name:e}={}){this.name=e,this.tools={},this._default_tool=null,this._prefix=R()}get preservedTool(){return window.localStorage.getItem(`selected-tool:${this.name}`)}get obj(){return jR.annotationStore.names.get(this.name)}addTool(e,t,n=null,r=R()){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,k.VS)(k.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}={}){SR.delete(this.name),SR.set(e,this),this.removeAllTools(),this.name=e}removeAllTools(){Object.values(this.tools).forEach((e=>(0,u.zr)(e))),this.tools={},this._default_tool=null}get hasSelected(){return Object.values(this.tools).some((e=>e.selected))}}window.ToolManager=kR;const OR=kR,RR=u.gK.union({dispatcher(e){if(!e)return u.gK.null;const t=e.object.name||e.object,n=window.Htx.annotationStore.names.get(t),r=b.getAvailableAreas(n.type,e);return u.gK.union(...r,u.gK.null)}});const ER=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}))}},_R=u.gK.model({id:u.gK.identifier,src:u.gK.string,index:u.gK.number,rotation:u.gK.optional(u.gK.number,0),naturalWidth:u.gK.optional(u.gK.integer,1),naturalHeight:u.gK.optional(u.gK.integer,1),stageWidth:u.gK.optional(u.gK.number,1),stageHeight:u.gK.optional(u.gK.number,1),zoomScale:u.gK.optional(u.gK.number,1),zoomingPositionX:u.gK.optional(u.gK.number,0),zoomingPositionY:u.gK.optional(u.gK.number,0),brightnessGrade:u.gK.optional(u.gK.number,100),contrastGrade:u.gK.optional(u.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),ER.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:()=>ER.isError(e.src)?(e.setDownloading(!1),e.setError(!0),!0):!!ER.isPreloaded(e.src)&&(e.setDownloading(!1),e.setDownloaded(!0),e.setProgress(1),e.setCurrentSrc(ER.getPreloadedURL(e.src)),!0),setImageLoaded(t){e.imageLoaded=t},setProgress(t){e.progress=(0,x.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}}))),AR=u.gK.model({currentImageEntity:u.gK.maybeNull(u.gK.reference(_R)),imageEntities:u.gK.optional(u.gK.array(_R),[])}).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,u._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,u._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,u._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,u._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))}}))),TR=u.gK.model({x:u.gK.number,y:u.gK.number}),PR=u.gK.model({start:u.gK.maybeNull(TR),end:u.gK.maybeNull(TR)}).views((e=>({get obj(){return(0,u.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,k.VS)(k.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,k.VS)(k.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}}))),IR=u.gK.model({valuelist:u.gK.maybeNull(u.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,x.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}}))),LR=u.gK.model({value:u.gK.maybeNull(u.gK.string),valuelist:u.gK.maybeNull(u.gK.string),resize:u.gK.maybeNull(u.gK.number),width:u.gK.optional(u.gK.string,"100%"),height:u.gK.maybeNull(u.gK.string),maxwidth:u.gK.optional(u.gK.string,"100%"),maxheight:u.gK.optional(u.gK.string,"calc(100vh - 194px)"),smoothing:u.gK.maybeNull(u.gK.boolean),grid:u.gK.optional(u.gK.boolean,!1),gridsize:u.gK.optional(u.gK.string,"30"),gridcolor:u.gK.optional(Ie.color,"#EEEEF4"),zoom:u.gK.optional(u.gK.boolean,!0),negativezoom:u.gK.optional(u.gK.boolean,!1),zoomby:u.gK.optional(u.gK.string,"1.1"),showlabels:u.gK.optional(u.gK.boolean,!1),zoomcontrol:u.gK.optional(u.gK.boolean,!0),brightnesscontrol:u.gK.optional(u.gK.boolean,!1),contrastcontrol:u.gK.optional(u.gK.boolean,!1),rotatecontrol:u.gK.optional(u.gK.boolean,!1),crosshair:u.gK.optional(u.gK.boolean,!1),selectioncontrol:u.gK.optional(u.gK.boolean,!0),lazyoff:u.gK.optional(u.gK.boolean,!1),horizontalalignment:u.gK.optional(u.gK.enumeration(["left","center","right"]),"left"),verticalalignment:u.gK.optional(u.gK.enumeration(["top","center","bottom"]),"top"),defaultzoom:u.gK.optional(u.gK.enumeration(["auto","original","fit"]),"fit"),crossorigin:u.gK.optional(u.gK.enumeration(["none","anonymous","use-credentials"]),"none")}),MR="rectanglelabels",KR="brushlabels",DR="ellipselabels",NR=u.gK.model({type:"image",sizeUpdated:u.gK.optional(u.gK.boolean,!1),cursorPositionX:u.gK.optional(u.gK.number,0),cursorPositionY:u.gK.optional(u.gK.number,0),brushControl:u.gK.optional(u.gK.string,"brush"),brushStrokeWidth:u.gK.optional(u.gK.number,15),mode:u.gK.optional(u.gK.enumeration(["drawing","viewing","brush","eraser"]),"viewing"),regions:u.gK.array(u.gK.union(Nk,pO,Uk,iO,Xk),[]),drawingRegion:u.gK.optional(RR,null),selectionArea:u.gK.optional(PR,{start:null,end:null})}).volatile((()=>({currentImage:void 0,supportSuggestions:!0}))).views((e=>({get store(){return(0,u.Zn)(e)},get multiImage(){return!!e.isMultiItem},get currentItemIndex(){return e.currentImage},get parsedValue(){return S(e.value,e.store.task.dataObj)},get parsedValueList(){return S(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,k.VS)(k.xS)||t&&"none"!==t?(0,k.VS)(k.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,k.VS)(k.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!==MR&&e.type!==KR&&e.type!==DR||(n=e)})),n},get controlButtonType(){const t=e.controlButton();return(0,u.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,k.VS)(k.aT)?e.naturalHeight*e.stageZoomX:Math.round(e.naturalHeight*e.stageZoomX),height:(0,k.VS)(k.aT)?e.naturalWidth*e.stageZoomY:Math.round(e.naturalWidth*e.stageZoomY)}:{width:(0,k.VS)(k.aT)?e.naturalWidth*e.stageZoomX:Math.round(e.naturalWidth*e.stageZoomX),height:(0,k.VS)(k.aT)?e.naturalHeight*e.stageZoomY:Math.round(e.naturalHeight*e.stageZoomY)}},get alignmentOffset(){const t={x:0,y:0};if((0,k.VS)(k.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=OR.getInstance({name:e.name}),n={manager:t,control:e,object:e};return{afterAttach:function(){e.selectioncontrol&&t.addTool("MoveTool",CR.create({},n)),e.zoomcontrol&&t.addTool("ZoomPanTool",lR.create({},n)),e.brightnesscontrol&&t.addTool("BrightnessTool",mR.create({},n)),e.contrastcontrol&&t.addTool("ContrastTool",vR.create({},n)),e.rotatecontrol&&t.addTool("RotateTool",uR.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,k.VS)(k.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:R(),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,u.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,k.VS)(k.F2)&&e.preloadImages())},preloadImages(){if(e.currentImageEntity.setImageLoaded(!1),e.currentImageEntity.preload(),e.multiImage){const[t,n]=[e.currentImage,e.imageEntities.length],r=(0,x.clamp)(t-3,0,t),o=(0,x.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,x.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,k.VS)(k.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,x.clamp)(t,i,0),e.zoomingPositionY=(0,x.clamp)(n,a,0)},resetZoomPositionToCenter(){const{stageComponentSize:t,zoomScale:n}=e,{width:r,height:o}=t,[i,a]=(0,k.VS)(k.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,k.VS)(k.aT)?e.naturalWidth*e.stageZoom:Math.round(e.naturalWidth*e.stageZoom),e.stageHeight=(0,k.VS)(k.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,k.VS)(k.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)}}))),VR=u.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,k.VS)(k.MV)?e.stageWidth/e.stageHeight:1},canvasToInternalX:t=>t/e.stageWidth*tt,canvasToInternalY:t=>t/e.stageHeight*nt,internalToCanvasX:t=>t/tt*e.stageWidth,internalToCanvasY:t=>t/nt*e.stageHeight}))),zR=VR.views((()=>({canvasToInternalX:e=>e,canvasToInternalY:e=>e,internalToCanvasX:e=>e,internalToCanvasY:e=>e}))),BR=u.gK.compose("ImageModel",LR,On,...(0,k.VS)(k.gF)?[IR]:[],Ne,Be,AR,NR,(0,k.VS)(k.MV)?VR:zR),HR=(0,v.WQ)("store")(fk);b.addTag("image",BR,HR),b.addObjectType(BR);var FR=n(7976),WR=n.n(FR);const $R=u.gK.model().views((()=>({}))).actions((e=>({updateSpansColor(t,n){e._spans&&e._spans.forEach((e=>{t&&(e.style.backgroundColor=t),n&&(e.style.backgroundColor=un.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,Ae.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||N.l).fillcolor;return t&&(t=un.Colors.convertToRGBA(t,.3)),t},applyCSSClass(t){if(!t)return;const n=["htx-highlight","htx-highlight-last"],r=(0,u.Zn)(e).settings;if(e.parent.showlabels||r.showLabels){var o;const r=null==(o=e.labeling)?void 0:o.mainValue,i=un.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=N.A.LINKING_MODE_CURSOR,n.stopPropagation()):t.style.cursor=N.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=N.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=N.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=N.A.DEFAULT_CURSOR}))):e.updateAppearenceFromState(),null==t||t.stopPropagation()},find:t=>e._spans&&e._spans.indexOf(t)>=0?e:void 0}))),UR=u.gK.model("LabelMixin"),ZR=u.gK.model().volatile((()=>({isSeparated:!1}))).views((e=>({get tiedChildren(){return K.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,x.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,x.isDefined)(t)||e.value===t||!(0,x.isDefined)(e.value)&&!(0,x.isDefined)(t))),get emptyLabel(){return e.allowempty?e.findLabel(null):null}}))).actions((e=>({unselectAll(){e.tiedChildren.forEach((e=>e.setSelected(!1)))},checkMaxUsages(){if((0,k.VS)(k.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)}}}))),GR=ZR,YR=u.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,u.Zn)(e);e.children=null!=(o=e.children)?o:[],(0,u.Ze)(i),t(n,r,e),(0,u.yQ)(i)},updateValue(t){setTimeout((()=>{e.updateDynamicChildren(t)}))},updateDynamicChildren(t){if(!0!==e.locked){var n;const r=S(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)}}}})),XR=u.gK.compose(Ue,YR),qR=u.gK.model(Object.assign({},(0,k.VS)(k.cE)?{id:u.gK.identifier,name:u.gK.string}:{name:u.gK.identifier},{smart:!0,smartonly:!1,isControlTag:!0})).volatile((()=>({snapMode:rt}))).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,u.Zn)(e))?void 0:r.autoAnnotation)&&n&&o||e.smartonly||!1}}))),JR=u.gK.compose(qR,jn),QR=["className","style","color","empty","hidden","selected","margins","onClick","children","hotkey"],eE=m.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,nr.A)(e,QR);const g=(0,m.useMemo)((()=>{if(!o)return null;const e=Ct()(o).alpha(.15);return Object.assign({},null!=r?r:{},dn({color:o,background:e}))}),[o]);return(0,E.jsxs)(Qe.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,E.jsx)(Qe.Sl,{tag:"span",name:"text",children:d}),u?(0,E.jsx)(Qe.Sl,{tag:"span",name:"hotkey",children:u}):null]}))})),tE=u.gK.model("AnnotationMixin",{parentTypes:De.tagsTypes([])}).views((e=>({get parent(){return De.getParentTagOfTypeString(e,e.parentTypes)}}))),nE=u.gK.model(Object.assign({value:u.gK.maybeNull(u.gK.string),selected:u.gK.optional(u.gK.boolean,!1),maxusages:u.gK.maybeNull(u.gK.string),alias:u.gK.maybeNull(u.gK.string),hint:u.gK.maybeNull(u.gK.string),hotkey:u.gK.maybeNull(u.gK.string),showalias:u.gK.optional(u.gK.boolean,!1),aliasstyle:u.gK.optional(u.gK.string,"opacity: 0.6"),size:u.gK.optional(u.gK.string,"medium"),background:u.gK.optional(Ie.color,N.A.LABEL_BACKGROUND),selectedcolor:u.gK.optional(Ie.color,"#ffffff"),granularity:u.gK.maybeNull(u.gK.enumeration(["symbol","word","sentence","paragraph"])),groupcancontain:u.gK.maybeNull(u.gK.string)},(0,k.VS)(k.bT)?{html:u.gK.maybeNull(u.gK.string)}:{})),rE=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"label",visible:u.gK.optional(u.gK.boolean,!0),_value:u.gK.optional(u.gK.string,""),parentTypes:De.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 Sn.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=OR.getInstance({name:e.parent.toname}),n=Object.values((null==(i=e.parent)?void 0:i.tools)||{})[0],o=t.findSelectedTool(),l=!(!n||!o)&&(0,u.Pw)(o).name===(0,u.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===N.A.LABEL_BACKGROUND&&(e.background=WR().make_color({seed:t})[0])},afterCreate(){e._updateBackgroundColor(e._value||e.value)},updateValue(t){e._value=S(e.value,t.task.dataObj)||N.A.EMPTY_LABEL}}))),oE=u.gK.compose("LabelModel",tE,nE,Ue,rE,Ne),iE=(0,v.WQ)("store")((0,v.PA)((({item:e,store:t})=>{const n=(t.settings.enableTooltips||t.settings.enableLabelTooltips)&&t.settings.enableHotkeys&&e.hotkey,r=(0,E.jsxs)(eE,{color:e.background,margins:!0,empty:e.isEmpty,hotkey:n,hidden:!e.visible,selected:e.selected,onClick:e.onClick,children:[e.html?(0,E.jsx)("div",{title:e._value,dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(e.html)}}):e._value,!0===e.showalias&&e.alias&&(0,E.jsxs)("span",{style:un.styleToProp(e.aliasstyle),children:[" ",e.alias]})]});return e.hint?(0,E.jsx)(hr,{title:e.hint,children:r}):r})));b.addTag("label",oE,iE);const aE=u.gK.model({toname:u.gK.maybeNull(u.gK.string),choice:u.gK.optional(u.gK.enumeration(["single","multiple"]),"single"),maxusages:u.gK.maybeNull(u.gK.string),showinline:u.gK.optional(u.gK.boolean,!0),groupdepth:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.2"),fillcolor:u.gK.optional(Ie.color,"#f48a42"),strokewidth:u.gK.optional(u.gK.string,"1"),strokecolor:u.gK.optional(Ie.color,"#f48a42"),fillopacity:u.gK.maybeNull(Ie.range()),allowempty:u.gK.optional(u.gK.boolean,!1),value:u.gK.optional(u.gK.string,"")}),sE=u.gK.model({pid:u.gK.optional(u.gK.string,R),type:"labels",children:De.unionArray(["label","header","view","text","hypertext","richtext"]),visible:u.gK.optional(u.gK.boolean,!0)}),lE=UR.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:N.l.fillcolor};e.children?e.children.unshift(n):e.children=(0,u.wg)([n]),t=e.children[0]}t.setEmpty()}}}))),cE=u.gK.compose("LabelsModel",JR,sE,aE,Ne,XR,lE,GR.props({_child:"LabelModel"})),dE=(0,v.PA)((({item:e})=>(0,E.jsx)(Qe.eB,{name:"labels",mod:{hidden:!e.visible,inline:e.showinline},children:K.renderChildren(e,e.annotation)})));b.addTag("labels",cE,dE);const uE=u.gK.model("ParagraphLabelsModel",{pid:u.gK.optional(u.gK.string,R),type:"paragraphlabels",children:De.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}}))),hE=UR.props({_type:"paragraphlabels"}),gE=u.gK.compose(JR,cE,uE,hE,GR.props({_child:"LabelModel"})),mE=u.gK.compose("ParagraphLabelsModel",gE),pE=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("paragraphlabels",mE,pE);var fE=n(92806),vE=n(47956),yE=n(33250),bE=function(e){return e[e.inertial=0]="inertial",e[e.instant=1]="instant",e}(bE||{});const xE=500,wE=u.gK.model({leadTime:0}).volatile((()=>({leadTimeLogic:bE.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+xE}}))).actions((e=>({countTime(){e.leadTimeLogic===bE.inertial?e._countTimeInertial():e.leadTimeLogic===bE.instant&&e._countTimeInstant()},resetLeadTimeCounters(){e.lastRecordedTime=0,e.debouncedTime=0}}))),CE=u.gK.model({peritem:u.gK.optional(u.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})}}))),SE=CE,jE=u.gK.model({required:u.gK.optional(u.gK.boolean,!1),requiredmessage:u.gK.maybeNull(u.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,k.VS)(k.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,u.PA)(e,2))?void 0:r.isVisible))return e.requiredModal(),!1}return!0}}})),kE=jE,OE="lsf-mark",RE="lsf-selected",EE="lsf-highlighted",_E="lsf-relation";var AE=n(6757),TE=n(39984);const PE={input:"input--GGvVi",editing:"editing--TQ89C",enter:"enter--FWKNX",delete:"delete--hGoXe"},IE=["className","rows","onlyEdit","name","onFocus","onChange","onDelete","isEditable","isDeleteable","ignoreShortcuts"],LE=["onChange","onDelete","isEditable","isDeleteable","text","ignoreShortcuts","onlyEdit"],{Paragraph:ME}=AE.A;class KE extends m.Component{constructor(...e){super(...e),this.state={editing:!1,height:0,value:this.props.text},this.textRef=m.createRef(),this.inputRef=m.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=zn()((()=>{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,nr.A)(e,IE),{height:l,value:c}=this.state,d={name:o,className:`ant-input ${PE.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,E.jsxs)(ME,Object.assign({},s,{className:`${t} ant-typography-edit-content ${PE.editing}`,children:[n>1?(0,E.jsx)("textarea",Object.assign({},d)):(0,E.jsx)("input",Object.assign({},d)),!r&&(0,E.jsx)(hr,{title:"Save: [shift+enter]",children:(0,E.jsx)(TE.A,{className:`ant-typography-edit-content-confirm ${PE.enter}`,onClick:this.save})})]}))}renderView(){const e=this.props,{onChange:t,onDelete:n,isEditable:r,isDeleteable:o,text:i}=e,a=(0,nr.A)(e,LE);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(ME,Object.assign({},a,{children:(0,E.jsx)("span",{ref:this.textRef,children:i})})),r&&t&&(0,E.jsx)(Qa,{type:"text",className:PE.button,tooltip:"Edit",tooltipTheme:"Dark",style:{padding:0},icon:(0,E.jsx)(hy,{}),"aria-label":"Edit Region",onClick:this.startEditing}),o&&n&&(0,E.jsx)(Qa,{type:"text",look:"danger",className:PE.button,tooltip:"Delete",tooltipTheme:"Dark",style:{padding:0},icon:(0,E.jsx)(xf,{}),"aria-label":"Delete Region",onClick:n})]})}render(){return(this.state.editing||this.props.onlyEdit)&&this.props.isEditable?this.renderEdit():this.renderView()}}const DE=u.gK.model("TextAreaRegionModel",{id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"textarearegion",_value:u.gK.string}).volatile((()=>({classification:!0,perRegionTags:[],results:[],selected:!1}))).views((e=>({get parent(){return(0,u.k2)(e,GE)},getRegionElement:()=>document.querySelector(`#TextAreaRegion-${e.id}`),getOneColor:()=>null}))).actions((e=>({setValue(t){(!(0,k.VS)(k.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}}))),NE=u.gK.compose("TextAreaRegionModel",ut,Xe,DE),VE=(0,v.PA)((({item:e,onFocus:t})=>{var n;const r=[OE],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(_E),e.selected?r.push(RE):e.highlighted&&r.push(EE),(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,E.jsx)("div",Object.assign({},c,{className:(0,Qe.cn)("row").toString(),"data-testid":"textarea-region",children:(0,E.jsx)(KE,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}))}))}));b.addTag("textarearegion",NE,VE);const zE=u.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:m.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))},getRegionElement:()=>e.elementRef.current}))).actions((e=>({validate:()=>e.perregion?e._validatePerRegion():e.peritem&&(0,k.VS)(k.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:BE}=yE.A,HE=(0,m.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,m.useState)(null!=t?t:"");(0,k.VS)(k.q_)&&(0,m.useEffect)((()=>{t!==u&&h(t)}),[t]);const g=(0,m.useMemo)((()=>{var e;return l?null!=(e=(null!=t?t:"").split(/\n/)[0])?e:"":(0,k.VS)(k.q_)?u:t}),[t,l,...(0,k.VS)(k.q_)?[u]:[]]),p=(0,k.VS)(k.q_)?(0,m.useCallback)((e=>{h(e.target.value)}),[]):t=>{l||r(e,t.target.value)},f=(0,m.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 ${PE.input}`,value:g,autoSize:d?{minRows:1}:null,onChange:p,readOnly:n||l,onFocus:i};return(0,k.VS)(k.q_)&&(v.onBlur=f),((0,k.VS)(k.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,E.jsxs)(Qe.Sl,{name:"item",children:[(0,E.jsx)(Qe.Sl,Object.assign({name:"input",tag:d?BE:yE.A},v,{ref:c})),!l&&!n&&(0,E.jsx)(Qe.Sl,{name:"action","aria-label":"Delete Region",tag:fE.default,icon:(0,E.jsx)(Ps,{}),size:"small",type:"text",onClick:()=>{o(e)}})]})})),FE=(0,v.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,m.useCallback)(((t,n)=>{if(e.from_name.isReadOnly())return;const r=i.toJSON();r.splice(t,1,n),e.setValue(r)}),[i]),l=(0,m.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,E.jsx)(HE,{idx:c,value:i,readOnly:!a,onChange:s,onDelete:l,control:t,ref:0===c?n:null,onFocus:r,collapsed:o,validate:(0,k.VS)(k.q_)?e.from_name.validateText:null},c)))})),WE=(0,v.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,h=t.isCompleted&&t.perRegionFocusTarget===e&&t.perRegionFocusRequest,g=d?e._value:"",p=t.results.find((t=>t.from_name===e)),f=(0,m.useCallback)((()=>{n&&(r(!1),t.isSelected||t.annotation.selectArea(t))}),[n]),v=(0,m.useCallback)((()=>{p?(e.addTextToResult(e._value,p),e.setValue("")):(e.addText(e._value),e.setValue(""))}),[e,p]),y=(0,m.useRef)(),b=(0,m.useRef)(),x=(0,m.useRef)(0),w=(0,m.useMemo)((()=>i?{"--border-color":i}:{}),[i]);(0,m.useEffect)((()=>{var e;d&&h&&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=(!p||!(null!=p&&null!=(s=p.mainValue)&&s.length)||e.maxsubmissions&&p.mainValue.length(e.allowsubmit&&e._value&&!e.annotation.isReadOnly()&&v(),!1),onClick:e=>{e.stopPropagation()},children:(0,E.jsx)(Qe.Sl,Object.assign({name:"input",tag:c?BE:yE.A},C,{onClick:e=>{e.stopPropagation()}}))})]}):null}));b.addPerRegionView("textarea",mt.REGION_LIST,WE);const{TextArea:$E}=yE.A,UE=u.gK.model(Object.assign({toname:u.gK.maybeNull(u.gK.string),allowsubmit:u.gK.optional(u.gK.boolean,!0),label:u.gK.optional(u.gK.string,""),value:u.gK.maybeNull(u.gK.string),rows:u.gK.optional(u.gK.string,"1"),showsubmitbutton:u.gK.maybeNull(u.gK.boolean),placeholder:u.gK.maybeNull(u.gK.string),maxsubmissions:u.gK.maybeNull(u.gK.string),editable:u.gK.optional(u.gK.boolean,!1),transcription:!1},(0,k.VS)(k.eB)?{skipduplicates:u.gK.optional(u.gK.boolean,!1)}:{})),ZE=u.gK.model({type:"textarea",regions:u.gK.array(NE),_value:u.gK.optional(u.gK.string,""),children:De.unionArray(["shortcut"])}).volatile((()=>({focusable:!0,textareaRef:(0,m.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,k.VS)(k.y8)?{}:{countTime:()=>{}})).actions((e=>{let t=null,n=null;const r=(t,n)=>!!(t&&n&&(0,u._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(){Sn.warning(e.requiredmessage||`Input for the textarea "${e.name}" is required.`)},uniqueModal(){Sn.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,u.zr)(t),e.onChange(t))},perRegionCleanup(){e.regions=[]},createRegion(t,n,r){const o=NE.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,k.VS)(k.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,k.VS)(k.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,u.zr)(e)},onShortcut(o){if(!r(t,n)){if(!(0,k.VS)(k.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()}}})),GE=u.gK.compose("TextAreaModel",JR,zE,UE,...(0,k.VS)(k.y8)?[wE]:[],Ue,kE,ft,...(0,k.VS)(k.gF)?[SE]:[],Ne,qe,ZE),YE=(0,v.PA)((({item:e})=>{var t;const n=Number.parseInt(e.rows),r=(0,m.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,Qe.cn)("text-area").toClassName();return a&&(s.marginBottom=0),i.marginTop="4px",e.displaymode===mt.TAG?(0,E.jsxs)("div",{className:l,style:i,ref:e.elementRef,children:[K.renderChildren(e,e.annotation),e.showSubmit&&(0,E.jsx)(vE.A,{onFinish:()=>(e.allowsubmit&&e._value&&!e.annotation.isReadOnly()&&(e.addText(e._value),e.setValue("")),!1),children:(0,E.jsxs)(vE.A.Item,{style:s,children:[1===n?(0,E.jsx)(yE.A,Object.assign({},o,{"aria-label":"TextArea Input"})):(0,E.jsx)($E,Object.assign({},o,{"aria-label":"TextArea Input"})),a&&(0,E.jsx)(vE.A.Item,{children:(0,E.jsx)(fE.default,{style:{marginTop:"10px"},type:"primary",htmlType:"submit",children:"Add"})})]})}),e.regions.length>0&&(0,E.jsx)("div",{style:{marginBottom:"1em"},children:e.regions.map((e=>(0,E.jsx)(VE,{item:e,onFocus:r},e.id)))})]}):null}));b.addTag("textarea",GE,YE);const XE=u.gK.model({visiblewhen:u.gK.maybeNull(u.gK.string),whentagname:u.gK.maybeNull(u.gK.string),whenchoicevalue:u.gK.maybeNull(u.gK.string),whenlabelvalue:u.gK.maybeNull(u.gK.string)}).views((e=>({get isVisible(){var t;if(!1===(null==(t=(0,u.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}}))),qE=XE;var JE=n(51129),QE=n(84779);var e_=n(94714),t_=n(42197);const n_=(e=!1)=>{const[t,n]=(0,m.useState)(e),[r,o,i]=(0,m.useMemo)((()=>[n.bind(null,!0),n.bind(null,!1),()=>n((e=>!e))]),[]);return[t,r,o,i]};var r_=n(84392);const o_=e=>{let t=0,n=e.length;for(;n--;){t++;const r=e[n].children;r&&(t+=o_(r))}return t},i_=(e,t)=>({label:"",depth:t,path:e,isOpen:!0});let a_={};const s_=({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,m.useState)(),[p,f]=(0,m.useState)({}),[v,y]=(0,m.useState)(0),[b,x]=(0,m.useState)(i),w=(0,m.useRef)(),C=(0,m.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})())},O=t=>{const n=l?{[t]:2!==p[t]?2:1}:{[t]:1!==p[t]?1:2};f(Object.assign({},p,n)),g(A({items:e,toggleItem:n})),y(.01*o*u),a_={},w.current.resetAfterIndex(0)},R=t=>{c&&(g(A(t?{items:e,addInsideId:t}:{items:e})),j())},_=({data:e,index:t,rowStyle:n,rowComponent:o})=>{const i=e(t),s=(0,m.useCallback)((e=>{const n=`${t}`,o=(null==S?void 0:S.offsetWidth)-(null==S?void 0:S.clientWidth)||0,i=((0,k.VS)(k.c0)?e.scrollWidth:e.offsetWidth)+o+5,s=e.scrollHeight;b{const i=[];for(let a=0;a{g(A({items:e}))}),[e]),(0,m.useEffect)((()=>{0===(null==h?void 0:h.length)&&j()}),[h]),(0,E.jsx)("div",{ref:C,children:(0,E.jsx)(r_._m,{ref:w,height:v+4,itemCount:(null==h?void 0:h.length)||0,itemSize:e=>a_[`${e}`]||r,width:b,itemData:e=>({row:h&&h[e],toggle:O,addInside:R}),children:({data:e,index:n,style:r})=>(0,E.jsx)(_,{data:e,rowStyle:r,index:n,rowComponent:t})})})},l_={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"},c_=["title","wrapper","children"],d_=m.createContext([[],()=>{}]),u_=m.createContext({}),h_=({onAddLabel:e,onFinish:t,path:n})=>{const r=(0,m.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,m.useEffect)((()=>{var e;return null==(e=r.current)?void 0:e.focus()}),[]),(0,E.jsx)("div",{className:l_.taxonomy__newitem,children:(0,E.jsx)("input",{name:"taxonomy__add",onKeyDownCapture:o,onBlur:o,ref:r})})},g_=({isEditable:e,flatItems:t})=>{const[n,r]=(0,m.useContext)(d_),{showFullPath:o,pathSeparator:i=" / "}=(0,m.useContext)(u_),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,E.jsx)("div",{className:["htx-taxonomy-selected",l_.taxonomy__selected].join(" "),children:a.map(((t,a)=>(0,E.jsxs)("div",{children:[(0,E.jsx)("span",{children:o?t.join(i):t[t.length-1]}),e?(0,E.jsx)("input",{type:"button",onClick:()=>r(n[a],!1),value:"×"}):null]},t.join("|"))))})};const m_=e=>{let{title:t,wrapper:n,children:r}=e,o=(0,nr.A)(e,c_);const i=n?(0,E.jsx)(n,{children:r}):r;return t?(0,E.jsx)(hr,Object.assign({title:t,mouseEnterDelay:500},o,{children:i})):i},p_=({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:p},toggle:f,addInside:v}=t,[y,b]=(0,m.useContext)(d_),{leafsOnly:w,maxUsages:C,maxUsagesReached:S,onAddLabel:j,onDeleteLabel:O}=(0,m.useContext)(u_),R=y.some((e=>(0,x.isArraysEqual)(e,u))),_=y.some((e=>function(e,t){return!(e.length<=t.length)&&t.every(((t,n)=>e[n]===t))}(e,u))),A=w&&!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,m.useCallback)((e=>{e&&(e.indeterminate=!R&&_)}),[R,_]),K=(0,m.useCallback)((()=>{null==O||O(u),v()}),[t,O]),D="session"===t.row.origin?l_.taxonomy__item_session:"user"===t.row.origin?l_.taxonomy__item_user:"",N=""===d&&j,V=(0,m.useRef)(),z=r-h-(r-(null==(i=V.current)?void 0:i.parentElement.offsetWidth)||0)-90;return(0,m.useEffect)((()=>{const e=null==V?void 0:V.current;e&&(e.toggle=f,n(e))}),[]),(0,E.jsx)("div",{ref:V,style:Object.assign({paddingLeft:h,maxWidth:r},e,{width:"fit-content"}),children:N?(0,E.jsx)(h_,{onAddLabel:j,onFinish:()=>v(),path:u},""):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)("div",{className:[l_.taxonomy__measure,!!(0,k.VS)(k.c0)&&l_.taxonomy__measure_ff_dev4075].filter(Boolean).join(" "),children:[(0,E.jsx)("label",{children:d}),(0,k.VS)(k.c0)&&!c&&(0,E.jsx)("div",{className:l_.taxonomy__extra,children:(0,E.jsx)("span",{className:l_.taxonomy__extra_count,children:l})})]}),(0,E.jsx)(m_,{title:p,children:(0,E.jsxs)("div",{className:[l_.taxonomy__item,D].join(" "),children:[(0,E.jsx)("div",{className:l_.taxonomy__grouping,onClick:()=>f(a),children:(0,E.jsx)(wc,{stroke:"#09f",style:I})}),(0,E.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,E.jsx)("label",{htmlFor:a,style:(0,k.VS)(k.c0)?{}:{maxWidth:`${z}px`},onClick:o?()=>A&&f(a):void 0,title:L,className:P?l_.taxonomy__collapsable:void 0,children:d}),!c&&(0,E.jsxs)("div",{className:l_.taxonomy__extra,children:[(0,E.jsx)("span",{className:l_.taxonomy__extra_count,children:l}),o&&j&&(0,E.jsx)("div",{className:l_.taxonomy__extra_actions,children:(0,E.jsx)(e_.A,{destroyPopupOnHide:!0,trigger:["click"],overlay:(0,E.jsxs)(t_.A,{children:[(0,E.jsx)(t_.A.Item,{className:l_.taxonomy__action,onClick:()=>{v(a)},children:"Add Inside"},"add-inside"),"session"===t.row.origin&&(0,E.jsx)(t_.A.Item,{className:l_.taxonomy__action,onClick:K,children:"Delete"},"delete")]}),children:(0,E.jsx)("div",{children:"..."})})})]})]})})]})})},f_=({show:e,flatten:t,items:n,dropdownRef:r,isEditable:o})=>{const i=(0,m.useRef)(null),[a,s]=(0,m.useState)(""),{onAddLabel:l,minWidth:c,maxWidth:d}=(0,m.useContext)(u_),[u,h,g]=n_(!1),p=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,m.useEffect)((()=>{const t=i.current;e&&t&&(t.value="",t.focus(),s(""))}),[e]);return(0,E.jsxs)("div",{className:l_.taxonomy__dropdown,ref:r,style:{display:e?"block":"none"},children:[(0,E.jsx)("input",{autoComplete:"off",className:l_.taxonomy__search,name:"taxonomy__search",placeholder:"Search...",onInput:e=>s(e.currentTarget.value.toLocaleLowerCase()),ref:i}),(0,E.jsx)(s_,{items:p,isEditable:o,rowComponent:p_,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,E.jsx)("div",{className:l_.taxonomy__add__container,children:u?(0,E.jsx)(h_,{path:[],onAddLabel:l,onFinish:g}):o?(0,E.jsx)("div",{className:l_.taxonomy__add,children:(0,E.jsx)("button",{type:"button",onClick:h,children:"Add"})}):null})]})},v_=({items:e,selected:t,onChange:n,onAddLabel:r,onDeleteLabel:o,options:i={},isEditable:a=!0})=>{const s=(0,m.useRef)(null),l=(0,m.useRef)(null),[c,d]=(0,m.useState)(!1),u=(0,m.useCallback)((()=>d(!1)),[]),h=(0,m.useCallback)((e=>{var t;const n=l_.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?l_.taxonomy_open:"",p=(0,m.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,m.useState)(t),y=(0,m.useMemo)((()=>[f,(e,t)=>{const r=t?[...f,e]:f.filter((t=>!(0,x.isArraysEqual)(t,e)));(!1!==i.canRemoveItems||r.length)&&(v(r),n&&n(null,r))}]),[f]),b=(0,m.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]),w=(0,m.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,m.useEffect)((()=>{v(t)}),[t]),(0,m.useEffect)((()=>(document.body.addEventListener("click",h,!0),document.body.addEventListener("keydown",w),()=>{document.body.removeEventListener("click",h),document.body.removeEventListener("keydown",w)})),[]),(0,E.jsx)(d_.Provider,{value:y,children:(0,E.jsxs)(u_.Provider,{value:b,children:[(0,E.jsx)(g_,{isEditable:a,flatItems:p}),(0,E.jsxs)("div",{className:["htx-taxonomy",l_.taxonomy,g].join(" "),ref:l,children:[(0,E.jsxs)("span",{onClick:()=>d((e=>!e)),children:[i.placeholder||"Click to add...",(0,E.jsx)(wc,{stroke:"#09f"})]}),(0,E.jsx)(f_,{show:c,isEditable:a,items:e,flatten:p,dropdownRef:s})]})]})})},y_=u.gK.model(Object.assign({},(0,k.VS)(k.cE)?{id:u.gK.identifier}:{},{selected:u.gK.optional(u.gK.boolean,!1),alias:u.gK.maybeNull(u.gK.string),value:u.gK.maybeNull(u.gK.string),hotkey:u.gK.maybeNull(u.gK.string),style:u.gK.maybeNull(u.gK.string),html:u.gK.maybeNull(u.gK.string),color:u.gK.maybeNull(u.gK.string),hint:u.gK.maybeNull(u.gK.string)})),b_=u.gK.model({type:"choice",visible:u.gK.optional(u.gK.boolean,!0),_value:u.gK.optional(u.gK.string,""),children:De.unionArray(["choice"]),parentTypes:De.tagsTypes(["Choices","Taxonomy"]),readonly:u.gK.optional(u.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 De.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()}:{}})),x_=u.gK.compose("ChoiceModel",tE,y_,Ue,b_,Ne),w_=(0,v.WQ)("store")((0,v.PA)((({item:e,store:t})=>{var n;let r={};e.style&&(r=K.cssConverter(e.style));const o=(t.settings.enableTooltips||t.settings.enableLabelTooltips)&&t.settings.enableHotkeys&&e.hotkey,i=(0,m.useCallback)((t=>{e.isReadOnly()||(e.toggleSelected(),t.nativeEvent.target.blur())}),[]),[a,s]=(0,m.useState)(!1),l=(0,m.useCallback)((()=>s((e=>!e))),[]);return(0,E.jsxs)(Qe.eB,{name:"choice",mod:{layout:e.parent.layout,leaf:e.isLeaf,notLeaf:!e.isLeaf,hidden:!e.visible},children:[(0,E.jsxs)(Qe.Sl,{name:"item",mod:{notLeaf:!e.isLeaf},style:r,children:[(0,E.jsx)(Qe.Sl,{name:"checkbox",component:(c=e.isCheckbox?QE.A:JE.Ay,d=e._value,e=>(0,E.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,E.jsxs)(m_,{title:e.hint,wrapper:"span",children:[e.html?(0,E.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(e.html)}}):e._value,o&&(0,E.jsxs)(gr,{children:["[",e.hotkey,"]"]})]})}),!e.isLeaf&&(0,E.jsx)(Qe.Sl,{name:"toggle",mod:{collapsed:a},component:fE.default,type:"text",onClick:l,children:(0,E.jsx)(wc,{})})]}),e.nestedResults&&null!=(n=e.children)&&n.length?(0,E.jsx)(Qe.Sl,{name:"children",mod:{collapsed:a},children:K.renderChildren(e,e.annotation)}):null]});var c,d})));b.addTag("choice",x_,w_);const C_=u.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,x.isDefined)(r)&&(0,x.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:S_}=er.A,j_=u.gK.model({toname:u.gK.maybeNull(u.gK.string),showinline:u.gK.maybeNull(u.gK.boolean),choice:u.gK.optional(u.gK.enumeration(["single","single-radio","multiple"]),"single"),layout:u.gK.optional(u.gK.enumeration(["select","inline","vertical"]),"vertical"),value:u.gK.optional(u.gK.string,""),allownested:u.gK.optional(u.gK.boolean,!1)}),k_=u.gK.model({pid:u.gK.optional(u.gK.string,R),visible:u.gK.optional(u.gK.boolean,!0),type:"choices",children:De.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(){Sn.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&&Sn.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})`)}}})),O_=u.gK.compose("ChoicesModel",JR,zE,GR.props({_child:"ChoiceModel"}),kE,ft,...(0,k.VS)(k.gF)?[SE]:[],qe,C_,qE,XR,Ne,j_,k_),R_=(0,v.PA)((({item:e})=>(0,E.jsx)(er.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,E.jsx)(S_,{value:e._value,children:(0,E.jsx)(m_,{title:e.hint,wrapper:"div",children:e._value})},e._value)))}))),E_=(0,v.PA)((({item:e})=>(0,E.jsx)(Qe.eB,{name:"choices",mod:{hidden:!e.isVisible||!e.perRegionVisible(),layout:e.layout},ref:e.elementRef,children:"select"===e.layout?(0,E.jsx)(R_,{item:e}):K.renderChildren(e,e.annotation)})));b.addTag("choices",O_,E_);var __=n(55454),A_=n(99811);const T_=u.gK.model({toname:u.gK.maybeNull(u.gK.string),maxrating:u.gK.optional(u.gK.string,"5"),icon:u.gK.optional(u.gK.string,"star"),size:u.gK.optional(u.gK.string,"medium"),defaultvalue:u.gK.optional(u.gK.string,"0"),hotkey:u.gK.maybeNull(u.gK.string)}),P_=u.gK.model({pid:u.gK.optional(u.gK.string,R),type:"rating",rating:u.gK.maybeNull(u.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(){Sn.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()}))),I_=u.gK.compose("RatingModel",JR,zE,kE,ft,...(0,k.VS)(k.gF)?[SE]:[],Ne,T_,P_),L_=(0,v.WQ)("store")((0,v.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,E.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,E.jsx)(__.A,{character:(0,E.jsx)(A_.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,E.jsxs)("sup",{style:{fontSize:"9px"},children:["[",e.hotkey,"]"]})]})})));b.addTag("rating",I_,L_);const M_=u.gK.model("ParagraphsRegionModel",{type:"textrange",object:u.gK.late((()=>u.gK.reference(F_))),startOffset:u.gK.integer,start:u.gK.string,endOffset:u.gK.integer,end:u.gK.string,states:u.gK.maybeNull(u.gK.array(u.gK.union(mE,GE,O_,I_)))}).volatile((()=>({text:"",hideable:!0}))).views((e=>({get parent(){return(0,u._n)(e)?e.object:null},getRegionElement(){var t;return null==(t=e._spans)?void 0:t[0]}}))).actions((e=>({beforeDestroy(){un.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}}))),K_=u.gK.compose("ParagraphsRegionModel",ut,bt,Xe,M_,$R);b.addRegionType(K_,"paragraphs");const D_={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"},N_=u.gK.model("ParagraphsModel",{value:u.gK.maybeNull(u.gK.string),valuetype:u.gK.optional(u.gK.enumeration(["json","url"]),(()=>window.LS_SECURE_MODE?"url":"json")),audiourl:u.gK.maybeNull(u.gK.string),showplayer:!1,highlightcolor:u.gK.maybeNull(u.gK.string),showlabels:u.gK.optional(u.gK.boolean,!1),layout:u.gK.optional(u.gK.enumeration(["none","dialogue"]),"none"),savetextresult:u.gK.optional(u.gK.enumeration(["none","no","yes"]),(()=>window.LS_SECURE_MODE?"no":"yes")),namekey:u.gK.optional(u.gK.string,"author"),textkey:u.gK.optional(u.gK.string,"text"),contextscroll:u.gK.optional(u.gK.boolean,!1)}),V_=u.gK.model("ParagraphsModel",{type:"paragraphs",_update:u.gK.optional(u.gK.number,1)}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,u.Zn)(e)},get audio(){if(!e.audiourl)return null;if("$"===e.audiourl[0]){const t=(0,u.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=WR().make_color({seed:n})[0];return(0,k.VS)(k.LG)?{phrase:{"--highlight-color":r,"--background-color":"#FFF"},name:{color:r},inactive:{phrase:{"--highlight-color":un.Colors.convertToRGBA(r,.4),"--background-color":"#FAFAFA"},name:{color:un.Colors.convertToRGBA(r,.9)}}}:{phrase:{backgroundColor:un.Colors.convertToRGBA(r,.25)}}}return{}},get layoutClasses(){return"dialogue"===e.layout?{phrase:D_.phrase,name:D_.dialoguename,text:D_.dialoguetext}:{phrase:D_.phrase,name:D_.name,text:D_.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,k.VS)(k.fw)||(!e.filterByAuthor.length||e.filterByAuthor.includes(t[e.namekey]))}))),z_=u.gK.model().volatile((()=>({_value:null,filterByAuthor:[],searchAuthor:"",playingId:-1,playing:!1,audioRef:(0,m.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,x.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,x.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}}))),B_=u.gK.model().actions((e=>({needsUpdate(){e._update=e._update+1},updateValue(t){const n=S(e.value,t.task.dataObj);if("url"===e.valuetype){const r=n;if(!(0,x.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([Mj.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=et.A.ERR_LOADING_HTTP({attr:e.value,error:String(n),url:r});t.annotationStore.addErrors([Mj.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([Mj.generalError(`${t}
    ${n.map((e=>`
  • ${e}
  • `)).join("")}
`)])}const r=(0,k.VS)(k.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=K_.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,k.VS)(k.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,k.VS)(k.Gd))return e.addRegions([t])[0];const n=(0,k.VS)(k.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}}))),H_=[ut,N_,Ye,On,Ne,V_,z_,B_].filter(Boolean),F_=u.gK.compose("ParagraphsModel",...H_);var W_=n(8009);const $_=m.createContext(null),U_=["animated","visible"];let Z_=1;const G_=(0,m.forwardRef)(((e,t)=>{var n;let{animated:r=!0,visible:o=!1}=e,i=(0,nr.A)(e,U_);const a=(0,Qe.cn)("dropdown"),s=(0,m.useRef)(),{triggerRef:l,minIndex:c}=null!=(n=(0,m.useContext)($_))?n:{},d=void 0===l,{children:u}=i,[g,p]=(0,m.useState)(o),[f,v]=(0,m.useState)({}),[y,b]=(0,m.useState)(o?"visible":null),x=(0,m.useCallback)((()=>{var e;const t=s.current,n=null!=(e=null==l?void 0:l.current)?e:t.parentNode,{left:r,top:o}=sr(n,t,i.alignment||"bottom-left");v({left:r,top:o})}),[l,c]),w=(0,m.useMemo)((()=>Z_++),[]),C=(0,m.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();ir(o,{transition:()=>{b(e?"appear":"disappear")},beforeTransition:()=>{b(e?"before-appear":"before-disappear")},afterTransition:()=>{b(e?"visible":null),n()}})}))}),[r]),S=(0,m.useCallback)((async(e,t)=>{const n=null!=e?e:!g;g!==n&&(null==i.onToggle||i.onToggle(n),await C(n,t),p(n))}),[g,C,i.onToggle]),j=(0,m.useCallback)((async e=>{await S(!1,e)}),[S]),O=(0,m.useCallback)((async e=>{await S(!0,e)}),[S]);ur({onEnterFullscreen:()=>j(!0),onExitFullscreen:()=>j(!0)},[]),(0,m.useEffect)((()=>{S(!1)}),[d]),(0,m.useEffect)((()=>{if(!t)return;const e={dropdown:s.current,visible:null!==y,toggle:S,open:O,close:j};t instanceof Function?t(e):t.current=e}),[j,O,t,S,s,y]),(0,m.useEffect)((()=>{p(o)}),[o]),(0,m.useEffect)((()=>{d||"before-appear"!==y||x()}),[y,x,d]),(0,m.useEffect)((()=>{!1===i.enabled&&C(!1)}),[i.enabled]),(0,m.useEffect)((()=>{o?O():j()}),[o]);const R=(0,m.useMemo)((()=>{const e=u;return e.props&&"Menu"===e.props.type?(0,m.cloneElement)(e,Object.assign({},e.props,{className:a.elem("menu").mix(e.props.className)})):u}),[u]),_=(0,m.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,m.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,E.jsx)(Qe.eB,{ref:s,name:"dropdown","data-testid":i.dataTestId,mix:[i.className,_],style:Object.assign({},A,{borderRadius:(0,k.VS)(k.bA)&&4}),onClick:e=>e.stopPropagation(),children:R});return!0===i.inline?T:(0,h.createPortal)(T,document.body)}));G_.displayName="Dropdown";const Y_=["tag","children","content","toggle","closeOnClickOutside","disabled"],X_=(0,m.forwardRef)(((e,t)=>{var n;let{tag:r,children:o,content:i,toggle:a,closeOnClickOutside:s=!0,disabled:l=!1}=e,c=(0,nr.A)(e,Y_);const d=null!=t?t:(0,m.useRef)(),u=m.Children.only(o),h=(0,m.useRef)(new Set),[g,p]=(0,m.useState)(1e3),f=(0,m.useRef)(null==u||null==(n=u.props)||null==(n=n.ref)?void 0:n.current),v=(0,m.useContext)($_),y=(0,m.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,m.useCallback)((e=>{var t;s&&(y(e.target)||null==(t=d.current)||null==t.close||t.close())}),[s,y]),x=(0,m.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,m.useMemo)((()=>Object.assign({},u.props,{tag:r,key:"dd-trigger",ref:e=>{var t;f.current=null!=(t=f.current)?t:e,f.current&&p(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,Qe.cn)("dropdown").elem("trigger").mix(c.className),onClickCapture:x})),[u,f,c.className,x]),C=(0,m.useMemo)((()=>(0,m.cloneElement)(u,w)),[u,w]),S=i?(0,E.jsx)(G_,Object.assign({},c,{ref:d,children:i})):null;(0,m.useEffect)((()=>(document.addEventListener("click",b,{capture:!0}),()=>document.removeEventListener("click",b,{capture:!0}))),[b]);const j=(0,m.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,m.useEffect)((()=>{if(v)return v.addChild(j),()=>v.removeChild(j)}),[]),(0,E.jsxs)($_.Provider,{value:j,children:[C,S]})})),q_=()=>(0,m.useContext)($_),J_=Object.assign(G_,{Trigger:X_}),Q_=(0,m.createContext)({multiple:!1,focused:!1,currentValue:[],setCurrentValue(){}}),{Block:eA,Elem:tA}=(0,Qe.JE)(),nA=(e,t)=>m.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=nA(e,t[0])):"Select.OptGroup"===o.displayName&&(n=nA(i.children,t)),n}),null),rA=({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,m.useRef)(),p=(0,m.useRef)(),[f,v]=(0,m.useState)(i?[].concat(null!=e?e:[]).flat(10):e),[y,b]=(0,m.useState)(),w=m.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,m.useMemo)((()=>{var e;if((0,k.VS)(k.fw)&&i&&a)return a(Array.isArray(f)?f:[f||""]);if(i&&Array.isArray(f)&&(null==f?void 0:f.length)>1)return(0,E.jsx)(E.Fragment,{children:"Multiple values selected"});const n=nA(r,null!=t?t:f),o=null==n||null==(e=n.props)?void 0:e.children;return o?(0,m.cloneElement)((0,E.jsx)(E.Fragment,{children:o})):null}),[f,t,r,e,a]),j=e=>{const t=w[null!=e?e:0];b(t.props.value)},O=(0,m.useCallback)((e=>{const t=w.findIndex((e=>e.props.value===y));let n=-1===t?0:t+e;n>=w.length?n=0:n<0&&(n=w.length-1),j(n)}),[y]);return(0,m.useEffect)((()=>{var t;i&&Array.isArray(e)&&Array.isArray(f)?!1===(0,W_.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,E.jsx)(Q_.Provider,{value:C,children:(0,E.jsx)(eA,{ref:p,name:"select",mod:{size:n,surface:c},style:o,tabIndex:u,onKeyDown:e=>{var t;document.activeElement===p.current&&(["ArrowDown","ArrowUp"].includes(e.key)?null!=g&&g.current.visible?O("ArrowDown"===e.key?1:-1):(null==(t=g.current)||t.open(),j()):"Space"!==e.code&&"Enter"!==e.code||!(0,x.isDefined)(y)||C.setCurrentValue(y))},children:(0,E.jsx)(J_.Trigger,{ref:g,className:(0,Qe.cn)("select",{elem:"dropdown",mod:{variant:l}}).toClassName(),content:(0,E.jsx)(tA,{name:"list",children:r}),onToggle:e=>{e||b(null)},children:(0,E.jsxs)(tA,{name:"selected","data-testid":d,children:[(0,E.jsx)(tA,{name:"value",children:null!=S?S:h}),(0,E.jsx)(tA,{name:"icon"})]})})})})};rA.displayName="Select";const oA=({value:e,children:t,style:n})=>{const{setCurrentValue:r,multiple:o,currentValue:i,focused:a}=(0,m.useContext)(Q_),s=(0,m.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,m.useMemo)((()=>String(e)===String(a)),[e,a]);return(0,E.jsx)(tA,{name:"option",mod:{selected:s,focused:l},onClick:t=>{t.stopPropagation(),r(e)},style:n,children:t})};oA.displayName="Select.Option";const iA=({label:e,children:t,style:n})=>(0,E.jsxs)(tA,{name:"optgroup",style:n,children:[(0,E.jsx)(tA,{name:"optgroup-label",children:e}),(0,E.jsx)(tA,{name:"optgroup-list",children:t})]});iA.displayName="Select.OptGroup",rA.Option=oA,rA.OptGroup=iA;const aA=({name:e,selected:t})=>{const n={border:`2px solid ${un.Colors.convertToRGBA(WR().make_color({seed:e})[0])}`};return(0,E.jsx)("span",{className:[D_.authorFilter__select__item,t&&D_.authorFilter__select__item_selected].join(" "),style:n,children:e})},sA=e=>0===e.length?null:(0,E.jsx)("div",{className:D_.authorFilter__select,children:e.map((e=>(0,E.jsx)(aA,{name:e},e)))}),lA=(0,v.PA)((({item:e,onChange:t})=>{const n=(0,m.useMemo)((()=>(0,E.jsx)("span",{className:D_.authorFilter__placeholder,children:"Show all authors"})),[]),r=e.filterByAuthor,o=(0,m.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,m.useCallback)((n=>{!n||null!=n&&n.includes(null)?e.setAuthorFilter([]):e.setAuthorFilter(n),null==t||t()}),[e.setAuthorFilter]);return(0,E.jsx)("div",{className:D_.authorFilter,children:(0,E.jsxs)(rA,{placeholder:n,value:r,options:o,onChange:a,renderMultipleSelected:sA,size:"compact",variant:"rounded",surface:"emphasis",multiple:!0,children:[(0,E.jsx)("div",{className:D_.authorFilter__search,children:(0,E.jsx)("input",{autoComplete:"off",className:D_.authorFilter__search__input,name:"search_author",placeholder:"Search",onInput:t=>e.setAuthorSearch(t.target.value)})}),(0,E.jsx)(rA.Option,{value:null,exclude:!0,children:(0,E.jsx)("span",{className:D_.authorFilter__showall,children:"Show all authors"})},"showAllAuthors"),i.map((e=>(0,E.jsx)(rA.Option,{value:e,children:(0,E.jsx)(aA,{name:e,selected:!1})},e)))]})})})),cA=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")}`},dA=(0,v.PA)((({item:e,playingId:t,activeRef:n,setIsInViewport:r})=>{const[o,i]=(0,m.useState)(null),[a,s]=(0,m.useState)(0),[l,c]=(0,m.useState)(null),d=e.layoutClasses,h=!!e.audio;let g;const p=(0,m.useCallback)(((t,n,r,o=!0)=>{if(!t||!(0,k.VS)(k.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,m.useCallback)((r=>{var o,i,s,l,d,u,h,g;if(!(0,k.VS)(k.LG)||!e.contextscroll)return;const m=(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/m;v>0&&v<100?p(null==(g=n.current)?void 0:g.querySelector(".reading-line"),v,f,a.playing):c(r)}),[a,t]),v=(0,m.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)||p(n,0,s,e.playing),g=new IntersectionObserver((e=>{r(e[0].isIntersecting)}),{rootMargin:"0px"}),g.observe(n)}}),[t]);if((0,m.useEffect)((()=>{var t;if((0,k.VS)(k.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,m.useEffect)((()=>{f(!0)}),[a]),(0,m.useEffect)((()=>{l&&f(!1)}),[t]),(0,m.useEffect)((()=>{(0,k.VS)(k.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,k.VS)(k.LG)&&!a?e.layoutStyles(o).inactive:e.layoutStyles(o),c=[d.phrase],g=e.isVisibleForAuthorFilter(o);return h&&c.push(D_.withAudio),g||c.push(D_.collapsed),(0,u.Zn)(e).settings.showLineNumbers&&c.push(D_.numbered),(0,E.jsxs)("div",{ref:a?n:null,"data-testid":`phrase:${i}`,className:`${c.join(" ")} ${(0,k.VS)(k.LG)&&D_.newUI}`,style:null==l?void 0:l.phrase,children:[g&&h&&!isNaN(o.start)&&(0,E.jsx)(Tr.A,{type:"text",className:(0,k.VS)(k.LG)?D_.playNewUi:D_.play,"aria-label":s?"pause":"play",icon:s?(0,k.VS)(k.LG)?(0,E.jsx)(du,{}):(0,E.jsx)(Pr.A,{}):(0,k.VS)(k.LG)?(0,E.jsx)(ru,{}):(0,E.jsx)(Ir.A,{}),onClick:()=>{r(!0),e.play(i)}}),(0,k.VS)(k.LG)?(0,E.jsxs)("span",{className:D_.titleWrapper,"data-skip-node":"true",children:[(0,E.jsx)("span",{className:null==d?void 0:d.name,style:null==l?void 0:l.name,children:o[e.namekey]}),(0,E.jsx)("span",{className:D_.time,children:(e=>{var t,n,r,o,a;return`${cA(null==(t=e._value[i])?void 0:t.start)} - ${cA(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,E.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,k.VS)(k.LG)?(0,E.jsxs)("span",{className:D_.wrapperText,children:[a&&(0,E.jsx)("span",{ref:v,className:`${D_.readingLine} reading-line`,"data-skip-node":"true"}),(0,E.jsx)("span",{className:`${null==d?void 0:d.text}`,children:o[e.textkey]})]}):(0,E.jsx)("span",{className:`${null==d?void 0:d.text}`,children:o[e.textkey]})]},`${e.name}-${i}`)}))})),uA=["className","label","labelProps","description","checked","defaultChecked","onChange","required","style"],hA=(0,m.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,nr.A)(e,uA);const g=(0,Qe.cn)("toggle"),p=(0,m.useMemo)((()=>{var e;return null!=(e=null!=l?l:s)&&e}),[l,s]),[f,v]=(0,m.useState)(null!=(n=null!=l?l:s)&&n),y={};(0,m.useEffect)((()=>{v(p)}),[p]),f&&(y.checked=f),y.disabled=h.disabled;const b=(0,E.jsxs)(Qe.eB,{name:"toggle",className:r,mod:y,style:u,children:[(0,E.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,E.jsx)(Qe.Sl,{tag:"span",name:"indicator"})]});return o?(0,E.jsx)(wC,Object.assign({ref:t,placement:"right",required:d,text:o,children:b,description:a},null!=i?i:{})):b})),gA={};(0,k.VS)(k.xS)&&(gA.crossOrigin="anonymous");class mA extends m.Component{constructor(e){super(e),this._regionSpanSelector=".htx-highlight",this.mainContentSelector=`.${(0,Qe.cn)("main-content").toClassName()}`,this.mainViewAnnotationSelector=`.${(0,Qe.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)&&cn(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,Ae.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,k.VS)(k.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,Ae.findNodeAt)(a,l)),i.setEnd(...(0,Ae.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,Ae.findNodeAt)(a,l)),i.setEnd(...(0,Ae.findNodeAt)(s,c)),n.fixOffsets(l,c)}}else!n.text&&i.toString()&&n.setText(this._getResultText(+n.start,+n.end,l,c));(0,Ae.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,k.VS)(k.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,k.VS)(k.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,E.jsxs)("div",{className:D_.wrapper_header,children:[(0,k.VS)(k.fw)&&(0,E.jsx)(lA,{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,E.jsxs)("div",{className:D_.wrapper_header__buttons,children:[(0,E.jsx)(hA,{"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,E.jsx)(hr,{placement:"topLeft",title:"Automatically sync transcript scrolling with audio playback",children:(0,E.jsx)(fu,{})})]})]})}render(){const{item:e}=this.props,t=!!e.audio,n=(0,k.VS)(k.LG)&&this.props.item.contextscroll;return!e.playing&&(0,k.VS)(k.LG)&&this._disposeTimeout(),(0,k.VS)(k.fw)&&!e._value?null:(0,E.jsxs)(Kn,{item:e,className:(0,Qe.cn)("paragraphs").toClassName(),children:[t&&(0,E.jsx)("audio",Object.assign({},gA,{controls:e.showplayer&&!e.syncedAudio,className:D_.audio,src:e.audio,ref:e.audioRef,onLoadedMetadata:e.handleAudioLoaded,onEnded:e.reset,onError:e.handleError,onCanPlay:e.handleCanPlay})),(0,k.VS)(k.LG)?this.renderWrapperHeader():(0,k.VS)(k.fw)&&(0,E.jsx)(lA,{item:e}),(0,E.jsx)("div",{ref:this.myRef,"data-testid":"phrases-wrapper","data-update":e._update,className:n?D_.scroll_container:D_.container,onMouseUp:this.onMouseUp.bind(this),children:(0,E.jsx)(dA,Object.assign({setIsInViewport:this.setIsInViewPort.bind(this),item:e,playingId:e.playingId},(0,k.VS)(k.LG)?{activeRef:this.activeRef}:{}))})]})}}const pA=(0,v.WQ)("store")((0,v.PA)(mA));b.addTag("paragraphs",F_,pA),b.addObjectType(F_);class fA{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 fA(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 yA(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 vA{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 yA?n.findTextElement(e,t):n instanceof fA?n:void 0}findElementByNode(e){for(const t of this.children){if(t.node===e)return t;if(t instanceof yA){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 yA(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 fA;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 yA)).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 yA&&(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 fA&&(0===t.length||t[t.length-1].node.nextSibling===e.node)?t.push(e):(r(),n.push(e));r(),this.children=n}}class yA extends vA{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 bA extends vA{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 fA(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 xA{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 wA{constructor(){this.elements=[],this.endPos=void 0,this.displayedText="",this.displayedTextPos=0,this.endPos=0}createDynamicBlock(e){const{endPos:t}=this,n=new bA(t,e);return this.elements.push(n),n}setDisplayedText(e){this.displayedText=e}addStaticElement(e,t){this.elements.push(new xA(e,this.endPos,t.toString()))}addExtraText(e){let t=this.elements.length-1;for(;!(this.elements[t]instanceof bA)&&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 xA||this.elements[t+1]instanceof bA);)if(t++,t>=this.elements.length-1)return;return this.elements[t+1]}getEndOf(e){if(e instanceof yA||e instanceof fA)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 xA){if(t.node===e)return t}else if(t instanceof bA){const n=t.findElementByNode(e);if(n)return n}}findTextBlock(e,t="start"){const n=this.elements.find((n=>n instanceof bA&&n.start<=e&&n.end>=e&&n[t]!==e));return(0,x.isDefined)(n),n}indexOfTextBlock(e,t="start"){return this.elements.findIndex((n=>n instanceof bA&&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 bA))}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 CA{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 SA{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 CA,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 wA,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 CA,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`${jA}-${e.identifier}`},get classNames(){var t;const n=[jA,e.className];return(null!=(t=e.parent.showlabels)?t:e.store.settings.showLabels)||n.push(kA),(0,x.isDefined)(e.parent.showlabels)&&n.push("htx-manual-label"),n},get styles(){const{className:t}=e,n=e.getLabelColor(),r=un.Colors.rgbaChangeAlpha(n,.8);return`\n .${t} {\n background-color: ${n} !important;\n border: 1px dashed transparent;\n }\n .${t}.${RA.active}:not(.${RA.hidden}) {\n color: ${un.Colors.contrastColor(r)} !important;\n background-color: ${r} !important;\n }\n `}}))).actions((e=>({applyHighlight(t=!1){var n,r;if((0,k.VS)(k.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=R(5),d=EA(s.ownerDocument,c,l),u=["htx-highlight",d.className];return(null!=(r=e.parent.showlabels)?r:e.store.settings.showLabels)||u.push(kA),(0,x.isDefined)(e.parent.showlabels)&&u.push("htx-manual-label"),e._stylesheet=d,e._spans=un.Selection.highlightRange(a,{classNames:u,index:e.region_index,label:e.getLabels()}),e._spans},updateHighlightedText(){if(!e.text){if((0,k.VS)(k.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,k.VS)(k.Er)&&null!=(t=e._spans)&&t.length){const t=e._spans[e._spans.length-1];un.Selection.applySpanStyles(t,{index:e.region_index,label:e.getLabels()})}},clearSpans(){e._spans=null},removeHighlight(){if((0,k.VS)(k.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 un.Selection.removeRange(e._spans)},updateAppearenceFromState(){var t;if(null==(t=e._spans)||!t.length)return;const n=e._spans[e._spans.length-1];(0,k.VS)(k.Er)?null==e.parent.setStyles||e.parent.setStyles({[e.identifier]:e.styles}):e._stylesheet.setColor(e.getLabelColor()),un.Selection.applySpanStyles(n,{index:e.region_index,label:e.getLabels()})},selectRegion(){var t;e.annotation.setHighlightedNode(e),e.addClass(RA.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,k.VS)(k.Er)?RA.active:null==(t=e._stylesheet)?void 0:t.state.active)},beforeDestroy(){var t;if((0,k.VS)(k.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,k.VS)(k.Er)&&e._spans)&&(e._highlighted=t,e.highlighted?(0,k.VS)(k.Er)?e.addClass(RA.highlighted):(e.addClass(e._stylesheet.state.highlighted),null==(n=e._stylesheet)||n.setCursor(N.A.LINKING_MODE_CURSOR)):(0,k.VS)(k.Er)?e.removeClass(RA.highlighted):(e.removeClass(e._stylesheet.state.highlighted),null==(r=e._stylesheet)||r.setCursor(N.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||N.l).fillcolor;return un.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()}}))),RA={active:"__active",highlighted:"__highlighted",collapsed:"__collapsed",hidden:"__hidden",noLabel:kA},EA=(e,t,n)=>{var r;const o=`.htx-highlight-${t}`,i={color:`--background-color-${t}`,cursor:`--cursor-style-${t}`},a=`${o}.${RA.active}:not(.${RA.hidden})`,s=`${o}.${RA.highlighted}`,l=e=>un.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: ${un.Colors.contrastColor(c)} !important;\n ${i.color}: ${c}\n `,[s]:"\n position: relative;\n border-color: rgb(0, 174, 255);\n ",[`${o}.${RA.hidden}`]:`\n border: none;\n padding: 0;\n pointer-events: none;\n ${i.color}: transparent;\n `,[`${o}.${RA.hidden}::before`]:"\n display: none\n ",[`${o}.${RA.hidden}::after`]:"\n display: none\n ",[`${o}.${RA.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:RA,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=un.Colors.contrastColor(n)},setCursor:e=>{u.ownerDocument.documentElement.style.setProperty(i.cursor,e)},remove:()=>{u.remove()}}},_A=()=>"Do not put text directly in task data if you use valueType=url.",AA=e=>`URL (${(0,x.escapeHtml)(e)}) is not valid.`,TA=()=>'In SECURE MODE valueType is set to "url" by default.',PA=u.gK.model("RichTextModel",{value:u.gK.maybeNull(u.gK.string),valuetype:u.gK.optional(u.gK.enumeration(["text","url"]),(()=>window.LS_SECURE_MODE?"url":"text")),inline:!1,savetextresult:u.gK.optional(u.gK.enumeration(["none","no","yes"]),(()=>window.LS_SECURE_MODE?"no":"none")),selectionenabled:u.gK.optional(u.gK.boolean,!0),clickablelinks:!1,highlightcolor:u.gK.maybeNull(Ie.color),showlabels:u.gK.maybeNull(u.gK.boolean),encoding:u.gK.optional(u.gK.enumeration(["none","base64","base64unicode"]),"none"),granularity:u.gK.optional(u.gK.enumeration(["symbol","word","sentence","paragraph"]),"symbol")}),IA=u.gK.model("RichTextModel",{type:"richtext",_value:u.gK.optional(u.gK.maybeNull(u.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.${RA.highlighted} {\n position: relative;\n cursor: ${N.A.LINKING_MODE_CURSOR};\n border-color: rgb(0, 174, 255);\n }\n .htx-highlight.${RA.hidden} {\n border: none;\n padding: 0;\n background: transparent !important;\n cursor: inherit;\n // pointer-events: none;\n }\n .htx-highlight.${RA.hidden}::before,\n .htx-highlight.${RA.hidden}::after,\n .htx-highlight.${RA.noLabel}::after {\n display: none;\n }\n `}}))).volatile((()=>({visibleNodeRef:(0,m.createRef)(),workingNodeRef:(0,m.createRef)(),originalContentRef:(0,m.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,k.VS)(k.Er)&&(r=new SA(e.visibleNodeRef.current))},onDispose(){e.regs.forEach((e=>{e.clearSpans()}))},updateValue:(0,u.L3)((function*(t){const n=S(e.value,t.task.dataObj),r=yield e.resolveValue(n);if("url"===e.valuetype){const t=r;if(!(0,x.isValidObjectURL)(t,!0)){const n=[AA(t),_A()];return window.LS_SECURE_MODE&&n.unshift(TA()),e.annotationStore.addErrors([Mj.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=et.A.ERR_LOADING_HTTP({attr:e.value,error:String(n),url:t});e.annotationStore.addErrors([Mj.generalError(r)]),e.setRemoteValue("")}}else e.setRemoteValue(r)})),setRemoteValue(t){e.loaded=!0,"base64"===e.encoding&&(t=atob(t)),"base64unicode"===e.encoding&&(t=un.Checkers.atobUnicode(t)),(0,k.VS)(k.pN)&&"text"===e.type?e._value=String(t):e._value=(0,Ae.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,k.VS)(k.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,k.VS)(k.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},h=l.map((e=>vO(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;h.forEach((e=>{g.setValue(e),(0,u.zr)(e)})),g._range=t._range;const[f,v]=sn(t._range,p);if(g.updateGlobalOffsets(f,v),t.isText)g.updateTextOffsets(f,v);else if((0,k.VS)(k.Er))g.updateXPathsFromGlobalOffsets();else{const e=g._getRootNode(!0),t=tn(f,v,e);t&&g._fixXPaths(t,e)}return g.applyHighlight(),g.notifyDrawingFinished(),g}}})),LA=u.gK.compose("RichTextModel",Ue,On,ut,Ne,ze,PA,IA);var MA=n(71161);class KA extends m.Component{constructor(...e){super(...e),this._regionSpanSelector=".htx-highlight",this._regionVisibleSpanSelector=".htx-highlight:not(.__hidden)",this.loadingRef=m.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,k.VS)(k.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();un.Selection.captureSelection((({selectionText:t,range:n})=>{if(!n||n.collapsed||!d.contains(n.startContainer)||!d.contains(n.endContainer))return;on(n);const r=MA.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,Ae.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=Ae.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,u._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,k.VS)(k.Er)||e.setNeedsUpdateCallbacks(this._moveElementsToWorkingNode,this._returnElementsFromWorkingNode),e.inline||(this.dispose=(0,d.lB)(e,"_isReady",this.updateLoadingVisibility,!0))}componentWillUnmount(){var e;const{item:t}=this.props;t&&(0,u._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,u._n)(e)&&(e.setLoaded(!0),this.updateLoadingVisibility(),setTimeout((()=>this._handleUpdate(!0))))}render(){const{item:e}=this.props;if(!(0,x.isDefined)(e._value))return null;let t=e._value||"";const n=this.props.store.settings,r="text"===e.type;if(r){const e=(0,Qe.cn)("richtext",{elem:"line"});t=(0,Ae.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,E.jsxs)(Qe.eB,{name:"richtext",tag:Kn,item:e,children:[(0,E.jsx)(Qe.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,k.VS)(k.Er)?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"orig-container",ref:e.originalContentRef,className:"htx-richtext-orig",dangerouslySetInnerHTML:{__html:t}},"orig"),(0,E.jsx)(Qe.Sl,{name:"work-container",ref:e.workingNodeRef,className:"htx-richtext-work"},"work")]})]})}return(0,E.jsxs)(Qe.eB,{name:"richtext",tag:Kn,item:e,children:[(0,E.jsx)(Qe.Sl,{name:"loading",ref:this.loadingRef,children:(0,E.jsx)(Hj.A,{})}),(0,E.jsx)(Qe.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,k.VS)(k.Er)?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.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,E.jsx)(Qe.Sl,{name:"work-iframe",tag:"iframe",referrerPolicy:"no-referrer",sandbox:"allow-same-origin allow-scripts",ref:e.workingNodeRef,className:"htx-richtext-work"},"work")]})]})}}const DA=(0,v.WQ)("store"),NA=DA((0,v.PA)(KA)),VA=({isText:e=!1}={})=>DA((0,v.PA)((t=>(0,E.jsx)(NA,Object.assign({},t,{isText:e})))));b.addTag("text",LA,VA({isText:!0})),b.addTag("hypertext",LA,VA({isText:!1})),b.addObjectType(LA);var zA=n(23350);const BA=u.gK.model({type:"table",value:u.gK.maybeNull(u.gK.string),_value:u.gK.frozen([]),valuetype:u.gK.optional(u.gK.string,"json")}).views((e=>({get dataSource(){const{type:t}=j(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,u.L3)((function*(t){const{type:n,options:r}=j(e.valuetype);let o=S(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,u._$)(e).messages.ERR_LOADING_HTTP({attr:e.value,error:String(t),url:o});e.annotationStore.addErrors([Mj.generalError(n)])}if("csv"===n)Fe().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}))}))),HA=u.gK.compose("TableModel",On,Ue,Ne,BA),FA=(0,v.WQ)("store")((0,v.PA)((({item:e})=>(0,E.jsx)(zA.A,{bordered:!0,dataSource:e.dataSource,columns:e.columns,pagination:{hideOnSinglePage:!0}}))));b.addTag("table",HA,FA),b.addObjectType(HA);var WA=n(46288);const $A=()=>(window.screen&&window.screen.width||1440)*(window.devicePixelRatio||2),UA=(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||N.l).fillcolor;return un.Colors.convertToRGBA(n,t)},GA=e=>!WA.f0J.sourceEvent||(e?WA.f0J.sourceEvent.type===e:["start","brush","end"].includes(WA.f0J.sourceEvent.type)),YA=e=>new Date(e).toUTCString(),XA=u.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,u.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,u.Zn)(e).task)?void 0:t.id))return;const r=n.values||{};for(const t of Object.keys(r))e[t]=r[t]}}))),qA=u.gK.model({legend:"",units:"",displayformat:u.gK.optional(u.gK.string,".1f"),interpolation:u.gK.optional(u.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:u.gK.optional(u.gK.string,"200"),strokewidth:u.gK.optional(u.gK.string,"1"),strokecolor:u.gK.optional(u.gK.string,"#1f77b4"),markersize:u.gK.optional(u.gK.string,"0"),markercolor:u.gK.optional(u.gK.string,"#1f77b4"),markersymbol:u.gK.optional(u.gK.string,"circle"),datarange:u.gK.maybe(u.gK.string),timerange:u.gK.maybe(u.gK.string),showaxis:u.gK.optional(u.gK.boolean,!0),fixedscale:u.gK.maybe(u.gK.boolean),column:u.gK.string}),JA=u.gK.model("ChannelModel",Object.assign({},(0,k.VS)(k.cE)?{id:u.gK.identifier}:{id:u.gK.optional(u.gK.identifier,R)},{type:"channel",children:De.unionArray(["channel","view"]),parentTypes:De.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}}))),QA=u.gK.compose("ChannelModel",tE,JA,qA);class eT extends m.Component{constructor(...e){super(...e),this.ref=m.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(GA("end")||!WA.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(WA.f0J.selection,o.instant);i.start===o.start&&i.end===o.end?(null==n||n.annotation.unselectAreas(),o.onClickRegion(WA.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(GA("end"))return;if(!WA.f0J.selection){const e=WA.grR(WA.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=>vO(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(WA.f0J.sourceEvent):null==n||n.annotation.unselectAreas())}const a=this.getRegion(WA.f0J.selection);this.brushCreator.move(this.gCreator,null);const s=WA.f0J.sourceEvent.ctrlKey||WA.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(WA.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(WA.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(WA.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=WA.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=WA.Ltv(this),n=WA.n55().extent(i);n.on("brush",(function(){if(GA("brush"))return;const n=u(WA.f0J.selection,e.instant);a.move(t,[s(n.start),s(n.end)+.5*e.instant]),d(WA.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=WA.Ltv(this),n=t.selectAll(".selection");t.style("display",e.hidden?"none":"block");const r=ZA(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=WA.n55().extent([[0,0],[this.state.width,this.height]]).on("brush",(function(){if(GA("brush")||!WA.f0J.selection)return;const i=n(WA.f0J.selection);o.move(t,[r(i.start),r(i.end)]),e(WA.grR(this)[0],i.end-i.start)})).on("end",this.newBrushHandler).filter((()=>!WA.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=WA.f0J;if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();const{range:t}=this.props,n=t.map((e=>WA.Jjl(o,e))),[r]=WA.grR(WA.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,h=this.height;this.zoomStep=d;const g=`marker_${n.id}`,m=`clip_${n.id}`;let{series:p}=this.props;const f=$A()*this.zoomStep;let v,y;this.useOptimizedData=p.length>f,(0,k.VS)(k.dY)&&(v=p.filter((e=>null!==e[i])),y=v.map((e=>e[o]))),this.useOptimizedData&&(this.optimizedSeries=UA(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,u.Zn)(n).annotationStore.addErrors([Mj.generalError(r)])}this.slices=null==(e=n.parent)?void 0:e.dataSlices;const w=WA.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=WA.Xxv(b);const j=(a?WA.Pps():WA.m4Y()).domain(this.extent).range([0,S]),O=WA.m4Y().domain(WA.Xxv(x)).range([h-c.max,c.min]);this.x=j,this.y=O,this.plotX=j.copy(),this.stick=e=>{const t=j.invert(e),n=(0,k.VS)(k.dY)?y:b;let r=WA.Jjl(n,t,0,n.length-1);return n[r]-t>t-n[r-1]&&r--,[n[r],(0,k.VS)(k.dY)?v[r][i]:x[r]]},this.line=WA.n8j().y((e=>this.y(e[i]))).x((e=>this.plotX(e[o]))),this.lineSlice=WA.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=WA.Ltv(this.ref.current).append("svg").attr("viewBox",[0,0,S+c.left+c.right,h+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",WA.HRO().type(WA.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",WA.HRO().type(WA.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",WA.HRO().type(WA.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",WA.HRO().type(WA.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",h).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=WA.Jjl(t[n],e[0]);const a=WA.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=WA.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,x.fixMobxObserve)(e.start,e.end,e.selected,e.inSelection,e.highlighted,e.hidden,null==(t=e.style)?void 0:t.fillcolor)})),(0,x.fixMobxObserve)(this.props.range.map(Number)),(0,E.jsx)("div",{className:"htx-timeseries-channel",ref:this.ref})}}const tT=(0,v.PA)(eT),nT=(0,v.PA)((({item:e})=>{var t,n,r,o,i,a;return null!=(t=e.parent)&&t.dataObj?(0,E.jsx)(tT,{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}));b.addTag("channel",QA,nT);const rT=u.gK.model({value:u.gK.string,valuetype:u.gK.optional(u.gK.enumeration(["url","json"]),"url"),timecolumn:"",sep:",",timeformat:"",timedisplayformat:"",durationdisplayformat:".0f",overviewchannels:"",overviewwidth:"25%",fixedscale:!1,multiaxis:u.gK.optional(u.gK.boolean,!1),hotkey:u.gK.maybeNull(u.gK.string)}),oT=u.gK.model("TimeSeriesModel",{type:"timeseries",children:De.unionArray(["channel","timeseriesoverview","view","hypertext"]),width:840,margin:u.gK.frozen({top:20,right:20,bottom:30,left:50,min:10,max:10}),brushRange:u.gK.array(u.gK.number),_needsUpdate:u.gK.optional(u.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,u.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?WA.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,u.Pw)(e).name)):null},formatTime(t){if(!e._format){const{timedisplayformat:t,isDate:n}=e;e._format="date"===t?YA:t?n?WA.aLc(t):WA.GPZ(t):String}return e._format(t)},formatDuration(t){if(!e._formatDuration){const{durationdisplayformat:t,isDate:n}=e;e._formatDuration=t?n?WA.aLc(t):WA.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:()=>zn()(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(S(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([Mj.generalError(n)])}const r=S(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([Mj.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([Mj.loadingError(`${i.status} ${i.statusText}`,r,e.value,(0,u._$)(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([Mj.loadingError(o,r,e.value,s?(0,u._$)(t).messages.ERR_LOADING_CORS:void 0)])}try{let n=(e=>{if((0,x.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(x.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([Mj.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([Mj.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([Mj.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 iT=(0,v.PA)((({item:e,data:t,series:n})=>{const r=e.regs,[o,i,a]=function(){const[e,t]=m.useState(840),[n,r]=m.useState(null),o=m.useCallback((e=>{r(e)}),[]);return m.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=m.useRef(),g=m.useRef(),p=m.useRef(),f=m.useRef(),v=m.useRef(),y=(e.isDate?WA.w7C():WA.m4Y()).domain(WA.Xxv(t[c])).range([0,d]),b=m.useCallback(e.throttledRangeUpdate(),[]),w=[0,d>>2],C=m.useRef(w),S=10;let j;const k=WA.n55().extent([[0,0],[d,s]]).on("start",(function(){const[e,t]=WA.f0J.selection;j=e===t?e:null})).on("brush",(function(){if(WA.f0J.selection&&!GA("brush")&&!GA("wheel")){let[t,n]=WA.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=WA.m4Y().domain([WA.jkA(t[r]),WA.T9B(t[r])]).range([s-l.max,l.min]);p.current.append("path").datum(UA(n,$A())).attr("class","channel").attr("fill","none").attr("stroke",i).attr("d",WA.n8j().y((e=>a(e[r]))).defined((e=>e[c])).x((e=>y(e[c]))))};return m.useEffect((()=>{a&&(h.current=WA.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)"),p.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,w),v.current.select(".handle--w").style("transform","translate(-1px, 0)"),v.current.select(".handle--e").style("transform","translate(1px, 0)"))}),[a]),m.useEffect((()=>{if(a){WA.Ltv(a).selectAll("svg").attr("viewBox",[0,0,d+l.left+l.right,s+l.bottom]),p.current.selectAll("path").remove();for(const e of u)O(e);f.current.call(WA.l78(y).ticks(d/80).tickSizeOuter(0)),v.current.call(k).call(k.move,e.brushRange.map(y))}}),[d,a]),m.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=>ZA(e,e.selected?.8:.3))).style("display",(e=>e.hidden?"none":"block")),t.exit().remove()})(r)})),e.regs.map((e=>{var t;return(0,x.fixMobxObserve)(e.start,e.end,e.selected,e.hidden,null==(t=e.style)?void 0:t.fillcolor)})),(0,E.jsx)("div",{className:"htx-timeseries-overview",ref:o})})),aT=u.gK.compose("TimeSeriesModel",On,XA,Ne,rT,oT),sT=(0,v.WQ)("store")((0,v.PA)((({item:e})=>{var t;const n=m.createRef();return m.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,E.jsx)("div",{ref:n,className:"htx-timeseries",children:(0,E.jsxs)(Kn,{item:e,children:[K.renderChildren(e,e.annotation),(0,E.jsx)(iT,{data:e.dataObj,series:e.dataHash,item:e,range:e.brushRange})]})}):(0,E.jsx)("div",{style:{textAlign:"center",height:100},children:(0,E.jsx)(f.A,{size:"large",delay:300})})})));b.addTag("timeseries",aT,sT),b.addObjectType(aT);const lT=u.gK.model({id:u.gK.identifier,type:"pagedview",children:De.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"])}),cT=u.gK.compose("PagedViewModel",lT,Ne),dT="view_page",uT=kr("Repeater"),hT=`.${(0,Qe.cn)("sidepanels").elem("content").toClassName()}`,gT=[1,5,10,25,50,100],mT=()=>{const e=new URLSearchParams(window.location.search).get(dT);return e?Number.parseInt(e):1};let pT=null;const fT=(e,t=null)=>{const n=new URLSearchParams(window.location.search),r=pT&&t!==pT;pT=t,r?n.delete(dT):1!==e?n.set(dT,e.toString()):n.delete(dT),window.history.replaceState(void 0,void 0,`${window.location.pathname}?${n}`)},vT=(0,v.PA)((({item:e})=>{const[t,n]=(0,m.useState)(mT),[r,o]=(0,m.useState)(1),i=(0,m.useCallback)((t=>{var r;n(t),fT(t,null==(r=e.annotationStore)||null==(r=r.store)?void 0:r.task.id)}),[]),a=Math.ceil(e.children.length/r);(0,m.useEffect)((()=>{o(((e,t)=>{const n=localStorage.getItem(`pages:${e}`);return n?Number.parseInt(n):null!=t?t:void 0})("repeater",1))}),[]),(0,m.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,m.useEffect)((()=>{var e,n;(0,k.VS)(k.LE)?null==(e=document.querySelector(hT))||e.scrollTo(0,0):null==(n=document.querySelector("#label-studio-dm"))||n.scrollTo(0,0);return setTimeout((()=>{uT.addNamed("repeater:next-page",(()=>{t{t>1&&i(t-1)}))})),()=>{uT.removeNamed("repeater:next-page"),uT.removeNamed("repeater:previous-page")}}),[t]),(0,m.useEffect)((()=>{var t;return fT(mT(),null==(t=e.annotationStore)||null==(t=t.store)?void 0:t.task.id),()=>{var t;fT(1,null==(t=e.annotationStore)||null==(t=t.store)?void 0:t.task.id)}}),[]);const s=(0,m.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))}})]})}));b.addTag("pagedview",cT,vT);const yT=m.createContext(),bT=["name","children","label","icon","to","className","href","danger","exact","forceReload","active","onClick"],xT=(0,m.forwardRef)((({children:e,className:t,style:n,size:r,selectedKeys:o,closeDropdownOnItemClick:i,allowClickSelected:a},s)=>{const l=q_(),c=(0,m.useMemo)((()=>new Set(null!=o?o:[])),[o]),d=(0,m.useCallback)((e=>{const t=(0,Qe.cn)("menu").elem("item").closest(e.target);l&&t&&!1!==i&&l.close()}),[l]),u=(0,m.useMemo)((()=>!!l),[l]),h=(0,m.useMemo)((()=>({selected:c,allowClickSelected:a})),[c,a]);return(0,E.jsx)(yT.Provider,{value:h,children:(0,E.jsx)(Qe.eB,{ref:s,tag:"ul",name:"menu",mod:{size:r,collapsed:u},mix:t,style:n,onClick:d,children:e})})}));xT.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,nr.A)(e,bT);const{selected:p,allowClickSelected:f}=m.useContext(yT),v=(0,Qe.cn)("menu",{elem:"item"}),y=(()=>{const e=window.location.pathname.replace(/\/$/,""),n=null!=i?i:s;return!!p.has(t)||(c?e===n:e.includes(n))})(),b=(0,m.useMemo)((()=>(0,E.jsxs)(E.Fragment,{children:[o&&(0,E.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,E.jsx)("li",{children:s?(0,E.jsx)("a",Object.assign({href:null!=s?s:"#"},x,{children:b})):(0,E.jsx)("div",Object.assign({},x,{children:b}))})},xT.Spacer=()=>(0,E.jsx)("li",{className:(0,Qe.cn)("menu",{elem:"spacer"})}),xT.Divider=()=>(0,E.jsx)("li",{className:(0,Qe.cn)("menu",{elem:"divider"})}),xT.Builder=(e,t)=>(null!=t?t:[]).map(((t,n)=>{if("SPACER"===t)return(0,E.jsx)(xT.Spacer,{},n);if("DIVIDER"===t)return(0,E.jsx)(xT.Divider,{},n);const[r,o]=t,i=`${e}${r}`.replace(/([/]+)/g,"/");return(0,E.jsx)(xT.Item,{to:i,exact:!0,children:o},n)})),xT.Group=({children:e,title:t,className:n,style:r})=>{const o=(0,Qe.cn)("menu-group");return(0,E.jsxs)("li",{className:o.mix(n),style:r,children:[(0,E.jsx)("div",{className:o.elem("title"),children:t}),(0,E.jsx)("ul",{className:o.elem("list"),children:e})]})};const wT=(0,m.forwardRef)(((e,t)=>{const n=(0,m.useRef)(),r=(0,m.useRef)(null),o=e=>{t instanceof Function?t(e):t&&(t.current=e)};return(0,m.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,m.useEffect)((()=>{r.current&&(r.current.width=e.width,r.current.height=e.height)}),[e.width,e.height]),(0,m.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,E.jsx)("div",{ref:n})})),CT={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"},ST=(0,m.forwardRef)(((e,t)=>{const n=(0,m.useRef)(null),r=(0,m.useRef)(null),o=(0,m.useRef)([]),i=(0,m.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=CT[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||Sn.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,m.useCallback)((()=>{const t=document.createElement("video");t.muted=!!e.muted,t.controls=!1,t.preload="auto",(0,k.VS)(k.xS)&&(t.crossOrigin="anonymous"),Object.assign(t.style,{top:"-9999px",width:0,height:0,position:"absolute"}),n.current=t}),[]),s=(0,m.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,m.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,m.useEffect)((()=>{c(),l()})),(0,m.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,m.useEffect)((()=>{n.current&&void 0!==e.muted&&(n.current.muted=e.muted)}),[e.muted]),null})),jT=e=>(0,x.clamp)(e,.1,10),kT=(e,t,n,r)=>Math.min(1,Math.min(e/n,t/r)),OT=(0,m.memo)((0,m.forwardRef)(((e,t)=>{var n,r,o,i,a;const s=(0,m.useRef)(),l=(0,m.useRef)(),c=(0,m.useRef)(),d=(0,m.useRef)(),u=(0,m.useRef)(),h=(0,m.useRef)(null),g=(0,m.useRef)(!1),p=(0,m.useMemo)((()=>{var t;return null!=(t=e.width)?t:600}),[e.width]),f=(0,m.useMemo)((()=>{var t;return null!=(t=e.height)?t:600}),[e.height]),v=null!=(n=e.framerate)?n:29.97,[y,b]=(0,m.useState)(!0),[w,C]=(0,m.useState)(0),[S,j]=(0,m.useState)(null!=(r=e.position)?r:1),[O,R]=(0,m.useState)(!1),[_,A]=(0,m.useState)(!1),[T,P]=(0,m.useState)(null!=(o=e.zoom)?o:1),[I,L]=(0,m.useState)(null!=(i=e.pan)?i:{x:0,y:0}),[M,K]=(0,m.useState)({width:0,height:0,ratio:1}),[D,N]=(0,m.useState)(1),[V,z]=(0,m.useState)(1),[B,H]=(0,m.useState)(1),F=(0,m.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,m.useCallback)((t=>{const{width:n,height:r}=M,o=n*T,i=r*T,a=(0,x.clamp)((o-p)/2,0,Number.POSITIVE_INFINITY),s=(0,x.clamp)((i-f)/2,0,Number.POSITIVE_INFINITY);return{x:e.allowPanOffscreen?t.x:(0,x.clamp)(t.x,-a,a),y:e.allowPanOffscreen?t.y:(0,x.clamp)(t.y,-s,s)}}),[e.allowPanOffscreen,p,f,T]),$=(0,m.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=(p-r)/2+I.x,a=(f-o)/2+I.y;e.clearRect(0,0,p,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,p,f]),U=(0,m.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,x.clamp)(a,1,w||1),l=null!=(o=e.onFrameChange)?o:()=>{};s===S&&!0!==t||(j(s),$(),l(s,w))}),[v,S,$,e.onFrameChange,w]),Z=(0,m.useCallback)((()=>{if(!u.current)return;if(!d.current)return;const e=u.current;e&&(O||U(!0),e.networkState===e.NETWORK_IDLE?(g.current=!0,A(!1)):A(!0))}),[O,U]),G=(0,m.useCallback)((()=>{R(!0),A(!1),null==e.onPlay||e.onPlay()}),[e.onPlay]),Y=(0,m.useCallback)((()=>{R(!1),A(!1),null==e.onPause||e.onPause()}),[e.onPause]),X=(0,m.useCallback)((()=>{A(!1),Z()}),[Z]),q=(0,m.useCallback)((()=>{A(!0)}),[]),J=(0,m.useCallback)((()=>{R(!1),A(!1),null==e.onSeeked||e.onSeeked(),null==e.onEnded||e.onEnded(),null==e.onPause||e.onPause()}),[e.onEnded]),Q=(0,m.useCallback)((()=>{if(!(0,k.VS)(k.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(),O?s.current=requestAnimationFrame(ee):cancelAnimationFrame(s.current)};(0,m.useEffect)((()=>{O||$()}),[$,O]),(0,m.useEffect)((()=>(O&&(s.current=requestAnimationFrame(ee)),()=>{cancelAnimationFrame(s.current)})),[O]),(0,m.useEffect)((()=>{u.current&&e.speed&&(u.current.playbackRate=e.speed)}),[e.speed]),(0,m.useEffect)((()=>{u.current&&e.position&&(u.current.currentTime=e.position/v)}),[v,e.position]),(0,m.useEffect)((()=>{u.current&&e.currentTime&&(u.current.currentTime=e.currentTime)}),[e.currentTime]),(0,m.useEffect)((()=>{u.current&&(e.playing&&!O?u.current.play():!1===e.playing&&O&&u.current.pause())}),[O,e.playing]),(0,m.useEffect)((()=>{var t;e.allowInteractions&&(null==(t=l.current)||t.addEventListener("wheel",(e=>{e.preventDefault()})))}),[]),(0,m.useEffect)((()=>{(0,x.isDefined)(e.zoom)&&P(jT(e.zoom))}),[e.zoom]),(0,m.useEffect)((()=>{(0,x.isDefined)(e.pan)&&L(W(e.pan))}),[e.pan,W]),(0,m.useEffect)((()=>{(0,x.isDefined)(e.brightness)&&z(e.brightness)}),[e.brightness]),(0,m.useEffect)((()=>{(0,x.isDefined)(e.contrast)&&N(e.contrast)}),[e.contrast]),(0,m.useEffect)((()=>{(0,x.isDefined)(e.saturation)&&H(e.saturation)}),[e.saturation]),(0,m.useEffect)((()=>{$()}),[F,T,I,p,f]),(0,m.useEffect)((()=>{const t=new ResizeObserver((()=>{null==e.onResize||e.onResize(M)}));return t.observe(l.current),()=>t.disconnect()}),[M]);const te={currentFrame:S,length:w,playing:O,zoom:T,pan:I,videoDimensions:M,width:p,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(jT(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,x.clamp)(e,0,this.duration),requestAnimationFrame((()=>$()))},goToFrame(e){const t=(0,x.clamp)(e,1,w);this.currentTime=t/v,requestAnimationFrame((()=>$()))}};return t instanceof Function?t(te):t&&(t.current=te),(0,m.useEffect)((()=>{const{width:t,height:n}=M,r=kT(p,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,p,f,M]),(0,m.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:kT(p,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,m.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,E.jsxs)(Qe.eB,{ref:l,name:"video-canvas",children:[y&&(0,E.jsx)(Qe.Sl,{name:"loading",children:(0,E.jsx)(Qe.eB,{name:"spinner"})}),(0,E.jsxs)(Qe.Sl,{name:"view",onClick:e.onClick,style:{width:p,height:f},children:[(0,E.jsx)(wT,{ref:e=>{e&&c.current!==e&&(c.current=e,d.current=e.getContext("2d"))},width:p,height:f}),!y&&_&&(0,E.jsx)(Qe.Sl,{name:"buffering"})]}),(0,E.jsx)(ST,{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})]})})));OT.displayName="VideoCanvas";const RT=u.gK.model("TimeTraveller",{undoIdx:0,targetPath:"",skipNextUndoState:u.gK.optional(u.gK.boolean,!1),lastAdditionTime:u.gK.optional(u.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,u.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,u.dV)(t)],e.undoIdx=0,e.createdIdx=0,s(n)},afterCreate(){if(t=e.targetPath?(0,u.o1)(e,e.targetPath):(0,u._$)(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,u.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,u.Nh)(t,e.history[n]),s(),(0,k.VS)(k.$b)&&setTimeout((()=>{e.setSkipNextUndoState(!1)}))},reset(){(0,u.Nh)(t,e.history[e.createdIdx]),s()}}})),ET=u.gK.model("GlobalOffset",{start:u.gK.number,end:u.gK.number,calculated:!1}).views((e=>({get serialized(){return{start:e.start,end:e.end}}}))),_T=u.gK.model("RichTextRegionModel",{type:"richtextregion",object:u.gK.late((()=>u.gK.reference(LA))),startOffset:u.gK.integer,endOffset:u.gK.integer,start:u.gK.string,end:u.gK.string,text:u.gK.maybeNull(u.gK.string),isText:u.gK.optional(u.gK.boolean,!1),globalOffsets:u.gK.maybeNull(ET)}).volatile((()=>({hideable:!0,cachedRange:null}))).views((e=>({get parent(){return(0,u.$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,x.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,k.VS)(k.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=tn(e.globalOffsets.start,e.globalOffsets.end,n);if(!r)throw new Error;const o=MA.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,x.isDefined)(e.text)&&(t.value.text=e.text),t},updateTextOffsets(t,n){Object.assign(e,{startOffset:t,endOffset:n})},updateGlobalOffsets(t,n){e.globalOffsets=ET.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=tn(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,k.VS)(k.Er)||(e.cachedRange=tn(t,r,n)))}if((0,k.VS)(k.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]=sn(r,t);return e.globalOffsets={start:o,end:i,calculated:!0},void(e.cachedRange=tn(o,i,n))}if(r=e._getRange({useOriginalContent:!1}),r){const[t,o]=sn(r,n);return e.globalOffsets={start:t,end:o,calculated:!0},void(e.cachedRange=r)}if(e.globalOffsets&&(0,x.isDefined)(n)){const{start:t,end:r}=e.globalOffsets;return e.cachedRange=tn(t,r,n),void(e.cachedRange&&(e._fixXPaths(e.cachedRange,n),e.globalOffsets.calculated=!0))}}},_fixXPaths(t,n){const r=MA.fromRange(t,n);(0,x.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,x.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,k.VS)(k.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 MA.toRange(r,o,i,a,n)}catch(e){console.warn("can't locate xpath",{start:r,end:i},e)}}}))),AT=u.gK.compose("RichTextRegionModel",ut,bt,Xe,_T,OA);b.addRegionType(AT,"text"),b.addRegionType(AT,"hypertext"),b.addRegionType(AT,"richtext");const TT=u.gK.model({value:u.gK.maybeNull(u.gK.string),hotkey:u.gK.maybeNull(u.gK.string),framerate:u.gK.optional(u.gK.string,"24"),height:u.gK.optional(u.gK.string,"600"),timelineheight:u.gK.maybeNull(u.gK.string),muted:!1}),PT=u.gK.model({type:"video",_value:u.gK.optional(u.gK.string,""),mergeLabelsAndResults:!0}).volatile((()=>({errors:[],speed:1,ref:m.createRef(),frame:1,length:1,drawingRegion:null}))).views((e=>({get store(){return(0,u.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(S(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}}))),IT=u.gK.compose("VideoModel",Ye,TT,Ue,On,Ne,PT,ze),LT=u.gK.model("TimelineRange",{start:u.gK.maybeNull(u.gK.integer),end:u.gK.maybeNull(u.gK.integer)});function MT(e){const{start:t,end:n}=e;return(0,x.isDefined)(t)?(0,x.isDefined)(n)?t===n?{frame:t,enabled:!1}:[{frame:t,enabled:!0},{frame:n,enabled:!1}]:{frame:t,enabled:!0}:(0,x.isDefined)(n)?{frame:n,enabled:!1}:[]}const KT=u.gK.model("TimelineRegionModel",{type:"timelineregion",object:u.gK.late((()=>u.gK.reference(IT))),ranges:u.gK.array(LT)}).volatile((()=>({hideable:!0,editableFields:[{property:"start",label:"Start frame"},{property:"end",label:"End frame"}]}))).views((e=>({get parent(){return(0,u._n)(e)?e.object:null},get sequence(){return e.ranges.flatMap(MT)},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}]}}))),DT=u.gK.compose("TimelineRegionModel",ut,bt,Xe,mn,KT);b.addRegionType(DT,"video");const NT=kr("TimeSeries","Time Series Segmentation"),VT=u.gK.model("TimeSeriesRegionModel",{id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"timeseriesregion",object:u.gK.late((()=>u.gK.reference(aT))),start:u.gK.union(u.gK.number,u.gK.string),end:u.gK.union(u.gK.number,u.gK.string),instant:!1}).volatile((()=>({hideable:!0}))).views((e=>({get parent(){return e.object},get annotation(){var t;const n=(0,u.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;NT.addNamed("ts:grow-left",(()=>e.growLeft(t))),NT.addNamed("ts:grow-right",(()=>e.growRight(t))),NT.addNamed("ts:shrink-left",(()=>e.shrinkLeft(t))),NT.addNamed("ts:shrink-right",(()=>e.shrinkRight(t))),NT.addNamed("ts:grow-left-largre",(()=>e.growLeft(n))),NT.addNamed("ts:grow-right-largre",(()=>e.growRight(n))),NT.addNamed("ts:shrink-left-largre",(()=>e.shrinkLeft(n))),NT.addNamed("ts:shrink-right-largre",(()=>e.shrinkRight(n))),e.parent.scrollToRegion(e)},updateAppearenceFromState(){e.labelsState&&e.parent.updateView()},afterUnselectRegion(){NT.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?WA.aLc(e.parent.timeformat):Number;return{value:{start:t(e.start),end:t(e.end),instant:e.instant}}}}))),zT=u.gK.compose("TimeSeriesRegionModel",ut,bt,Xe,Ne,VT);b.addTag("timeseriesregion",zT,(()=>{})),b.addRegionType(zT,"timeseries");const BT=(e,t)=>Object.fromEntries(e.map((e=>[e,t[e]]))),HT=u.gK.model("VideoRegionModel",{id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),object:u.gK.late((()=>u.gK.reference(IT))),sequence:u.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,u.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,k.VS)(k.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}}))),FT=u.gK.compose("VideoRegionModel",ut,bt,Xe,HT);function WT(e){let t=e;for(;t>0;)t-=360;return(t-180)%360+180}const $T=(e,t,n,r)=>{const o=(n-e.frame)/(t.frame-e.frame);if("rotation"===r){const n=WT(t[r]-e[r]);return WT(e[r]+n*o)}return e[r]+(t[r]-e[r])*o},UT=u.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 BT(e.props,o);if(o.frame>t){r=o;break}n=o}return n?r?Object.fromEntries(e.props.map((e=>[e,$T(n,r,t,e)]))):BT(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))]}}}))),ZT=u.gK.compose("VideoRectangleRegionModel",ut,FT,bt,Xe,UT);b.addRegionType(ZT,"video");const GT=u.gK.compose("ClassificationArea",ut,Xe,bt,u.gK.model({object:u.gK.late((()=>u.gK.reference(u.gK.union(...b.objectTypes())))),classification:!0}).views((e=>({get supportSuggestions(){return!1},get type(){return""}}))).actions((()=>({serialize:()=>({})})))),YT=u.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 GT;const t=K.cleanUpId(e.object.name||e.object),n=window.Htx.annotationStore.names.get(t),r=b.getAvailableAreas(n.type,e);var o;return"video"===n.type?e.sequence||null!=(o=e.value)&&o.sequence?ZT:DT:r.length?u.gK.union(...r,GT):GT}},yn,K_,DT,zT,pO,AT,Xk,Uk,iO,Nk,ZT,GT),XT=YT;var qT=n(87835),JT=n.n(qT);const QT=e=>e?e.map((e=>e.map((e=>({label:e,value:e}))))):[],eP={pathSeparator:"/",showFullPath:!0},tP=u.gK.model("UserExtended",{id:u.gK.identifierNumber,firstName:u.gK.maybeNull(u.gK.string),lastName:u.gK.maybeNull(u.gK.string),username:u.gK.maybeNull(u.gK.string),email:u.gK.maybeNull(u.gK.string),lastActivity:u.gK.maybeNull(u.gK.string),avatar:u.gK.maybeNull(u.gK.string),initials:u.gK.maybeNull(u.gK.string),phone:u.gK.maybeNull(u.gK.string)}).preProcessSnapshot((e=>(0,x.camelizeKeys)(null!=e?e:{}))),nP=(u.gK.model("UserStore",{id:u.gK.maybeNull(u.gK.integer),pk:u.gK.maybeNull(u.gK.integer),firstName:u.gK.maybeNull(u.gK.string),lastName:u.gK.maybeNull(u.gK.string)}).views((e=>({get displayName(){return e.firstName||e.lastName?`${e.firstName} ${e.lastName}`:""}}))),["id"]),rP=u.gK.model({regionId:u.gK.maybe(u.gK.string),controlName:u.gK.maybe(u.gK.string)}).views((e=>({get comment(){return(0,u.PA)(e)},get annotation(){return e.comment.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,n;const{result:r,region:o}=e;if(e.comment.isResolved||e.comment.isDeleted)return null;if(!o||o.hidden)return null;if(!((null!=(t=o.item_index)?t:0)===(null!=(n=o.object.currentItemIndex)?n:0)))return null;if(r){const e=r.from_name,t=e.isClassificationTag,n=!1!==e.isVisible,o=e.result;if(t&&n&&o===r)return r}return e.region},get targetKey(){const t=[e.regionId];return(0,x.isDefined)(e.controlName)&&t.push(e.controlName),t.join("-")}}))).actions((e=>({serialize(){const t=e.toJSON();return(0,nr.A)(t,nP)},setRegion(t){e.regionId=t.cleanId}}))),oP=u.gK.model("CommentBase",Object.assign({text:u.gK.string},isFF(k.v1)?{regionRef:u.gK.optional(u.gK.maybeNull(rP),null),classifications:u.gK.optional(u.gK.frozen({}),null)}:{})).views((e=>({get commentsStore(){try{return De.getParentOfTypeString(e,"CommentStore")}catch(e){return null}},get annotation(){const t=(0,u._$)(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))}}))),iP=oP.named("Comment").props({id:u.gK.identifierNumber,text:u.gK.string,createdAt:u.gK.optional(u.gK.string,un.UDate.currentISODate()),updatedAt:u.gK.optional(u.gK.string,un.UDate.currentISODate()),resolvedAt:u.gK.optional(u.gK.maybeNull(u.gK.string),null),createdBy:u.gK.optional(u.gK.maybeNull(u.gK.safeReference(tP)),null),isResolved:!1,isEditMode:u.gK.optional(u.gK.boolean,!1),isDeleted:u.gK.optional(u.gK.boolean,!1),isConfirmDelete:u.gK.optional(u.gK.boolean,!1),isUpdating:u.gK.optional(u.gK.boolean,!1)}).preProcessSnapshot((e=>(0,x.camelizeKeys)(null!=e?e:{}))).volatile((e=>({_commentRef:(0,m.createRef)()}))).views((e=>({get sdk(){return(0,u._$)(e).events},get isPersisted(){return e.id>0&&!e.isUpdating},get canResolveAny(){return(0,u.Zn)(e).interfaces.includes("comments:resolve-any")}}))).actions((e=>{const t=(0,u.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,u.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,u.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,x.snakeizeKeys)(t)));if(n.error)return void(e.isUpdating=!1);const r=(0,x.camelizeKeys)(n);(0,u.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,u.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})},setResultLink:function(t){const n={regionId:t.area.cleanId,controlName:t.from_name.name};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"}))}}})),aP=u.gK.model("CommentStore",{loading:u.gK.optional(u.gK.maybeNull(u.gK.string),"list"),comments:u.gK.optional(u.gK.array(iP),[]),highlightedComment:u.gK.safeReference(iP)}).volatile((()=>({addedCommentThisSession:!1,commentFormSubmit:()=>{},currentComment:{},inputRef:{},tooltipMessage:"",commentsKey:null}))).views((e=>({get store(){return(0,u.PA)(e)},get task(){return(0,u.PA)(e).task},get annotationStore(){return(0,u.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,u.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,u.Zn)(e).commentClassificationConfig)},get sdk(){return(0,u._$)(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,k.VS)(k.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,u.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,x.snakeizeKeys)(t),{id:n,task:e.taskId,created_by:e.currentUser.id,created_at:un.UDate.currentISODate()});let o=!1;const{annotation:i}=e;if(!(0,k.VS)(k.K3)||e.annotationId||e.draftId||(i.history.hasChanges&&!i.draftSaved?(i.saveDraftImmediately(),yield(0,d.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,u.L3)((function*(){e.currentComment&&(yield t(e.currentComment))}));const r=(0,u.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,u.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=JT()([...t.comments,...(0,u.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,u.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,k.VS)(k.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}}})),sP=u.gK.union(yn,Nk,Uk,zT,Xk,iO,pO,NE,AT,zT,DT,K_,ZT);var lP,cP,dP;const uP=kr("RegionStore"),hP="outliner:sort",gP="outliner:sort-direction",mP="outliner:group",pP="regionstore:view",fP=u.gK.model({selected:u.gK.optional(u.gK.map(u.gK.safeReference(sP)),{}),drawingSelected:u.gK.optional(u.gK.map(u.gK.safeReference(sP)),{})}).views((e=>({get keys(){return Array.from(e.selected.keys())},get annotation(){return(0,u.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)}}})),vP=u.gK.model("RegionStore",{sort:u.gK.optional(u.gK.enumeration(["date","score"]),null!=(lP=window.localStorage.getItem(hP))?lP:"date"),sortOrder:u.gK.optional(u.gK.enumeration(["asc","desc"]),null!=(cP=window.localStorage.getItem(gP))?cP:"asc"),group:u.gK.optional(u.gK.enumeration(["type","label","manual"]),(()=>{var e;return null!=(e=window.localStorage.getItem(mP))?e:"manual"})),filter:u.gK.maybeNull(u.gK.array(u.gK.safeReference(sP)),null),view:u.gK.optional(u.gK.enumeration(["regions","labels"]),null!=(dP=window.localStorage.getItem(pP))?dP:"regions"),selection:u.gK.optional(fP,{})}).views((e=>{let t;const n=n=>(r,o)=>{if(r.shiftKey){const r=((e,n)=>{const r=[];let o=0;return K.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?A: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,u.PA)(e)},get classifications(){const t=Array.from(e.annotation.names.values()).filter((e=>(0,x.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,k.VS)(k.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,k.VS)(k.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(pP))?t:e.view}}})).actions((e=>({addRegion(t){e.regions.push(t),(0,u._$)(e).events.invoke("entityCreate",t)},toggleSortOrder(){"asc"===e.sortOrder?e.sortOrder="desc":e.sortOrder="asc"},setView(t){(0,k.VS)(k.TU)&&window.localStorage.setItem(pP,t),e.view=t},setSort(t){e.sort===t?e.toggleSortOrder():(e.sortOrder="asc",e.sort=t),window.localStorage.setItem(hP,e.sort),window.localStorage.setItem(gP,e.sortOrder),e.initHotkeys()},setGrouping(t){e.group=t,window.localStorage.setItem(mP,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,u.Yo)(t);const n=e.filterByParentID(t.id);n&&n.forEach((e=>e.setParentID(t.parentID))),(0,u._$)(e).events.invoke("entityDelete",t),(0,u.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,u.k4)(e,(t=>{"add"!==t.op&&"delete"!==t.op||-1===t.path.indexOf("/regions/")||e.initHotkeys()})),e.view=null!=(t=window.localStorage.getItem(pP))?t:e.annotation.store.settings.displayLabelsByDefault?"labels":"regions"},initHotkeys(){uP.unbindAll(),e.sortedRegions.forEach(((t,n)=>{uP.addKey("alt+shift+"+(n+1),(()=>{e.unselectAll(),t.selectRegion()}))})),uP.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,x.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,x.isDefined)(n)||(n=!e.selection.isSelected(t)),n?e.selection.select(t):e.selection.unselect(t)}})));var yP;const bP="relations:order",xP=u.gK.model("Relation",{id:u.gK.optional(u.gK.identifier,R),node1:u.gK.reference(XT),node2:u.gK.reference(XT),direction:u.gK.optional(u.gK.enumeration(["left","right","bi"]),"right"),labels:u.gK.maybeNull(u.gK.array(u.gK.string))}).volatile((()=>({showMeta:!1,visible:!0}))).views((e=>({get parent(){return(0,u.k2)(e,wP)},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,u._n)(e))return!1;const{node1:t,node2:n}=e,[r,o]=[t.item_index,n.item_index];return(!(0,x.isDefined)(r)||!t.object.multiImage||r===t.object.currentImage)&&(!(0,x.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}}))),wP=u.gK.model("RelationStore",{relations:u.gK.array(xP),order:u.gK.optional(u.gK.enumeration(["asc","desc"]),null!=(yP=window.localStorage.getItem(bP))?yP:"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,u.Zn)(e);let n=null;K.traverseTree(t.annotationStore.root,(e=>{if("relations"===e.type)return n=e,_})),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=xP.create({node1:t,node2:n});return e.relations.push(r),r},deleteRelation(t){e.relations=e.relations.filter((e=>e.id!==t.id)),(0,u.zr)(t)},deleteNodeRelation(t){const n=e.findRelations(t);n.length&&n.forEach(e.deleteRelation)},deleteAllRelations(){e.relations.forEach((e=>(0,u.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(bP,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}}))),CP=wP,SP=["id","value","type"],jP=kr("Annotations","Annotations");const kP=u.gK.model("TrackedState",{areas:u.gK.map(XT),relationStore:u.gK.optional(CP,{})}),OP=u.gK.model("AnnotationBase",Object.assign({id:u.gK.identifier,pk:u.gK.maybeNull(u.gK.string),selected:u.gK.optional(u.gK.boolean,!1),type:u.gK.enumeration(["annotation","prediction","history"]),createdDate:u.gK.optional(u.gK.string,un.UDate.currentISODate()),createdAgo:u.gK.maybeNull(u.gK.string),createdBy:u.gK.optional(u.gK.string,"Admin"),user:u.gK.optional(u.gK.maybeNull(u.gK.safeReference(tP)),null),parent_prediction:u.gK.maybeNull(u.gK.integer),parent_annotation:u.gK.maybeNull(u.gK.integer),last_annotation_history:u.gK.maybeNull(u.gK.integer),comment_count:u.gK.maybeNull(u.gK.integer),unresolved_comment_count:u.gK.maybeNull(u.gK.integer),loadedDate:u.gK.optional(u.gK.Date,(()=>new Date)),leadTime:u.gK.maybeNull(u.gK.number),draftSaved:u.gK.maybe(u.gK.string),userGenerate:u.gK.optional(u.gK.boolean,!0),sentUserGenerate:u.gK.optional(u.gK.boolean,!1),localUpdate:u.gK.optional(u.gK.boolean,!1),ground_truth:u.gK.optional(u.gK.boolean,!1),skipped:!1,trackedState:u.gK.optional(kP,{}),history:u.gK.optional(RT,{targetPath:"../trackedState"}),dragMode:u.gK.optional(u.gK.boolean,!1),editable:u.gK.optional(u.gK.boolean,!0),readonly:u.gK.optional(u.gK.boolean,!1),suggestions:u.gK.map(XT),regionStore:u.gK.optional(vP,{regions:[]}),isDrawing:u.gK.optional(u.gK.boolean,!1),commentStore:u.gK.optional(aP,{comments:[]})},(0,k.VS)(k.cE)?{root:De.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,k.VS)(k.cE)&&(l=d(e.root.toJSON())),c&&"number"!=typeof c&&(c=c.id),Object.assign({},e,(0,k.VS)(k.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,k.VS)(k.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,u.Zn)(e)},get list(){return(0,u.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,u._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,x.isDefined)(e.versions.result),n=(0,x.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,k.VS)(k.cE)?{names:new Map,toNames:new Map,ids:new Map}:{})).views((e=>({get canBeReviewed(){var t,n,r;const o=e.store;return(0,k.VS)(k.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,u._$)(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()},setEditable(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,u.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,u._$)(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,u.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,u.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,u.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 A})),null==(t=n)||t},traverseTree:t=>K.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,u._$)(e).events.invoke("entityDelete",t),e.relationStore.deleteNodeRelation(t),"polygonregion"===t.type&&(0,u.Yo)(t),(0,u.zr)(t),e.setIsDrawing(!1)},deleteArea(e){(0,u.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,k.VS)(k.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,u.L3)((function*(){if((0,u._$)(e).events.hasEvent("submitDraft")&&!e.isReadOnly()){if(yield(0,x.delay)(0),e.autosave)return e.autosave.cancel(),void(e.autosave.paused=!1);e.autosave=zn()((()=>{e.autosave.paused||e.saveDraft()}),e.autosaveDelay,{leading:!1}),(0,u.aQ)(e.areas,e.autosave)}})),async saveDraft(t){if(e.submissionStarted)return;if(!e.editable)return;const n=e.serializeAnnotation({fast:!0});return(0,k.VS)(k.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(un.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,k.VS)(k.cE)){const{names:t,toNames:n}=K.extractNames(e.root);t.forEach(((t,n)=>e.names.set(n,t))),n.forEach(((t,n)=>e.toNames.set(n,t))),K.traverseTree(e.root,(t=>{var n;const r=null!=(n=t.id)?n:t.name;r&&e.ids.set(K.cleanUpId(r),t),e.store.task&&t.updateValue&&t.updateValue(e.store)}))}e.userGenerate&&!e.sentUserGenerate&&(e.loadedDate=new Date)},setupHotKeys(){jP.unbindAll();let t=0,n=null;const r="shift+space";let o=r;e.traverseTree((e=>{e&&e.onHotKey&&e.hotkey&&jP.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,jP.addKey(o,e.onHotKey,"Play an audio",`${kr.DEFAULT_SCOPE},${kr.INPUT_SCOPE}`),t++)})),e.traverseTree((e=>{if(e&&e.onHotKey&&!e.hotkey){const t=jP.makeComb();if(!t)return;e.hotkey=t,jP.addKey(e.hotkey,e.onHotKey)}})),n&&t>1&&(n.hotkey=`${r}+1`,jP.addKey(n.hotkey,n.onHotKey),jP.removeKey(r)),kr.setScope(kr.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:R(),object:l},t,{value:t,results:[c]}),h=null==e||null==(s=e.areas)?void 0:s.put(d);if(null==l||null==l.afterResultCreated||l.afterResultCreated(h),h)return h.classification||(0,u._$)(e).events.invoke("entityCreate",h),i||e.afterCreateResult(h,r),h},afterCreateResult(t,n){e.store.settings.selectAfterCreate?t.classification||setTimeout((()=>(0,u._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]=R()),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,k.VS)(k.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,x.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,u.Zn)(e).autoAcceptSuggestions?((0,k.VS)(k.$b)&&e.history.setReplaceNextUndoState(!0),e.acceptAllSuggestions()):e.suggestions.forEach((t=>{t.supportSuggestions||(e.acceptSuggestion(t.id),(0,k.VS)(k.$b)&&n.setReplaceNextUndoState(!0))})),e.isSuggestionsAccepting=!1,(0,k.VS)(k.$b)||n.freeze("richtext:suggestions"),e.names.forEach((e=>null==e.needsUpdate?void 0:e.needsUpdate({suggestions:!0}))),(0,k.VS)(k.$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([Mj.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,nr.A)(t,SP);let{from_name:d,to_name:u}=c;const h=null!=(o=e.names.get(c.to_name))?o:{},g=h.type,m=`${a||R()}#${e.id}`,p=`${c.from_name}@${m}`,f=e.prepareValue(s,g);(0,k.VS)(k.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 gt.properties.value.propertyNames.forEach((e=>{delete t[e]})),t}(f),{value:f})),(0,k.VS)(k.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,x.isDefined)(e.start)&&(0,x.isDefined)(e.end),n=!(0,x.isDefined)(e.startOffset)&&!(0,x.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,k.VS)(k.$b))},rejectAllSuggestions(){Array.from(e.suggestions.keys()).forEach((t=>{e.suggestions.delete(t)})),e.deleteAllDynamicregions((0,k.VS)(k.$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,k.VS)(k.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)))}}))),RP=u.gK.compose("Annotation",U,OP),EP=["reg","box","frame","workingArea","selected","draggable","listening","onDragMove"],_P=(0,v.PA)((e=>{var t;let{reg:n,box:r,frame:o,workingArea:i,selected:a,draggable:s,listening:l,onDragMove:c}=e,d=(0,nr.A)(e,EP);const u=Hk(n,{includeFill:!0}),{realWidth:h,realHeight:g,scale:p}=i,f=(0,m.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,E.jsxs)(mj.YJ,{children:[(0,E.jsx)(Rk,{reg:n,box:f,scale:p,color:u.strokeColor,strokeWidth:u.strokeWidth,adjacent:!0}),(0,E.jsx)(mj.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(Sj.X,e.width()*n)),e.height(Math.max(Sj.Y,e.height()*r)));e.scaleX(1),e.scaleY(1)})(e.target,"rect")},onTransformEnd:v,onDragMove:v,onDragEnd:v},d))]})})),AP=(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)}},TP=(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=AP(t,n,0,0,i),s=AP(t,n,r,0,i),l=AP(t,n,r,o,i),c=AP(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},PP=(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)}))},IP=["reg","frame","stageRef"],LP=e=>(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(mj.rw,Object.assign({},e,{strokeWidth:2,stroke:"#fff"})),(0,E.jsx)(mj.rw,Object.assign({},e,{fill:Ct()("#617ADA").alpha(.1).css(),strokeWidth:2,stroke:"#617ADA",dash:[2,2]}))]}),MP=(0,v.PA)((({regions:e,item:t,locked:n,isDrawing:r,workinAreaCoordinates:o,stageRef:i,onDragMove:a})=>(0,E.jsx)(E.Fragment,{children:e.map((e=>(0,E.jsx)(KP,{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)))}))),KP=(0,v.PA)((e=>{let{reg:t,frame:n,stageRef:r}=e,o=(0,nr.A)(e,IP);const i=t.getShape(n);return t.isInLifespan(n)&&i&&(0,E.jsx)(_P,Object.assign({reg:t,box:i,frame:n,onClick:e=>{const n=(0,u.k2)(t,RP);n&&n.isLinkingMode&&(r.current.container().style.cursor=N.A.DEFAULT_CURSOR),t.setHighlight(!1),t.onClickRegion(e)}},o))})),DP=(0,v.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,m.useState)(),[p,f]=(0,m.useState)(!1),v=t.filter((t=>(t.selected||t.inSelection)&&!t.hidden&&!t.isReadOnly()&&t.isInLifespan(e.frame))),y=!a;t.map((e=>(0,x.fixMobxObserve)(e.sequence)));const b=(0,m.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]),w=(0,m.useMemo)((()=>({width:b.width,height:b.height,scaleX:o,scaleY:o,position:{x:b.x,y:b.y}})),[b,o]),C=(0,m.useCallback)(((e,t)=>{const{x:n,y:r}=b;return{x:(e-n)/o,y:(t-r)/o}}),[b,o]);(0,m.useEffect)((()=>{if(!p&&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)}}),[p,b,i]);const S=({x:e,y:t})=>s?{x:e,y:t}:{x:(0,MC.clamp)(e,0,b.realWidth),y:(0,MC.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(!p||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(!p||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,E.jsxs)(mj.BI,Object.assign({ref:c,width:n,height:r,style:{position:"absolute",zIndex:1},listening:y},j,{children:[(0,E.jsx)(mj.Wd,Object.assign({},w,{children:(0,E.jsx)(MP,{regions:t,item:e,layerProps:w,locked:a,isDrawing:p,workinAreaCoordinates:b,onDragMove:PP(b,!s),stageRef:c})})),null!=(d=e.annotation)&&d.isReadOnly()||!p?null:(0,E.jsx)(mj.Wd,Object.assign({},w,{children:(0,E.jsx)(LP,Object.assign({},h))})),(null==(u=e.annotation)||!u.isReadOnly())&&(null==v?void 0:v.length)>0?(0,E.jsx)(mj.Wd,{children:(0,E.jsx)(mj.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:TP(b,!s),onDragMove:PP(b,!s)})}):null]}))})),NP=(0,k.VS)(k.vS);const VP=(0,v.WQ)("store")((0,v.PA)((({item:e,store:t})=>{var n,r;if(!e._value)return null;const o=!t.settings.videoDrawOutside,i=(0,m.useRef)(),a=(0,m.useRef)(),s=(0,m.useRef)(),l=(0,m.useRef)(),[c,d]=(0,m.useState)(!1),[u,h]=(0,m.useState)(0),[g,p]=(0,m.useState)(!1),[f,v]=(0,m.useState)(1),[y,b]=(0,m.useState)(null),[w,C]=(0,m.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,m.useState)({zoom:1,pan:{x:0,y:0}}),i=(0,m.useRef)({});i.current.video=e,i.current.canvas=t,i.current.shouldClampPan=n;const a=(0,m.useCallback)(((e,t)=>{if(!n)return e;const r=(0,x.clamp)((i.current.video.width*t-i.current.canvas.width)/2,0,Number.POSITIVE_INFINITY),o=(0,x.clamp)((i.current.video.height*t-i.current.canvas.height)/2,0,Number.POSITIVE_INFINITY);return{x:(0,x.clamp)(e.x,-r,r),y:(0,x.clamp)(e.y,-o,o)}}),[]);return[r,{setZoomAndPan:(0,m.useCallback)((e=>o((t=>{const n=e instanceof Function?e(t):e,{zoom:r,pan:o}=t,i=jT(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,m.useCallback)((e=>o((({zoom:t,pan:n})=>{const r=jT(e instanceof Function?e(t):e);return{zoom:r,pan:{x:n.x/t*r,y:n.y/t*r}}}))),[]),setPan:(0,m.useCallback)((e=>o((t=>(e=e instanceof Function?e(t.pan):e,Object.assign({},t,{pan:e}))))),[])}]}(w,e.ref.current?{width:e.ref.current.width,height:e.ref.current.height}:{width:0,height:0},o),[_,A]=(0,m.useState)(!1),[T,P,I,L]=n_(!1),M=ur({onEnterFullscreen(){P()},onExitFullscreen(){I()}}),K=(0,m.useCallback)((e=>{if(e!==f&&u){const t=(0,x.clamp)(e,1,u);v(t)}}),[f,u]),D=(0,m.useCallback)((e=>{e!==u&&h(e)}),[u]),V=(0,m.useMemo)((()=>(0,x.isDefined)(null==e?void 0:e.videoControl)),[e]),z=(0,m.useMemo)((()=>(0,x.isDefined)(null==e?void 0:e.timelineControl)),[e]);(0,m.useEffect)((()=>{const e=s.current,t=e=>{e.shiftKey&&e.preventDefault()};return e.addEventListener("wheel",t),()=>e.removeEventListener("wheel",t)}),[]),(0,m.useEffect)((()=>{const e=e=>{if(e.code.startsWith("Shift")&&(e.preventDefault(),!_)){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,m.useEffect)((()=>{const e=M.getElement();T&&!e?M.enter(l.current):!T&&e&&M.exit()}),[T]);const B=(0,m.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,x.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,m.useCallback)((t=>{if(!_)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)}),[_,j]),F=(0,m.useCallback)((()=>{O((e=>e+.1))}),[]),W=(0,m.useCallback)((()=>{O((e=>e-.1))}),[]),$=(0,m.useCallback)((()=>{k({zoom:e.ref.current.videoDimensions.ratio,pan:{x:0,y:0}})}),[]),U=(0,m.useCallback)((()=>{k({zoom:1,pan:{x:0,y:0}})}),[]),Z=(0,m.useCallback)(((t,n)=>{K(t),D(n),e.setOnlyFrame(t)}),[e,K,D]),Y=(0,m.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,m.useCallback)((e=>{C(e)}),[]),q=(0,m.useCallback)((()=>{p(!1),K(u)}),[u,K,p]),J=(0,m.useCallback)((()=>{p((t=>NP?(e.ref.current.playing||(e.ref.current.play(),e.triggerSyncPlay()),!0):!1===t?(e.ref.current.play(),e.triggerSyncPlay(),!0):t))}),[]),Q=(0,m.useCallback)((()=>{p((t=>NP?(e.ref.current.playing&&(e.ref.current.pause(),e.triggerSyncPause()),!1):!0===t?(e.ref.current.pause(),e.triggerSyncPause(),!1):t))}),[]),ee=(0,m.useCallback)(((t,n,r)=>{const o=e.findRegion(n),i=(null==o?void 0:o.selected)||(null==o?void 0:o.inSelection);!o||(0,x.isDefined)(r)&&i===r||o.onClickRegion()}),[e]),te=(0,m.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,m.useCallback)((t=>{f!==t&&(e.setFrame(t),K(t))}),[e,f]);(0,m.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:N.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,E.jsx)(Kn,{item:e,children:(0,E.jsxs)(Qe.eB,{name:"video-segmentation",ref:l,mod:{fullscreen:T},children:[null==(r=e.errors)?void 0:r.map(((e,t)=>(0,E.jsx)(Te,{error:e},`err-${t}`))),(0,E.jsx)(Qe.eB,{name:"video",mod:{fullscreen:T},ref:i,children:(0,E.jsx)(Qe.Sl,{name:"main",ref:s,style:{height:Number(e.height)},onMouseDown:H,onWheel:B,children:y&&(0,E.jsxs)(E.Fragment,{children:[c&&V&&(0,E.jsx)(DP,{item:e,zoom:S,pan:j,locked:_,regions:e.regs,width:y[0],height:y[1],workingArea:w,allowRegionsOutsideWorkingArea:!o,stageRef:a}),(0,E.jsx)(OT,{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,E.jsx)(Qe.Sl,{name:"timeline",tag:oS,playing:g,length:u,position:f,regions:re,height:e.timelineheight,altHopSize:t.settings.videoHopSize,allowFullscreen:!1,fullscreen:T,defaultStepSize:16,disableView:!z&&!V,framerate:e.framerate,controls:{FramesControl:!0},customControls:[{position:"left",component:()=>(0,E.jsx)(J_.Trigger,{inline:T,content:(0,E.jsxs)(xT,{size:"auto",closeDropdownOnItemClick:!1,children:[(0,E.jsx)(xT.Item,{onClick:F,children:"Zoom In"}),(0,E.jsx)(xT.Item,{onClick:W,children:"Zoom Out"}),(0,E.jsx)(xT.Item,{onClick:$,children:"Zoom To Fit"}),(0,E.jsx)(xT.Item,{onClick:U,children:"Zoom 100%"})]}),children:(0,E.jsx)(Qa,{size:"small",nopadding:!0,children:(0,E.jsx)(Km,{})})},"dd")}],onPositionChange:ne,onPlay:J,onPause:Q,onFullscreenToggle:L,onSelectRegion:ee,onStartDrawing:e.startDrawing,onFinishDrawing:e.finishDrawing,onAction:te})]})})})));b.addTag("video",IT,VP),b.addObjectType(IT);var zP=n(76694);const BP={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"},HP=e=>{var t;const{item:n,index:r,readonly:o}=e,i=(0,m.useMemo)((()=>n.html?(0,Ae.sanitizeHtml)(n.html):""),[n.html]),[a,s,l]=(0,m.useContext)(ZP),c=null!=(t=s[n.id])&&t,d=a?()=>l(n.id,!c):void 0,u=[BP.item,"htx-ranker-item"];return a&&u.push(c?BP.collapsed:BP.expanded),(0,E.jsx)(zP.sx,{draggableId:n.id,index:r,isDragDisabled:o,children:e=>(0,E.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,E.jsx)("h3",{className:BP.itemTitle,onClick:d,children:n.title}),n.body&&(0,E.jsx)("p",{className:BP.itemLine,children:n.body}),n.html&&(0,E.jsx)("p",{className:BP.itemLine,dangerouslySetInnerHTML:{__html:i}}),(0,E.jsx)("p",{className:BP.itemLine,children:n.id})]}))})},FP=["children"],WP=e=>{let{children:t}=e,n=(0,nr.A)(e,FP);const[r,o]=(0,m.useState)(!1);return(0,m.useEffect)((()=>{const e=requestAnimationFrame((()=>o(!0)));return()=>{cancelAnimationFrame(e)}}),[]),r?(0,E.jsx)(zP.gL,Object.assign({},n,{children:t})):null},$P=({items:e,title:t})=>{const[,n,r]=(0,m.useContext)(ZP),o=e.every((e=>n[e.id]));return(0,E.jsxs)("h1",{className:[BP.columnTitle,o?BP.collapsed:BP.expanded].join(" "),children:[t,(0,E.jsx)("button",{type:"button",onClick:()=>r(e.map((e=>e.id)),!o),children:(0,E.jsx)("span",{})})]})},UP=e=>{const{column:t,items:n,readonly:r}=e,[o]=(0,m.useContext)(ZP),i=o?(0,E.jsx)($P,{items:n,title:t.title}):(0,E.jsx)("h1",{className:BP.columnTitle,children:t.title});return(0,E.jsxs)("div",{className:[BP.column,"htx-ranker-column"].join(" "),children:[i,(0,E.jsx)(WP,{droppableId:t.id,children:e=>(0,E.jsxs)("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:BP.dropArea,children:[n.map(((e,t)=>(0,E.jsx)(HP,{item:e,index:t,readonly:r},e.id))),e.placeholder]}))})]})},ZP=(0,m.createContext)([!0,{},(e,t)=>{}]),GP=({inputData:e,handleChange:t,readonly:n,collapsible:r=!0})=>{const[o,i]=(0,m.useState)(e),[a,s]=(0,m.useState)({}),l=(0,m.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,m.useEffect)((()=>{i(e)}),[e]);return(0,E.jsx)(ZP.Provider,{value:[r,a,l],children:(0,E.jsx)(zP.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,E.jsx)("div",{className:BP.board,children:(0,E.jsx)(E.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,E.jsx)(UP,{column:e,items:i,readonly:n},e.id)}))})})})})},YP=u.gK.model({type:"list",value:u.gK.maybeNull(u.gK.string),_value:u.gK.frozen([]),title:u.gK.optional(u.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=S(e.value,t.task.dataObj);Array.isArray(n)&&(e._value=n.map((e=>Object.assign({},e,{id:String(e.id)}))))}}))),XP=u.gK.compose("ListModel",On,Ue,Ne,YP),qP=(0,v.WQ)("store")((0,v.PA)((({item:e})=>{const t=e.dataSource;return t?e.ranker?null:(0,E.jsx)(m.StrictMode,{children:(0,E.jsx)(GP,{inputData:t,readonly:!0})}):null})));b.addTag("list",XP,qP),b.addObjectType(XP);const JP=e=>(e<10?"0":"")+e,QP=u.gK.model({toname:u.gK.maybeNull(u.gK.string),format:u.gK.maybeNull(u.gK.string),only:u.gK.maybeNull(u.gK.string),min:u.gK.maybeNull(u.gK.string),max:u.gK.maybeNull(u.gK.string),step:u.gK.maybeNull(u.gK.string),defaultvalue:u.gK.maybeNull(u.gK.string),hotkey:u.gK.maybeNull(u.gK.string)}),eI=u.gK.model({pid:u.gK.optional(u.gK.string,R),type:"datetime"}).views((e=>({selectedValues:()=>e.datetime,get holdsState(){return!(e.onlyTime&&!(0,x.isDefined)(e.time))&&((0,x.isDefined)(e.month)||(0,x.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(),JP(n.getMonth()+1),JP(n.getDate())].join("-")},get date(){var t;return null!=(t=e.only)&&t.includes("year")?e.year:e.month&&e.year?[e.year,JP(e.month),JP(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:WA.DCK("%H:%M"),formatDateTime:WA.DCK(t),parseDateTime:WA.T6w(t)}})).volatile((e=>{var t,n;const r=[],o=[],i=WA.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(){Sn.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||(Sn.warning(`Date "${i}" is not valid: ${o.join(", ")}.`),!1)}}})),tI=u.gK.compose("DateTimeModel",JR,zE,kE,qe,ft,...(0,k.VS)(k.gF)?[SE]:[],Ne,QP,eI),nI=(0,v.WQ)("store")((0,v.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,m.useState)("");e.updateValue&&(!e.showDate||void 0!==e.date&&e.date===s||l(e.date||""),e.setNeedsUpdate(!1));return(0,E.jsxs)("div",{className:"htx-datetime",style:r,ref:e.elementRef,children:[e.showMonth&&(0,E.jsxs)("select",Object.assign({},o,{name:`${e.name}-date`,disabled:n,value:e.month,onChange:n?void 0:e.onMonthChange,children:[(0,E.jsx)("option",{value:"",children:"Month..."}),e.months.map(((e,t)=>(0,E.jsx)("option",{value:t+1,children:e},e)))]})),e.showYear&&(0,E.jsxs)("select",Object.assign({},o,{name:`${e.name}-year`,disabled:n,value:e.year||"",onChange:n?void 0:e.onYearChange,children:[(0,E.jsx)("option",{value:"",children:"Year..."}),e.years.map((e=>(0,E.jsx)("option",{value:e,children:e},e)))]})),e.showDate&&(0,E.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,E.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}))]})})));b.addTag("datetime",tI,nI);const rI=u.gK.model({toname:u.gK.maybeNull(u.gK.string),min:u.gK.maybeNull(u.gK.string),max:u.gK.maybeNull(u.gK.string),step:u.gK.maybeNull(u.gK.string),defaultvalue:u.gK.maybeNull(u.gK.string),slider:u.gK.optional(u.gK.boolean,!1),hotkey:u.gK.maybeNull(u.gK.string)}),oI=u.gK.model({pid:u.gK.optional(u.gK.string,R),type:"number",number:u.gK.maybeNull(u.gK.number)}).views((e=>({selectedValues:()=>e.number,get holdsState(){return(0,x.isDefined)(e.number)}}))).actions((e=>{const t={validateValue:e.validateValue};return{validateValue(n){if(!t.validateValue(n))return!1;if(!(0,x.isDefined)(n))return!0;const r=[];if((0,x.isDefined)(e.min)&&ne.max&&r.push(`Value must be less than or equal to ${e.max}`),(0,x.isDefined)(e.step)){const t=Number.parseFloat(e.step),o=(n-((0,x.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||(Sn.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,x.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,x.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,x.isDefined)(e.number)?e.number:"")},updateFromResult(){this.needsUpdate()},requiredModal(){Sn.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()}})),iI=u.gK.compose("NumberModel",JR,zE,kE,qe,ft,...(0,k.VS)(k.gF)?[SE]:[],Ne,rI,oI),aI=(0,v.WQ)("store")((0,v.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,Qe.cn)("number").toClassName();return(0,E.jsxs)("div",{className:d,style:s,ref:e.elementRef,children:[(0,E.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,x.isDefined)(e.min)?Number(e.min):void 0,max:(0,x.isDefined)(e.max)?Number(e.max):void 0,onChange:c?void 0:e.onChange}),e.slider&&(0,E.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,E.jsxs)("sup",{style:{fontSize:"9px"},children:["[",e.hotkey,"]"]})]})})));b.addTag("number",iI,aI);const sI=u.gK.model({toname:u.gK.maybeNull(u.gK.string),selectionstyle:u.gK.maybeNull(u.gK.string),leftclass:u.gK.maybeNull(u.gK.string),rightclass:u.gK.maybeNull(u.gK.string)}),lI=u.gK.model({type:"pairwise",selected:u.gK.maybeNull(u.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]||Sn.error("Incorrect toName parameter on Pairwise, must be two names separated by a comma: name1,name2");let t={};if(e.selectionstyle){const n=K.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)}))}}))),cI=u.gK.compose("PairwiseModel",JR,sI,lI,Ne);b.addTag("pairwise",cI,(()=>null)),b.addObjectType(cI);const dI="_",uI=u.gK.model({type:"ranker",toname:u.gK.maybeNull(u.gK.string),collapsible:u.gK.optional(u.gK.boolean,!0),children:De.unionArray(["bucket"])}).views((e=>({get list(){const t=e.annotation.names.get(e.toname);return"list"===t.type?t:null},get buckets(){return K.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:dI,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[dI]=[...null!=(h=d[dI])?h:[],...r]}}else d=Object.assign({},l,{[null!=(u=e.defaultBucket)?u:dI]: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:dI]=r,e.createResult(o)}}))),hI=u.gK.compose("RankerModel",JR,Ne,uI,qe),gI=(0,v.WQ)("store")((0,v.PA)((({item:e})=>{const t=e.dataSource;return t?(0,E.jsx)(GP,{inputData:t,handleChange:e.updateResult,readonly:e.isReadOnly(),collapsible:e.collapsible}):null}))),mI=u.gK.model("BucketModel",{id:u.gK.optional(u.gK.identifier,R),type:"bucket",name:u.gK.string,title:u.gK.maybeNull(u.gK.string),default:u.gK.optional(u.gK.boolean,!1)}),pI=(0,v.WQ)("store")((0,v.PA)((({item:e})=>(0,E.jsx)("h1",{children:e.name}))));b.addTag("ranker",hI,gI),b.addTag("bucket",mI,pI),b.addObjectType(hI);var fI=n(97141);const vI=u.gK.model({value:u.gK.maybeNull(u.gK.string),alias:u.gK.maybeNull(u.gK.string),background:u.gK.optional(Ie.color,"#333333"),hotkey:u.gK.maybeNull(u.gK.string)}),yI=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"shortcut",_value:u.gK.optional(u.gK.string,"")}).volatile((()=>({hotkeyScope:kr.INPUT_SCOPE}))).actions((e=>({onClick(){const t=(0,u.PA)(e,2);t.onShortcut&&(t.onShortcut(e.value),null==t.returnFocus||t.returnFocus())},onHotKey(t){const n=(0,u.PA)(e,2),r=(t.target||t.srcElement).name;if(n.name===r||r.startsWith(`${n.name}:`))return t.preventDefault(),e.onClick()}}))),bI=u.gK.compose("ShortcutModel",vI,yI,Ue),xI=(0,v.WQ)("store")((0,v.PA)((({item:e,store:t})=>{const n={background:Ct()(e.background).alpha(.15),color:"#333333",cursor:"pointer",margin:"5px"};return(0,E.jsxs)(fI.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,E.jsxs)(gr,{children:["[",e.hotkey,"]"]})]})})));b.addTag("shortcut",bI,xI);var wI=n(44318);const CI=m.forwardRef((({treeData:e,onChange:t},n)=>{(0,m.useImperativeHandle)(n,(()=>({resetValue(){i(""),t(e,[])},focus(){var e;return null==(e=r.current)?void 0:e.focus()}})));const r=(0,m.useRef)(),[o,i]=(0,m.useState)("");(0,m.useEffect)((()=>{const n=l(e,o);t(n.filteredDataTree,null)}),[e]);const a=(0,m.useCallback)((e=>"string"==typeof e?e:"object"==typeof e.props.children?a(e.props.children):e.props.children),[]),s=(0,m.useCallback)(((e,t)=>{const n=String(e).toLowerCase(),r=a(t.title);return!!n&&String(r).toLowerCase().includes(n)}),[]),l=(0,m.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,m.useCallback)((0,MC.debounce)((async n=>{const r=l(e,n.target.value);t(r.filteredDataTree,r.expandedKeys)}),300),[e]);return(0,E.jsx)(Qe.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"})})),SI=({items:e,selected:t,onChange:n,onLoadData:r,defaultSearch:o=!0,options:i})=>{var a;const s=(0,m.useRef)(null),[l,c]=(0,m.useState)([]),[d,u]=(0,m.useState)([]),[h,g]=(0,m.useState)([]),p=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(p))),x=t.map((e=>({value:e.map((e=>e.value)).join(p),label:i.showFullPath?e.map((e=>e.label)).join(p):e.at(-1).label})));(0,m.useEffect)((()=>{c(((e,t,n)=>{const r=e=>{const t=e=>(0,E.jsx)("span",{className:"htx-taxonomy-item-color",style:{background:e.color},children:e.label});return e.hint?(0,E.jsx)(hr,{title:e.hint,mouseEnterDelay:500,children:e.color?t(e):(0,E.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,m.useCallback)((async e=>null==r?void 0:r(e.value.split(p))),[]),C=(0,m.useCallback)(((e,t)=>{u(e),null!=t&&t.length?g(t):g(void 0)}),[]),S=(0,m.useCallback)((e=>(0,E.jsxs)(E.Fragment,{children:[!o&&(0,E.jsx)(CI,{ref:s,treeData:l,onChange:C}),e]})),[l]),j=(0,m.useCallback)((e=>{var t;e?setTimeout((()=>{var e;null==(e=s.current)||e.focus()}),200):null==(t=s.current)||t.resetValue()}),[s]);return(0,E.jsx)(wI.A,{treeData:o?l:d,value:x,labelInValue:!0,onChange:e=>n(null,e.map((e=>e.value.split(p)))),loadData:w,treeCheckable:!0,showSearch:o,showArrow:!o,dropdownRender:S,onDropdownVisibleChange:j,treeExpandedKeys:o?void 0:h,onTreeExpand:e=>{g(e)},treeCheckStrictly:!0,showCheckedStrategy:wI.A.SHOW_ALL,treeExpandAction:!1,dropdownMatchSelectWidth:v,placeholder:i.placeholder||"Click to add...",style:f,className:"htx-taxonomy"})},jI=u.gK.model("SharedStoreModel",{id:u.gK.identifier,locked:!1,children:De.unionArray(["choice"])}).actions((e=>({setChildren(t){e.children=t},clear(){e.children=[]},lock(){e.locked=!0},unlock(){e.locked=!1},destroy(){e.clear(),(0,u.Yo)(e)}}))),kI=new Map,OI=new Set,RI=u.gK.optional(u.gK.maybeNull(u.gK.string),null),EI=u.gK.optional(u.gK.maybeNull(u.gK.late((()=>u.gK.reference(jI)))),null),_I=u.gK.model("SharedStoreMixin",{sharedstore:RI,store:EI}).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=kI.get(e.storeId);De.getParentOfTypeString(e,"AnnotationStore").addSharedStore(t),OI.add(e.storeId),e.store=e.storeId}}}))).preProcessSnapshot((e=>{var t;const n=null!=(t=e.sharedstore)?t:e.name;var r,o;OI.has(n)?e.store=n:kI.set(n,jI.create({id:n,children:null!=(r=null!=(o=e._children)?o:e.children)?r:[]}));return e})),AI=()=>{kI.clear(),OI.clear()},TI={taxonomy:"lsf-taxonomy",taxonomy__loading:"lsf-taxonomy__loading",taxonomy__new:"lsf-taxonomy__new"},PI=["alias","children","isLeaf","value"],II=u.gK.model({toname:u.gK.maybeNull(u.gK.string),labeling:u.gK.optional(u.gK.boolean,!1),leafsonly:u.gK.optional(u.gK.boolean,!1),showfullpath:u.gK.optional(u.gK.boolean,!1),legacy:u.gK.optional(u.gK.boolean,!1),pathseparator:u.gK.optional(u.gK.string," / "),apiurl:u.gK.maybeNull(u.gK.string),placeholder:"",minwidth:u.gK.maybeNull(u.gK.string),maxwidth:u.gK.maybeNull(u.gK.string),dropdownwidth:u.gK.maybeNull(u.gK.string),maxusages:u.gK.maybeNull(u.gK.string),value:u.gK.optional(u.gK.string,"")});const LI=new Map,MI=u.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}}})),KI=u.gK.model({pid:u.gK.optional(u.gK.string,R),type:"taxonomy",[(0,k.VS)(k.Ls)?"_children":"children"]:De.unionArray(["choice"])}).volatile((()=>({maxUsagesReached:!1,selected:[],loading:!0,_api:"",_items:[]}))).views((e=>(0,k.VS)(k.Ls)?{get children(){return e._children},set children(t){e._children=t},get isLabeling(){return(0,k.VS)(k.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 K.filterChildrenOfType(e,"ChoiceModel")},get preselectedValues(){return e.tiedChildren.filter((e=>!0===e.selected&&!e.isSkipped)).map((e=>e.resultValue))},get isLoadedByApi(){return(0,k.VS)(k.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=LI.get(e.name))?t:[];(0,k.VS)(k.Ls)&&e.store&&n.length!==e.children.length?(0,k.VS)(k.xD)?e.updateChildren():setTimeout((()=>e.updateChildren())):e.loading=!1},loadItems:(0,u.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,nr.A)(e,PI);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=et.A.ERR_LOADING_HTTP({attr:"apiUrl",error:String(t),url:e.apiurl});e.annotationStore.addErrors([Mj.generalError(n)]),console.error(t)}e.loading=!1})),beforeDestroy(){LI.delete(e.name)},updateChildren(){var t;const n=null!=(t=LI.get(e.name))?t:[];if(n.length){const t=(0,u.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(),LI.delete(e.name),r(e.children)}e.loading=!1},requiredModal(){Sn.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,k.VS)(k.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&&Sn.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,u.L3)((function*(n){var r;if(!e.isLoadedByApi)return null==t.updateValue?void 0:t.updateValue(n);e._api=S(e.apiurl,n.task.dataObj),e._api=null!=(r=yield n.presignUrlForProject(e._api))?r:e._api,yield e.loadItems()}))}})).preProcessSnapshot((e=>{if((0,k.VS)(k.Ls)){var t;const n=null!=(t=e._children)?t:e.children;n&&!LI.has(e.name)&&LI.set(e.name,n),delete e._children,delete e.children}return e})),DI=u.gK.compose("TaxonomyModel",JR,zE,II,XR,Ne,kE,KI,...(0,k.VS)(k.Ls)?[_I]:[],ft,...(0,k.VS)(k.gF)?[SE]:[],...(0,k.VS)(k.um)?[MI]:[],qe,C_,qE),NI=(0,v.PA)((({item:e})=>{const t=[TI.taxonomy,"taxonomy",(0,k.VS)(k.yD)?TI.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,k.VS)(k.Ls)&&o?(0,E.jsx)("div",{className:t,style:n,children:(0,E.jsx)("div",{className:TI.taxonomy__loading,children:(0,E.jsx)(f.A,{size:"small"})})}):(0,E.jsx)("div",{className:t,style:n,ref:e.elementRef,children:(0,k.VS)(k.yD)&&!e.legacy?(0,E.jsx)(SI,{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,k.VS)(k._m),isEditable:!e.isReadOnly()}):(0,E.jsx)(v_,{items:e.items,selected:e.selected,onChange:e.onChange,onAddLabel:e.userLabels&&e.onAddLabel,onDeleteLabel:e.userLabels&&e.onDeleteLabel,options:r,isEditable:!e.isReadOnly()})})}));b.addTag("taxonomy",DI,NI);const VI=u.gK.model({controlledTags:De.unionTag(["HyperText"])}),zI=u.gK.model("HyperTextLabelsModel",{type:"hypertextlabels",children:De.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"}}))),BI=u.gK.compose(JR,cE,zI,VI,UR,GR.props({_child:"LabelModel"})),HI=u.gK.compose("HyperTextLabelsModel",BI),FI=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("hypertextlabels",HI,FI);const WI=u.gK.model({opacity:u.gK.optional(u.gK.string,"0.9"),fillcolor:u.gK.maybeNull(u.gK.string),strokeWidth:u.gK.optional(u.gK.number,1),strokeColor:u.gK.optional(u.gK.string,"#f48a42")}),$I=u.gK.model("TimeSeriesLabelesModel",{pid:u.gK.optional(u.gK.string,R),type:"timeserieslabels",children:De.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}}))),UI=UR.props({_type:"timeserieslabels"}).views((e=>({get shouldBeUnselected(){return"single"===e.choice}}))),ZI=u.gK.compose(JR,cE,$I,WI,UI,GR.props({_child:"LabelModel"})),GI=u.gK.compose("TimeSeriesLabelsModel",ZI),YI=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("timeserieslabels",GI,YI);const XI=u.gK.model({toname:u.gK.maybeNull(u.gK.string)}),qI=u.gK.model("TimelineLabelsModel",{pid:u.gK.optional(u.gK.string,R),type:"timelinelabels"}),JI=u.gK.compose("TimelineLabelsModel",JR,cE,qI,XI,GR.props({_child:"LabelModel"})),QI=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("timelinelabels",JI,QI);const eL=u.gK.model({toname:u.gK.maybeNull(u.gK.string)}),tL=u.gK.model("VideoRectangleModel",{pid:u.gK.optional(u.gK.string,R),type:"videorectangle"}),nL=u.gK.compose("VideoRectangleModel",JR,tL,eL),rL=(0,v.PA)((()=>null));b.addTag("videorectangle",nL,rL);const oL=u.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:()=>({})}))),iL=u.gK.model().actions((e=>({afterAttach(){var t;const n=null!=(t=e.toolNames)?t:[],r=OR.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)}}))),aL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),strokewidth:u.gK.optional(u.gK.string,"15")}),sL=u.gK.model({type:"brush",removeDuplicatesNamed:"Erase"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["Brush","Erase"]}))),lL=u.gK.compose("BrushModel",JR,Ne,oL,aL,sL,iL);b.addTag("brush",lL,(()=>null));const cL=u.gK.model({controlledTags:De.unionTag(["Image"])}),dL=u.gK.model("BrushLabelsModel",{type:"brushlabels",children:De.unionArray(["label","header","view","hypertext"])}),uL=u.gK.compose("BrushLabelsModel",JR,cE,dL,lL,cL,UR,GR.props({_child:"LabelModel"})),hL=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("brushlabels",uL,hL);const gL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.2"),fillcolor:u.gK.optional(Ie.color,"#f48a42"),strokewidth:u.gK.optional(u.gK.string,"1"),strokecolor:u.gK.optional(Ie.color,"#f48a42"),fillopacity:u.gK.maybeNull(Ie.range()),canrotate:u.gK.optional(u.gK.boolean,!0)}),mL=u.gK.model({type:"ellipse"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["Ellipse"]}))),pL=u.gK.compose("EllipseModel",JR,Ne,oL,gL,mL,iL);b.addTag("ellipse",pL,(()=>null));const fL=u.gK.model("EllipseLabelsModel",{type:"ellipselabels",children:De.unionArray(["label","header","view","hypertext"])}),vL=u.gK.compose(JR,cE,fL,pL,UR,GR.props({_child:"LabelModel"})),yL=u.gK.compose("EllipseLabelsModel",vL),bL=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("ellipselabels",yL,bL);const xL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.9"),fillcolor:u.gK.optional(Ie.color,"#8bad00"),snap:u.gK.optional(u.gK.string,"none"),strokecolor:u.gK.optional(Ie.color,"#8bad00"),strokewidth:u.gK.optional(u.gK.string,"2")}),wL=u.gK.model({type:"keypoint"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["KeyPoint"],snapMode:ot}))),CL=u.gK.compose("KeyPointModel",JR,Ne,oL,xL,wL,iL);b.addTag("keypoint",CL,(()=>null));const SL=u.gK.model({controlledTags:De.unionTag(["Image"])}),jL=u.gK.model("KeyPointLabelsModel",{type:"keypointlabels",children:De.unionArray(["label","header","view","hypertext"])}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))),kL=u.gK.compose(JR,cE,jL,CL,SL,UR,GR.props({_child:"LabelModel"})),OL=u.gK.compose("KeyPointLabelsModel",kL),RL=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("keypointlabels",OL,RL);const EL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.6"),blurradius:u.gK.optional(u.gK.string,"5"),defaultthreshold:u.gK.optional(u.gK.string,"15")}),_L=u.gK.model({type:"magicwand",removeDuplicatesNamed:"Erase"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["MagicWand","Erase"]}))),AL=u.gK.compose("MagicWandModel",JR,Ne,oL,EL,_L,iL);(0,k.VS)(k.bP)&&b.addTag("magicwand",AL,(()=>null));const TL=kr("Polygons"),PL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.2"),fillcolor:u.gK.optional(Ie.color,"#f48a42"),strokewidth:u.gK.optional(u.gK.string,"2"),strokecolor:u.gK.optional(Ie.color,"#f48a42"),snap:u.gK.optional(u.gK.string,"none"),pointsize:u.gK.optional(u.gK.string,"small"),pointstyle:u.gK.optional(u.gK.string,"circle")}),IL=u.gK.model({controlledTags:De.unionTag(["Image"])}),LL=u.gK.model({type:"polygon",_value:u.gK.optional(u.gK.string,"")}).volatile((()=>({toolNames:["Polygon"]}))).actions((e=>({initializeHotkeys(){TL.addNamed("polygon:undo",(()=>{e.annotation.isDrawing&&e.annotation.undo()})),TL.addNamed("polygon:redo",(()=>{e.annotation.isDrawing&&e.annotation.redo()}))},disposeHotkeys(){TL.removeNamed("polygon:undo"),TL.removeNamed("polygon:redo")},afterCreate(){e.initializeHotkeys()},beforeDestroy(){e.disposeHotkeys()}}))),ML=u.gK.compose("PolygonModel",JR,Ne,oL,PL,IL,iL,LL);b.addTag("polygon",ML,(()=>null));const KL=u.gK.model({controlledTags:De.unionTag(["Image"])}),DL=u.gK.model("PolygonLabelsModel",{type:"polygonlabels",children:De.unionArray(["label","header","view","hypertext"])}),NL=u.gK.compose(JR,cE,DL,ML,KL,UR,GR.props({_child:"LabelModel"})),VL=u.gK.compose("PolygonLabelsModel",NL),zL=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("polygonlabels",VL,zL);const BL=u.gK.model({toname:u.gK.maybeNull(u.gK.string),opacity:u.gK.optional(Ie.range(),"0.2"),fillcolor:u.gK.optional(Ie.color,"#f48a42"),strokewidth:u.gK.optional(u.gK.string,"1"),strokecolor:u.gK.optional(Ie.color,"#f48a42"),fillopacity:u.gK.maybeNull(Ie.range()),canrotate:u.gK.optional(u.gK.boolean,!0)}),HL=u.gK.model({type:"rectangle"}).volatile((()=>({toolNames:["Rect","Rect3Point"]}))),FL=u.gK.compose("RectangleModel",JR,Ne,oL,BL,HL,iL);b.addTag("rectangle",FL,(()=>null));const WL=u.gK.model({controlledTags:De.unionTag(["Image"])}),$L=u.gK.model("RectangleLabelsModel",{pid:u.gK.optional(u.gK.string,R),type:"rectanglelabels",children:De.unionArray(["label","header","view","hypertext"])}),UL=u.gK.compose(JR,cE,$L,FL,WL,UR,GR.props({_child:"LabelModel"})),ZL=u.gK.compose("RectangleLabelsModel",UL),GL=(0,v.PA)((({item:e})=>(0,E.jsx)(dE,{item:e})));b.addTag("rectanglelabels",ZL,GL);const YL=u.gK.model({choice:u.gK.optional(u.gK.enumeration(["single","multiple"]),"multiple")}),XL=u.gK.model({id:u.gK.optional(u.gK.identifier,R),pid:u.gK.optional(u.gK.string,R),type:"relations",children:De.unionArray(["relation"])}).views((e=>({get values(){return e.children.map((e=>e.value))},findRelation:t=>e.children.find((e=>e.value===t))}))).actions((()=>({}))),qL=u.gK.compose("RelationsModel",XL,YL);b.addTag("relations",qL,(()=>null));const JL=u.gK.model({value:u.gK.maybeNull(u.gK.string),background:u.gK.optional(Ie.color,N.A.RELATION_BACKGROUND)}),QL=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"relation"}).actions((()=>({}))),eM=u.gK.compose("RelationModel",JL,QL);b.addTag("relation",eM,(()=>null));var tM=n(68703);const{Panel:nM}=tM.A,rM=u.gK.model({type:"panel",_value:u.gK.optional(u.gK.string,""),value:u.gK.optional(u.gK.string,""),children:De.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"])}),oM=u.gK.model({type:"collapse",size:u.gK.optional(u.gK.string,"4"),style:u.gK.maybeNull(u.gK.string),_value:u.gK.optional(u.gK.string,""),value:u.gK.optional(u.gK.string,""),bordered:u.gK.optional(u.gK.boolean,!1),accordion:u.gK.optional(u.gK.boolean,!0),children:De.unionArray(["panel"])}),iM=u.gK.compose("CollapseModel",oM,Ue),aM=(0,v.PA)((({item:e})=>(0,E.jsx)(tM.A,{bordered:e.bordered,accordion:e.accordion,children:e.children.filter((e=>"panel"===e.type)).map((t=>(0,E.jsx)(nM,{header:t._value,children:K.renderChildren(t,e.annotation)},t._value)))})));b.addTag("panel",u.gK.compose("PanelModel",rM,Ue),(()=>{})),b.addTag("collapse",iM,aM);var sM=n(70821),lM=n(92132);const cM={block:"block--fqozC",block_selected:"block_selected--BXxdo",name:"name--sC49k",tag:"tag--efLdj",date:"date--h1U4a"};class dM extends m.Component{render(){let e,t,n,r=`${cM.block}`;return this.props.hint&&(e=(0,E.jsx)(fI.A,{color:"blue",children:this.props.hint})),this.props.bg&&(t=this.props.bg),this.props.selected&&(r=`${r} ${cM.block_selected}`,e=(0,E.jsx)("div",{children:(0,E.jsx)(fI.A,{color:"magenta",children:"Selected Message"})}),this.props.hint&&(e=(0,E.jsx)("div",{className:cM.tag,children:(0,E.jsx)(fI.A,{color:"magenta",children:this.props.hint})}))),this.props.date&&(n=(0,E.jsx)("span",{className:cM.date,children:this.props.date})),(0,E.jsxs)("div",{className:r,style:{background:t,width:"max-content",maxWidth:"100%"},children:[(0,E.jsxs)("span",{className:cM.name,children:[this.props.name,": "]}),(0,E.jsx)("p",{className:cM.text,children:this.props.text}),n,e]})}}dM.propTypes={name:Ee.PropTypes.string.isRequired,text:Ee.PropTypes.string.isRequired,selected:Ee.PropTypes.bool,date:Ee.PropTypes.string,hint:Ee.PropTypes.string};const uM=u.gK.model({name:u.gK.string,text:u.gK.string,selected:u.gK.optional(u.gK.boolean,!1),date:u.gK.optional(u.gK.string,""),hint:u.gK.optional(u.gK.string,"")}),hM=u.gK.model({value:u.gK.maybeNull(u.gK.string),name:u.gK.maybeNull(u.gK.string)}),gM=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"Dialog",data:u.gK.map(uM)}),mM=u.gK.compose("DialogModel",hM,gM,Ne),pM=(0,v.WQ)("store")((0,v.PA)((({store:e,item:t})=>{if(!e.task||!e.task.dataObj)return(0,E.jsx)(sM.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,xt.convertToRGBA)((0,xt.stringToColor)(e.name),.1)),n.push((0,E.jsx)(dM,{name:e.name,hint:e.hint,text:e.text,selected:e.selected,date:e.date,id:e.id,bg:r},t))})),(0,E.jsxs)("div",{children:[(0,E.jsx)("div",{style:{display:"flex",flexFlow:"column",maxHeight:"500px",overflowY:"scroll",paddingRight:"10px",marginTop:"10px"},children:n}),(0,E.jsx)(lM.A,{dashed:!0})]})})));b.addTag("dialog",mM,pM);const fM=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"header",size:u.gK.optional(u.gK.string,"4"),style:u.gK.maybeNull(u.gK.string),_value:u.gK.optional(u.gK.string,""),value:u.gK.optional(u.gK.string,""),underline:u.gK.optional(u.gK.boolean,!1)}),vM=u.gK.compose("HeaderModel",fM,Ue),yM=(0,v.PA)((({item:e})=>{const t=(0,x.clamp)(Number.parseInt(e.size),1,5),n=e.style?K.cssConverter(e.style):{margin:"10px 0"};return!n.fontSize&&t>4&&(n.fontSize=5===t?"1.2em":"1.1em"),(0,E.jsx)(AE.A.Title,{underline:e.underline,level:t,style:n,children:e._value})}));b.addTag("header",vM,yM);const bM=u.gK.model({classname:u.gK.optional(u.gK.string,""),display:u.gK.optional(u.gK.string,"block"),style:u.gK.maybeNull(u.gK.string),idattr:u.gK.optional(u.gK.string,"")}),xM=u.gK.model({id:u.gK.identifier,type:"view",children:De.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"])}),wM=u.gK.compose("ViewModel",bM,xM,qE,Ne),CM=(0,v.PA)((({item:e})=>{let t={};return"inline"===e.display&&(t={display:"inline-block",marginRight:"15px"}),e.style&&(t=K.cssConverter(e.style)),!1===e.isVisible&&(t.display="none"),(0,E.jsx)("div",{id:e.idattr,className:e.classname,style:t,children:K.renderChildren(e,e.annotation)})}));b.addTag("view",wM,CM);const SM=u.gK.model({id:u.gK.optional(u.gK.identifier,R),type:"style",value:u.gK.optional(u.gK.string,"")}),jM=u.gK.compose("StyleModel",SM),kM=(0,v.PA)((({item:e})=>(0,E.jsx)("style",{dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(e.value)}})));b.addTag("style",jM,kM);var OM=n(31927);const RM=u.gK.model({casesensetive:u.gK.optional(u.gK.boolean,!1),cleanup:u.gK.optional(u.gK.boolean,!0),placeholder:u.gK.optional(u.gK.string,"Quick Filter"),minlength:u.gK.optional(u.gK.string,"3"),hotkey:u.gK.maybeNull(u.gK.string)}),EM=u.gK.model(Object.assign({type:"filter",_value:u.gK.maybeNull(u.gK.string)},(0,k.VS)(k.cE)?{id:u.gK.identifier,name:u.gK.string}:{name:u.gK.identifier},{toname:u.gK.maybeNull(u.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())}}))),_M=u.gK.compose("FilterModel",EM,RM,Ue,Ne),AM=(0,v.PA)((({item:e})=>{const t=e.toTag;return-1===t.type.indexOf("labels")&&-1===t.type.indexOf("choices")?null:(0,E.jsx)(OM.A,{ref:t=>{e.setInputRef(t)},value:e._value,size:"small",onChange:e.applyFilterEv,onPressEnter:e.selectFirstElement,placeholder:e.placeholder})}));function TM(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 PM(e){const t=Object.keys(e);for(const e of t){const t=RegExp(/^__reactProps(\$[^$]+)$/).exec(e);if(t)return t[1]}return""}function IM(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)TM(n[t]),n[t]=null;n.childNodes&&IM(n.childNodes,t)}}}b.addTag("filter",_M,AM);const LM=new WeakMap;function MM(e,t="default"){LM.has(e)||LM.set(e,new Map);const n=LM.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=PM(t);e=null,setTimeout((()=>{IM([t],n)}))}}}()),n.get(t)}function KM({annotation:e,root:t}){return(0,m.useLayoutEffect)((()=>()=>{e&&(0,u._n)(e)&&e.resetReady()}),[e.pk,e.id]),t?K.renderItem(t,e):null}const DM=(0,Qe.cn)("draft-panel"),NM=(0,v.PA)((({item:e})=>{if(!e.draftSaved&&!e.versions.draft)return null;const t=e.draft&&e.draftSaved?` saved ${un.UDate.prettyDate(e.draftSaved)}`:"";return e.selected?e.versions.result&&e.versions.result.length?(0,E.jsxs)("div",{className:DM,children:[(0,E.jsx)(hr,{placement:"topLeft",title:e.draftSelected?"switch to original result":"switch to current draft",children:(0,E.jsx)("button",{type:"button",onClick:()=>e.toggleDraft(),className:DM.elem("toggle"),children:e.draftSelected?"draft":"original"})}),t]}):(0,E.jsx)("div",{className:DM,children:t?`draft${t}`:"not submitted draft"}):e.draft?(0,E.jsxs)("div",{className:DM,children:["draft",t]}):null}));var VM=n(11346);const zM=["badge","className","faded","showUsername","size","src","style","user","username","useRandomBackground","children"],BM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",HM=(0,m.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:p}=e,f=(0,nr.A)(e,zM);const v=null!=(n=null==u?void 0:u.avatar)?n:c,y=(0,m.useRef)(),[b,w]=(0,m.useState)(v),[C,S]=(0,m.useState)(!1),[j,k]=(0,m.useState)(!0);(0,m.useEffect)((()=>{v!==b&&(w(v),S(!1),k(!0))}),[v]),l&&(d=Object.assign({width:l,height:l,fontSize:.4*l},d));const O=(0,m.useMemo)((()=>(0,x.userDisplayName)(u)),[u]),R=(0,m.useMemo)((()=>{if((0,x.isDefined)(u.id)){var e;const t=null!=(e=localStorage.getItem(`userpic-color-${u.id}`))?e:Ct().average([Ct().random(),"#cfcfcf"]).css();return localStorage.setItem(`userpic-color-${u.id}`,t),t}return null}),[u,g]),_=(0,m.useMemo)((()=>{if(R){return Ct().contrast(R,"#fff")>=4.5?"#fff":"#000"}return null}),[R]),A=(0,m.useCallback)((()=>{S(!0),b!==BM&&k(!1)}),[b]),T=Object.assign({},null!=(r=d)?r:{},{background:R,color:_}),P=(0,E.jsxs)(Qe.eB,Object.assign({ref:t,name:"userpic",mix:i,mod:{faded:a},style:T},f,{children:[p||(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{tag:"img",name:"avatar",ref:y,src:b,alt:(null!=O?O:"").toUpperCase(),style:{opacity:C?a?.3:1:0},onLoad:A,onError:()=>w(BM),mod:{faded:a}}),j&&(0,E.jsx)(Qe.Sl,{tag:"span",name:"username",children:(null!=O?O:"").slice(0,2).toUpperCase()})]}),o&&Object.entries(o).map((([e,t],n)=>(0,E.jsx)(Qe.Sl,{name:"badge",mod:{[e]:!0},children:t},`badge-${n}`)))]})),I=(0,m.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,E.jsx)(hr,{title:I,children:P}):P}));HM.displayName="Userpic";const FM=(0,v.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}})),WM=(0,v.PA)((({annotation:e,inline:t,isSelected:n})=>{var r;const o=e.history.hasChanges,i=e.list,a=i.store.hasInterface("annotations:hide-info"),s=a?{email:"Me"}:null,[l,c]=(0,m.useState)(!1);return(0,m.useEffect)((()=>c(!0)),[e.history.history.length]),(0,m.useEffect)((()=>c(!1)),[e.draftSaved]),o||e.versions.draft?(0,E.jsx)(ZM,{user:null!=(r=null!=s?s:e.user)?r:{email:e.createdBy},date:e.draftSaved,extra:e.isDraftSaving?(0,E.jsx)(Qe.Sl,{name:"saving",children:(0,E.jsx)(Qe.Sl,{name:"spin"})}):l?(0,E.jsx)(Qe.Sl,{name:"saving",children:(0,E.jsx)(Qe.Sl,{name:"dot"})}):o?(0,E.jsx)(Qe.Sl,{name:"saving",children:(0,E.jsx)(Qe.Sl,{name:"saved",component:Cu})}):null,inline:t,comment:"",acceptedState:"draft_created",selected:n,hideInfo:a,onClick:()=>{i.selectHistory(null),e.toggleDraft(!0)}},"draft"):null})),$M=({reason:e,comment:t})=>{const[n,r]=(0,m.useState)(!1),[o,i]=(0,m.useState)(!1),a=(0,m.useRef)();return(0,m.useLayoutEffect)((()=>{if(a.current){const{clientHeight:e}=a.current,t=e>66;i(t),r(t)}}),[]),(0,E.jsxs)(Qe.Sl,{name:"comment",ref:a,mod:{collapsed:n},children:[(0,E.jsx)(Qe.Sl,{name:"comment-content","data-reason":`${e}${t?": ":""}`,children:t}),o&&(0,E.jsx)(Qe.Sl,{name:"collapse-comment",mod:{collapsed:n},onClick:e=>{e.stopPropagation(),r((e=>!e))},children:n?"Show more":"Show less"})]})},UM=({type:e})=>{const t=(0,m.useMemo)((()=>{switch(e){case"submitted":case"updated":return(0,E.jsx)(Hb,{style:{color:"#617ADA"}});case"draft_created":return(0,E.jsx)(Jb,{style:{color:"#617ADA"}});case"accepted":return(0,E.jsx)(Cb,{style:{color:"#2AA000"}});case"rejected":return(0,E.jsx)(Ab,{style:{color:"#dd0000"}});case"fixed_and_accepted":return(0,E.jsx)(Cb,{style:{color:"#FA8C16"}});case"prediction":return(0,E.jsx)(fx,{style:{color:"#944BFF"}});case"imported":return(0,E.jsx)(Px,{style:{color:"#2AA000"}});case"skipped":return(0,E.jsx)(jx,{style:{color:"#dd0000"}});case"deleted_review":return(0,E.jsx)(zx,{style:{color:"#dd0000"}});case"propagated_annotation":return(0,E.jsx)(Yx,{style:{color:"#2AA000"}});default:return null}}),[e]);return t&&(0,E.jsx)(Qe.Sl,{name:"history-icon",children:t})},ZM=(0,v.PA)((({entity:e,user:t,date:n,extra:r,comment:o,acceptedState:i,selected:a=!1,disabled:s=!1,inline:l=!1,hideInfo:c,onClick:d})=>{const u="prediction"===(null==e?void 0:e.type),h=(0,m.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}}),[]),g=(0,m.useCallback)((e=>{s||d(e)}),[d,s]);return(0,E.jsxs)(Qe.eB,{name:"history-item",mod:{inline:l,selected:a,disabled:s},onClick:g,children:[(0,E.jsxs)(ns,{spread:!0,size:"medium",truncated:!0,children:[(0,E.jsxs)(ns,{size:"small",truncated:!0,children:[(0,E.jsx)(Qe.Sl,{tag:HM,user:t,name:"userpic",showUsername:!0,username:u?e.createdBy:null,mod:{prediction:u},children:u&&(0,E.jsx)($s,{style:{width:16,height:16}})}),(0,E.jsx)(Qe.Sl,{name:"name",tag:"span",children:u?e.createdBy:(0,x.userDisplayName)(t)})]}),!c&&(0,E.jsxs)(ns,{size:"small",children:[r&&(0,E.jsx)(Qe.Sl,{name:"date",children:r}),n&&(0,E.jsx)(Qe.Sl,{name:"date",children:(0,E.jsx)(VM.A,{placement:"topRight",title:new Date(n).toLocaleString(),children:(0,x.humanDateDiff)(n)})})]})]}),(h||o)&&(0,E.jsxs)(Qe.Sl,{name:"action",tag:ns,size:"small",children:[i&&(0,E.jsx)(UM,{type:i}),(0,E.jsx)($M,{comment:o,reason:h})]})]})}));ZM.displayName="HistoryItem";const GM=FM((0,v.PA)((({annotationStore:e,selectedHistory:t,history:n,enabled:r=!0,showDraft:o=!1,inline:i=!1})=>{var a;const s=e.selected,l=null!=n&&n.length?n[0]:null,c=s.history.hasChanges,u=e.store.hasInterface("annotations:hide-info"),h=null==(a=window.APP_SETTINGS)?void 0:a.user,g=!e.selectedHistory&&(s.draftSelected||!s.versions.draft&&c);return(0,E.jsxs)(Qe.eB,{name:"annotation-history",mod:{inline:i},children:[o&&(0,E.jsx)(WM,{annotation:s,isSelected:g,inline:i}),r&&n.length>0&&n.map((n=>{var r;const{id:a,user:m,createdDate:p}=n,f=(null==l?void 0:l.id)===n.id,v=f&&!t&&o?!g:(null==t?void 0:t.id)===n.id,y=u?{email:(null==h?void 0:h.id)===m.id?"Me":"User"}:null;return(0,E.jsx)(ZM,{inline:i,user:null!=(r=null!=y?y:m)?r:{email:null==n?void 0:n.createdBy},date:p,comment:n.comment,acceptedState:n.actionType,selected:v,disabled:0===n.results.length,hideInfo:u,onClick:async()=>{o?(c&&(s.saveDraftImmediately(),await(0,d.z7)((()=>!s.isDraftSaving))),f||v?(e.selectHistory(null),s.toggleDraft(v)):e.selectHistory(n)):e.selectHistory(v?null:n)}},a)}))]})})));GM.displayName="AnnotationHistory";const YM=e=>{var t;(0,m.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])},XM=(0,v.WQ)("store")((0,v.PA)((({entity:e,showHistory:t=!0})=>{var n;const r=(0,k.VS)(k.Lk);return YM(e),e?(0,E.jsxs)(Qe.eB,{name:"annotation",onClick:e=>e.stopPropagation(),children:[!r&&(0,E.jsx)(NM,{item:e}),t&&(0,E.jsxs)(Qe.Sl,{tag:ns,spread:!0,name:"title",children:["Annotation History",(0,E.jsxs)(Qe.Sl,{name:"id",children:["#",null!=(n=e.pk)?n:e.id]})]}),(0,E.jsx)(GM,{enabled:t,showDraft:r})]}):null})));var qM=n(65604);const JM={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 QM=n(23882),eK=n(50417);const tK=(0,v.PA)((({item:e,setDraggable:t})=>{const[n,r]=(0,m.useState)(!1),o=(0,m.useCallback)((e=>{r((e=>!e)),e.preventDefault(),e.stopPropagation()}),[]),i=e.perRegionDescControls||[];return(0,E.jsxs)(Qe.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,E.jsx)(Qe.Sl,{name:"controls",children:i.map(((t,o)=>{const i=b.getPerRegionView(t.type,mt.REGION_LIST);return i?(0,E.jsx)(i,{item:t,area:e,collapsed:n,setCollapsed:r},o):null}))}),(0,E.jsx)(Qe.Sl,{name:"collapse",tag:Qa,size:"small",type:"text",onClick:o,children:n?(0,E.jsx)(Ec,{}):(0,E.jsx)(Bc,{})})]})})),nK=(0,v.PA)((({idx:e,item:t,setDraggable:n})=>{const r=(0,m.useRef)();return(0,m.useEffect)((()=>{if(t.selected){const e=r.current;if(!e)return;(e.scrollIntoViewIfNeeded||e.scrollIntoView).call(e)}}),[t.selected]),(0,E.jsxs)(Qe.eB,{ref:r,name:"region-item",mod:{hidden:t.hidden},"data-testid":`regionitem:selected=${t.selected}`,children:[(0,E.jsxs)(Qe.Sl,{name:"header",tag:"div",children:[(0,E.jsx)(Qe.Sl,{name:"counter",children:(0,x.isDefined)(e)?e+1:""}),(0,E.jsx)(Qe.Sl,{name:"title",tag:PO,node:t,mix:JM.node}),(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{tag:"span",name:"id",children:(0,E.jsx)(IO,{node:t})}),(0,E.jsx)(Qe.Sl,{name:"prediction",children:"prediction"===t.origin&&(0,E.jsx)($s,{style:{width:16,height:16}})}),t.isReadOnly()&&(0,E.jsx)(QM.A,{count:"ro",style:{backgroundColor:"#ccc"}}),t.score&&(0,E.jsx)(Qe.Sl,{tag:"span",name:"score",style:{color:un.Colors.getScaleGradient(t.score)},children:t.score.toFixed(2)}),t.hideable&&(0,E.jsx)(Qe.Sl,{tag:Qa,name:"toggle",size:"small",type:"text",mod:{active:!t.hidden},onClick:t.toggleHidden,children:t.hidden?(0,E.jsx)(pc,{}):(0,E.jsx)(oc,{})})]})]}),(0,E.jsx)(tK,{item:t,setDraggable:n})]})})),rK=(0,v.PA)((({item:e,idx:t,flat:n,setDraggable:r,onClick:o})=>{const i=(0,m.useMemo)((()=>{let t;return()=>{if(!t){const n=e.getOneColor();t=n?dn({labelColor:n,labelBgColor:Ct()(n).alpha(.15)}):null}return t}}),[(0,u._n)(e)&&e.getOneColor()]);if(!(0,u._n)(e))return null;const a=[JM.lstitem,n&&JM.flat,!0===e.hidden&&JM.hidden,e.inSelection&&JM.selected].filter(Boolean),s=i();return(0,E.jsx)(eK.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,E.jsx)(nK,{idx:t,item:e,setDraggable:r})},e.id)})),oK=(0,v.PA)((({regionStore:e})=>{const[t,n]=(0,m.useState)(!0),r=(0,m.useCallback)((()=>n(!1)),[]);(0,m.useEffect)((()=>{setTimeout(r)}),[r]);const o=(0,m.useRef)(!0),i=(0,m.useCallback)((e=>{o.current=e}),[]);if(t)return(0,E.jsx)("div",{style:{textAlign:"center"},children:(0,E.jsx)(f.A,{})});const a=!e.sortedRegions.some((e=>e.parentID)),s=e.asTree(((e,t,n)=>({key:e.id,title:(0,E.jsx)(rK,{item:e,idx:t,flat:a,setDraggable:i,onClick:n})}))),l=[...e.classifications.map((e=>({classification:!0,key:e.id,title:(0,E.jsx)(rK,{item:e,flat:!0,setDraggable:i})}))),...s];return(0,E.jsx)(qM.A,{className:JM.treelabels,treeData:l,draggable:!0,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,switcherIcon:(0,E.jsx)(wc,{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=un.Checkers.flatten(t.map((e=>e.groupcancontain.split(",")))),r=un.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)}}})})),iK=(0,v.PA)((({item:e,regions:t,regionStore:n})=>{const r=e.background,o=dn({color:r}),i=Object.values(t).reduce(((e,t)=>e&&t.hidden),!0),a=Object.values(t).length;return(0,E.jsx)(Qe.eB,{name:"list-item",tag:eK.Ay.Item,style:o,children:(0,E.jsxs)(ns,{spread:!0,children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:[e.isNotLabel?(0,E.jsx)(E.Fragment,{children:"Not labeled"}):(0,E.jsx)(eE,{color:r,empty:e.isEmpty,children:e._value}),(0,E.jsx)(Qe.Sl,{name:"counter",children:`${a} Region${0===a||a>1?"s":""}`})]}),(0,E.jsx)(Qe.Sl,{name:"visibility",tag:Qa,type:"text",icon:i?(0,E.jsx)(pc,{}):(0,E.jsx)(oc,{}),onClick:()=>n.setHiddenByLabel(!i,e),mod:{hidden:i}})]})},e.id)})),{localStorage:aK}=window,sK="collapsed-label-pos",lK=(0,v.PA)((({regionStore:e})=>{const t=e.asLabelsTree(((t,n,r,o,i)=>({key:t.id,title:o=>r?(0,E.jsx)(iK,{item:t,idx:n,regions:o.children,regionStore:e}):(0,E.jsx)(rK,{item:t,idx:n,onClick:i})})));if((0,k.VS)(k.TU)){var n,r,o;const[e,i]=(0,m.useState)(null!=(n=null==(r=aK.getItem(sK))||null==r.split||null==(r=r.split(","))?void 0:r.filter((e=>!!e)))?n:[]),a=e=>{aK.setItem(sK,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,E.jsx)(qM.A,{className:JM.treelabels,treeData:t,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,expandedKeys:c,switcherIcon:(0,E.jsx)(wc,{className:JM.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,E.jsx)(qM.A,{className:JM.treelabels,treeData:t,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,switcherIcon:(0,E.jsx)(wc,{opacity:"0.25"})})}));var cK=n(53312);const dK=({sortKey:e})=>{switch(e){case"date":return(0,E.jsx)(ed,{});case"score":return(0,E.jsx)(cK.A,{});default:return null}},uK=(0,v.PA)((({regionStore:e})=>(0,E.jsxs)(Qe.eB,{name:"sort-menu",tag:t_.A,selectedKeys:[e.sort],children:[(0,E.jsx)(t_.A.Item,{children:(0,E.jsxs)(Qe.Sl,{name:"option-inner",onClick:t=>(e.setSort("date"),t.preventDefault(),!1),children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:[(0,E.jsx)(Qe.Sl,{name:"icon",tag:"span",children:(0,E.jsx)(dK,{sortKey:"date"})})," ","Date"]}),(0,E.jsx)("span",{children:"date"===e.sort&&("asc"===e.sortOrder?"↓":"↑")})]})},"date"),(0,E.jsx)(t_.A.Item,{children:(0,E.jsxs)(Qe.Sl,{name:"option-inner",onClick:t=>(e.setSort("score"),t.preventDefault(),!1),children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:[(0,E.jsx)(Qe.Sl,{name:"icon",tag:"span",children:(0,E.jsx)(dK,{sortKey:"score"})})," ","Score"]}),(0,E.jsx)("span",{children:"score"===e.sort&&("asc"===e.sortOrder?"↓":"↑")})]})},"score")]}))),hK=({value:e,children:t,className:n})=>{const r=m.Children.toArray(t),o=(0,m.useMemo)((()=>r.find((t=>t.props.case===e))||null),[r,e]);return o?(0,m.cloneElement)(o,Object.assign({},o.props,{className:[n,o.props.className].join(" ")})):null},gK=["size","value","defaultValue","onChange","children"],mK=m.createContext(),pK=e=>{let{size:t,value:n,defaultValue:r,onChange:o,children:i}=e,a=(0,nr.A)(e,gK);const[s,l]=(0,m.useState)(r);return(0,E.jsx)(mK.Provider,{value:{value:null!=n?n:s,onChange:e=>{l(e.target.value),null==o||o(e)},defaultValue:r},children:(0,E.jsx)("div",{className:(0,Qe.cn)("radio-group").mod({size:t}),style:a.style,children:(0,E.jsx)("div",{className:(0,Qe.cn)("radio-group").elem("buttons"),children:i})})})};pK.Button=({value:e,disabled:t,children:n})=>{const{onChange:r,value:o}=m.useContext(mK),i=e===o;return(0,E.jsxs)("label",{className:(0,Qe.cn)("radio-group").elem("button").mod({checked:i,disabled:t}),children:[(0,E.jsx)("input",{className:(0,Qe.cn)("radio-group").elem("input"),type:"radio",value:e,checked:e===o,onChange:r,disabled:t}),n]})};const{Block:fK,Elem:vK}=(0,Qe.JE)();class yK extends m.Component{constructor(e){var t;super(e),this.modalRef=(0,m.createRef)(),this.onClickOutside=e=>{const t=(0,Qe.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,E.jsx)(fK,{name:"modal",ref:this.modalRef,mod:t,mix:n,onClick:this.onClickOutside,children:(0,E.jsx)(vK,{name:"wrapper",children:(0,E.jsxs)(vK,{name:"content",style:this.props.style,children:[!e&&(0,E.jsxs)(yK.Header,{children:[(0,E.jsx)(vK,{name:"title",children:this.state.title}),!1!==this.props.allowClose&&(0,E.jsx)(vK,{tag:Qa,name:"close",type:"text",style:{color:"0099FF"},icon:(0,E.jsx)(ks,{})})]}),(0,E.jsx)(vK,{name:"body",mod:{bare:e},children:this.body}),this.state.footer&&(0,E.jsx)(yK.Footer,{children:this.state.footer})]})})});return(0,h.createPortal)(r,document.body)}transition(e,t){var n=this;return ir(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,E.jsx)(e,{}):e}return this.props.children}}yK.Header=({children:e,divided:t})=>(0,E.jsx)(vK,{name:"header",mod:{divided:t},children:e}),yK.Footer=({children:e})=>(0,E.jsx)(vK,{name:"footer",children:e});const bK=["okText","onOk","cancelText","onCancel","buttonLook"],xK=["okText","onOkPress"],wK=e=>{const t=(0,m.createRef)(),n=document.createElement("div");n.className=(0,Qe.cn)("modal-holder").toClassName(),document.body.appendChild(n);const r=(e,r)=>{(0,h.render)((0,E.jsx)(yK,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()}}},CK=e=>{let{okText:t,onOk:n,cancelText:r,onCancel:o,buttonLook:i}=e,a=(0,nr.A)(e,bK);const s=wK(Object.assign({},a,{allowClose:!1,footer:(0,E.jsxs)(ns,{align:"end",children:[(0,E.jsx)(Qa,{onClick:()=>{null==o||o(),s.close()},size:"compact",autoFocus:!0,children:null!=r?r:"Cancel"}),(0,E.jsx)(Qa,{onClick:()=>{null==n||n(),s.close()},size:"compact",look:null!=i?i:"primary",children:null!=t?t:"OK"})]})}));return s};Object.assign(yK,{info:e=>{let{okText:t,onOkPress:n}=e,r=(0,nr.A)(e,xK);const o=wK(Object.assign({},r,{footer:(0,E.jsx)(ns,{align:"end",children:(0,E.jsx)(Qa,{onClick:()=>{null==n||n(),o.close()},look:"primary",size:"compact",children:null!=t?t:"OK"})})}));return o},confirm:CK,modal:wK});const SK=(0,v.PA)((({regionStore:e,annotation:t})=>{const{classifications:n,regions:r,view:o}=e,i=r.length+("regions"===o?n.length:0);return(0,E.jsxs)(Qe.eB,{name:"entities",children:[(0,E.jsx)(Qe.Sl,{name:"source",children:(0,E.jsxs)(ns,{spread:!0,children:[(0,E.jsxs)(pK,{size:"small",value:o,style:{width:240},onChange:t=>{e.setView(t.target.value)},children:[(0,E.jsxs)(pK.Button,{value:"regions",children:["Regions",i?(0,E.jsxs)(Qe.Sl,{name:"counter",children:[" ",i]}):null]}),(0,E.jsx)(pK.Button,{value:"labels",children:"Labels"})]}),t.isReadOnly()&&(0,E.jsx)(hr,{title:"Delete All Regions",children:(0,E.jsx)(Qa,{look:"danger",type:"text","aria-label":"Delete All Regions",icon:(0,E.jsx)(Ps,{}),style:{height:36,width:36,padding:0},onClick:()=>{CK({title:"Removing all regions",body:"Do you want to delete all annotated regions?",buttonLook:"destructive",onOk:()=>t.deleteAllRegions()})}})})]})}),i?(0,E.jsx)(Qe.Sl,{name:"header",children:(0,E.jsxs)(ns,{spread:!0,align:"regions"===o?null:"end",children:["regions"===o&&(0,E.jsx)(e_.A,{overlay:(0,E.jsx)(uK,{regionStore:e}),placement:"bottomLeft",children:(0,E.jsxs)(Qe.Sl,{name:"sort",onClick:e=>e.preventDefault(),children:[(0,E.jsx)(Qe.Sl,{name:"sort-icon",children:(0,E.jsx)(dK,{sortKey:e.sort})})," ",`Sorted by ${e.sort[0].toUpperCase()}${e.sort.slice(1)}`]})}),(0,E.jsx)(ns,{size:"small",align:"end",children:r.length>0?(0,E.jsx)(Qe.Sl,{name:"visibility",tag:Qa,size:"small",type:"link",style:{padding:0},onClick:t=>{t.preventDefault(),t.stopPropagation(),e.toggleVisibility()},mod:{hidden:e.isAllHidden},children:e.isAllHidden?(0,E.jsx)(pc,{}):(0,E.jsx)(oc,{})}):null})]})}):null,(0,E.jsxs)(hK,{value:o,children:[(0,E.jsx)(Qe.Sl,{name:"regions",case:"regions",children:i?(0,E.jsx)(oK,{regionStore:e}):(0,E.jsx)(Qe.Sl,{name:"empty",children:"No Regions created yet"})}),(0,E.jsx)(Qe.Sl,{name:"labels",case:"labels",children:i?(0,E.jsx)(lK,{regionStore:e}):(0,E.jsx)(Qe.Sl,{name:"empty",children:"No Labeled Regions created yet"})})]})]})}));var jK=n(98065),kK=n(91846),OK=n(37142),RK=n(29961),EK=n(88841);const _K="block--U6qY7",AK="button--XQcyF",TK="labels--aLxIm",PK="statesblk--aVJvV",IK="row--BJ8uf",LK="long--bEvKZ",MK={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"},KK=({className:e,style:t,size:n,color:r,solid:o=!1,children:i})=>{const a=((e,t)=>{const n=Ct()(e);return t?{color:Ct().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=MK[s])?l:s:MK.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,E.jsx)(Qe.eB,{tag:"span",name:"tag",mod:{size:n},mix:e,style:d,children:i})},{Paragraph:DK,Text:NK}=AE.A,VK=e=>{return e.type.endsWith("labels")?null!=(n=(t=e).selectedLabels)&&n.length?(0,E.jsxs)(NK,{className:TK,children:["Labels: ",t.selectedLabels.map((e=>{const t=e.background||"#000000";return(0,E.jsx)(KK,{color:t,solid:!0,children:e.value},e.id)}))]},t.pid):null:"rating"===e.type?(0,E.jsxs)(DK,{children:["Rating: ",e.mainValue]}):"textarea"!==e.type||e.from_name.perregion&&e.from_name.displaymode===mt.REGION_LIST?"choices"===e.type?(0,E.jsxs)(DK,{children:["Choices: ",e.mainValue.join(", ")]}):null:(0,E.jsxs)(DK,{className:IK,children:[(0,E.jsx)(NK,{children:"Text: "}),(0,E.jsx)(NK,{mark:!0,className:LK,children:e.mainValue.join("\n")})]});var t,n},zK=(0,v.PA)((({store:e,annotation:t})=>{var n;const{highlightedNode:r,selectedRegions:o,selectionSize:i}=t,[a,s]=m.useState(!1),l=[],c=!!o.find((e=>!e.isReadOnly())),d=!!o.find((e=>!e.isReadOnly()&&!e.classification)),u=window.HTX_DEBUG?TO:LO;d&&(l.push((0,E.jsx)(kr.Tooltip,{placement:"topLeft",name:"region:relation",children:(0,E.jsxs)(Qa,{"aria-label":"Create Relation",className:AK,onClick:()=>{t.startLinkingMode(F,r)},disabled:!r,children:[(0,E.jsx)(kK.A,{}),e.settings.enableHotkeys&&e.settings.enableTooltips&&(0,E.jsx)(gr,{children:"[ alt + r ]"})]})},"relations")),l.push((0,E.jsx)(hr,{placement:"topLeft",title:"Add Meta Information",children:(0,E.jsx)(Qa,{className:AK,onClick:()=>{s(!0)},disabled:!r,children:(0,E.jsx)(OK.A,{})})},"meta"))),l.push((0,E.jsx)(kr.Tooltip,{placement:"topLeft",name:"region:unselect",children:(0,E.jsxs)(Qa,{className:AK,type:"dashed",onClick:()=>{t.unselectAll()},children:[(0,E.jsx)(RK.A,{}),(0,E.jsx)(kr.Hint,{name:"region:unselect"})]})},"unselect"));const h=(0,Qe.cn)("entity-states").toClassName(),g=(0,Qe.cn)("entity-buttons").toClassName();return(0,E.jsxs)(Qe.eB,{name:"entity",children:[(0,E.jsxs)(Qe.Sl,{name:"info",tag:ns,spread:!0,children:[(0,E.jsx)(Qe.Sl,{name:"node",children:r?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(u,{node:r})," (ID: ",r.id,")"]}):`${i} Region${i>1?"s are":" is"} selected`}),!c&&(0,E.jsx)(QM.A,{count:"readonly",style:{backgroundColor:"#ccc"}})]}),(0,E.jsxs)("div",{className:`${PK} ${h}`,children:[(null==r?void 0:r.score)&&(0,E.jsx)(m.Fragment,{children:(0,E.jsxs)(NK,{children:["Score: ",(0,E.jsx)(NK,{underline:!0,children:r.score})]})}),(null==r||null==(n=r.meta)?void 0:n.text)&&(0,E.jsxs)(NK,{children:["Meta: ",(0,E.jsx)(NK,{code:!0,children:r.meta.text})," ",(0,E.jsx)(EK.A,{type:"delete",style:{cursor:"pointer"},onClick:()=>{r.deleteMetaText()}})]}),(0,E.jsx)(m.Fragment,{children:null==r?void 0:r.results.map(VK)})]}),(null==r?void 0:r.isDrawing)&&(0,E.jsxs)(Qe.Sl,{name:"warning",children:[(0,E.jsx)(qd,{}),(0,E.jsxs)(Qe.Sl,{name:"warning-text",children:["Incomplete ",r.type.replace("region","")]})]}),(0,E.jsx)("div",{className:`${_K} ${g}`,children:(0,E.jsxs)(ns,{spread:!0,children:[(0,E.jsx)(ns,{children:l}),c&&(0,E.jsx)(kr.Tooltip,{placement:"topLeft",name:"region:delete",children:(0,E.jsxs)(Qa,{look:"danger",className:AK,onClick:()=>{t.deleteSelectedRegions()},children:[(0,E.jsx)(EK.A,{}),(0,E.jsx)(kr.Hint,{name:"region:delete"})]})})]})}),a&&(0,E.jsxs)(jK.A,{style:{marginTop:"0.5em",marginBottom:"0.5em"},onFinish:()=>{r.setMetaText(r.normInput),s(!1)},children:[(0,E.jsx)(OM.A,{autoFocus:!0,onChange:e=>{const{value:t}=e.target;r.setNormInput(t)},style:{marginBottom:"0.5em"},placeholder:"Meta Information"}),(0,E.jsx)(Qa,{type:"primary",htmlType:"submit",style:{marginRight:"0.5em"},children:"Add"}),(0,E.jsx)(Qa,{type:"danger",htmlType:"reset",onClick:e=>(s(!1),e.preventDefault(),!1),children:"Cancel"})]})]})}));var BK=n(79834),HK=n(37720),FK=n(72992),WK=n(74383);const $K={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 UK=n(38451),ZK=n(9099);const{Option:GK}=er.A,YK=(0,v.PA)((({rl:e})=>{const t=e.relations,n=t.getSelected().map((e=>e.value));return(0,E.jsxs)("div",{style:{marginTop:"10px"},children:[(0,E.jsx)("h4",{className:$K.header,children:"LABELS"}),(0,E.jsx)(er.A,{mode:"multiple"===t.choice?"multiple":"",style:{width:"100%"},placeholder:"Please select",defaultValue:n,onChange:e=>{const n=(0,x.wrapArray)(e);t.unselectAll(),n.forEach((e=>t.findRelation(e).setSelected(!0)))},children:t.children.map((e=>(0,E.jsx)(GK,{style:{background:e.background},children:e.value},e.value)))})]})})),XK=(0,v.PA)((({rl:e})=>{if(!(0,u.aF)((()=>e.node1))||!(0,u.aF)((()=>e.node2)))return null;const t={left:(0,E.jsx)(BK.A,{}),right:(0,E.jsx)(HK.A,{}),bi:(0,E.jsx)(FK.A,{})};return(0,E.jsx)("div",{children:(0,E.jsxs)("div",{className:$K.section__blocks,children:[(0,E.jsx)("div",{children:(0,E.jsx)(LO,{node:e.node1})}),(0,E.jsx)(Tr.A,{onClick:()=>e.rotateDirection(),size:"small",className:$K.relationbtn,children:t[e.direction]}),(0,E.jsx)("div",{children:(0,E.jsx)(LO,{node:e.node2})})]})})})),qK=(0,v.PA)((({item:e})=>{const t=(0,u.Zn)(e).annotationStore.selected.highlightedNode,n=t===e.node1||t===e.node2;return(0,E.jsxs)(eK.Ay.Item,{className:n&&$K.selected,actions:[],onMouseEnter:()=>{e.toggleHighlight(),e.setSelfHighlight(!0)},onMouseLeave:()=>{e.toggleHighlight(),e.setSelfHighlight(!1)},children:[(0,E.jsxs)("div",{className:$K.item,children:[(0,E.jsx)("div",{children:(0,E.jsx)(XK,{rl:e})}),(0,E.jsxs)("div",{children:[e.hasRelations&&(0,E.jsx)(Tr.A,{size:"small",onClick:()=>{e.toggleMeta()},className:$K.button,children:(0,E.jsx)(WK.A,{})})," ",(0,E.jsx)(Tr.A,{size:"small",className:$K.button,onClick:()=>(e.node1.setHighlight(!1),e.node2.setHighlight(!1),e.parent.deleteRelation(e),!1),danger:!0,children:(0,E.jsx)(EK.A,{})})]})]}),e.showMeta&&(0,E.jsx)(YK,{rl:e})]},e.id)})),JK=(0,v.PA)((({store:e})=>{const t=e.annotationStore.selected,{relations:n}=t.relationStore,r=n.length>0,o=t.relationStore.showConnections;return(0,E.jsxs)(Qe.eB,{name:"relations",children:[(0,E.jsxs)(Qe.Sl,{name:"header",children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:["Relations (",n.length,")"]}),r&&(0,E.jsx)(Tr.A,{size:"small",type:"link",icon:o?(0,E.jsx)(UK.A,{}):(0,E.jsx)(ZK.A,{}),onClick:()=>t.relationStore.toggleConnections(),className:[o?$K.uihidden:$K.uivisible,Xn]})]}),(0,E.jsx)(Qe.Sl,{name:"content",children:r?(0,E.jsx)(eK.Ay,{size:"small",bordered:!0,itemLayout:"vertical",className:$K.list,dataSource:t.relationStore.relations,renderItem:e=>(0,E.jsx)(qK,{item:e})}):(0,E.jsx)("p",{children:"No Relations added yet"})})]})})),QK=JK;var eD,tD=["title","titleId"];function nD(){return nD=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var oD=function(e,t){var n=e.title,r=e.titleId,o=rD(e,tD);return m.createElement("svg",nD({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?m.createElement("title",{id:r},n):null,eD||(eD=m.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"})))},iD=(0,m.forwardRef)(oD);n.p;function aD(...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 sD=["ref","actionRef","onChange","onInput","onSubmit","value","autoSize","rows","maxRows","className"],lD=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,nr.A)(e,sD);const h=!!i,g=[(0,Qe.cn)("textarea").mod({inline:h,autosize:s}),d].join(" ").trim(),p=(0,m.useRef)({rows:l,maxRows:Math.max(c-1,1),lineHeight:24,maxHeight:Number.POSITIVE_INFINITY}),f=(0,m.useRef)(null),v=(0,m.useCallback)((0,MC.debounce)((()=>{const e=f.current;if(!e||!p.current||!f.current)return;if(p.current.maxHeight===Number.POSITIVE_INFINITY){e.style.height="auto";const t=f.current.value;f.current.value="",p.current.lineHeight=f.current.scrollHeight/p.current.rows,p.current.maxHeight=p.current.lineHeight*p.current.maxRows,f.current.value=t}let t;e.scrollHeight>p.current.maxHeight?(e.style.overflowY="scroll",t=p.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,m.useCallback)((e=>{null==o||o(e.target.value),v()}),[o]),b=(0,m.useCallback)((e=>{null==r||r(e.target.value),v()}),[r]);return(0,m.useEffect)((()=>{const e=new ResizeObserver(v);return e.observe(f.current),()=>{f.current&&e.unobserve(f.current)}}),[]),(0,m.useEffect)((()=>{f.current&&(f.current.value=a||"",v())}),[a]),(0,m.useEffect)((()=>{if(!i)return;const e=e=>{f.current&&"Enter"===e.key&&(e.ctrlKey||(0,x.isMacOS)()&&e.metaKey)&&i(f.current.value)};return f.current&&f.current.addEventListener("keydown",e),()=>{f.current&&f.current.removeEventListener("keydown",e)}}),[i]),(0,E.jsx)("textarea",Object.assign({ref:aD(f,t),className:g,rows:p.current.rows,onChange:b,onInput:y},u))},cD=(0,v.PA)((({commentStore:e,annotationStore:t,inline:n=!0,onChange:r,rows:o=1,maxRows:i=4})=>{const a=(0,m.useRef)(null),s=(0,m.useRef)({}),l=()=>e.setTooltipMessage(""),c=(0,m.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,m.useCallback)((t=>{e.setCurrentComment(t||"")}),[e]);(0,m.useEffect)((()=>((0,k.VS)(k.bA)||(e.setAddedCommentThisSession(!1),l()),()=>l())),[]),(0,m.useEffect)((()=>{var t;(0,k.VS)(k.bA)&&(e.tooltipMessage&&(null==(t=s.current)||null==(t=t.el)||null==(t=t.current)||t.focus({preventScroll:!0})))}),[e.tooltipMessage]),(0,m.useEffect)((()=>{e.setInputRef(s.current.el),e.setCommentFormSubmit((()=>c()))}),[s,e]);const u=e.currentComment[t.selected.id]||"";return(0,E.jsxs)(Qe.eB,{ref:a,tag:"form",name:"comment-form",mod:{inline:n},onSubmit:c,children:[(0,E.jsx)(lD,{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,E.jsx)(Qe.Sl,{tag:"div",name:"primary-action",children:(0,E.jsx)("button",{type:"submit",children:(0,E.jsx)(iD,{})})}),e.tooltipMessage&&(0,E.jsx)(Qe.Sl,{name:"tooltipMessage",children:e.tooltipMessage})]})})),dD=(0,v.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,E.jsx)(Qe.eB,{name:"labels-list",children:n.map(((e,t)=>{const n=e.background||"#000000";return[t?", ":null,(0,E.jsx)(Qe.Sl,{style:{color:n},children:e.value||"No label"},e.id)]}))})}return t.includes("tool")?e.value:void 0})),uD=({linking:e,region:t,result:n,onUnlink:r,interactive:o})=>{const i=e||t,a=(0,m.useMemo)((()=>e?{action:!0}:t?{display:!0}:void 0),[e,t]);return i?(0,E.jsxs)(Qe.eB,{tag:"div",name:"link-state",mod:a,children:[(0,E.jsx)(Qe.Sl,{tag:"div",name:"prefix",children:(0,E.jsx)(cC,{})}),(null==a?void 0:a.action)&&"Select an object to link it to this comment.",(null==a?void 0:a.display)&&(0,E.jsx)(hD,{region:t,result:n,onUnlink:r,interactive:o})]}):null},hD=(0,v.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,m.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,m.useMemo)((()=>{const e=Ct()(null!=i?i:"#666").alpha(1);return{"--icon-color":e.css(),"--text-color":e.css()}}),[i]);return(0,E.jsxs)(Qe.eB,{name:"link-state-region",mod:{interactive:n},style:d,onMouseEnter:s,onMouseLeave:l,onClick:c,children:[!a&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"icon",children:(0,E.jsx)(IO,{node:e})}),(0,E.jsx)(Qe.Sl,{name:"index",children:e.region_index})]}),t?(0,E.jsx)(Qe.Sl,{name:"title",children:(0,E.jsx)(gD,{result:t})}):(0,E.jsxs)(Qe.Sl,{name:"title",children:[(0,E.jsx)(Qe.Sl,{name:"label",children:(0,E.jsx)(dD,{item:e})}),(null==e?void 0:e.text)&&(0,E.jsx)(Qe.Sl,{name:"text",children:e.text.replace(/\\n/g,"\n")})]}),r&&(0,E.jsx)(Qe.Sl,{name:"close",children:(0,E.jsx)(Tr.A,{size:"small",type:"text",icon:(0,E.jsx)(ad,{}),onClick:r})})]})})),gD=(0,v.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(": ")})),mD=({region:e,linking:t,onLinkTo:n})=>(0,E.jsx)(Qe.eB,{name:"comment-form-buttons",children:(0,E.jsxs)(Qe.Sl,{name:"buttons",children:[n&&!e&&(0,E.jsx)(hr,{title:"Link to...",mouseEnterDelay:.8,children:(0,E.jsx)(Qe.Sl,{name:"action",tag:"button",mod:{highlight:t},onClick:n,children:(0,E.jsx)(cC,{})})}),(0,E.jsx)(Qe.Sl,{name:"action",tag:"button",type:"submit",children:(0,E.jsx)(iD,{})})]})}),pD=(0,v.PA)((({commentStore:e,annotationStore:t,inline:n=!0})=>{var r;const o=(0,m.useRef)(null),i=(0,m.useRef)({}),a=()=>e.setTooltipMessage(""),s=t.selected&&t.selected.linkingMode===W,[l,c]=(0,m.useState)(),d=(0,m.useCallback)(((t=!0)=>{let n=e.commentInProgress;return!n&&t&&(n=oP.create({text:""},{annotationStore:e.annotationStore}),e.setCurrentComment(n)),n}),[e]),u=(0,m.useCallback)((e=>{d().setText(e)}),[e,t]),h=(0,m.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,m.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,m.useEffect)((()=>((0,k.VS)(k.bA)||(e.setAddedCommentThisSession(!1),a()),()=>a())),[]),(0,m.useEffect)((()=>{var t;(0,k.VS)(k.bA)&&(e.tooltipMessage&&(null==(t=i.current)||null==(t=t.el)||null==(t=t.current)||t.focus({preventScroll:!0})))}),[e.tooltipMessage]),(0,m.useEffect)((()=>{var t;e.setInputRef(null==(t=i.current)?void 0:t.el),e.setCommentFormSubmit((()=>g()))}),[i,e]);const p=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&&p===l&&s,S=C||x,j=(0,m.useMemo)((()=>{var e;return QT(null==b||null==(e=b.default)?void 0:e.values)}),[b]),O=e.commentClassificationsItems,R=(0,m.useCallback)((e=>{d().setClassifications(e)}),[d]),_=(0,m.useCallback)((async(e,t)=>{const n=t.length>0?{default:{type:"taxonomy",values:t}}:null;R(n)}),[R]);return(0,E.jsxs)(Qe.eB,{ref:o,tag:"form",name:"comment-form-new",mod:{inline:n,linked:!!x},onSubmit:g,children:[(0,E.jsxs)(Qe.Sl,{name:"text-row",children:[(0,E.jsx)(lD,{actionRef:i,name:"comment",placeholder:"Add a comment",value:v,rows:1,maxRows:4,onInput:u,onSubmit:n?g:void 0,onBlur:a}),0===O.length&&(0,E.jsx)(mD,{region:x,linking:C,onLinkTo:h})]}),O.length>0&&(0,E.jsxs)(Qe.Sl,{name:"classifications-row",children:[(0,E.jsx)(Qe.Sl,{name:"category-selector",children:(0,E.jsx)(SI,{selected:j,items:O,onChange:_,options:eP,defaultSearch:!1})}),(0,E.jsx)(mD,{region:x,linking:C,onLinkTo:h})]}),S&&(0,E.jsx)(Qe.Sl,{name:"link-state",children:(0,E.jsx)(uD,{linking:C,region:x,result:w,onUnlink:null==f?void 0:f.unsetLink})}),e.tooltipMessage&&(0,E.jsx)(Qe.Sl,{name:"tooltipMessage",children:e.tooltipMessage})]})})),fD=(0,v.PA)((({value:e="",inline:t=!0,onChange:n,onSubmit:r,onBlur:o,rows:i=1,maxRows:a=4,classifications:s})=>{const l=(0,m.useRef)(null),c=(0,m.useRef)({}),d=(0,m.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,m.useCallback)((e=>{null==n||n(e||"")}),[n]);return(0,E.jsxs)(Qe.eB,{ref:l,tag:"form",name:"comment-form",mod:{inline:t},onSubmit:d,children:[(0,E.jsx)(lD,{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,E.jsx)(Qe.Sl,{tag:"div",name:"primary-action",children:(0,E.jsx)("button",{type:"submit",children:(0,E.jsx)(iD,{})})})]})})),vD=(0,v.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:p},listComments:f})=>{var v;const y=null==(v=window.APP_SETTINGS)?void 0:v.user,b=(null==y?void 0:y.id)===a.id,[w,C]=(0,m.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,E.jsx)(Qe.Sl,{name:"date",children:(0,E.jsx)(VM.A,{placement:"topRight",title:new Date(a).toLocaleString(),children:`${i?"updated":""} ${(0,x.humanDateDiff)(a)}`})}):null};return(0,E.jsxs)(Qe.eB,{name:"comment-item",mod:{resolved:l},children:[(0,E.jsxs)(ns,{spread:!0,size:"medium",truncated:!0,children:[(0,E.jsxs)(ns,{size:"small",truncated:!0,children:[(0,E.jsx)(Qe.Sl,{tag:HM,user:a,name:"userpic",showUsername:!0,username:a}),(0,E.jsx)(Qe.Sl,{name:"name",tag:"span",children:(0,x.userDisplayName)(a)})]}),(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{name:"resolved",component:Cu}),(0,E.jsx)(Qe.Sl,{name:"saving",mod:{hide:o},children:(0,E.jsx)(Qe.Sl,{name:"dot"})}),(0,E.jsx)(S,{})]})]}),(0,E.jsxs)(Qe.Sl,{name:"content",children:[(0,E.jsx)(Qe.Sl,{name:"text",children:t?(0,E.jsx)(fD,{value:w,onSubmit:async e=>{await c(e),C(e),await f({suppressClearComments:!0})}}):n?(0,E.jsxs)(Qe.Sl,{name:"confirmForm",children:[(0,E.jsx)(Qe.Sl,{name:"question",children:"Are you sure?"}),(0,E.jsxs)(Qe.Sl,{name:"controls",children:[(0,E.jsx)(Qa,{onClick:()=>d(),size:"compact",look:"danger",autoFocus:!0,children:"Yes"}),(0,E.jsx)(Qa,{onClick:()=>u(!1),size:"compact",children:"No"})]})]}):(0,E.jsx)(E.Fragment,{children:w})}),(0,E.jsx)(Qe.Sl,{name:"actions",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:o&&(b||p)&&(0,E.jsx)(J_.Trigger,{content:(0,E.jsxs)(xT,{size:"auto",children:[(0,E.jsx)(xT.Item,{onClick:g,children:l?"Unresolve":"Resolve"}),b&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(xT.Item,{onClick:()=>{const e=!t;h(e),e||C(s)},children:t?"Cancel edit":"Edit"}),!n&&(0,E.jsx)(xT.Item,{onClick:()=>{u(!0)},children:"Delete"})]})]}),children:(0,E.jsx)(Qa,{size:"small",type:"text",icon:(0,E.jsx)($d,{})})})})]})]})})),yD=(0,v.PA)((({commentStore:e})=>(0,E.jsx)(Qe.eB,{name:"comments-list",children:e.comments.map((t=>(0,E.jsx)(vD,{comment:t,listComments:e.listComments},t.id)))}))),bD=(0,v.PA)((({comment:e,listComments:t,classificationsItems:n})=>{var r,o,i,a;const{classifications:s,updatedAt:l,isEditMode:c,isConfirmDelete:d,createdAt:u,isPersisted:h,isDeleted:g,createdBy:p,text:f,regionRef:v,isResolved:y,updateComment:b,deleteComment:w,setConfirmMode:C,setClassifications:S,setEditMode:j,toggleResolve:k,canResolveAny:O,isHighlighted:R,setHighlighted:_,_commentRef:A}=e,{startLinkingMode:T,currentComment:P,globalLinking:I}=(0,m.useContext)(xD),L=null==(r=window.APP_SETTINGS)?void 0:r.user,M=(null==L?void 0:L.id)===p.id,K=null==(o=e.commentsStore)||null==(o=o.store)?void 0:o.hasInterface("annotations:hide-info"),D=K?{email:M?"Me":"User"}:null,[N,V]=(0,m.useState)(f),[z,B]=(0,m.useState)(),H=null==v?void 0:v.region,F=null==v?void 0:v.result,W=!(!z||P!==z||!I),$=W||H,U=(0,m.useCallback)((e=>{B(e),T(e)}),[T]),Z=(0,m.useCallback)((()=>{null!=v&&v.region?e.unsetLink():U(e)}),[e,U,null==v?void 0:v.region]),G=(0,m.useCallback)((async(e,t)=>{const n=t.length>0?{default:{type:"taxonomy",values:t}}:null;S(n)}),[S]),Y=(0,m.useMemo)((()=>{var e;return QT(null==s||null==(e=s.default)?void 0:e.values)}),[s]),X=(0,m.useCallback)((async e=>{await b(e,s),V(e),await t({suppressClearComments:!0})}),[b,t,s]);if(g)return null;const q=()=>{const e=new Date(l),t=new Date(u);e.setMilliseconds(0),t.setMilliseconds(0);const n=e>t,r=n?l:u;return h&&r?(0,E.jsx)(Qe.Sl,{name:"date",children:(0,E.jsx)(VM.A,{placement:"topRight",title:new Date(r).toLocaleString(),children:`${n?"updated":""} ${(0,x.humanDateDiff)(r)}`})}):null};return(0,E.jsxs)(Qe.eB,{name:"comment-item",mod:{resolved:y,highlighted:R},onMouseEnter:()=>{_(!0)},onMouseLeave:()=>{_(!1)},ref:A,children:[(0,E.jsxs)(ns,{spread:!0,size:"medium",truncated:!0,children:[(0,E.jsxs)(ns,{size:"small",truncated:!0,children:[(0,E.jsx)(Qe.Sl,{tag:HM,user:null!=D?D:p,name:"userpic",showUsername:!0,username:p}),(0,E.jsx)(Qe.Sl,{name:"name",tag:"span",children:(0,x.userDisplayName)(null!=D?D:p)})]}),(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{name:"resolved",component:Cu}),(0,E.jsx)(Qe.Sl,{name:"saving",mod:{hide:h},children:(0,E.jsx)(Qe.Sl,{name:"dot"})}),!K&&(0,E.jsx)(q,{})]})]}),(0,E.jsxs)(Qe.Sl,{name:"content",children:[(0,E.jsx)(Qe.Sl,{name:"text",children:c?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(fD,{value:N,onSubmit:X,classifications:s}),n.length>0&&(0,E.jsx)(Qe.Sl,{name:"classifications-row",children:(0,E.jsx)(SI,{selected:Y,items:n,onChange:G,options:eP,defaultSearch:!1})})]}):d?(0,E.jsxs)(Qe.Sl,{name:"confirmForm",children:[(0,E.jsx)(Qe.Sl,{name:"question",children:"Are you sure?"}),(0,E.jsxs)(Qe.Sl,{name:"controls",children:[(0,E.jsx)(Qa,{onClick:()=>w(),size:"compact",look:"danger",autoFocus:!0,children:"Yes"}),(0,E.jsx)(Qa,{onClick:()=>C(!1),size:"compact",children:"No"})]})]}):(0,E.jsxs)(E.Fragment,{children:[(null==s||null==(i=s.default)||null==(i=i.values)?void 0:i.length)>0&&(0,E.jsx)(Qe.Sl,{name:"classifications",tag:"ul",children:null==s||null==(a=s.default)||null==(a=a.values)?void 0:a.map(((e,t)=>(0,E.jsx)("li",{children:e.join("/")},t)))}),N,$&&(0,E.jsx)(Qe.Sl,{name:"linkState",children:(0,E.jsx)(uD,{linking:W,region:H,result:F,interactive:!0})})]})}),(0,E.jsx)(Qe.Sl,{name:"actions",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:h&&(M||O)&&(0,E.jsx)(J_.Trigger,{content:(0,E.jsxs)(xT,{size:"auto",children:[(0,E.jsx)(xT.Item,{onClick:k,children:y?"Unresolve":"Resolve"}),M&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(xT.Item,{onClick:()=>{const e=!c;j(e),e||V(f)},children:c?"Cancel edit":"Edit"}),(0,E.jsx)(xT.Item,{onClick:Z,children:null!=v&&v.region?"Unlink":"Link to..."}),!d&&(0,E.jsx)(xT.Item,{onClick:()=>{C(!0)},children:"Delete"})]})]}),children:(0,E.jsx)(Qa,{size:"small",type:"text",icon:(0,E.jsx)($d,{})})})})]})]})})),xD=(0,m.createContext)({startLinkingMode:()=>{},globalLinking:!1,currentComment:null}),wD=(0,v.PA)((({commentStore:e})=>{var t,n;const r=(0,m.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,m.useMemo)((()=>({startLinkingMode:r,currentComment:i,globalLinking:o})),[r,i,o]);return(0,E.jsx)(xD.Provider,{value:a,children:(0,E.jsx)(CD,{commentStore:e})})})),CD=(0,v.PA)((({commentStore:e})=>(0,E.jsx)(Qe.eB,{name:"comments-list",children:e.comments.map((t=>(0,E.jsx)(bD,{comment:t,listComments:e.listComments,classificationsItems:e.commentClassificationsItems},t.id)))}))),SD=(0,k.VS)(k.v1),jD=SD?pD:cD,kD=SD?wD:yD,OD=(0,v.PA)((({annotationStore:e,commentStore:t,cacheKey:n})=>{const r=D();return(0,m.useEffect)((()=>{(async()=>{const e={mounted:r};SD&&(e.suppressClearComments=t.isRelevantList),await t.listComments(e),(0,k.VS)(k.K3)||t.restoreCommentsFromCache(n)})()}),[t.annotation.id]),(0,m.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,E.jsxs)(Qe.eB,{name:"comments",children:[(0,E.jsx)(jD,{commentStore:t,annotationStore:e,inline:!0}),(0,E.jsx)(kD,{commentStore:t})]})})),RD=(0,v.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,E.jsxs)(E.Fragment,{children:[e.hasInterface("annotations:current")&&(0,E.jsx)(XM,{entity:n.selected,showControls:e.hasInterface("controls"),canDelete:e.hasInterface("annotations:delete"),showHistory:e.hasInterface("annotations:history"),showGroundTruth:e.hasInterface("ground-truth")}),o?(0,E.jsx)(zK,{store:e,annotation:r}):i?(0,E.jsx)("p",{style:{marginTop:12,marginBottom:0,paddingInline:15},children:"No Region selected"}):null,i&&(0,E.jsx)(SK,{store:e,annotation:r,regionStore:r.regionStore}),i&&(0,E.jsx)(QK,{store:e,item:r}),e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,E.jsxs)(Qe.eB,{name:"comments-section",children:[(0,E.jsx)(Qe.Sl,{name:"header",children:(0,E.jsx)(Qe.Sl,{name:"title",children:"Comments"})}),(0,E.jsx)(Qe.Sl,{name:"content",children:(0,E.jsx)(OD,{annotationStore:n,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})]})]})})),ED=(0,v.PA)((({entity:e})=>{const{history:t}=e;return(0,E.jsxs)(Qe.eB,{name:"history-buttons",children:[(0,E.jsx)(hr,{title:"Undo",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",type:"text","aria-label":"Undo",disabled:!(null!=t&&t.canUndo),onClick:()=>e.undo(),icon:(0,E.jsx)(hs,{})})}),(0,E.jsx)(hr,{title:"Redo",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",type:"text","aria-label":"Redo",disabled:!(null!=t&&t.canRedo),onClick:()=>e.redo(),icon:(0,E.jsx)(bs,{})})}),(0,E.jsx)(hr,{title:"Reset",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",type:"text","aria-label":"Reset",disabled:!(null!=t&&t.canUndo),onClick:()=>null==t?void 0:t.reset(),icon:(0,E.jsx)(ks,{})})})]})})),_D=(0,v.WQ)("store")((0,v.PA)((({store:e})=>{const t=e.hasInterface("auto-annotation")&&!e.forceAutoAnnotation;return(0,m.useEffect)((()=>{t||e.setAutoAnnotation(!1)}),[t]),t?(0,E.jsx)(Qe.eB,{name:"dynamic-preannotations",children:(0,E.jsx)(Qe.Sl,{name:"wrapper",children:(0,E.jsx)(ns,{spread:!0,children:(0,E.jsx)(hA,{checked:e.autoAnnotation,onChange:t=>{const n=t.target.checked;e.setAutoAnnotation(n),n||OR.allInstances().forEach((e=>e.selectDefault()))},label:"Auto-Annotation",style:{color:"#7F64FF"}})})})}):null}))),AD=(0,v.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}})),TD=AD((0,v.PA)((({store:e,annotation:t,suggestions:n})=>{if(!e.autoAnnotation)return null;const r=t.hasSuggestionsSupport&&!e.forceAutoAcceptSuggestions,o=e.awaitingSuggestions;return(0,E.jsxs)(Qe.eB,{name:"auto-accept",children:[r&&(0,E.jsx)(Qe.Sl,{name:"wrapper",mod:{loading:o},children:(0,E.jsx)(ns,{spread:!0,children:n.size>0?(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsxs)(Qe.Sl,{name:"info",children:[n.size," suggestion",n.size>0&&"s"]}),(0,E.jsx)(Qe.Sl,{name:"action",tag:Qa,mod:{type:"reject"},onClick:()=>t.rejectAllSuggestions(),children:(0,E.jsx)(Eu,{})}),(0,E.jsx)(Qe.Sl,{name:"action",tag:Qa,mod:{type:"accept"},onClick:()=>t.acceptAllSuggestions(),children:(0,E.jsx)(Cu,{})})]}):(0,E.jsx)(hA,{checked:e.autoAcceptSuggestions,onChange:t=>e.setAutoAcceptSuggestions(t.target.checked),label:"Auto-Accept Suggestions",style:{color:"#7F64FF"}})})}),o&&(0,E.jsx)(Qe.Sl,{name:"spinner"})]})}))),{Block:PD,Elem:ID}=(0,Qe.JE)(),LD=(0,v.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,E.jsx)(PD,{name:"ground-truth",mod:{disabled:t,size:n},children:(0,E.jsx)(hr,{placement:"topLeft",title:r,children:(0,E.jsx)(ID,{tag:Qa,name:"toggle",size:"small",type:"link",onClick:t=>{t.preventDefault(),e.setGroundTruth(!e.ground_truth)},children:(0,E.jsx)(ID,{name:"indicator",tag:(0,k.VS)(k.bA)&&!e.ground_truth?Wl:Nl,mod:{active:e.ground_truth,dark:(0,k.VS)(k.bA)}})})})})})),MD=({store:e})=>{const t=e.annotationStore,n=t.selected,r="prediction"===(null==n?void 0:n.type),o=!0===t.viewingAll;return(0,E.jsxs)(Qe.Sl,{name:"section",children:[!r&&!o&&e.hasInterface("edit-history")&&(0,E.jsx)(ED,{entity:n}),e.description&&e.hasInterface("instruction")&&(0,E.jsx)(hr,{placement:"topLeft",title:"Show instructions",children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(Rp,{style:{width:20,height:20}}),type:"text","aria-label":"Instructions",onClick:()=>e.toggleDescription(),style:{height:36,width:36,padding:0}})}),(0,E.jsx)(hr,{placement:"topLeft",title:"Settings",children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(Pl,{}),type:"text","aria-label":"Settings",onClick:()=>e.toggleSettings(),style:{height:36,width:36,padding:0}})}),e.hasInterface("ground-truth")&&(0,E.jsx)(LD,{entity:n}),!o&&(0,E.jsxs)(Qe.Sl,{name:"section",children:[(0,E.jsx)(_D,{}),(0,E.jsx)(TD,{})]})]})};function KD(e){const t=(0,v.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 DD=KD((0,v.PA)((({store:e,title:t,children:n})=>(0,E.jsx)(hr,{title:t,enabled:e.settings.enableTooltips,mouseEnterDelay:.8,children:n})))),ND=(0,m.memo)((0,v.PA)((({disabled:e,history:t,store:n})=>(0,E.jsx)(DD,{title:"Accept annotation: [ Ctrl+Enter ]",children:(0,E.jsx)(Qa,{"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")))),VD={id:"reject",name:"reject",title:"Reject",look:void 0,ariaLabel:"reject-annotation",tooltip:"Reject annotation: [ Ctrl+Space ]",disabled:!1},zD=(0,m.memo)((0,v.PA)((({disabled:e,store:t,onSkipWithComment:n})=>(0,E.jsx)(DD,{title:"Cancel (skip) task: [ Ctrl+Space ]",children:(0,E.jsx)(Qa,{"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")))),BD=(0,m.memo)((0,v.PA)((({disabled:e,store:t})=>(0,E.jsx)(DD,{title:"Cancel skip: []",children:(0,E.jsx)(Qa,{"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")))),HD=(0,v.PA)((({button:e,disabled:t,onClick:n})=>{var r;const o=e.disabled||t?"disabled":e.look;return(0,E.jsx)(DD,{title:null!=(r=e.tooltip)?r:"",children:(0,E.jsx)(Qa,{"aria-label":e.ariaLabel,disabled:e.disabled||t,look:o,onClick:n,children:e.title})})})),FD=KD((0,v.PA)((({store:e,history:t,annotation:n})=>{const r=e.hasInterface("review")||n.canBeReviewed,o=e.hasInterface("topbar:prevnext"),i=(0,x.isDefined)(e.annotationStore.selectedHistory),{userGenerate:a,sentUserGenerate:s,versions:l,results:c,editable:d}=n,u=(0,Qe.cn)("dropdown").elem("trigger").toClassName(),h=e.customButtons,g=[],[p,f]=(0,m.useState)(!1),v=!d||e.isSubmitting||i||p,y=e.hasInterface("annotations:deny-empty")&&0===c.length,b=(0,m.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(p)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,p]),w=h.get("_before"),C=h.get("_replace"),S=null!=C?C:w;if(S){const n=(0,x.toArray)(S);for(const r of n)"string"==typeof r?"accept"===r&&g.push((0,E.jsx)(ND,{disabled:v,history:t,store:e})):g.push((0,E.jsx)(HD,{disabled:v,button:r,onClick:()=>null==e.handleCustomButton?void 0:e.handleCustomButton(r.name)},r.name))}if(C);else if(r){const n=(0,x.toArray)(h.get("reject")),r=n.length>0,o=VD;(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,E.jsx)(HD,{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,E.jsx)(ND,{disabled:v,history:t,store:e}))}else if(n.skipped)g.push((0,E.jsxs)(Qe.Sl,{name:"skipped-info",children:[(0,E.jsx)(Jl,{color:"#d00"})," Was skipped"]},"skipped")),g.push((0,E.jsx)(BD,{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,E.jsx)(zD,{disabled:v,store:e,onSkipWithComment:t}))}const r=v||y,i=r?"disabled":"primary",c=!r&&o,d=({isUpdate:t,onClickMethod:n})=>(0,E.jsx)(Qa,{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,E.jsx)(DD,{title:t,children:(0,E.jsx)(Qe.Sl,{name:"tooltip-wrapper",children:(0,E.jsx)(Qa,{"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,E.jsx)(J_.Trigger,{alignment:"top-right",content:(0,E.jsx)(d,{onClickMethod:e.submitAnnotation,isUpdate:!1}),children:(0,E.jsx)("div",{children:(0,E.jsx)(wc,{})})}):void 0,children:"Submit"})})},"submit"))}if(a&&s||!a&&e.hasInterface("update")){const o=Boolean((0,k.VS)(k.I8)||s||l.result),a=(0,k.VS)(k.I8)&&!t.canUndo&&!n.draftId,h=r||a,m=(0,E.jsx)(DD,{title:a?"No changes were made":"Update this task: [ Ctrl+Enter ]",children:(0,E.jsx)(Qa,{"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,E.jsx)(J_.Trigger,{alignment:"top-right",content:(0,E.jsx)(d,{onClickMethod:e.updateAnnotation,isUpdate:o}),children:(0,E.jsx)("div",{children:(0,E.jsx)(wc,{})})}):void 0,children:o?"Update":"Submit"})},"update");g.push(m)}}return(0,E.jsx)(Qe.eB,{name:"controls",children:g})}))),WD=(0,v.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,E.jsxs)(Qe.eB,{name:"bottombar",style:{borderTop:(0,k.VS)(k.bA)&&"1px solid rgba(0,0,0,0.1)"},children:[(0,E.jsx)(Qe.Sl,{name:"group",children:(0,E.jsx)(MD,{store:e})}),(0,E.jsx)(Qe.Sl,{name:"group",children:e.hasInterface("controls")&&(e.hasInterface("review")||!r)&&(0,E.jsx)(Qe.Sl,{name:"section",mod:{flat:!0},children:(0,E.jsx)(FD,{annotation:n})})})]}):null})),$D=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},UD=(0,v.PA)((({store:e})=>{const t=(0,m.useRef)(),n=(0,m.useRef)(),r=(0,m.useRef)(),o=(0,m.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,m.useCallback)((()=>{const t=r.current;if(!t)return;const n=e.annotationStore.selected,o=[$D(n)];t.value=JSON.stringify(o,null,2)}),[]),a=(0,m.useCallback)((()=>{const t=r.current;if(!t)return;const{annotations:n,predictions:o}=e.annotationStore,i=[...n,...o].map($D);t.value=JSON.stringify(i,null,2)}),[]);return(0,E.jsxs)("div",{style:{width:"100%"},children:[(0,E.jsx)("br",{}),(0,E.jsx)("h2",{children:"Debug"}),(0,E.jsxs)("div",{children:[(0,E.jsx)(Tr.A,{onClick:a,children:"↓ Serialize All Annotations"}),(0,E.jsx)(Tr.A,{onClick:i,children:"↓ Serialize Current Annotation"}),(0,E.jsx)(Tr.A,{onClick:o,children:"↑ Simulate Loading Task"})]}),(0,E.jsx)(jK.A,{children:(0,E.jsxs)("div",{style:{display:"flex"},children:[(0,E.jsxs)("div",{style:{flexBasis:"50%"},children:[(0,E.jsx)("p",{children:"Data"}),(0,E.jsx)("textarea",{style:{width:"100%"},ref:n,rows:4,defaultValue:e.task.data,className:"is-search"}),(0,E.jsx)("p",{children:"Config"}),(0,E.jsx)("textarea",{style:{width:"100%"},ref:t,rows:16,defaultValue:e.config,className:"is-search"})]}),(0,E.jsxs)("div",{style:{flexBasis:"50%"},children:[(0,E.jsx)("p",{children:"Annotations"}),(0,E.jsx)("textarea",{style:{width:"100%"},ref:r,rows:22,className:"is-search"})]})]})})]})}));var ZD=n(18869),GD=n(83764);const YD="grid--e4IWo",XD="container--CXRH5",qD="left--_1fAk",JD="right--LGT3p",QD=(0,v.PA)((0,m.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,u=e.store.hasInterface("annotations:hide-info");return(0,E.jsx)(Qe.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,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{name:"userpic",tag:HM,showUsername:!0,username:i?e.createdBy:null,user:u?{}:null!=(l=e.user)?l:{email:e.createdBy},mod:{prediction:i},children:i&&(0,E.jsx)($s,{style:{width:16,height:16}})}),!u&&(0,E.jsxs)(Qe.Sl,{name:"identifier",children:["ID ",null!=(c=e.pk)?c:e.id," ",d&&"*"]}),a&&e.ground_truth&&(0,E.jsx)(Qe.Sl,{name:"ground-truth",tag:Nl}),e.skipped&&(0,E.jsx)(Qe.Sl,{name:"skipped",tag:Jl})]})})})));class eN extends m.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,d.lB)(e,"isReady",(()=>{n(),t()}))}))))).then((()=>{setTimeout(this.props.onFinish,32)}))}render(){return(0,E.jsx)(KM,{root:this.props.root,annotation:this.props.annotation})}}class tN extends m.Component{constructor(...e){super(...e),this.state={item:0,loaded:new Set},this.container=m.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),kt.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,Ae.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,k.VS)(k.cE)||this.props.annotations[0]===this.props.store.selected||this.startRenderCycle()}startRenderCycle(){this.renderNext(0)}renderNext(e){this.setState({item:(0,x.isDefined)(e)?e:this.state.item+1},(()=>{this.state.item!e.hidden)).map((e=>(0,E.jsxs)("div",{id:`c-${e.id}`,style:{position:"relative"},children:[(0,E.jsx)(QD,{entity:e,onClick:()=>this.select(e),prediction:"prediction"===e.type,bordered:!1,style:{height:44}}),(0,k.VS)(k.cE)?(0,E.jsx)(KM,{root:this.props.root,annotation:e}):!this.state.loaded.has(e.id)&&(0,E.jsx)("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,E.jsx)(f.A,{size:"large"})})]},`anno-${e.id}`))),r&&(0,E.jsxs)("div",{id:"c-tmp",style:{opacity:0,position:"relative",right:99999},children:[(0,E.jsx)(QD,{entity:n,prediction:"prediction"===n.type,bordered:!1,style:{height:44}}),(0,E.jsx)(eN,{root:this.props.root,onFinish:this.onFinish,annotation:n},e)]},"anno-tmp")]}),(0,E.jsx)(Tr.A,{type:"text",onClick:this.left,className:qD,icon:(0,E.jsx)(ZD.A,{})}),(0,E.jsx)(Tr.A,{type:"text",onClick:this.right,className:JD,icon:(0,E.jsx)(GD.A,{})})]})}}const nN=({title:e,children:t,visible:n,onCancel:r})=>{const o={padding:"0 24px 24px",whiteSpace:"pre-wrap"};return(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)(wn.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,E.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,E.jsx)("p",{style:o,dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(t)}}):(0,E.jsx)("p",{style:o,children:t})]})})};var rN=n(19686);const oN=["relation","startNode","endNode","visible"],iN=["tags","taskData"],aN=({id:e,color:t})=>(0,E.jsx)("marker",{id:`arrow-${e}`,viewBox:"0 0 10 10",refX:8,refY:5,markerWidth:4,markerHeight:4,orient:"auto-start-reverse",children:(0,E.jsx)("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:t})}),sN=({x:e,y:t,width:n,height:r})=>(0,E.jsx)("rect",{x:e,y:t,width:n,height:r,fill:"none"}),lN=({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,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("defs",{children:(0,E.jsx)(aN,{id:e,color:i})}),o&&(0,E.jsx)("path",Object.assign({},a,{stroke:n,opacity:.1,strokeWidth:6})),(0,E.jsx)("path",Object.assign({},a,{opacity:o?1:.6,strokeWidth:2},s))]})},cN=({label:e,position:t})=>{const[n,r]=t,o=(0,m.useRef)(),[i,a]=(0,m.useState)({width:0,height:0,x:0,y:0}),s={transform:`translate(${n}, ${r})`,textAnchor:"middle",dominantBaseline:"middle"};return(0,m.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,E.jsxs)("g",Object.assign({},s,{children:[(0,E.jsx)("rect",Object.assign({},i,{stroke:"#fff",strokeWidth:2,fill:"#a0a",rx:"3"})),(0,E.jsx)("text",Object.assign({ref:o},{fill:"white",style:{fontSize:12,fontFamily:"arial"}},{children:e}))]}))},dN=({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,m.useState)(),h=de({id:e,startNode:t,endNode:n,direction:r,labels:s},c),{start:g,end:p}=ue(Object.assign({root:c},h)),[f,v]=he(g,p);return(0,m.useEffect)((()=>(h.onChange((()=>u({}))),()=>h.destroy())),[]),g.width<1||g.height<1||p.width<1||p.height<1?null:(0,E.jsxs)("g",{opacity:a&&!i?.5:1,visibility:d?"hidden":"visible",children:[(0,E.jsx)(sN,Object.assign({},g)),(0,E.jsx)(sN,Object.assign({},p)),(0,E.jsx)(lN,{id:h.id,command:f,color:h.color,direction:h.direction,highlight:i}),h.label&&(0,E.jsx)(cN,{label:h.label,position:v})]})},uN=(0,v.PA)((e=>{let{relation:t,startNode:n,endNode:r,visible:o}=e,i=(0,nr.A)(e,oN);const a=[n.getRegionElement?n.getRegionElement():n,r.getRegionElement?r.getRegionElement():r],[s,l]=(0,m.useState)(a[0]&&a[1]);(0,m.useEffect)((()=>{let e;const t=()=>{const n=(0,x.isDefined)(a[0])&&(0,x.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,E.jsx)(dN,Object.assign({id:t.id,startNode:n,endNode:r,direction:t.direction,visible:c,labels:t.selectedValues},i)):null}));class hN extends m.PureComponent{constructor(...e){super(...e),this.rootNode=(0,m.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,E.jsx)(rN.Ay,{onResize:this.onResize,children:()=>(0,E.jsxs)("svg",{className:"relations-overlay",ref:this.rootNode,xmlns:"http://www.w3.org/2000/svg",style:o,children:[(0,E.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,E.jsx)(uN,{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 gN=(0,v.PA)(hN),mN=(0,v.PA)((0,m.forwardRef)((({store:e,tags:t},n)=>{var r;const{relations:o,showConnections:i,highlighted:a}=e;return(0,E.jsx)(gN,{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 pN=null;const fN=(e,t)=>{if(clearTimeout(pN),(0,k.VS)(k.cE)){if(![...e.values()].every(u._n))return!1}else if(!(0,u._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||(pN=setTimeout((()=>{fN(e,t)}),100))},vN=(0,v.PA)((0,m.forwardRef)(((e,t)=>{let{tags:n,taskData:r}=e,o=(0,nr.A)(e,iN);const[i,a]=(0,m.useState)(!1);return(0,m.useEffect)((()=>(fN(n,(e=>{a(e)})),()=>clearTimeout(pN))),[r,n]),i&&(0,E.jsx)(mN,Object.assign({ref:t},o))}))),yN="block--sSl0y";class bN extends m.Component{componentDidMount(){const{annotation:e}=this.props;e&&e.updateObjects()}render(){let e=yN;return this.props.className&&(e=`${e} ${this.props.className}`),(0,E.jsx)("div",{className:e,children:this.props.children})}}bN.propTypes={children:Ee.PropTypes.array.isRequired};var xN=n(23091),wN=n(54710);const CN={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}},SN={videoDrawOutside:{description:"Allow drawing outside of video boundaries",defaultValue:!1,type:"boolean",ff:k.PR},videoHopSize:{description:"Video hop size",defaultValue:10,type:"number"}},jN=(0,v.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,E.jsx)(Qe.Sl,{name:"field",children:"boolean"===n.type?(0,E.jsx)(wN.S,Object.assign({},r,{children:n.description})):(0,E.jsxs)("label",{children:[n.description,(0,E.jsx)(OM.A,Object.assign({},r))]})},t)})),kN=(0,v.PA)((({store:e,settings:t})=>(0,E.jsx)(Qe.eB,{name:"settings",children:Object.entries(t).map((([t,n])=>n.ff&&!(0,k.VS)(n.ff)?null:(0,E.jsx)(jN,{name:t,store:e,value:n},t)))}))),ON=({store:e})=>(0,E.jsx)(kN,{store:e,settings:SN});ON.displayName="VideoSettings",ON.tagName="Video",ON.title="Video";const RN=(0,Zj.PA)(ON),EN=(0,k.VS)(k.bA)?{newUI:!0}:{},_N=Object.keys(CN);if((0,k.VS)(k.bA)){const e=_N.findIndex((e=>"enableTooltips"===e)),t=_N.findIndex((e=>"enableLabelTooltips"===e)),n=_N[e];_N[e]=_N[t],_N[t]=n}const AN=({children:e})=>(0,E.jsx)(Qe.eB,{name:"settings-tag",children:e}),TN=(0,v.PA)((({store:e})=>(0,E.jsx)(Qe.eB,{name:"settings",mod:EN,children:_N.map(((t,n)=>{var r;return(0,E.jsx)(Qe.Sl,{name:"field",tag:"label",children:(0,k.VS)(k.bA)?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(Qe.eB,{name:"settings__label",children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:[CN[t].newUI.title,null==(r=CN[t].newUI.tags)?void 0:r.split(",").map((e=>(0,E.jsx)(AN,{children:e},e)))]}),(0,E.jsx)(Qe.eB,{name:"description",children:CN[t].newUI.description})]}),(0,E.jsx)(hA,{checked:e.settings[t],onChange:e.settings[CN[t].onChangeEvent],description:CN[t].description},n)]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(wN.S,{checked:e.settings[t],onChange:e.settings[CN[t].onChangeEvent],children:CN[t].description},n),(0,E.jsx)("br",{})]})},n)}))}))),PN=(0,v.PA)((({store:e})=>(0,E.jsxs)(Qe.eB,{name:"settings",mod:EN,children:[(0,E.jsx)(Qe.Sl,{name:"field",children:(0,E.jsx)(wN.S,{checked:e.settings.bottomSidePanel,onChange:()=>{e.settings.toggleBottomSP(),setTimeout(x.triggerResizeEvent)},children:"Move sidepanel to the bottom"})}),(0,E.jsx)(Qe.Sl,{name:"field",children:(0,E.jsx)(wN.S,{checked:e.settings.displayLabelsByDefault,onChange:e.settings.toggleSidepanelModel,children:"Display Labels by default in Results panel"})}),(0,E.jsx)(Qe.Sl,{name:"field",children:(0,E.jsx)(wN.S,{value:"Show Annotations panel",defaultChecked:e.settings.showAnnotationsPanel,onChange:()=>{e.settings.toggleAnnotationsPanel()},children:"Show Annotations panel"})}),(0,E.jsx)(Qe.Sl,{name:"field",children:(0,E.jsx)(wN.S,{value:"Show Predictions panel",defaultChecked:e.settings.showPredictionsPanel,onChange:()=>{e.settings.togglePredictionsPanel()},children:"Show Predictions panel"})})]}))),IN={General:{name:"General",component:TN},Hotkeys:{name:"Hotkeys",component:()=>{const e=[{title:"Shortcut",dataIndex:"combo",key:"combo"},{title:"Description",dataIndex:"descr",key:"descr"}],t=kr.namespaces();return(0,E.jsx)(Qe.eB,{name:"keys",children:(0,E.jsx)(xN.A,{size:"small",children:Object.entries(t).map((([t,n])=>{var r,o;return 0===Object.keys(n.descriptions).length?null:(0,E.jsx)(xN.A.TabPane,{tab:null!=(r=n.description)?r:t,children:(0,E.jsx)(zA.A,{columns:e,dataSource:(o=n.descriptions,Object.keys(o).filter((e=>o[e])).map((e=>({key:e,combo:e.split(",").map((e=>(0,E.jsx)(Qe.Sl,{name:"key-group",children:e.trim().split("+").map((e=>(0,E.jsx)(Qe.Sl,{tag:"kbd",name:"key",children:e},e)))},e))),descr:o[e]})))),size:"small"})},t)}))})})}}};(0,k.VS)(k.bA)||(IN.Layout={name:"Layout",component:PN});const LN=Object.keys(IN)[0],MN=(0,k.VS)(k.bA)?{name:"settings-modal",title:"Labeling Interface Settings",closeIcon:(0,E.jsx)(ad,{})}:{name:"settings-modal-old",title:"Settings",bodyStyle:{paddingTop:"0"}},KN=(0,v.PA)((({store:e})=>{const t=(0,m.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,E.jsx)(Qe.eB,Object.assign({tag:wn.A,visible:e.showingSettings,onCancel:e.toggleSettings,footer:""},MN,{children:(0,E.jsxs)(xN.A,{defaultActiveKey:LN,children:[Object.entries(IN).map((([t,{name:n,component:r}])=>(0,E.jsx)(xN.A.TabPane,{tab:n,children:m.createElement(r,{store:e})},t))),t.map((t=>(0,E.jsx)(xN.A.TabPane,{tab:t.title,children:(0,E.jsx)(t,{store:e})},t.tagName)))]})}))})),DN=({children:e})=>(0,E.jsx)(Qe.eB,{name:"sidebar-tabs",children:(0,E.jsx)(Qe.Sl,{name:"content",children:e})}),NN=(e,t=[])=>{(0,m.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)},VN=320,zN=300,BN=500,HN=24,FN=["top-left","top-right","bottom-left","bottom-right","top","bottom","right","left"],WN=({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:p,zIndex:f,tooltip:v,locked:y=!1,positioning:b=!1,onSnap:w,onResize:C,onResizeStart:S,onResizeEnd:j,onVisibilityChange:k,onPositionChange:O,onPositionChangeBegin:R,children:_})=>{const A=(0,m.useRef)(),T=(0,m.useRef)(),P=(0,m.useRef)(),I=(0,m.useRef)({onResize:C,onResizeStart:S,onResizeEnd:j,onPositionChange:O,onPositionChangeBegin:R,onVisibilityChange:k,onSnap:w}),[L,M]=(0,m.useState)(),K=(0,m.useCallback)((t=>{t.stopPropagation(),t.preventDefault(),null==k||k(e,!1)}),[k]),D=(0,m.useCallback)((()=>{null==k||k(e,!0)}),[k]),N=(0,m.useMemo)((()=>{const e=s?{height:l&&null!=a?a:"100%",width:d?"100%":null!=o?o:VN}:{width:l?null!=o?o:VN:"100%",height:l?26:void 0};return Object.assign({},e,{zIndex:f})}),[o,a,s,l,d,f]),V=(0,m.useMemo)((()=>l&&!y?{top:`${g}%`,left:`${p}%`}:{}),[l,g,p,y]),z=(0,m.useMemo)((()=>({detached:!y&&l,resizing:(0,x.isDefined)(L),hidden:!s,alignment:l?"left":null!=c?c:"left",disabled:y})),[c,s,l,L,y]),B=(0,m.useMemo)((()=>l?s?(0,E.jsx)(vw,{}):(0,E.jsx)(Sw,{}):"left"===c?s?(0,E.jsx)(yy,{}):(0,E.jsx)(Ay,{}):"right"===c?s?(0,E.jsx)(Ay,{}):(0,E.jsx)(yy,{}):null),[l,s,c]),H=(0,m.useMemo)((()=>`${s?"Collapse":"Expand"} ${v}`),[s,v]);return(0,m.useEffect)((()=>{Object.assign(I.current,{onResize:C,onResizeStart:S,onResizeEnd:j,onPositionChangeBegin:R,onPositionChange:O,onVisibilityChange:k,onSnap:w})}),[C,S,j,O,k,R,w]),NN({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]),NN({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,x.isDefined)(d)&&["left","top-left"].includes(d),f=(0,x.isDefined)(d)&&["top","top-left"].includes(d),v=(0,x.clamp)(p?o-g:o+g,VN,a),y=(0,x.clamp)(f?i-m:i+m,zN,s+i),b=f?s+(i-y):s,w=p?l+(o-v):l;I.current.onResize(e,v,y,b,w)}},onMouseUp(){null==I.current.onResizeEnd||I.current.onResizeEnd(),M(void 0)}},[I,l,o,i,a,u,h,s,y,b]),(0,E.jsxs)(Qe.eB,{ref:T,name:"panel",mix:e,mod:z,style:Object.assign({},N,V),children:[(0,E.jsxs)(Qe.Sl,{name:"content",children:[!y&&(0,E.jsxs)(Qe.Sl,{ref:A,name:"header",onClick:l?void 0:D,children:[(s||l)&&(0,E.jsx)(Qe.Sl,{name:"title",children:r}),(0,E.jsx)(Qe.Sl,{name:"toggle",mod:{enabled:s},onClick:l&&!s?D:K,"data-tooltip":H,children:B})]}),s&&(0,E.jsx)(Qe.Sl,{name:"body",children:(0,E.jsx)(Qe.eB,{name:e,mix:t,children:_})})]}),s&&!b&&!y&&(0,E.jsx)(Qe.Sl,{name:"resizers",ref:P,mod:{locked:b||y},children:FN.map((e=>("left"===e||"right"===e)&&c!==e||l||l?(0,E.jsx)(Qe.Sl,{name:"resizer",mod:{drag:e===L},"data-resize":e},e):null))})]})},$N={container:"container--d7fgb",labelText:"labelText--ZGgO7",input:"input--HLuCD"},UN=["label","value","onChange","region","min","max"],ZN=(0,v.PA)((({region:e})=>{const{start:t,end:n}=e.ranges[0],r=e.object.length;return(0,E.jsxs)("div",{className:$N.container,children:[(0,E.jsx)(GN,{label:"Start frame",value:t,onChange:t=>{+t!==e.ranges[0].start&&e.setRanges([+t,e.ranges[0].end])},region:e,min:1,max:n}),(0,E.jsx)(GN,{label:"End frame",value:n,onChange:t=>{+t!==e.ranges[0].end&&e.setRanges([e.ranges[0].start,+t])},region:e,min:t,max:r}),(0,E.jsx)(GN,{label:"Duration",value:n-t+1,region:e})]})})),GN=e=>{let{label:t,value:n,onChange:r,min:o,max:i}=e,a=(0,nr.A)(e,UN);const s=!r,l=e=>{let t=+e.target.value;o&&t<+o&&(e.target.value=o,t=+o),i&&t>+i&&(e.target.value=i,t=+i),null==r||r(t)};return(0,E.jsxs)("label",{className:$N.label,children:[(0,E.jsx)("span",{className:$N.labelText,children:t}),(0,E.jsx)("input",Object.assign({className:$N.input,type:"number",step:1,readOnly:s,onBlur:l,onClick:l,onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()},[s?"value":"defaultValue"]:n,min:o,max:i},a))]})},YN=["onChange","type","value","step"],XN=e=>{const t=(e=>{if((0,u.fn)(e)){const t=e.getSubTypes();return(0,u.Cb)(t)?t.name:null}return(0,u.Cb)(e)?e.name:null})(e);return"number"===t?"number":"text"},qN={angle:mb},JN=({region:e})=>{var t;const n=null!=(t=e.editableFields)?t:[];return(0,E.jsx)(Qe.Sl,{name:"wrapper",children:e.editorEnabled&&n.map(((t,n)=>(0,E.jsx)(eV,{property:t.property,label:t.label,region:e},`${t.property}-${n}`)))})},QN=({region:e})=>{var t;return(0,E.jsx)(Qe.Sl,{name:"wrapper-time-control",children:(0,E.jsx)(kC,{startTime:e.start,endTime:e.end,minTime:0,maxTime:null==e||null==(t=e._ws_region)?void 0:t.duration,isSidepanel:!0,onChangeStartTime:t=>{e.setProperty("start",t)},onChangeEndTime:t=>{e.setProperty("end",t)},showLabels:!0,showDuration:!0})})},eV=({property:e,label:t,region:n})=>{const r=(0,Qe.KE)(),[o,i]=(0,m.useState)(n.getProperty(e)),a=(0,m.useMemo)((()=>n.getPropertyType(e)),[n,e]),s=(0,m.useMemo)((()=>(0,u.Cb)(a)),[a]),l=(0,m.useMemo)((()=>{if(s)return null;let e=null;if((0,u.CK)(a)){const t=(0,u.fn)(a)?a.getSubTypes().getSubTypes():a.getSubTypes();e=t.some((e=>(0,u.aw)(e)||(0,u.Cb)(e)))?t.map((e=>e.value)):null}return e}),[a,s]),c=(0,m.useMemo)((()=>{if(!s)return!1;return((0,u.fn)(a)?a.getSubTypes():a)===u.gK.boolean}),[a,s]),h=(0,m.useCallback)((t=>{if(t!==n.getProperty(e))try{n.setProperty(e,t)}catch(e){console.error(e)}}),[a,c]);return(0,m.useEffect)((()=>{const t=(0,d.lB)(n,e,(({newValue:e,oldValue:t})=>{t.storedValue!==e.storedValue&&i(e.storedValue)}));return()=>t()}),[n]),(0,E.jsxs)(Qe.Sl,{name:"property",tag:"label",children:[c?(0,E.jsx)(wN.S,{className:null==r?void 0:r.elem("input").toClassName(),checked:o,onChange:e=>h(e.target.checked)}):s?(0,E.jsx)(tV,{type:XN(a),step:"0.01",value:o,onChange:e=>h(Number(e))}):l?(0,E.jsx)("select",{value:o,onChange:e=>h(e.target.value),className:null==r?void 0:r.elem("select").toClassName(),children:l.map(((e,t)=>(0,E.jsx)("option",{value:e,children:e},`${e}-${t}`)))}):null,(0,E.jsx)(nV,{label:t})]})},tV=e=>{let{onChange:t,type:n,value:r,step:o}=e,i=(0,nr.A)(e,YN);const a=(0,Qe.KE)(),[s,l]=(0,m.useState)(r),c=(0,m.useCallback)(((e,n=!0)=>{const r=e;l(r),n&&(null==t||t(r))}),[t,n]),d=(0,m.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,m.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,m.useEffect)((()=>{c(r)}),[r]),(0,E.jsx)("input",Object.assign({},i,{className:null==a?void 0:a.elem("input").toClassName(),type:"text",step:o,onChange:d,onKeyDown:u,value:s}))},nV=({label:e})=>{const t=(0,m.useMemo)((()=>{if(e.startsWith("icon:")){var t;const n=e.split(":")[1];return null!=(t=qN[n])?t:null}return null}),[e]);return(0,E.jsx)(Qe.Sl,{name:"text",tag:"span",children:t?(0,E.jsx)(t,{}):e})},rV=(0,v.PA)((({region:e})=>{const t=(0,k.VS)(k.vS)&&"audioregion"===e.type,n="timelineregion"===e.type?ZN:t?QN:JN;return(0,E.jsx)(Qe.eB,{name:"region-editor",mod:{disabled:e.isReadOnly()},children:(0,E.jsx)(n,{region:e})})})),{Text:oV}=AE.A,iV=(0,v.PA)((({mainValue:e})=>(0,E.jsx)(oV,{mark:!0,children:e.map(((e,t)=>(0,E.jsx)("p",{"data-counter":t+1,children:e},`${e}-${t}`)))}))),aV=(0,v.PA)((({mainValue:e})=>(0,E.jsx)(oV,{mark:!0,children:e.join(", ")}))),sV=(0,v.PA)((({mainValue:e})=>(0,E.jsx)("span",{children:e}))),lV=(0,v.PA)((({result:e})=>{const{type:t,mainValue:n}=e,r=(0,m.useMemo)((()=>"rating"===t?(0,E.jsxs)(Qe.Sl,{name:"result",children:[(0,E.jsx)(oV,{children:"Rating: "}),(0,E.jsx)(Qe.Sl,{name:"value",children:(0,E.jsx)(sV,{mainValue:n})})]}):"textarea"===t?(0,E.jsxs)(Qe.Sl,{name:"result",children:[(0,E.jsx)(oV,{children:"Text: "}),(0,E.jsx)(Qe.Sl,{name:"value",children:(0,E.jsx)(iV,{mainValue:n})})]}):"choices"===t?(0,E.jsxs)(Qe.Sl,{name:"result",children:[(0,E.jsx)(oV,{children:"Choices: "}),(0,E.jsx)(Qe.Sl,{name:"value",children:(0,E.jsx)(aV,{mainValue:n})})]}):"taxonomy"===t?(0,E.jsxs)(Qe.Sl,{name:"result",children:[(0,E.jsx)(oV,{children:"Taxonomy: "}),(0,E.jsx)(Qe.Sl,{name:"value",children:(0,E.jsx)(aV,{mainValue:n.map((e=>e.join("/")))})})]}):void 0),[t,n]);return r?(0,E.jsx)(Qe.eB,{name:"region-meta",children:r}):null})),cV=(0,v.PA)((({region:e})=>(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(Qe.Sl,{name:"result",children:[(null==e?void 0:e.results).map((e=>(0,E.jsx)(lV,{result:e},e.pid))),null!=e&&e.text?(0,E.jsx)(Qe.eB,{name:"region-meta",children:(0,E.jsx)(Qe.Sl,{name:"item",children:(0,E.jsx)(Qe.Sl,{name:"content",mod:{type:"text"},children:e.text.replace(/\\n/g,"\n")})})}):null]}),(0,E.jsx)(rV,{region:e})]}))),dV=(0,v.PA)((({region:e,editMode:t,cancelEditMode:n,enterEditMode:r})=>{var o,i;const a=(0,Qe.KE)(),s=(0,m.useRef)(),l=t=>{e.setMetaText(t),e.setNormInput(t)};return(0,m.useEffect)((()=>{if(t&&s.current){const{current:e}=s;e.focus(),e.setSelectionRange(e.value.length,e.value.length)}}),[t]),(0,E.jsx)(E.Fragment,{children:t?(0,E.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,E.jsx)(Qe.Sl,{name:"meta-text",onClick:()=>null==r?void 0:r(),children:null==(i=e.meta)?void 0:i.text})})})),uV=["children","onClick"],hV=e=>{var t;let{children:n,onClick:r}=e,o=(0,nr.A)(e,uV);return(0,E.jsx)(Qa,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}))},gV=(0,v.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,k.VS)(k.bA)){const t=Object.assign({},a,{display:e.isReadOnly()||r?void 0:"none"});return(0,E.jsx)(hV,{disabled:c,onClick:s,hotkey:o,look:i,style:t,children:l?(0,E.jsx)(tv,{}):(0,E.jsx)(sv,{})})}return e&&(n||e.isReadOnly()||r)&&(0,E.jsx)(hV,{disabled:c,onClick:s,hotkey:o,look:i,style:a,children:l?(0,E.jsx)(tv,{}):(0,E.jsx)(sv,{})})})),mV=(0,v.PA)((({region:e})=>{const t=e.labelings.map((e=>e.selectedLabels||[])),n=[].concat(...t);return n.length?(0,E.jsx)(Qe.eB,{name:"labels-list",children:n.map(((e,t)=>{const n=e.background||"#000000";return[t?", ":null,(0,E.jsx)("span",{style:{color:n},children:e.value},e.id)]}))}):(0,E.jsx)(Qe.eB,{name:"labels-list",children:"No label"})})),pV=["children"],fV=(0,v.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,m.useState)(!1),h=(0,m.useMemo)((()=>!!c.find((e=>!e.isReadOnly()&&!e.classification))),[c]),g=(0,m.useMemo)((()=>{var t,n;const r=null!=(t=null!=(n=e.background)?n:e.getOneColor())?t:"#666";return Ct()(r).alpha(1)}),[e.background,e.style]);return(0,E.jsxs)(Qe.eB,{name:"detailed-region",mod:{compact:t},children:[(0,E.jsxs)(Qe.Sl,{name:"head",style:{color:g.css()},children:[(0,E.jsxs)(Qe.Sl,{name:"title",children:[(0,E.jsx)(Qe.Sl,{name:"icon",children:(0,E.jsx)(IO,{node:e})}),(0,E.jsx)(mV,{region:e})]}),r&&(0,E.jsx)("span",{children:e.cleanId})]}),o&&(0,E.jsx)(Qe.Sl,{name:"content",children:(0,E.jsx)(o,{region:e})}),e.isDrawing&&(0,E.jsxs)(Qe.Sl,{name:"warning",children:[(0,E.jsx)(qd,{}),(0,E.jsxs)(Qe.Sl,{name:"warning-text",children:["Incomplete ",null!=(a=null==(s=e.type)?void 0:s.replace("region",""))?a:"region"]})]}),n&&(0,E.jsx)(vV,{region:e,editMode:d,annotation:l,hasEditableRegions:h,onEditModeChange:u}),i&&(0,E.jsx)(Qe.Sl,{name:"content",children:(0,E.jsx)(i,{region:e,editMode:d,enterEditMode:()=>u(!0),cancelEditMode:()=>u(!1)})})]})})),vV=(0,v.PA)((({region:e,annotation:t,editMode:n,onEditModeChange:r})=>{const o=[];return o.push((0,E.jsx)(yV,{icon:(0,E.jsx)(lf,{}),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,E.jsx)(yV,{icon:(0,E.jsx)(mf,{}),primary:n,onClick:()=>r(!n),hotkey:"region:meta","aria-label":"Edit region's meta"},"meta")),(0,E.jsxs)(Qe.eB,{name:"region-actions",children:[(0,E.jsx)(Qe.Sl,{name:"group",mod:{align:"left"},children:!e.isReadOnly()&&o}),(0,E.jsxs)(Qe.Sl,{name:"group",mod:{align:"right"},children:[(0,E.jsx)(gV,{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,E.jsx)(yV,{icon:e.hidden?(0,E.jsx)(Fi,{}):(0,E.jsx)(Di,{}),onClick:e.toggleHidden}),(0,E.jsx)(yV,{danger:!0,disabled:e.isReadOnly(),icon:(0,E.jsx)(Ps,{}),onClick:()=>t.deleteRegion(e)})]})]})})),yV=e=>{let{children:t}=e,n=(0,nr.A)(e,pV);return(0,E.jsx)(Qa,Object.assign({},n,{look:"alt",style:{padding:0},children:t}))},bV=(0,v.PA)((({relations:e})=>(0,E.jsx)(E.Fragment,{children:e.map(((e,t)=>(0,E.jsx)(xV,{relation:e},t)))}))),xV=(0,v.PA)((({relation:e})=>{const[t,n]=(0,m.useState)(!1),r=(0,m.useCallback)((()=>{e.node1&&e.node2&&(n(!0),e.toggleHighlight(),e.setSelfHighlight(!0))}),[]),o=(0,m.useCallback)((()=>{e.node1&&e.node2&&(n(!1),e.toggleHighlight(),e.setSelfHighlight(!1))}),[]),i=(0,m.useMemo)((()=>{const{direction:t}=e;switch(t){case"left":return(0,E.jsx)(Jy,{"data-direction":e.direction});case"right":return(0,E.jsx)(Wy,{"data-direction":e.direction});case"bi":return(0,E.jsx)(ab,{"data-direction":e.direction});default:return null}}),[e.direction]);return(0,E.jsxs)(Qe.Sl,{name:"item",mod:{hidden:!e.visible},onMouseEnter:r,onMouseLeave:o,children:[(0,E.jsxs)(Qe.Sl,{name:"content",children:[(0,E.jsx)(Qe.Sl,{name:"icon",onClick:e.rotateDirection,children:(0,E.jsx)(Qe.Sl,{name:"direction",children:i})}),(0,E.jsxs)(Qe.Sl,{name:"nodes",children:[(0,E.jsx)(fV,{compact:!0,withActions:!1,withIds:!1,region:e.node1}),(0,E.jsx)(fV,{compact:!0,withActions:!1,withIds:!1,region:e.node2})]}),(0,E.jsxs)(Qe.Sl,{name:"actions",children:[(0,E.jsx)(Qe.Sl,{name:"action",children:(t||e.showMeta)&&e.hasRelations&&(0,E.jsx)(Qa,{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,E.jsx)(Lf,{})})}),(0,E.jsx)(Qe.Sl,{name:"action",children:(t||!e.visible)&&(0,E.jsx)(Qa,{type:"text",onClick:e.toggleVisibility,"aria-label":(e.visible?"Hide":"Show")+" Relation",children:e.visible?(0,E.jsx)(Di,{}):(0,E.jsx)(Fi,{})})}),(0,E.jsx)(Qe.Sl,{name:"action",children:t&&(0,E.jsx)(Qa,{type:"text",danger:!0,"aria-label":"Delete Relation",onClick:()=>{e.node1.setHighlight(!1),e.node2.setHighlight(!1),e.parent.deleteRelation(e)},children:(0,E.jsx)(Ps,{})})})]})]}),e.showMeta&&(0,E.jsx)(wV,{relation:e})]})})),wV=(0,v.PA)((({relation:e})=>{const{selectedValues:t,control:n}=e,{children:r,choice:o}=n,i=(0,m.useMemo)((()=>"multiple"===o?"multiple":void 0),[o]),a=(0,m.useCallback)((t=>{const n=(0,x.wrapArray)(t);e.setRelations(n)}),[e]);return(0,E.jsx)(Qe.eB,{name:"relation-meta",children:(0,E.jsx)(er.A,{mode:i,style:{width:"100%"},placeholder:"Select labels",value:t,onChange:a,children:r.map((e=>(0,E.jsx)(er.A.Option,{value:e.value,style:{background:e.background},children:e.value},e.value)))})})})),CV=(0,v.PA)((({relationStore:e})=>{const t=e.orderedRelations;return(0,E.jsx)(Qe.eB,{name:"relations",children:(0,E.jsx)(bV,{relations:t})})})),SV=(0,v.PA)((({relationStore:e})=>{var t;const n=(0,m.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleAllVisibility()}),[e]),r=!(null!=e&&null!=(t=e.relations)&&t.length),o=!(!r&&e.isAllHidden);return(0,E.jsx)(Qe.Sl,{tag:Qa,type:"text",disabled:r,onClick:n,mod:{hidden:o},"aria-label":o?"Show all":"Hide all",icon:o?(0,E.jsx)(Jw,{}):(0,E.jsx)(Bw,{}),tooltip:o?"Show all":"Hide all",tooltipTheme:"dark"})})),jV=(0,v.PA)((({relationStore:e})=>{var t;const n=(0,m.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleOrder()}),[e]),r=!(null!=e&&null!=(t=e.relations)&&t.length),o="asc"===e.order;return(0,E.jsx)(Qe.Sl,{tag:Qa,type:"text",onClick:n,disabled:r,mod:{order:e.order},"aria-label":o?"Order by oldest":"Order by newest",icon:o?(0,E.jsx)(Zv,{}):(0,E.jsx)(ay,{}),tooltip:o?"Order by oldest":"Order by newest",tooltipTheme:"dark"})})),kV=(0,v.PA)((({relationStore:e})=>(0,E.jsxs)(Qe.eB,{name:"relation-controls",children:[(0,E.jsx)(SV,{relationStore:e}),(0,E.jsx)(jV,{relationStore:e})]}))),OV=["currentEntity","regions"],RV=(0,v.PA)((({selection:e,currentEntity:t})=>(0,E.jsx)(E.Fragment,{children:e.size?(0,E.jsx)(IV,{regions:e}):(0,E.jsx)(PV,{currentEntity:t})}))),EV=(0,v.WQ)("store")((0,v.PA)((({store:e})=>(0,E.jsx)(E.Fragment,{children:e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,E.jsx)(Qe.eB,{name:"comments-panel",children:(0,E.jsx)(Qe.Sl,{name:"section-tab",children:(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(OD,{annotationStore:e.annotationStore,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})})})})))),_V=(0,v.WQ)("store")((0,v.PA)((({currentEntity:e})=>{const{relationStore:t}=e;return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(Qe.eB,{name:"relations",children:(0,E.jsxs)(Qe.Sl,{name:"section-tab",children:[(0,E.jsxs)(Qe.Sl,{name:"view-control",children:[(0,E.jsxs)(Qe.Sl,{name:"section-head",children:["Relations (",t.size,")"]}),(0,E.jsx)(kV,{relationStore:t})]}),(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(CV,{relationStore:t})})]})})})}))),AV=(0,v.WQ)("store")((0,v.PA)((({store:e,currentEntity:t})=>{var n;const r=e.hasInterface("annotations:history"),o=(0,k.VS)(k.Lk);return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(Qe.eB,{name:"history",children:o?(0,E.jsxs)(Qe.Sl,{name:"section-tab",children:[(0,E.jsxs)(Qe.Sl,{name:"section-head",children:["Annotation History",(0,E.jsxs)("span",{children:["#",null!=(n=t.pk)?n:t.id]})]}),(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(GM,{inline:!0,showDraft:o,enabled:r})})]}):(0,E.jsx)(NM,{item:t})})})}))),TV=(0,v.WQ)("store")((0,v.PA)((({selection:e})=>(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(Qe.eB,{name:"info",children:(0,E.jsxs)(Qe.Sl,{name:"section-tab",children:[(0,E.jsx)(Qe.Sl,{name:"section-head",children:"Selection Details"}),(0,E.jsx)(IV,{regions:e})]})})})))),PV=(0,v.WQ)("store")((0,v.PA)((({store:e,currentEntity:t})=>{var n;const{relationStore:r}=t,o=e.hasInterface("annotations:history"),i=(0,k.VS)(k.Lk);return(0,E.jsxs)(E.Fragment,{children:[i?(0,E.jsxs)(Qe.Sl,{name:"section",children:[(0,E.jsxs)(Qe.Sl,{name:"section-head",children:["Annotation History",(0,E.jsxs)("span",{children:["#",null!=(n=t.pk)?n:t.id]})]}),(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(GM,{inline:!0,showDraft:i,enabled:o})})]}):(0,E.jsx)(NM,{item:t}),(0,E.jsxs)(Qe.Sl,{name:"section",children:[(0,E.jsxs)(Qe.Sl,{name:"view-control",children:[(0,E.jsxs)(Qe.Sl,{name:"section-head",children:["Relations (",r.size,")"]}),(0,E.jsx)(kV,{relationStore:r})]}),(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(CV,{relationStore:r})})]}),e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,E.jsxs)(Qe.Sl,{name:"section",children:[(0,E.jsx)(Qe.Sl,{name:"section-head",children:"Comments"}),(0,E.jsx)(Qe.Sl,{name:"section-content",children:(0,E.jsx)(OD,{annotationStore:e.annotationStore,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})]})]})})));PV.displayName="GeneralPanel";const IV=(0,v.PA)((({regions:e})=>(0,E.jsx)("div",{children:e.list.map((e=>(0,E.jsx)(LV,{region:e},e.id)))}))),LV=(0,v.PA)((({region:e})=>(0,E.jsx)(fV,{region:e,mainDetails:cV,metaDetails:dV}))),MV=EV,KV=AV,DV=_V,NV=TV,VV=((0,v.PA)((({currentEntity:e,regions:t})=>{const n=t.selection;return(0,E.jsx)(Qe.eB,{name:"details-tab",children:(0,E.jsx)(RV,{selection:n,currentEntity:e})})})),(0,v.PA)((e=>{let{currentEntity:t,regions:n}=e,r=(0,nr.A)(e,OV);const o=n.selection;return(0,E.jsx)(WN,Object.assign({},r,{currentEntity:t,name:"details",title:"Details",children:(0,E.jsx)(RV,{selection:o,currentEntity:t})}))})));var zV,BV=n(99305),HV=["title","titleId"];function FV(){return FV=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var $V=function(e,t){var n=e.title,r=e.titleId,o=WV(e,HV);return m.createElement("svg",FV({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?m.createElement("title",{id:r},n):null,zV||(zV=m.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"})))},UV=(0,m.forwardRef)($V);n.p;const ZV=["item","label","isArea"],{localStorage:GV}=window,YV="collapsed-label-pos",XV=(0,m.createContext)({regions:null}),qV=({entity:e})=>(0,E.jsx)(rz,{node:e}),JV=({isLeaf:e})=>(0,E.jsx)(nz,{isLeaf:e}),QV=(0,v.PA)((({regions:e,regionsTree:t})=>{const n=(0,m.useRef)(),[r,o]=(0,m.useState)(0);let i=(0,m.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,m.useEffect)((()=>()=>{var e;null==(e=i)||e.disconnect(),i=null}),[]);const a=(0,m.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=tz(),l=e.selection.keys,c=(0,Qe.cn)("tree");let d,u;const h=(0,k.VS)(k.TU)&&"label"===e.group;if((0,k.VS)(k.TU)){var g,p,f;const[e,n]=(0,m.useState)(null!=(g=null==(p=GV.getItem(YV))||null==p.split||null==(p=p.split(","))?void 0:p.filter((e=>!!e)))?g:[]),r=e=>{GV.setItem(YV,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,E.jsx)(Qe.eB,Object.assign({name:"outliner-tree"},(0,k.VS)(k.sI)?{ref:a}:{},{children:(!!r||!(0,k.VS)(k.sI))&&(0,E.jsx)(BV.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:qV,switcherIcon:JV},(0,k.VS)(k.sI)?{virtual:!0,itemHeight:34,height:r}:{},s,h?{expandedKeys:d,onExpand:u}:{}),e.group)}))})),ez=({regions:e,rootClass:t,footer:n})=>{const r=(0,m.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=Ct()(null!=u?u:"#666").alpha(1),g={hidden:c,type:l,isDrawing:d},m=(0,E.jsx)(dD,{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,E.jsx)(oz,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},tz=()=>{const e=(0,m.useCallback)(((e,t)=>{const n=t.nativeEvent.ctrlKey||(0,x.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,k.VS)(k.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,m.useRef)(),n=(0,m.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,m.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,m.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,m.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,x.flatten)(e.map((e=>e.groupcancontain.split(",")))),r=(0,x.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}},nz=(0,v.PA)((({isLeaf:e})=>e?null:(0,E.jsx)(UV,{}))),rz=(0,v.PA)((({node:e})=>e?(0,E.jsx)(IO,{node:e}):null)),oz=(0,v.PA)((e=>{var t,n;let{item:r,label:o,isArea:i}=e,a=(0,nr.A)(e,ZV);const s=null==r?void 0:r.highlighted,[l,c]=(0,m.useState)(!1),d=(0,m.useMemo)((()=>{var e;return i&&null!=(e=r.perRegionDescControls)?e:[]}),[null==r?void 0:r.perRegionDescControls,i]),u=(0,m.useMemo)((()=>d.length>0),[d.length]),h=(0,m.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),c(!l)}),[l]);return(0,E.jsxs)(Qe.eB,{name:"outliner-item",children:[(0,E.jsxs)(Qe.Sl,{name:"content",children:[!a.isGroup&&(0,E.jsx)(Qe.Sl,{name:"index",children:a.idx+1}),(0,E.jsxs)(Qe.Sl,{name:"title",children:[o,(null==r?void 0:r.text)&&(0,E.jsx)(Qe.Sl,{name:"text",children:r.text.replace(/\\n/g,"\n")}),(null==r?void 0:r.isDrawing)&&(0,E.jsx)(Qe.Sl,{tag:"span",name:"incomplete",children:(0,E.jsx)(hr,{title:`Incomplete ${null!=(t=null==(n=r.type)?void 0:n.replace("region",""))?t:"region"}`,children:(0,E.jsx)(qd,{})})})]}),(0,E.jsx)(iz,{hovered:s,item:r,entity:a.entity,regions:a.children,type:a.type,collapsed:l,hasControls:u&&i,toggleCollapsed:h})]}),u&&i&&(0,E.jsx)(Qe.Sl,{name:"ocr",children:(0,E.jsx)(az,{item:r,controls:d,collapsed:l,setCollapsed:c,selected:a.selected})})]})})),iz=(0,v.PA)((({hovered:e,item:t,entity:n,collapsed:r,regions:o,hasControls:i,type:a,toggleCollapsed:s})=>{const{regions:l}=(0,m.useContext)(XV),c=(0,m.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,m.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,m.useCallback)((e=>{s(e)}),[s]),h=(0,m.useCallback)((()=>{t.setLocked((e=>!e))}),[]);return(0,E.jsxs)(Qe.Sl,{name:"controls",mod:{withControls:i,newUI:(0,k.VS)(k.bA)},children:[(0,k.VS)(k.bA)?(0,E.jsx)(hr,{title:"Confidence Score",children:(0,E.jsxs)(Qe.Sl,{name:"control-wrapper",children:[(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"predict"},children:"prediction"===(null==t?void 0:t.origin)&&(0,E.jsx)($s,{style:{width:18,height:18}})}),(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"score"},children:(0,x.isDefined)(null==t?void 0:t.score)&&t.score.toFixed(2)})]})}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"score"},children:(0,x.isDefined)(null==t?void 0:t.score)&&t.score.toFixed(2)}),(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"dirty"}}),(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"predict"},children:"prediction"===(null==t?void 0:t.origin)&&(0,E.jsx)($s,{style:{width:18,height:18}})})]}),(0,E.jsxs)(Qe.Sl,{name:"wrapper",children:[(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"lock"},children:(0,E.jsx)(gV,{item:t,annotation:null==t?void 0:t.annotation,hovered:e,locked:null==t?void 0:t.locked,onClick:h})}),(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"visibility"},children:(0,k.VS)(k.bA)?(0,E.jsx)(hV,{onClick:d,style:c?void 0:{display:"none"},children:c?(0,E.jsx)(Fi,{}):(0,E.jsx)(Di,{})}):(0,E.jsx)(hV,{onClick:d,children:c?(0,E.jsx)(Fi,{}):(0,E.jsx)(Di,{})})}),i&&(0,E.jsx)(Qe.Sl,{name:"control",mod:{type:"visibility"},children:(0,E.jsx)(hV,{onClick:u,children:(0,E.jsx)(Wr,{style:{transform:`rotate(${r?-90:90}deg)`}})})})]})]})})),az=(0,v.PA)((({item:e,collapsed:t,setCollapsed:n,selected:r})=>{const o=e.perRegionDescControls||[],i=(0,m.useCallback)((t=>{t.stopPropagation(),r||e.annotation.selectArea(e)}),[e,r,t]);return(0,E.jsx)(Qe.eB,{name:"ocr",mod:{collapsed:t,empty:!((null==o?void 0:o.length)>0)},onClick:i,onDragStart:e=>e.stopPropagation(),children:(0,E.jsx)(Qe.Sl,{name:"controls",children:o.map(((r,o)=>{const i=b.getPerRegionView(r.type,mt.REGION_LIST),a=e.getOneColor(),s=a?Ct()(a).alpha(.2).css():void 0;return i?(0,E.jsx)(i,{item:r,area:e,collapsed:t,setCollapsed:n,color:s,outliner:!0},o):null}))})})})),sz=(0,v.PA)((({regions:e,footer:t})=>{const n=(0,Qe.cn)("tree"),r=ez({regions:e,rootClass:n,footer:t,grouping:e.group});return(0,E.jsx)(XV.Provider,{value:{regions:e},children:(0,E.jsx)(QV,{regions:e,regionsTree:r})})})),lz=(0,m.createContext)({locked:!1}),{Block:cz,Elem:dz}=(0,Qe.JE)(),uz=(0,v.PA)((({ordering:e,regions:t,orderingDirection:n,onOrderingChange:r,onGroupingChange:o,onFilterChange:i})=>{const a=t.group,s=(0,m.useContext)(lz),l=(0,m.useCallback)((e=>{switch(e){case"manual":return{label:"Group Manually",selectedLabel:(0,k.VS)(k.bA)?"Manual":"Manual Grouping",icon:(0,E.jsx)(wv,{}),tooltip:"Manually Grouped"};case"label":return{label:"Group by Label",selectedLabel:(0,k.VS)(k.bA)?(0,k.VS)(k.CZ)?"By Label":"Label":"Grouped by Label",icon:(0,E.jsx)(Lv,{}),tooltip:"Grouped by Label"};case"type":return{label:"Group by Tool",selectedLabel:(0,k.VS)(k.bA)?(0,k.VS)(k.CZ)?"By Tool":"Tool":"Grouped by Tool",icon:(0,E.jsx)(gv,{}),tooltip:"Grouped by Tool"}}}),[]),c=(0,m.useCallback)((e=>{switch(e){case"date":return{label:"Order by Time",selectedLabel:"By Time",icon:(0,E.jsx)(Yf,{})};case"score":return{label:"Order by Score",selectedLabel:"By Score",icon:(0,E.jsx)(Rv,{})}}}),[]),d="asc"===n?(0,E.jsx)(Zv,{style:{color:"#898098"}}):(0,E.jsx)(ay,{style:{color:"#898098"}});return(0,E.jsxs)(cz,{name:"view-controls",mod:{collapsed:s.locked,FF_LSDV_4992:(0,k.VS)(k.CZ)},children:[(0,E.jsx)(hz,{value:a,options:["manual","type","label"],onChange:e=>o(e),readableValueForKey:l}),"manual"===a&&(0,E.jsx)(dz,{name:"sort",children:(0,E.jsx)(hz,{value:e,direction:n,options:["score","date"],onChange:e=>r(e),readableValueForKey:c,allowClickSelected:!0,extraIcon:d})}),(0,k.VS)(k.CZ)?(0,E.jsx)(pz,{regions:t}):null]})})),hz=({value:e,options:t,direction:n,allowClickSelected:r,onChange:o,readableValueForKey:i,extraIcon:a})=>{const s=(0,m.useMemo)((()=>i(e)),[e]),l=(0,m.useMemo)((()=>t.map((e=>[e,i(e)]))),[]),c=(0,m.useMemo)((()=>(0,E.jsx)(xT,{size:"medium",style:{width:200,minWidth:200,borderRadius:(0,k.VS)(k.bA)&&4},selectedKeys:[e],allowClickSelected:r,children:l.map((([t,r])=>(0,E.jsx)(gz,{name:t,value:e,direction:n,label:r,onChange:e=>o(e)},t)))})),[e,l,s,n,o]),d=(0,k.VS)(k.bA)?{mod:{newUI:!0}}:void 0,u=(0,k.VS)(k.CZ)?{}:{padding:"0",whiteSpace:"nowrap"};return(0,k.VS)(k.bA)&&(u.padding="0 12px 0 2px"),(0,E.jsx)(J_.Trigger,{content:c,style:{width:200},children:(0,E.jsx)(Qa,Object.assign({type:"text","data-testid":`grouping-${e}`},d,{icon:s.icon,style:u,extra:(0,k.VS)(k.bA)?a:(0,E.jsx)(mz,{direction:n,name:e,value:e,wrap:!1}),tooltip:(0,k.VS)(k.CZ)&&s.tooltip||void 0,tooltipTheme:"dark",children:s.selectedLabel}))})},gz=({value:e,name:t,label:n,direction:r,onChange:o})=>(0,E.jsx)(xT.Item,{name:t,onClick:()=>o(t),children:(0,E.jsxs)(dz,{name:"label",children:[n.label,(0,E.jsx)(mz,{direction:r,name:t,value:e})]})}),mz=({direction:e,value:t,name:n,wrap:r=!0})=>{const o="asc"===e?(0,E.jsx)(Bv,{}):(0,E.jsx)(ey,{});return!e||t!==n||(0,k.VS)(k.bA)?null:r?(0,E.jsx)("span",{children:o}):o},pz=(0,v.PA)((({regions:e})=>{var t;const n=(0,m.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleVisibility()}),[e]),r=!(null!=e&&null!=(t=e.regions)&&t.length),o=!r&&e.isAllHidden;return(0,E.jsx)(dz,{tag:Qa,type:"text",disabled:r,onClick:n,mod:{hidden:o},"aria-label":o?"Show all regions":"Hide all regions",icon:o?(0,E.jsx)(Jw,{}):(0,E.jsx)(Bw,{}),tooltip:o?"Show all regions":"Hide all regions",tooltipTheme:"dark"})})),fz=["regions"],vz=[];(0,k.VS)(k.CZ)&&vz.push("ff_hide_all_regions"),(0,k.VS)(k.sI)&&vz.push("ff_outliner_optim");const yz=(0,v.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,m.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,E.jsx)(E.Fragment,{children:a?(0,E.jsxs)(Qe.eB,{name:"filters-info",children:[(0,E.jsx)(Mw,{width:21,height:20}),(0,E.jsx)(Qe.Sl,{name:"filters-title",children:"All regions hidden"}),(0,E.jsx)(Qe.Sl,{name:"filters-description",children:"Adjust or remove the filters to view"})]}):(null==e||null==(i=e.regions)?void 0:i.length)>0?(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(sz,{regions:e,footer:s>0&&(0,E.jsxs)(Qe.eB,{name:"filters-info",children:[(0,E.jsx)(Mw,{width:21,height:20}),(0,E.jsxs)(Qe.Sl,{name:"filters-title",children:["There ",1===s?"is":"are"," ",s," hidden region",s>1&&"s"]}),(0,E.jsx)(Qe.Sl,{name:"filters-description",children:"Adjust or remove filters to view"})]})})}):(0,E.jsx)(Qe.Sl,{name:"empty",children:"Regions not added"})})})),bz=(0,v.PA)((({regions:e})=>{const t=(0,m.useCallback)((t=>{e.setSort(t)}),[e]),n=(0,m.useCallback)((t=>{e.setGrouping(t)}),[e]),r=(0,m.useCallback)((t=>{e.setFilteredRegions(t)}),[e]);return(0,E.jsxs)(Qe.eB,{name:"outliner",mix:vz,children:[(0,E.jsx)(uz,{ordering:e.sort,regions:e,orderingDirection:e.sortOrder,onOrderingChange:t,onGroupingChange:n,onFilterChange:r}),(0,E.jsx)(yz,{regions:e})]})})),xz=(0,v.PA)((e=>{let{regions:t}=e,n=(0,nr.A)(e,fz);const[r,o]=(0,m.useState)(),i=(0,m.useCallback)((e=>{t.setSort(e)}),[t]),a=(0,m.useCallback)((e=>{t.setGrouping(e),o(e)}),[t]),s=(0,m.useCallback)((e=>{t.setFilteredRegions(e)}),[t]);return(0,m.useEffect)((()=>{o(t.group)}),[]),t.setGrouping(r),(0,E.jsxs)(WN,Object.assign({},n,{name:"outliner",mix:vz,title:"Outliner",children:[(0,E.jsx)(uz,{ordering:t.sort,regions:t,orderingDirection:t.sortOrder,onOrderingChange:i,onGroupingChange:a,onFilterChange:s}),(0,E.jsx)(yz,{regions:t})]}))})),wz=e=>{const[t,n]=(0,m.useState)(window.matchMedia(e));return(0,m.useEffect)((()=>{const t=()=>{n(window.matchMedia(e))};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[]),(0,m.useEffect)((()=>{n(window.matchMedia(e))}),[e]),t},Cz=980,Sz=(e,t)=>{const n=window.localStorage.getItem(`panel:${e}`);return n?Object.assign({},t,JSON.parse(n)):t},jz=(e,t)=>{window.localStorage.setItem(`panel:${e}`,JSON.stringify(t))},kz={outliner:{title:"Outliner",component:xz,icon:Hf},details:{title:"Details",component:VV,icon:Yf}},Oz=(0,v.PA)((({currentEntity:e,panelsHidden:t,children:n})=>{const r=e.regionStore,o=(0,m.useRef)({width:0,height:0}),i=wz("screen and (max-width: 980px)"),[a,s]=(0,m.useState)(500),[l,c]=(0,m.useState)(!1),[d,u]=(0,m.useState)(!1),[h,g]=(0,m.useState)(!1),[p,f]=(0,m.useState)(!1),v=(0,m.useRef)(),[y,b]=(0,m.useState)(),w=(0,m.useRef)(y),[C,S]=(0,m.useState)({outliner:Sz("outliner",{top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:VN,height:zN,visible:!0,detached:!1,alignment:"left",maxHeight:BN}),details:Sz("details",{top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:VN,height:zN,visible:!0,detached:!1,alignment:"right",maxHeight:BN})});YM(e);const j=(0,m.useMemo)((()=>l||i.matches),[l,i.matches]),O=(0,m.useCallback)(((e,t)=>{S((n=>{const r=Object.assign({},n[e],t);return jz(e,r),Object.assign({},n,{[e]:r})}))}),[C]),R=(0,m.useCallback)(((e,t)=>{const n=C[e],r=T(e,n.top,n.left,t);O(e,{visible:t,storedTop:r.top/o.current.height*100,storedLeft:r.left/o.current.width*100})}),[O]),_=(0,m.useCallback)((e=>(0,k.VS)(k.bA)||void 0===Object.values(C).find((t=>t.alignment===e&&!t.detached))),[C]),A=(0,m.useCallback)(((e,t,n)=>{const r=e+n,o=t-5;e>=0&&e<=5&&_("left")?b("left"):r<=t&&r>=o&&_("right")?b("right"):b(void 0)}),[_]),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,x.clamp)(n,0,c-l.width),top:(0,x.clamp)(t,0,(null!=(a=null==(s=v.current)?void 0:s.clientHeight)?a:0)-d)}},P=(0,m.useCallback)((e=>{const t=Object.entries(C).reduce(((e,[t,n])=>{const r=Object.assign({},n,{zIndex:1});return g(!0),jz(t,r),Object.assign({},e,{[t]:r})}),Object.assign({},C));t[e]=Object.assign({},t[e],{zIndex:15}),jz(e,t[e]),S(t)}),[C]),I=(0,m.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((()=>{O(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})}))}),[O,A,C]),L=(0,m.useCallback)((()=>{u((()=>!0))}),[]),M=(0,m.useCallback)((()=>{u((()=>!1))}),[]),K=(0,m.useCallback)((e=>Object.keys(C).filter((t=>{var n;return(null==(n=C[t])?void 0:n.alignment)===e}))),[C]),D=(0,m.useCallback)(((e,t,n,r,i)=>{const{left:s,top:l}=T(e,r,i),c=o.current.height-l;requestAnimationFrame((()=>{if((0,k.VS)(k.bA)){var r;K(null==(r=C[e])?void 0:r.alignment).forEach((e=>{O(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,x.clamp)(t,VN,a),height:(0,x.clamp)(n,zN,c)})}))}else O(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,x.clamp)(t,VN,a),height:(0,x.clamp)(n,zN,c)})}))}),[O,a,C]),N=(0,m.useCallback)((e=>{if(g(!1),!w.current)return;const t={alignment:w.current,detached:!1};if((0,k.VS)(k.bA)){var n;const o=null==(n=K(w.current).filter((t=>t!==e)))?void 0:n[0];var r;if(o)t.width=(0,x.clamp)(null==(r=C[o])?void 0:r.width,VN,a)}O(e,t),b(void 0)}),[O]),V=(0,m.useMemo)((()=>({onResize:D,onResizeStart:L,onResizeEnd:M,onPositionChange:I,onVisibilityChange:R,onPositionChangeBegin:P,onSnap:N})),[D,L,M,I,R,N]),z=(0,m.useMemo)((()=>Object.assign({},V,{root:v,regions:r,selection:r.selection,currentEntity:e})),[V,v,r,r.selectio,e]),B=(0,m.useMemo)((()=>{if(t&&(0,k.VS)(k.bA))return{};const e={paddingLeft:0,paddingRight:0};return j?e:Object.values(C).reduce(((e,n)=>{const r=(0,k.VS)(k.bA)||!t&&!n.detached&&n.visible?n.width:HN,o="left"===n.alignment?"paddingLeft":"paddingRight";return n.detached?e:Object.assign({},e,{[o]:r})}),e)}),[t,C,j]),H=(0,m.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=kz[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,E.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,m.useEffect)((()=>{w.current=y}),[y]),(0,m.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<=Cz||(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,m.useMemo)((()=>({locked:j})),[j]);return(0,E.jsx)(lz.Provider,{value:F,children:(0,E.jsx)(Qe.eB,{ref:e=>{e&&(v.current=e,c(e.clientWidth<=Cz))},name:"sidepanels",style:Object.assign({},B),mod:{collapsed:j,newLabelingUI:(0,k.VS)(k.bA)},children:p&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"content",mod:{resizing:d||h},children:n}),!0!==t&&(0,E.jsx)(E.Fragment,{children:Object.entries(H).map((([e,t])=>{const n=t.map((({props:e,Component:t},n)=>(0,E.jsx)(t,Object.assign({},e),n)));return"detached"===e?(0,E.jsx)(m.Fragment,{children:n},e):(0,E.jsx)(Qe.Sl,{name:"wrapper",mod:{align:e,snap:y===e},children:n},e)}))})]})})})}));let Rz=function(e){return e.left="left",e.right="right",e}({}),Ez=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}({}),_z=function(e){return e.top="top",e.bottom="bottom",e}({});const Az={order:0,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:VN,height:zN,visible:!0,detached:!0,alignment:Rz.left,maxHeight:BN,panelViews:[]},Tz=(e,t)=>{const n=t||e.target,r=n.clientWidth;return e.pageX-n.getBoundingClientRect().left>r/2?Rz.right:Rz.left},Pz=(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},Iz=(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},Lz=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},Mz=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},Kz=e=>{const t=Object.assign({},e);return Object.keys(t).forEach((e=>{0===t[e].panelViews.length&&delete t[e]})),t},Dz={regions:bz,history:KV,relations:DV,comments:MV,info:NV},Nz=[{name:"regions",title:"Regions",component:Dz.regions,active:!0},{name:"history",title:"History",component:Dz.history,active:!1},{name:"relations",title:"Relations",component:Dz.relations,active:!1},{name:"info",title:"Info",component:Dz.info,active:!0},{name:"comments",title:"Comments",component:Dz.comments,active:!1}],Vz={"info-comments-history":{order:1,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:VN,height:zN,visible:!0,detached:!1,alignment:Rz.right,maxHeight:BN,panelViews:[Nz[3],Nz[4],Nz[1]]},"regions-relations":{order:2,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:VN,height:zN,visible:!0,detached:!1,alignment:Rz.right,maxHeight:BN,panelViews:[Nz[0],Nz[2]]}},zz={"info-history":{order:1,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:VN,height:zN,visible:!0,detached:!1,alignment:Rz.right,maxHeight:BN,panelViews:[Nz[3],Nz[1]]},"regions-relations":{order:2,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:VN,height:zN,visible:!0,detached:!1,alignment:Rz.right,maxHeight:BN,panelViews:[Nz[0],Nz[2]]}},Bz=Object.assign({},Az,{name:"breakpointCollapsed",positioning:!1,height:zN,maxHeight:zN,detached:!1,maxWidth:500,zIndex:10,expanded:!0,locked:!0,alignment:Rz.left,lockPanelContents:!1,attachedKeys:[],sidePanelCollapsed:{[Rz.left]:!1,[Rz.right]:!1},setSidePanelCollapsed:()=>{},dragTop:!1,dragBottom:!1,panelViews:[Nz[0],Nz[1],Nz[2],Nz[3],Nz[4]]}),Hz=["top-left","top-right","bottom-left","bottom-right","top","bottom","right","left"],Fz=e=>{var t;const n=window.localStorage.getItem("panelState"),r=n&&JSON.parse(n),o=r&&r.panelData,i={[Rz.left]:!1,[Rz.right]:!1},a=null!=(t=null==r?void 0:r.collapsedSide)?t:i,s=o&&Object.values(o).flatMap((e=>e.panelViews)),l=Nz.length-(e?0:1);if(!s||s.length!==l){return{panelData:e?Vz:zz,collapsedSide:i}}const c=Kz(o),d=Lz(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:Wz(d),collapsedSide:u}},Wz=e=>{const t=Object.assign({},e);return Object.keys(t).forEach((e=>{t[e].panelViews.forEach((e=>{e.component=Dz[e.name]}))})),t},$z=e=>Object.keys(e).filter((t=>!e[t].detached&&e[t].alignment===Rz.left)),Uz=e=>Object.keys(e).filter((t=>!e[t].detached&&e[t].alignment===Rz.right)),Zz=(e,t)=>t===Rz.left?$z(e).sort(((t,n)=>e[t].order-e[n].order)):t===Rz.right?Uz(e).sort(((t,n)=>e[t].order-e[n].order)):void 0,Gz=(e,t)=>{const n=Object.assign({},e);return[$z(n),Uz(n)].forEach((r=>{const o=r.filter((t=>!e[t].visible)).length,i=r.filter((t=>e[t].visible)),a=HN*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+=HN}))})),n},Yz=(e,t,n)=>{const r=Object.assign({},e),o=Zz(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-HN*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+=HN})),r},Xz=(e,t,n,r,o,i=_z.bottom)=>{const a=Object.assign({},e),s=Zz(a,n),l=s?s.reduce(((t,n)=>t{const o=Object.assign({},e);o[t].order=r===_z.top?0:n.length;let i=r===_z.bottom?0:1;return n.forEach((e=>{t!==e&&(o[e].order=i,i+=1)})),o})(c,t,Zz(c,n),i),u=Jz(d,t);return Yz(u,o,n)},qz=(e,t,n,r,o,i,a)=>{const s=((e,t,n,r,o,i,a)=>Object.assign({},Az,{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=Pz(e,n,r),c=Kz(l),d=Object.assign({},c,{[`${s.name}`]:s}),u=Mz(d),h=Lz(u),g=Jz(h,s.name);return Gz(g,a.current.height)},Jz=(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},Qz=({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:p=!1,onSnap:f,onResize:v,onGroupHeightResize:y,onResizeStart:b,onResizeEnd:w,onVisibilityChange:C,onPositionChange:S,onPositionChangeBegin:j,children:k,panelViews:O,attachedKeys:R,sidePanelCollapsed:_,setSidePanelCollapsed:A,dragTop:T,dragBottom:P,lockPanelContents:I})=>{const L=(0,m.useRef)(),M=(0,m.useRef)(),K=(0,m.useRef)(),D=(0,m.useRef)(),N=(0,m.useRef)({onResize:v,onGroupHeightResize:y,onResizeStart:b,onResizeEnd:w,onPositionChange:S,onPositionChangeBegin:j,onVisibilityChange:C,onSnap:f}),[V,z]=(0,m.useState)(),B=(0,m.useRef)(e),H=_[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:w,onPositionChange:S,onPositionChangeBegin:j,onVisibilityChange:C,onSnap:f},B.current=e;const Z=(0,m.useMemo)((()=>{const e=i?{height:g?zN:H?"100%":null!=o?o:"100%",width:g?"100%":H?HN:null!=n?n:"100%"}:{width:H?"100%":null!=n?n:VN,height:H?"100%":HN};return Object.assign({},e,{zIndex:h})}),[n,o,i,g,H,h]),G=(0,m.useMemo)((()=>a&&!g?{top:`${d}%`,left:`${u}%`}:{}),[a,d,u,g]),Y=(0,m.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]);NN({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]),NN({elementRef:K,disabled:g||p,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,x.isDefined)(c)&&["left","top-left"].includes(c),p=(0,x.isDefined)(c)&&["top","top-left"].includes(c),f=(0,x.clamp)(m?r-h:r+h,VN,i),v=(0,x.clamp)(p?o-g:o+g,55,a+o),y=p?a+(o-v):a,b=m?s+(r-f):s,{current:w}=B;N.current.onResize(w,f,v,y,b)}},onMouseUp(){null==N.current.onResizeEnd||N.current.onResizeEnd(),z(void 0)}},[N,a,n,r,o,l,c,i,g,p]),NN({elementRef:D,disabled:g||p,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,p,D.current]);const X=()=>{A(Object.assign({},_,{[s]:!_[s]}))},q=(0,m.useCallback)((t=>{t.stopPropagation(),t.preventDefault(),null==C||C(e,!i)}),[C,e,i]);return(0,E.jsxs)(Qe.eB,{ref:M,name:"tabs-panel",mod:Y,style:Object.assign({},Z,G),children:[(0,E.jsxs)(Qe.Sl,{name:"content",children:[!g&&$&&(0,E.jsxs)(E.Fragment,{children:[W&&i&&(0,E.jsx)(Qe.Sl,{name:"grouped-top",ref:D,mod:{drag:"grouped-top"===V},"data-resize":"grouped-top"}),(0,E.jsxs)(Qe.Sl,{ref:L,onClick:()=>{H&&X()},id:e,mod:{collapsed:H},name:"header",children:[(0,E.jsxs)(Qe.Sl,{name:"header-left",children:[!H&&(0,E.jsx)(Qe.Sl,{name:"icon",style:{pointerEvents:"none"},tag:_w,width:8}),!i&&!H&&(0,E.jsx)(Qe.Sl,{name:"title",children:O.map((e=>e.title)).join(" ")})]}),(0,E.jsxs)(Qe.Sl,{name:"header-right",children:[(!a||H)&&(0,E.jsx)(Qe.Sl,{name:"toggle",mod:{detached:a,collapsed:H,alignment:s},onClick:X,"data-tooltip":`${U} Group`,children:Rz.left===s?(0,E.jsx)(jy,{}):(0,E.jsx)(Ky,{})}),!H&&(0,E.jsx)(Qe.Sl,{name:"toggle",mod:{detached:a,collapsed:H,alignment:s},onClick:q,"data-tooltip":U,children:i?(0,E.jsx)(Zc,{}):(0,E.jsx)(Lc,{})})]})]})]}),i&&!H&&(0,E.jsxs)(Qe.Sl,{name:"body",children:[I&&(0,E.jsx)(Qe.Sl,{name:"shield"}),k]})]}),i&&!p&&!g&&(0,E.jsx)(Qe.Sl,{name:"resizers",ref:K,mod:{locked:p||g},children:Hz.map((e=>!H&&(("left"===e||"right"===e)&&s!==e||a)?(0,E.jsx)(Qe.Sl,{name:"resizer",mod:{drag:e===V},"data-resize":e},e):null))})]})},eB=[];var tB=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}(tB||{});const nB=()=>{eB.forEach((e=>{null==e||e.classList.remove(tB.tabLeft),null==e||e.classList.remove(tB.tabRight),null==e||e.classList.remove(tB.emptyTabSpace)}))},rB=({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:p,checkSnap:f})=>{const v=(0,m.useRef)(),y=(0,m.useRef)(),b=(0,m.useRef)(!1),x=(0,m.useRef)({panelKey:o,tabIndex:r}),[w,C]=(0,m.useState)(!1);x.current={panelKey:o,tabIndex:r},NN({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);p(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=Tz(e,g);const p=null==(i=y.current)?void 0:i.getBoundingClientRect().height;p&&f(h,l,u,p),nB(),(null==g?void 0:g.id)!==`${o}_${r}_droppable`&&(null!=g&&g.id.includes("droppable-space")&&(m=void 0),((e,t)=>{let n;eB.push(t),e===Rz.left&&(n=tB.tabLeft),e===Rz.right&&(n=tB.tabRight),void 0===e&&(n=tB.emptyTabSpace),n&&(null==t||t.classList.add(n))})(m,g))},onMouseUp(t,n){var r,o;if(nB(),eB.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=Tz(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,E.jsxs)(Qe.Sl,{id:`${o}_${r}_droppable`,name:"tab",mod:{active:c?r===d:s},children:[!c&&(0,E.jsx)(Qe.Sl,{name:"icon",tag:_w,width:8}),n]});return(0,E.jsxs)(Qe.eB,{name:"panel-tabs",children:[(0,E.jsx)(Qe.Sl,{name:"draggable-tab",id:`${n}-draggable`,ref:v,children:(0,E.jsx)(S,{})}),(0,E.jsxs)(Qe.Sl,{ref:y,name:"ghost-tab",style:{width:`${l}px`,height:"fit-content",maxHeight:"300px",overflow:"hidden"},children:[(0,E.jsx)(S,{}),w&&(0,E.jsx)(Qe.Sl,{name:"contents",children:a})]})]})},oB=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,E.jsx)(E.Fragment,{children:(0,E.jsxs)(Qe.eB,{name:"tabs",mix:(0,k.VS)(k.sI)?"ff_outliner_optim":void 0,children:[(0,E.jsxs)(Qe.Sl,{name:"tabs-row",children:[e.panelViews.map(((t,n)=>{const{component:r}=t;return(0,E.jsx)(Qe.Sl,{name:"tab-container",mod:{active:t.active},children:(0,E.jsx)(rB,{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,E.jsx)(Qe.Sl,{name:"content",children:(0,E.jsx)(r,Object.assign({},e,{name:"outliner"}),`${t.title}-${n}-ghost`)})},`${t.title}-tab`)},`${t.title}-${n}-tab`)})),(0,E.jsx)(Qe.Sl,{id:`${e.name}_${e.panelViews.length}-droppable-space`,name:"drop-space-after"})]}),(0,E.jsx)(Qe.Sl,{name:"contents",children:n&&(0,E.jsx)(n,Object.assign({},e))})]})})},iB=980,aB=(0,v.PA)((({currentEntity:e,panelsHidden:t,children:n,showComments:r,focusTab:o})=>{const i=e.regionStore,a=(0,m.useRef)({width:0,height:0}),s=wz("screen and (max-width: 980px)"),[l,c]=(0,m.useState)(500),[d,u]=(0,m.useState)(!1),[h,g]=(0,m.useState)(!1),[p,f]=(0,m.useState)(!1),[v,y]=(0,m.useState)(!1),b=(0,m.useRef)(),[w,C]=(0,m.useState)(),S=(0,m.useMemo)((()=>Fz(r)),[r]),[j,k]=(0,m.useState)(S.panelData),[O,R]=(0,m.useState)(S.collapsedSide),[_,A]=(0,m.useState)(0),T=(0,m.useRef)(w),P=(0,m.useRef)(O);P.current=O,T.current=w,YM(e);const I=(0,m.useMemo)((()=>d||s.matches),[d,s.matches]),L=(0,m.useCallback)(((e,t)=>{k((n=>{const r=Object.assign({},n[e],t);return Object.assign({},n,{[e]:r})}))}),[j]),M=(0,m.useCallback)(((e,t,n,r,o)=>{k((i=>{const s=i[t].panelViews[e];s&&(s.active=!0);const l=Pz(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===Rz.right?1:0);return t===n&&l>0&&(l-=1),s.panelViews.splice(l,0,r),a})(Kz(l),t,n,s,r,o),d=Jz(c,n),u=Mz(d),h=Lz(u);return Gz(h,a.current.height)})),C(void 0)}),[j]),K=(0,m.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]?_z.top:_z.bottom,d=a.current.height;k((i=>{const s=qz(i,e,t,n,r,o,a);return Xz(s,e,l,VN,d,c)}))}else k((i=>qz(i,e,t,n,r,o,a)));C(void 0)}),[j,O,O[Rz.left],O[Rz.right]]),D=(0,m.useCallback)(((e,t)=>k((n=>Iz(n,e,t)))),[j]),N=(0,m.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 Yz(i,a.current.height,r.alignment)}))}),[k,j]),V=(0,m.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===Rz.right)))?void 0:s[1].width)||0),f=e<=((null==(l=Object.entries(j).find((([e,t])=>t.alignment===Rz.left)))?void 0:l[1].width)||0),v=n<=5,y=h>=m-5;let b;null!=(c=P.current)&&c[Rz.left]||!f||(e<=5&&(b=Ez.left),v&&(b=Ez.topLeft),y&&(b=Ez.bottomLeft)),null!=(d=P.current)&&d[Rz.right]||!p||(u>=g-5&&(b=Ez.right),v&&(b=Ez.topRight),y&&(b=Ez.bottomRight)),C(b)}),[j]),z=(0,m.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:HN,h=c.detached?u:c.height,g=c.height!==(null==(a=b.current)?void 0:a.clientHeight)&&c.detached?h:zN;return{left:(0,x.clamp)(n,0,d-c.width),top:(0,x.clamp)(t,0,(null!=(s=null==(l=b.current)?void 0:l.clientHeight)?s:0)-g)||1}}),[j]),B=(0,m.useCallback)((e=>{g((()=>!0)),k((t=>Jz(t,e)))}),[j]),H=(0,m.useCallback)(((e,t,n,r)=>{const o=j[e],{left:i,top:s}=z(e,t,n,o.visible),l=a.current.height-s;p||j[e].detached||(f(!0),k((t=>((e,t,n)=>{const r=Object.assign({},e),o=r[t].alignment,i={width:VN,detached:!0,height:zN},a=Object.assign({},r,{[t]:Object.assign({},r[t],i)}),s=Zz(r,o);return null==s||s.forEach(((e,t)=>{r[e].order=t})),Yz(a,n,o)})(t,e,a.current.height)))),V(i,o.width,s,zN),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,p]),F=(0,m.useCallback)((()=>{g((()=>!0))}),[]),W=(0,m.useCallback)((()=>{g((()=>!1))}),[]),$=(0,m.useCallback)(((e,t,n)=>{requestAnimationFrame((()=>{k((r=>((e,t,n,r,o)=>{var i;const a=Object.assign({},e),s=Zz(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,x.clamp)(i,55,o)}))}));const g=s.filter((e=>!a[e].visible)).length*HN,m=s.filter((e=>a[e].visible)).reduce(((e,t)=>e+a[t].height),0);return Gz(m+g>o?e:a,o)})(r,e,t,n,a.current.height)))}))}),[k]),U=(0,m.useCallback)((e=>Object.keys(j).filter((t=>{var n;return(null==(n=j[t])?void 0:n.alignment)===e}))),[j]),Z=(0,m.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,x.clamp)(t,VN,l),height:j[e].detached?(0,x.clamp)(n,zN,BN):j[e].height})}))}))}),[L,l,j]),Y=(0,m.useCallback)((e=>{var t;if(f(!1),g((()=>!1)),!T.current)return;const n=T.current.split("-"),r=n[0],o="top"===n[1]?_z.top:_z.bottom,i=null==(t=Zz(j,r))?void 0:t.filter((t=>t!==e));i&&i.length>0?k((t=>Xz(t,e,r,VN,a.current.height,o))):L(e,{height:a.current.height,alignment:r,detached:!1}),C(void 0)}),[L,j]),X=(0,m.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,m.useMemo)((()=>Object.assign({},X,{root:b,regions:i,selection:i.selection,currentEntity:e})),[X,i,i.selection,e]),J=(0,m.useMemo)((()=>{const e=$z(j),n=Uz(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?HN:r?0:s,paddingRight:I||t?0:a?HN:o?0:l}}),[t,j,O,I]),Q=(0,m.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=Zz(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:p,maxWidth:l,zIndex:i.zIndex,expanded:O[n],alignment:i.alignment,locked:I,attachedKeys:s,lockPanelContents:h,breakPointActiveTab:_,sidePanelCollapsed:O,setSidePanelCollapsed:R,dragTop:n===Rz.left?w===Ez.topLeft:w===Ez.topRight,dragBottom:n===Rz.left?w===Ez.bottomLeft:w===Ez.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,p,l,O,w]);(0,m.useEffect)((()=>{Object.keys(j).length&&((e,t)=>{window.localStorage.setItem("panelState",JSON.stringify({panelData:e,collapsedSide:t}))})(j,O)}),[j,O]),(0,m.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(Iz(e,n,i)),!s&&O[a]&&R(Object.assign({},O,{[a]:!1})),l||N(n,!0)}}),[o]),(0,m.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<=iB||(a.current.height!==n&&k(Gz(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,m.useMemo)((()=>({locked:I})),[]),te=(0,m.useMemo)((()=>{const e=Object.assign({},Bz);return e.panelViews=Bz.panelViews.filter((e=>"comments"!==e.name||r)),e}),[Bz,r]),ne=Object.assign({},te,q,{breakPointActiveTab:_,setBreakPointActiveTab:A});return(0,E.jsx)(lz.Provider,{value:ee,children:(0,E.jsx)(Qe.eB,{ref:e=>{e&&(b.current=e,u(e.clientWidth<=iB))},name:"sidepanels",mod:{collapsed:I},style:Object.assign({},J),children:v&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"content",mod:{resizing:h||p},children:n}),!0!==t&&I?(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(Qe.Sl,{name:"wrapper",children:(0,E.jsx)(Qz,Object.assign({},ne,{children:(0,E.jsx)(oB,Object.assign({},ne))}))})}):(0,E.jsx)(E.Fragment,{children:Object.entries(Q).map((([e,t],n)=>{const r=t.sort(((e,t)=>e.order-t.order)).map(((t,r)=>(0,E.jsx)(Qz,Object.assign({},t,{children:(0,E.jsx)(oB,Object.assign({},t))}),`${e}-${r}-${n}`)));return"detached"===e?(0,E.jsx)(m.Fragment,{children:r},e):(0,E.jsx)(Qe.Sl,{name:"wrapper",mod:{align:e,snap:w===e},children:r},e)}))})]})})})}));var sB=n(57958),lB=n(8593);const cB=["date"],dB=6e4,uB=[[3e4,3e4],[267e4,dB],[Number.MAX_SAFE_INTEGER,18e5]];const hB=e=>{let{date:t}=e,n=(0,nr.A)(e,cB);const[r,o]=(0,m.useState)(Date.now()),i=(0,m.useMemo)((()=>new Date(t).valueOf()),[t]),a=(0,m.useRef)(),s=(0,m.useCallback)((()=>{const e=Date.now()-i,t=function(e=0){const t=uB.findIndex((([t],n)=>t>e||n===uB.length-1)),n=t>0?uB[t-1][0]:0,r=uB[t][1];return Math.ceil((e-n+1)/r)*r+n}(e);a.current=window.setTimeout((()=>{o(Date.now())}),t-e)}),[t]);(0,m.useEffect)((()=>(s(),()=>{clearTimeout(a.current)})),[t,r]);const l="less than a minute ago"===(0,sB.A)(i,{addSuffix:!0})?"seconds ago":(0,sB.A)(i,{addSuffix:!0});return(0,E.jsx)("time",Object.assign({dateTime:(0,lB.default)(i,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx"),title:(0,lB.default)(i,"PPpp")},n,{children:l}))},gB=e=>e.unresolved_comment_count>0?"Unresolved Comments":e.comment_count>0?"All Comments Resolved":"",mB=(0,v.PA)((({entity:e,capabilities:t,annotationStore:n,onAnnotationChange:r})=>{var o,i,a,s,l;const c="prediction"===e.type,d=(0,x.userDisplayName)(null!=(o=e.user)?o:{firstName:e.createdBy||"Admin"}),[u,h]=(0,m.useState)(),[g,p]=(0,m.useState)(!1),f=null==(i=n.store)?void 0:i.hasInterface("annotations:hide-info");let v=null;if(f){var y;const t=n.store.user;v={email:(null==(y=e.user)?void 0:y.id)===t.id||e.createdBy===t.email?"Me":"User"}}const b=(w=e).unresolved_comment_count>0?vl:w.comment_count>0?dl:null;var w;(0,m.useEffect)((()=>{h(e.ground_truth)}),[e,e.ground_truth]);const C=(0,m.useCallback)((()=>{const{selected:t,id:r,type:o}=e;t||("prediction"===o?n.selectPrediction(r):n.selectAnnotation(r))}),[e]),S=({entity:e,capabilities:t})=>{const o=q_(),i=()=>{null==r||r(),null==o||o.close()},a=(0,m.useCallback)((()=>{e.setGroundTruth(!u),i()}),[e]),s=(0,m.useCallback)((()=>{const t=n.addAnnotationFromPrediction(e);window.setTimeout((()=>{n.selectAnnotation(t.id),i()}))}),[e]),l=(0,m.useCallback)((()=>{i(),CK({title:"Delete annotation?",body:(0,E.jsxs)(E.Fragment,{children:["This will ",(0,E.jsx)("strong",{children:"delete all existing regions"}),". Are you sure you want to delete them?",(0,E.jsx)("br",{}),"This action cannot be undone."]}),buttonLook:"destructive",okText:"Delete",onOk:()=>{e.list.deleteAnnotation(e)}})}),[e]),c="prediction"===e.type,d=!(0,x.isDefined)(e.pk),h=t.groundTruthEnabled&&!c&&!d,g=t.enableCreateAnnotation&&!d;return(0,E.jsxs)(Qe.eB,{name:"AnnotationButtonContextMenu",children:[h&&(0,E.jsxs)(Qe.Sl,{name:"option",mod:{groundTruth:!0},onClick:a,children:[u?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Nl,{color:"#FFC53D",width:37,height:37})," ","Unset "]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Wl,{width:37,height:37}),"Set "]}),"as Ground Truth"]}),g&&(0,E.jsxs)(Qe.Sl,{name:"option",mod:{duplicate:!0},onClick:s,children:[(0,E.jsx)(Qe.Sl,{name:"icon",children:(0,E.jsx)(Vd,{width:20,height:24})}),"Duplicate Annotation"]}),t.enableAnnotationDelete&&!c&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"seperator"}),(0,E.jsxs)(Qe.Sl,{name:"option",mod:{delete:!0},onClick:l,children:[(0,E.jsx)(Qe.Sl,{name:"icon",children:(0,E.jsx)(Of,{width:14,height:18})})," ","Delete Annotation"]})]})]})};return(0,E.jsxs)(Qe.eB,{name:"annotation-button",mod:{selected:e.selected,contextMenuOpen:g},children:[(0,E.jsxs)(Qe.Sl,{name:"mainSection",onClick:C,children:[(0,E.jsx)(Qe.Sl,{name:"picSection",children:(0,E.jsx)(Qe.Sl,{name:"userpic",tag:HM,showUsername:!0,username:c?e.createdBy:null,user:null!=(a=null!=(s=v)?s:e.user)?a:{email:e.createdBy},mod:{prediction:c},size:24,children:c&&(0,E.jsx)($s,{style:{width:18,height:18}})})}),(0,E.jsxs)(Qe.Sl,{name:"main",children:[(0,E.jsxs)(Qe.Sl,{name:"user",children:[(0,E.jsx)(Qe.Sl,{tag:"span",name:"name",children:v?v.email:d}),!f&&(0,E.jsxs)(Qe.Sl,{tag:"span",name:"entity-id",children:["#",null!=(l=e.pk)?l:e.id]})]}),!f&&(0,E.jsx)(Qe.Sl,{name:"created",children:(0,E.jsx)(Qe.Sl,{name:"date",component:hB,date:e.createdDate})})]}),!c&&(0,E.jsxs)(Qe.Sl,{name:"icons",children:[e.draftId>0&&(0,E.jsx)(hr,{title:"Draft",children:(0,E.jsx)(Qe.Sl,{name:"icon",mod:{draft:!0},children:(0,E.jsx)(lx,{color:"#617ADA"})})}),e.skipped&&(0,E.jsx)(hr,{title:"Skipped",children:(0,E.jsx)(Qe.Sl,{name:"icon",mod:{skipped:!0},children:(0,E.jsx)(uw,{color:"#DD0000"})})}),u&&(0,E.jsx)(hr,{title:"Ground-truth",children:(0,E.jsx)(Qe.Sl,{name:"icon",mod:{groundTruth:!0},children:(0,E.jsx)(nw,{})})}),b&&(0,E.jsx)(hr,{title:gB(e),children:(0,E.jsx)(Qe.Sl,{name:"icon",mod:{comments:!0},children:(0,E.jsx)(b,{})})})]})]}),(0,E.jsx)(Qe.Sl,{name:"contextMenu",children:(0,E.jsx)(J_.Trigger,{content:(0,E.jsx)(S,{entity:e,capabilities:t,annotationStore:n}),onToggle:e=>p(e),children:(0,E.jsx)(Qe.Sl,{name:"ellipsisIcon",children:(0,E.jsx)($d,{width:28,height:28})})})})]})})),pB=(0,v.PA)((({store:e,annotationStore:t})=>{const[n,r]=(0,m.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,m.useRef)(),d=(0,m.useRef)(),[u,h]=(0,m.useState)(0),[g,p]=(0,m.useState)(!1),[f,v]=(0,m.useState)(!1),y=(0,m.useCallback)(((e,t=!0)=>{if(d.current&&c.current){const e=d.current.clientWidth,n=c.current.clientWidth,r=(0,x.clamp)(t?u-e:u+e,0,n-e);h(r)}}),[d,c,u]);return(0,m.useEffect)((()=>{var e,t,n,r;p(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,m.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,E.jsxs)(Qe.eB,{name:"annotations-carousel",style:{"--carousel-left":`${u}px`},children:[(0,E.jsx)(Qe.Sl,{ref:d,name:"container",children:(0,E.jsx)(Qe.Sl,{ref:c,name:"carosel",children:(0,x.sortAnnotations)(n).map((e=>(0,E.jsx)(mB,{entity:e,capabilities:{enablePredictions:i,enableCreateAnnotation:a,groundTruthEnabled:s,enableAnnotations:o,enableAnnotationDelete:l},annotationStore:t},null==e?void 0:e.id)))})}),(!g||!f)&&(0,E.jsxs)(Qe.Sl,{name:"carousel-controls",children:[(0,E.jsx)(Qe.Sl,{tag:Qa,name:"nav",disabled:g,mod:{left:!0,disabled:g},"aria-label":"Carousel left",onClick:e=>!g&&y(e,!0),children:(0,E.jsx)(Qe.Sl,{name:"arrow",mod:{left:!0},tag:wc})}),(0,E.jsx)(Qe.Sl,{tag:Qa,name:"nav",disabled:f,mod:{right:!0,disabled:f},"aria-label":"Carousel right",onClick:e=>!f&&y(e,!1),children:(0,E.jsx)(Qe.Sl,{name:"arrow",mod:{right:!0},tag:wc})})]})]}):null})),fB=(0,v.PA)((({entity:e})=>{const{history:t}=e;return(0,E.jsxs)(Qe.eB,{name:"history-buttons",children:[(0,E.jsx)(hr,{title:"Undo",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",type:"text","aria-label":"Undo",disabled:!(null!=t&&t.canUndo),onClick:()=>e.undo(),icon:(0,E.jsx)(hs,{})})}),(0,E.jsx)(hr,{title:"Redo",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",type:"text","aria-label":"Redo",disabled:!(null!=t&&t.canRedo),onClick:()=>e.redo(),icon:(0,E.jsx)(bs,{})})}),(0,E.jsx)(hr,{title:"Reset",children:(0,E.jsx)(Qe.Sl,{tag:Qa,name:"action",look:"danger",type:"text","aria-label":"Reset",disabled:!(null!=t&&t.canUndo),onClick:()=>null==t?void 0:t.reset(),icon:(0,E.jsx)(ks,{})})})]})})),vB=({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,m.useCallback)((()=>{t.toggleViewingAllAnnotations()}),[t]);return(0,E.jsxs)(Qe.Sl,{name:"section",children:[e.hasInterface("annotations:view-all")&&(0,E.jsx)(hr,{title:"View all annotations",children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(tf,{}),type:"text","aria-label":"View All",onClick:()=>a(),primary:i,style:{height:36,width:36,padding:0}})}),!i&&e.hasInterface("ground-truth")&&(0,E.jsx)(LD,{entity:n}),!o&&!i&&e.hasInterface("edit-history")&&(0,E.jsx)(fB,{entity:n}),!i&&e.hasInterface("annotations:delete")&&(0,E.jsx)(hr,{title:"Delete annotation",children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(Ps,{}),look:"danger",type:"text","aria-label":"Delete",onClick:()=>{CK({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,E.jsx)(hr,{title:`Create copy of current ${n.type}`,children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(zp,{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,E.jsx)(Qa,{icon:(0,E.jsx)(Ol,{}),type:"text","aria-label":"Settings",onClick:()=>e.toggleSettings(),style:{height:36,width:36,padding:0}}),e.description&&e.hasInterface("instruction")&&(0,E.jsx)(Qa,{icon:(0,E.jsx)(Ip,{style:{width:16,height:16}}),primary:e.showingDescription,type:"text","aria-label":"Instructions",onClick:()=>e.toggleDescription(),style:{height:36,width:36,padding:0}})]})},yB=["entity","selected","onClick","extra"],bB=(0,v.PA)((({store:e,annotationStore:t,commentStore:n})=>{const r=(0,m.useRef)(),[o,i]=(0,m.useState)(!1),a=e.hasInterface("annotations:tabs"),s=e.hasInterface("predictions:tabs"),l=e.hasInterface("annotations:add-new"),c=e.hasInterface("ground-truth"),u=[];s&&u.push(...t.predictions),a&&u.push(...t.annotations);const h=(0,m.useCallback)(((e,n)=>{e.selected||(n?t.selectPrediction(e.id):t.selectAnnotation(e.id))}),[t]);(0,m.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,d.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,E.jsx)(rl,{}):e.comment_count>0?(0,E.jsx)(qs,{}):null,p=(e,n)=>{var r;return(0,E.jsx)(wB,{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,E.jsxs)(Qe.Sl,{name:"icons",children:[(0,E.jsx)(Qe.Sl,{name:"icon-column",children:g(e)}),(0,E.jsx)(Qe.Sl,{name:"icon-column",children:c&&(0,E.jsx)(LD,{entity:e,disabled:!0})})]})},`${null!=(r=e.pk)?r:e.id}${e.type}`)};return a||s||l?(0,E.jsx)(Qe.Sl,{name:"section",mod:{flat:!0},children:(0,E.jsxs)(Qe.eB,{name:"annotations-list",ref:r,children:[(0,E.jsx)(Qe.Sl,{name:"selected",children:(0,E.jsx)(wB,{"aria-label":"Annotations List Toggle",entity:t.selected,onClick:e=>{e.stopPropagation(),i(!o)},extra:u.length>0?(0,E.jsxs)(ns,{size:"none",style:{marginRight:-8,marginLeft:8},children:[(0,E.jsxs)(Qe.Sl,{name:"counter",children:[u.indexOf(t.selected)+1,"/",u.length]}),(0,E.jsx)(Qe.Sl,{name:"toggle",mod:{opened:o}})]}):null})}),o&&(0,E.jsxs)(Qe.Sl,{name:"list",children:[e.hasInterface("annotations:add-new")&&(0,E.jsx)(xB,{annotationStore:t,onClick:()=>i(!1)}),(e=>{const t=[],n=[];return e.forEach(((e,r)=>{e.pk?n.push(p(e,r)):t.push(p(e,r))})),(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Qe.Sl,{name:"draft",children:t}),(0,E.jsx)(Qe.Sl,{name:"annotation",children:n})]})})(u)]})]})}):null})),xB=(0,v.PA)((({annotationStore:e,onClick:t})=>{const n=(0,m.useCallback)((()=>{const n=e.createAnnotation();e.selectAnnotation(n.id),t()}),[e,t]);return(0,E.jsx)(Qe.Sl,{name:"create","aria-label":"Create Annotation",onClick:n,children:(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{name:"userpic",tag:HM,mod:{prediction:!0},children:(0,E.jsx)(gd,{})}),"Create Annotation"]})})})),wB=(0,v.PA)((e=>{var t,n,r;let{entity:o,selected:i,onClick:a,extra:s}=e,l=(0,nr.A)(e,yB);const c="prediction"===o.type,d=(0,x.userDisplayName)(null!=(t=o.user)?t:{firstName:o.createdBy||"Admin"});return(0,E.jsx)(Qe.Sl,Object.assign({},l,{name:"entity",mod:{selected:i},onClick:a,children:(0,E.jsxs)(ns,{spread:!0,children:[(0,E.jsxs)(ns,{size:"small",children:[(0,E.jsx)(Qe.Sl,{name:"userpic",tag:HM,showUsername:!0,username:c?o.createdBy:null,user:null!=(n=o.user)?n:{username:d},mod:{prediction:c},children:c&&(0,E.jsx)($s,{color:"#944BFF",style:{width:18,height:18}})}),(0,E.jsxs)(ns,{direction:"vertical",size:"none",children:[(0,E.jsxs)(Qe.Sl,{name:"user",children:[(0,E.jsx)(Qe.Sl,{tag:"span",name:"name",children:d}),(0,E.jsxs)(Qe.Sl,{tag:"span",name:"entity-id",children:["#",null!=(r=o.pk)?r:o.id]})]}),(0,x.isDefined)(o.acceptedState)?(0,E.jsx)(Qe.Sl,{name:"review",mod:{state:o.acceptedState},children:o.acceptedState}):(0,E.jsxs)(Qe.Sl,{name:"created",children:["created, ",(0,E.jsx)(Qe.Sl,{name:"date",component:hB,date:o.createdDate})]})]})]}),s]})}))})),CB=(0,v.WQ)("store")((0,v.PA)((({store:e,title:t,children:n})=>(0,E.jsx)(hr,{title:t,enabled:e.settings.enableTooltips,mouseEnterDelay:.8,children:n})))),SB=(0,v.WQ)((({store:e})=>{var t;return{store:e,history:null==e||null==(t=e.annotationStore)||null==(t=t.selected)?void 0:t.history}})),jB=SB((0,v.PA)((({store:e,history:t,annotation:n})=>{const r=e.hasInterface("review"),o=(0,x.isDefined)(e.annotationStore.selectedHistory),{userGenerate:i,sentUserGenerate:a,versions:s,results:l,editable:c}=n,d=[],[u,h]=(0,m.useState)(!1),g=!c||e.isSubmitting||o||u,p=e.hasInterface("annotations:deny-empty")&&0===l.length,f=(0,m.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,m.useMemo)((()=>(0,E.jsx)(CB,{title:"Reject annotation: [ Ctrl+Space ]",children:(0,E.jsx)(Qa,{"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,E.jsx)(CB,{title:"Accept annotation: [ Ctrl+Enter ]",children:(0,E.jsx)(Qa,{"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,E.jsxs)(Qe.Sl,{name:"skipped-info",children:[(0,E.jsx)(Jl,{color:"#d00"})," Was skipped"]},"skipped")),d.push((0,E.jsx)(CB,{title:"Cancel skip: []",children:(0,E.jsx)(Qa,{"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,E.jsx)(CB,{title:"Cancel (skip) task: [ Ctrl+Space ]",children:(0,E.jsx)(Qa,{"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=p?"Empty annotations denied in this project":"Save results: [ Ctrl+Enter ]";d.push((0,E.jsx)(CB,{title:t,children:(0,E.jsx)(Qe.Sl,{name:"tooltip-wrapper",children:(0,E.jsx)(Qa,{"aria-label":"submit",disabled:g||p,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,E.jsx)(CB,{title:"Update this task: [ Alt+Enter ]",children:(0,E.jsx)(Qa,{"aria-label":"submit",disabled:g||p,look:"primary",onClick:async()=>{await e.commentStore.commentFormSubmit(),e.updateAnnotation()},children:t?"Update":"Submit"})},"update");d.push(n)}}return(0,E.jsx)(Qe.eB,{name:"controls",children:d})}))),kB=(0,v.PA)((({store:e})=>{var t;const n=(0,m.useMemo)((()=>e.taskHistory.findIndex((t=>t.taskId===e.task.id))+1),[e.taskHistory]),[r,o]=(0,m.useState)(0),[i,a]=(0,m.useState)(0);(0,m.useEffect)((()=>{e.commentStore.setAddedCommentThisSession(!1);const t=(0,d.mJ)((()=>e.commentStore.comments.map((e=>e.isDeleted))),(e=>{a(e.filter((e=>!e)).length)}));return()=>{null==t||t()}}),[]),(0,m.useEffect)((()=>{e.commentStore.addedCommentThisSession&&o(i)}),[e.commentStore.addedCommentThisSession]);const s=e.hasInterface("topbar:prevnext"),l=e.hasInterface("topbar:task-counter");let c=!(0,x.isDefined)(e.annotationStore.selected.pk)&&(!(0,k.VS)(k.JO)||e.hasInterface("skip"))&&!e.canGoNextTask&&!e.hasInterface("review")&&e.hasInterface("postpone");return e.hasInterface("annotations:comments")&&(0,k.VS)(k.ow)&&(c=c&&e.commentStore.addedCommentThisSession&&i>=r),(0,E.jsx)(Qe.Sl,{name:"section",children:(0,E.jsxs)(Qe.eB,{name:"current-task",mod:{"with-history":s},style:{padding:(0,k.VS)(k.bA)&&0,width:(0,k.VS)(k.bA)&&"auto"},children:[(0,E.jsxs)(Qe.Sl,{name:"task-id",style:{fontSize:(0,k.VS)(k.bA)?12:14},children:[null!=(t=e.task.id)?t:R(),s&&l&&((0,k.VS)(k.P2)?(0,E.jsxs)(Qe.Sl,{name:"task-count",children:[e.queuePosition," of ",e.queueTotal]}):(0,E.jsxs)(Qe.Sl,{name:"task-count",children:[n," of ",e.taskHistory.length]}))]}),s&&(0,E.jsxs)(Qe.Sl,{name:"history-controls",mod:{newui:(0,k.VS)(k.bA)},children:[(0,E.jsx)(Qe.Sl,{tag:Qa,name:"prevnext",mod:{prev:!0,disabled:!e.canGoPrevTask,newui:(0,k.VS)(k.bA)},type:"link",disabled:!s||!e.canGoPrevTask,onClick:e.prevTask,style:{background:!(0,k.VS)(k.bA)&&"none",backgroundColor:(0,k.VS)(k.bA)&&"none"}}),(0,E.jsx)(Qe.Sl,{tag:Qa,name:"prevnext","data-testid":"next-task",mod:{next:!0,disabled:!e.canGoNextTask&&!c,postpone:!e.canGoNextTask&&c,newui:(0,k.VS)(k.bA)},type:"link",disabled:!e.canGoNextTask&&!c,onClick:e.canGoNextTask?e.nextTask:e.postponeTask,style:{background:!(0,k.VS)(k.bA)&&"none",backgroundColor:(0,k.VS)(k.bA)&&"none"}})]})]})})})),OB=(0,v.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,E.jsx)(Qe.eB,{name:"topbar",mod:{newLabelingUI:(0,k.VS)(k.bA)},children:(0,k.VS)(k.bA)?(0,E.jsxs)(Qe.Sl,{name:"group",children:[(0,E.jsx)(kB,{store:e}),e.hasInterface("annotations:view-all")&&(0,E.jsx)(hr,{title:"View all annotations",children:(0,E.jsx)(Qa,{className:"topbar__button",icon:(0,E.jsx)(tf,{}),type:"text","aria-label":"View All",onClick:t.toggleViewingAllAnnotations,primary:o,style:{height:36,width:36,padding:0,marginRight:(0,k.VS)(k.bA)&&8}})}),e.hasInterface("annotations:add-new")&&(0,E.jsx)(hr,{placement:"topLeft",title:"Create a new annotation",children:(0,E.jsx)(Qa,{icon:(0,E.jsx)(Ns,{}),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,E.jsx)(pB,{store:e,annotationStore:e.annotationStore,commentStore:e.commentStore})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(Qe.Sl,{name:"group",children:[(0,E.jsx)(kB,{store:e}),!o&&(0,E.jsx)(bB,{store:e,annotationStore:e.annotationStore,commentStore:e.commentStore}),(0,E.jsx)(vB,{store:e})]}),(0,E.jsxs)(Qe.Sl,{name:"group",children:[!o&&(0,E.jsx)(Qe.Sl,{name:"section",children:(0,E.jsx)(_D,{})}),!o&&e.hasInterface("controls")&&(e.hasInterface("review")||!r)&&(0,E.jsx)(Qe.Sl,{name:"section",mod:{flat:!0},style:{width:320,boxSizing:"border-box"},children:(0,E.jsx)(jB,{annotation:n})})]})]})}):null}));class RB extends m.Component{constructor(...e){super(...e),this.relationsRef=m.createRef(),this._notifyScroll=()=>{this.relationsRef.current&&this.relationsRef.current.onResize()}}componentDidMount(){window.blur(),document.body.focus()}renderSuccess(){return(0,E.jsx)(Qe.eB,{name:"editor",children:(0,E.jsx)(p.Ay,{status:"success",title:(0,u._$)(this.props.store).messages.DONE})})}renderNoAnnotation(){return(0,E.jsx)(Qe.eB,{name:"editor",children:(0,E.jsx)(p.Ay,{status:"success",title:(0,u._$)(this.props.store).messages.NO_COMP_LEFT})})}renderNothingToLabel(e){return(0,E.jsxs)(Qe.eB,{name:"editor",style:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",paddingBottom:"30vh"},children:[(0,E.jsx)(p.Ay,{status:"success",title:(0,u._$)(this.props.store).messages.NO_NEXT_TASK}),(0,E.jsx)(Qe.eB,{name:"sub__result",children:"You have completed all tasks in the queue!"}),(0,E.jsx)(Qa,{onClick:t=>e.prevTask(t,!0),look:"outlined",style:{margin:"16px 0"},children:"Go to Previous Task"})]})}renderNoAccess(){return(0,E.jsx)(Qe.eB,{name:"editor",children:(0,E.jsx)(p.Ay,{status:"warning",title:(0,u._$)(this.props.store).messages.NO_ACCESS})})}renderConfigValidationException(e){return(0,E.jsxs)(Qe.eB,{name:"main-view",children:[(0,E.jsx)(Qe.Sl,{name:"annotation",children:(0,E.jsx)(Pe,{errors:this.props.store.annotationStore.validation})}),!(0,k.VS)(k.bA)&&e.hasInterface("infobar")&&(0,E.jsxs)(Qe.Sl,{name:"infobar",children:["Task #",e.task.id]})]})}renderLoader(){return(0,E.jsx)(p.Ay,{icon:(0,E.jsx)(f.A,{size:"large"})})}_renderAll(e){if(1===e.length)return(0,E.jsx)(bN,{annotation:e[0],children:[K.renderItem(e[0].root)]});const t=(0,Qe.cn)("renderall").toClassName(),n=(0,Qe.cn)("fade").toClassName();return(0,E.jsx)("div",{className:t,children:e.map(((e,t)=>(0,E.jsx)("div",{className:n,children:(0,E.jsx)(bN,{annotation:e,children:[K.renderItem(e.root)]})},`all-${t}`)))})}_renderUI(e,t){var n,r;return t.viewingAll?this.renderAllAnnotations():(0,E.jsxs)(Qe.eB,{name:"main-view",onScrollCapture:this._notifyScroll,children:[(0,E.jsxs)(Qe.Sl,{name:"annotation",children:[(0,E.jsx)(KM,{root:e,annotation:t.selected}),this.renderRelations(t.selected),(0,k.VS)(k.v1)&&this.renderCommentsOverlay(t.selected)]}),!(0,k.VS)(k.bA)&&(0,u.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,u.Zn)(e).task;return(0,E.jsxs)(Qe.Sl,{name:"infobar",tag:ns,size:"small",children:[(0,E.jsxs)("span",{children:["Task #",t]}),n&&(0,E.jsx)("span",{children:n})]})}renderAllAnnotations(){const e=this.props.store.annotationStore,t=[...e.annotations,...e.predictions];return(0,k.VS)(k.F5)&&(0,x.sortAnnotations)(t),(0,E.jsx)(tN,{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,E.jsx)(vN,{store:n,ref:this.relationsRef,tags:e.names,taskData:r},R())}renderCommentsOverlay(e){const{store:t}=this.props,{commentStore:n}=t;return t.hasInterface("annotations:comments")&&n.isCommentable?(0,E.jsx)(Re,{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,E.jsx)(Qe.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,k.VS)(k.LE),u=(0,k.VS)(k.bA);return(0,E.jsxs)(Qe.eB,{name:"editor",mod:{fullscreen:s.fullscreen,_auto_height:!d},ref:(0,k.VS)(k.SM)?MM(this):null,children:[(0,E.jsx)(KN,{store:o}),(0,E.jsxs)(v.Kq,{store:o,children:[u?(0,E.jsx)(nN,{visible:o.showingDescription,onCancel:()=>o.toggleDescription(),title:o.hasInterface("review")?"Review Instructions":"Labeling Instructions",children:o.description}):(0,E.jsx)(E.Fragment,{children:o.showingDescription&&(0,E.jsx)(bN,{children:(0,E.jsx)("div",{dangerouslySetInnerHTML:{__html:(0,Ae.sanitizeHtml)(o.description)}})})}),(0,x.isDefined)(o)&&o.hasInterface("topbar")&&(0,E.jsx)(OB,{store:o}),(0,E.jsx)(Qe.eB,{name:"wrapper",mod:{viewAll:l,bsp:s.bottomSidePanel,outliner:d,showingBottomBar:u},children:d?u?(0,E.jsxs)(aB,{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,E.jsx)(WD,{store:o})]}):(0,E.jsx)(Oz,{panelsHidden:l,currentEntity:null!=(r=i.selectedHistory)?r:i.selected,regions:i.selected.regionStore,children:c}):(0,E.jsxs)(E.Fragment,{children:[c,!1===l&&(0,E.jsx)(Qe.eB,{name:"menu",mod:{bsp:s.bottomSidePanel},children:o.hasInterface("side-column")&&(0,E.jsx)(DN,{children:(0,E.jsx)(RD,{store:o})})}),u&&o.hasInterface("topbar")&&(0,E.jsx)(WD,{store:o})]})})]}),o.hasInterface("debug")&&(0,E.jsx)(UD,{store:o})]})}}const EB=(0,v.PA)(RB),_B={CONFIG:class{static validate(e){const t=[];Kj(e,null,[],t);const n=["id","children","name","toname","controlledTags","parentTypes"],r=[];for(const e of t)try{const o=b.getModelByTag(e.type),i=Dj(e,o);null!==i&&r.push(i);const a=Nj(e,o,t);null!==a&&r.push(a);const s=Vj(e,o);null!==s&&r.push(s),r.push(...Bj(e)),r.push(...zj(e,o,n))}catch(t){r.push(Mj.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:()=>[]}},AB=Object.keys(_B).reduce(((e,t)=>Object.assign({},e,{[t]:t})),{}),TB=u.gK.union(u.gK.string,u.gK.array(u.gK.string)),PB=u.gK.model({modelName:u.gK.string,field:u.gK.string,error:u.gK.string,value:u.gK.maybeNull(u.gK.string),validType:u.gK.maybeNull(TB)}).views((e=>({get identifier(){return[e.modelName,e.field,e.error,e.value].concat(e.validType).filter((e=>null!==e)).join("-")}})));class IB{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=_B[e];let r=[];var o;n?r=(null!=(o=n.validate(t))?o:[]).map((e=>{try{return PB.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 LB=u.gK.model("StoreExtender",{sharedStores:u.gK.optional(u.gK.map(jI),{})}).actions((e=>({addSharedStore(t){e.sharedStores.set(t.id,t)},beforeReset(){e.sharedStores.forEach((e=>{(0,u.Yo)(e)})),e.sharedStores.clear()},afterReset(){kI.forEach((t=>{e.addSharedStore(t)}))},beforeDestroy(){e.sharedStores.forEach((e=>{(0,u.Yo)(e),(0,u.zr)(e)})),e.sharedStores.clear()}}))),MB=u.gK.compose("HistoryItem",RP,u.gK.model({comment:u.gK.optional(u.gK.maybeNull(u.gK.string),null),actionType:u.gK.optional(u.gK.maybeNull(u.gK.string),null)})).preProcessSnapshot((e=>{var t,n;return Object.assign({},e,{pk:R(),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})})),KB=u.gK.union(RP,MB),DB=u.gK.model("AnnotationStore",{selected:u.gK.maybeNull(u.gK.reference(KB)),selectedHistory:u.gK.maybeNull(u.gK.safeReference(KB)),root:De.allModelsTypes(),names:u.gK.map(u.gK.reference(De.allModelsTypes())),toNames:u.gK.map(u.gK.array(u.gK.reference(De.allModelsTypes()))),annotations:u.gK.array(RP),predictions:u.gK.array(RP),history:u.gK.array(MB),viewingAllAnnotations:u.gK.optional(u.gK.boolean,!1),validation:u.gK.maybeNull(u.gK.array(PB))}).volatile((()=>({initialized:!1}))).views((e=>({get store(){return(0,u.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,u._$)(e).events.invoke("selectAnnotation",i,o,null!=r?r:{}),i.pk&&(0,u.PA)(e).addAnnotationToTaskHistory(i.pk),i}function r(t){return t&&e.addErrors([Mj.generalError(t)]),e.root=wM.create({id:"error"})}function o(t){if(e.root)return;if(!t)return e.root=wM.create({id:"empty"});let n;try{n=K.treeToModel(t,e.store)}catch(e){return console.error(e),r(e)}const o=b.getModelByTag(n.type),i=b.objectTypes().map((e=>e.name.replace("Model","").toLowerCase())),a=[];e.validate(AB.CONFIG,n);try{e.root=o.create(n)}catch(e){return console.error(e),r(e)}if((0,k.VS)(k.cE)){const{names:t,toNames:n}=K.extractNames(e.root);return t.forEach((t=>e.names.put(t))),n.forEach(((t,n)=>e.toNames.set(n,t))),K.traverseTree(e.root,(t=>{e.store.task&&t.updateValue&&t.updateValue(e.store)})),e.initialized=!0,e.root}return K.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:un.UDate.currentISODate()},t,{id:R(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 IB,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,k.VS)(k.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,k.VS)(k.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,k.VS)(k.K3)){const r=(0,x.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,u.Zn)(e).user)?void 0:a.id)?r:void 0}(0,k.VS)(k.F5)?e.annotations.push(n):e.annotations.unshift(n);const s=e.annotations.at((0,k.VS)(k.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,u.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,u._$)(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,u._$)(e).events.invoke("deleteAnnotation",e.store,t),(0,u.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=[]}}})),NB=u.gK.compose("AnnotationStore",DB,...(0,k.VS)(k.Ls)?[LB]:[]),VB=u.gK.model("Project",{id:u.gK.identifierNumber}).views((e=>({get app(){return(0,u.PA)(e)}}))),zB="SIDEPANEL_MODE_REGIONS",BB="SIDEPANEL_MODE_LABELS",HB=u.gK.model("SettingsModel",{enableHotkeys:u.gK.optional(u.gK.boolean,!0),enablePanelHotkeys:u.gK.optional(u.gK.boolean,!0),enableTooltips:u.gK.optional(u.gK.boolean,!1),enableLabelTooltips:u.gK.optional(u.gK.boolean,!0),continuousLabeling:!1,selectAfterCreate:!1,fullscreen:u.gK.optional(u.gK.boolean,!1),bottomSidePanel:u.gK.optional(u.gK.boolean,!1),sidePanelMode:u.gK.optional(u.gK.enumeration([zB,BB]),zB),imageFullSize:u.gK.optional(u.gK.boolean,!1),enableAutoSave:u.gK.optional(u.gK.boolean,!1),showLabels:u.gK.optional(u.gK.boolean,!1),showLineNumbers:!1,showAnnotationsPanel:u.gK.optional(u.gK.boolean,!0),showPredictionsPanel:u.gK.optional(u.gK.boolean,!0),preserveSelectedTool:u.gK.optional(u.gK.boolean,!0),enableSmoothing:u.gK.optional(u.gK.boolean,!0),videoHopSize:u.gK.optional(u.gK.number,10),isDestroying:u.gK.optional(u.gK.boolean,!1)}).views((e=>({get annotation(){return(0,u.Zn)(e).annotationStore.selected},get displayLabelsByDefault(){return e.sidePanelMode===BB}}))).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,u._$)(e);Object.keys(CN).map((n=>{"boolean"==typeof t.settings[n]?e[n]=t.settings[n]:e[n]=CN[n].defaultValue}))}(0,u.aQ)(e,(n=>{setTimeout((()=>{e.isDestroying||localStorage.setItem(t,JSON.stringify(n))}))}))},toggleShowLabels(){e.showLabels=!e.showLabels,un.HTML.toggleLabelsAndScores(e.showLabels)},toggleShowLineNumbers(){e.showLineNumbers=!e.showLineNumbers},toggleContinuousLabeling(){e.continuousLabeling=!e.continuousLabeling},toggleSelectAfterCreate(){e.selectAfterCreate=!e.selectAfterCreate},toggleSidepanelModel(){e.sidePanelMode=e.sidePanelMode===BB?zB:BB,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?kr.setScope(kr.DEFAULT_SCOPE):kr.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}}))),FB=u.gK.model({enable:u.gK.optional(u.gK.boolean,!1),username:u.gK.string,password:u.gK.string,to:u.gK.string}),WB=u.gK.model("Task",{id:u.gK.maybeNull(u.gK.number),load:u.gK.optional(u.gK.boolean,!1),auth:u.gK.maybeNull(FB),data:u.gK.maybeNull(u.gK.string),queue:u.gK.optional(u.gK.maybeNull(u.gK.string),null)}).views((e=>({get app(){return(0,u.PA)(e)},get dataObj(){return un.Checkers.isStringJSON(e.data)?JSON.parse(e.data):"object"==typeof e.data?e.data:null}}))),$B=u.gK.model({controls:u.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}}))),UB=u.gK.model("CustomButton",{id:u.gK.optional(u.gK.identifier,R),name:u.gK.string,title:u.gK.string,look:u.gK.maybe(u.gK.enumeration(["primary","danger","destructive","alt","outlined","active","disabled"])),tooltip:u.gK.maybe(u.gK.string),ariaLabel:u.gK.maybe(u.gK.string),disabled:u.gK.maybe(u.gK.boolean)}),ZB=kr("AppStore","Global Hotkeys"),GB=u.gK.model("AppStore",{config:u.gK.string,task:u.gK.maybeNull(WB),project:u.gK.maybeNull(VB),taskHistory:u.gK.array(u.gK.model({taskId:u.gK.number,annotationId:u.gK.maybeNull(u.gK.string)}),[]),interfaces:u.gK.array(u.gK.string),explore:u.gK.optional(u.gK.boolean,!1),annotationStore:u.gK.optional(NB,{annotations:[],predictions:[],history:[]}),commentStore:u.gK.optional(aP,{comments:[]}),user:u.gK.optional(u.gK.maybeNull(u.gK.safeReference(tP)),null),debug:!0===window.HTX_DEBUG,settings:u.gK.optional(HB,{}),description:u.gK.maybeNull(u.gK.string),showingSettings:u.gK.optional(u.gK.boolean,!1),showingDescription:u.gK.optional(u.gK.boolean,!1),isLoading:u.gK.optional(u.gK.boolean,!1),isSubmitting:!1,noTask:u.gK.optional(u.gK.boolean,!1),noAccess:u.gK.optional(u.gK.boolean,!1),labeledSuccess:u.gK.optional(u.gK.boolean,!1),showComments:!1,_autoAnnotation:!1,_autoAcceptSuggestions:!1,awaitingSuggestions:!1,users:u.gK.optional(u.gK.array(tP),[]),userLabels:(0,k.VS)(k.RI)?u.gK.optional($B,{controls:{}}):u.gK.undefined,queueTotal:u.gK.optional(u.gK.number,0),queuePosition:u.gK.optional(u.gK.number,0),commentClassificationConfig:u.gK.maybeNull(u.gK.string),customButtons:u.gK.map(u.gK.union(u.gK.string,UB,u.gK.array(u.gK.union(u.gK.string,UB))))}).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,k.VS)(k.F5)}))).views((e=>({get events(){return(0,u._$)(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,u._$)(e).forceAutoAnnotation},get forceAutoAcceptSuggestions(){return(0,u._$)(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"){Sn[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,x.delay)(200)]),(0,x.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(){OR.setRoot(e),window.Htx=e,e.attachHotkeys(),(0,u._$)(e).events.invoke("labelStudioLoad",e)},assignTask:function(t){t&&!un.Checkers.isString(t.data)&&(t=Object.assign({},t,{data:JSON.stringify(t.data)})),e.task=WB.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(){OR.removeAllTools(),kr.unbindAll(),e.attachHotkeys();const t=e.annotationStore;t&&(null==t.beforeReset||t.beforeReset(),(0,k.VS)(k.C8)&&AI(),(0,u.Yo)(t),(0,u.zr)(t)),e.annotationStore=NB.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,k.VS)(k.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,u._$)(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(){ZB.unbindAll(),e.hasInterface("submit","update","review")&&ZB.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,x.isDefined)(r.pk),s=!r.history.canUndo&&!r.draftId,l=(0,k.VS)(k.I8)&&a&&s;n&&o||t.viewingAll||l||r.isReadOnly()||(null==r||r.submissionInProgress(),i?e.acceptAnnotation():!a&&e.hasInterface("submit")?e.submitAnnotation():e.hasInterface("update")&&e.updateAnnotation())})),e.hasInterface("skip","review")&&ZB.addNamed("annotation:skip",(()=>{if(e.annotationStore.viewingAll)return;const t=e.annotationStore.selected;null==t||t.submissionInProgress(),e.hasInterface("review")?e.rejectAnnotation():e.skipTask()})),ZB.addNamed("region:delete-all",(()=>{const{selected:t}=e.annotationStore;window.confirm((0,u._$)(e).messages.CONFIRM_TO_DELETE_ALL_REGIONS)&&t.deleteAllRegions()})),ZB.addNamed("region:relation",(()=>{const t=e.annotationStore.selected;t&&t.highlightedNode&&!t.isLinkingMode&&t.startLinkingMode(F,t.highlightedNode)})),ZB.addNamed("region:focus",(t=>{t.preventDefault();const n=e.annotationStore.selected;n&&n.highlightedNode&&!n.isLinkingMode&&n.highlightedNode.requestPerRegionFocus()})),ZB.addNamed("region:unselect",(()=>{const t=e.annotationStore.selected;!t||t.isLinkingMode||t.isDrawing||(e.annotationStore.history.forEach((e=>{e.unselectAll()})),t.unselectAll())})),ZB.addNamed("region:visibility",(()=>{const t=e.annotationStore.selected;t&&!t.isLinkingMode&&t.hideSelectedRegions()})),ZB.addNamed("region:visibility-all",(()=>{const{selected:t}=e.annotationStore;t.regionStore.toggleVisibility()})),ZB.addNamed("annotation:undo",(()=>{const t=e.annotationStore.selected;t.isDrawing||t.undo()})),ZB.addNamed("annotation:redo",(()=>{const t=e.annotationStore.selected;t.isDrawing||t.redo()})),ZB.addNamed("region:exit",(()=>{const t=e.annotationStore.selected;t&&t.isLinkingMode?t.stopLinkingMode():t.isDrawing||t.unselectAll()})),ZB.addNamed("region:delete",(()=>{const t=e.annotationStore.selected;t&&t.deleteSelectedRegions()})),ZB.addNamed("region:cycle",(()=>{const t=e.annotationStore.selected;t&&t.regionStore.selectNext()})),ZB.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,u._$)(e).events.invoke("skipTask",e,t),e.incrementQueuePosition()}),"Error during skip, try again")},unskipTask:function(){e.isSubmitting||r((()=>{(0,u._$)(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,u._$)(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,k.VS)(k.Bg)||t.sendUserGenerate(),r((async()=>{if((0,k.VS)(k.Bg)){await e.waitForDraftSubmission();const r=await(0,u._$)(e).events.invoke("beforeSaveAnnotation",e,t,{event:n});if(r&&r.some((e=>!1===e)))return;t.sendUserGenerate()}await(0,u._$)(e).events.invoke(n,e,t),e.incrementQueuePosition(),(0,k.VS)(k.Bg)&&t.dropDraft()})),(0,k.VS)(k.Bg)||t.dropDraft())},updateAnnotation:function(t){if(e.isSubmitting)return;const n=e.annotationStore.selected;n.beforeSend(),n.validate()&&(r((async()=>{if((0,k.VS)(k.Bg)){const t=await(0,u._$)(e).events.invoke("beforeSaveAnnotation",e,n,{event:"updateAnnotation"});if(t&&t.some((e=>!1===e)))return}await(0,u._$)(e).events.invoke("updateAnnotation",e,n,t),e.incrementQueuePosition(),(0,k.VS)(k.Bg)&&(n.dropDraft(),!n.sentUserGenerate&&n.sendUserGenerate())})),(0,k.VS)(k.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,k.VS)(k.Bg)){const n=await(0,u._$)(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,u._$)(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,k.VS)(k.Bg)){const t=await(0,u._$)(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,u._$)(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,u._$)(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(JT()([...(0,u.dV)(e.users),...t],"id"))},enrichUsers:function(t){const n=(0,u.dV)(e.users),r={};n.forEach((e=>{r[e.id]=e}));const o=t.map((e=>Object.assign({},r[e.id],e)));e.setUsers(JT()([...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,u.L3)((function*(t,n){const r=R();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,u._$)(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,u._$)(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,u._$)(e).events.invoke("nextTask"),e.incrementQueuePosition()},incrementQueuePosition:function(t=1){e.queuePosition=(0,x.clamp)(e.queuePosition+t,1,e.queueTotal)},beforeDestroy(){OR.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,u.GG)(e,(n=>{(0,u.jX)(n)||(0,u.PA)(n)!==e||t.push(n)}));n=t.shift();)try{(0,u.zr)(n)}catch(e){console.log("Problem: ",e)}}}})),YB=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=GB.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 XB extends m.Component{constructor(...e){super(...e),this.state={initialized:!1}}componentDidMount(){YB(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,E.jsx)(EB,{store:this.store}):null}}var qB=n(30997);const JB={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 QB{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,d.jK)({isolateGlobalState:!0});class eH{static destroyAll(){eH.instances.forEach((e=>null==e.destroy?void 0:e.destroy())),eH.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 QB;const n=Object.assign({},JB,t);n.keymap&&kr.setKeymap(n.keymap),this.root=e,this.options=n,this.supportLegacyEvents(),this.createApp(),eH.instances.add(this)}on(e,t){this.events.on(e,t)}off(e,t){(0,x.isDefined)(t)?this.events.off(e,t):this.events.removeAll(e)}async createApp(){const{store:e}=await YB(this.options,this.events),t=this.getRootElement(this.root);this.store=e,window.Htx=this.store;const n=!1,r=()=>{(0,h.render)((0,E.jsx)(EB,{store:this.store}),t)},o=()=>{var e;if(null==(e=t.childNodes)||!e.length)return;const n=[...t.childNodes],r=PM(n[0]);(0,h.unmountComponentAtNode)(t),IM(n,r),IM([t],r)};r(),e.setAppControls({isRendered:()=>n,render:r,clear:o}),this.destroy=()=>{(0,k.VS)(k.SM)&&o(),AI(),(0,k.VS)(k.SM)&&this.store.selfDestroy(),(0,u.zr)(this.store),kr.unbindAll(),(0,k.VS)(k.SM)&&(this.store=null,this.destroy=null,eH.instances.delete(this))}}supportLegacyEvents(){Object.keys(qB.A).forEach((e=>{const t=this.options[e];if((0,x.isDefined)(t)){const n=(0,g.toCamelCase)(e.replace(/^on/,""));this.events.on(n,t)}}))}}eH.Component=XB,eH.instances=new Set,window.LabelStudio=eH;const tH=eH},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:()=>de,C8:()=>q,CZ:()=>X,Cw:()=>m,Er:()=>H,F2:()=>N,F5:()=>ie,Fk:()=>oe,Gd:()=>x,H:()=>C,I8:()=>ce,JO:()=>ue,K3:()=>w,Kg:()=>J,LE:()=>s,LG:()=>L,Lk:()=>g,Ls:()=>O,M3:()=>K,MV:()=>A,P2:()=>ne,PR:()=>S,RI:()=>d,SM:()=>F,TJ:()=>G,TU:()=>b,VS:()=>me,Zr:()=>R,_m:()=>ee,aT:()=>j,bA:()=>E,bP:()=>P,bT:()=>h,c0:()=>T,cE:()=>k,dY:()=>Z,eB:()=>B,fw:()=>f,gF:()=>D,id:()=>v,jS:()=>M,ow:()=>I,pG:()=>ae,pN:()=>se,q$:()=>Y,q_:()=>U,sI:()=>W,sg:()=>u,tz:()=>_,um:()=>te,v1:()=>he,vS:()=>y,vz:()=>p,x0:()=>c,xB:()=>le,xD:()=>re,xS:()=>$,y8:()=>z,yD:()=>Q,yP:()=>V});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_fix_front_dev_3730_shortcuts_initial_input_22122022_short",A="fflag_fix_front_dev_3793_relative_coords_short",T="fflag_fix_front_dev_4075_taxonomy_overlap_281222_short",P="fflag_feat_front_dev_4081_magic_wand_tool",I="fflag_fix_back_dev_4174_overlap_issue_experiments_10012023_short",L="fflag_feat_front_lsdv_e_278_contextual_scrolling_short",M="fflag_feat_all_lsdv_e_294_llm_annotations_180723_long",K="fflag_fix_font_lsdv_1148_hotkeys_namespaces_01022023_short",D="fflag_feat_front_lsdv_4583_multi_image_segmentation_short",N="fflag_feat_front_lsdv_4583_6_images_preloading_short",V="fflag_fix_font_lsdv_3009_draft_saving_stuck_130223_short",z="fflag_fix_front_lsdv_4600_lead_time_27072023_short",B="fflag_feat_front_lsdv_4659_skipduplicates_060323_short",H="fflag_feat_front_lsdv_4620_richtext_opimization_060423_short",F="fflag_fix_front_lsdv_4620_memory_leaks_100723_short",W="fflag_feat_front_lsdv_4620_outliner_optimization_310723_short",$="fflag_fix_all_lsdv_4711_cors_errors_accessing_task_data_short",U="fflag_feat_front_lsdv_4712_skipduplicates_editing_110423_short",Z="fflag_fix_front_lsdv_4881_timeseries_points_missing_140423_short",G="fflag_fix_front_lsdv_4988_dynamic_no_label_120523_short",Y="fflag_fix_front_lsdv_4930_selection_tool_fixes_240423_short",X="fflag_fix_front_lsdv_4992_hide_all_regions_04052023_short",q="fflag_fix_front_lsdv_4998_missed_dynamic_children_030523_short",J="fflag_fix_front_lsdv_5248_double_click_delay_280823_short",Q="fflag_feat_front_lsdv_5451_async_taxonomy_110823_short",ee="fflag_fix_front_leap_218_improve_performance_of_taxonomy_search_short",te="fflag_feat_front_lsdv_5452_taxonomy_labeling_110823_short",ne="fflag_fix_all_optic_79_task_count_is_wrong_short",re="fflag_fix_front_leap_149_taxonomy_selected_true_short",oe="fflag_feat_front_leap_187_video_seek_on_select_short",ie="fflag_fix_front_leap_443_select_annotation_once",ae="fflag_fix_front_leap_32_zoom_perf_190923_short",se="fflag_fix_leap_466_text_sanitization",le="fflag_fix_leap_246_multi_object_hotkeys_160124_short",ce="fflag_feat_all_leap_1081_reviewer_flow_updates",de="fflag_feat_all_leap_883_custom_script_270524_short",ue="fflag_feat_front_leap_1173_disable_postpone_skip_short",he="fflag_feat_all_leap_1430_per_field_comments_100924_short";function ge(){var e,t;return Object.assign({},null!=(e=null==(t=window.APP_SETTINGS)?void 0:t.feature_flags)?e:{})}function me(e){var t;const n=ge(),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:ge,isFF:me})},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});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=724.js.map \ No newline at end of file diff --git a/web/dist/apps/labelstudio/724.js.map b/web/dist/apps/labelstudio/724.js.map index d82fd5bf6b04..c079d98fc9f0 100644 --- a/web/dist/apps/labelstudio/724.js.map +++ b/web/dist/apps/labelstudio/724.js.map @@ -1 +1 @@ -{"version":3,"file":"724.js","mappings":"mIAAO,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,eAAgB,IAChBC,aAAc,I,gDCoChB,SACEC,mBAhEF,WAA+B,EAiE7BC,eAxCF,WAA2B,EAyCzBC,eApCF,WAA2B,EAqCzBC,cAhCF,WAA0B,EAiCxBC,kBAhDF,WAA8B,EAiD5BC,WAhEF,WAAuB,EAiErBC,aA5DF,WAAyB,EA6DvBC,mBAhFF,WAA+B,EAiF7BC,cAfF,SAAuBC,GAAS,EAgB9BC,WA1DF,WAAuB,EA2DrBC,mBA9EF,WAA+B,EA+E7BC,mBAnCF,SAA4BC,EAAYC,GAAqB,EAoC3DC,mBA/BF,SAA4BC,EAAOP,GAAS,EAgC1CQ,mBA3BF,SAA4BD,EAAOP,GAAS,EA4B1CS,qBAvBF,SAA8BC,GAAK,EAwBjCC,WApBF,SAAoBC,GAAa,EAqB/BC,WAnBF,SAAoBC,GAAa,E,aC5E7BC,C,0yCCmHJ,MAAMC,EAAW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vBA,EAAYvlM,MAAK,CAAC7P,EAAG8P,IAAM,IAAI+f,KAAK/f,EAAE+hM,aAAavsK,UAAY,IAAIzV,KAAK7vB,EAAE6xM,aAAavsK,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/assets/icons/timeline/region.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/TimelineRegionEditor.module.scss?a0cd","webpack://labelstudio/../../libs/editor/src/components/SidePanels/DetailsPanel/TimelineRegionEditor.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/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 { 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 { FF_DEV_2715, isFF } from \"../../utils/feature-flags\";\nimport { 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\n let type = region.type;\n if (type === \"audioregion\") {\n if (isFF(FF_DEV_2715)) {\n type = \"audioregion::ultra\";\n } else {\n type = \"audioregion::old\";\n }\n }\n switch (type) {\n case \"textrange\":\n case \"richtextregion\":\n case \"textarearegion\":\n case \"audioregion::old\":\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 \"audioregion::ultra\": {\n const bbox = region.bboxCoordsCanvas;\n const stageEl = region.parent?.stageRef?.current;\n const stageBbox = Geometry.getDOMBBox(stageEl, true);\n\n return bbox\n ? stageBbox\n ? {\n x: stageBbox.x + bbox.left,\n y: stageBbox.y + bbox.top,\n width: bbox.right - bbox.left,\n height: bbox.bottom - bbox.top,\n }\n : bbox\n : DEFAULT_BBOX;\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_DEV_2715, 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 // that's a tricky way to get watcher also for an exact result instead of whole region\n // works for global classifications and per-regions\n const isResult = !!node.from_name;\n if (isResult) {\n return DOMWatcher;\n }\n\n switch (node.type) {\n case \"richtextregion\":\n case \"paragraphs\":\n return DOMWatcher;\n case \"audioregion\": {\n if (isFF(FF_DEV_2715)) {\n return createPropertyWatcher([\"bboxTriggers\"]);\n }\n if (node.getRegionElement) {\n return DOMWatcher;\n }\n return null;\n }\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\",\"commentIcon\":\"commentIcon--X3v6h\",\"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 const isHidden = !node;\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 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 { 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 /**\n * This name historically is used for the region elements for getting their bboxes.\n * Now we need it for a result also.\n * Let's say \"Region\" here means just an area on the screen.\n * So that it's an element through which we can get the bbox for an area where classification takes place.\n */\n getRegionElement() {\n return self.from_name?.getRegionElement?.();\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\";\nimport { clamp } from \"../../utils/utilities\";\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 _ws_region: null,\n }))\n .views((self) => ({\n get bboxTriggers() {\n return [self.start, self.end, self._ws_region, self.object?._ws, self.object?._wfFrame];\n },\n get bboxCoordsCanvas() {\n if (!self.bboxTriggers) {\n return null;\n }\n\n const { _ws_region } = self;\n if (!_ws_region) return null;\n if (!_ws_region.inViewport) return null;\n\n const { xStart, xEnd, yStart, yEnd, visualizer } = _ws_region;\n return {\n left: clamp(xStart, 0, visualizer.width),\n top: yStart,\n right: clamp(xEnd, 0, visualizer.width),\n bottom: yEnd,\n };\n },\n\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 setWSRegion(wsRegion) {\n self._ws_region = wsRegion;\n\n if (wsRegion) {\n wsRegion.on(\"mouseOver\", self.onMouseOver);\n wsRegion.on(\"mouseLeave\", self.onMouseLeave);\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 { getType, 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 getPropertyType(name) {\n return getType(self).properties[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 { createRef } from \"react\";\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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 `