@pennsieve-viz/tsviewer 1.0.31 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BFLibraryButton-Dec5fit3.js → BFLibraryButton-CjW78KwZ.js} +1 -1
- package/dist/{BFLibraryButton-CnSdxNr1.cjs → BFLibraryButton-DGI5G53e.cjs} +1 -1
- package/dist/{IconSelection-CxtyAEya.cjs → IconSelection-BJc1giuT.cjs} +1 -1
- package/dist/{IconSelection-C_zQHxVs.js → IconSelection-ChXlHpsu.js} +1 -1
- package/dist/TSAnnotationCanvas-CfyqYTnB.js +730 -0
- package/dist/TSAnnotationCanvas-DhskkXWf.cjs +1 -0
- package/dist/{TSAnnotationModal-Bvz6Hr6c.cjs → TSAnnotationModal-Bde2b3U0.cjs} +1 -1
- package/dist/{TSAnnotationModal-Crb5zX1P.js → TSAnnotationModal-KX-_Afb3.js} +42 -42
- package/dist/{TSFilterModal-DdNCo0nH.js → TSFilterModal-BMSEMK8Y.js} +3 -3
- package/dist/{TSFilterModal-BA7WXDk1.cjs → TSFilterModal-RgvcihE6.cjs} +1 -1
- package/dist/TSScrubber-C90JS4pD.cjs +1 -0
- package/dist/{TSScrubber-BsoGLy_L.js → TSScrubber-DqCc3Zp7.js} +39 -39
- package/dist/{TSViewerCanvas-ByhDLibl.js → TSViewerCanvas-3TTYdC6T.js} +13 -13
- package/dist/{TSViewerCanvas-D_i1FrqG.cjs → TSViewerCanvas-BUlYMq9z.cjs} +2 -2
- package/dist/{TSViewerLayerWindow-Cf4J_lK_.js → TSViewerLayerWindow-B94J9tDk.js} +2 -2
- package/dist/{TSViewerLayerWindow-4ckQFmUZ.cjs → TSViewerLayerWindow-C5Va7dH9.cjs} +1 -1
- package/dist/{TSViewerToolbar-BLOSD8fd.cjs → TSViewerToolbar-B1q33g4K.cjs} +1 -1
- package/dist/{TSViewerToolbar-BxAiyYi7.js → TSViewerToolbar-ECRy1rzk.js} +6 -6
- package/dist/{TsAnnotationDeleteDialog-Dm0rbNQr.js → TsAnnotationDeleteDialog-3aMg8Pa_.js} +3 -3
- package/dist/{TsAnnotationDeleteDialog-B_ZIUOh2.cjs → TsAnnotationDeleteDialog-O-NFN0pa.cjs} +1 -1
- package/dist/index-B-qad683.cjs +1 -0
- package/dist/index-ZGQLYYRT.js +1459 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +7 -3
- package/dist/{pathOr-D8CyYHmd.cjs → pathOr-BHBhJmTE.cjs} +1 -1
- package/dist/{pathOr-CC_5pAvC.js → pathOr-Byg6zMXz.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/TSAnnotationCanvas-BuYjJ340.cjs +0 -1
- package/dist/TSAnnotationCanvas-DV93mqhV.js +0 -778
- package/dist/TSScrubber-KnkoGu88.cjs +0 -1
- package/dist/index-C3ilckwx.js +0 -1318
- package/dist/index-D8lvFC22.cjs +0 -1
|
@@ -2,8 +2,8 @@ import "./base-VCnLhxie.js";
|
|
|
2
2
|
import { E as f } from "./el-overlay-BMUWCEw_.js";
|
|
3
3
|
import { g as _, a as y, b as h } from "./el-input-DQtvBLS6.js";
|
|
4
4
|
import { createElementBlock as F, openBlock as s, renderSlot as S, resolveComponent as A, createBlock as u, withCtx as a, createElementVNode as l, createVNode as r, createTextVNode as i, Fragment as E, renderList as k, normalizeStyle as D, toDisplayString as L } from "vue";
|
|
5
|
-
import { g as C } from "./index-
|
|
6
|
-
import V from "./BFLibraryButton-
|
|
5
|
+
import { g as C } from "./index-ZGQLYYRT.js";
|
|
6
|
+
import V from "./BFLibraryButton-CjW78KwZ.js";
|
|
7
7
|
const w = {
|
|
8
8
|
name: "CircleIcon",
|
|
9
9
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const m=require("./el-overlay-D192MFpl.cjs"),r=require("./el-input-CwVmeiqs.cjs"),e=require("vue"),c=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const m=require("./el-overlay-D192MFpl.cjs"),r=require("./el-input-CwVmeiqs.cjs"),e=require("vue"),c=require("./index-B-qad683.cjs"),v=require("./BFLibraryButton-DGI5G53e.cjs"),p={name:"CircleIcon",props:{icon:{type:String},height:{type:String,default:"16"},width:{type:String,default:"16"},currentColor:{type:String,default:"#71747C"}}},b={class:"circle-icon"};function g(t,o,a,d,s,n){return e.openBlock(),e.createElementBlock("div",b,[e.renderSlot(t.$slots,"icon",{},void 0,!0)])}const _=c._export_sfc(p,[["render",g],["__scopeId","data-v-46dcef49"]]),f={name:"AnnotationLayerWindow",components:{CircleIcon:_,BfLibraryButton:v.default},props:{visible:{type:Boolean,default:!1}},data:function(){return{name:"",selectedColor:"",colorOptions:[{label:"Green",value:"#18BA62",iconBgColor:"#18BA62"},{label:"Gold",value:"#FFBC27",iconBgColor:"#FFBC27"},{label:"Red",value:"#E94B4B",iconBgColor:"#E94B4B"},{label:"Light Blue",value:"#2760FF",iconBgColor:"#2760FF"},{label:"Magenta",value:"#FF4FFF",iconBgColor:"#FF4FFF"},{label:"Cyan",value:"#50FFFF",iconBgColor:"#50FFFF"},{label:"Yellow",value:"#FFFF4E",iconBgColor:"#FFFF4E"},{label:"Purple",value:"#512BAF",iconBgColor:"#512BAF"},{label:"Lavendar",value:"#8A6ECF",iconBgColor:"#8A6ECF"},{label:"Teal",value:"#389BAD",iconBgColor:"#389BAD"},{label:"Dark Green",value:"#187D46",iconBgColor:"#187D46"},{label:"Brick Red",value:"#B12800",iconBgColor:"#B12800"},{label:"Dark Blue",value:"#0C2475",iconBgColor:"#0C2475"},{label:"Bright Orange",value:"#FF5321",iconBgColor:"#FF5321"},{label:"Pink",value:"#FF99CC",iconBgColor:"#FF99CC"},{label:"Tan",value:"#DCC180",iconBgColor:"#DCC180"},{label:"Medium Blue",value:"#0D4EFF",iconBgColor:"#0D4EFF"},{label:"Orange",value:"#FF6C21",iconBgColor:"#FF6C21"},{label:"Black",value:"#000000",iconBgColor:"#000000"},{label:"Gray",value:"#9B9B9B",iconBgColor:"#9B9B9B"},{label:"Lime",value:"#00FF00",iconBgColor:"#00FF00"},{label:"Salmon",value:"#FA8072",iconBgColor:"#FA8072"},{label:"Olive",value:"#808000",iconBgColor:"#808000"},{label:"Sienna",value:"#A0522D",iconBgColor:"#A0522D"}]}},methods:{close:function(){this.$emit("close-window")},handleFormSubmit:function(){this.$emit("createLayer",{name:this.name,color:this.selectedColor})},handleFormCancel:function(){this.close()}}},y={slot:"body"},V={class:"input-section"},h={class:"input-section"},E={class:"color-option"},k={style:{float:"right",color:"#8492a6","font-size":"13px"}},N={slot:"footer"},S={class:"button-wrapper"},w={class:"buttons"};function A(t,o,a,d,s,n){const u=r.ElInput,C=r.ElOption,F=r.ElSelect,i=e.resolveComponent("bf-library-button"),B=m.ElDialog;return e.openBlock(),e.createBlock(B,{"onUpdate:modelValue":o[2]||(o[2]=l=>a.visible=l),"model-value":a.visible,onClose:n.close,class:"timeseries-annotation-layer-modal",ref:"timeseries-filter-modal",title:"Annotation Layers"},{default:e.withCtx(()=>[e.createElementVNode("div",y,[e.createElementVNode("div",V,[o[3]||(o[3]=e.createTextVNode(" Layer Name: ",-1)),e.createVNode(u,{placeholder:"Add a Layer Name",modelValue:t.name,"onUpdate:modelValue":o[0]||(o[0]=l=>t.name=l),ref:"input"},null,8,["modelValue"])]),e.createElementVNode("div",h,[o[4]||(o[4]=e.createTextVNode(" Select Color: ",-1)),e.createVNode(F,{modelValue:t.selectedColor,"onUpdate:modelValue":o[1]||(o[1]=l=>t.selectedColor=l),placeholder:"Select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.colorOptions,l=>(e.openBlock(),e.createBlock(C,{key:l.value,label:l.label,value:l.value},{default:e.withCtx(()=>[e.createElementVNode("div",E,[e.createElementVNode("div",{style:e.normalizeStyle({backgroundColor:l.value,height:"30px",width:"30px",borderRadius:"50%"})},null,4),e.createElementVNode("div",k,e.toDisplayString(l.label),1)])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",N,[e.createElementVNode("div",S,[e.createElementVNode("div",w,[e.createVNode(i,{onClick:n.handleFormCancel},{default:e.withCtx(()=>[...o[5]||(o[5]=[e.createTextVNode("Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(i,{onClick:n.handleFormSubmit},{default:e.withCtx(()=>[...o[6]||(o[6]=[e.createTextVNode("Save ",-1)])]),_:1},8,["onClick"])])])])]),_:1},8,["model-value","onClose"])}const D=c._export_sfc(f,[["render",A],["__scopeId","data-v-117509d0"]]);exports.default=D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const x=require("./el-input-CwVmeiqs.cjs"),I=require("./el-input-number-Cxwc3-EL.cjs"),e=require("vue"),h=require("./index-D8lvFC22.cjs"),Z={name:"IconPreviousPage",props:{width:{type:Number,default:12},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},A=["width","height","fill"];function T(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 12 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M10.959,0.571 L3.756,5.52 C3.756,5.52 3.477,5.721 3.477,6.001 C3.477,6.281 3.756,6.48 3.756,6.48 L10.959,11.431 C11.531,11.811 12,11.53 12,10.805 L12,1.196 C12,0.469 11.531,0.188 10.959,0.571 Z M2,0 L1,0 C0.447,0 0,0.048 0,0.6 L0,11.4 C0,11.952 0.447,12 1,12 L2,12 C2.553,12 3,11.952 3,11.4 L3,0.6 C3,0.048 2.553,0 2,0 Z"},null,-1)])],8,A)}const F=h._export_sfc(Z,[["render",T]]),q={name:"IconNextAnnotationLeftFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},D=["width","height","fill"];function O(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 24 14"},[...l[0]||(l[0]=[e.createElementVNode("defs",null,[e.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-left-facing-a"})],-1),e.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{transform:"matrix(-1 0 0 1 6 0)"},[e.createElementVNode("mask",{id:"svgicon-next-annotation-left-facing-b",_fill:"#fff"},[e.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-left-facing-a"})]),e.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-left-facing-a"}),e.createElementVNode("g",{mask:"url(#svgicon-next-annotation-left-facing-b)",_fill:"#000"},[e.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),e.createElementVNode("g",{_fill:"#000"},[e.createElementVNode("path",{pid:"2",d:"M23.986 10.906l-5.6-2.506 2.303 5.6.63-2.611zM10 8.4h1.4v1.4H10zM12.8 8.4h1.4v1.4h-1.4zM15.6 8.4H17v1.4h-1.4zM10 5.6h1.4V7H10zM10 2.8h1.4v1.4H10zM18.4 5.6h1.4V7h-1.4zM18.4 2.8h1.4v1.4h-1.4zM10 0h1.4v1.4H10zM12.8 0h1.4v1.4h-1.4zM15.6 0H17v1.4h-1.4zM18.4 0h1.4v1.4h-1.4z"})])],-1)])],8,D)}const R=h._export_sfc(q,[["render",O]]),U={name:"IconNextAnnotationRightFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},j=["width","height","fill"];function X(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 24 14"},[...l[0]||(l[0]=[e.createElementVNode("defs",null,[e.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-right-facing-a"})],-1),e.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{transform:"translate(18)"},[e.createElementVNode("mask",{id:"svgicon-next-annotation-right-facing-b",_fill:"#fff"},[e.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-right-facing-a"})]),e.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-right-facing-a"}),e.createElementVNode("g",{mask:"url(#svgicon-next-annotation-right-facing-b)",_fill:"#000"},[e.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),e.createElementVNode("g",{_fill:"#000"},[e.createElementVNode("path",{pid:"2",d:"M13.986 10.906L8.386 8.4l2.303 5.6.63-2.611zM0 8.4h1.4v1.4H0zM2.8 8.4h1.4v1.4H2.8zM5.6 8.4H7v1.4H5.6zM0 5.6h1.4V7H0zM0 2.8h1.4v1.4H0zM8.4 5.6h1.4V7H8.4zM8.4 2.8h1.4v1.4H8.4zM0 0h1.4v1.4H0zM2.8 0h1.4v1.4H2.8zM5.6 0H7v1.4H5.6zM8.4 0h1.4v1.4H8.4z"})])],-1)])],8,j)}const G=h._export_sfc(U,[["render",X]]),J={name:"IconNextPage",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},K=["width","height","fill"];function Q(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 12 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M8.244,5.52 L1.041,0.571 C0.469,0.188 0,0.469 0,1.196 L0,10.805 C0,11.53 0.469,11.811 1.041,11.43 L8.244,6.479 C8.244,6.479 8.523,6.28 8.523,6.001 C8.523,5.721 8.244,5.52 8.244,5.52 Z M10,0 L11,0 C11.553,0 12,0.048 12,0.6 L12,11.4 C12,11.952 11.553,12 11,12 L10,12 C9.447,12 9,11.952 9,11.4 L9,0.6 C9,0.048 9.447,0 10,0 Z"},null,-1)])],8,K)}const W=h._export_sfc(J,[["render",Q]]),Y={name:"IconStopwatch",props:{width:{type:Number,default:15},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},ee=["width","height","fill"];function te(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 15 16"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M5.1008,5.396 C4.7432,5.616 6.0584,8.7896 6.3792,9.3064 C6.6592,9.7616 7.2536,9.9 7.7056,9.6216 C8.16,9.34 8.3016,8.7464 8.0216,8.2936 C7.704,7.7752 5.4576,5.1752 5.1008,5.396 Z M4.8328,1.9216 C5.5752,1.6632 6.3704,1.52 7.2,1.52 C8.0296,1.52 8.8248,1.6632 9.5672,1.9216 C9.8304,2.0128 10.1792,1.8296 10.0248,1.4328 C9.912,1.1448 9.8032,0.8632 9.7592,0.7488 C9.6544,0.4776 9.2792,0.2536 9.116,0.2168 C8.4984,0.0776 7.8584,0 7.2,0 C6.5416,0 5.9016,0.0776 5.2832,0.2168 C5.12,0.2536 4.7456,0.4776 4.6408,0.7488 C4.5968,0.8632 4.4872,1.1448 4.3752,1.4328 C4.2208,1.8296 4.5696,2.0136 4.8328,1.9216 Z M14.4784,2.5488 C14.3248,2.3648 14.1616,2.1848 13.988,2.0112 C13.8152,1.8376 13.6352,1.6752 13.452,1.5208 C13.3296,1.4176 12.9696,1.3336 12.7416,1.5616 C12.5144,1.7896 11.4232,2.8792 11.4232,2.8792 C11.7448,3.1096 12.0576,3.3632 12.3472,3.652 C12.6368,3.9408 12.8888,4.2536 13.12,4.576 C13.12,4.576 14.2104,3.4864 14.4376,3.2584 C14.6664,3.0296 14.5824,2.6704 14.4784,2.5488 Z M7.2,2.32 C3.62,2.32 0.7192,5.2208 0.7192,8.8 C0.7192,12.38 3.62,15.2808 7.2,15.2808 C10.7784,15.2808 13.68,12.38 13.68,8.8 C13.68,5.2216 10.7784,2.32 7.2,2.32 Z M7.2,13.6808 C4.5056,13.6808 2.32,11.496 2.32,8.8008 C2.32,6.1056 4.5048,3.9208 7.2,3.9208 C9.8952,3.9208 12.0808,6.1056 12.0808,8.8008 C12.0808,11.4952 9.8952,13.6808 7.2,13.6808 Z"},null,-1)])],8,ee)}const ne=h._export_sfc(Y,[["render",te]]),oe={name:"IconControllerPlay",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},le=["width","height","fill"];function re(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 20 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M10,6.001 C10,6.3 9.695,6.515 9.695,6.515 L1.134,11.818 C0.51,12.227 0,11.924 0,11.149 L0,0.852 C0,0.075 0.51,-0.226 1.135,0.182 L9.696,5.487 C9.695,5.487 10,5.702 10,6.001 Z"},null,-1)])],8,le)}const ae=h._export_sfc(oe,[["render",re]]),ie={name:"IconControllerPause",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},ce=["width","height","fill"];function de(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 20 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M2,0 C2.553,0 3,0.048 3,0.6 L3,11.4 C3,11.952 2.553,12 2,12 L1,12 C0.447,12 0,11.952 0,11.4 L0,0.6 C0,0.048 0.447,0 1,0 L2,0 Z M9,0 C9.553,0 10,0.048 10,0.6 L10,11.4 C10,11.952 9.553,12 9,12 L8,12 C7.447,12 7,11.952 7,11.4 L7,0.6 C7,0.048 7.447,0 8,0 L9,0 Z"},null,-1)])],8,ce)}const se=h._export_sfc(ie,[["render",de]]),ue={class:"timeseries-viewer-toolbar"},he={id:"left-controls"},fe={id:"center-controls"},me={id:"right-controls"},pe={__name:"TSViewerToolbar",props:{constants:{type:Object,required:!0},duration:{type:Number,required:!0},start:{type:Number,required:!0},globalZoomMult:{type:Number,default:1}},emits:["pageBack","pageForward","incrementZoom","decrementZoom","updateDuration","nextAnnotation","previousAnnotation","setStart","update:globalZoomMult"],setup(d,{emit:l}){const t=d,s=e.computed({get(){return 96*window.devicePixelRatio/(t.globalZoomMult*1)/25.4},set(r){i("update:globalZoomMult",96*window.devicePixelRatio/(r*1)/25.4)}}),i=l;e.ref(!0);const u=e.ref(!0),v=e.ref(!0);e.ref(0);const m=e.ref(!1),p=e.ref(null),w=e.ref(null),C=e.ref(150),N=e.ref(1e6),_=[{value:.5,label:"0.5x"},{value:1,label:"1x"},{value:2,label:"2x"},{value:5,label:"5x"},{value:10,label:"10x"}],V=e.computed(()=>m.value===!0?se:ae);let b=e.ref(t.duration/1e6);const g=e.computed({get(){return t.duration/1e6},set(r){const n=t.duration/1e6,f=r>n,c=r<n;let o=Math.max(.01,r);n===.1&&f?o=.2:n===.1&&c?o=.09:n===1&&f?o=2:n===1&&c?o=.9:n===10&&f?o=20:n===10&&c?o=9:o<.095?o=Math.round(o*100)/100:o<.95?o=Math.round(o*10)/10:o<9.5?o=Math.round(o):o<95?o=Math.round(o/10)*10:o=Math.round(o/100)*100,b.value=o,i("updateDuration",o)}}),M=e.computed(()=>{const r=g.value;return r<.1?.01:r<1?.1:r<10?1:r<100?10:100}),E=e.computed(()=>{const r=g.value;return r<1?2:r<10?1:0}),k=()=>{v.value=!v.value},y=()=>{m.value===!1?P():S()},B=()=>{i("pageBack")},L=()=>{i("pageForward")},$=()=>{i("nextAnnotation")},z=()=>{i("previousAnnotation")},P=()=>{m.value=!0;const r=()=>{i("setStart",t.start+N.value*p.value),w.value=setTimeout(r,C.value)};w.value=setTimeout(r,C.value)},S=()=>{m.value=!1,C.value=150,clearInterval(w.value)};return e.onMounted(()=>{p.value=1}),(r,n)=>{const f=I.ElInputNumber,c=x.ElTooltip,o=x.ElOption,H=x.ElSelect;return e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",he,[u.value?(e.openBlock(),e.createBlock(f,{key:0,modelValue:g.value,"onUpdate:modelValue":n[0]||(n[0]=a=>g.value=a),precision:E.value,step:M.value,min:.01,max:d.constants.MAXDURATION,"controls-position":"right"},{suffix:e.withCtx(()=>[...n[9]||(n[9]=[e.createTextVNode(" seconds ",-1)])]),_:1},8,["modelValue","precision","step","max"])):e.createCommentVNode("",!0),e.createVNode(f,{modelValue:s.value,"onUpdate:modelValue":n[1]||(n[1]=a=>s.value=a),precision:2,step:5,"controls-position":"right"},{suffix:e.withCtx(()=>[...n[10]||(n[10]=[e.createTextVNode(" uV/mm ",-1)])]),_:1},8,["modelValue"])]),e.createElementVNode("div",fe,[e.createVNode(c,{placement:"top-end",content:"Page Back"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[2]||(n[2]=a=>B())},[e.createVNode(F,{height:12,width:12})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Previous Annotation"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[3]||(n[3]=a=>z())},[e.createVNode(R,{height:12,width:18})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Automatic Forward"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[4]||(n[4]=a=>y())},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.value),{height:12,width:18}))])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Next Annotation"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[5]||(n[5]=a=>$())},[e.createVNode(G,{name:"next-annotation-right-facing",height:12,width:18})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Next Page"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[6]||(n[6]=a=>L())},[e.createVNode(W,{name:"icon-next-page",height:12,width:18})])]),_:1})]),e.createElementVNode("div",me,[e.createVNode(c,{placement:"top-end",content:"Toggle Play Back Speed Controls"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[7]||(n[7]=a=>k())},[e.createVNode(ne,{height:20,width:22})])]),_:1}),v.value?(e.openBlock(),e.createBlock(H,{key:0,modelValue:p.value,"onUpdate:modelValue":n[8]||(n[8]=a=>p.value=a),placeholder:"Select",size:"small",class:"playSelect"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,a=>e.createVNode(o,{key:a.value,label:a.label,value:a.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),n[11]||(n[11]=e.createElementVNode("div",null,null,-1))])}}},ge=h._export_sfc(pe,[["__scopeId","data-v-5a21438a"]]);exports.default=ge;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const x=require("./el-input-CwVmeiqs.cjs"),I=require("./el-input-number-Cxwc3-EL.cjs"),e=require("vue"),h=require("./index-B-qad683.cjs"),Z={name:"IconPreviousPage",props:{width:{type:Number,default:12},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},A=["width","height","fill"];function T(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 12 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M10.959,0.571 L3.756,5.52 C3.756,5.52 3.477,5.721 3.477,6.001 C3.477,6.281 3.756,6.48 3.756,6.48 L10.959,11.431 C11.531,11.811 12,11.53 12,10.805 L12,1.196 C12,0.469 11.531,0.188 10.959,0.571 Z M2,0 L1,0 C0.447,0 0,0.048 0,0.6 L0,11.4 C0,11.952 0.447,12 1,12 L2,12 C2.553,12 3,11.952 3,11.4 L3,0.6 C3,0.048 2.553,0 2,0 Z"},null,-1)])],8,A)}const F=h._export_sfc(Z,[["render",T]]),q={name:"IconNextAnnotationLeftFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},D=["width","height","fill"];function O(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 24 14"},[...l[0]||(l[0]=[e.createElementVNode("defs",null,[e.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-left-facing-a"})],-1),e.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{transform:"matrix(-1 0 0 1 6 0)"},[e.createElementVNode("mask",{id:"svgicon-next-annotation-left-facing-b",_fill:"#fff"},[e.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-left-facing-a"})]),e.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-left-facing-a"}),e.createElementVNode("g",{mask:"url(#svgicon-next-annotation-left-facing-b)",_fill:"#000"},[e.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),e.createElementVNode("g",{_fill:"#000"},[e.createElementVNode("path",{pid:"2",d:"M23.986 10.906l-5.6-2.506 2.303 5.6.63-2.611zM10 8.4h1.4v1.4H10zM12.8 8.4h1.4v1.4h-1.4zM15.6 8.4H17v1.4h-1.4zM10 5.6h1.4V7H10zM10 2.8h1.4v1.4H10zM18.4 5.6h1.4V7h-1.4zM18.4 2.8h1.4v1.4h-1.4zM10 0h1.4v1.4H10zM12.8 0h1.4v1.4h-1.4zM15.6 0H17v1.4h-1.4zM18.4 0h1.4v1.4h-1.4z"})])],-1)])],8,D)}const R=h._export_sfc(q,[["render",O]]),U={name:"IconNextAnnotationRightFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},j=["width","height","fill"];function X(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 24 14"},[...l[0]||(l[0]=[e.createElementVNode("defs",null,[e.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-right-facing-a"})],-1),e.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{transform:"translate(18)"},[e.createElementVNode("mask",{id:"svgicon-next-annotation-right-facing-b",_fill:"#fff"},[e.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-right-facing-a"})]),e.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-right-facing-a"}),e.createElementVNode("g",{mask:"url(#svgicon-next-annotation-right-facing-b)",_fill:"#000"},[e.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),e.createElementVNode("g",{_fill:"#000"},[e.createElementVNode("path",{pid:"2",d:"M13.986 10.906L8.386 8.4l2.303 5.6.63-2.611zM0 8.4h1.4v1.4H0zM2.8 8.4h1.4v1.4H2.8zM5.6 8.4H7v1.4H5.6zM0 5.6h1.4V7H0zM0 2.8h1.4v1.4H0zM8.4 5.6h1.4V7H8.4zM8.4 2.8h1.4v1.4H8.4zM0 0h1.4v1.4H0zM2.8 0h1.4v1.4H2.8zM5.6 0H7v1.4H5.6zM8.4 0h1.4v1.4H8.4z"})])],-1)])],8,j)}const G=h._export_sfc(U,[["render",X]]),J={name:"IconNextPage",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},K=["width","height","fill"];function Q(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 12 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M8.244,5.52 L1.041,0.571 C0.469,0.188 0,0.469 0,1.196 L0,10.805 C0,11.53 0.469,11.811 1.041,11.43 L8.244,6.479 C8.244,6.479 8.523,6.28 8.523,6.001 C8.523,5.721 8.244,5.52 8.244,5.52 Z M10,0 L11,0 C11.553,0 12,0.048 12,0.6 L12,11.4 C12,11.952 11.553,12 11,12 L10,12 C9.447,12 9,11.952 9,11.4 L9,0.6 C9,0.048 9.447,0 10,0 Z"},null,-1)])],8,K)}const W=h._export_sfc(J,[["render",Q]]),Y={name:"IconStopwatch",props:{width:{type:Number,default:15},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},ee=["width","height","fill"];function te(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 15 16"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M5.1008,5.396 C4.7432,5.616 6.0584,8.7896 6.3792,9.3064 C6.6592,9.7616 7.2536,9.9 7.7056,9.6216 C8.16,9.34 8.3016,8.7464 8.0216,8.2936 C7.704,7.7752 5.4576,5.1752 5.1008,5.396 Z M4.8328,1.9216 C5.5752,1.6632 6.3704,1.52 7.2,1.52 C8.0296,1.52 8.8248,1.6632 9.5672,1.9216 C9.8304,2.0128 10.1792,1.8296 10.0248,1.4328 C9.912,1.1448 9.8032,0.8632 9.7592,0.7488 C9.6544,0.4776 9.2792,0.2536 9.116,0.2168 C8.4984,0.0776 7.8584,0 7.2,0 C6.5416,0 5.9016,0.0776 5.2832,0.2168 C5.12,0.2536 4.7456,0.4776 4.6408,0.7488 C4.5968,0.8632 4.4872,1.1448 4.3752,1.4328 C4.2208,1.8296 4.5696,2.0136 4.8328,1.9216 Z M14.4784,2.5488 C14.3248,2.3648 14.1616,2.1848 13.988,2.0112 C13.8152,1.8376 13.6352,1.6752 13.452,1.5208 C13.3296,1.4176 12.9696,1.3336 12.7416,1.5616 C12.5144,1.7896 11.4232,2.8792 11.4232,2.8792 C11.7448,3.1096 12.0576,3.3632 12.3472,3.652 C12.6368,3.9408 12.8888,4.2536 13.12,4.576 C13.12,4.576 14.2104,3.4864 14.4376,3.2584 C14.6664,3.0296 14.5824,2.6704 14.4784,2.5488 Z M7.2,2.32 C3.62,2.32 0.7192,5.2208 0.7192,8.8 C0.7192,12.38 3.62,15.2808 7.2,15.2808 C10.7784,15.2808 13.68,12.38 13.68,8.8 C13.68,5.2216 10.7784,2.32 7.2,2.32 Z M7.2,13.6808 C4.5056,13.6808 2.32,11.496 2.32,8.8008 C2.32,6.1056 4.5048,3.9208 7.2,3.9208 C9.8952,3.9208 12.0808,6.1056 12.0808,8.8008 C12.0808,11.4952 9.8952,13.6808 7.2,13.6808 Z"},null,-1)])],8,ee)}const ne=h._export_sfc(Y,[["render",te]]),oe={name:"IconControllerPlay",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},le=["width","height","fill"];function re(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 20 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M10,6.001 C10,6.3 9.695,6.515 9.695,6.515 L1.134,11.818 C0.51,12.227 0,11.924 0,11.149 L0,0.852 C0,0.075 0.51,-0.226 1.135,0.182 L9.696,5.487 C9.695,5.487 10,5.702 10,6.001 Z"},null,-1)])],8,le)}const ae=h._export_sfc(oe,[["render",re]]),ie={name:"IconControllerPause",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},ce=["width","height","fill"];function de(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 20 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M2,0 C2.553,0 3,0.048 3,0.6 L3,11.4 C3,11.952 2.553,12 2,12 L1,12 C0.447,12 0,11.952 0,11.4 L0,0.6 C0,0.048 0.447,0 1,0 L2,0 Z M9,0 C9.553,0 10,0.048 10,0.6 L10,11.4 C10,11.952 9.553,12 9,12 L8,12 C7.447,12 7,11.952 7,11.4 L7,0.6 C7,0.048 7.447,0 8,0 L9,0 Z"},null,-1)])],8,ce)}const se=h._export_sfc(ie,[["render",de]]),ue={class:"timeseries-viewer-toolbar"},he={id:"left-controls"},fe={id:"center-controls"},me={id:"right-controls"},pe={__name:"TSViewerToolbar",props:{constants:{type:Object,required:!0},duration:{type:Number,required:!0},start:{type:Number,required:!0},globalZoomMult:{type:Number,required:!0}},emits:["pageBack","pageForward","incrementZoom","decrementZoom","updateDuration","nextAnnotation","previousAnnotation","setStart","update:globalZoomMult"],setup(d,{emit:l}){const t=d,s=e.computed({get(){return 96*window.devicePixelRatio/(t.globalZoomMult*1)/25.4},set(r){i("update:globalZoomMult",96*window.devicePixelRatio/(r*1)/25.4)}}),i=l;e.ref(!0);const u=e.ref(!0),v=e.ref(!0);e.ref(0);const m=e.ref(!1),p=e.ref(null),w=e.ref(null),C=e.ref(150),N=e.ref(1e6),_=[{value:.5,label:"0.5x"},{value:1,label:"1x"},{value:2,label:"2x"},{value:5,label:"5x"},{value:10,label:"10x"}],V=e.computed(()=>m.value===!0?se:ae);let b=e.ref(t.duration/1e6);const g=e.computed({get(){return t.duration/1e6},set(r){const n=t.duration/1e6,f=r>n,c=r<n;let o=Math.max(.01,r);n===.1&&f?o=.2:n===.1&&c?o=.09:n===1&&f?o=2:n===1&&c?o=.9:n===10&&f?o=20:n===10&&c?o=9:o<.095?o=Math.round(o*100)/100:o<.95?o=Math.round(o*10)/10:o<9.5?o=Math.round(o):o<95?o=Math.round(o/10)*10:o=Math.round(o/100)*100,b.value=o,i("updateDuration",o)}}),M=e.computed(()=>{const r=g.value;return r<.1?.01:r<1?.1:r<10?1:r<100?10:100}),E=e.computed(()=>{const r=g.value;return r<1?2:r<10?1:0}),k=()=>{v.value=!v.value},y=()=>{m.value===!1?P():S()},B=()=>{i("pageBack")},L=()=>{i("pageForward")},$=()=>{i("nextAnnotation")},z=()=>{i("previousAnnotation")},P=()=>{m.value=!0;const r=()=>{i("setStart",t.start+N.value*p.value),w.value=setTimeout(r,C.value)};w.value=setTimeout(r,C.value)},S=()=>{m.value=!1,C.value=150,clearInterval(w.value)};return e.onMounted(()=>{p.value=1}),(r,n)=>{const f=I.ElInputNumber,c=x.ElTooltip,o=x.ElOption,H=x.ElSelect;return e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",he,[u.value?(e.openBlock(),e.createBlock(f,{key:0,modelValue:g.value,"onUpdate:modelValue":n[0]||(n[0]=a=>g.value=a),precision:E.value,step:M.value,min:.01,max:d.constants.MAXDURATION,"controls-position":"right"},{suffix:e.withCtx(()=>[...n[9]||(n[9]=[e.createTextVNode(" seconds ",-1)])]),_:1},8,["modelValue","precision","step","max"])):e.createCommentVNode("",!0),e.createVNode(f,{modelValue:s.value,"onUpdate:modelValue":n[1]||(n[1]=a=>s.value=a),precision:2,step:5,"controls-position":"right"},{suffix:e.withCtx(()=>[...n[10]||(n[10]=[e.createTextVNode(" uV/mm ",-1)])]),_:1},8,["modelValue"])]),e.createElementVNode("div",fe,[e.createVNode(c,{placement:"top-end",content:"Page Back"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[2]||(n[2]=a=>B())},[e.createVNode(F,{height:12,width:12})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Previous Annotation"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[3]||(n[3]=a=>z())},[e.createVNode(R,{height:12,width:18})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Automatic Forward"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[4]||(n[4]=a=>y())},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.value),{height:12,width:18}))])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Next Annotation"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[5]||(n[5]=a=>$())},[e.createVNode(G,{name:"next-annotation-right-facing",height:12,width:18})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Next Page"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[6]||(n[6]=a=>L())},[e.createVNode(W,{name:"icon-next-page",height:12,width:18})])]),_:1})]),e.createElementVNode("div",me,[e.createVNode(c,{placement:"top-end",content:"Toggle Play Back Speed Controls"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[7]||(n[7]=a=>k())},[e.createVNode(ne,{height:20,width:22})])]),_:1}),v.value?(e.openBlock(),e.createBlock(H,{key:0,modelValue:p.value,"onUpdate:modelValue":n[8]||(n[8]=a=>p.value=a),placeholder:"Select",size:"small",class:"playSelect"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,a=>e.createVNode(o,{key:a.value,label:a.label,value:a.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),n[11]||(n[11]=e.createElementVNode("div",null,null,-1))])}}},ge=h._export_sfc(pe,[["__scopeId","data-v-1f059068"]]);exports.default=ge;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./base-VCnLhxie.js";
|
|
2
|
-
import { E as
|
|
2
|
+
import { E as O, a as U, b as j } from "./el-input-DQtvBLS6.js";
|
|
3
3
|
import { E as X } from "./el-input-number-DXCID3jJ.js";
|
|
4
4
|
import { createElementBlock as p, openBlock as u, createElementVNode as t, computed as C, ref as c, onMounted as G, createBlock as $, createCommentVNode as z, createVNode as s, withCtx as g, createTextVNode as N, resolveDynamicComponent as J, Fragment as K, renderList as Q } from "vue";
|
|
5
|
-
import { g as m } from "./index-
|
|
5
|
+
import { g as m } from "./index-ZGQLYYRT.js";
|
|
6
6
|
const W = {
|
|
7
7
|
name: "IconPreviousPage",
|
|
8
8
|
props: {
|
|
@@ -294,7 +294,7 @@ const Lt = /* @__PURE__ */ m(bt, [["render", yt]]), $t = { class: "timeseries-vi
|
|
|
294
294
|
},
|
|
295
295
|
globalZoomMult: {
|
|
296
296
|
type: Number,
|
|
297
|
-
|
|
297
|
+
required: !0
|
|
298
298
|
}
|
|
299
299
|
},
|
|
300
300
|
emits: [
|
|
@@ -384,7 +384,7 @@ const Lt = /* @__PURE__ */ m(bt, [["render", yt]]), $t = { class: "timeseries-vi
|
|
|
384
384
|
return G(() => {
|
|
385
385
|
_.value = 1;
|
|
386
386
|
}), (i, n) => {
|
|
387
|
-
const w = X, d =
|
|
387
|
+
const w = X, d = O, o = j, q = U;
|
|
388
388
|
return u(), p("div", $t, [
|
|
389
389
|
t("div", zt, [
|
|
390
390
|
v.value ? (u(), $(w, {
|
|
@@ -522,7 +522,7 @@ const Lt = /* @__PURE__ */ m(bt, [["render", yt]]), $t = { class: "timeseries-vi
|
|
|
522
522
|
]),
|
|
523
523
|
_: 1
|
|
524
524
|
}),
|
|
525
|
-
M.value ? (u(), $(
|
|
525
|
+
M.value ? (u(), $(q, {
|
|
526
526
|
key: 0,
|
|
527
527
|
modelValue: _.value,
|
|
528
528
|
"onUpdate:modelValue": n[8] || (n[8] = (a) => _.value = a),
|
|
@@ -544,7 +544,7 @@ const Lt = /* @__PURE__ */ m(bt, [["render", yt]]), $t = { class: "timeseries-vi
|
|
|
544
544
|
]);
|
|
545
545
|
};
|
|
546
546
|
}
|
|
547
|
-
}, At = /* @__PURE__ */ m(Pt, [["__scopeId", "data-v-
|
|
547
|
+
}, At = /* @__PURE__ */ m(Pt, [["__scopeId", "data-v-1f059068"]]);
|
|
548
548
|
export {
|
|
549
549
|
At as default
|
|
550
550
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./base-VCnLhxie.js";
|
|
2
2
|
import { E as k } from "./el-overlay-BMUWCEw_.js";
|
|
3
3
|
import { createElementBlock as a, openBlock as i, normalizeClass as T, createCommentVNode as f, createElementVNode as s, renderSlot as d, toDisplayString as u, resolveComponent as B, createBlock as A, withCtx as c, createVNode as r, Fragment as x, createTextVNode as h } from "vue";
|
|
4
|
-
import { g as m, p as V } from "./index-
|
|
5
|
-
import N from "./BFLibraryButton-
|
|
6
|
-
import { p as C } from "./pathOr-
|
|
4
|
+
import { g as m, p as V } from "./index-ZGQLYYRT.js";
|
|
5
|
+
import N from "./BFLibraryButton-CjW78KwZ.js";
|
|
6
|
+
import { p as C } from "./pathOr-Byg6zMXz.js";
|
|
7
7
|
const U = {
|
|
8
8
|
name: "DialogBody",
|
|
9
9
|
setup(e, { slots: t }) {
|
package/dist/{TsAnnotationDeleteDialog-B_ZIUOh2.cjs → TsAnnotationDeleteDialog-O-NFN0pa.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const C=require("./el-overlay-D192MFpl.cjs"),e=require("vue"),l=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const C=require("./el-overlay-D192MFpl.cjs"),e=require("vue"),l=require("./index-B-qad683.cjs"),y=require("./BFLibraryButton-DGI5G53e.cjs"),d=require("./pathOr-BHBhJmTE.cjs"),b={name:"DialogBody",setup(t,{slots:n}){return{hasSlot:i=>!!n[i]}},props:{fixedHeight:{type:Boolean,default:!1}},computed:{classNames:function(){const t=this.$slots.icon?"icon":"",n=this.fixedHeight?"fixed-height":"";return`dialog-body ${t} ${n}`}}},D={key:0,class:"dialog-body-icon"},k={key:1,class:"dialog-body-heading"},B={class:"dialog-body-content"};function V(t,n,s,i,a,o){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.classNames)},[i.hasSlot("icon")?(e.openBlock(),e.createElementBlock("div",D,[e.renderSlot(t.$slots,"icon",{},void 0,!0)])):e.createCommentVNode("",!0),i.hasSlot("heading")?(e.openBlock(),e.createElementBlock("div",k,[e.renderSlot(t.$slots,"heading",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",B,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],2)}const u=l._export_sfc(b,[["render",V],["__scopeId","data-v-690e953f"]]),N={name:"IconWarningCircle",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},v=["width","height","fill"];function w(t,n,s,i,a,o){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:s.width,height:s.height,fill:s.color,viewBox:"0 0 24 24"},[...n[0]||(n[0]=[e.createElementVNode("path",{pid:"0",d:"M22 11.4c-.1-2.7-1.3-5.1-3.3-6.9-.4-.4-1-.3-1.4.1-.4.4-.3 1 .1 1.4 1.6 1.4 2.5 3.4 2.7 5.5.1 2.1-.6 4.2-2 5.8s-3.4 2.5-5.5 2.7c-2.1.1-4.2-.6-5.8-2-1.6-1.4-2.5-3.4-2.7-5.5-.1-2.1.6-4.2 2-5.8 1.3-1.4 3.1-2.4 5-2.6V11c0 .6.4 1 1 1s1-.4 1-1V2h-1C9.2 2 6.4 3.2 4.5 5.3c-1.8 2-2.7 4.6-2.5 7.2.1 2.7 1.3 5.1 3.3 6.9C7.2 21.2 9.6 22 12 22c2.7 0 5.5-1.1 7.5-3.3 1.7-2 2.6-4.6 2.5-7.3z"},null,-1),e.createElementVNode("circle",{pid:"1",cx:"12",cy:"15.5",r:"1.5"},null,-1)])],8,v)}const f=l._export_sfc(N,[["render",w]]),S={name:"BfDialogHeader",props:{title:{type:String,default:""}},methods:{onClose:function(){this.$parent.handleClose()}}},$={class:"bf-dialog-header"},E={class:"bf-dialog-header-title"};function x(t,n,s,i,a,o){return e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("span",E,e.toDisplayString(s.title),1),this.$slots.tabs?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"icon-close",onClick:n[0]||(n[0]=(...r)=>o.onClose&&o.onClose(...r))})),e.renderSlot(t.$slots,"tabs",{},void 0,!0)])}const m=l._export_sfc(S,[["render",x],["__scopeId","data-v-1491a20c"]]),T={name:"TsAnnotationDeleteDialog",components:{BfDialogHeader:m,DialogBody:u,BfLibraryButton:y.default,IconWarningCircle:f},props:{visible:{type:Boolean,default:!1},deleteAnnotation:{type:Object,default:()=>({annotation:{},withDiscussions:!1})}},data:function(){return{isProcessing:!1}},computed:{annotationDescription:function(){return d.pathOr("",["annotation","label"],this.deleteAnnotation)},annotationDateTime:function(){const t=d.pathOr("",["annotation","start"],this.deleteAnnotation);return this.getUTCDateString(t)+" "+this.getUTCTimeString(t)},deleteDiscussions:function(){return l.propOr(!1,"withDiscussions",this.deleteAnnotation)},btnDeleteCopy:function(){return this.deleteDiscussions?"Yes, I'm sure":"Delete"}},methods:{removeAnnotation:function(){this.$emit("delete",this.deleteAnnotation.annotation)},close:function(){this.$emit("update:visible",!1)},onClosed:function(){this.isProcessing=!1,this.$emit("update:delete-annotation",{annotation:{},withDiscussions:!1})},getUTCDateString:function(t){return t>0?(t=new Date(t/1e3),t.toDateString()):"unknown"},getUTCTimeString:function(t){if(t>0)return t=t/1e3,t=new Date(t),("0"+t.getUTCHours()).slice(-2)+":"+("0"+t.getUTCMinutes()).slice(-2)+":"+("0"+t.getUTCSeconds()).slice(-2)}}},A={class:"dialog-simple-buttons"};function U(t,n,s,i,a,o){const r=m,p=f,c=e.resolveComponent("bf-library-button"),g=u,_=C.ElDialog;return e.openBlock(),e.createBlock(_,{class:"simple",modelValue:s.visible,"onUpdate:modelValue":n[0]||(n[0]=h=>s.visible=h),"show-close":!1,onClose:o.close,onClosed:o.onClosed},{default:e.withCtx(()=>[e.createVNode(r,{slot:"title"}),e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(p,{class:"mb-16",height:32,width:32,color:"#C14D49"}),n[5]||(n[5]=e.createElementVNode("h2",null,"Delete annotation?",-1)),o.deleteDiscussions?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("p",null,e.toDisplayString(o.annotationDescription)+" - "+e.toDisplayString(o.annotationDateTime),1),n[1]||(n[1]=e.createElementVNode("hr",null,null,-1)),n[2]||(n[2]=e.createElementVNode("p",null," Deleting this annotation will also remove any associated discussions and cannot be undone. ",-1)),n[3]||(n[3]=e.createElementVNode("p",null," Are you sure you would like to remove this annotation? ",-1))],64)):e.createCommentVNode("",!0),e.createElementVNode("div",A,[e.createVNode(c,{class:"secondary",onClick:o.close},{default:e.withCtx(()=>[...n[4]||(n[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(c,{class:"red",processing:t.isProcessing,onClick:o.removeAnnotation},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.btnDeleteCopy),1)]),_:1},8,["processing","onClick"])])]),_:1})]),_:1},8,["modelValue","onClose","onClosed"])}const I=l._export_sfc(T,[["render",U],["__scopeId","data-v-3cc4b959"]]);exports.default=I;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("vue"),ye=require("pinia"),kt=require("aws-amplify/auth");function C(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function N(t){return function e(n){return arguments.length===0||C(n)?e:t.apply(this,arguments)}}function U(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return C(n)?e:N(function(l){return t(n,l)});default:return C(n)&&C(r)?e:C(n)?N(function(l){return t(l,r)}):C(r)?N(function(l){return t(n,l)}):t(n,r)}}}function Lt(t,e){t=t||[],e=e||[];var n,r=t.length,l=e.length,c=[];for(n=0;n<r;)c[c.length]=t[n],n+=1;for(n=0;n<l;)c[c.length]=e[n],n+=1;return c}function we(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(n){return e.apply(this,arguments)};case 2:return function(n,r){return e.apply(this,arguments)};case 3:return function(n,r,l){return e.apply(this,arguments)};case 4:return function(n,r,l,c){return e.apply(this,arguments)};case 5:return function(n,r,l,c,y){return e.apply(this,arguments)};case 6:return function(n,r,l,c,y,m){return e.apply(this,arguments)};case 7:return function(n,r,l,c,y,m,I){return e.apply(this,arguments)};case 8:return function(n,r,l,c,y,m,I,h){return e.apply(this,arguments)};case 9:return function(n,r,l,c,y,m,I,h,s){return e.apply(this,arguments)};case 10:return function(n,r,l,c,y,m,I,h,s,p){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function ve(t){return function e(n,r,l){switch(arguments.length){case 0:return e;case 1:return C(n)?e:U(function(c,y){return t(n,c,y)});case 2:return C(n)&&C(r)?e:C(n)?U(function(c,y){return t(c,r,y)}):C(r)?U(function(c,y){return t(n,c,y)}):N(function(c){return t(n,r,c)});default:return C(n)&&C(r)&&C(l)?e:C(n)&&C(r)?U(function(c,y){return t(c,y,l)}):C(n)&&C(l)?U(function(c,y){return t(c,r,y)}):C(r)&&C(l)?U(function(c,y){return t(n,c,y)}):C(n)?N(function(c){return t(c,r,l)}):C(r)?N(function(c){return t(n,c,l)}):C(l)?N(function(c){return t(n,r,c)}):t(n,r,l)}}}const Ae=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function Nt(t){return t!=null&&typeof t["@@transducer/step"]=="function"}function Xe(t,e,n){return function(){if(arguments.length===0)return n();var r=arguments[arguments.length-1];if(!Ae(r)){for(var l=0;l<t.length;){if(typeof r[t[l]]=="function")return r[t[l]].apply(r,Array.prototype.slice.call(arguments,0,-1));l+=1}if(Nt(r)){var c=e.apply(null,Array.prototype.slice.call(arguments,0,-1));return c(r)}}return n.apply(this,arguments)}}function Ge(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}const He={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}};function me(t){return Object.prototype.toString.call(t)==="[object String]"}var Dt=N(function(e){return Ae(e)?!0:!e||typeof e!="object"||me(e)?!1:e.length===0?!0:e.length>0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1}),Rt=(function(){function t(e){this.f=e}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(e){return e},t.prototype["@@transducer/step"]=function(e,n){return this.f(e,n)},t})();function Ut(t){return new Rt(t)}var jt=U(function(e,n){return we(e.length,function(){return e.apply(n,arguments)})});function Mt(t,e,n){for(var r=0,l=n.length;r<l;){if(e=t["@@transducer/step"](e,n[r]),e&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}function Ne(t,e,n){for(var r=n.next();!r.done;){if(e=t["@@transducer/step"](e,r.value),e&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)}function De(t,e,n,r){return t["@@transducer/result"](n[r](jt(t["@@transducer/step"],t),e))}var Re=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function Ze(t,e,n){if(typeof t=="function"&&(t=Ut(t)),Dt(n))return Mt(t,e,n);if(typeof n["fantasy-land/reduce"]=="function")return De(t,e,n,"fantasy-land/reduce");if(n[Re]!=null)return Ne(t,e,n[Re]());if(typeof n.next=="function")return Ne(t,e,n);if(typeof n.reduce=="function")return De(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}function ge(t,e){return Object.prototype.hasOwnProperty.call(e,t)}var Ue=Object.prototype.toString,Je=(function(){return Ue.call(arguments)==="[object Arguments]"?function(e){return Ue.call(e)==="[object Arguments]"}:function(e){return ge("callee",e)}})(),xt=!{toString:null}.propertyIsEnumerable("toString"),je=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Me=(function(){return arguments.propertyIsEnumerable("length")})(),Wt=function(e,n){for(var r=0;r<e.length;){if(e[r]===n)return!0;r+=1}return!1},Ie=N(typeof Object.keys=="function"&&!Me?function(e){return Object(e)!==e?[]:Object.keys(e)}:function(e){if(Object(e)!==e)return[];var n,r,l=[],c=Me&&Je(e);for(n in e)ge(n,e)&&(!c||n!=="length")&&(l[l.length]=n);if(xt)for(r=je.length-1;r>=0;)n=je[r],ge(n,e)&&!Wt(l,n)&&(l[l.length]=n),r-=1;return l});const Ye=Number.isInteger||function(e){return e<<0===e};var Ke=U(function(e,n){var r=e<0?n.length+e:e;return me(n)?n.charAt(r):n[r]}),ne=U(function(e,n){if(n!=null)return Ye(e)?Ke(e,n):n[e]}),qt=ve(Ze),xe=N(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function $t(t,e){return function(){return e.call(this,t.apply(this,arguments))}}function Qe(t,e){return function(){var n=arguments.length;if(n===0)return e();var r=arguments[n-1];return Ae(r)||typeof r[t]!="function"?e.apply(this,arguments):r[t].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}var Ft=ve(Qe("slice",function(e,n,r){return Array.prototype.slice.call(r,e,n)})),Bt=N(Qe("tail",Ft(1,1/0)));function zt(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return we(arguments[0].length,qt($t,arguments[0],Bt(arguments)))}var Xt=N(function(e){return me(e)?e.split("").reverse().join(""):Array.prototype.slice.call(e,0).reverse()});function We(){if(arguments.length===0)throw new Error("compose requires at least one argument");return zt.apply(this,Xt(arguments))}function qe(t){for(var e=[],n;!(n=t.next()).done;)e.push(n.value);return e}function $e(t,e,n){for(var r=0,l=n.length;r<l;){if(t(e,n[r]))return!0;r+=1}return!1}function Gt(t){var e=String(t).match(/^function (\w*)/);return e==null?"":e[1]}function Ht(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}const Ce=typeof Object.is=="function"?Object.is:Ht;function Fe(t,e,n,r){var l=qe(t),c=qe(e);function y(m,I){return be(m,I,n.slice(),r.slice())}return!$e(function(m,I){return!$e(y,I,m)},c,l)}function be(t,e,n,r){if(Ce(t,e))return!0;var l=xe(t);if(l!==xe(e))return!1;if(typeof t["fantasy-land/equals"]=="function"||typeof e["fantasy-land/equals"]=="function")return typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e)&&typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t);if(typeof t.equals=="function"||typeof e.equals=="function")return typeof t.equals=="function"&&t.equals(e)&&typeof e.equals=="function"&&e.equals(t);switch(l){case"Arguments":case"Array":case"Object":if(typeof t.constructor=="function"&&Gt(t.constructor)==="Promise")return t===e;break;case"Boolean":case"Number":case"String":if(!(typeof t==typeof e&&Ce(t.valueOf(),e.valueOf())))return!1;break;case"Date":if(!Ce(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(!(t.source===e.source&&t.global===e.global&&t.ignoreCase===e.ignoreCase&&t.multiline===e.multiline&&t.sticky===e.sticky&&t.unicode===e.unicode))return!1;break}for(var c=n.length-1;c>=0;){if(n[c]===t)return r[c]===e;c-=1}switch(l){case"Map":return t.size!==e.size?!1:Fe(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size!==e.size?!1:Fe(t.values(),e.values(),n.concat([t]),r.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var y=Ie(t);if(y.length!==Ie(e).length)return!1;var m=n.concat([t]),I=r.concat([e]);for(c=y.length-1;c>=0;){var h=y[c];if(!(ge(h,e)&&be(e[h],t[h],m,I)))return!1;c-=1}return!0}var et=U(function(e,n){return be(e,n,[],[])});function Zt(t){return Object.prototype.toString.call(t)==="[object Object]"}var de=U(function(e,n){return n==null||n!==n?e:n});function Jt(t){var e=Object.prototype.toString.call(t);return e==="[object Uint8ClampedArray]"||e==="[object Int8Array]"||e==="[object Uint8Array]"||e==="[object Int16Array]"||e==="[object Uint16Array]"||e==="[object Int32Array]"||e==="[object Uint32Array]"||e==="[object Float32Array]"||e==="[object Float64Array]"||e==="[object BigInt64Array]"||e==="[object BigUint64Array]"}var Yt=N(function(e){return e!=null&&typeof e["fantasy-land/empty"]=="function"?e["fantasy-land/empty"]():e!=null&&e.constructor!=null&&typeof e.constructor["fantasy-land/empty"]=="function"?e.constructor["fantasy-land/empty"]():e!=null&&typeof e.empty=="function"?e.empty():e!=null&&e.constructor!=null&&typeof e.constructor.empty=="function"?e.constructor.empty():Ae(e)?[]:me(e)?"":Zt(e)?{}:Je(e)?(function(){return arguments})():Jt(e)?e.constructor.from(""):void 0}),Kt=(function(){function t(e,n){this.xf=n,this.f=e,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=He.init,t.prototype["@@transducer/result"]=function(e){return this.found||(e=this.xf["@@transducer/step"](e,-1)),this.xf["@@transducer/result"](e)},t.prototype["@@transducer/step"]=function(e,n){return this.idx+=1,this.f(n)&&(this.found=!0,e=Ge(this.xf["@@transducer/step"](e,this.idx))),e},t})(),Qt=U(function(e,n){return new Kt(e,n)}),G=U(Xe([],Qt,function(e,n){for(var r=0,l=n.length;r<l;){if(e(n[r]))return r;r+=1}return-1})),en=N(function(e){return e!=null&&et(e,Yt(e))}),B=ve(function(e,n,r){return et(n,ne(e,r))}),fe=ve(function(e,n,r){return de(e,ne(n,r))}),tn=U(function(e,n){return we(e.length,function(){try{return e.apply(this,arguments)}catch(r){return n.apply(this,Lt([r],arguments))}})});async function ue(){try{return kt.fetchAuthSession().then(t=>{var e;return(e=t==null?void 0:t.tokens)==null?void 0:e.accessToken.toString()})}catch(t){console.error(t)}}const nn=()=>({openConnection:async(e,n,r)=>await new Promise((y,m)=>{const I=e+"?session="+r+"&package="+n;console.log("Opening WebSocket connection to:",I);let h=null;const s=new WebSocket(I);s.onopen=()=>{console.log("🔗 WebSocket opened for package:",n);const p={montage:"NOT_MONTAGED",packageId:n};console.log("🎛️ Sending message payload"),s.send(JSON.stringify(p))},s.onclose=()=>{console.log("🔌 WebSocket closed for package:",n),h&&h.channelDetails?y({res:h.channelDetails,status:"websocket closed"}):(console.warn("No channel details received"),y({res:null,status:"websocket closed without data"}))},s.onmessage=p=>{console.log("WebSocket message received:",p.data),h=JSON.parse(p.data),s.close()},s.onerror=p=>{console.error("WebSocket error:",p),m(p)}})}),Y=new Map;let Be=!1,ze=!1;function he(t="default"){if(t==="default"&&!Be&&(Be=!0,console.warn('[TSViewer] Using default store instance. For multi-instance support, pass a unique instanceId prop to TSViewer. Example: <TSViewer instance-id="viewer-1" />')),Y.has(t))return Y.get(t)();const e=ye.defineStore(`tsviewer-${t}`,()=>{const n=o.reactive({}),r=o.ref([]),l=o.ref("NOT_MONTAGED"),c=o.ref({}),y=o.ref([]),m=o.ref(null),I=o.ref(null),h=o.ref({}),s=o.ref([]),p=o.ref({}),S=o.ref({}),E=o.ref("POINTER"),{openConnection:x}=nn(),j=o.computed(()=>i=>y.value.find(u=>u.name===i)),b=o.computed(()=>r.value.filter(i=>i.selected)),k=o.computed(()=>()=>{const i=s.value.find(u=>u.selected);return i||(console.warn("No active layer found, available layers:",s.value),s.value.length>0?s.value[0]:null)}),V=()=>{let i=!1;return s.value.forEach((u,g)=>{!u.id&&u.id!==0&&(console.error(`Layer at index ${g} missing ID:`,u),i=!0),u.annotations||(console.warn(`Layer at index ${g} missing annotations array:`,u),u.annotations=[])}),i&&console.error("Annotation layer validation failed. Layers:",s.value),!i},$=o.computed(()=>i=>s.value.flatMap(g=>g.annotations||[]).find(g=>g.id===i)),v=i=>{h.value=i},P=i=>{r.value=i},_=i=>{l.value=i},O=i=>{c.value=i},L=i=>{y.value=i},D=i=>{m.value=i},Z=i=>{I.value=i},R=i=>{Object.assign(n,i)},W=async i=>{const u=i.packageId,g=await ue();let M=n.timeseriesDiscoverApi,ae=null;ae=await x(M,u,g),v({channels:ae.res,content:{id:u}})},J=()=>i=>{var g;return((g=i==null?void 0:i.content)==null?void 0:g.state)==="READY"},K=i=>{const u=i.map(g=>(!g.id&&g.id!==0&&(console.warn("Annotation layer missing ID:",g),g.id=Math.random().toString(36).substr(2,9)),g.annotations||(g.annotations=[]),g.name||(g.name=`Layer ${g.id}`),g));s.value=u,console.log("Set annotations with validated structure:",u)},re=i=>{if(!i&&i!==0){console.error("setActiveAnnotationLayer called with invalid layerId:",i);return}p.value=i,s.value.forEach(g=>g.selected=!1);const u=G(B("id",i),s.value);u>=0?(s.value[u].selected=!0,console.log("Successfully set active layer:",s.value[u])):console.error("Layer with ID not found:",i,"Available layers:",s.value)},F=i=>{if(s.value.forEach(u=>{var g;return(g=u.annotations)==null?void 0:g.forEach(M=>M.selected=!1)}),i.id){const u=G(B("id",i.layer_id),s.value);if(u>=0){const g=G(B("id",i.id),s.value[u].annotations);g>=0&&(s.value[u].annotations[g].selected=!0)}}S.value=i},Q=i=>{E.value=i},z=i=>{if(!i.id&&i.id!==0){console.error("Cannot create layer without ID:",i);return}const u={id:i.id,name:i.name||`Layer ${i.id}`,description:i.description||"",visible:i.visible!==void 0?i.visible:!0,selected:i.selected||!1,annotations:i.annotations||[],color:i.color,hexColor:i.hexColor,bkColor:i.bkColor,selColor:i.selColor,userId:i.userId,...i};s.value.push(u),console.log("Created layer with validated structure:",u)},oe=i=>{const u=G(B("id",i.id),s.value);if(u>=0){const g=Object.assign(s.value[u],i);s.value[u]=g}},se=i=>{const u=G(B("id",i.id),s.value);u>=0&&s.value.splice(u,1)},ee=i=>{const u=G(B("id",i.layer_id),s.value);u>=0&&(s.value[u].annotations||(s.value[u].annotations=[]),s.value[u].annotations.push(i),F(i))},te=i=>{const u=G(B("id",i.layer_id),s.value);if(u>=0){const g=s.value[u].annotations,M=G(B("id",i.id),g);M>=0&&(g[M]=i)}},w=i=>{const u=G(B("id",i.layer_id),s.value);if(u>=0){const g=s.value[u].annotations,M=G(B("id",i.id),g);M>=0&&g.splice(M,1)}},T=(i,u,g)=>{const M=r.value.find(ae=>ae.id===i);M&&(M[u]=g)};return{viewerChannels:r,viewerMontageScheme:l,customMontageMap:c,workspaceMontages:y,viewerErrors:m,needsRerender:I,viewerAnnotations:s,activeAnnotationLayer:p,activeAnnotation:S,activeViewer:h,viewerActiveTool:E,config:n,getMontageMessageByName:j,viewerSelectedChannels:b,getViewerActiveLayer:k,getAnnotationById:$,setChannels:P,setViewerMontageScheme:_,setCustomMontageMap:O,setWorkspaceMontages:L,setViewerErrors:D,setAnnotations:K,setActiveAnnotationLayer:re,setActiveAnnotation:F,setActiveTool:Q,createLayer:z,updateLayer:oe,deleteLayer:se,createAnnotation:ee,updateAnnotation:te,deleteAnnotation:w,updateChannelProperty:T,updateChannelVisibility:(i,u)=>{T(i,"visible",u)},updateChannelSelection:(i,u)=>{T(i,"selected",u)},updateChannelFilter:(i,u)=>{T(i,"filter",u)},validateAnnotationLayers:V,resetViewer:()=>{r.value=[],l.value="NOT_MONTAGED",c.value={},y.value=[],m.value=null,s.value=[],p.value={},S.value={},E.value="POINTER",h.value={},Object.keys(n).forEach(i=>{delete n[i]})},triggerRerender:i=>{Z({timestamp:Date.now(),cause:i})},resetRerenderTrigger:()=>{I.value=null},isTSFileProcessed:J,fetchAndSetActiveViewer:W,setActiveViewer:v,setViewerConfig:R}});return Y.set(t,e),e()}function tt(t){Y.has(t)&&(Y.get(t)().resetViewer(),Y.delete(t))}function rn(){Y.forEach((t,e)=>{t().resetViewer()}),Y.clear()}function on(){return ze||(ze=!0,console.warn("[TSViewer] useViewerStore() is deprecated. Use createViewerStore(instanceId) for multi-instance support.")),he("default")}function an(t){if(useRoute().name==="docs-login")return;de(!1,ne("shouldShowToast",t));const n=de(!1,ne("shouldRedirect",t));this.clearState(),n&&this.$route.fullPath}const sn=t=>Object.prototype.toString.call(t)==="[object String]",ln=t=>{Object.keys(t).forEach(e=>{sn(t[e])&&(t[e]=t[e].trim())})};function cn(t,e){if(!t)return Promise.reject({status:400,message:"Url is missing!"});const n=fe("GET","method",e),r=fe({},"header",e),l=Object.assign({},{"Content-type":"application/json"},r),c=ne("body",e);let y={headers:l,method:n};if(c){typeof c=="object"&&ln(c);const m=JSON.stringify(c);y=Object.assign({},y,{body:m})}return fetch(t,y).then(m=>m.status>=400?Promise.reject(m):m.json().catch(()=>m))}function pe(t){const e=ne("status",t);let n;if(e===void 0){console.log(t);return}else n=t.status;if(n===400&&t.body)t.body.getReader().read().then(({done:r,value:l})=>{const c=l instanceof Uint8Array?String.fromCharCode.apply(null,l):l;We(de(c),tn(We(ne("message"),JSON.parse),(y,m)=>m))(c)});else if(n===401)return an()}function un(t=null){const e=t||o.inject("viewerStore",null)||he("default"),{viewerChannels:n,viewerAnnotations:r}=ye.storeToRefs(e),l=h=>h.id||"",c=h=>{h.sort(function(p,S){return p.start<S.start?-1:p.start>S.start?1:0})};return{viewerChannels:n,viewerAnnotations:r,addAnnotation:async(h=null)=>{const s=h||activeAnnotation.value;if(console.log("🔧 useTsAnnotation: addAnnotation called with:",s),!s||!s.layer_id)throw new TypeError("Missing annotation data or layer_id",s);if(s.id)throw new TypeError("Trying to create an annotation that already exists",s.id);let p=s.start,S=s.duration||s.end-s.start;const E=s.label,x=s.description,j=s.layer_id;if(!E)throw new Error("Annotation label is required");if(p==null)throw new Error("Annotation start time is required");S<0&&(S=-S,p=p-S);let b=[];if(console.log("🔧 useTsAnnotation: Processing channelIds...",{hasChannelIds:s.channelIds&&Array.isArray(s.channelIds),allChannels:s.allChannels,providedChannelIds:s.channelIds,availableChannels:n.value.length}),s.allChannels){console.log("🔧 useTsAnnotation: allChannels=true, adding all visible channels");const v=e.activeViewer.value.channels;for(let P=0;P<v.length;P++){const O=v[P].content.id;b.push(O),console.log("🔧 useTsAnnotation: Added channel ID:",O)}}else if(s.channelIds&&Array.isArray(s.channelIds)&&s.channelIds.length>0)b=s.channelIds,console.log("🔧 useTsAnnotation: Using provided channelIds:",b);else{console.log("🔧 useTsAnnotation: Computing from selected channels");for(let v=0;v<n.value.length;v++){const P=n.value[v];if(P.selected&&P.visible){const _=l(P);b.push(_),console.log("🔧 useTsAnnotation: Added selected channel ID:",_)}}}console.log("🔧 useTsAnnotation: Final channelIds:",b);const k={label:E,name:E,description:x||"",start:Math.floor(p),end:Math.floor(p+S),channelIds:b};console.log("🔧 useTsAnnotation: API payload:",k);const V=e.activeViewer.value.content.id,$=`${e.config.apiUrl}/timeseries/${V}/layers/${j}/annotations`;console.log("🔧 useTsAnnotation: API URL:",$);try{const v=await ue(),P=await fetch(`${$}?api_key=${v}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(k)});if(!P.ok){const D=await P.text();throw new Error(`HTTP ${P.status}: ${D}`)}const _=await P.json();console.log("🔧 useTsAnnotation: API success:",_);const O={name:"",id:_.id,label:_.label,description:_.description,start:_.start,duration:_.end-_.start,end:_.end,cStart:null,cEnd:null,selected:!0,channelIds:_.channelIds||b,allChannels:b.length===0||b.length>=n.value.length,layer_id:j,userId:_.userId};_.linkedPackage&&(O.linkedPackage=_.linkedPackage);let L=0;for(let D=0;D<r.value.length;D++)if(r.value[D].id===j){L=D;break}return e.createAnnotation(O),r.value[L]&&r.value[L].annotations&&c(r.value[L].annotations),O}catch(v){throw console.error("🔧 useTsAnnotation: Error creating annotation:",v),pe(v),v}},updateAnnotation:async(h=null)=>{const s=h||activeAnnotation.value;if(console.log("🔧 useTsAnnotation: updateAnnotation called with:",s),!s.id)throw new TypeError("Trying to update an annotation that doesn't exist on server",s.id);if(!s.layer_id)throw new TypeError("Missing layer_id for annotation update",s);let p=s.start,S=s.duration||s.end-s.start;S<0&&(S=-S,p=p-S);const E={label:s.label,description:s.description||"",start:Math.floor(p),end:Math.floor(p+S),channelIds:s.channelIds||[]};console.log("🔧 useTsAnnotation: Update API payload:",E);const x=e.activeViewer.value.content.id,j=`${e.config.apiUrl}/timeseries/${x}/layers/${s.layer_id}/annotations/${s.id}`;console.log("🔧 useTsAnnotation: Update API URL:",j);try{const b=await ue(),k=await fetch(`${j}?api_key=${b}`,{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(E)});if(!k.ok){const v=await k.text();throw new Error(`HTTP ${k.status}: ${v}`)}const V=await k.json();console.log("🔧 useTsAnnotation: Update API success:",V);const $={...s,...V,duration:V.end-V.start};return e.updateAnnotation($),V}catch(b){throw console.error("🔧 useTsAnnotation: Error updating annotation:",b),pe(b),b}},removeAnnotation:async h=>{if(!h||!h.id)throw new TypeError("Invalid annotation for deletion",h);let s="";if(h.layer?s=h.layer.id:s=h.layer_id,!s)throw new TypeError("Missing layer_id for annotation deletion",h);const p=e.activeViewer.value.content.id,S=`${e.config.apiUrl}/timeseries/${p}/layers/${s}/annotations/${h.id}`;console.log("🔧 useTsAnnotation: Delete API URL:",S);try{const E=await ue(),x=await fetch(`${S}?api_key=${E}`,{method:"DELETE",headers:{Accept:"application/json"}});if(!x.ok){const j=await x.text();throw new Error(`HTTP ${x.status}: ${j}`)}return console.log("🔧 useTsAnnotation: Delete API success"),e.deleteAnnotation(h),!0}catch(E){throw console.error("🔧 useTsAnnotation: Error deleting annotation:",E),pe(E),E}},sortAnns:c,getChannelId:l}}const nt=(t,e)=>{const n=t.__vccOpts||t;for(const[r,l]of e)n[r]=l;return n},dn={id:"channelCanvas"},fn=["data-id"],vn=["hidden"],hn=["hidden"],pn={__name:"TSViewer",props:{pkg:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!1},sidePanelOpen:{type:Boolean,default:!1},instanceId:{type:String,default:"default"}},setup(t,{expose:e}){const n=o.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./TSScrubber-C90JS4pD.cjs"))),r=o.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./TSViewerCanvas-BUlYMq9z.cjs")).then(a=>a.TSViewerCanvas)),l=o.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./TSViewerToolbar-B1q33g4K.cjs"))),c=o.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./TSFilterModal-RgvcihE6.cjs"))),y=o.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./TSAnnotationModal-Bde2b3U0.cjs"))),m=o.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./TsAnnotationDeleteDialog-O-NFN0pa.cjs"))),I=o.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./TSViewerLayerWindow-C5Va7dH9.cjs"))),h={TIMEUNIT:"microSeconds",XOFFSET:0,XGRIDSPACING:1e6,NRPXPERLABEL:150,USEREALTIME:!0,DEFAULTDPI:96,ANNOTATIONLABELHEIGHT:20,ROUNDDATAPIXELS:!1,MINMAXPOLYGON:!0,PAGESIZEDIVIDER:.5,PREFETCHPAGES:5,LIMITANNFETCH:500,USEMEDIAN:!1,CURSOROFFSET:5,SEGMENTSPAN:12096e8,MAXRECURSION:20,MAXDURATION:6e8,INITDURATION:15e6},s=t,p=he(s.instanceId),{viewerChannels:S,needsRerender:E}=ye.storeToRefs(p);o.provide("viewerStore",p),o.provide("viewerInstanceId",s.instanceId);const{addAnnotation:x,updateAnnotation:j,removeAnnotation:b}=un(p),k=o.ref(null),V=o.ref(null),$=o.ref(null),v=o.ref(null),P=o.ref(null),_=o.ref(null),O=o.ref(null),L=o.ref(null),D=o.ref(0),Z=o.ref(0),R=o.ref(0),W=o.ref(0),J=o.ref(0),K=o.ref(0),re=o.ref(0),F=o.ref(1),Q=o.ref(1/10),z=o.ref(!1),oe=o.ref(!1),se=o.ref(null),ee=o.ref(!1),te=o.ref(!1),w=o.computed(()=>p.activeViewer),T=o.computed(()=>S.value.map(a=>({...a,selected:!!a.selected}))),X=o.computed(()=>T.value.filter(a=>a.visible)),H=o.computed(()=>{let a=!1;return K.value/Se.value<30&&(a=!0),a}),Se=o.computed(()=>X.value.length),le=async()=>{if(console.log("onresize..."),!k.value)return;const a=document.getElementById("ts_viewer");if(!a)return;const f=window.getComputedStyle(a,null),d=parseInt(f.getPropertyValue("height")),A=s.isPreview?0:100;D.value=d-A,await o.nextTick(),Z.value=k.value.offsetWidth;const q=$.value;q&&(re.value=q.clientWidth,J.value=Z.value-q.clientWidth-16,K.value=D.value-40)};o.watch(()=>w.value,async(a,f)=>{var d,A,q;(d=V.value)!=null&&d.resetComponentState&&V.value.resetComponentState(),a&&a.channels&&a.channels.length>0&&Pe(),ke(),await o.nextTick(),(A=V.value)!=null&&A.initSegmentSpans&&V.value.initSegmentSpans(),(q=V.value)!=null&&q.getAnnotations&&V.value.getAnnotations()},{immediate:!1,deep:!0}),o.watch(Se,(a,f)=>{f!==void 0&&a!==f&&(console.log(`Number of visible channels changed from ${f} to ${a}`),setTimeout(()=>{var d;le(),(d=v.value)!=null&&d.renderAll&&v.value.renderAll()},20))});const Te=a=>{store.dispatch("viewerModule/setActiveAnnotation",a).then(()=>{v.value.renderAnnotationCanvas(),z.value=!0})};o.watch(E,a=>{a&&(console.log(`TSViewer: Re-rendering due to: ${a.cause} (${a.timestamp})`),o.nextTick(()=>{var f;a.cause==="channel-visibility"?setTimeout(()=>{var d;le(),(d=v.value)!=null&&d.renderAll&&v.value.renderAll()},10):(f=v.value)!=null&&f.renderAll&&v.value.renderAll()}),p.resetRerenderTrigger(null))},{deep:!0});const _e=a=>{Te(a)},i=async a=>{if(console.log("📍 TSViewer: onCreateUpdateAnnotation received:",a),!a||Object.keys(a).length===0){console.error("🚨 TSViewer: Received empty annotation!");return}if(!a.layer_id){console.error("🚨 TSViewer: annotation.layer_id is missing!",a);return}z.value=!1;try{a.id?(console.log("📍 TSViewer: Updating annotation via composable"),await j(a),u()):(console.log("📍 TSViewer: Creating annotation via composable"),await x(a),at()),console.log("📍 TSViewer: Annotation operation completed successfully")}catch(f){console.error("📍 TSViewer: Error creating/updating annotation:",f),z.value=!0}},u=()=>{v.value.renderAnnotationCanvas()},g=a=>{se.value=a,ee.value=!0},M=async a=>{ee.value=!1;try{await b(a),ae(),console.log("📍 TSViewer: Annotation deleted successfully")}catch(f){console.error("📍 TSViewer: Error deleting annotation:",f)}},ae=()=>{v.value.renderAnnotationCanvas()},ot=(a,f,d,A,q,ce)=>{if(console.log("📍 TSViewer: onAddAnnotation called with:",{startTime:a,duration:f,allChannels:d,label:A,description:q,layer:ce}),!ce||!ce.id){console.error("Invalid layer provided to onAddAnnotation:",ce);return}const Vt=p.viewerSelectedChannels||[],Ot=d?[]:Vt.map(Pt=>Pt.id),Le={id:null,label:A||"Event",description:q||"",start:Math.floor(a),end:Math.floor(a+f),duration:Math.floor(f),channelIds:Ot,allChannels:d,layer_id:ce.id,selected:!0,userId:null};console.log("📍 TSViewer: Created annotation object:",Le),p.setActiveAnnotation(Le),console.log("📍 TSViewer: Store now contains:",p.activeAnnotation),z.value=!0,console.log("📍 TSViewer: Modal opened with annotation data")},at=()=>{v.value.renderAnnotationCanvas()},it=a=>{v.value.createAnnotationLayer(a)},Ee=()=>{oe.value=!1},st=()=>{v.value.resetFocusedAnnotation(),v.value.renderAnnotationCanvas(),z.value=!1},lt=()=>{te.value=!1},ct=a=>{a.stopPropagation(),a.preventDefault();const f=a.detail.sourceEvent.metaKey;Ve({channelId:a.currentTarget.dataset.id,append:f}),v.value.renderAll()},ut=()=>{R.value=v.value.getNextAnnotation()},dt=()=>{R.value=v.value.getPreviousAnnotation()},ft=a=>{Oe(a*1e6)},vt=()=>{F.value=F.value*1.25},ht=()=>{F.value=F.value*.8},pt=()=>{V.value.getAnnotations()},gt=()=>{},yt=()=>{console.log("Page forward triggered from toolbar");const a=Math.max(R.value-3/4*W.value,O.value);ie(a),o.nextTick(()=>{var f;(f=v.value)==null||f.renderAll()})},wt=()=>{console.log("Page forward triggered from toolbar");const a=Math.min(R.value+3/4*W.value,L.value-W.value);console.log(`Moving from ${R.value} to ${a}`),ie(a),o.nextTick(()=>{var f,d;(f=v.value)!=null&&f.invalidate&&v.value.invalidate(),(d=v.value)!=null&&d.renderAll&&v.value.renderAll()})},At=a=>{let f=v.value.rsPeriod;ie(a.annotation.start-(Q.value*J.value-h.CURSOROFFSET)*f),o.nextTick(()=>{var d;(d=v.value)==null||d.renderAll()})},Ve=a=>{const f=S.value.map(d=>{const A=d.selected;return a.append===!1&&(d.selected=!1),a.channelId===d.id&&(d.selected=!A),d});p.setChannels(f)},mt=(a,f)=>{const d=S.value.map(A=>(f===!1&&(A.selected=!1),A.id in a&&(A.selected=!0),A));p.setChannels(d)},ie=a=>{R.value=a},St=a=>{Q.value=a},Tt=a=>{F.value=a},Oe=a=>{a>h.MAXDURATION?W.value=h.MAXDURATION:W.value=a},Ct=(a,f,d)=>(h.DEFAULTDPI*window.devicePixelRatio/(f*d)/25.4).toFixed(1)+" "+a.unit+"/mm",Pe=()=>{var f;const a=(f=w.value)==null?void 0:f.channels;if(console.log("🔄 initTimeRange called with channels:",(a==null?void 0:a.length)||0),a&&a.length>0){O.value=a[0].start,L.value=a[0].end;for(let A=1;A<a.length;A++)a[A].start<O.value&&(O.value=a[A].start),a[A].end>L.value&&(L.value=a[A].end);const d=R.value;R.value=O.value,console.log("📅 Time range initialized:",{ts_start:O.value,ts_end:L.value,oldStart:d,newStart:R.value,duration:W.value,startDate:new Date(O.value/1e3).toISOString(),endDate:new Date(L.value/1e3).toISOString()})}else console.warn("⚠️ initTimeRange: No channels found in activeViewer")},It=()=>{Pe()},bt=a=>{oe.value=!0},_t=a=>{const f=fe([],"channels",a),d=fe("","filter",a),A=P.value;A.onChannels=f,en(d)?(A.input0=NaN,A.input1=NaN,A.selectedFilter=null,A.selectedNotch=null):(A.input0=d.input0,A.input1=d.input1),te.value=!0},Et=a=>{v.value.setFilters(a)},ke=()=>{var a,f;(a=v.value)==null||a.initViewerCanvas(),(f=v.value)==null||f.renderAll()};return o.onMounted(()=>{It();const a=document.getElementById("ts_viewer");if(!a){console.warn("ts_viewer element not found");return}var f=window.getComputedStyle(a,null);const d=parseInt(f.getPropertyValue("height")),A=s.isPreview?0:100;D.value=d-A,k.value&&(Z.value=k.value.offsetWidth),window.addEventListener("resize",le);const q=$.value;q&&(re.value=q.clientWidth,J.value=Z.value-q.clientWidth-5-10,K.value=D.value-88),W.value=h.INITDURATION,ke()}),o.onBeforeUnmount(()=>{window.removeEventListener("resize",le),tt(s.instanceId)}),e({openEditAnnotationDialog:Te,confirmDeleteAnnotation:g,selectAnnotation:At,selectChannel:Ve,selectChannels:mt,openLayerWindow:bt,openFilterWindow:_t,setTimeseriesFilters:Et}),(a,f)=>(o.openBlock(),o.createElementBlock("div",{id:"ts_viewer",ref_key:"ts_viewer",ref:k,class:o.normalizeClass([t.isPreview?"timeseries-viewer preview":"timeseries-viewer"])},[o.createVNode(o.unref(n),{ref_key:"scrubber",ref:V,ts_start:O.value,ts_end:L.value,"c-width":J.value,"label-width":re.value,"cursor-loc":Q.value,start:R.value,duration:W.value,constants:h,"active-viewer":w.value,onSetStart:ie},null,8,["ts_start","ts_end","c-width","label-width","cursor-loc","start","duration","active-viewer"]),o.createElementVNode("div",dn,[o.createElementVNode("div",{id:"channelLabels",ref_key:"channelLabels",ref:$},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(X.value,d=>(o.openBlock(),o.createElementBlock("div",{key:d.displayName,class:"chLabelWrap","data-id":d.id,onTap:ct},[o.createElementVNode("div",{class:o.normalizeClass([d.selected?"labelDiv selected":"labelDiv"])},o.toDisplayString(d.displayName),3),o.createElementVNode("div",{class:o.normalizeClass(["chLabelIndWrap",[d.selected?"selected":""]]),hidden:H.value},[o.createElementVNode("div",{class:"chLabelInd",hidden:H.value},o.toDisplayString(Ct(d,F.value,d.rowScale)),9,hn)],10,vn)],40,fn))),128))],512),o.createVNode(o.unref(r),{ref_key:"viewerCanvas",ref:v,window_height:D.value,window_width:Z.value,duration:W.value,start:R.value,"c-width":J.value,"c-height":K.value,constants:h,"ts-start":O.value,"ts-end":L.value,"cursor-loc":Q.value,"global-zoom-mult":F.value,"active-viewer":w.value,onSetStart:ie,onSetCursor:St,onSetGlobalZoom:Tt,onSetDuration:Oe,onChannelsInitialized:gt,onAnnLayersInitialized:pt,onCloseAnnotationLayerWindow:Ee,onAddAnnotation:ot,onUpdateAnnotation:_e},null,8,["window_height","window_width","duration","start","c-width","c-height","ts-start","ts-end","cursor-loc","global-zoom-mult","active-viewer"])]),t.isPreview?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(l),{key:0,constants:h,duration:W.value,start:R.value,onPageBack:yt,onPageForward:wt,onIncrementZoom:vt,onDecrementZoom:ht,onUpdateDuration:ft,onNextAnnotation:ut,onPreviousAnnotation:dt,onSetStart:ie},null,8,["duration","start"])),o.createVNode(o.unref(c),{ref_key:"filterWindow",ref:P,visible:te.value,"onUpdate:visible":f[0]||(f[0]=d=>te.value=d),onCloseWindow:lt},null,8,["visible"]),o.createVNode(o.unref(y),{ref_key:"annotationModal",ref:_,visible:z.value,"onUpdate:visible":f[1]||(f[1]=d=>z.value=d),onCloseWindow:st,onCreateUpdateAnnotation:i},null,8,["visible"]),o.createVNode(o.unref(m),{visible:ee.value,"delete-annotation":se.value,"onUpdate:visible":f[2]||(f[2]=d=>ee.value=d),onDelete:M},null,8,["visible","delete-annotation"]),o.createVNode(o.unref(I),{visible:oe.value,onCloseWindow:Ee,onCreateLayer:it},null,8,["visible"])],2))}},rt=nt(pn,[["__scopeId","data-v-7aeaeec1"]]);function gn(t="default"){const e=he(t),{viewerChannels:n,viewerAnnotations:r,viewerActiveTool:l,viewerSelectedChannels:c,activeAnnotation:y,activeAnnotationLayer:m,viewerMontageScheme:I,viewerErrors:h,config:s,activeViewer:p}=ye.storeToRefs(e),S=o.readonly(n),E=o.computed(()=>c.value),x=o.readonly(r),j=o.readonly(l),b=o.readonly(I),k=o.readonly(h),V=o.readonly(s),$=o.readonly(p);return{channels:S,selectedChannels:E,annotations:x,activeTool:j,montageScheme:b,errors:k,viewerConfig:V,viewer:$,getChannel:w=>n.value.find(T=>T.id===w),getAnnotation:w=>e.getAnnotationById(w),getActiveLayer:()=>e.getViewerActiveLayer(),getVisibleChannels:()=>n.value.filter(w=>w.visible),getState:()=>({channels:n.value,selectedChannels:c.value,annotations:r.value,activeLayer:e.getViewerActiveLayer(),activeTool:l.value,montageScheme:I.value,errors:h.value}),selectChannels:(w,T=!1)=>{const X=n.value.map(H=>({...H,selected:T?H.selected:!1}));X.forEach(H=>{w.includes(H.id)&&(H.selected=!0)}),e.setChannels(X)},clearChannelSelection:()=>{const w=n.value.map(T=>({...T,selected:!1}));e.setChannels(w)},toggleChannelVisibility:w=>{const T=n.value.find(X=>X.id===w);T&&(e.updateChannelVisibility(w,!T.visible),e.triggerRerender("channel-visibility"))},setChannelVisibility:(w,T)=>{e.updateChannelVisibility(w,T),e.triggerRerender("channel-visibility")},showAllChannels:()=>{n.value.forEach(w=>{e.updateChannelVisibility(w.id,!0)}),e.triggerRerender("channel-visibility")},hideAllChannels:()=>{n.value.forEach(w=>{e.updateChannelVisibility(w.id,!1)}),e.triggerRerender("channel-visibility")},selectAnnotation:w=>{const T=e.getAnnotationById(w);T&&e.setActiveAnnotation(T)},setActiveLayer:w=>{e.setActiveAnnotationLayer(w)},toggleLayerVisibility:w=>{const T=r.value.find(X=>X.id===w);T&&(T.visible=!T.visible,e.updateLayer(T),e.triggerRerender("layer-visibility"))},setActiveTool:w=>{e.setActiveTool(w)},setConfig:w=>{e.setViewerConfig(w)},setActiveViewer:w=>{e.setActiveViewer(w)},triggerRerender:(w="external")=>{e.triggerRerender(w)},reset:()=>{e.resetViewer()},store:e}}const yn={install(t){t.component("TSViewer",rt)}};exports.TSViewer=rt;exports._arity=we;exports._curry1=N;exports._curry2=U;exports._curry3=ve;exports._dispatchable=Xe;exports._export_sfc=nt;exports._isInteger=Ye;exports._isPlaceholder=C;exports._reduce=Ze;exports._reduced=Ge;exports._xfBase=He;exports.clearAllViewerStores=rn;exports.clearViewerStore=tt;exports.createViewerStore=he;exports.defaultTo=de;exports.index=yn;exports.keys=Ie;exports.nth=Ke;exports.propEq=B;exports.propOr=fe;exports.useHandleXhrError=pe;exports.useSendXhr=cn;exports.useToken=ue;exports.useViewerControls=gn;exports.useViewerStore=on;
|