@digipair/skill-web-ocr 0.136.0 → 0.136.3

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/index.esm.js CHANGED
@@ -491,7 +491,7 @@ var _Symbol, _a, _a1;
491
491
  }
492
492
  }, f$1 = function(t, s) {
493
493
  return !i$2(t, s);
494
- }, b = {
494
+ }, b$1 = {
495
495
  attribute: true,
496
496
  type: String,
497
497
  converter: u$1,
@@ -634,11 +634,12 @@ var y$1 = /*#__PURE__*/ function(HTMLElement1) {
634
634
  {
635
635
  key: "requestUpdate",
636
636
  value: function requestUpdate(t, s, i) {
637
+ var e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, h = arguments.length > 4 ? arguments[4] : void 0;
637
638
  if (void 0 !== t) {
638
639
  var _this__$Ej;
639
- var e = this.constructor, h = this[t];
640
+ var r = this.constructor;
640
641
  var _i_hasChanged;
641
- if (i !== null && i !== void 0 ? i : i = e.getPropertyOptions(t), !(((_i_hasChanged = i.hasChanged) !== null && _i_hasChanged !== void 0 ? _i_hasChanged : f$1)(h, s) || i.useDefault && i.reflect && h === ((_this__$Ej = this._$Ej) === null || _this__$Ej === void 0 ? void 0 : _this__$Ej.get(t)) && !this.hasAttribute(e._$Eu(t, i)))) return;
642
+ if (false === e && (h = this[t]), i !== null && i !== void 0 ? i : i = r.getPropertyOptions(t), !(((_i_hasChanged = i.hasChanged) !== null && _i_hasChanged !== void 0 ? _i_hasChanged : f$1)(h, s) || i.useDefault && i.reflect && h === ((_this__$Ej = this._$Ej) === null || _this__$Ej === void 0 ? void 0 : _this__$Ej.get(t)) && !this.hasAttribute(r._$Eu(t, i)))) return;
642
643
  this.C(t, s, i);
643
644
  }
644
645
  false === this.isUpdatePending && (this._$ES = this._$EP());
@@ -855,7 +856,7 @@ var y$1 = /*#__PURE__*/ function(HTMLElement1) {
855
856
  {
856
857
  key: "createProperty",
857
858
  value: function createProperty(t) {
858
- var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : b;
859
+ var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : b$1;
859
860
  if (s.state && (s.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = true), this.elementProperties.set(t, s), !s.noAccessor) {
860
861
  var i = Symbol(), h = this.getPropertyDescriptor(t, i, s);
861
862
  void 0 !== h && e$1(this.prototype, t, h);
@@ -889,7 +890,7 @@ var y$1 = /*#__PURE__*/ function(HTMLElement1) {
889
890
  key: "getPropertyOptions",
890
891
  value: function getPropertyOptions(t) {
891
892
  var _this_elementProperties_get;
892
- return (_this_elementProperties_get = this.elementProperties.get(t)) !== null && _this_elementProperties_get !== void 0 ? _this_elementProperties_get : b;
893
+ return (_this_elementProperties_get = this.elementProperties.get(t)) !== null && _this_elementProperties_get !== void 0 ? _this_elementProperties_get : b$1;
893
894
  }
894
895
  },
895
896
  {
@@ -1021,7 +1022,7 @@ y$1.elementStyles = [], y$1.shadowRootOptions = {
1021
1022
  mode: "open"
1022
1023
  }, y$1[d$1("elementProperties")] = new Map, y$1[d$1("finalized")] = new Map, p$1 === null || p$1 === void 0 ? void 0 : p$1({
1023
1024
  ReactiveElement: y$1
1024
- }), ((_reactiveElementVersions = (_a1 = a$1).reactiveElementVersions) !== null && _reactiveElementVersions !== void 0 ? _reactiveElementVersions : _a1.reactiveElementVersions = []).push("2.1.1");
1025
+ }), ((_reactiveElementVersions = (_a1 = a$1).reactiveElementVersions) !== null && _reactiveElementVersions !== void 0 ? _reactiveElementVersions : _a1.reactiveElementVersions = []).push("2.1.2");
1025
1026
 
1026
1027
  /**
1027
1028
  * @license
@@ -1171,17 +1172,19 @@ function _create_super$1(Derived) {
1171
1172
  };
1172
1173
  }
1173
1174
  var _t;
1174
- var t$1 = globalThis, i$1 = t$1.trustedTypes, s$1 = i$1 ? i$1.createPolicy("lit-html", {
1175
+ var t$1 = globalThis, i$1 = function(t) {
1176
+ return t;
1177
+ }, s$1 = t$1.trustedTypes, e = s$1 ? s$1.createPolicy("lit-html", {
1175
1178
  createHTML: function(t) {
1176
1179
  return t;
1177
1180
  }
1178
- }) : void 0, e = "$lit$", h = "lit$".concat(Math.random().toFixed(9).slice(2), "$"), o$2 = "?" + h, n$1 = "<".concat(o$2, ">"), r$2 = document, l = function() {
1179
- return r$2.createComment("");
1180
- }, c = function(t) {
1181
+ }) : void 0, h = "$lit$", o$2 = "lit$".concat(Math.random().toFixed(9).slice(2), "$"), n$1 = "?" + o$2, r$2 = "<".concat(n$1, ">"), l = document, c = function() {
1182
+ return l.createComment("");
1183
+ }, a = function(t) {
1181
1184
  return null === t || "object" != (typeof t === "undefined" ? "undefined" : _type_of$3(t)) && "function" != typeof t;
1182
- }, a = Array.isArray, u = function(t) {
1183
- return a(t) || "function" == typeof (t === null || t === void 0 ? void 0 : t[Symbol.iterator]);
1184
- }, d = "[ \t\n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(">|".concat(d, "(?:([^\\s\"'>=/]+)(").concat(d, "*=").concat(d, "*(?:[^ \n\f\r\"'`<>=]|(\"|')|))|$)"), "g"), p = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, y = function(t) {
1185
+ }, u = Array.isArray, d = function(t) {
1186
+ return u(t) || "function" == typeof (t === null || t === void 0 ? void 0 : t[Symbol.iterator]);
1187
+ }, f = "[ \t\n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(">|".concat(f, "(?:([^\\s\"'>=/]+)(").concat(f, "*=").concat(f, "*(?:[^ \n\f\r\"'`<>=]|(\"|')|))|$)"), "g"), g = /'/g, $ = /"/g, y = /^(?:script|style|textarea|title)$/i, x = function(t) {
1185
1188
  return function(i) {
1186
1189
  for(var _len = arguments.length, s = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
1187
1190
  s[_key - 1] = arguments[_key];
@@ -1192,57 +1195,57 @@ var t$1 = globalThis, i$1 = t$1.trustedTypes, s$1 = i$1 ? i$1.createPolicy("lit-
1192
1195
  values: s
1193
1196
  };
1194
1197
  };
1195
- }, x = y(1), T = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), A = new WeakMap, C = r$2.createTreeWalker(r$2, 129);
1196
- function P(t, i) {
1197
- if (!a(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
1198
- return void 0 !== s$1 ? s$1.createHTML(i) : i;
1198
+ }, b = x(1), E = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), C = new WeakMap, P = l.createTreeWalker(l, 129);
1199
+ function V(t, i) {
1200
+ if (!u(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
1201
+ return void 0 !== e ? e.createHTML(i) : i;
1199
1202
  }
1200
- var V = function(t, i) {
1201
- var s = t.length - 1, o = [];
1202
- var r, l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "", c = f;
1203
+ var N = function(t, i) {
1204
+ var s = t.length - 1, e = [];
1205
+ var n, l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "", c = v;
1203
1206
  for(var _$i = 0; _$i < s; _$i++){
1204
1207
  var s1 = t[_$i];
1205
- var a = void 0, u = void 0, d = -1, y = 0;
1206
- for(; y < s1.length && (c.lastIndex = y, u = c.exec(s1), null !== u);)y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : void 0 !== u[3] && (c = m) : c === m ? ">" === u[0] ? (c = r !== null && r !== void 0 ? r : f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = void 0);
1207
- var x = c === m && t[_$i + 1].startsWith("/>") ? " " : "";
1208
- l += c === f ? s1 + n$1 : d >= 0 ? (o.push(a), s1.slice(0, d) + e + s1.slice(d) + h + x) : s1 + h + (-2 === d ? _$i : x);
1208
+ var a = void 0, u = void 0, d = -1, f = 0;
1209
+ for(; f < s1.length && (c.lastIndex = f, u = c.exec(s1), null !== u);)f = c.lastIndex, c === v ? "!--" === u[1] ? c = _ : void 0 !== u[1] ? c = m : void 0 !== u[2] ? (y.test(u[2]) && (n = RegExp("</" + u[2], "g")), c = p) : void 0 !== u[3] && (c = p) : c === p ? ">" === u[0] ? (c = n !== null && n !== void 0 ? n : v, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? p : '"' === u[3] ? $ : g) : c === $ || c === g ? c = p : c === _ || c === m ? c = v : (c = p, n = void 0);
1210
+ var x = c === p && t[_$i + 1].startsWith("/>") ? " " : "";
1211
+ l += c === v ? s1 + r$2 : d >= 0 ? (e.push(a), s1.slice(0, d) + h + s1.slice(d) + o$2 + x) : s1 + o$2 + (-2 === d ? _$i : x);
1209
1212
  }
1210
1213
  return [
1211
- P(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")),
1212
- o
1214
+ V(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")),
1215
+ e
1213
1216
  ];
1214
1217
  };
1215
- var N = /*#__PURE__*/ function() {
1216
- function N(param, n) {
1217
- var t = param.strings, s = param._$litType$;
1218
- _class_call_check$1(this, N);
1218
+ var S = /*#__PURE__*/ function() {
1219
+ function S(param, e) {
1220
+ var t = param.strings, i = param._$litType$;
1221
+ _class_call_check$1(this, S);
1219
1222
  var r;
1220
1223
  this.parts = [];
1221
- var c = 0, a = 0;
1222
- var u = t.length - 1, d = this.parts, _V = _sliced_to_array(V(t, s), 2), f = _V[0], v = _V[1];
1223
- if (this.el = N.createElement(f, n), C.currentNode = this.el.content, 2 === s || 3 === s) {
1224
+ var l = 0, a = 0;
1225
+ var u = t.length - 1, d = this.parts, _N = _sliced_to_array(N(t, i), 2), f = _N[0], v = _N[1];
1226
+ if (this.el = S.createElement(f, e), P.currentNode = this.el.content, 2 === i || 3 === i) {
1224
1227
  var _t;
1225
1228
  var t1 = this.el.content.firstChild;
1226
1229
  (_t = t1).replaceWith.apply(_t, _to_consumable_array(t1.childNodes));
1227
1230
  }
1228
- for(; null !== (r = C.nextNode()) && d.length < u;){
1231
+ for(; null !== (r = P.nextNode()) && d.length < u;){
1229
1232
  if (1 === r.nodeType) {
1230
1233
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1231
1234
  if (r.hasAttributes()) try {
1232
1235
  for(var _iterator = r.getAttributeNames()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1233
1236
  var t2 = _step.value;
1234
- if (t2.endsWith(e)) {
1235
- var i1 = v[a++], s1 = r.getAttribute(t2).split(h), e1 = /([.?@])?(.*)/.exec(i1);
1237
+ if (t2.endsWith(h)) {
1238
+ var i1 = v[a++], s1 = r.getAttribute(t2).split(o$2), _$e = /([.?@])?(.*)/.exec(i1);
1236
1239
  d.push({
1237
1240
  type: 1,
1238
- index: c,
1239
- name: e1[2],
1241
+ index: l,
1242
+ name: _$e[2],
1240
1243
  strings: s1,
1241
- ctor: "." === e1[1] ? H : "?" === e1[1] ? I : "@" === e1[1] ? L : k
1244
+ ctor: "." === _$e[1] ? I : "?" === _$e[1] ? L : "@" === _$e[1] ? z : H
1242
1245
  }), r.removeAttribute(t2);
1243
- } else t2.startsWith(h) && (d.push({
1246
+ } else t2.startsWith(o$2) && (d.push({
1244
1247
  type: 6,
1245
- index: c
1248
+ index: l
1246
1249
  }), r.removeAttribute(t2));
1247
1250
  }
1248
1251
  } catch (err) {
@@ -1259,58 +1262,58 @@ var N = /*#__PURE__*/ function() {
1259
1262
  }
1260
1263
  }
1261
1264
  }
1262
- if ($.test(r.tagName)) {
1263
- var t3 = r.textContent.split(h), s2 = t3.length - 1;
1264
- if (s2 > 0) {
1265
- r.textContent = i$1 ? i$1.emptyScript : "";
1266
- for(var i2 = 0; i2 < s2; i2++)r.append(t3[i2], l()), C.nextNode(), d.push({
1265
+ if (y.test(r.tagName)) {
1266
+ var t3 = r.textContent.split(o$2), i2 = t3.length - 1;
1267
+ if (i2 > 0) {
1268
+ r.textContent = s$1 ? s$1.emptyScript : "";
1269
+ for(var s2 = 0; s2 < i2; s2++)r.append(t3[s2], c()), P.nextNode(), d.push({
1267
1270
  type: 2,
1268
- index: ++c
1271
+ index: ++l
1269
1272
  });
1270
- r.append(t3[s2], l());
1273
+ r.append(t3[i2], c());
1271
1274
  }
1272
1275
  }
1273
- } else if (8 === r.nodeType) if (r.data === o$2) d.push({
1276
+ } else if (8 === r.nodeType) if (r.data === n$1) d.push({
1274
1277
  type: 2,
1275
- index: c
1278
+ index: l
1276
1279
  });
1277
1280
  else {
1278
1281
  var t4 = -1;
1279
- for(; -1 !== (t4 = r.data.indexOf(h, t4 + 1));)d.push({
1282
+ for(; -1 !== (t4 = r.data.indexOf(o$2, t4 + 1));)d.push({
1280
1283
  type: 7,
1281
- index: c
1282
- }), t4 += h.length - 1;
1284
+ index: l
1285
+ }), t4 += o$2.length - 1;
1283
1286
  }
1284
- c++;
1287
+ l++;
1285
1288
  }
1286
1289
  }
1287
- _create_class$1(N, null, [
1290
+ _create_class$1(S, null, [
1288
1291
  {
1289
1292
  key: "createElement",
1290
1293
  value: function createElement(t, i) {
1291
- var s = r$2.createElement("template");
1294
+ var s = l.createElement("template");
1292
1295
  return s.innerHTML = t, s;
1293
1296
  }
1294
1297
  }
1295
1298
  ]);
1296
- return N;
1299
+ return S;
1297
1300
  }();
1298
- function S(t, i) {
1301
+ function M(t, i) {
1299
1302
  var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t, e = arguments.length > 3 ? arguments[3] : void 0;
1300
1303
  var _s__$Co, _h__$AO;
1301
1304
  var _s;
1302
- if (i === T) return i;
1305
+ if (i === E) return i;
1303
1306
  var h = void 0 !== e ? (_s__$Co = s._$Co) === null || _s__$Co === void 0 ? void 0 : _s__$Co[e] : s._$Cl;
1304
- var o = c(i) ? void 0 : i._$litDirective$;
1307
+ var o = a(i) ? void 0 : i._$litDirective$;
1305
1308
  var __$Co;
1306
- return (h === null || h === void 0 ? void 0 : h.constructor) !== o && (h === null || h === void 0 ? void 0 : (_h__$AO = h._$AO) === null || _h__$AO === void 0 ? void 0 : _h__$AO.call(h, false), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? ((__$Co = (_s = s)._$Co) !== null && __$Co !== void 0 ? __$Co : _s._$Co = [])[e] = h : s._$Cl = h), void 0 !== h && (i = S(t, h._$AS(t, i.values), h, e)), i;
1309
+ return (h === null || h === void 0 ? void 0 : h.constructor) !== o && (h === null || h === void 0 ? void 0 : (_h__$AO = h._$AO) === null || _h__$AO === void 0 ? void 0 : _h__$AO.call(h, false), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? ((__$Co = (_s = s)._$Co) !== null && __$Co !== void 0 ? __$Co : _s._$Co = [])[e] = h : s._$Cl = h), void 0 !== h && (i = M(t, h._$AS(t, i.values), h, e)), i;
1307
1310
  }
1308
- var M = /*#__PURE__*/ function() {
1309
- function M(t, i) {
1310
- _class_call_check$1(this, M);
1311
+ var R = /*#__PURE__*/ function() {
1312
+ function R(t, i) {
1313
+ _class_call_check$1(this, R);
1311
1314
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
1312
1315
  }
1313
- _create_class$1(M, [
1316
+ _create_class$1(R, [
1314
1317
  {
1315
1318
  key: "parentNode",
1316
1319
  get: function get() {
@@ -1327,17 +1330,17 @@ var M = /*#__PURE__*/ function() {
1327
1330
  key: "u",
1328
1331
  value: function u(t) {
1329
1332
  var _t_creationScope;
1330
- var _this__$AD = this._$AD, _this__$AD_el = _this__$AD.el, i = _this__$AD_el.content, s = _this__$AD.parts, e = ((_t_creationScope = t === null || t === void 0 ? void 0 : t.creationScope) !== null && _t_creationScope !== void 0 ? _t_creationScope : r$2).importNode(i, true);
1331
- C.currentNode = e;
1332
- var h = C.nextNode(), o = 0, n = 0, l = s[0];
1333
- for(; void 0 !== l;){
1334
- if (o === l.index) {
1333
+ var _this__$AD = this._$AD, _this__$AD_el = _this__$AD.el, i = _this__$AD_el.content, s = _this__$AD.parts, e = ((_t_creationScope = t === null || t === void 0 ? void 0 : t.creationScope) !== null && _t_creationScope !== void 0 ? _t_creationScope : l).importNode(i, true);
1334
+ P.currentNode = e;
1335
+ var h = P.nextNode(), o = 0, n = 0, r = s[0];
1336
+ for(; void 0 !== r;){
1337
+ if (o === r.index) {
1335
1338
  var i1 = void 0;
1336
- 2 === l.type ? i1 = new R(h, h.nextSibling, this, t) : 1 === l.type ? i1 = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i1 = new z(h, this, t)), this._$AV.push(i1), l = s[++n];
1339
+ 2 === r.type ? i1 = new k(h, h.nextSibling, this, t) : 1 === r.type ? i1 = new r.ctor(h, r.name, r.strings, this, t) : 6 === r.type && (i1 = new Z(h, this, t)), this._$AV.push(i1), r = s[++n];
1337
1340
  }
1338
- o !== (l === null || l === void 0 ? void 0 : l.index) && (h = C.nextNode(), o++);
1341
+ o !== (r === null || r === void 0 ? void 0 : r.index) && (h = P.nextNode(), o++);
1339
1342
  }
1340
- return C.currentNode = r$2, e;
1343
+ return P.currentNode = l, e;
1341
1344
  }
1342
1345
  },
1343
1346
  {
@@ -1367,15 +1370,15 @@ var M = /*#__PURE__*/ function() {
1367
1370
  }
1368
1371
  }
1369
1372
  ]);
1370
- return M;
1373
+ return R;
1371
1374
  }();
1372
- var R = /*#__PURE__*/ function() {
1373
- function R(t, i, s, e) {
1374
- _class_call_check$1(this, R);
1375
+ var k = /*#__PURE__*/ function() {
1376
+ function k(t, i, s, e) {
1377
+ _class_call_check$1(this, k);
1375
1378
  var _e_isConnected;
1376
- this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = (_e_isConnected = e === null || e === void 0 ? void 0 : e.isConnected) !== null && _e_isConnected !== void 0 ? _e_isConnected : true;
1379
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = (_e_isConnected = e === null || e === void 0 ? void 0 : e.isConnected) !== null && _e_isConnected !== void 0 ? _e_isConnected : true;
1377
1380
  }
1378
- _create_class$1(R, [
1381
+ _create_class$1(k, [
1379
1382
  {
1380
1383
  key: "_$AU",
1381
1384
  get: function get() {
@@ -1408,7 +1411,7 @@ var R = /*#__PURE__*/ function() {
1408
1411
  key: "_$AI",
1409
1412
  value: function _$AI(t) {
1410
1413
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this;
1411
- t = S(this, t, i), c(t) ? t === E || null == t || "" === t ? (this._$AH !== E && this._$AR(), this._$AH = E) : t !== this._$AH && t !== T && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : u(t) ? this.k(t) : this._(t);
1414
+ t = M(this, t, i), a(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== E && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : d(t) ? this.k(t) : this._(t);
1412
1415
  }
1413
1416
  },
1414
1417
  {
@@ -1426,17 +1429,17 @@ var R = /*#__PURE__*/ function() {
1426
1429
  {
1427
1430
  key: "_",
1428
1431
  value: function _(t) {
1429
- this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$2.createTextNode(t)), this._$AH = t;
1432
+ this._$AH !== A && a(this._$AH) ? this._$AA.nextSibling.data = t : this.T(l.createTextNode(t)), this._$AH = t;
1430
1433
  }
1431
1434
  },
1432
1435
  {
1433
1436
  key: "$",
1434
1437
  value: function $(t) {
1435
1438
  var _this__$AH;
1436
- var i = t.values, s = t._$litType$, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = N.createElement(P(s.h, s.h[0]), this.options)), s);
1439
+ var i = t.values, s = t._$litType$, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = S.createElement(V(s.h, s.h[0]), this.options)), s);
1437
1440
  if (((_this__$AH = this._$AH) === null || _this__$AH === void 0 ? void 0 : _this__$AH._$AD) === e) this._$AH.p(i);
1438
1441
  else {
1439
- var _$t = new M(e, this), s1 = _$t.u(this.options);
1442
+ var _$t = new R(e, this), s1 = _$t.u(this.options);
1440
1443
  _$t.p(i), this.T(s1), this._$AH = _$t;
1441
1444
  }
1442
1445
  }
@@ -1444,21 +1447,21 @@ var R = /*#__PURE__*/ function() {
1444
1447
  {
1445
1448
  key: "_$AC",
1446
1449
  value: function _$AC(t) {
1447
- var i = A.get(t.strings);
1448
- return void 0 === i && A.set(t.strings, i = new N(t)), i;
1450
+ var i = C.get(t.strings);
1451
+ return void 0 === i && C.set(t.strings, i = new S(t)), i;
1449
1452
  }
1450
1453
  },
1451
1454
  {
1452
1455
  key: "k",
1453
- value: function k(t) {
1454
- a(this._$AH) || (this._$AH = [], this._$AR());
1456
+ value: function k1(t) {
1457
+ u(this._$AH) || (this._$AH = [], this._$AR());
1455
1458
  var i = this._$AH;
1456
1459
  var s, e = 0;
1457
1460
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1458
1461
  try {
1459
1462
  for(var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1460
1463
  var h = _step.value;
1461
- e === i.length ? i.push(s = new R(this.O(l()), this.O(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
1464
+ e === i.length ? i.push(s = new k(this.O(c()), this.O(c()), this, this.options)) : s = i[e], s._$AI(h), e++;
1462
1465
  }
1463
1466
  } catch (err) {
1464
1467
  _didIteratorError = true;
@@ -1480,11 +1483,11 @@ var R = /*#__PURE__*/ function() {
1480
1483
  {
1481
1484
  key: "_$AR",
1482
1485
  value: function _$AR() {
1483
- var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this._$AA.nextSibling, i = arguments.length > 1 ? arguments[1] : void 0;
1486
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this._$AA.nextSibling, s = arguments.length > 1 ? arguments[1] : void 0;
1484
1487
  var _this__$AP, _this;
1485
- for((_this__$AP = (_this = this)._$AP) === null || _this__$AP === void 0 ? void 0 : _this__$AP.call(_this, false, true, i); t !== this._$AB;){
1486
- var i1 = t.nextSibling;
1487
- t.remove(), t = i1;
1488
+ for((_this__$AP = (_this = this)._$AP) === null || _this__$AP === void 0 ? void 0 : _this__$AP.call(_this, false, true, s); t !== this._$AB;){
1489
+ var s1 = i$1(t).nextSibling;
1490
+ i$1(t).remove(), t = s1;
1488
1491
  }
1489
1492
  }
1490
1493
  },
@@ -1496,14 +1499,14 @@ var R = /*#__PURE__*/ function() {
1496
1499
  }
1497
1500
  }
1498
1501
  ]);
1499
- return R;
1502
+ return k;
1500
1503
  }();
1501
- var k = /*#__PURE__*/ function() {
1502
- function k(t, i, s, e, h) {
1503
- _class_call_check$1(this, k);
1504
- this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String), this.strings = s) : this._$AH = E;
1504
+ var H = /*#__PURE__*/ function() {
1505
+ function H(t, i, s, e, h) {
1506
+ _class_call_check$1(this, H);
1507
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String), this.strings = s) : this._$AH = A;
1505
1508
  }
1506
- _create_class$1(k, [
1509
+ _create_class$1(H, [
1507
1510
  {
1508
1511
  key: "tagName",
1509
1512
  get: function get() {
@@ -1522,11 +1525,11 @@ var k = /*#__PURE__*/ function() {
1522
1525
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this, s = arguments.length > 2 ? arguments[2] : void 0, e = arguments.length > 3 ? arguments[3] : void 0;
1523
1526
  var h = this.strings;
1524
1527
  var o = false;
1525
- if (void 0 === h) t = S(this, t, i, 0), o = !c(t) || t !== this._$AH && t !== T, o && (this._$AH = t);
1528
+ if (void 0 === h) t = M(this, t, i, 0), o = !a(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
1526
1529
  else {
1527
1530
  var e1 = t;
1528
1531
  var n, r;
1529
- for(t = h[0], n = 0; n < h.length - 1; n++)r = S(this, e1[s + n], i, n), r === T && (r = this._$AH[n]), o || (o = !c(r) || r !== this._$AH[n]), r === E ? t = E : t !== E && (t += (r !== null && r !== void 0 ? r : "") + h[n + 1]), this._$AH[n] = r;
1532
+ for(t = h[0], n = 0; n < h.length - 1; n++)r = M(this, e1[s + n], i, n), r === E && (r = this._$AH[n]), o || (o = !a(r) || r !== this._$AH[n]), r === A ? t = A : t !== A && (t += (r !== null && r !== void 0 ? r : "") + h[n + 1]), this._$AH[n] = r;
1530
1533
  }
1531
1534
  o && !e && this.j(t);
1532
1535
  }
@@ -1534,71 +1537,71 @@ var k = /*#__PURE__*/ function() {
1534
1537
  {
1535
1538
  key: "j",
1536
1539
  value: function j(t) {
1537
- t === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t !== null && t !== void 0 ? t : "");
1540
+ t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t !== null && t !== void 0 ? t : "");
1538
1541
  }
1539
1542
  }
1540
1543
  ]);
1541
- return k;
1544
+ return H;
1542
1545
  }();
1543
- var H = /*#__PURE__*/ function(k) {
1544
- _inherits$1(H, k);
1545
- var _super = _create_super$1(H);
1546
- function H() {
1547
- _class_call_check$1(this, H);
1546
+ var I = /*#__PURE__*/ function(H) {
1547
+ _inherits$1(I, H);
1548
+ var _super = _create_super$1(I);
1549
+ function I() {
1550
+ _class_call_check$1(this, I);
1548
1551
  var _this;
1549
1552
  _this = _super.call.apply(_super, [
1550
1553
  this
1551
1554
  ].concat(Array.prototype.slice.call(arguments))), _this.type = 3;
1552
1555
  return _possible_constructor_return$1(_this);
1553
1556
  }
1554
- _create_class$1(H, [
1557
+ _create_class$1(I, [
1555
1558
  {
1556
1559
  key: "j",
1557
1560
  value: function j(t) {
1558
- this.element[this.name] = t === E ? void 0 : t;
1561
+ this.element[this.name] = t === A ? void 0 : t;
1559
1562
  }
1560
1563
  }
1561
1564
  ]);
1562
- return H;
1563
- }(k);
1564
- var I = /*#__PURE__*/ function(k) {
1565
- _inherits$1(I, k);
1566
- var _super = _create_super$1(I);
1567
- function I() {
1568
- _class_call_check$1(this, I);
1565
+ return I;
1566
+ }(H);
1567
+ var L = /*#__PURE__*/ function(H) {
1568
+ _inherits$1(L, H);
1569
+ var _super = _create_super$1(L);
1570
+ function L() {
1571
+ _class_call_check$1(this, L);
1569
1572
  var _this;
1570
1573
  _this = _super.call.apply(_super, [
1571
1574
  this
1572
1575
  ].concat(Array.prototype.slice.call(arguments))), _this.type = 4;
1573
1576
  return _possible_constructor_return$1(_this);
1574
1577
  }
1575
- _create_class$1(I, [
1578
+ _create_class$1(L, [
1576
1579
  {
1577
1580
  key: "j",
1578
1581
  value: function j(t) {
1579
- this.element.toggleAttribute(this.name, !!t && t !== E);
1582
+ this.element.toggleAttribute(this.name, !!t && t !== A);
1580
1583
  }
1581
1584
  }
1582
1585
  ]);
1583
- return I;
1584
- }(k);
1585
- var L = /*#__PURE__*/ function(k) {
1586
- _inherits$1(L, k);
1587
- var _super = _create_super$1(L);
1588
- function L(t, i, s, e, h) {
1589
- _class_call_check$1(this, L);
1586
+ return L;
1587
+ }(H);
1588
+ var z = /*#__PURE__*/ function(H) {
1589
+ _inherits$1(z, H);
1590
+ var _super = _create_super$1(z);
1591
+ function z(t, i, s, e, h) {
1592
+ _class_call_check$1(this, z);
1590
1593
  var _this;
1591
1594
  _this = _super.call(this, t, i, s, e, h), _this.type = 5;
1592
1595
  return _possible_constructor_return$1(_this);
1593
1596
  }
1594
- _create_class$1(L, [
1597
+ _create_class$1(z, [
1595
1598
  {
1596
1599
  key: "_$AI",
1597
1600
  value: function _$AI(t) {
1598
1601
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this;
1599
- var _S;
1600
- if ((t = (_S = S(this, t, i, 0)) !== null && _S !== void 0 ? _S : E) === T) return;
1601
- var s = this._$AH, e = t === E && s !== E || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== E && (s === E || e);
1602
+ var _M;
1603
+ if ((t = (_M = M(this, t, i, 0)) !== null && _M !== void 0 ? _M : A) === E) return;
1604
+ var s = this._$AH, e = t === A && s !== A || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== A && (s === A || e);
1602
1605
  e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
1603
1606
  }
1604
1607
  },
@@ -1611,14 +1614,14 @@ var L = /*#__PURE__*/ function(k) {
1611
1614
  }
1612
1615
  }
1613
1616
  ]);
1614
- return L;
1615
- }(k);
1616
- var z = /*#__PURE__*/ function() {
1617
- function z(t, i, s) {
1618
- _class_call_check$1(this, z);
1617
+ return z;
1618
+ }(H);
1619
+ var Z = /*#__PURE__*/ function() {
1620
+ function Z(t, i, s) {
1621
+ _class_call_check$1(this, Z);
1619
1622
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
1620
1623
  }
1621
- _create_class$1(z, [
1624
+ _create_class$1(Z, [
1622
1625
  {
1623
1626
  key: "_$AU",
1624
1627
  get: function get() {
@@ -1628,23 +1631,23 @@ var z = /*#__PURE__*/ function() {
1628
1631
  {
1629
1632
  key: "_$AI",
1630
1633
  value: function _$AI(t) {
1631
- S(this, t);
1634
+ M(this, t);
1632
1635
  }
1633
1636
  }
1634
1637
  ]);
1635
- return z;
1638
+ return Z;
1636
1639
  }();
1637
- var j = t$1.litHtmlPolyfillSupport;
1640
+ var B = t$1.litHtmlPolyfillSupport;
1638
1641
  var _litHtmlVersions;
1639
- j === null || j === void 0 ? void 0 : j(N, R), ((_litHtmlVersions = (_t = t$1).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t.litHtmlVersions = []).push("3.3.1");
1640
- var B = function(t, i, s) {
1642
+ B === null || B === void 0 ? void 0 : B(S, k), ((_litHtmlVersions = (_t = t$1).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t.litHtmlVersions = []).push("3.3.3");
1643
+ var D = function(t, i, s) {
1641
1644
  var _s_renderBefore;
1642
1645
  var e = (_s_renderBefore = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore !== void 0 ? _s_renderBefore : i;
1643
1646
  var h = e._$litPart$;
1644
1647
  if (void 0 === h) {
1645
1648
  var _s_renderBefore1;
1646
1649
  var _$t = (_s_renderBefore1 = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore1 !== void 0 ? _s_renderBefore1 : null;
1647
- e._$litPart$ = h = new R(i.insertBefore(l(), _$t), _$t, void 0, s !== null && s !== void 0 ? s : {});
1650
+ e._$litPart$ = h = new k(i.insertBefore(c(), _$t), _$t, void 0, s !== null && s !== void 0 ? s : {});
1648
1651
  }
1649
1652
  return h._$AI(t), h;
1650
1653
  };
@@ -1790,7 +1793,7 @@ var i = /*#__PURE__*/ function(t) {
1790
1793
  key: "update",
1791
1794
  value: function update(t) {
1792
1795
  var r = this.render();
1793
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), _get(_get_prototype_of(i.prototype), "update", this).call(this, t), this._$Do = B(r, this.renderRoot, this.renderOptions);
1796
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), _get(_get_prototype_of(i.prototype), "update", this).call(this, t), this._$Do = D(r, this.renderRoot, this.renderOptions);
1794
1797
  }
1795
1798
  },
1796
1799
  {
@@ -1810,7 +1813,7 @@ var i = /*#__PURE__*/ function(t) {
1810
1813
  {
1811
1814
  key: "render",
1812
1815
  value: function render() {
1813
- return T;
1816
+ return E;
1814
1817
  }
1815
1818
  }
1816
1819
  ]);
@@ -1824,7 +1827,7 @@ o$1 === null || o$1 === void 0 ? void 0 : o$1({
1824
1827
  LitElement: i
1825
1828
  });
1826
1829
  var _litElementVersions;
1827
- ((_litElementVersions = (_s = s).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _s.litElementVersions = []).push("4.2.1");
1830
+ ((_litElementVersions = (_s = s).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _s.litElementVersions = []).push("4.2.2");
1828
1831
 
1829
1832
  /**
1830
1833
  * @license
@@ -1861,7 +1864,7 @@ function _type_of$1(obj) {
1861
1864
  return {
1862
1865
  set: function set(r) {
1863
1866
  var n = _$e.get.call(this);
1864
- _$e.set.call(this, r), this.requestUpdate(o1, n, _$t);
1867
+ _$e.set.call(this, r), this.requestUpdate(o1, n, _$t, true, r);
1865
1868
  },
1866
1869
  init: function init(e) {
1867
1870
  return void 0 !== e && this.C(o1, void 0, _$t, e), e;
@@ -1872,7 +1875,7 @@ function _type_of$1(obj) {
1872
1875
  var o2 = r.name;
1873
1876
  return function r(r) {
1874
1877
  var n = this[o2];
1875
- _$e.call(this, r), this.requestUpdate(o2, n, _$t);
1878
+ _$e.call(this, r), this.requestUpdate(o2, n, _$t, true, r);
1876
1879
  };
1877
1880
  }
1878
1881
  throw Error("Unsupported decorator location: " + n);
@@ -5139,7 +5142,7 @@ class HiddenElement extends i {
5139
5142
  return text;
5140
5143
  }
5141
5144
  render() {
5142
- return x``;
5145
+ return b``;
5143
5146
  }
5144
5147
  constructor(...args){
5145
5148
  super(...args);
@@ -5232,7 +5235,7 @@ class InputOcrElement extends i {
5232
5235
  return text;
5233
5236
  }
5234
5237
  render() {
5235
- return x`
5238
+ return b`
5236
5239
  <section
5237
5240
  class="download ${this.state}"
5238
5241
  @click=${()=>[
@@ -5240,8 +5243,8 @@ class InputOcrElement extends i {
5240
5243
  'loaded'
5241
5244
  ].indexOf(this.state) >= 0 ? this.loadFile() : void 0}
5242
5245
  >
5243
- ${this.state === 'loaded' ? x` <ui5-icon name="attachment"></ui5-icon>
5244
- <p>${this.label}<br />${this._content}</p>` : this.state === 'loading' ? x`<ui5-busy-indicator size="Small" active></ui5-busy-indicator>` : x` <ui5-icon name="add-document"></ui5-icon>
5246
+ ${this.state === 'loaded' ? b` <ui5-icon name="attachment"></ui5-icon>
5247
+ <p>${this.label}<br />${this._content}</p>` : this.state === 'loading' ? b`<ui5-busy-indicator size="Small" active></ui5-busy-indicator>` : b` <ui5-icon name="add-document"></ui5-icon>
5245
5248
  <p>${this.label}</p>`}
5246
5249
  </section>
5247
5250
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-web-ocr",
3
- "version": "0.136.0",
3
+ "version": "0.136.3",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,2 +0,0 @@
1
- export * from './lib/skill-web-ocr';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -1,13 +0,0 @@
1
- import { LitElement, TemplateResult } from 'lit';
2
- export declare class HiddenElement extends LitElement {
3
- selector: string;
4
- language: string;
5
- required: boolean;
6
- private _value;
7
- get value(): string | ArrayBuffer;
8
- connectedCallback(): void;
9
- private initialize;
10
- private analyzeFile;
11
- render(): TemplateResult;
12
- }
13
- //# sourceMappingURL=input-ocr-image.element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input-ocr-image.element.d.ts","sourceRoot":"","sources":["../../../src/lib/input-ocr-image.element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAQ,MAAM,KAAK,CAAC;AAIvD,qBACa,aAAc,SAAQ,UAAU;IAE3C,QAAQ,EAAG,MAAM,CAAC;IAGlB,QAAQ,SAAS;IAGjB,QAAQ,UAAQ;IAEhB,OAAO,CAAC,MAAM,CAA4B;IAC1C,IAAI,KAAK,IAAI,MAAM,GAAG,WAAW,CAEhC;IAEQ,iBAAiB,IAAI,IAAI;YAKpB,UAAU;YAQV,WAAW;IAUhB,MAAM,IAAI,cAAc;CAGlC"}
@@ -1,17 +0,0 @@
1
- import { LitElement, TemplateResult } from 'lit';
2
- export declare class InputOcrElement extends LitElement {
3
- label: string;
4
- language: string;
5
- accept: string;
6
- required: boolean;
7
- private state;
8
- private _content;
9
- get content(): string;
10
- private _value;
11
- get value(): string | ArrayBuffer;
12
- static styles: import("lit").CSSResult;
13
- private loadFile;
14
- private analyzeFile;
15
- render(): TemplateResult;
16
- }
17
- //# sourceMappingURL=input-ocr.element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input-ocr.element.d.ts","sourceRoot":"","sources":["../../../src/lib/input-ocr.element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAI5D,qBACa,eAAgB,SAAQ,UAAU;IAE7C,KAAK,SAAY;IAGjB,QAAQ,SAAS;IAGjB,MAAM,SAAa;IAGnB,QAAQ,UAAQ;IAGhB,OAAO,CAAC,KAAK,CAAc;IAG3B,OAAO,CAAC,QAAQ,CAA+B;IAC/C,IAAI,OAAO,WAEV;IAED,OAAO,CAAC,MAAM,CAA4B;IAC1C,IAAI,KAAK,IAAI,MAAM,GAAG,WAAW,CAEhC;IAED,OAAgB,MAAM,0BAiCpB;IAEF,OAAO,CAAC,QAAQ;YAkBF,WAAW;IAUhB,MAAM,IAAI,cAAc;CAgBlC"}
@@ -1,3 +0,0 @@
1
- export * from './input-ocr-image.element';
2
- export * from './input-ocr.element';
3
- //# sourceMappingURL=skill-web-ocr.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skill-web-ocr.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-web-ocr.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC"}