@annotorious/svelte 3.0.0-rc.3 → 3.0.0-rc.4
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/annotorious-svelte.es.js +2 -2
- package/dist/annotorious-svelte.es10.js +122 -2
- package/dist/annotorious-svelte.es10.js.map +1 -1
- package/dist/annotorious-svelte.es11.js +2 -20662
- package/dist/annotorious-svelte.es11.js.map +1 -1
- package/dist/annotorious-svelte.es12.js +15 -118
- package/dist/annotorious-svelte.es12.js.map +1 -1
- package/dist/annotorious-svelte.es13.js +4 -2
- package/dist/annotorious-svelte.es13.js.map +1 -1
- package/dist/annotorious-svelte.es14.js +7 -16
- package/dist/annotorious-svelte.es14.js.map +1 -1
- package/dist/annotorious-svelte.es15.js +7 -4
- package/dist/annotorious-svelte.es15.js.map +1 -1
- package/dist/annotorious-svelte.es4.js +1 -1
- package/dist/annotorious-svelte.es5.js +353 -353
- package/dist/annotorious-svelte.es5.js.map +1 -1
- package/dist/annotorious-svelte.es6.js +14 -15
- package/dist/annotorious-svelte.es6.js.map +1 -1
- package/dist/annotorious-svelte.es7.js +9 -9
- package/dist/annotorious-svelte.es8.js.map +1 -1
- package/dist/annotorious-svelte.es9.js +20123 -6
- package/dist/annotorious-svelte.es9.js.map +1 -1
- package/package.json +2 -2
- package/dist/annotorious-svelte.es16.js +0 -11
- package/dist/annotorious-svelte.es16.js.map +0 -1
- package/dist/annotorious-svelte.es17.js +0 -10
- package/dist/annotorious-svelte.es17.js.map +0 -1
- package/dist/annotorious-svelte.es18.js +0 -5
- package/dist/annotorious-svelte.es18.js.map +0 -1
|
@@ -5,14 +5,14 @@ function qt(t, n) {
|
|
|
5
5
|
t[r] = n[r];
|
|
6
6
|
return t;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function Yt(t) {
|
|
9
9
|
return t();
|
|
10
10
|
}
|
|
11
11
|
function Mt() {
|
|
12
12
|
return /* @__PURE__ */ Object.create(null);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
t.forEach(
|
|
14
|
+
function z(t) {
|
|
15
|
+
t.forEach(Yt);
|
|
16
16
|
}
|
|
17
17
|
function _(t) {
|
|
18
18
|
return typeof t == "function";
|
|
@@ -20,10 +20,10 @@ function _(t) {
|
|
|
20
20
|
function Et(t, n) {
|
|
21
21
|
return t != t ? n == n : t !== n || t && typeof t == "object" || typeof t == "function";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Jt(t) {
|
|
24
24
|
return Object.keys(t).length === 0;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function Qt(t, n, r, o) {
|
|
27
27
|
if (t) {
|
|
28
28
|
const s = jt(t, n, r, o);
|
|
29
29
|
return t[0](s);
|
|
@@ -47,13 +47,13 @@ function Zt(t, n, r, o) {
|
|
|
47
47
|
}
|
|
48
48
|
return n.dirty;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Kt(t, n, r, o, s, a) {
|
|
51
51
|
if (s) {
|
|
52
52
|
const c = jt(n, r, o, a);
|
|
53
53
|
t.p(c, s);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function Rt(t) {
|
|
57
57
|
if (t.ctx.length > 32) {
|
|
58
58
|
const n = [], r = t.ctx.length / 32;
|
|
59
59
|
for (let o = 0; o < r; o++)
|
|
@@ -75,14 +75,14 @@ function tn(t, n) {
|
|
|
75
75
|
function L(t) {
|
|
76
76
|
return document.createElementNS("http://www.w3.org/2000/svg", t);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Ot(t) {
|
|
79
79
|
return document.createTextNode(t);
|
|
80
80
|
}
|
|
81
81
|
function U() {
|
|
82
|
-
return
|
|
82
|
+
return Ot(" ");
|
|
83
83
|
}
|
|
84
84
|
function nn() {
|
|
85
|
-
return
|
|
85
|
+
return Ot("");
|
|
86
86
|
}
|
|
87
87
|
function A(t, n, r, o) {
|
|
88
88
|
return t.addEventListener(n, r, o), () => t.removeEventListener(n, r, o);
|
|
@@ -97,14 +97,14 @@ function on(t, n, { bubbles: r = !1, cancelable: o = !1 } = {}) {
|
|
|
97
97
|
const s = document.createEvent("CustomEvent");
|
|
98
98
|
return s.initCustomEvent(t, r, o, n), s;
|
|
99
99
|
}
|
|
100
|
-
let
|
|
101
|
-
function
|
|
102
|
-
|
|
100
|
+
let Q;
|
|
101
|
+
function J(t) {
|
|
102
|
+
Q = t;
|
|
103
103
|
}
|
|
104
104
|
function en() {
|
|
105
|
-
if (!
|
|
105
|
+
if (!Q)
|
|
106
106
|
throw new Error("Function called outside component initialization");
|
|
107
|
-
return
|
|
107
|
+
return Q;
|
|
108
108
|
}
|
|
109
109
|
function sn() {
|
|
110
110
|
const t = en();
|
|
@@ -123,89 +123,89 @@ function V(t, n) {
|
|
|
123
123
|
const r = t.$$.callbacks[n.type];
|
|
124
124
|
r && r.slice().forEach((o) => o.call(this, n));
|
|
125
125
|
}
|
|
126
|
-
const
|
|
126
|
+
const W = [], It = [];
|
|
127
127
|
let q = [];
|
|
128
128
|
const Ft = [], an = /* @__PURE__ */ Promise.resolve();
|
|
129
129
|
let wt = !1;
|
|
130
130
|
function cn() {
|
|
131
|
-
wt || (wt = !0, an.then(
|
|
131
|
+
wt || (wt = !0, an.then(Xt));
|
|
132
132
|
}
|
|
133
133
|
function Tt(t) {
|
|
134
134
|
q.push(t);
|
|
135
135
|
}
|
|
136
136
|
const $t = /* @__PURE__ */ new Set();
|
|
137
|
-
let
|
|
138
|
-
function
|
|
139
|
-
if (
|
|
137
|
+
let D = 0;
|
|
138
|
+
function Xt() {
|
|
139
|
+
if (D !== 0)
|
|
140
140
|
return;
|
|
141
|
-
const t =
|
|
141
|
+
const t = Q;
|
|
142
142
|
do {
|
|
143
143
|
try {
|
|
144
|
-
for (;
|
|
145
|
-
const n =
|
|
146
|
-
|
|
144
|
+
for (; D < W.length; ) {
|
|
145
|
+
const n = W[D];
|
|
146
|
+
D++, J(n), ln(n.$$);
|
|
147
147
|
}
|
|
148
148
|
} catch (n) {
|
|
149
|
-
throw
|
|
149
|
+
throw W.length = 0, D = 0, n;
|
|
150
150
|
}
|
|
151
|
-
for (
|
|
151
|
+
for (J(null), W.length = 0, D = 0; It.length; )
|
|
152
152
|
It.pop()();
|
|
153
153
|
for (let n = 0; n < q.length; n += 1) {
|
|
154
154
|
const r = q[n];
|
|
155
155
|
$t.has(r) || ($t.add(r), r());
|
|
156
156
|
}
|
|
157
157
|
q.length = 0;
|
|
158
|
-
} while (
|
|
158
|
+
} while (W.length);
|
|
159
159
|
for (; Ft.length; )
|
|
160
160
|
Ft.pop()();
|
|
161
|
-
wt = !1, $t.clear(),
|
|
161
|
+
wt = !1, $t.clear(), J(t);
|
|
162
162
|
}
|
|
163
163
|
function ln(t) {
|
|
164
164
|
if (t.fragment !== null) {
|
|
165
|
-
t.update(),
|
|
165
|
+
t.update(), z(t.before_update);
|
|
166
166
|
const n = t.dirty;
|
|
167
167
|
t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, n), t.after_update.forEach(Tt);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function pn(t) {
|
|
171
171
|
const n = [], r = [];
|
|
172
172
|
q.forEach((o) => t.indexOf(o) === -1 ? n.push(o) : r.push(o)), r.forEach((o) => o()), q = n;
|
|
173
173
|
}
|
|
174
|
-
const
|
|
175
|
-
let
|
|
176
|
-
function
|
|
177
|
-
t && t.i && (
|
|
174
|
+
const pt = /* @__PURE__ */ new Set();
|
|
175
|
+
let un;
|
|
176
|
+
function ut(t, n) {
|
|
177
|
+
t && t.i && (pt.delete(t), t.i(n));
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function bt(t, n, r, o) {
|
|
180
180
|
if (t && t.o) {
|
|
181
|
-
if (
|
|
181
|
+
if (pt.has(t))
|
|
182
182
|
return;
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
pt.add(t), un.c.push(() => {
|
|
184
|
+
pt.delete(t), o && (r && t.d(1), o());
|
|
185
185
|
}), t.o(n);
|
|
186
186
|
} else
|
|
187
187
|
o && o();
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function zt(t) {
|
|
190
190
|
t && t.c();
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function St(t, n, r, o) {
|
|
193
193
|
const { fragment: s, after_update: a } = t.$$;
|
|
194
194
|
s && s.m(n, r), o || Tt(() => {
|
|
195
|
-
const c = t.$$.on_mount.map(
|
|
196
|
-
t.$$.on_destroy ? t.$$.on_destroy.push(...c) :
|
|
195
|
+
const c = t.$$.on_mount.map(Yt).filter(_);
|
|
196
|
+
t.$$.on_destroy ? t.$$.on_destroy.push(...c) : z(c), t.$$.on_mount = [];
|
|
197
197
|
}), a.forEach(Tt);
|
|
198
198
|
}
|
|
199
199
|
function vt(t, n) {
|
|
200
200
|
const r = t.$$;
|
|
201
|
-
r.fragment !== null && (
|
|
201
|
+
r.fragment !== null && (pn(r.after_update), z(r.on_destroy), r.fragment && r.fragment.d(n), r.on_destroy = r.fragment = null, r.ctx = []);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
t.$$.dirty[0] === -1 && (
|
|
203
|
+
function hn(t, n) {
|
|
204
|
+
t.$$.dirty[0] === -1 && (W.push(t), cn(), t.$$.dirty.fill(0)), t.$$.dirty[n / 31 | 0] |= 1 << n % 31;
|
|
205
205
|
}
|
|
206
206
|
function Pt(t, n, r, o, s, a, c, l = [-1]) {
|
|
207
|
-
const
|
|
208
|
-
|
|
207
|
+
const p = Q;
|
|
208
|
+
J(t);
|
|
209
209
|
const f = t.$$ = {
|
|
210
210
|
fragment: null,
|
|
211
211
|
ctx: [],
|
|
@@ -220,27 +220,27 @@ function Pt(t, n, r, o, s, a, c, l = [-1]) {
|
|
|
220
220
|
on_disconnect: [],
|
|
221
221
|
before_update: [],
|
|
222
222
|
after_update: [],
|
|
223
|
-
context: new Map(n.context || (
|
|
223
|
+
context: new Map(n.context || (p ? p.$$.context : [])),
|
|
224
224
|
// everything else
|
|
225
225
|
callbacks: Mt(),
|
|
226
226
|
dirty: l,
|
|
227
227
|
skip_bound: !1,
|
|
228
|
-
root: n.target ||
|
|
228
|
+
root: n.target || p.$$.root
|
|
229
229
|
};
|
|
230
230
|
c && c(f.root);
|
|
231
231
|
let w = !1;
|
|
232
|
-
if (f.ctx = r ? r(t, n.props || {}, ($,
|
|
233
|
-
const
|
|
234
|
-
return f.ctx && s(f.ctx[$], f.ctx[$] =
|
|
235
|
-
}) : [], f.update(), w = !0,
|
|
232
|
+
if (f.ctx = r ? r(t, n.props || {}, ($, m, ...i) => {
|
|
233
|
+
const y = i.length ? i[0] : m;
|
|
234
|
+
return f.ctx && s(f.ctx[$], f.ctx[$] = y) && (!f.skip_bound && f.bound[$] && f.bound[$](y), w && hn(t, $)), m;
|
|
235
|
+
}) : [], f.update(), w = !0, z(f.before_update), f.fragment = o ? o(f.ctx) : !1, n.target) {
|
|
236
236
|
if (n.hydrate) {
|
|
237
237
|
const $ = rn(n.target);
|
|
238
238
|
f.fragment && f.fragment.l($), $.forEach(x);
|
|
239
239
|
} else
|
|
240
240
|
f.fragment && f.fragment.c();
|
|
241
|
-
n.intro &&
|
|
241
|
+
n.intro && ut(t.$$.fragment), St(t, n.target, n.anchor, n.customElement), Xt();
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
J(p);
|
|
244
244
|
}
|
|
245
245
|
class _t {
|
|
246
246
|
$destroy() {
|
|
@@ -256,23 +256,23 @@ class _t {
|
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
258
|
$set(n) {
|
|
259
|
-
this.$$set && !
|
|
259
|
+
this.$$set && !Jt(n) && (this.$$.skip_bound = !0, this.$$set(n), this.$$.skip_bound = !1);
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
var
|
|
263
|
-
const At = (t, n) => n,
|
|
262
|
+
var B = /* @__PURE__ */ ((t) => (t.ELLIPSE = "ELLIPSE", t.POLYGON = "POLYGON", t.RECTANGLE = "RECTANGLE", t))(B || {});
|
|
263
|
+
const At = (t, n) => n, Dt = (t) => {
|
|
264
264
|
let n = 1 / 0, r = 1 / 0, o = -1 / 0, s = -1 / 0;
|
|
265
265
|
return t.forEach(([a, c]) => {
|
|
266
266
|
n = Math.min(n, a), r = Math.min(r, c), o = Math.max(o, a), s = Math.max(s, c);
|
|
267
267
|
}), { minX: n, minY: r, maxX: o, maxY: s };
|
|
268
|
-
},
|
|
268
|
+
}, dn = {
|
|
269
269
|
area: (t) => Math.PI * t.geometry.rx * t.geometry.ry,
|
|
270
270
|
intersects: (t, n, r) => {
|
|
271
|
-
const { cx: o, cy: s, rx: a, ry: c } = t.geometry, l = 0,
|
|
272
|
-
return
|
|
271
|
+
const { cx: o, cy: s, rx: a, ry: c } = t.geometry, l = 0, p = Math.cos(l), f = Math.sin(l), w = n - o, $ = r - s, m = p * w + f * $, i = f * w - p * $;
|
|
272
|
+
return m * m / (a * a) + i * i / (c * c) <= 1;
|
|
273
273
|
}
|
|
274
274
|
};
|
|
275
|
-
At(
|
|
275
|
+
At(B.ELLIPSE, dn);
|
|
276
276
|
const fn = {
|
|
277
277
|
area: (t) => {
|
|
278
278
|
const { points: n } = t.geometry;
|
|
@@ -285,48 +285,48 @@ const fn = {
|
|
|
285
285
|
const { points: o } = t.geometry;
|
|
286
286
|
let s = !1;
|
|
287
287
|
for (let a = 0, c = o.length - 1; a < o.length; c = a++) {
|
|
288
|
-
const l = o[a][0],
|
|
289
|
-
|
|
288
|
+
const l = o[a][0], p = o[a][1], f = o[c][0], w = o[c][1];
|
|
289
|
+
p > r != w > r && n < (f - l) * (r - p) / (w - p) + l && (s = !s);
|
|
290
290
|
}
|
|
291
291
|
return s;
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
At(
|
|
295
|
-
const
|
|
294
|
+
At(B.POLYGON, fn);
|
|
295
|
+
const yn = {
|
|
296
296
|
area: (t) => t.geometry.w * t.geometry.h,
|
|
297
297
|
intersects: (t, n, r) => n >= t.geometry.x && n <= t.geometry.x + t.geometry.w && r >= t.geometry.y && r <= t.geometry.y + t.geometry.h
|
|
298
298
|
};
|
|
299
|
-
At(
|
|
300
|
-
const
|
|
301
|
-
const r = typeof t == "string" ? t : t.value, o = /^(xywh)=(pixel|percent)?:?(.+?),(.+?),(.+?),(.+)*/g, s = [...r.matchAll(o)][0], [a, c, l,
|
|
299
|
+
At(B.RECTANGLE, yn);
|
|
300
|
+
const gn = (t, n = !1) => {
|
|
301
|
+
const r = typeof t == "string" ? t : t.value, o = /^(xywh)=(pixel|percent)?:?(.+?),(.+?),(.+?),(.+)*/g, s = [...r.matchAll(o)][0], [a, c, l, p, f, w, $] = s;
|
|
302
302
|
if (c !== "xywh")
|
|
303
303
|
throw new Error("Unsupported MediaFragment: " + r);
|
|
304
304
|
if (l && l !== "pixel")
|
|
305
305
|
throw new Error(`Unsupported MediaFragment unit: ${l}`);
|
|
306
|
-
const [
|
|
306
|
+
const [m, i, y, h] = [p, f, w, $].map(parseFloat);
|
|
307
307
|
return {
|
|
308
|
-
type:
|
|
308
|
+
type: B.RECTANGLE,
|
|
309
309
|
geometry: {
|
|
310
|
-
x:
|
|
310
|
+
x: m,
|
|
311
311
|
y: i,
|
|
312
|
-
w:
|
|
313
|
-
h
|
|
312
|
+
w: y,
|
|
313
|
+
h,
|
|
314
314
|
bounds: {
|
|
315
|
-
minX:
|
|
316
|
-
minY: n ? i -
|
|
317
|
-
maxX:
|
|
318
|
-
maxY: n ? i : i +
|
|
315
|
+
minX: m,
|
|
316
|
+
minY: n ? i - h : i,
|
|
317
|
+
maxX: m + y,
|
|
318
|
+
maxY: n ? i : i + h
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
};
|
|
322
|
-
},
|
|
322
|
+
}, mn = (t) => {
|
|
323
323
|
const { x: n, y: r, w: o, h: s } = t;
|
|
324
324
|
return {
|
|
325
325
|
type: "FragmentSelector",
|
|
326
326
|
conformsTo: "http://www.w3.org/TR/media-frags/",
|
|
327
327
|
value: `xywh=pixel:${n},${r},${o},${s}`
|
|
328
328
|
};
|
|
329
|
-
},
|
|
329
|
+
}, Wt = "http://www.w3.org/2000/svg", Ht = (t) => {
|
|
330
330
|
const n = (o) => {
|
|
331
331
|
Array.from(o.attributes).forEach((s) => {
|
|
332
332
|
s.name.startsWith("on") && o.removeAttribute(s.name);
|
|
@@ -334,10 +334,10 @@ const yn = (t, n = !1) => {
|
|
|
334
334
|
}, r = t.getElementsByTagName("script");
|
|
335
335
|
return Array.from(r).reverse().forEach((o) => o.parentNode.removeChild(o)), Array.from(t.querySelectorAll("*")).forEach(n), t;
|
|
336
336
|
}, $n = (t) => {
|
|
337
|
-
const n = new XMLSerializer().serializeToString(t.documentElement).replace("<svg>", `<svg xmlns="${
|
|
337
|
+
const n = new XMLSerializer().serializeToString(t.documentElement).replace("<svg>", `<svg xmlns="${Wt}">`);
|
|
338
338
|
return new DOMParser().parseFromString(n, "image/svg+xml").documentElement;
|
|
339
339
|
}, xn = (t) => {
|
|
340
|
-
const n = new DOMParser().parseFromString(t, "image/svg+xml"), r = n.lookupPrefix(
|
|
340
|
+
const n = new DOMParser().parseFromString(t, "image/svg+xml"), r = n.lookupPrefix(Wt), o = n.lookupNamespaceURI(null);
|
|
341
341
|
return r || o ? Ht(n).firstChild : Ht($n(n)).firstChild;
|
|
342
342
|
}, wn = (t) => {
|
|
343
343
|
const [n, r, o] = t.match(/(<polygon points=["|'])([^("|')]*)/) || [];
|
|
@@ -345,10 +345,10 @@ const yn = (t, n = !1) => {
|
|
|
345
345
|
return;
|
|
346
346
|
const s = o.split(" ").map((a) => a.split(",").map(parseFloat));
|
|
347
347
|
return {
|
|
348
|
-
type:
|
|
348
|
+
type: B.POLYGON,
|
|
349
349
|
geometry: {
|
|
350
350
|
points: s,
|
|
351
|
-
bounds:
|
|
351
|
+
bounds: Dt(s)
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
354
|
}, Tn = (t) => {
|
|
@@ -359,7 +359,7 @@ const yn = (t, n = !1) => {
|
|
|
359
359
|
maxY: o + a
|
|
360
360
|
};
|
|
361
361
|
return {
|
|
362
|
-
type:
|
|
362
|
+
type: B.ELLIPSE,
|
|
363
363
|
geometry: {
|
|
364
364
|
cx: r,
|
|
365
365
|
cy: o,
|
|
@@ -374,12 +374,12 @@ const yn = (t, n = !1) => {
|
|
|
374
374
|
return wn(n);
|
|
375
375
|
if (n.includes("<ellipse "))
|
|
376
376
|
return Tn(n);
|
|
377
|
-
},
|
|
377
|
+
}, bn = (t) => {
|
|
378
378
|
let n;
|
|
379
|
-
if (t.type ===
|
|
379
|
+
if (t.type === B.POLYGON) {
|
|
380
380
|
const r = t.geometry, { points: o } = r;
|
|
381
381
|
n = `<svg><polygon points="${o.map((s) => s.join(",")).join(" ")}" /></svg>`;
|
|
382
|
-
} else if (t.type ===
|
|
382
|
+
} else if (t.type === B.ELLIPSE) {
|
|
383
383
|
const r = t.geometry;
|
|
384
384
|
n = `<svg><ellipse cx="${r.cx}" cy="${r.cy}" rx="${r.rx}" ry="${r.ry}" /></svg>`;
|
|
385
385
|
}
|
|
@@ -388,24 +388,24 @@ const yn = (t, n = !1) => {
|
|
|
388
388
|
throw `Unsupported shape type: ${t.type}`;
|
|
389
389
|
};
|
|
390
390
|
let lt;
|
|
391
|
-
const
|
|
391
|
+
const Sn = new Uint8Array(16);
|
|
392
392
|
function vn() {
|
|
393
393
|
if (!lt && (lt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !lt))
|
|
394
394
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
395
|
-
return lt(
|
|
395
|
+
return lt(Sn);
|
|
396
396
|
}
|
|
397
|
-
const
|
|
397
|
+
const S = [];
|
|
398
398
|
for (let t = 0; t < 256; ++t)
|
|
399
|
-
|
|
399
|
+
S.push((t + 256).toString(16).slice(1));
|
|
400
400
|
function Pn(t, n = 0) {
|
|
401
|
-
return
|
|
401
|
+
return S[t[n + 0]] + S[t[n + 1]] + S[t[n + 2]] + S[t[n + 3]] + "-" + S[t[n + 4]] + S[t[n + 5]] + "-" + S[t[n + 6]] + S[t[n + 7]] + "-" + S[t[n + 8]] + S[t[n + 9]] + "-" + S[t[n + 10]] + S[t[n + 11]] + S[t[n + 12]] + S[t[n + 13]] + S[t[n + 14]] + S[t[n + 15]];
|
|
402
402
|
}
|
|
403
|
-
const _n = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
403
|
+
const _n = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Gt = {
|
|
404
404
|
randomUUID: _n
|
|
405
405
|
};
|
|
406
406
|
function An(t, n, r) {
|
|
407
|
-
if (
|
|
408
|
-
return
|
|
407
|
+
if (Gt.randomUUID && !n && !t)
|
|
408
|
+
return Gt.randomUUID();
|
|
409
409
|
t = t || {};
|
|
410
410
|
const o = t.random || (t.rng || vn)();
|
|
411
411
|
if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, n) {
|
|
@@ -426,7 +426,7 @@ const Mn = (t) => {
|
|
|
426
426
|
}
|
|
427
427
|
return `${r}`;
|
|
428
428
|
}, In = (t, n) => (Array.isArray(t) ? t : [t]).map((r) => {
|
|
429
|
-
const { id: o, type: s, purpose: a, value: c, created: l, creator:
|
|
429
|
+
const { id: o, type: s, purpose: a, value: c, created: l, creator: p, ...f } = r;
|
|
430
430
|
return {
|
|
431
431
|
id: o || `temp-${Mn(r)}`,
|
|
432
432
|
annotation: n,
|
|
@@ -434,7 +434,7 @@ const Mn = (t) => {
|
|
|
434
434
|
purpose: a,
|
|
435
435
|
value: c,
|
|
436
436
|
created: l,
|
|
437
|
-
creator:
|
|
437
|
+
creator: p ? typeof p == "object" ? { ...p } : p : void 0,
|
|
438
438
|
...f
|
|
439
439
|
};
|
|
440
440
|
}), Fn = (t) => t.map((n) => {
|
|
@@ -443,23 +443,23 @@ const Mn = (t) => {
|
|
|
443
443
|
return delete o.annotation, (r = o.id) != null && r.startsWith("temp-") && delete o.id, o;
|
|
444
444
|
});
|
|
445
445
|
Ln();
|
|
446
|
-
const
|
|
447
|
-
const r = t.id || An(), { body: o, ...s } = t, a = In(o, r), c = Array.isArray(t.target) ? t.target[0] : t.target, l = Array.isArray(c.selector) ? c.selector[0] : c.selector,
|
|
448
|
-
return
|
|
446
|
+
const Wn = (t, n = !1) => ({ parse: (r) => Hn(r, n), serialize: (r) => Gn(r, t) }), Hn = (t, n = !1) => {
|
|
447
|
+
const r = t.id || An(), { body: o, ...s } = t, a = In(o, r), c = Array.isArray(t.target) ? t.target[0] : t.target, l = Array.isArray(c.selector) ? c.selector[0] : c.selector, p = l.type === "FragmentSelector" ? gn(l, n) : l.type === "SvgSelector" ? En(l) : void 0;
|
|
448
|
+
return p ? {
|
|
449
449
|
parsed: {
|
|
450
450
|
...s,
|
|
451
451
|
id: r,
|
|
452
452
|
bodies: a,
|
|
453
453
|
target: {
|
|
454
454
|
annotation: r,
|
|
455
|
-
selector:
|
|
455
|
+
selector: p
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
} : {
|
|
459
|
-
error: Error(`Unknown selector type: ${
|
|
459
|
+
error: Error(`Unknown selector type: ${l.type}`)
|
|
460
460
|
};
|
|
461
|
-
},
|
|
462
|
-
const r = t.target.selector, o = r.type ==
|
|
461
|
+
}, Gn = (t, n) => {
|
|
462
|
+
const r = t.target.selector, o = r.type == B.RECTANGLE ? mn(r.geometry) : bn(r);
|
|
463
463
|
return {
|
|
464
464
|
...t,
|
|
465
465
|
"@context": "http://www.w3.org/ns/anno.jsonld",
|
|
@@ -472,11 +472,11 @@ const Sn = (t, n = !1) => ({ parse: (r) => Hn(r, n), serialize: (r) => Rn(r, t)
|
|
|
472
472
|
}
|
|
473
473
|
};
|
|
474
474
|
};
|
|
475
|
-
function
|
|
475
|
+
function Nt(t, n, r) {
|
|
476
476
|
const o = t.slice();
|
|
477
477
|
return o[11] = n[r], o[13] = r, o;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Bt(t) {
|
|
480
480
|
let n, r, o, s, a;
|
|
481
481
|
return {
|
|
482
482
|
c() {
|
|
@@ -500,11 +500,11 @@ function Nt(t) {
|
|
|
500
500
|
T(c, n, l), s || (a = A(n, "pointerdown", function() {
|
|
501
501
|
_(
|
|
502
502
|
/*grab*/
|
|
503
|
-
t[10](
|
|
503
|
+
t[10](d(
|
|
504
504
|
/*idx*/
|
|
505
505
|
t[13]
|
|
506
506
|
))
|
|
507
|
-
) && t[10](
|
|
507
|
+
) && t[10](d(
|
|
508
508
|
/*idx*/
|
|
509
509
|
t[13]
|
|
510
510
|
)).apply(this, arguments);
|
|
@@ -536,21 +536,21 @@ function Nt(t) {
|
|
|
536
536
|
}
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
|
-
function
|
|
540
|
-
let n, r, o, s, a, c, l,
|
|
539
|
+
function Nn(t) {
|
|
540
|
+
let n, r, o, s, a, c, l, p, f, w, $ = (
|
|
541
541
|
/*geom*/
|
|
542
542
|
t[4].points
|
|
543
|
-
),
|
|
543
|
+
), m = [];
|
|
544
544
|
for (let i = 0; i < $.length; i += 1)
|
|
545
|
-
|
|
545
|
+
m[i] = Bt(Nt(t, $, i));
|
|
546
546
|
return {
|
|
547
547
|
c() {
|
|
548
548
|
n = L("polygon"), s = U(), a = L("polygon"), l = U();
|
|
549
|
-
for (let i = 0; i <
|
|
550
|
-
|
|
551
|
-
|
|
549
|
+
for (let i = 0; i < m.length; i += 1)
|
|
550
|
+
m[i].c();
|
|
551
|
+
p = nn(), e(n, "class", "a9s-outer"), e(n, "style", r = /*computedStyle*/
|
|
552
552
|
t[1] ? "display:none;" : void 0), e(n, "points", o = /*geom*/
|
|
553
|
-
t[4].points.map(
|
|
553
|
+
t[4].points.map(Ct).join(" ")), e(a, "class", "a9s-inner a9s-shape-handle"), e(
|
|
554
554
|
a,
|
|
555
555
|
"style",
|
|
556
556
|
/*computedStyle*/
|
|
@@ -558,58 +558,58 @@ function Gn(t) {
|
|
|
558
558
|
), e(a, "points", c = /*geom*/
|
|
559
559
|
t[4].points.map(Ut).join(" "));
|
|
560
560
|
},
|
|
561
|
-
m(i,
|
|
562
|
-
T(i, n,
|
|
563
|
-
for (let
|
|
564
|
-
|
|
565
|
-
T(i,
|
|
561
|
+
m(i, y) {
|
|
562
|
+
T(i, n, y), T(i, s, y), T(i, a, y), T(i, l, y);
|
|
563
|
+
for (let h = 0; h < m.length; h += 1)
|
|
564
|
+
m[h] && m[h].m(i, y);
|
|
565
|
+
T(i, p, y), f || (w = [
|
|
566
566
|
A(n, "pointerdown", function() {
|
|
567
567
|
_(
|
|
568
568
|
/*grab*/
|
|
569
|
-
t[10](
|
|
570
|
-
) && t[10](
|
|
569
|
+
t[10](d.SHAPE)
|
|
570
|
+
) && t[10](d.SHAPE).apply(this, arguments);
|
|
571
571
|
}),
|
|
572
572
|
A(a, "pointerdown", function() {
|
|
573
573
|
_(
|
|
574
574
|
/*grab*/
|
|
575
|
-
t[10](
|
|
576
|
-
) && t[10](
|
|
575
|
+
t[10](d.SHAPE)
|
|
576
|
+
) && t[10](d.SHAPE).apply(this, arguments);
|
|
577
577
|
})
|
|
578
578
|
], f = !0);
|
|
579
579
|
},
|
|
580
|
-
p(i,
|
|
581
|
-
if (t = i,
|
|
580
|
+
p(i, y) {
|
|
581
|
+
if (t = i, y & /*computedStyle*/
|
|
582
582
|
2 && r !== (r = /*computedStyle*/
|
|
583
|
-
t[1] ? "display:none;" : void 0) && e(n, "style", r),
|
|
583
|
+
t[1] ? "display:none;" : void 0) && e(n, "style", r), y & /*geom*/
|
|
584
584
|
16 && o !== (o = /*geom*/
|
|
585
|
-
t[4].points.map(
|
|
585
|
+
t[4].points.map(Ct).join(" ")) && e(n, "points", o), y & /*computedStyle*/
|
|
586
586
|
2 && e(
|
|
587
587
|
a,
|
|
588
588
|
"style",
|
|
589
589
|
/*computedStyle*/
|
|
590
590
|
t[1]
|
|
591
|
-
),
|
|
591
|
+
), y & /*geom*/
|
|
592
592
|
16 && c !== (c = /*geom*/
|
|
593
|
-
t[4].points.map(Ut).join(" ")) && e(a, "points", c),
|
|
593
|
+
t[4].points.map(Ut).join(" ")) && e(a, "points", c), y & /*geom, handleSize, grab, Handle*/
|
|
594
594
|
1048) {
|
|
595
595
|
$ = /*geom*/
|
|
596
596
|
t[4].points;
|
|
597
|
-
let
|
|
598
|
-
for (
|
|
599
|
-
const E =
|
|
600
|
-
|
|
597
|
+
let h;
|
|
598
|
+
for (h = 0; h < $.length; h += 1) {
|
|
599
|
+
const E = Nt(t, $, h);
|
|
600
|
+
m[h] ? m[h].p(E, y) : (m[h] = Bt(E), m[h].c(), m[h].m(p.parentNode, p));
|
|
601
601
|
}
|
|
602
|
-
for (;
|
|
603
|
-
|
|
604
|
-
|
|
602
|
+
for (; h < m.length; h += 1)
|
|
603
|
+
m[h].d(1);
|
|
604
|
+
m.length = $.length;
|
|
605
605
|
}
|
|
606
606
|
},
|
|
607
607
|
d(i) {
|
|
608
|
-
i && x(n), i && x(s), i && x(a), i && x(l), tn(
|
|
608
|
+
i && x(n), i && x(s), i && x(a), i && x(l), tn(m, i), i && x(p), f = !1, z(w);
|
|
609
609
|
}
|
|
610
610
|
};
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function Bn(t) {
|
|
613
613
|
let n, r;
|
|
614
614
|
return n = new Vt({
|
|
615
615
|
props: {
|
|
@@ -627,7 +627,7 @@ function Nn(t) {
|
|
|
627
627
|
),
|
|
628
628
|
$$slots: {
|
|
629
629
|
default: [
|
|
630
|
-
|
|
630
|
+
Nn,
|
|
631
631
|
({ grab: o }) => ({ 10: o }),
|
|
632
632
|
({ grab: o }) => o ? 1024 : 0
|
|
633
633
|
]
|
|
@@ -648,10 +648,10 @@ function Nn(t) {
|
|
|
648
648
|
t[9]
|
|
649
649
|
), {
|
|
650
650
|
c() {
|
|
651
|
-
|
|
651
|
+
zt(n.$$.fragment);
|
|
652
652
|
},
|
|
653
653
|
m(o, s) {
|
|
654
|
-
|
|
654
|
+
St(n, o, s), r = !0;
|
|
655
655
|
},
|
|
656
656
|
p(o, [s]) {
|
|
657
657
|
const a = {};
|
|
@@ -663,23 +663,23 @@ function Nn(t) {
|
|
|
663
663
|
17434 && (a.$$scope = { dirty: s, ctx: o }), n.$set(a);
|
|
664
664
|
},
|
|
665
665
|
i(o) {
|
|
666
|
-
r || (
|
|
666
|
+
r || (ut(n.$$.fragment, o), r = !0);
|
|
667
667
|
},
|
|
668
668
|
o(o) {
|
|
669
|
-
|
|
669
|
+
bt(n.$$.fragment, o), r = !1;
|
|
670
670
|
},
|
|
671
671
|
d(o) {
|
|
672
672
|
vt(n, o);
|
|
673
673
|
}
|
|
674
674
|
};
|
|
675
675
|
}
|
|
676
|
-
const
|
|
677
|
-
function
|
|
678
|
-
let o, s, { shape: a } = n, { computedStyle: c = void 0 } = n, { transform: l } = n, { viewportScale:
|
|
679
|
-
const f = (i,
|
|
676
|
+
const Ct = (t) => t.join(","), Ut = (t) => t.join(",");
|
|
677
|
+
function Cn(t, n, r) {
|
|
678
|
+
let o, s, { shape: a } = n, { computedStyle: c = void 0 } = n, { transform: l } = n, { viewportScale: p = 1 } = n;
|
|
679
|
+
const f = (i, y, h) => {
|
|
680
680
|
let E;
|
|
681
|
-
|
|
682
|
-
const M =
|
|
681
|
+
y === d.SHAPE ? E = i.geometry.points.map(([P, b]) => [P + h[0], b + h[1]]) : E = i.geometry.points.map(([P, b], C) => y === d(C) ? [P + h[0], b + h[1]] : [P, b]);
|
|
682
|
+
const M = Dt(E);
|
|
683
683
|
return { ...i, geometry: { points: E, bounds: M } };
|
|
684
684
|
};
|
|
685
685
|
function w(i) {
|
|
@@ -688,15 +688,15 @@ function Bn(t, n, r) {
|
|
|
688
688
|
function $(i) {
|
|
689
689
|
V.call(this, t, i);
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function m(i) {
|
|
692
692
|
V.call(this, t, i);
|
|
693
693
|
}
|
|
694
694
|
return t.$$set = (i) => {
|
|
695
|
-
"shape" in i && r(0, a = i.shape), "computedStyle" in i && r(1, c = i.computedStyle), "transform" in i && r(2, l = i.transform), "viewportScale" in i && r(6,
|
|
695
|
+
"shape" in i && r(0, a = i.shape), "computedStyle" in i && r(1, c = i.computedStyle), "transform" in i && r(2, l = i.transform), "viewportScale" in i && r(6, p = i.viewportScale);
|
|
696
696
|
}, t.$$.update = () => {
|
|
697
697
|
t.$$.dirty & /*shape*/
|
|
698
698
|
1 && r(4, o = a.geometry), t.$$.dirty & /*viewportScale*/
|
|
699
|
-
64 && r(3, s = 10 /
|
|
699
|
+
64 && r(3, s = 10 / p);
|
|
700
700
|
}, [
|
|
701
701
|
a,
|
|
702
702
|
c,
|
|
@@ -704,15 +704,15 @@ function Bn(t, n, r) {
|
|
|
704
704
|
s,
|
|
705
705
|
o,
|
|
706
706
|
f,
|
|
707
|
-
|
|
707
|
+
p,
|
|
708
708
|
w,
|
|
709
709
|
$,
|
|
710
|
-
|
|
710
|
+
m
|
|
711
711
|
];
|
|
712
712
|
}
|
|
713
713
|
class Un extends _t {
|
|
714
714
|
constructor(n) {
|
|
715
|
-
super(), Pt(this, n,
|
|
715
|
+
super(), Pt(this, n, Cn, Bn, Et, {
|
|
716
716
|
shape: 0,
|
|
717
717
|
computedStyle: 1,
|
|
718
718
|
transform: 2,
|
|
@@ -720,39 +720,39 @@ class Un extends _t {
|
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
let n, r, o, s, a, c, l,
|
|
723
|
+
function kn(t) {
|
|
724
|
+
let n, r, o, s, a, c, l, p, f, w, $, m, i, y, h, E, M, P, b, C, k, Y, j, v, O, X, Z, ht, N, K, R, tt, dt, I, nt, rt, ft, F, ot, et, yt, H, st, at, gt, G, it, ct, mt, Lt;
|
|
725
725
|
return {
|
|
726
726
|
c() {
|
|
727
|
-
n = L("rect"), l = U(),
|
|
727
|
+
n = L("rect"), l = U(), p = L("rect"), i = U(), y = L("rect"), P = U(), b = L("rect"), j = U(), v = L("rect"), ht = U(), N = L("rect"), dt = U(), I = L("rect"), ft = U(), F = L("rect"), yt = U(), H = L("rect"), gt = U(), G = L("rect"), e(n, "class", "a9s-outer"), e(n, "style", r = /*computedStyle*/
|
|
728
728
|
t[1] ? "display:none;" : void 0), e(n, "x", o = /*geom*/
|
|
729
729
|
t[4].x), e(n, "y", s = /*geom*/
|
|
730
730
|
t[4].y), e(n, "width", a = /*geom*/
|
|
731
731
|
t[4].w), e(n, "height", c = /*geom*/
|
|
732
|
-
t[4].h), e(
|
|
733
|
-
|
|
732
|
+
t[4].h), e(p, "class", "a9s-inner a9s-shape-handle"), e(
|
|
733
|
+
p,
|
|
734
734
|
"style",
|
|
735
735
|
/*computedStyle*/
|
|
736
736
|
t[1]
|
|
737
|
-
), e(
|
|
738
|
-
t[4].x), e(
|
|
739
|
-
t[4].y), e(
|
|
740
|
-
t[4].w), e(
|
|
741
|
-
t[4].h), e(
|
|
742
|
-
t[4].x), e(
|
|
743
|
-
t[4].y), e(
|
|
744
|
-
t[4].w), e(
|
|
737
|
+
), e(p, "x", f = /*geom*/
|
|
738
|
+
t[4].x), e(p, "y", w = /*geom*/
|
|
739
|
+
t[4].y), e(p, "width", $ = /*geom*/
|
|
740
|
+
t[4].w), e(p, "height", m = /*geom*/
|
|
741
|
+
t[4].h), e(y, "class", "a9s-edge-handle a9s-edge-handle-top"), e(y, "x", h = /*geom*/
|
|
742
|
+
t[4].x), e(y, "y", E = /*geom*/
|
|
743
|
+
t[4].y), e(y, "height", 1), e(y, "width", M = /*geom*/
|
|
744
|
+
t[4].w), e(b, "class", "a9s-edge-handle a9s-edge-handle-right"), e(b, "x", C = /*geom*/
|
|
745
745
|
t[4].x + /*geom*/
|
|
746
|
-
t[4].w), e(
|
|
747
|
-
t[4].y), e(
|
|
748
|
-
t[4].h), e(
|
|
749
|
-
t[4].x), e(v, "y",
|
|
746
|
+
t[4].w), e(b, "y", k = /*geom*/
|
|
747
|
+
t[4].y), e(b, "height", Y = /*geom*/
|
|
748
|
+
t[4].h), e(b, "width", 1), e(v, "class", "a9s-edge-handle a9s-edge-handle-bottom"), e(v, "x", O = /*geom*/
|
|
749
|
+
t[4].x), e(v, "y", X = /*geom*/
|
|
750
750
|
t[4].y + /*geom*/
|
|
751
751
|
t[4].h), e(v, "height", 1), e(v, "width", Z = /*geom*/
|
|
752
|
-
t[4].w), e(
|
|
753
|
-
t[4].x), e(
|
|
754
|
-
t[4].y), e(
|
|
755
|
-
t[4].h), e(
|
|
752
|
+
t[4].w), e(N, "class", "a9s-edge-handle a9s-edge-handle-left"), e(N, "x", K = /*geom*/
|
|
753
|
+
t[4].x), e(N, "y", R = /*geom*/
|
|
754
|
+
t[4].y), e(N, "height", tt = /*geom*/
|
|
755
|
+
t[4].h), e(N, "width", 1), e(I, "class", "a9s-corner-handle a9s-corner-handle-topleft"), e(I, "x", nt = /*geom*/
|
|
756
756
|
t[4].x - /*handleSize*/
|
|
757
757
|
t[3] / 2), e(I, "y", rt = /*geom*/
|
|
758
758
|
t[4].y - /*handleSize*/
|
|
@@ -797,222 +797,222 @@ function Yn(t) {
|
|
|
797
797
|
"width",
|
|
798
798
|
/*handleSize*/
|
|
799
799
|
t[3]
|
|
800
|
-
), e(
|
|
800
|
+
), e(G, "class", "a9s-corner-handle a9s-corner-handle-bottomleft"), e(G, "x", it = /*geom*/
|
|
801
801
|
t[4].x - /*handleSize*/
|
|
802
|
-
t[3] / 2), e(
|
|
802
|
+
t[3] / 2), e(G, "y", ct = /*geom*/
|
|
803
803
|
t[4].y + /*geom*/
|
|
804
804
|
t[4].h - /*handleSize*/
|
|
805
805
|
t[3] / 2), e(
|
|
806
|
-
|
|
806
|
+
G,
|
|
807
807
|
"height",
|
|
808
808
|
/*handleSize*/
|
|
809
809
|
t[3]
|
|
810
810
|
), e(
|
|
811
|
-
|
|
811
|
+
G,
|
|
812
812
|
"width",
|
|
813
813
|
/*handleSize*/
|
|
814
814
|
t[3]
|
|
815
815
|
);
|
|
816
816
|
},
|
|
817
|
-
m(
|
|
818
|
-
T(
|
|
817
|
+
m(g, u) {
|
|
818
|
+
T(g, n, u), T(g, l, u), T(g, p, u), T(g, i, u), T(g, y, u), T(g, P, u), T(g, b, u), T(g, j, u), T(g, v, u), T(g, ht, u), T(g, N, u), T(g, dt, u), T(g, I, u), T(g, ft, u), T(g, F, u), T(g, yt, u), T(g, H, u), T(g, gt, u), T(g, G, u), mt || (Lt = [
|
|
819
819
|
A(n, "pointerdown", function() {
|
|
820
820
|
_(
|
|
821
821
|
/*grab*/
|
|
822
|
-
t[10](
|
|
823
|
-
) && t[10](
|
|
822
|
+
t[10](d.SHAPE)
|
|
823
|
+
) && t[10](d.SHAPE).apply(this, arguments);
|
|
824
824
|
}),
|
|
825
|
-
A(
|
|
825
|
+
A(p, "pointerdown", function() {
|
|
826
826
|
_(
|
|
827
827
|
/*grab*/
|
|
828
|
-
t[10](
|
|
829
|
-
) && t[10](
|
|
828
|
+
t[10](d.SHAPE)
|
|
829
|
+
) && t[10](d.SHAPE).apply(this, arguments);
|
|
830
830
|
}),
|
|
831
|
-
A(
|
|
831
|
+
A(y, "pointerdown", function() {
|
|
832
832
|
_(
|
|
833
833
|
/*grab*/
|
|
834
|
-
t[10](
|
|
835
|
-
) && t[10](
|
|
834
|
+
t[10](d.TOP)
|
|
835
|
+
) && t[10](d.TOP).apply(this, arguments);
|
|
836
836
|
}),
|
|
837
|
-
A(
|
|
837
|
+
A(b, "pointerdown", function() {
|
|
838
838
|
_(
|
|
839
839
|
/*grab*/
|
|
840
|
-
t[10](
|
|
841
|
-
) && t[10](
|
|
840
|
+
t[10](d.RIGHT)
|
|
841
|
+
) && t[10](d.RIGHT).apply(this, arguments);
|
|
842
842
|
}),
|
|
843
843
|
A(v, "pointerdown", function() {
|
|
844
844
|
_(
|
|
845
845
|
/*grab*/
|
|
846
|
-
t[10](
|
|
847
|
-
) && t[10](
|
|
846
|
+
t[10](d.BOTTOM)
|
|
847
|
+
) && t[10](d.BOTTOM).apply(this, arguments);
|
|
848
848
|
}),
|
|
849
|
-
A(
|
|
849
|
+
A(N, "pointerdown", function() {
|
|
850
850
|
_(
|
|
851
851
|
/*grab*/
|
|
852
|
-
t[10](
|
|
853
|
-
) && t[10](
|
|
852
|
+
t[10](d.LEFT)
|
|
853
|
+
) && t[10](d.LEFT).apply(this, arguments);
|
|
854
854
|
}),
|
|
855
855
|
A(I, "pointerdown", function() {
|
|
856
856
|
_(
|
|
857
857
|
/*grab*/
|
|
858
|
-
t[10](
|
|
859
|
-
) && t[10](
|
|
858
|
+
t[10](d.TOP_LEFT)
|
|
859
|
+
) && t[10](d.TOP_LEFT).apply(this, arguments);
|
|
860
860
|
}),
|
|
861
861
|
A(F, "pointerdown", function() {
|
|
862
862
|
_(
|
|
863
863
|
/*grab*/
|
|
864
|
-
t[10](
|
|
865
|
-
) && t[10](
|
|
864
|
+
t[10](d.TOP_RIGHT)
|
|
865
|
+
) && t[10](d.TOP_RIGHT).apply(this, arguments);
|
|
866
866
|
}),
|
|
867
867
|
A(H, "pointerdown", function() {
|
|
868
868
|
_(
|
|
869
869
|
/*grab*/
|
|
870
|
-
t[10](
|
|
871
|
-
) && t[10](
|
|
870
|
+
t[10](d.BOTTOM_RIGHT)
|
|
871
|
+
) && t[10](d.BOTTOM_RIGHT).apply(this, arguments);
|
|
872
872
|
}),
|
|
873
|
-
A(
|
|
873
|
+
A(G, "pointerdown", function() {
|
|
874
874
|
_(
|
|
875
875
|
/*grab*/
|
|
876
|
-
t[10](
|
|
877
|
-
) && t[10](
|
|
876
|
+
t[10](d.BOTTOM_LEFT)
|
|
877
|
+
) && t[10](d.BOTTOM_LEFT).apply(this, arguments);
|
|
878
878
|
})
|
|
879
|
-
],
|
|
879
|
+
], mt = !0);
|
|
880
880
|
},
|
|
881
|
-
p(
|
|
882
|
-
t =
|
|
881
|
+
p(g, u) {
|
|
882
|
+
t = g, u & /*computedStyle*/
|
|
883
883
|
2 && r !== (r = /*computedStyle*/
|
|
884
|
-
t[1] ? "display:none;" : void 0) && e(n, "style", r),
|
|
884
|
+
t[1] ? "display:none;" : void 0) && e(n, "style", r), u & /*geom*/
|
|
885
885
|
16 && o !== (o = /*geom*/
|
|
886
|
-
t[4].x) && e(n, "x", o),
|
|
886
|
+
t[4].x) && e(n, "x", o), u & /*geom*/
|
|
887
887
|
16 && s !== (s = /*geom*/
|
|
888
|
-
t[4].y) && e(n, "y", s),
|
|
888
|
+
t[4].y) && e(n, "y", s), u & /*geom*/
|
|
889
889
|
16 && a !== (a = /*geom*/
|
|
890
|
-
t[4].w) && e(n, "width", a),
|
|
890
|
+
t[4].w) && e(n, "width", a), u & /*geom*/
|
|
891
891
|
16 && c !== (c = /*geom*/
|
|
892
|
-
t[4].h) && e(n, "height", c),
|
|
892
|
+
t[4].h) && e(n, "height", c), u & /*computedStyle*/
|
|
893
893
|
2 && e(
|
|
894
|
-
|
|
894
|
+
p,
|
|
895
895
|
"style",
|
|
896
896
|
/*computedStyle*/
|
|
897
897
|
t[1]
|
|
898
|
-
),
|
|
898
|
+
), u & /*geom*/
|
|
899
899
|
16 && f !== (f = /*geom*/
|
|
900
|
-
t[4].x) && e(
|
|
900
|
+
t[4].x) && e(p, "x", f), u & /*geom*/
|
|
901
901
|
16 && w !== (w = /*geom*/
|
|
902
|
-
t[4].y) && e(
|
|
902
|
+
t[4].y) && e(p, "y", w), u & /*geom*/
|
|
903
903
|
16 && $ !== ($ = /*geom*/
|
|
904
|
-
t[4].w) && e(
|
|
905
|
-
16 &&
|
|
906
|
-
t[4].h) && e(
|
|
907
|
-
16 &&
|
|
908
|
-
t[4].x) && e(
|
|
904
|
+
t[4].w) && e(p, "width", $), u & /*geom*/
|
|
905
|
+
16 && m !== (m = /*geom*/
|
|
906
|
+
t[4].h) && e(p, "height", m), u & /*geom*/
|
|
907
|
+
16 && h !== (h = /*geom*/
|
|
908
|
+
t[4].x) && e(y, "x", h), u & /*geom*/
|
|
909
909
|
16 && E !== (E = /*geom*/
|
|
910
|
-
t[4].y) && e(
|
|
910
|
+
t[4].y) && e(y, "y", E), u & /*geom*/
|
|
911
911
|
16 && M !== (M = /*geom*/
|
|
912
|
-
t[4].w) && e(
|
|
913
|
-
16 &&
|
|
912
|
+
t[4].w) && e(y, "width", M), u & /*geom*/
|
|
913
|
+
16 && C !== (C = /*geom*/
|
|
914
914
|
t[4].x + /*geom*/
|
|
915
|
-
t[4].w) && e(
|
|
916
|
-
16 && Y !== (Y = /*geom*/
|
|
917
|
-
t[4].y) && e(O, "y", Y), p & /*geom*/
|
|
915
|
+
t[4].w) && e(b, "x", C), u & /*geom*/
|
|
918
916
|
16 && k !== (k = /*geom*/
|
|
919
|
-
t[4].
|
|
917
|
+
t[4].y) && e(b, "y", k), u & /*geom*/
|
|
918
|
+
16 && Y !== (Y = /*geom*/
|
|
919
|
+
t[4].h) && e(b, "height", Y), u & /*geom*/
|
|
920
|
+
16 && O !== (O = /*geom*/
|
|
921
|
+
t[4].x) && e(v, "x", O), u & /*geom*/
|
|
920
922
|
16 && X !== (X = /*geom*/
|
|
921
|
-
t[4].x) && e(v, "x", X), p & /*geom*/
|
|
922
|
-
16 && D !== (D = /*geom*/
|
|
923
923
|
t[4].y + /*geom*/
|
|
924
|
-
t[4].h) && e(v, "y",
|
|
924
|
+
t[4].h) && e(v, "y", X), u & /*geom*/
|
|
925
925
|
16 && Z !== (Z = /*geom*/
|
|
926
|
-
t[4].w) && e(v, "width", Z),
|
|
927
|
-
16 &&
|
|
928
|
-
t[4].x) && e(
|
|
929
|
-
16 &&
|
|
930
|
-
t[4].y) && e(
|
|
926
|
+
t[4].w) && e(v, "width", Z), u & /*geom*/
|
|
927
|
+
16 && K !== (K = /*geom*/
|
|
928
|
+
t[4].x) && e(N, "x", K), u & /*geom*/
|
|
929
|
+
16 && R !== (R = /*geom*/
|
|
930
|
+
t[4].y) && e(N, "y", R), u & /*geom*/
|
|
931
931
|
16 && tt !== (tt = /*geom*/
|
|
932
|
-
t[4].h) && e(
|
|
932
|
+
t[4].h) && e(N, "height", tt), u & /*geom, handleSize*/
|
|
933
933
|
24 && nt !== (nt = /*geom*/
|
|
934
934
|
t[4].x - /*handleSize*/
|
|
935
|
-
t[3] / 2) && e(I, "x", nt),
|
|
935
|
+
t[3] / 2) && e(I, "x", nt), u & /*geom, handleSize*/
|
|
936
936
|
24 && rt !== (rt = /*geom*/
|
|
937
937
|
t[4].y - /*handleSize*/
|
|
938
|
-
t[3] / 2) && e(I, "y", rt),
|
|
938
|
+
t[3] / 2) && e(I, "y", rt), u & /*handleSize*/
|
|
939
939
|
8 && e(
|
|
940
940
|
I,
|
|
941
941
|
"height",
|
|
942
942
|
/*handleSize*/
|
|
943
943
|
t[3]
|
|
944
|
-
),
|
|
944
|
+
), u & /*handleSize*/
|
|
945
945
|
8 && e(
|
|
946
946
|
I,
|
|
947
947
|
"width",
|
|
948
948
|
/*handleSize*/
|
|
949
949
|
t[3]
|
|
950
|
-
),
|
|
950
|
+
), u & /*geom, handleSize*/
|
|
951
951
|
24 && ot !== (ot = /*geom*/
|
|
952
952
|
t[4].x + /*geom*/
|
|
953
953
|
t[4].w - /*handleSize*/
|
|
954
|
-
t[3] / 2) && e(F, "x", ot),
|
|
954
|
+
t[3] / 2) && e(F, "x", ot), u & /*geom, handleSize*/
|
|
955
955
|
24 && et !== (et = /*geom*/
|
|
956
956
|
t[4].y - /*handleSize*/
|
|
957
|
-
t[3] / 2) && e(F, "y", et),
|
|
957
|
+
t[3] / 2) && e(F, "y", et), u & /*handleSize*/
|
|
958
958
|
8 && e(
|
|
959
959
|
F,
|
|
960
960
|
"height",
|
|
961
961
|
/*handleSize*/
|
|
962
962
|
t[3]
|
|
963
|
-
),
|
|
963
|
+
), u & /*handleSize*/
|
|
964
964
|
8 && e(
|
|
965
965
|
F,
|
|
966
966
|
"width",
|
|
967
967
|
/*handleSize*/
|
|
968
968
|
t[3]
|
|
969
|
-
),
|
|
969
|
+
), u & /*geom, handleSize*/
|
|
970
970
|
24 && st !== (st = /*geom*/
|
|
971
971
|
t[4].x + /*geom*/
|
|
972
972
|
t[4].w - /*handleSize*/
|
|
973
|
-
t[3] / 2) && e(H, "x", st),
|
|
973
|
+
t[3] / 2) && e(H, "x", st), u & /*geom, handleSize*/
|
|
974
974
|
24 && at !== (at = /*geom*/
|
|
975
975
|
t[4].y + /*geom*/
|
|
976
976
|
t[4].h - /*handleSize*/
|
|
977
|
-
t[3] / 2) && e(H, "y", at),
|
|
977
|
+
t[3] / 2) && e(H, "y", at), u & /*handleSize*/
|
|
978
978
|
8 && e(
|
|
979
979
|
H,
|
|
980
980
|
"height",
|
|
981
981
|
/*handleSize*/
|
|
982
982
|
t[3]
|
|
983
|
-
),
|
|
983
|
+
), u & /*handleSize*/
|
|
984
984
|
8 && e(
|
|
985
985
|
H,
|
|
986
986
|
"width",
|
|
987
987
|
/*handleSize*/
|
|
988
988
|
t[3]
|
|
989
|
-
),
|
|
989
|
+
), u & /*geom, handleSize*/
|
|
990
990
|
24 && it !== (it = /*geom*/
|
|
991
991
|
t[4].x - /*handleSize*/
|
|
992
|
-
t[3] / 2) && e(
|
|
992
|
+
t[3] / 2) && e(G, "x", it), u & /*geom, handleSize*/
|
|
993
993
|
24 && ct !== (ct = /*geom*/
|
|
994
994
|
t[4].y + /*geom*/
|
|
995
995
|
t[4].h - /*handleSize*/
|
|
996
|
-
t[3] / 2) && e(
|
|
996
|
+
t[3] / 2) && e(G, "y", ct), u & /*handleSize*/
|
|
997
997
|
8 && e(
|
|
998
|
-
|
|
998
|
+
G,
|
|
999
999
|
"height",
|
|
1000
1000
|
/*handleSize*/
|
|
1001
1001
|
t[3]
|
|
1002
|
-
),
|
|
1002
|
+
), u & /*handleSize*/
|
|
1003
1003
|
8 && e(
|
|
1004
|
-
|
|
1004
|
+
G,
|
|
1005
1005
|
"width",
|
|
1006
1006
|
/*handleSize*/
|
|
1007
1007
|
t[3]
|
|
1008
1008
|
);
|
|
1009
1009
|
},
|
|
1010
|
-
d(
|
|
1011
|
-
|
|
1010
|
+
d(g) {
|
|
1011
|
+
g && x(n), g && x(l), g && x(p), g && x(i), g && x(y), g && x(P), g && x(b), g && x(j), g && x(v), g && x(ht), g && x(N), g && x(dt), g && x(I), g && x(ft), g && x(F), g && x(yt), g && x(H), g && x(gt), g && x(G), mt = !1, z(Lt);
|
|
1012
1012
|
}
|
|
1013
1013
|
};
|
|
1014
1014
|
}
|
|
1015
|
-
function
|
|
1015
|
+
function Yn(t) {
|
|
1016
1016
|
let n, r;
|
|
1017
1017
|
return n = new Vt({
|
|
1018
1018
|
props: {
|
|
@@ -1030,7 +1030,7 @@ function kn(t) {
|
|
|
1030
1030
|
),
|
|
1031
1031
|
$$slots: {
|
|
1032
1032
|
default: [
|
|
1033
|
-
|
|
1033
|
+
kn,
|
|
1034
1034
|
({ grab: o }) => ({ 10: o }),
|
|
1035
1035
|
({ grab: o }) => o ? 1024 : 0
|
|
1036
1036
|
]
|
|
@@ -1051,10 +1051,10 @@ function kn(t) {
|
|
|
1051
1051
|
t[9]
|
|
1052
1052
|
), {
|
|
1053
1053
|
c() {
|
|
1054
|
-
|
|
1054
|
+
zt(n.$$.fragment);
|
|
1055
1055
|
},
|
|
1056
1056
|
m(o, s) {
|
|
1057
|
-
|
|
1057
|
+
St(n, o, s), r = !0;
|
|
1058
1058
|
},
|
|
1059
1059
|
p(o, [s]) {
|
|
1060
1060
|
const a = {};
|
|
@@ -1066,10 +1066,10 @@ function kn(t) {
|
|
|
1066
1066
|
3098 && (a.$$scope = { dirty: s, ctx: o }), n.$set(a);
|
|
1067
1067
|
},
|
|
1068
1068
|
i(o) {
|
|
1069
|
-
r || (
|
|
1069
|
+
r || (ut(n.$$.fragment, o), r = !0);
|
|
1070
1070
|
},
|
|
1071
1071
|
o(o) {
|
|
1072
|
-
|
|
1072
|
+
bt(n.$$.fragment, o), r = !1;
|
|
1073
1073
|
},
|
|
1074
1074
|
d(o) {
|
|
1075
1075
|
vt(n, o);
|
|
@@ -1077,56 +1077,56 @@ function kn(t) {
|
|
|
1077
1077
|
};
|
|
1078
1078
|
}
|
|
1079
1079
|
function jn(t, n, r) {
|
|
1080
|
-
let o, s, { shape: a } = n, { computedStyle: c = void 0 } = n, { transform: l } = n, { viewportScale:
|
|
1081
|
-
const f = (i,
|
|
1080
|
+
let o, s, { shape: a } = n, { computedStyle: c = void 0 } = n, { transform: l } = n, { viewportScale: p = 1 } = n;
|
|
1081
|
+
const f = (i, y, h) => {
|
|
1082
1082
|
const E = i.geometry.bounds;
|
|
1083
|
-
let [M, P] = [E.minX, E.minY], [
|
|
1084
|
-
const [
|
|
1085
|
-
if (
|
|
1086
|
-
M +=
|
|
1083
|
+
let [M, P] = [E.minX, E.minY], [b, C] = [E.maxX, E.maxY];
|
|
1084
|
+
const [k, Y] = h;
|
|
1085
|
+
if (y === d.SHAPE)
|
|
1086
|
+
M += k, b += k, P += Y, C += Y;
|
|
1087
1087
|
else {
|
|
1088
|
-
switch (
|
|
1089
|
-
case
|
|
1090
|
-
case
|
|
1091
|
-
case
|
|
1092
|
-
P +=
|
|
1088
|
+
switch (y) {
|
|
1089
|
+
case d.TOP:
|
|
1090
|
+
case d.TOP_LEFT:
|
|
1091
|
+
case d.TOP_RIGHT: {
|
|
1092
|
+
P += Y;
|
|
1093
1093
|
break;
|
|
1094
1094
|
}
|
|
1095
|
-
case
|
|
1096
|
-
case
|
|
1097
|
-
case
|
|
1098
|
-
|
|
1095
|
+
case d.BOTTOM:
|
|
1096
|
+
case d.BOTTOM_LEFT:
|
|
1097
|
+
case d.BOTTOM_RIGHT: {
|
|
1098
|
+
C += Y;
|
|
1099
1099
|
break;
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
|
-
switch (
|
|
1103
|
-
case
|
|
1104
|
-
case
|
|
1105
|
-
case
|
|
1106
|
-
M +=
|
|
1102
|
+
switch (y) {
|
|
1103
|
+
case d.LEFT:
|
|
1104
|
+
case d.TOP_LEFT:
|
|
1105
|
+
case d.BOTTOM_LEFT: {
|
|
1106
|
+
M += k;
|
|
1107
1107
|
break;
|
|
1108
1108
|
}
|
|
1109
|
-
case
|
|
1110
|
-
case
|
|
1111
|
-
case
|
|
1112
|
-
|
|
1109
|
+
case d.RIGHT:
|
|
1110
|
+
case d.TOP_RIGHT:
|
|
1111
|
+
case d.BOTTOM_RIGHT: {
|
|
1112
|
+
b += k;
|
|
1113
1113
|
break;
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
|
-
const j = Math.min(M,
|
|
1117
|
+
const j = Math.min(M, b), v = Math.min(P, C), O = Math.abs(b - M), X = Math.abs(C - P);
|
|
1118
1118
|
return {
|
|
1119
1119
|
...i,
|
|
1120
1120
|
geometry: {
|
|
1121
1121
|
x: j,
|
|
1122
1122
|
y: v,
|
|
1123
|
-
w:
|
|
1124
|
-
h:
|
|
1123
|
+
w: O,
|
|
1124
|
+
h: X,
|
|
1125
1125
|
bounds: {
|
|
1126
1126
|
minX: j,
|
|
1127
1127
|
minY: v,
|
|
1128
|
-
maxX: j +
|
|
1129
|
-
maxY: v +
|
|
1128
|
+
maxX: j + O,
|
|
1129
|
+
maxY: v + X
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
1132
|
};
|
|
@@ -1137,15 +1137,15 @@ function jn(t, n, r) {
|
|
|
1137
1137
|
function $(i) {
|
|
1138
1138
|
V.call(this, t, i);
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1140
|
+
function m(i) {
|
|
1141
1141
|
V.call(this, t, i);
|
|
1142
1142
|
}
|
|
1143
1143
|
return t.$$set = (i) => {
|
|
1144
|
-
"shape" in i && r(0, a = i.shape), "computedStyle" in i && r(1, c = i.computedStyle), "transform" in i && r(2, l = i.transform), "viewportScale" in i && r(6,
|
|
1144
|
+
"shape" in i && r(0, a = i.shape), "computedStyle" in i && r(1, c = i.computedStyle), "transform" in i && r(2, l = i.transform), "viewportScale" in i && r(6, p = i.viewportScale);
|
|
1145
1145
|
}, t.$$.update = () => {
|
|
1146
1146
|
t.$$.dirty & /*shape*/
|
|
1147
1147
|
1 && r(4, o = a.geometry), t.$$.dirty & /*viewportScale*/
|
|
1148
|
-
64 && r(3, s = 10 /
|
|
1148
|
+
64 && r(3, s = 10 / p);
|
|
1149
1149
|
}, [
|
|
1150
1150
|
a,
|
|
1151
1151
|
c,
|
|
@@ -1153,15 +1153,15 @@ function jn(t, n, r) {
|
|
|
1153
1153
|
s,
|
|
1154
1154
|
o,
|
|
1155
1155
|
f,
|
|
1156
|
-
|
|
1156
|
+
p,
|
|
1157
1157
|
w,
|
|
1158
1158
|
$,
|
|
1159
|
-
|
|
1159
|
+
m
|
|
1160
1160
|
];
|
|
1161
1161
|
}
|
|
1162
|
-
class
|
|
1162
|
+
class On extends _t {
|
|
1163
1163
|
constructor(n) {
|
|
1164
|
-
super(), Pt(this, n, jn,
|
|
1164
|
+
super(), Pt(this, n, jn, Yn, Et, {
|
|
1165
1165
|
shape: 0,
|
|
1166
1166
|
computedStyle: 1,
|
|
1167
1167
|
transform: 2,
|
|
@@ -1169,39 +1169,39 @@ class Xn extends _t {
|
|
|
1169
1169
|
});
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
|
-
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
const
|
|
1172
|
+
B.RECTANGLE, B.POLYGON;
|
|
1173
|
+
const d = (t) => `HANDLE-${t}`;
|
|
1174
|
+
d.SHAPE = "SHAPE";
|
|
1175
|
+
d.TOP = "TOP";
|
|
1176
|
+
d.RIGHT = "RIGHT";
|
|
1177
|
+
d.BOTTOM = "BOTTOM";
|
|
1178
|
+
d.LEFT = "LEFT";
|
|
1179
|
+
d.TOP_LEFT = "TOP_LEFT";
|
|
1180
|
+
d.TOP_RIGHT = "TOP_RIGHT";
|
|
1181
|
+
d.BOTTOM_RIGHT = "BOTTOM_RIGHT";
|
|
1182
|
+
d.BOTTOM_LEFT = "BOTTOM_LEFT";
|
|
1183
|
+
const Xn = (t) => ({}), kt = (t) => ({ grab: (
|
|
1184
1184
|
/*onGrab*/
|
|
1185
1185
|
t[0]
|
|
1186
1186
|
) });
|
|
1187
|
-
function
|
|
1187
|
+
function zn(t) {
|
|
1188
1188
|
let n, r, o, s;
|
|
1189
1189
|
const a = (
|
|
1190
1190
|
/*#slots*/
|
|
1191
1191
|
t[7].default
|
|
1192
|
-
), c =
|
|
1192
|
+
), c = Qt(
|
|
1193
1193
|
a,
|
|
1194
1194
|
t,
|
|
1195
1195
|
/*$$scope*/
|
|
1196
1196
|
t[6],
|
|
1197
|
-
|
|
1197
|
+
kt
|
|
1198
1198
|
);
|
|
1199
1199
|
return {
|
|
1200
1200
|
c() {
|
|
1201
1201
|
n = L("g"), c && c.c(), e(n, "class", "a9s-annotation selected");
|
|
1202
1202
|
},
|
|
1203
|
-
m(l,
|
|
1204
|
-
T(l, n,
|
|
1203
|
+
m(l, p) {
|
|
1204
|
+
T(l, n, p), c && c.m(n, null), r = !0, o || (s = [
|
|
1205
1205
|
A(
|
|
1206
1206
|
n,
|
|
1207
1207
|
"pointerup",
|
|
@@ -1216,9 +1216,9 @@ function Wn(t) {
|
|
|
1216
1216
|
)
|
|
1217
1217
|
], o = !0);
|
|
1218
1218
|
},
|
|
1219
|
-
p(l, [
|
|
1220
|
-
c && c.p && (!r ||
|
|
1221
|
-
64) &&
|
|
1219
|
+
p(l, [p]) {
|
|
1220
|
+
c && c.p && (!r || p & /*$$scope*/
|
|
1221
|
+
64) && Kt(
|
|
1222
1222
|
c,
|
|
1223
1223
|
a,
|
|
1224
1224
|
l,
|
|
@@ -1228,67 +1228,67 @@ function Wn(t) {
|
|
|
1228
1228
|
a,
|
|
1229
1229
|
/*$$scope*/
|
|
1230
1230
|
l[6],
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
) :
|
|
1231
|
+
p,
|
|
1232
|
+
Xn
|
|
1233
|
+
) : Rt(
|
|
1234
1234
|
/*$$scope*/
|
|
1235
1235
|
l[6]
|
|
1236
1236
|
),
|
|
1237
|
-
|
|
1237
|
+
kt
|
|
1238
1238
|
);
|
|
1239
1239
|
},
|
|
1240
1240
|
i(l) {
|
|
1241
|
-
r || (
|
|
1241
|
+
r || (ut(c, l), r = !0);
|
|
1242
1242
|
},
|
|
1243
1243
|
o(l) {
|
|
1244
|
-
|
|
1244
|
+
bt(c, l), r = !1;
|
|
1245
1245
|
},
|
|
1246
1246
|
d(l) {
|
|
1247
|
-
l && x(n), c && c.d(l), o = !1,
|
|
1247
|
+
l && x(n), c && c.d(l), o = !1, z(s);
|
|
1248
1248
|
}
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function Dn(t, n, r) {
|
|
1252
1252
|
let { $$slots: o = {}, $$scope: s } = n;
|
|
1253
1253
|
const a = sn();
|
|
1254
|
-
let { shape: c } = n, { editor: l } = n, { transform:
|
|
1255
|
-
const
|
|
1256
|
-
f =
|
|
1257
|
-
}, i = (
|
|
1254
|
+
let { shape: c } = n, { editor: l } = n, { transform: p } = n, f = null, w, $ = null;
|
|
1255
|
+
const m = (h) => (E) => {
|
|
1256
|
+
f = h, w = p.elementToImage(E.offsetX, E.offsetY), $ = c, E.target.setPointerCapture(E.pointerId), a("grab");
|
|
1257
|
+
}, i = (h) => {
|
|
1258
1258
|
if (f) {
|
|
1259
|
-
const [E, M] =
|
|
1259
|
+
const [E, M] = p.elementToImage(h.offsetX, h.offsetY), P = [E - w[0], M - w[1]];
|
|
1260
1260
|
r(3, c = l($, f, P)), a("change", c);
|
|
1261
1261
|
}
|
|
1262
|
-
},
|
|
1263
|
-
|
|
1262
|
+
}, y = (h) => {
|
|
1263
|
+
h.target.releasePointerCapture(h.pointerId), f = null, $ = c, a("release");
|
|
1264
1264
|
};
|
|
1265
|
-
return t.$$set = (
|
|
1266
|
-
"shape" in
|
|
1267
|
-
}, [
|
|
1265
|
+
return t.$$set = (h) => {
|
|
1266
|
+
"shape" in h && r(3, c = h.shape), "editor" in h && r(4, l = h.editor), "transform" in h && r(5, p = h.transform), "$$scope" in h && r(6, s = h.$$scope);
|
|
1267
|
+
}, [m, i, y, c, l, p, s, o];
|
|
1268
1268
|
}
|
|
1269
1269
|
class Vt extends _t {
|
|
1270
1270
|
constructor(n) {
|
|
1271
|
-
super(), Pt(this, n,
|
|
1271
|
+
super(), Pt(this, n, Dn, zn, Et, { shape: 3, editor: 4, transform: 5 });
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
1274
|
navigator.userAgent.indexOf("Mac OS X");
|
|
1275
1275
|
export {
|
|
1276
1276
|
Vt as Editor,
|
|
1277
|
-
|
|
1277
|
+
d as Handle,
|
|
1278
1278
|
Un as PolygonEditor,
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1279
|
+
On as RectangleEditor,
|
|
1280
|
+
yn as RectangleUtil,
|
|
1281
|
+
B as ShapeType,
|
|
1282
|
+
Wn as W3CImageFormat,
|
|
1283
|
+
Dt as boundsFromPoints,
|
|
1284
|
+
gn as parseFragmentSelector,
|
|
1285
1285
|
En as parseSVGSelector,
|
|
1286
1286
|
In as parseW3CBodies,
|
|
1287
1287
|
Hn as parseW3CImageAnnotation,
|
|
1288
1288
|
At as registerShapeUtil,
|
|
1289
|
-
|
|
1290
|
-
|
|
1289
|
+
mn as serializeFragmentSelector,
|
|
1290
|
+
bn as serializeSVGSelector,
|
|
1291
1291
|
Fn as serializeW3CBodies,
|
|
1292
|
-
|
|
1292
|
+
Gn as serializeW3CImageAnnotation
|
|
1293
1293
|
};
|
|
1294
1294
|
//# sourceMappingURL=annotorious-svelte.es5.js.map
|