@operato/scene-restful 1.1.26 → 1.1.28

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/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ### [1.1.28](https://github.com/things-scene/operato-scene/compare/v1.1.27...v1.1.28) (2023-01-11)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * add headers for restful ([693db39](https://github.com/things-scene/operato-scene/commit/693db39fd6d1ac15027cea0a057008f3f2be5a68))
12
+
13
+
14
+
15
+ ### [1.1.27](https://github.com/things-scene/operato-scene/compare/v1.1.26...v1.1.27) (2023-01-11)
16
+
17
+
18
+ ### :bug: Bug Fix
19
+
20
+ * reinvent scene-restful ([52bc04a](https://github.com/things-scene/operato-scene/commit/52bc04a429c7eb6a8c4de010efd6ce2c6d8de7c1))
21
+
22
+
23
+
6
24
  ### [1.1.26](https://github.com/things-scene/operato-scene/compare/v1.1.25...v1.1.26) (2023-01-11)
7
25
 
8
26
 
package/dist/restful.d.ts CHANGED
@@ -13,12 +13,14 @@ export default class Restful extends Restful_base {
13
13
  set url(url: any);
14
14
  get period(): number;
15
15
  set period(period: number);
16
+ get value(): any;
17
+ set value(value: any);
16
18
  get withCredentials(): boolean;
17
19
  set withCredentials(withCredentials: boolean);
18
20
  get repeatTimer(): NodeJS.Timeout;
19
21
  set repeatTimer(repeatTimer: NodeJS.Timeout);
20
22
  ready(): void;
21
- _initRestful(): void;
23
+ _initRestful(force?: boolean): void;
22
24
  dispose(): void;
23
25
  _startRepeater(): void;
24
26
  _stopRepeater(): void;
package/dist/restful.js CHANGED
@@ -215,11 +215,21 @@ const NATURE = {
215
215
  ]
216
216
  }
217
217
  },
218
+ {
219
+ type: 'key-values',
220
+ label: 'headers',
221
+ name: 'headers'
222
+ },
218
223
  {
219
224
  type: 'number',
220
225
  label: 'period',
221
226
  name: 'period',
222
227
  placeholder: 'SECONDS'
228
+ },
229
+ {
230
+ type: 'checkbox',
231
+ label: 'fetch-on-load',
232
+ name: 'fetchOnLoad'
223
233
  }
224
234
  ],
225
235
  help: 'scene/component/restful'
@@ -246,12 +256,19 @@ export default class Restful extends DataSource(RectPath(Shape)) {
246
256
  this._initRestful();
247
257
  }
248
258
  get period() {
249
- return this.state.period * 1000;
259
+ return Number(this.state.period) * 1000;
250
260
  }
251
261
  set period(period) {
252
- this.setState('period', period);
262
+ this.setState('period', Number(period));
253
263
  this._initRestful();
254
264
  }
265
+ get value() {
266
+ return this.state.value;
267
+ }
268
+ set value(value) {
269
+ this.setState('value', value);
270
+ this._initRestful(true);
271
+ }
255
272
  get withCredentials() {
256
273
  return !!this.getState('withCredentials');
257
274
  }
@@ -267,9 +284,9 @@ export default class Restful extends DataSource(RectPath(Shape)) {
267
284
  this._repeatTimer = repeatTimer;
268
285
  }
269
286
  ready() {
270
- this._initRestful();
287
+ this._initRestful(this.state.fetchOnLoad);
271
288
  }
272
- _initRestful() {
289
+ _initRestful(force = false) {
273
290
  if (!this.app.isViewMode)
274
291
  return;
275
292
  if (!this.url) {
@@ -277,7 +294,12 @@ export default class Restful extends DataSource(RectPath(Shape)) {
277
294
  return;
278
295
  }
279
296
  this._stopRepeater();
280
- this.period > 0 && this._startRepeater();
297
+ if (this.period > 0) {
298
+ this._startRepeater();
299
+ }
300
+ else {
301
+ force && this.fetch();
302
+ }
281
303
  }
282
304
  dispose() {
283
305
  super.dispose();
@@ -308,8 +330,11 @@ export default class Restful extends DataSource(RectPath(Shape)) {
308
330
  }
309
331
  }
310
332
  async fetch() {
311
- const { url, method = 'GET', mode = 'cors', cache = 'default', credentials = 'same-origin', redirect = 'follow', referrerPolicy = 'no-referrer-when-downgrade', contentType = 'application/json', dataFormat = 'json' } = this.state;
333
+ var { url, method = 'GET', mode = 'cors', cache = 'default', credentials = 'same-origin', redirect = 'follow', referrerPolicy = 'no-referrer-when-downgrade', contentType = 'application/json', dataFormat = 'json', headers = {}, value } = this.state;
312
334
  if (dataFormat == 'jsonp') {
335
+ if (value && typeof value == 'string') {
336
+ url = value;
337
+ }
313
338
  jsonp(url, {}, (self, data) => {
314
339
  if (this._isStarted && data) {
315
340
  this.data = data;
@@ -323,17 +348,23 @@ export default class Restful extends DataSource(RectPath(Shape)) {
323
348
  cache,
324
349
  credentials,
325
350
  headers: {
326
- 'Content-Type': contentType
351
+ 'Content-Type': contentType,
352
+ ...headers
327
353
  },
328
354
  redirect,
329
355
  referrerPolicy
330
356
  };
331
357
  if (method != 'GET' && method != 'HEAD') {
332
358
  if (contentType == 'application/json') {
333
- options.body = JSON.stringify(this.value);
359
+ options.body = JSON.stringify(value);
334
360
  }
335
361
  else {
336
- options.body = this.value;
362
+ options.body = value;
363
+ }
364
+ }
365
+ else {
366
+ if (value && typeof value == 'string') {
367
+ options.url = value;
337
368
  }
338
369
  }
339
370
  const response = await fetch(url, options);
@@ -1 +1 @@
1
- {"version":3,"file":"restful.js","sourceRoot":"","sources":["../src/restful.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAEtG,OAAO,KAAK,MAAM,SAAS,CAAA;AAE3B,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP;wBACE,OAAO,EAAE,KAAK;wBACd,KAAK,EAAE,KAAK;qBACb;oBACD;wBACE,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,MAAM;qBACd;oBACD;wBACE,OAAO,EAAE,KAAK;wBACd,KAAK,EAAE,KAAK;qBACb;oB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S,EAAE,OAAO,CAAC,CAAA","sourcesContent":["import { Component, ComponentNature, DataSource, RectPath, Shape, warn } from '@hatiolab/things-scene'\n\nimport jsonp from './jsonp'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'select',\n label: 'method',\n name: 'method',\n property: {\n options: [\n {\n display: 'GET',\n value: 'GET'\n },\n {\n display: 'POST',\n value: 'POST'\n },\n {\n display: 'PUT',\n value: 'PUT'\n },\n {\n display: 'DELETE',\n value: 'DELETE'\n }\n ]\n }\n },\n {\n type: 'string',\n label: 'url',\n name: 'url'\n },\n {\n type: 'string',\n label: 'authorization',\n name: 'authorization'\n },\n {\n type: 'select',\n label: 'data-format',\n name: 'dataFormat',\n property: {\n options: [\n {\n display: 'json',\n value: 'json'\n },\n {\n display: 'jsonp',\n value: 'jsonp'\n },\n {\n display: 'text',\n value: 'text'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'content-type',\n name: 'contentType',\n property: {\n options: [\n {\n display: 'application/json',\n value: 'application/json'\n },\n {\n display: 'application/x-www-form-urlencoded',\n value: 'application/x-www-form-urlencoded'\n },\n {\n display: 'text/plain',\n value: 'text/plain'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'mode',\n name: 'mode',\n property: {\n options: [\n {\n display: 'cors',\n value: 'cors'\n },\n {\n display: 'no-cors',\n value: 'no-cors'\n },\n {\n display: 'same-origin',\n value: 'same-origin'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'credentials',\n name: 'credentials',\n property: {\n options: [\n {\n display: 'same-origin',\n value: 'same-origin'\n },\n {\n display: 'include',\n value: 'include'\n },\n {\n display: 'omit',\n value: 'omit'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'cache',\n name: 'cache',\n property: {\n options: [\n {\n display: 'default',\n value: 'default'\n },\n {\n display: 'no-cache',\n value: 'no-cache'\n },\n {\n display: 'reload',\n value: 'reload'\n },\n {\n display: 'force-cache',\n value: 'force-cache'\n },\n {\n display: 'only-if-cached',\n value: 'only-if-cached'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'redirect',\n name: 'redirect',\n property: {\n options: [\n {\n display: 'follow',\n value: 'follow'\n },\n {\n display: 'manual',\n value: 'manual'\n },\n {\n display: 'error',\n value: 'error'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'referrer-policy',\n name: 'referrerPolicy',\n property: {\n options: [\n {\n display: 'no-referrer-when-downgrade',\n value: 'no-referrer-when-downgrade'\n },\n {\n display: 'no-referrer',\n value: 'no-referrer'\n },\n {\n display: 'origin',\n value: 'origin'\n },\n {\n display: 'origin-when-cross-origin',\n value: 'origin-when-cross-origin'\n },\n {\n display: 'same-origin',\n value: 'same-origin'\n },\n {\n display: 'strict-origin',\n value: 'strict-origin'\n },\n {\n display: 'strict-origin-when-cross-origin',\n value: 'strict-origin-when-cross-origin'\n },\n {\n display: 'unsafe-url',\n value: 'unsafe-url'\n }\n ]\n }\n },\n {\n type: 'number',\n label: 'period',\n name: 'period',\n placeholder: 'SECONDS'\n }\n ],\n help: 'scene/component/restful'\n}\n\nconst REST_IMAGE =\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAACWCAMAAABqx6OSAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAB1WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgID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ZqPmw/4ZijRC44kOWGY23Tzj8caP8Ry8Xxr5Hv2Eu4o+MldBcc93XBoWk3HD13wQF+2jxrQtL9GoQLXiZxwys5bnixyQWvh7nhJTs3vKrohhc+p+b2Jkm496nUB85/+dgNr3BLS2UTmmyFF6c+LeenE3BDUgY3pLawPkHIgQnJqJyfZsXiZDUmJexzfsofNyROsij91K7JSfqcn8RrygWp0HBFrpm2BhC0JqEc3mvdMGlVxKq0fGSscXpywyk3pIgkNenwRJuyl3R6ulKyXOH0pK9ydOHw1LmycALisaN3yL4ExIqFOzyNc3/N9EMy7IOAs5Jh/5M79D8U6UTFcE/VFgAAAABJRU5ErkJggg=='\n\nconst WARN_NO_URL = 'Valid URL property required'\n\nexport default class Restful extends DataSource(RectPath(Shape)) {\n static _image: HTMLImageElement\n\n static get image() {\n if (!Restful._image) {\n Restful._image = new Image()\n Restful._image.src = REST_IMAGE\n }\n\n return Restful._image\n }\n\n private _repeatTimer!: NodeJS.Timeout\n private _isStarted = false\n\n get url() {\n return this.getState('url')\n }\n\n set url(url) {\n this.setState('url', url)\n this._initRestful()\n }\n\n get period() {\n return this.state.period * 1000\n }\n\n set period(period) {\n this.setState('period', period)\n this._initRestful()\n }\n\n get withCredentials() {\n return !!this.getState('withCredentials')\n }\n\n set withCredentials(withCredentials) {\n this.setState('withCredentials', withCredentials)\n this._initRestful()\n }\n\n get repeatTimer() {\n return this._repeatTimer\n }\n\n set repeatTimer(repeatTimer) {\n this._stopRepeater()\n this._repeatTimer = repeatTimer\n }\n\n ready() {\n this._initRestful()\n }\n\n _initRestful() {\n if (!this.app.isViewMode) return\n\n if (!this.url) {\n warn(WARN_NO_URL)\n return\n }\n\n this._stopRepeater()\n this.period > 0 && this._startRepeater()\n }\n\n dispose() {\n super.dispose()\n this._stopRepeater()\n }\n\n _startRepeater() {\n this._isStarted = true\n\n var self = this\n\n function _() {\n if (!self._isStarted) {\n return\n }\n self.fetch()\n\n if (!self.period) {\n self._stopRepeater()\n return\n }\n\n self._repeatTimer = setTimeout(() => {\n requestAnimationFrame(_)\n }, self.period)\n }\n\n requestAnimationFrame(_)\n }\n\n _stopRepeater() {\n this._isStarted = false\n if (this.repeatTimer) {\n clearTimeout(this._repeatTimer)\n }\n }\n\n async fetch() {\n const {\n url,\n method = 'GET',\n mode = 'cors',\n cache = 'default',\n credentials = 'same-origin',\n redirect = 'follow',\n referrerPolicy = 'no-referrer-when-downgrade',\n contentType = 'application/json',\n dataFormat = 'json'\n } = this.state\n\n if (dataFormat == 'jsonp') {\n jsonp(url, {}, (self, data) => {\n if (this._isStarted && data) {\n this.data = data\n }\n })\n\n return\n }\n\n var options: any = {\n method,\n mode,\n cache,\n credentials,\n headers: {\n 'Content-Type': contentType\n },\n redirect,\n referrerPolicy\n }\n\n if (method != 'GET' && method != 'HEAD') {\n if (contentType == 'application/json') {\n options.body = JSON.stringify(this.value)\n } else {\n options.body = this.value\n }\n }\n\n const response = await fetch(url, options)\n\n if (!this._isStarted) {\n return\n }\n\n if (dataFormat === 'json') {\n this.data = response.json()\n } else if (dataFormat === 'text') {\n this.data = response.text()\n }\n }\n\n _draw(context: CanvasRenderingContext2D) {\n var { left, top, width, height } = this.bounds\n\n context.beginPath()\n this.drawImage(context, Restful.image, left, top, width, height)\n }\n\n ondblclick(e: Event) {\n if (!this.url) {\n warn(WARN_NO_URL)\n return\n }\n\n this.fetch()\n }\n\n get controls() {\n return []\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('restful', Restful)\n"]}
1
+ {"version":3,"file":"restful.js","sourceRoot":"","sources":["../src/restful.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAEtG,OAAO,KAAK,MAAM,SAAS,CAAA;AAE3B,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,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,GAAG,KAAK,CAAA;aACrB;SACF;aAAM;YACL,IAAI,KAAK,IAAI,OAAO,KAAK,IAAI,QAAQ,EAAE;gBACrC,OAAO,CAAC,GAAG,GAAG,KAAK,CAAA;aACpB;SACF;QAED,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QAE1C,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACpB,OAAM;SACP;QAED,IAAI,UAAU,KAAK,MAAM,EAAE;YACzB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAA;SAC5B;aAAM,IAAI,UAAU,KAAK,MAAM,EAAE;YAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAA;SAC5B;IACH,CAAC;IAED,KAAK,CAAC,OAAiC;QACrC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAA;QAE9C,OAAO,CAAC,SAAS,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IAClE,CAAC;IAED,UAAU,CAAC,CAAQ;QACjB,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YACb,IAAI,CAAC,WAAW,CAAC,CAAA;YACjB,OAAM;SACP;QAED,IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,EAAE,CAAA;IACX,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA","sourcesContent":["import { Component, ComponentNature, DataSource, RectPath, Shape, warn } from '@hatiolab/things-scene'\n\nimport jsonp from './jsonp'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'select',\n label: 'method',\n name: 'method',\n property: {\n options: [\n {\n display: 'GET',\n value: 'GET'\n },\n {\n display: 'POST',\n value: 'POST'\n },\n {\n display: 'PUT',\n value: 'PUT'\n },\n {\n display: 'DELETE',\n value: 'DELETE'\n }\n ]\n }\n },\n {\n type: 'string',\n label: 'url',\n name: 'url'\n },\n {\n type: 'string',\n label: 'authorization',\n name: 'authorization'\n },\n {\n type: 'select',\n label: 'data-format',\n name: 'dataFormat',\n property: {\n options: [\n {\n display: 'json',\n value: 'json'\n },\n {\n display: 'jsonp',\n value: 'jsonp'\n },\n {\n display: 'text',\n value: 'text'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'content-type',\n name: 'contentType',\n property: {\n options: [\n {\n display: 'application/json',\n value: 'application/json'\n },\n {\n display: 'application/x-www-form-urlencoded',\n value: 'application/x-www-form-urlencoded'\n },\n {\n display: 'text/plain',\n value: 'text/plain'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'mode',\n name: 'mode',\n property: {\n options: [\n {\n display: 'cors',\n value: 'cors'\n },\n {\n display: 'no-cors',\n value: 'no-cors'\n },\n {\n display: 'same-origin',\n value: 'same-origin'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'credentials',\n name: 'credentials',\n property: {\n options: [\n {\n display: 'same-origin',\n value: 'same-origin'\n },\n {\n display: 'include',\n value: 'include'\n },\n {\n display: 'omit',\n value: 'omit'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'cache',\n name: 'cache',\n property: {\n options: [\n {\n display: 'default',\n value: 'default'\n },\n {\n display: 'no-cache',\n value: 'no-cache'\n },\n {\n display: 'reload',\n value: 'reload'\n },\n {\n display: 'force-cache',\n value: 'force-cache'\n },\n {\n display: 'only-if-cached',\n value: 'only-if-cached'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'redirect',\n name: 'redirect',\n property: {\n options: [\n {\n display: 'follow',\n value: 'follow'\n },\n {\n display: 'manual',\n value: 'manual'\n },\n {\n display: 'error',\n value: 'error'\n }\n ]\n }\n },\n {\n type: 'select',\n label: 'referrer-policy',\n name: 'referrerPolicy',\n property: {\n options: [\n {\n display: 'no-referrer-when-downgrade',\n value: 'no-referrer-when-downgrade'\n },\n {\n display: 'no-referrer',\n value: 'no-referrer'\n },\n {\n display: 'origin',\n value: 'origin'\n },\n {\n display: 'origin-when-cross-origin',\n value: 'origin-when-cross-origin'\n },\n {\n display: 'same-origin',\n value: 'same-origin'\n },\n {\n display: 'strict-origin',\n value: 'strict-origin'\n },\n {\n display: 'strict-origin-when-cross-origin',\n value: 'strict-origin-when-cross-origin'\n },\n {\n display: 'unsafe-url',\n value: 'unsafe-url'\n }\n ]\n }\n },\n {\n type: 'key-values',\n label: 'headers',\n name: 'headers'\n },\n {\n type: 'number',\n label: 'period',\n name: 'period',\n placeholder: 'SECONDS'\n },\n {\n type: 'checkbox',\n label: 'fetch-on-load',\n name: 'fetchOnLoad'\n }\n ],\n help: 'scene/component/restful'\n}\n\nconst REST_IMAGE =\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAACWCAMAAABqx6OSAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAB1WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjE8L3RpZmY6Q29tc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v2Eu4o+MldBcc93XBoWk3HD13wQF+2jxrQtL9GoQLXiZxwys5bnixyQWvh7nhJTs3vKrohhc+p+b2Jkm496nUB85/+dgNr3BLS2UTmmyFF6c+LeenE3BDUgY3pLawPkHIgQnJqJyfZsXiZDUmJexzfsofNyROsij91K7JSfqcn8RrygWp0HBFrpm2BhC0JqEc3mvdMGlVxKq0fGSscXpywyk3pIgkNenwRJuyl3R6ulKyXOH0pK9ydOHw1LmycALisaN3yL4ExIqFOzyNc3/N9EMy7IOAs5Jh/5M79D8U6UTFcE/VFgAAAABJRU5ErkJggg=='\n\nconst WARN_NO_URL = 'Valid URL property required'\n\nexport default class Restful extends DataSource(RectPath(Shape)) {\n static _image: HTMLImageElement\n\n static get image() {\n if (!Restful._image) {\n Restful._image = new Image()\n Restful._image.src = REST_IMAGE\n }\n\n return Restful._image\n }\n\n private _repeatTimer!: NodeJS.Timeout\n private _isStarted = false\n\n get url() {\n return this.getState('url')\n }\n\n set url(url) {\n this.setState('url', url)\n this._initRestful()\n }\n\n get period() {\n return Number(this.state.period) * 1000\n }\n\n set period(period) {\n this.setState('period', Number(period))\n this._initRestful()\n }\n\n get value() {\n return this.state.value\n }\n\n set value(value) {\n this.setState('value', value)\n this._initRestful(true)\n }\n\n get withCredentials() {\n return !!this.getState('withCredentials')\n }\n\n set withCredentials(withCredentials) {\n this.setState('withCredentials', withCredentials)\n this._initRestful()\n }\n\n get repeatTimer() {\n return this._repeatTimer\n }\n\n set repeatTimer(repeatTimer) {\n this._stopRepeater()\n this._repeatTimer = repeatTimer\n }\n\n ready() {\n this._initRestful(this.state.fetchOnLoad)\n }\n\n _initRestful(force: boolean = false) {\n if (!this.app.isViewMode) return\n\n if (!this.url) {\n warn(WARN_NO_URL)\n return\n }\n\n this._stopRepeater()\n if (this.period > 0) {\n this._startRepeater()\n } else {\n force && this.fetch()\n }\n }\n\n dispose() {\n super.dispose()\n this._stopRepeater()\n }\n\n _startRepeater() {\n this._isStarted = true\n\n var self = this\n\n function _() {\n if (!self._isStarted) {\n return\n }\n self.fetch()\n\n if (!self.period) {\n self._stopRepeater()\n return\n }\n\n self._repeatTimer = setTimeout(() => {\n requestAnimationFrame(_)\n }, self.period)\n }\n\n requestAnimationFrame(_)\n }\n\n _stopRepeater() {\n this._isStarted = false\n if (this.repeatTimer) {\n clearTimeout(this._repeatTimer)\n }\n }\n\n async fetch() {\n var {\n url,\n method = 'GET',\n mode = 'cors',\n cache = 'default',\n credentials = 'same-origin',\n redirect = 'follow',\n referrerPolicy = 'no-referrer-when-downgrade',\n contentType = 'application/json',\n dataFormat = 'json',\n headers = {},\n value\n } = this.state\n\n if (dataFormat == 'jsonp') {\n if (value && typeof value == 'string') {\n url = value\n }\n\n jsonp(url, {}, (self, data) => {\n if (this._isStarted && data) {\n this.data = data\n }\n })\n\n return\n }\n\n var options: any = {\n method,\n mode,\n cache,\n credentials,\n headers: {\n 'Content-Type': contentType,\n ...headers\n },\n redirect,\n referrerPolicy\n }\n\n if (method != 'GET' && method != 'HEAD') {\n if (contentType == 'application/json') {\n options.body = JSON.stringify(value)\n } else {\n options.body = value\n }\n } else {\n if (value && typeof value == 'string') {\n options.url = value\n }\n }\n\n const response = await fetch(url, options)\n\n if (!this._isStarted) {\n return\n }\n\n if (dataFormat === 'json') {\n this.data = response.json()\n } else if (dataFormat === 'text') {\n this.data = response.text()\n }\n }\n\n _draw(context: CanvasRenderingContext2D) {\n var { left, top, width, height } = this.bounds\n\n context.beginPath()\n this.drawImage(context, Restful.image, left, top, width, height)\n }\n\n ondblclick(e: Event) {\n if (!this.url) {\n warn(WARN_NO_URL)\n return\n }\n\n this.fetch()\n }\n\n get controls() {\n return []\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('restful', Restful)\n"]}
@@ -10,5 +10,5 @@ https://developer.mozilla.org/ko/docs/Web/API/Fetch_API/Using_Fetch
10
10
 
11
11
  ## value property
12
12
 
13
- 이 컴포넌트의 value 속성은 HTTP request 과정에서 body나 URL parameter로 사용된다.
14
- GET 메쏘드에서는 URL parameter로 활용되며, 그 밖의 메쏘드에서는 body에 사용된다.
13
+ 이 컴포넌트의 value 속성은 HTTP request 과정에서 body나 URL로 사용된다.
14
+ GET 메쏘드에서는 URL로 활용되며, 그 밖의 메쏘드에서는 body에 사용된다.
@@ -10,5 +10,5 @@ Exception case) When dataFormat is jsonp (JSON with Padding), Fetch API is not u
10
10
 
11
11
  ## value property
12
12
 
13
- The value property of this component is used as a body or URL parameter in the HTTP request process.
14
- In the GET method, it is used as a URL parameter, and in other methods, it is used as the body.
13
+ The value property of this component is used as the body or URL in the HTTP request process.
14
+ In the GET method, it is used as a URL, and in other methods, it is used as the body.
@@ -10,5 +10,5 @@ https://developer.mozilla.org/zh-CN/docs/Web/API/Fetch_API/Using_Fetch
10
10
 
11
11
  ## value property
12
12
 
13
- 该组件的 value 属性用作 HTTP 请求过程中的正文或 URL 参数。
14
- 在 GET 方法中,它用作 URL 参数,在其他方法中,它用作正文。
13
+ 该组件的 value 属性用作 HTTP 请求过程中的正文或 URL
14
+ 在 GET 方法中,它用作 URL,在其他方法中,它用作正文。
@@ -14,6 +14,21 @@
14
14
  "date": 1673395277552,
15
15
  "name": "logs/application-2023-01-11-09.log",
16
16
  "hash": "5d6f40e1c646df1e5b0c7fcd23e354480f3d085cbab8885c5705262b2fcaf1f8"
17
+ },
18
+ {
19
+ "date": 1673401669078,
20
+ "name": "logs/application-2023-01-11-10.log",
21
+ "hash": "cc716e1d5c5e79d8c25baa01dfc2811672bd48bd2b3e26473718e3aa540a319a"
22
+ },
23
+ {
24
+ "date": 1673412558022,
25
+ "name": "logs/application-2023-01-11-13.log",
26
+ "hash": "1b0062f0eca7f21bfc2014ecbaa557528cc69e824fbe96e30e510976d6b0d927"
27
+ },
28
+ {
29
+ "date": 1673417834835,
30
+ "name": "logs/application-2023-01-11-15.log",
31
+ "hash": "a562259a99ae195cd833d013bc38daef779eb76e98638dc616ed16cf5944fa48"
17
32
  }
18
33
  ],
19
34
  "hashType": "sha256"
@@ -9,6 +9,16 @@
9
9
  "date": 1673384603916,
10
10
  "name": "logs/connections-2023-01-11-06.log",
11
11
  "hash": "e4cd4d89cfbcf7a47f621cc7971532bc8b72e13820c79b04f9f131f20654aab7"
12
+ },
13
+ {
14
+ "date": 1673401670303,
15
+ "name": "logs/connections-2023-01-11-10.log",
16
+ "hash": "d8ddd2dc61ffaade0931e39aad31a38247ae670300778a1eb0437af9affe2d62"
17
+ },
18
+ {
19
+ "date": 1673412559241,
20
+ "name": "logs/connections-2023-01-11-13.log",
21
+ "hash": "a79b76bed85a43bfd0cac994b526463b2ed61304deb2f30d35ea51019ac615e1"
12
22
  }
13
23
  ],
14
24
  "hashType": "sha256"
@@ -0,0 +1,7 @@
1
+ 2023-01-11T10:47:49+09:00 info: File Storage is Ready.
2
+ 2023-01-11T10:47:50+09:00 error: oracledb module loading failed
3
+ 2023-01-11T10:47:51+09:00 info: Default DataSource established
4
+ 2023-01-11T10:47:51+09:00 info: Transaction DataSource established
5
+ 2023-01-11T10:47:52+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
6
+ 2023-01-11T10:47:52+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
7
+ 2023-01-11T10:49:05+09:00 error: Your license due date is 2023.01.18, please renewal your license!
@@ -0,0 +1,7 @@
1
+ 2023-01-11T13:49:18+09:00 info: File Storage is Ready.
2
+ 2023-01-11T13:49:19+09:00 error: oracledb module loading failed
3
+ 2023-01-11T13:49:20+09:00 info: Default DataSource established
4
+ 2023-01-11T13:49:20+09:00 info: Transaction DataSource established
5
+ 2023-01-11T13:49:20+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
6
+ 2023-01-11T13:49:20+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
7
+ 2023-01-11T13:50:00+09:00 error: Your license due date is 2023.01.18, please renewal your license!
@@ -0,0 +1,6 @@
1
+ 2023-01-11T15:17:14+09:00 error: Variable "$filters" of type "[Filter]" used in position expecting type "[Filter!]".
2
+ Variable "$sortings" of type "[Sorting]" used in position expecting type "[Sorting!]".
3
+ 2023-01-11T15:18:49+09:00 error: Variable "$filters" of type "[Filter]" used in position expecting type "[Filter!]".
4
+ Variable "$sortings" of type "[Sorting]" used in position expecting type "[Sorting!]".
5
+ 2023-01-11T15:23:00+09:00 error: Variable "$filters" of type "[Filter]" used in position expecting type "[Filter!]".
6
+ Variable "$sortings" of type "[Sorting]" used in position expecting type "[Sorting!]".
@@ -0,0 +1,35 @@
1
+ 2023-01-11T10:47:52+09:00 info: Initializing ConnectionManager...
2
+ 2023-01-11T10:47:52+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2023-01-11T10:47:52+09:00 info: Connector 'echo-back' started to ready
4
+ 2023-01-11T10:47:52+09:00 info: Connector 'http-connector' started to ready
5
+ 2023-01-11T10:47:52+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2023-01-11T10:47:52+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2023-01-11T10:47:52+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2023-01-11T10:47:52+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2023-01-11T10:47:52+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2023-01-11T10:47:52+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2023-01-11T10:47:52+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2023-01-11T10:47:52+09:00 info: Connector 'socket-server' started to ready
13
+ 2023-01-11T10:47:52+09:00 info: echo-back-servers are ready
14
+ 2023-01-11T10:47:52+09:00 info: echo-back connections are ready
15
+ 2023-01-11T10:47:52+09:00 info: http-connector connections are ready
16
+ 2023-01-11T10:47:52+09:00 info: graphql-connector connections are ready
17
+ 2023-01-11T10:47:52+09:00 info: sqlite-connector connections are ready
18
+ 2023-01-11T10:47:52+09:00 info: postgresql-connector connections are ready
19
+ 2023-01-11T10:47:52+09:00 info: mqtt-connector connections are ready
20
+ 2023-01-11T10:47:52+09:00 info: mssql-connector connections are ready
21
+ 2023-01-11T10:47:52+09:00 info: oracle-connector connections are ready
22
+ 2023-01-11T10:47:52+09:00 info: mysql-connector connections are ready
23
+ 2023-01-11T10:47:52+09:00 info: socket servers are ready
24
+ 2023-01-11T10:47:52+09:00 info: All connector for 'echo-back-server' ready
25
+ 2023-01-11T10:47:52+09:00 info: All connector for 'echo-back' ready
26
+ 2023-01-11T10:47:52+09:00 info: All connector for 'http-connector' ready
27
+ 2023-01-11T10:47:52+09:00 info: All connector for 'graphql-connector' ready
28
+ 2023-01-11T10:47:52+09:00 info: All connector for 'sqlite-connector' ready
29
+ 2023-01-11T10:47:52+09:00 info: All connector for 'postgresql-connector' ready
30
+ 2023-01-11T10:47:52+09:00 info: All connector for 'mqtt-connector' ready
31
+ 2023-01-11T10:47:52+09:00 info: All connector for 'mssql-connector' ready
32
+ 2023-01-11T10:47:52+09:00 info: All connector for 'oracle-connector' ready
33
+ 2023-01-11T10:47:52+09:00 info: All connector for 'mysql-connector' ready
34
+ 2023-01-11T10:47:52+09:00 info: All connector for 'socket-server' ready
35
+ 2023-01-11T10:47:52+09:00 info: ConnectionManager initialization done:
@@ -0,0 +1,35 @@
1
+ 2023-01-11T13:49:21+09:00 info: Initializing ConnectionManager...
2
+ 2023-01-11T13:49:21+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2023-01-11T13:49:21+09:00 info: Connector 'echo-back' started to ready
4
+ 2023-01-11T13:49:21+09:00 info: Connector 'http-connector' started to ready
5
+ 2023-01-11T13:49:21+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2023-01-11T13:49:21+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2023-01-11T13:49:21+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2023-01-11T13:49:21+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2023-01-11T13:49:21+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2023-01-11T13:49:21+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2023-01-11T13:49:21+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2023-01-11T13:49:21+09:00 info: Connector 'socket-server' started to ready
13
+ 2023-01-11T13:49:21+09:00 info: echo-back-servers are ready
14
+ 2023-01-11T13:49:21+09:00 info: echo-back connections are ready
15
+ 2023-01-11T13:49:21+09:00 info: http-connector connections are ready
16
+ 2023-01-11T13:49:21+09:00 info: graphql-connector connections are ready
17
+ 2023-01-11T13:49:21+09:00 info: sqlite-connector connections are ready
18
+ 2023-01-11T13:49:21+09:00 info: postgresql-connector connections are ready
19
+ 2023-01-11T13:49:21+09:00 info: mqtt-connector connections are ready
20
+ 2023-01-11T13:49:21+09:00 info: mssql-connector connections are ready
21
+ 2023-01-11T13:49:21+09:00 info: oracle-connector connections are ready
22
+ 2023-01-11T13:49:21+09:00 info: mysql-connector connections are ready
23
+ 2023-01-11T13:49:21+09:00 info: socket servers are ready
24
+ 2023-01-11T13:49:21+09:00 info: All connector for 'echo-back-server' ready
25
+ 2023-01-11T13:49:21+09:00 info: All connector for 'echo-back' ready
26
+ 2023-01-11T13:49:21+09:00 info: All connector for 'http-connector' ready
27
+ 2023-01-11T13:49:21+09:00 info: All connector for 'graphql-connector' ready
28
+ 2023-01-11T13:49:21+09:00 info: All connector for 'sqlite-connector' ready
29
+ 2023-01-11T13:49:21+09:00 info: All connector for 'postgresql-connector' ready
30
+ 2023-01-11T13:49:21+09:00 info: All connector for 'mqtt-connector' ready
31
+ 2023-01-11T13:49:21+09:00 info: All connector for 'mssql-connector' ready
32
+ 2023-01-11T13:49:21+09:00 info: All connector for 'oracle-connector' ready
33
+ 2023-01-11T13:49:21+09:00 info: All connector for 'mysql-connector' ready
34
+ 2023-01-11T13:49:21+09:00 info: All connector for 'socket-server' ready
35
+ 2023-01-11T13:49:21+09:00 info: ConnectionManager initialization done:
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Restful Client Component for Things Scene",
4
4
  "license": "MIT",
5
5
  "author": "heartyoh",
6
- "version": "1.1.26",
6
+ "version": "1.1.28",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.js",
9
9
  "things-scene": true,
@@ -57,5 +57,5 @@
57
57
  "prettier --write"
58
58
  ]
59
59
  },
60
- "gitHead": "1909e5db81ea2c9d37b99455e2344dda8cd66ad7"
60
+ "gitHead": "1838e283a8f62f6aba06653518e59404fb3ef38f"
61
61
  }
package/src/restful.ts CHANGED
@@ -217,11 +217,21 @@ const NATURE: ComponentNature = {
217
217
  ]
218
218
  }
219
219
  },
220
+ {
221
+ type: 'key-values',
222
+ label: 'headers',
223
+ name: 'headers'
224
+ },
220
225
  {
221
226
  type: 'number',
222
227
  label: 'period',
223
228
  name: 'period',
224
229
  placeholder: 'SECONDS'
230
+ },
231
+ {
232
+ type: 'checkbox',
233
+ label: 'fetch-on-load',
234
+ name: 'fetchOnLoad'
225
235
  }
226
236
  ],
227
237
  help: 'scene/component/restful'
@@ -257,14 +267,23 @@ export default class Restful extends DataSource(RectPath(Shape)) {
257
267
  }
258
268
 
259
269
  get period() {
260
- return this.state.period * 1000
270
+ return Number(this.state.period) * 1000
261
271
  }
262
272
 
263
273
  set period(period) {
264
- this.setState('period', period)
274
+ this.setState('period', Number(period))
265
275
  this._initRestful()
266
276
  }
267
277
 
278
+ get value() {
279
+ return this.state.value
280
+ }
281
+
282
+ set value(value) {
283
+ this.setState('value', value)
284
+ this._initRestful(true)
285
+ }
286
+
268
287
  get withCredentials() {
269
288
  return !!this.getState('withCredentials')
270
289
  }
@@ -284,10 +303,10 @@ export default class Restful extends DataSource(RectPath(Shape)) {
284
303
  }
285
304
 
286
305
  ready() {
287
- this._initRestful()
306
+ this._initRestful(this.state.fetchOnLoad)
288
307
  }
289
308
 
290
- _initRestful() {
309
+ _initRestful(force: boolean = false) {
291
310
  if (!this.app.isViewMode) return
292
311
 
293
312
  if (!this.url) {
@@ -296,7 +315,11 @@ export default class Restful extends DataSource(RectPath(Shape)) {
296
315
  }
297
316
 
298
317
  this._stopRepeater()
299
- this.period > 0 && this._startRepeater()
318
+ if (this.period > 0) {
319
+ this._startRepeater()
320
+ } else {
321
+ force && this.fetch()
322
+ }
300
323
  }
301
324
 
302
325
  dispose() {
@@ -336,7 +359,7 @@ export default class Restful extends DataSource(RectPath(Shape)) {
336
359
  }
337
360
 
338
361
  async fetch() {
339
- const {
362
+ var {
340
363
  url,
341
364
  method = 'GET',
342
365
  mode = 'cors',
@@ -345,10 +368,16 @@ export default class Restful extends DataSource(RectPath(Shape)) {
345
368
  redirect = 'follow',
346
369
  referrerPolicy = 'no-referrer-when-downgrade',
347
370
  contentType = 'application/json',
348
- dataFormat = 'json'
371
+ dataFormat = 'json',
372
+ headers = {},
373
+ value
349
374
  } = this.state
350
375
 
351
376
  if (dataFormat == 'jsonp') {
377
+ if (value && typeof value == 'string') {
378
+ url = value
379
+ }
380
+
352
381
  jsonp(url, {}, (self, data) => {
353
382
  if (this._isStarted && data) {
354
383
  this.data = data
@@ -364,7 +393,8 @@ export default class Restful extends DataSource(RectPath(Shape)) {
364
393
  cache,
365
394
  credentials,
366
395
  headers: {
367
- 'Content-Type': contentType
396
+ 'Content-Type': contentType,
397
+ ...headers
368
398
  },
369
399
  redirect,
370
400
  referrerPolicy
@@ -372,9 +402,13 @@ export default class Restful extends DataSource(RectPath(Shape)) {
372
402
 
373
403
  if (method != 'GET' && method != 'HEAD') {
374
404
  if (contentType == 'application/json') {
375
- options.body = JSON.stringify(this.value)
405
+ options.body = JSON.stringify(value)
376
406
  } else {
377
- options.body = this.value
407
+ options.body = value
408
+ }
409
+ } else {
410
+ if (value && typeof value == 'string') {
411
+ options.url = value
378
412
  }
379
413
  }
380
414
 
@@ -8,5 +8,6 @@
8
8
  "label.credentials": "credentials",
9
9
  "label.cache": "cache",
10
10
  "label.redirect": "redirect",
11
- "label.referrer-policy": "referrer policy"
11
+ "label.referrer-policy": "referrer policy",
12
+ "label.fetch-on-load": "fetch on load"
12
13
  }
@@ -8,5 +8,6 @@
8
8
  "label.credentials": "credentials",
9
9
  "label.cache": "cache",
10
10
  "label.redirect": "redirect",
11
- "label.referrer-policy": "referrer policy"
11
+ "label.referrer-policy": "referrer policy",
12
+ "label.fetch-on-load": "fetch on load"
12
13
  }
@@ -8,5 +8,6 @@
8
8
  "label.credentials": "credentials",
9
9
  "label.cache": "cache",
10
10
  "label.redirect": "redirect",
11
- "label.referrer-policy": "referrer policy"
11
+ "label.referrer-policy": "referrer policy",
12
+ "label.fetch-on-load": "fetch on load"
12
13
  }
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@hatiolab/things-scene/things-scene.d.ts","./src/jsonp.ts","./src/restful.ts","./src/index.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"14a84fbe4ec531dcbaf5d2594fd95df107258e60ae6c6a076404f13c3f66f28e","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","d70c026dd2eeaa974f430ea229230a1897fdb897dc74659deebe2afd4feeb08f","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","98f9d826db9cd99d27a01a59ee5f22863df00ccf1aaf43e1d7db80ebf716f7c3","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","dcd91d3b697cb650b95db5471189b99815af5db2a1cd28760f91e0b12ede8ed5","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3cf0d343c2276842a5b617f22ba82af6322c7cfe8bb52238ffc0c491a3c21019","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9",{"version":"f2eff8704452659641164876c1ef0df4174659ce7311b0665798ea3f556fa9ad","affectsGlobalScope":true},"2a3909e0666211dabce4b944b020cd81cf5da22eb0137b987b232c8060e533d9",{"version":"195eb02de27a3a09f3aade8b7dce973917a15652fc840b6acaba59beedb7e736","signature":"3d6a4f4ed57c588cf519752d79cc6ca2cc41ffc847cc82a739e8db63a8cd9391"},{"version":"5c235609df03bc25db8a032f300dbf498970d36db4cd6a426b8ee95b66385f81","signature":"7d9e0b091dcd6b2329389d1153568308ba24c87145a408f19bd261f59d7de880"},{"version":"2b3a3527a046942eff5d94fd51faa2fd386681d726148a602bd3cc9d9bc1a572","signature":"54ca01afdac7a1c6a39714582e7a71dbbe971b576dad2535d5a8f6612bc940ca"},"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"bb65c6267c5d6676be61acbf6604cf0a4555ac4b505df58ac15c831fcbff4e3e","affectsGlobalScope":true},"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","dab86d9604fe40854ef3c0a6f9e8948873dc3509213418e5e457f410fd11200f","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"d076fede3cb042e7b13fc29442aaa03a57806bc51e2b26a67a01fbc66a7c0c12","7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","223c37f62ce09a3d99e77498acdee7b2705a4ae14552fbdb4093600cd9164f3f",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","4c8525f256873c7ba3135338c647eaf0ca7115a1a2805ae2d0056629461186ce","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true},{"version":"4c50342e1b65d3bee2ed4ab18f84842d5724ad11083bd666d8705dc7a6079d80","affectsGlobalScope":true},"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"8dbe725f8d237e70310977afcfa011629804d101ebaa0266cafda6b61ad72236"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./dist","rootDir":"./src","sourceMap":true,"strict":true,"target":5},"fileIdsList":[[56,107],[44,46,47,48,49,50,51,52,53,54,55,56,107],[44,45,47,48,49,50,51,52,53,54,55,56,107],[45,46,47,48,49,50,51,52,53,54,55,56,107],[44,45,46,48,49,50,51,52,53,54,55,56,107],[44,45,46,47,49,50,51,52,53,54,55,56,107],[44,45,46,47,48,50,51,52,53,54,55,56,107],[44,45,46,47,48,49,51,52,53,54,55,56,107],[44,45,46,47,48,49,50,52,53,54,55,56,107],[44,45,46,47,48,49,50,51,53,54,55,56,107],[44,45,46,47,48,49,50,51,52,54,55,56,107],[44,45,46,47,48,49,50,51,52,53,55,56,107],[44,45,46,47,48,49,50,51,52,53,54,56,107],[44,45,46,47,48,49,50,51,52,53,54,55,107],[61,107],[64,107],[65,70,98,107],[66,77,78,85,95,106,107],[66,67,77,85,107],[68,107],[69,70,78,86,107],[70,95,103,107],[71,73,77,85,107],[72,107],[73,74,107],[77,107],[75,77,107],[77,78,79,95,106,107],[77,78,79,92,95,98,107],[107,111],[107],[73,80,85,95,106,107],[77,78,80,81,85,95,103,106,107],[80,82,95,103,106,107],[61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],[77,83,107],[84,106,107],[73,77,85,95,107],[86,107],[87,107],[64,88,107],[89,105,107,111],[90,107],[91,107],[77,92,93,107],[92,94,107,109],[65,77,95,96,97,98,107],[65,95,97,107],[95,96,107],[98,107],[99,107],[77,101,102,107],[101,102,107],[70,85,95,103,107],[104,107],[85,105,107],[65,80,91,106,107],[70,107],[95,107,108],[107,109],[107,110],[65,70,77,79,88,95,106,107,109,111],[95,107,112],[43,59,107],[43,57,107],[43,57,58,107],[59],[57]],"referencedMap":[[57,1],[45,2],[46,3],[44,4],[47,5],[48,6],[49,7],[50,8],[51,9],[52,10],[53,11],[54,12],[55,13],[56,14],[61,15],[62,15],[64,16],[65,17],[66,18],[67,19],[68,20],[69,21],[70,22],[71,23],[72,24],[73,25],[74,25],[76,26],[75,27],[77,26],[78,28],[79,29],[63,30],[113,31],[80,32],[81,33],[82,34],[114,35],[83,36],[84,37],[85,38],[86,39],[87,40],[88,41],[89,42],[90,43],[91,44],[92,45],[93,45],[94,46],[95,47],[97,48],[96,49],[98,50],[99,51],[100,31],[101,52],[102,53],[103,54],[104,55],[105,56],[106,57],[107,58],[108,59],[109,60],[110,61],[111,62],[112,63],[43,31],[8,31],[10,31],[9,31],[2,31],[11,31],[12,31],[13,31],[14,31],[15,31],[16,31],[17,31],[18,31],[3,31],[4,31],[22,31],[19,31],[20,31],[21,31],[23,31],[24,31],[25,31],[5,31],[26,31],[27,31],[28,31],[29,31],[6,31],[33,31],[30,31],[31,31],[32,31],[34,31],[7,31],[35,31],[40,31],[41,31],[36,31],[37,31],[38,31],[39,31],[1,31],[42,31],[60,64],[58,65],[59,66]],"exportedModulesMap":[[57,1],[45,2],[46,3],[44,4],[47,5],[48,6],[49,7],[50,8],[51,9],[52,10],[53,11],[54,12],[55,13],[56,14],[61,15],[62,15],[64,16],[65,17],[66,18],[67,19],[68,20],[69,21],[70,22],[71,23],[72,24],[73,25],[74,25],[76,26],[75,27],[77,26],[78,28],[79,29],[63,30],[113,31],[80,32],[81,33],[82,34],[114,35],[83,36],[84,37],[85,38],[86,39],[87,40],[88,41],[89,42],[90,43],[91,44],[92,45],[93,45],[94,46],[95,47],[97,48],[96,49],[98,50],[99,51],[100,31],[101,52],[102,53],[103,54],[104,55],[105,56],[106,57],[107,58],[108,59],[109,60],[110,61],[111,62],[112,63],[43,31],[8,31],[10,31],[9,31],[2,31],[11,31],[12,31],[13,31],[14,31],[15,31],[16,31],[17,31],[18,31],[3,31],[4,31],[22,31],[19,31],[20,31],[21,31],[23,31],[24,31],[25,31],[5,31],[26,31],[27,31],[28,31],[29,31],[6,31],[33,31],[30,31],[31,31],[32,31],[34,31],[7,31],[35,31],[40,31],[41,31],[36,31],[37,31],[38,31],[39,31],[1,31],[42,31],[60,67],[59,68]],"semanticDiagnosticsPerFile":[57,45,46,44,47,48,49,50,51,52,53,54,55,56,61,62,64,65,66,67,68,69,70,71,72,73,74,76,75,77,78,79,63,113,80,81,82,114,83,84,85,86,87,88,89,90,91,92,93,94,95,97,96,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,43,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,60,58,59]},"version":"4.9.4"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@hatiolab/things-scene/things-scene.d.ts","./src/jsonp.ts","./src/restful.ts","./src/index.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"14a84fbe4ec531dcbaf5d2594fd95df107258e60ae6c6a076404f13c3f66f28e","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","d70c026dd2eeaa974f430ea229230a1897fdb897dc74659deebe2afd4feeb08f","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","98f9d826db9cd99d27a01a59ee5f22863df00ccf1aaf43e1d7db80ebf716f7c3","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","dcd91d3b697cb650b95db5471189b99815af5db2a1cd28760f91e0b12ede8ed5","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3cf0d343c2276842a5b617f22ba82af6322c7cfe8bb52238ffc0c491a3c21019","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9",{"version":"f2eff8704452659641164876c1ef0df4174659ce7311b0665798ea3f556fa9ad","affectsGlobalScope":true},"2a3909e0666211dabce4b944b020cd81cf5da22eb0137b987b232c8060e533d9",{"version":"195eb02de27a3a09f3aade8b7dce973917a15652fc840b6acaba59beedb7e736","signature":"3d6a4f4ed57c588cf519752d79cc6ca2cc41ffc847cc82a739e8db63a8cd9391"},{"version":"83e769ffde568e3d82e8d398de184b9336cb33bc64c4ca484e8edb669409c214","signature":"d09f477bca897f8c18040ddc59af866dc68ce2bf31ef1d890d49de84c74ab1f2"},{"version":"2b3a3527a046942eff5d94fd51faa2fd386681d726148a602bd3cc9d9bc1a572","signature":"54ca01afdac7a1c6a39714582e7a71dbbe971b576dad2535d5a8f6612bc940ca"},"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"bb65c6267c5d6676be61acbf6604cf0a4555ac4b505df58ac15c831fcbff4e3e","affectsGlobalScope":true},"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","dab86d9604fe40854ef3c0a6f9e8948873dc3509213418e5e457f410fd11200f","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"d076fede3cb042e7b13fc29442aaa03a57806bc51e2b26a67a01fbc66a7c0c12","7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","223c37f62ce09a3d99e77498acdee7b2705a4ae14552fbdb4093600cd9164f3f",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","4c8525f256873c7ba3135338c647eaf0ca7115a1a2805ae2d0056629461186ce","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true},{"version":"4c50342e1b65d3bee2ed4ab18f84842d5724ad11083bd666d8705dc7a6079d80","affectsGlobalScope":true},"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"8dbe725f8d237e70310977afcfa011629804d101ebaa0266cafda6b61ad72236"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./dist","rootDir":"./src","sourceMap":true,"strict":true,"target":5},"fileIdsList":[[56,107],[44,46,47,48,49,50,51,52,53,54,55,56,107],[44,45,47,48,49,50,51,52,53,54,55,56,107],[45,46,47,48,49,50,51,52,53,54,55,56,107],[44,45,46,48,49,50,51,52,53,54,55,56,107],[44,45,46,47,49,50,51,52,53,54,55,56,107],[44,45,46,47,48,50,51,52,53,54,55,56,107],[44,45,46,47,48,49,51,52,53,54,55,56,107],[44,45,46,47,48,49,50,52,53,54,55,56,107],[44,45,46,47,48,49,50,51,53,54,55,56,107],[44,45,46,47,48,49,50,51,52,54,55,56,107],[44,45,46,47,48,49,50,51,52,53,55,56,107],[44,45,46,47,48,49,50,51,52,53,54,56,107],[44,45,46,47,48,49,50,51,52,53,54,55,107],[61,107],[64,107],[65,70,98,107],[66,77,78,85,95,106,107],[66,67,77,85,107],[68,107],[69,70,78,86,107],[70,95,103,107],[71,73,77,85,107],[72,107],[73,74,107],[77,107],[75,77,107],[77,78,79,95,106,107],[77,78,79,92,95,98,107],[107,111],[107],[73,80,85,95,106,107],[77,78,80,81,85,95,103,106,107],[80,82,95,103,106,107],[61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],[77,83,107],[84,106,107],[73,77,85,95,107],[86,107],[87,107],[64,88,107],[89,105,107,111],[90,107],[91,107],[77,92,93,107],[92,94,107,109],[65,77,95,96,97,98,107],[65,95,97,107],[95,96,107],[98,107],[99,107],[77,101,102,107],[101,102,107],[70,85,95,103,107],[104,107],[85,105,107],[65,80,91,106,107],[70,107],[95,107,108],[107,109],[107,110],[65,70,77,79,88,95,106,107,109,111],[95,107,112],[43,59,107],[43,57,107],[43,57,58,107],[59],[57]],"referencedMap":[[57,1],[45,2],[46,3],[44,4],[47,5],[48,6],[49,7],[50,8],[51,9],[52,10],[53,11],[54,12],[55,13],[56,14],[61,15],[62,15],[64,16],[65,17],[66,18],[67,19],[68,20],[69,21],[70,22],[71,23],[72,24],[73,25],[74,25],[76,26],[75,27],[77,26],[78,28],[79,29],[63,30],[113,31],[80,32],[81,33],[82,34],[114,35],[83,36],[84,37],[85,38],[86,39],[87,40],[88,41],[89,42],[90,43],[91,44],[92,45],[93,45],[94,46],[95,47],[97,48],[96,49],[98,50],[99,51],[100,31],[101,52],[102,53],[103,54],[104,55],[105,56],[106,57],[107,58],[108,59],[109,60],[110,61],[111,62],[112,63],[43,31],[8,31],[10,31],[9,31],[2,31],[11,31],[12,31],[13,31],[14,31],[15,31],[16,31],[17,31],[18,31],[3,31],[4,31],[22,31],[19,31],[20,31],[21,31],[23,31],[24,31],[25,31],[5,31],[26,31],[27,31],[28,31],[29,31],[6,31],[33,31],[30,31],[31,31],[32,31],[34,31],[7,31],[35,31],[40,31],[41,31],[36,31],[37,31],[38,31],[39,31],[1,31],[42,31],[60,64],[58,65],[59,66]],"exportedModulesMap":[[57,1],[45,2],[46,3],[44,4],[47,5],[48,6],[49,7],[50,8],[51,9],[52,10],[53,11],[54,12],[55,13],[56,14],[61,15],[62,15],[64,16],[65,17],[66,18],[67,19],[68,20],[69,21],[70,22],[71,23],[72,24],[73,25],[74,25],[76,26],[75,27],[77,26],[78,28],[79,29],[63,30],[113,31],[80,32],[81,33],[82,34],[114,35],[83,36],[84,37],[85,38],[86,39],[87,40],[88,41],[89,42],[90,43],[91,44],[92,45],[93,45],[94,46],[95,47],[97,48],[96,49],[98,50],[99,51],[100,31],[101,52],[102,53],[103,54],[104,55],[105,56],[106,57],[107,58],[108,59],[109,60],[110,61],[111,62],[112,63],[43,31],[8,31],[10,31],[9,31],[2,31],[11,31],[12,31],[13,31],[14,31],[15,31],[16,31],[17,31],[18,31],[3,31],[4,31],[22,31],[19,31],[20,31],[21,31],[23,31],[24,31],[25,31],[5,31],[26,31],[27,31],[28,31],[29,31],[6,31],[33,31],[30,31],[31,31],[32,31],[34,31],[7,31],[35,31],[40,31],[41,31],[36,31],[37,31],[38,31],[39,31],[1,31],[42,31],[60,67],[59,68]],"semanticDiagnosticsPerFile":[57,45,46,44,47,48,49,50,51,52,53,54,55,56,61,62,64,65,66,67,68,69,70,71,72,73,74,76,75,77,78,79,63,113,80,81,82,114,83,84,85,86,87,88,89,90,91,92,93,94,95,97,96,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,43,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,60,58,59]},"version":"4.9.4"}