adofai 2.11.1 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { AdofaiEvent, LevelOptions, Tile, ParseProvider } from './interfaces';
1
+ import { AdofaiEvent, LevelOptions, Tile, ParseProvider, ParseProgressEvent, PrecomputedProgressEvents } from './interfaces';
2
2
  import { EffectCleanerType } from '../filter/effectProcessor';
3
3
  export declare class Level {
4
4
  private _events;
@@ -12,12 +12,44 @@ export declare class Level {
12
12
  tiles: Tile[];
13
13
  private _angleDir;
14
14
  private _twirlCount;
15
+ /** 预计算的事件缓存 */
16
+ private _precomputedEvents;
17
+ /** 是否启用预计算模式 */
18
+ private _precomputeMode;
15
19
  constructor(opt: string | LevelOptions, provider?: ParseProvider);
16
20
  generateGUID(): string;
17
21
  /**
18
22
  * 触发进度事件
19
23
  */
20
24
  private _emitProgress;
25
+ /**
26
+ * 启用预计算模式 - 在 load() 和 calculateTilePosition() 过程中不触发事件,
27
+ * 而是将所有事件缓存起来,之后可以通过 getPrecomputedEvents() 获取
28
+ */
29
+ enablePrecomputeMode(): void;
30
+ /**
31
+ * 禁用预计算模式
32
+ */
33
+ disablePrecomputeMode(): void;
34
+ /**
35
+ * 获取预计算的事件缓存
36
+ * 返回所有缓存的进度事件,可以用于渲染器按帧播放
37
+ */
38
+ getPrecomputedEvents(): PrecomputedProgressEvents | null;
39
+ /**
40
+ * 清除预计算的事件缓存
41
+ */
42
+ clearPrecomputedEvents(): void;
43
+ /**
44
+ * 按进度百分比获取事件(用于渲染器按帧渲染)
45
+ * @param percent 0-100 的百分比
46
+ * @param stage 可选,指定阶段
47
+ */
48
+ getEventsAtPercent(percent: number, stage?: ParseProgressEvent['stage']): ParseProgressEvent[];
49
+ /**
50
+ * 获取指定阶段的总事件数
51
+ */
52
+ getPrecomputedEventCount(stage?: ParseProgressEvent['stage']): number;
21
53
  load(): Promise<boolean>;
22
54
  on(eventName: string, callback: Function): string;
23
55
  trigger(eventName: string, data: any): void;
@@ -27,6 +27,10 @@ import { v4 as uuid } from 'uuid';
27
27
  import * as presets from '../filter/presets';
28
28
  export class Level {
29
29
  constructor(opt, provider) {
30
+ /** 预计算的事件缓存 */
31
+ this._precomputedEvents = null;
32
+ /** 是否启用预计算模式 */
33
+ this._precomputeMode = false;
30
34
  this._events = new Map();
31
35
  this.guidCallbacks = new Map();
32
36
  this._options = opt;
@@ -46,8 +50,86 @@ export class Level {
46
50
  percent: total > 0 ? Math.round((current / total) * 100) : 0,
47
51
  data
48
52
  };
49
- this.trigger('parse:progress', progressEvent);
50
- this.trigger(`parse:${stage}`, progressEvent);
53
+ // 如果是预计算模式,存储事件而不是触发
54
+ if (this._precomputeMode && this._precomputedEvents) {
55
+ this._precomputedEvents[stage].push(progressEvent);
56
+ }
57
+ else {
58
+ this.trigger('parse:progress', progressEvent);
59
+ this.trigger(`parse:${stage}`, progressEvent);
60
+ }
61
+ }
62
+ /**
63
+ * 启用预计算模式 - 在 load() 和 calculateTilePosition() 过程中不触发事件,
64
+ * 而是将所有事件缓存起来,之后可以通过 getPrecomputedEvents() 获取
65
+ */
66
+ enablePrecomputeMode() {
67
+ this._precomputeMode = true;
68
+ this._precomputedEvents = {
69
+ start: [],
70
+ pathData: [],
71
+ angleData: [],
72
+ relativeAngle: [],
73
+ tilePosition: [],
74
+ complete: []
75
+ };
76
+ }
77
+ /**
78
+ * 禁用预计算模式
79
+ */
80
+ disablePrecomputeMode() {
81
+ this._precomputeMode = false;
82
+ }
83
+ /**
84
+ * 获取预计算的事件缓存
85
+ * 返回所有缓存的进度事件,可以用于渲染器按帧播放
86
+ */
87
+ getPrecomputedEvents() {
88
+ return this._precomputedEvents;
89
+ }
90
+ /**
91
+ * 清除预计算的事件缓存
92
+ */
93
+ clearPrecomputedEvents() {
94
+ this._precomputedEvents = null;
95
+ }
96
+ /**
97
+ * 按进度百分比获取事件(用于渲染器按帧渲染)
98
+ * @param percent 0-100 的百分比
99
+ * @param stage 可选,指定阶段
100
+ */
101
+ getEventsAtPercent(percent, stage) {
102
+ if (!this._precomputedEvents)
103
+ return [];
104
+ const result = [];
105
+ const stages = stage ? [stage] : ['start', 'pathData', 'angleData', 'relativeAngle', 'tilePosition', 'complete'];
106
+ for (const s of stages) {
107
+ const events = this._precomputedEvents[s];
108
+ for (const event of events) {
109
+ if (event.percent <= percent) {
110
+ // 获取不超过目标百分比的最后一个事件
111
+ if (result.length === 0 || result[result.length - 1].percent <= event.percent) {
112
+ // 避免重复添加相同百分比的事件
113
+ const lastEvent = result[result.length - 1];
114
+ if (!lastEvent || lastEvent.stage !== event.stage || lastEvent.current !== event.current) {
115
+ result.push(event);
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
121
+ return result;
122
+ }
123
+ /**
124
+ * 获取指定阶段的总事件数
125
+ */
126
+ getPrecomputedEventCount(stage) {
127
+ if (!this._precomputedEvents)
128
+ return 0;
129
+ if (stage) {
130
+ return this._precomputedEvents[stage].length;
131
+ }
132
+ return Object.values(this._precomputedEvents).reduce((sum, arr) => sum + arr.length, 0);
51
133
  }
52
134
  load() {
53
135
  return new Promise((resolve, reject) => {
@@ -54,3 +54,11 @@ export interface ParseProgressEvent {
54
54
  position?: number[];
55
55
  };
56
56
  }
57
+ export interface PrecomputedProgressEvents {
58
+ start: ParseProgressEvent[];
59
+ pathData: ParseProgressEvent[];
60
+ angleData: ParseProgressEvent[];
61
+ relativeAngle: ParseProgressEvent[];
62
+ tilePosition: ParseProgressEvent[];
63
+ complete: ParseProgressEvent[];
64
+ }
package/dist/umd/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ADOFAI=e():t.ADOFAI=e()}(globalThis,()=>(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Level:()=>wt,Parsers:()=>r,Presets:()=>n,Structure:()=>o,pathData:()=>a});var r={};t.r(r),t.d(r,{ArrayBufferParser:()=>Y,BufferParser:()=>K,StringParser:()=>T,default:()=>q});var n={};t.r(n),t.d(n,{preset_inner_no_deco:()=>at,preset_noeffect:()=>rt,preset_noeffect_completely:()=>it,preset_noholds:()=>nt,preset_nomovecamera:()=>ot});var o={};t.r(o),t.d(o,{default:()=>wt});var i={R:0,p:15,J:30,E:45,T:60,o:75,U:90,q:105,G:120,Q:135,H:150,W:165,L:180,x:195,N:210,Z:225,F:240,V:255,D:270,Y:285,B:300,C:315,M:330,A:345,5:555,6:666,7:777,8:888,"!":999};const a={pathDataTable:i,parseToangleData:function(t){return Array.from(t).map(function(t){return i[t]})}};function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function c(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}const l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return e=t,r=[{key:"parseError",value:function(t){return t}},{key:"parseAsObject",value:function(e,r){return(r||JSON).parse(t.parseAsText(e))}},{key:"parseAsText",value:function(t){return this.parseError(t)}}],null&&u(e.prototype,null),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r}();function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function y(t,e,r){return e&&p(t.prototype,e),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t){var e=function(t){if("object"!=f(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==f(e)?e:e+""}const v=y(function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)});function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,S(n.key),n)}}function O(t,e,r){return e&&m(t.prototype,e),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function S(t){var e=function(t){if("object"!=d(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==d(e)?e:e+""}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(k=function(){return!!t})()}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}var j=function(t){function e(){return g(this,e),t=this,n=arguments,r=w(r=e),function(t,e){if(e&&("object"==d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,k()?Reflect.construct(r,n||[],w(t).constructor):r.apply(t,n));var t,r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(e,t),O(e,[{key:"parse",value:function(t,r){if(null==t)return null;var n=new A(t).parseValue();return"function"==typeof r?e._applyReviver("",n,r):n}},{key:"stringify",value:function(t,e,r){return new E(e,r).serialize(t)}}],[{key:"_applyReviver",value:function(t,r,n){if(r&&"object"===d(r))if(Array.isArray(r))for(var o=0;o<r.length;o++)r[o]=e._applyReviver(o.toString(),r[o],n);else for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(r[i]=e._applyReviver(i,r[i],n));return n(t,r)}}])}(v),A=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;g(this,t),this.json=e,this.position=0,this.endSection=r,65279===this.peek()&&this.read()}return O(t,[{key:"parseValue",value:function(){return this.parseByToken(this.nextToken)}},{key:"parseObject",value:function(){var e={};for(this.read();;){var r=void 0;do{if((r=this.nextToken)===t.TOKEN.NONE)return null;if(r===t.TOKEN.CURLY_CLOSE)return e}while(r===t.TOKEN.COMMA);var n=this.parseString();if(null===n)return null;if(this.nextToken!==t.TOKEN.COLON)return null;if(null!=this.endSection&&n===this.endSection)return e;this.read(),e[n]=this.parseValue()}}},{key:"parseArray",value:function(){var e=[];this.read();for(var r=!0;r;){var n=this.nextToken;switch(n){case t.TOKEN.NONE:return null;case t.TOKEN.SQUARED_CLOSE:r=!1;break;case t.TOKEN.COMMA:break;default:var o=this.parseByToken(n);e.push(o)}}return e}},{key:"parseByToken",value:function(e){switch(e){case t.TOKEN.CURLY_OPEN:return this.parseObject();case t.TOKEN.SQUARED_OPEN:return this.parseArray();case t.TOKEN.STRING:return this.parseString();case t.TOKEN.NUMBER:return this.parseNumber();case t.TOKEN.TRUE:return!0;case t.TOKEN.FALSE:return!1;case t.TOKEN.NULL:default:return null}}},{key:"parseString",value:function(){var t="";this.read();for(var e=!0;e&&-1!==this.peek();){var r=this.nextChar;switch(r){case'"':e=!1;break;case"\\":if(-1===this.peek()){e=!1;break}var n=this.nextChar;switch(n){case'"':case"/":case"\\":t+=n;break;case"b":t+="\b";break;case"f":t+="\f";break;case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"u":for(var o="",i=0;i<4;i++)o+=this.nextChar;t+=String.fromCharCode(Number.parseInt(o,16))}break;default:t+=r}}return t}},{key:"parseNumber",value:function(){var t=this.nextWord;return-1===t.indexOf(".")?Number.parseInt(t,10)||0:Number.parseFloat(t)||0}},{key:"eatWhitespace",value:function(){for(;-1!==t.WHITE_SPACE.indexOf(this.peekChar)&&(this.read(),-1!==this.peek()););}},{key:"peek",value:function(){return this.position>=this.json.length?-1:this.json.charCodeAt(this.position)}},{key:"read",value:function(){return this.position>=this.json.length?-1:this.json.charCodeAt(this.position++)}},{key:"peekChar",get:function(){var t=this.peek();return-1===t?"\0":String.fromCharCode(t)}},{key:"nextChar",get:function(){var t=this.read();return-1===t?"\0":String.fromCharCode(t)}},{key:"nextWord",get:function(){for(var e="";-1===t.WORD_BREAK.indexOf(this.peekChar)&&(e+=this.nextChar,-1!==this.peek()););return e}},{key:"nextToken",get:function(){if(this.eatWhitespace(),-1===this.peek())return t.TOKEN.NONE;switch(this.peekChar){case'"':return t.TOKEN.STRING;case",":return this.read(),t.TOKEN.COMMA;case"-":case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return t.TOKEN.NUMBER;case":":return t.TOKEN.COLON;case"[":return t.TOKEN.SQUARED_OPEN;case"]":return this.read(),t.TOKEN.SQUARED_CLOSE;case"{":return t.TOKEN.CURLY_OPEN;case"}":return this.read(),t.TOKEN.CURLY_CLOSE;default:switch(this.nextWord){case"false":return t.TOKEN.FALSE;case"true":return t.TOKEN.TRUE;case"null":return t.TOKEN.NULL;default:return t.TOKEN.NONE}}}}])}();A.WHITE_SPACE=" \t\n\r\ufeff",A.WORD_BREAK=' \t\n\r{}[],:"',A.TOKEN={NONE:0,CURLY_OPEN:1,CURLY_CLOSE:2,SQUARED_OPEN:3,SQUARED_CLOSE:4,COLON:5,COMMA:6,STRING:7,NUMBER:8,TRUE:9,FALSE:10,NULL:11};var E=function(){return O(function t(e,r){g(this,t),this.result="",this.indent=0,this.indentStr="",this.replacer=e||null,this.space=r||null,"number"==typeof r?this.indentStr=" ".repeat(Math.min(10,Math.max(0,r))):"string"==typeof r&&(this.indentStr=r.slice(0,10))},[{key:"serialize",value:function(t){return this.result="",this.serializeValue(t,""),this.result}},{key:"serializeValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";"function"==typeof this.replacer&&(t=this.replacer(e,t)),null==t?this.result+="null":"string"==typeof t?this.serializeString(t):"boolean"==typeof t?this.result+=t.toString():Array.isArray(t)?this.serializeArray(t):"object"===d(t)?this.serializeObject(t):this.serializeOther(t)}},{key:"serializeObject",value:function(t){var e=!0;for(var r in this.result+="{",this.indentStr&&(this.result+="\n",this.indent++),t)if(Object.prototype.hasOwnProperty.call(t,r)){if(Array.isArray(this.replacer)&&!this.replacer.includes(r))continue;e||(this.result+=",",this.indentStr&&(this.result+="\n")),this.indentStr&&(this.result+=this.indentStr.repeat(this.indent)),this.serializeString(r.toString()),this.result+=":",this.indentStr&&(this.result+=" "),this.serializeValue(t[r],r),e=!1}this.indentStr&&(this.result+="\n",this.indent--,this.result+=this.indentStr.repeat(this.indent)),this.result+="}"}},{key:"serializeArray",value:function(t){this.result+="[",this.indentStr&&t.length>0&&(this.result+="\n",this.indent++);for(var e=!0,r=0;r<t.length;r++)e||(this.result+=",",this.indentStr&&(this.result+="\n")),this.indentStr&&(this.result+=this.indentStr.repeat(this.indent)),this.serializeValue(t[r],r.toString()),e=!1;this.indentStr&&t.length>0&&(this.result+="\n",this.indent--,this.result+=this.indentStr.repeat(this.indent)),this.result+="]"}},{key:"serializeString",value:function(t){this.result+='"';var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return b(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(t);try{for(r.s();!(e=r.n()).done;){var n=e.value;switch(n){case"\b":this.result+="\\b";break;case"\t":this.result+="\\t";break;case"\n":this.result+="\\n";break;case"\f":this.result+="\\f";break;case"\r":this.result+="\\r";break;case'"':this.result+='\\"';break;case"\\":this.result+="\\\\";break;default:var o=n.charCodeAt(0);this.result+=o>=32&&o<=126?n:"\\u"+o.toString(16).padStart(4,"0")}}}catch(t){r.e(t)}finally{r.f()}this.result+='"'}},{key:"serializeOther",value:function(t){"number"==typeof t?isFinite(t)?this.result+=t.toString():this.result+="null":this.serializeString(t.toString())}}])}();const T=j;function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function D(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,N(n.key),n)}}function N(t){var e=function(t){if("object"!=P(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==P(e)?e:e+""}function C(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(C=function(){return!!t})()}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}function R(t,e){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},R(t,e)}var U,M;try{U=Buffer.of(239,187,191),M=Buffer.from(",")}catch(t){console.warn("Buffer is not available in current environment, try to use ArrayBufferParser"),U={equals:function(){return!1},subarray:function(){return null}},M={equals:function(){return!1},subarray:function(){return null}}}function B(t){return t.length>=3&&U.equals(t.subarray(0,3))?t.subarray(3):t}function I(t){return B(t).toString("utf-8")}const K=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=x(e),function(t,e){if(e&&("object"==P(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,C()?Reflect.construct(e,r||[],x(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&R(t,e)}(e,t),r=e,(n=[{key:"parse",value:function(t){if("string"==typeof t)return T.prototype.parse.call(T.prototype,t);var e=B(t),r=new Uint8Array(e);if(function(t){for(var e="other",r=0;r<t.length;r++){var n=t[r];if("escape"!==e)switch(n){case 34:e="string"===e?"other":"string";break;case 92:"string"===e&&(e="escape");break;case 44:"other"===e&&(e="comma");break;case 93:case 125:default:"comma"===e&&(e="other");break;case 9:case 10:case 11:case 12:case 13:case 32:if((10===n||13===n)&&"string"===e)return!0}else e="string"}return!1}(r))return T.prototype.parse.call(T.prototype,I(e));try{var n=function(t){for(var e=[],r="other",n=0,o=0;o<t.length;o++){var i=t[o];if("escape"!==r)switch(i){case 34:switch(r){case"string":r="other";break;case"comma":e.push(M||new Uint8Array([44]));default:r="string"}break;case 92:"string"===r&&(r="escape");break;case 44:e.push(t.subarray(n,o)),n=o+1,"other"===r&&(r="comma");break;case 93:case 125:"comma"===r&&(r="other");break;case 9:case 10:case 11:case 12:case 13:case 32:break;default:"comma"===r&&(e.push(M||new Uint8Array([44])),r="other")}else r="string"}e.push(t.subarray(n));for(var a=0,s=0,u=e;s<u.length;s++)a+=u[s].length;for(var c=new Uint8Array(a),l=0,f=0,p=e;f<p.length;f++){var y=p[f];c.set(y,l),l+=y.length}return c}(r),o=I(Buffer.from(n));return JSON.parse(o)}catch(t){return T.prototype.parse.call(T.prototype,I(e))}}},{key:"stringify",value:function(t){return JSON.stringify(t)}}])&&D(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(v);function F(t){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F(t)}function L(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,z(n.key),n)}}function z(t){var e=function(t){if("object"!=F(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=F(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==F(e)?e:e+""}function W(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(W=function(){return!!t})()}function G(t){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},G(t)}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}var H=new Uint8Array([239,187,191]),J=new Uint8Array([44]);function Q(t){var e=new Uint8Array(t);return e.length>=3&&e[0]===H[0]&&e[1]===H[1]&&e[2]===H[2]?t.slice(3):t}const Y=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=G(e),function(t,e){if(e&&("object"==F(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,W()?Reflect.construct(e,r||[],G(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V(t,e)}(e,t),r=e,(n=[{key:"parse",value:function(t){return"string"==typeof t?T.prototype.parse.call(T.prototype,t):T.prototype.parse.call(T.prototype,(e=function(t){for(var e=new Uint8Array(t),r=[],n="other",o=0,i=0;i<e.length;i++){var a=e[i];if("escape"==n)n="string";else switch(a){case 34:switch(n){case"string":n="other";break;case"comma":r.push(J);default:n="string"}break;case 92:"string"===n&&(n="escape");break;case 44:r.push(e.subarray(o,i)),o=i+1,"other"===n&&(n="comma");break;case 93:case 125:"comma"===n&&(n="other");break;case 9:case 10:case 11:case 12:case 13:case 32:break;default:"comma"===n&&(r.push(J),n="other")}}r.push(e.subarray(o));for(var s=0,u=0,c=r;u<c.length;u++)s+=c[u].length;for(var l=new Uint8Array(s),f=0,p=0,y=r;p<y.length;p++){var h=y[p];l.set(h,f),f+=h.length}return l.buffer}(Q(t)),r=Q(e),new TextDecoder("utf-8").decode(r)));var e,r}},{key:"stringify",value:function(t){return JSON.stringify(t)}}])&&L(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(v),q=l;function $(t){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$(t)}function Z(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"\t",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;if("object"!==$(t)||null===t)return JSON.stringify(t);if(Array.isArray(t)){if(t.every(function(t){return"object"!==$(t)||null===t}))return"["+t.map(function(t){return Z(t,0,!1,n,o)}).join(",")+"]";var i=n.repeat(e),a=n.repeat(e+o);return"[\n"+t.map(function(t){return a+X(t,n)}).join(",\n")+"\n"+i+"]"}var s=n.repeat(e),u=Object.keys(t);if(r){var c=n.repeat(o);return"{\n"+u.map(function(e){return c+JSON.stringify(e)+": "+Z(t[e],o,!1,n,o)}).join(",\n")+"\n}"}return"{\n"+u.map(function(r){return s+n.repeat(o)+JSON.stringify(r)+": "+Z(t[r],e+o,!1,n,o)}).join(",\n")+"\n"+s+"}"}function X(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\t";return"object"!==$(t)||null===t?Z(t,0,!1,e):Array.isArray(t)?"["+t.map(function(t){return X(t,e)}).join(",")+"]":"{"+Object.keys(t).map(function(r){return JSON.stringify(r)+": "+X(t[r],e)}).join(", ")+"}"}const tt=Z;var et,rt={type:"exclude",events:["Flash","SetFilter","SetFilterAdvanced","HallOfMirrors","Bloom","ScalePlanets","ScreenTile","ScreenScroll","ShakeScreen"]},nt={type:"exclude",events:["Hold"]},ot={type:"exclude",events:["MoveCamera"]},it={type:"exclude",events:["AddDecoration","AddText","AddObject","Checkpoint","SetHitsound","PlaySound","SetPlanetRotation","ScalePlanets","ColorTrack","AnimateTrack","RecolorTrack","MoveTrack","PositionTrack","MoveDecorations","SetText","SetObject","SetDefaultText","CustomBackground","Flash","MoveCamera","SetFilter","HallOfMirrors","ShakeScreen","Bloom","ScreenTile","ScreenScroll","SetFrameRate","RepeatEvents","SetConditionalEvents","EditorComment","Bookmark","Hold","SetHoldSound","Hide","ScaleMargin","ScaleRadius"]},at={type:"special",events:["MoveDecorations","SetText","SetObject","SetDefaultText"]};!function(t){t.include="include",t.exclude="exclude",t.special="special"}(et||(et={}));const st=function(t){if(!Array.isArray(t))throw new Error("Arguments are not supported.");return t.map(function(t){var e=Object.assign({},t);return e.hasOwnProperty("addDecorations")&&(e.addDecorations=[]),Array.isArray(e.actions)&&(e.actions=e.actions.filter(function(t){return!at.events.includes(t.eventType)})),e})},ut=function(t,e){return e.map(function(e){var r=Object.assign({},e);return Array.isArray(e.actions)&&(r.actions=e.actions.filter(function(e){return!t.includes(e.eventType)})),r})},ct=function(t,e){return e.map(function(e){var r=Object.assign({},e);return Array.isArray(e.actions)&&(r.actions=e.actions.filter(function(e){return t.includes(e.eventType)})),r})},lt={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ft;const pt=new Uint8Array(16),yt=[];for(let t=0;t<256;++t)yt.push((t+256).toString(16).slice(1));function ht(t,e,r){const n=(t=t||{}).random??t.rng?.()??function(){if(!ft){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ft=crypto.getRandomValues.bind(crypto)}return ft(pt)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){if((r=r||0)<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[r+t]=n[t];return e}return function(t,e=0){return(yt[t[e+0]]+yt[t[e+1]]+yt[t[e+2]]+yt[t[e+3]]+"-"+yt[t[e+4]]+yt[t[e+5]]+"-"+yt[t[e+6]]+yt[t[e+7]]+"-"+yt[t[e+8]]+yt[t[e+9]]+"-"+yt[t[e+10]]+yt[t[e+11]]+yt[t[e+12]]+yt[t[e+13]]+yt[t[e+14]]+yt[t[e+15]]).toLowerCase()}(n)}function vt(t,e){if(t){if("string"==typeof t)return bt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bt(t,e):void 0}}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function dt(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return gt(c,"_invoke",function(r,n,o){var i,s,u,c=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return i=e,s=0,u=t,p.n=r,a}};function y(r,n){for(s=r,u=n,e=0;!f&&c&&!o&&e<l.length;e++){var o,i=l[e],y=p.p,h=i[2];r>3?(o=h===n)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=r<2&&y<i[1])?(s=0,p.v=n,p.n=i[1]):y<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&y(l,h),s=l,u=h;(e=s<2?t:u)||!f;){i||(s?s<3?(s>1&&(p.n=-1),y(s,u)):p.n=u:p.v=u);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(f=p.n<0)?u:r.call(n,p))!==a)break}catch(e){i=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(r,o,i),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][n]?e(e([][n]())):(gt(e={},n,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,gt(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,gt(f,"constructor",c),gt(c,"constructor",u),u.displayName="GeneratorFunction",gt(c,o,"GeneratorFunction"),gt(f),gt(f,o,"Generator"),gt(f,n,function(){return this}),gt(f,"toString",function(){return"[object Generator]"}),(dt=function(){return{w:i,m:p}})()}function gt(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}gt=function(t,e,r,n){function i(e,r){gt(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},gt(t,e,r,n)}function mt(t){return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mt(t)}function Ot(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,St(n.key),n)}}function St(t){var e=function(t){if("object"!=mt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mt(e)?e:e+""}var kt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r},wt=function(){return t=function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._events=new Map,this.guidCallbacks=new Map,this._options=e,this._provider=r},e=[{key:"generateGUID",value:function(){return"event_".concat(!lt.randomUUID||e||t?ht(t,e,r):lt.randomUUID());var t,e,r}},{key:"_emitProgress",value:function(t,e,r,n){var o={stage:t,current:e,total:r,percent:r>0?Math.round(e/r*100):0,data:n};this.trigger("parse:progress",o),this.trigger("parse:".concat(t),o)}},{key:"load",value:function(){var t=this;return new Promise(function(e,r){var n,o=t._options;switch(t._emitProgress("start",0,0),mt(o)){case"string":try{n=q.parseAsObject(o,t._provider)}catch(t){return void r(t)}break;case"object":n=Object.assign({},o);break;default:return void r("Options must be String or Object")}var i=n&&"object"===mt(n)&&null!==n&&void 0!==n.pathData,s=n&&"object"===mt(n)&&null!==n&&void 0!==n.angleData;if(i){var u=n.pathData;t._emitProgress("pathData",0,u.length,{source:u}),t.angleData=a.parseToangleData(u),t._emitProgress("pathData",u.length,u.length,{source:u,processed:t.angleData})}else{if(!s)return void r("There is not any angle datas.");t.angleData=n.angleData,t._emitProgress("angleData",t.angleData.length,t.angleData.length,{processed:t.angleData})}n&&"object"===mt(n)&&null!==n&&void 0!==n.actions?t.actions=n.actions:t.actions=[],n&&"object"===mt(n)&&null!==n&&void 0!==n.settings?(t.settings=n.settings,n&&"object"===mt(n)&&null!==n&&void 0!==n.decorations?t.__decorations=n.decorations:t.__decorations=[],t.tiles=[],t._angleDir=-180,t._twirlCount=0,t._createArray(t.angleData.length,{angleData:t.angleData,actions:t.actions,decorations:t.__decorations}).then(function(r){t.tiles=r,t._emitProgress("complete",t.angleData.length,t.angleData.length),t.trigger("load",t),e(!0)}).catch(function(t){r(t)})):r("There is no ADOFAI settings.")})}},{key:"on",value:function(t,e){this._events.has(t)||this._events.set(t,[]);var r=this.generateGUID();return this._events.get(t).push({guid:r,callback:e}),this.guidCallbacks.set(r,{eventName:t,callback:e}),r}},{key:"trigger",value:function(t,e){this._events.has(t)&&this._events.get(t).forEach(function(t){return(0,t.callback)(e)})}},{key:"off",value:function(t){if(this.guidCallbacks.has(t)){var e=this.guidCallbacks.get(t).eventName;if(this.guidCallbacks.delete(t),this._events.has(e)){var r=this._events.get(e),n=r.findIndex(function(e){return e.guid===t});-1!==n&&r.splice(n,1)}}}},{key:"_createArray",value:function(t,e){return r=this,n=void 0,o=void 0,i=dt().m(function r(){var n,o,i,a,s,u;return dt().w(function(r){for(;;)switch(r.n){case 0:n=[],o=Math.max(1,Math.floor(t/100)),i=0;case 1:if(!(i<t)){r.n=3;break}if(a=this._filterByFloor(e.actions,i),s=this._parseAngle(e.angleData,i,this._twirlCount%2),u={direction:e.angleData[i],_lastdir:e.angleData[i-1]||0,actions:a,angle:s,addDecorations:this._filterByFloorwithDeco(e.decorations,i),twirl:this._twirlCount,extraProps:{}},n.push(u),i%o!==0&&i!==t-1){r.n=2;break}if(this._emitProgress("relativeAngle",i+1,t,{tileIndex:i,tile:u,angle:e.angleData[i],relativeAngle:s}),i%(10*o)!=0){r.n=2;break}return r.n=2,new Promise(function(t){return setTimeout(t,0)});case 2:i++,r.n=1;break;case 3:return r.a(2,n)}},r,this)}),new(o||(o=Promise))(function(t,e){function a(t){try{u(i.next(t))}catch(t){e(t)}}function s(t){try{u(i.throw(t))}catch(t){e(t)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o(function(t){t(r)})).then(a,s)}u((i=i.apply(r,n||[])).next())});var r,n,o,i}},{key:"_changeAngle",value:function(){var t=this,e=0;return this.tiles.map(function(r){return e++,r.angle=t._parsechangedAngle(r.direction,e,r.twirl,r._lastdir),r})}},{key:"_normalizeAngle",value:function(t){return(t%360+360)%360}},{key:"_parsechangedAngle",value:function(t,e,r,n){var o=0;if(0===e&&(this._angleDir=180),999===t)this._angleDir=this._normalizeAngle(n),isNaN(this._angleDir)&&(this._angleDir=0),o=0;else{var i=this._normalizeAngle(this._angleDir-t);0===(o=0===r?i:this._normalizeAngle(360-i))&&(o=360),this._angleDir=this._normalizeAngle(t+180)}return o}},{key:"_filterByFloor",value:function(t,e){var r=t.filter(function(t){return t.floor===e});return this._twirlCount+=r.filter(function(t){return"Twirl"===t.eventType}).length,r.map(function(t){return t.floor,kt(t,["floor"])})}},{key:"_flattenAngleDatas",value:function(t){return t.map(function(t){return t.direction})}},{key:"_flattenActionsWithFloor",value:function(t){return t.flatMap(function(t,e){return((null==t?void 0:t.actions)||[]).map(function(t){t.floor;var r=kt(t,["floor"]);return Object.assign({floor:e},r)})})}},{key:"_filterByFloorwithDeco",value:function(t,e){return t.filter(function(t){return t.floor===e}).map(function(t){return t.floor,kt(t,["floor"])})}},{key:"_flattenDecorationsWithFloor",value:function(t){return t.flatMap(function(t,e){return((null==t?void 0:t.addDecorations)||[]).map(function(t){t.floor;var r=kt(t,["floor"]);return Object.assign({floor:e},r)})})}},{key:"_parseAngle",value:function(t,e,r){var n=0;if(0===e&&(this._angleDir=180),999===t[e])this._angleDir=this._normalizeAngle(t[e-1]),isNaN(this._angleDir)&&(this._angleDir=0),n=0;else{var o=this._normalizeAngle(this._angleDir-t[e]);0===(n=0===r?o:this._normalizeAngle(360-o))&&(n=360),this._angleDir=this._normalizeAngle(t[e]+180)}return n}},{key:"filterActionsByEventType",value:function(t){return Object.entries(this.tiles).flatMap(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||vt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),r=e[0];return(e[1].actions||[]).map(function(t){return{b:t,index:r}})}).filter(function(e){return e.b.eventType===t}).map(function(t){var e=t.b,r=t.index;return{index:Number(r),action:e}})}},{key:"getActionsByIndex",value:function(t,e){var r=this.filterActionsByEventType(t).filter(function(t){return t.index===e});return{count:r.length,actions:r.map(function(t){return t.action})}}},{key:"calculateTileCoordinates",value:function(){console.warn("calculateTileCoordinates is deprecated. Use calculateTilePosition instead.")}},{key:"calculateTilePosition",value:function(){var t,e=this.angleData,r=this.tiles.length,n=[],o=[0,0],i=new Map,a=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=vt(t))){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return i=t.done,t},e:function(t){a=!0,o=t},f:function(){try{i||null==e.return||e.return()}finally{if(a)throw o}}}}(this.actions);try{for(a.s();!(t=a.n()).done;){var s=t.value;"PositionTrack"===s.eventType&&s.positionOffset&&!0!==s.editorOnly&&"Enabled"!==s.editorOnly&&i.set(s.floor,s)}}catch(t){a.e(t)}finally{a.f()}this._emitProgress("tilePosition",0,r);for(var u=new Array(r),c=0;c<r;c++)u[c]=999===e[c]?e[c-1]+180:e[c];for(var l=Math.max(100,Math.floor(r/100)),f=0;f<=r;f++){var p=f===r,y=p?u[f-1]||0:u[f],h=0===f?0:u[f-1]||0,v=this.tiles[f],b=i.get(f);(null==b?void 0:b.positionOffset)&&(o[0]+=b.positionOffset[0],o[1]+=b.positionOffset[1]);var d=[o[0],o[1]];n.push(d),v&&(v.position=d,v.extraProps.angle1=y,v.extraProps.angle2=h-180,v.extraProps.cangle=p?u[f-1]+180:u[f]);var g=y*Math.PI/180;o[0]+=Math.cos(g),o[1]+=Math.sin(g),(f%l===0||p)&&this._emitProgress("tilePosition",f,r,{tileIndex:f,tile:v,position:d,angle:y})}return this._emitProgress("tilePosition",r,r,{processed:n.flat()}),n}},{key:"floorOperation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{type:"append",direction:0};switch(t.type){case"append":this.appendFloor(t);break;case"insert":"number"==typeof t.id&&this.tiles.splice(t.id,0,{direction:t.direction||0,angle:0,actions:[],addDecorations:[],_lastdir:this.tiles[t.id-1].direction,twirl:this.tiles[t.id-1].twirl});break;case"delete":"number"==typeof t.id&&this.tiles.splice(t.id,1)}this._changeAngle()}},{key:"appendFloor",value:function(t){this.tiles.push({direction:t.direction,angle:0,actions:[],addDecorations:[],_lastdir:this.tiles[this.tiles.length-1].direction,twirl:this.tiles[this.tiles.length-1].twirl,extraProps:{}}),this._changeAngle()}},{key:"clearDeco",value:function(){return this.tiles=st(this.tiles),!0}},{key:"clearEffect",value:function(t){this.clearEvent(n[t])}},{key:"clearEvent",value:function(t){t.type==et.include?this.tiles=ct(t.events,this.tiles):t.type==et.exclude&&(this.tiles=ut(t.events,this.tiles))}},{key:"export",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i={angleData:this._flattenAngleDatas(this.tiles),settings:this.settings,actions:this._flattenActionsWithFloor(this.tiles),decorations:this._flattenDecorationsWithFloor(this.tiles)};return"object"===t?i:tt(i,e,r,n,o)}}],e&&Ot(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})());
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ADOFAI=t():e.ADOFAI=t()}(globalThis,()=>(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{Level:()=>we,Parsers:()=>r,Presets:()=>n,Structure:()=>o,pathData:()=>a});var r={};e.r(r),e.d(r,{ArrayBufferParser:()=>Y,BufferParser:()=>K,StringParser:()=>T,default:()=>q});var n={};e.r(n),e.d(n,{preset_inner_no_deco:()=>ae,preset_noeffect:()=>re,preset_noeffect_completely:()=>ie,preset_noholds:()=>ne,preset_nomovecamera:()=>oe});var o={};e.r(o),e.d(o,{default:()=>we});var i={R:0,p:15,J:30,E:45,T:60,o:75,U:90,q:105,G:120,Q:135,H:150,W:165,L:180,x:195,N:210,Z:225,F:240,V:255,D:270,Y:285,B:300,C:315,M:330,A:345,5:555,6:666,7:777,8:888,"!":999};const a={pathDataTable:i,parseToangleData:function(e){return Array.from(e).map(function(e){return i[e]})}};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}const l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=[{key:"parseError",value:function(e){return e}},{key:"parseAsObject",value:function(t,r){return(r||JSON).parse(e.parseAsText(t))}},{key:"parseAsText",value:function(e){return this.parseError(e)}}],null&&u(t.prototype,null),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function h(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}const v=h(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)});function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function O(e,t,r){return t&&m(e.prototype,t),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function S(e){var t=function(e){if("object"!=b(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}var E=function(e){function t(){return g(this,t),e=this,n=arguments,r=_(r=t),function(e,t){if(t&&("object"==b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,k()?Reflect.construct(r,n||[],_(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(t,e),O(t,[{key:"parse",value:function(e,r){if(null==e)return null;var n=new j(e).parseValue();return"function"==typeof r?t._applyReviver("",n,r):n}},{key:"stringify",value:function(e,t,r){return new A(t,r).serialize(e)}}],[{key:"_applyReviver",value:function(e,r,n){if(r&&"object"===b(r))if(Array.isArray(r))for(var o=0;o<r.length;o++)r[o]=t._applyReviver(o.toString(),r[o],n);else for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(r[i]=t._applyReviver(i,r[i],n));return n(e,r)}}])}(v),j=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;g(this,e),this.json=t,this.position=0,this.endSection=r,65279===this.peek()&&this.read()}return O(e,[{key:"parseValue",value:function(){return this.parseByToken(this.nextToken)}},{key:"parseObject",value:function(){var t={};for(this.read();;){var r=void 0;do{if((r=this.nextToken)===e.TOKEN.NONE)return null;if(r===e.TOKEN.CURLY_CLOSE)return t}while(r===e.TOKEN.COMMA);var n=this.parseString();if(null===n)return null;if(this.nextToken!==e.TOKEN.COLON)return null;if(null!=this.endSection&&n===this.endSection)return t;this.read(),t[n]=this.parseValue()}}},{key:"parseArray",value:function(){var t=[];this.read();for(var r=!0;r;){var n=this.nextToken;switch(n){case e.TOKEN.NONE:return null;case e.TOKEN.SQUARED_CLOSE:r=!1;break;case e.TOKEN.COMMA:break;default:var o=this.parseByToken(n);t.push(o)}}return t}},{key:"parseByToken",value:function(t){switch(t){case e.TOKEN.CURLY_OPEN:return this.parseObject();case e.TOKEN.SQUARED_OPEN:return this.parseArray();case e.TOKEN.STRING:return this.parseString();case e.TOKEN.NUMBER:return this.parseNumber();case e.TOKEN.TRUE:return!0;case e.TOKEN.FALSE:return!1;case e.TOKEN.NULL:default:return null}}},{key:"parseString",value:function(){var e="";this.read();for(var t=!0;t&&-1!==this.peek();){var r=this.nextChar;switch(r){case'"':t=!1;break;case"\\":if(-1===this.peek()){t=!1;break}var n=this.nextChar;switch(n){case'"':case"/":case"\\":e+=n;break;case"b":e+="\b";break;case"f":e+="\f";break;case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"u":for(var o="",i=0;i<4;i++)o+=this.nextChar;e+=String.fromCharCode(Number.parseInt(o,16))}break;default:e+=r}}return e}},{key:"parseNumber",value:function(){var e=this.nextWord;return-1===e.indexOf(".")?Number.parseInt(e,10)||0:Number.parseFloat(e)||0}},{key:"eatWhitespace",value:function(){for(;-1!==e.WHITE_SPACE.indexOf(this.peekChar)&&(this.read(),-1!==this.peek()););}},{key:"peek",value:function(){return this.position>=this.json.length?-1:this.json.charCodeAt(this.position)}},{key:"read",value:function(){return this.position>=this.json.length?-1:this.json.charCodeAt(this.position++)}},{key:"peekChar",get:function(){var e=this.peek();return-1===e?"\0":String.fromCharCode(e)}},{key:"nextChar",get:function(){var e=this.read();return-1===e?"\0":String.fromCharCode(e)}},{key:"nextWord",get:function(){for(var t="";-1===e.WORD_BREAK.indexOf(this.peekChar)&&(t+=this.nextChar,-1!==this.peek()););return t}},{key:"nextToken",get:function(){if(this.eatWhitespace(),-1===this.peek())return e.TOKEN.NONE;switch(this.peekChar){case'"':return e.TOKEN.STRING;case",":return this.read(),e.TOKEN.COMMA;case"-":case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return e.TOKEN.NUMBER;case":":return e.TOKEN.COLON;case"[":return e.TOKEN.SQUARED_OPEN;case"]":return this.read(),e.TOKEN.SQUARED_CLOSE;case"{":return e.TOKEN.CURLY_OPEN;case"}":return this.read(),e.TOKEN.CURLY_CLOSE;default:switch(this.nextWord){case"false":return e.TOKEN.FALSE;case"true":return e.TOKEN.TRUE;case"null":return e.TOKEN.NULL;default:return e.TOKEN.NONE}}}}])}();j.WHITE_SPACE=" \t\n\r\ufeff",j.WORD_BREAK=' \t\n\r{}[],:"',j.TOKEN={NONE:0,CURLY_OPEN:1,CURLY_CLOSE:2,SQUARED_OPEN:3,SQUARED_CLOSE:4,COLON:5,COMMA:6,STRING:7,NUMBER:8,TRUE:9,FALSE:10,NULL:11};var A=function(){return O(function e(t,r){g(this,e),this.result="",this.indent=0,this.indentStr="",this.replacer=t||null,this.space=r||null,"number"==typeof r?this.indentStr=" ".repeat(Math.min(10,Math.max(0,r))):"string"==typeof r&&(this.indentStr=r.slice(0,10))},[{key:"serialize",value:function(e){return this.result="",this.serializeValue(e,""),this.result}},{key:"serializeValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";"function"==typeof this.replacer&&(e=this.replacer(t,e)),null==e?this.result+="null":"string"==typeof e?this.serializeString(e):"boolean"==typeof e?this.result+=e.toString():Array.isArray(e)?this.serializeArray(e):"object"===b(e)?this.serializeObject(e):this.serializeOther(e)}},{key:"serializeObject",value:function(e){var t=!0;for(var r in this.result+="{",this.indentStr&&(this.result+="\n",this.indent++),e)if(Object.prototype.hasOwnProperty.call(e,r)){if(Array.isArray(this.replacer)&&!this.replacer.includes(r))continue;t||(this.result+=",",this.indentStr&&(this.result+="\n")),this.indentStr&&(this.result+=this.indentStr.repeat(this.indent)),this.serializeString(r.toString()),this.result+=":",this.indentStr&&(this.result+=" "),this.serializeValue(e[r],r),t=!1}this.indentStr&&(this.result+="\n",this.indent--,this.result+=this.indentStr.repeat(this.indent)),this.result+="}"}},{key:"serializeArray",value:function(e){this.result+="[",this.indentStr&&e.length>0&&(this.result+="\n",this.indent++);for(var t=!0,r=0;r<e.length;r++)t||(this.result+=",",this.indentStr&&(this.result+="\n")),this.indentStr&&(this.result+=this.indentStr.repeat(this.indent)),this.serializeValue(e[r],r.toString()),t=!1;this.indentStr&&e.length>0&&(this.result+="\n",this.indent--,this.result+=this.indentStr.repeat(this.indent)),this.result+="]"}},{key:"serializeString",value:function(e){this.result+='"';var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;switch(n){case"\b":this.result+="\\b";break;case"\t":this.result+="\\t";break;case"\n":this.result+="\\n";break;case"\f":this.result+="\\f";break;case"\r":this.result+="\\r";break;case'"':this.result+='\\"';break;case"\\":this.result+="\\\\";break;default:var o=n.charCodeAt(0);this.result+=o>=32&&o<=126?n:"\\u"+o.toString(16).padStart(4,"0")}}}catch(e){r.e(e)}finally{r.f()}this.result+='"'}},{key:"serializeOther",value:function(e){"number"==typeof e?isFinite(e)?this.result+=e.toString():this.result+="null":this.serializeString(e.toString())}}])}();const T=E;function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function D(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,N(n.key),n)}}function N(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}var U,M;try{U=Buffer.of(239,187,191),M=Buffer.from(",")}catch(e){console.warn("Buffer is not available in current environment, try to use ArrayBufferParser"),U={equals:function(){return!1},subarray:function(){return null}},M={equals:function(){return!1},subarray:function(){return null}}}function B(e){return e.length>=3&&U.equals(e.subarray(0,3))?e.subarray(3):e}function I(e){return B(e).toString("utf-8")}const K=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=x(t),function(e,t){if(t&&("object"==P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,C()?Reflect.construct(t,r||[],x(e).constructor):t.apply(e,r))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}(t,e),r=t,(n=[{key:"parse",value:function(e){if("string"==typeof e)return T.prototype.parse.call(T.prototype,e);var t=B(e),r=new Uint8Array(t);if(function(e){for(var t="other",r=0;r<e.length;r++){var n=e[r];if("escape"!==t)switch(n){case 34:t="string"===t?"other":"string";break;case 92:"string"===t&&(t="escape");break;case 44:"other"===t&&(t="comma");break;case 93:case 125:default:"comma"===t&&(t="other");break;case 9:case 10:case 11:case 12:case 13:case 32:if((10===n||13===n)&&"string"===t)return!0}else t="string"}return!1}(r))return T.prototype.parse.call(T.prototype,I(t));try{var n=function(e){for(var t=[],r="other",n=0,o=0;o<e.length;o++){var i=e[o];if("escape"!==r)switch(i){case 34:switch(r){case"string":r="other";break;case"comma":t.push(M||new Uint8Array([44]));default:r="string"}break;case 92:"string"===r&&(r="escape");break;case 44:t.push(e.subarray(n,o)),n=o+1,"other"===r&&(r="comma");break;case 93:case 125:"comma"===r&&(r="other");break;case 9:case 10:case 11:case 12:case 13:case 32:break;default:"comma"===r&&(t.push(M||new Uint8Array([44])),r="other")}else r="string"}t.push(e.subarray(n));for(var a=0,s=0,u=t;s<u.length;s++)a+=u[s].length;for(var c=new Uint8Array(a),l=0,f=0,p=t;f<p.length;f++){var h=p[f];c.set(h,l),l+=h.length}return c}(r),o=I(Buffer.from(n));return JSON.parse(o)}catch(e){return T.prototype.parse.call(T.prototype,I(t))}}},{key:"stringify",value:function(e){return JSON.stringify(e)}}])&&D(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(v);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,z(n.key),n)}}function z(e){var t=function(e){if("object"!=F(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=F(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==F(t)?t:t+""}function W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(W=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}var H=new Uint8Array([239,187,191]),J=new Uint8Array([44]);function Q(e){var t=new Uint8Array(e);return t.length>=3&&t[0]===H[0]&&t[1]===H[1]&&t[2]===H[2]?e.slice(3):e}const Y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=G(t),function(e,t){if(t&&("object"==F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,W()?Reflect.construct(t,r||[],G(e).constructor):t.apply(e,r))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(t,e),r=t,(n=[{key:"parse",value:function(e){return"string"==typeof e?T.prototype.parse.call(T.prototype,e):T.prototype.parse.call(T.prototype,(t=function(e){for(var t=new Uint8Array(e),r=[],n="other",o=0,i=0;i<t.length;i++){var a=t[i];if("escape"==n)n="string";else switch(a){case 34:switch(n){case"string":n="other";break;case"comma":r.push(J);default:n="string"}break;case 92:"string"===n&&(n="escape");break;case 44:r.push(t.subarray(o,i)),o=i+1,"other"===n&&(n="comma");break;case 93:case 125:"comma"===n&&(n="other");break;case 9:case 10:case 11:case 12:case 13:case 32:break;default:"comma"===n&&(r.push(J),n="other")}}r.push(t.subarray(o));for(var s=0,u=0,c=r;u<c.length;u++)s+=c[u].length;for(var l=new Uint8Array(s),f=0,p=0,h=r;p<h.length;p++){var y=h[p];l.set(y,f),f+=y.length}return l.buffer}(Q(e)),r=Q(t),new TextDecoder("utf-8").decode(r)));var t,r}},{key:"stringify",value:function(e){return JSON.stringify(e)}}])&&L(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(v),q=l;function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"\t",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;if("object"!==$(e)||null===e)return JSON.stringify(e);if(Array.isArray(e)){if(e.every(function(e){return"object"!==$(e)||null===e}))return"["+e.map(function(e){return Z(e,0,!1,n,o)}).join(",")+"]";var i=n.repeat(t),a=n.repeat(t+o);return"[\n"+e.map(function(e){return a+X(e,n)}).join(",\n")+"\n"+i+"]"}var s=n.repeat(t),u=Object.keys(e);if(r){var c=n.repeat(o);return"{\n"+u.map(function(t){return c+JSON.stringify(t)+": "+Z(e[t],o,!1,n,o)}).join(",\n")+"\n}"}return"{\n"+u.map(function(r){return s+n.repeat(o)+JSON.stringify(r)+": "+Z(e[r],t+o,!1,n,o)}).join(",\n")+"\n"+s+"}"}function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\t";return"object"!==$(e)||null===e?Z(e,0,!1,t):Array.isArray(e)?"["+e.map(function(e){return X(e,t)}).join(",")+"]":"{"+Object.keys(e).map(function(r){return JSON.stringify(r)+": "+X(e[r],t)}).join(", ")+"}"}const ee=Z;var te,re={type:"exclude",events:["Flash","SetFilter","SetFilterAdvanced","HallOfMirrors","Bloom","ScalePlanets","ScreenTile","ScreenScroll","ShakeScreen"]},ne={type:"exclude",events:["Hold"]},oe={type:"exclude",events:["MoveCamera"]},ie={type:"exclude",events:["AddDecoration","AddText","AddObject","Checkpoint","SetHitsound","PlaySound","SetPlanetRotation","ScalePlanets","ColorTrack","AnimateTrack","RecolorTrack","MoveTrack","PositionTrack","MoveDecorations","SetText","SetObject","SetDefaultText","CustomBackground","Flash","MoveCamera","SetFilter","HallOfMirrors","ShakeScreen","Bloom","ScreenTile","ScreenScroll","SetFrameRate","RepeatEvents","SetConditionalEvents","EditorComment","Bookmark","Hold","SetHoldSound","Hide","ScaleMargin","ScaleRadius"]},ae={type:"special",events:["MoveDecorations","SetText","SetObject","SetDefaultText"]};!function(e){e.include="include",e.exclude="exclude",e.special="special"}(te||(te={}));const se=function(e){if(!Array.isArray(e))throw new Error("Arguments are not supported.");return e.map(function(e){var t=Object.assign({},e);return t.hasOwnProperty("addDecorations")&&(t.addDecorations=[]),Array.isArray(t.actions)&&(t.actions=t.actions.filter(function(e){return!ae.events.includes(e.eventType)})),t})},ue=function(e,t){return t.map(function(t){var r=Object.assign({},t);return Array.isArray(t.actions)&&(r.actions=t.actions.filter(function(t){return!e.includes(t.eventType)})),r})},ce=function(e,t){return t.map(function(t){var r=Object.assign({},t);return Array.isArray(t.actions)&&(r.actions=t.actions.filter(function(t){return e.includes(t.eventType)})),r})},le={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let fe;const pe=new Uint8Array(16),he=[];for(let e=0;e<256;++e)he.push((e+256).toString(16).slice(1));function ye(e,t,r){const n=(e=e||{}).random??e.rng?.()??function(){if(!fe){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");fe=crypto.getRandomValues.bind(crypto)}return fe(pe)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((r=r||0)<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(he[e[t+0]]+he[e[t+1]]+he[e[t+2]]+he[e[t+3]]+"-"+he[e[t+4]]+he[e[t+5]]+"-"+he[e[t+6]]+he[e[t+7]]+"-"+he[e[t+8]]+he[e[t+9]]+"-"+he[e[t+10]]+he[e[t+11]]+he[e[t+12]]+he[e[t+13]]+he[e[t+14]]+he[e[t+15]]).toLowerCase()}(n)}function ve(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return de(c,"_invoke",function(r,n,o){var i,s,u,c=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,r){return i=t,s=0,u=e,p.n=r,a}};function h(r,n){for(s=r,u=n,t=0;!f&&c&&!o&&t<l.length;t++){var o,i=l[t],h=p.p,y=i[2];r>3?(o=y===n)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((o=r<2&&h<i[1])?(s=0,p.v=n,p.n=i[1]):h<y&&(o=r<3||i[0]>n||n>y)&&(i[4]=r,i[5]=n,p.n=y,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,y){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,y),s=l,u=y;(t=s<2?e:u)||!f;){i||(s?s<3?(s>1&&(p.n=-1),h(s,u)):p.n=u:p.v=u);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(f=p.n<0)?u:r.call(n,p))!==a)break}catch(t){i=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(r,o,i),!0),c}var a={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(de(t={},n,function(){return this}),t),f=c.prototype=s.prototype=Object.create(l);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,de(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=c,de(f,"constructor",c),de(c,"constructor",u),u.displayName="GeneratorFunction",de(c,o,"GeneratorFunction"),de(f),de(f,o,"Generator"),de(f,n,function(){return this}),de(f,"toString",function(){return"[object Generator]"}),(ve=function(){return{w:i,m:p}})()}function de(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}de=function(e,t,r,n){function i(t,r){de(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},de(e,t,r,n)}function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function ge(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=me(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function me(e,t){if(e){if("string"==typeof e)return Oe(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Oe(e,t):void 0}}function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Se(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ke(n.key),n)}}function ke(e){var t=function(e){if("object"!=be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==be(t)?t:t+""}var _e=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},we=function(){return e=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._precomputedEvents=null,this._precomputeMode=!1,this._events=new Map,this.guidCallbacks=new Map,this._options=t,this._provider=r},t=[{key:"generateGUID",value:function(){return"event_".concat(!le.randomUUID||t||e?ye(e,t,r):le.randomUUID());var e,t,r}},{key:"_emitProgress",value:function(e,t,r,n){var o={stage:e,current:t,total:r,percent:r>0?Math.round(t/r*100):0,data:n};this._precomputeMode&&this._precomputedEvents?this._precomputedEvents[e].push(o):(this.trigger("parse:progress",o),this.trigger("parse:".concat(e),o))}},{key:"enablePrecomputeMode",value:function(){this._precomputeMode=!0,this._precomputedEvents={start:[],pathData:[],angleData:[],relativeAngle:[],tilePosition:[],complete:[]}}},{key:"disablePrecomputeMode",value:function(){this._precomputeMode=!1}},{key:"getPrecomputedEvents",value:function(){return this._precomputedEvents}},{key:"clearPrecomputedEvents",value:function(){this._precomputedEvents=null}},{key:"getEventsAtPercent",value:function(e,t){if(!this._precomputedEvents)return[];for(var r=[],n=0,o=t?[t]:["start","pathData","angleData","relativeAngle","tilePosition","complete"];n<o.length;n++){var i,a=o[n],s=ge(this._precomputedEvents[a]);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(u.percent<=e&&(0===r.length||r[r.length-1].percent<=u.percent)){var c=r[r.length-1];c&&c.stage===u.stage&&c.current===u.current||r.push(u)}}}catch(e){s.e(e)}finally{s.f()}}return r}},{key:"getPrecomputedEventCount",value:function(e){return this._precomputedEvents?e?this._precomputedEvents[e].length:Object.values(this._precomputedEvents).reduce(function(e,t){return e+t.length},0):0}},{key:"load",value:function(){var e=this;return new Promise(function(t,r){var n,o=e._options;switch(e._emitProgress("start",0,0),be(o)){case"string":try{n=q.parseAsObject(o,e._provider)}catch(e){return void r(e)}break;case"object":n=Object.assign({},o);break;default:return void r("Options must be String or Object")}var i=n&&"object"===be(n)&&null!==n&&void 0!==n.pathData,s=n&&"object"===be(n)&&null!==n&&void 0!==n.angleData;if(i){var u=n.pathData;e._emitProgress("pathData",0,u.length,{source:u}),e.angleData=a.parseToangleData(u),e._emitProgress("pathData",u.length,u.length,{source:u,processed:e.angleData})}else{if(!s)return void r("There is not any angle datas.");e.angleData=n.angleData,e._emitProgress("angleData",e.angleData.length,e.angleData.length,{processed:e.angleData})}n&&"object"===be(n)&&null!==n&&void 0!==n.actions?e.actions=n.actions:e.actions=[],n&&"object"===be(n)&&null!==n&&void 0!==n.settings?(e.settings=n.settings,n&&"object"===be(n)&&null!==n&&void 0!==n.decorations?e.__decorations=n.decorations:e.__decorations=[],e.tiles=[],e._angleDir=-180,e._twirlCount=0,e._createArray(e.angleData.length,{angleData:e.angleData,actions:e.actions,decorations:e.__decorations}).then(function(r){e.tiles=r,e._emitProgress("complete",e.angleData.length,e.angleData.length),e.trigger("load",e),t(!0)}).catch(function(e){r(e)})):r("There is no ADOFAI settings.")})}},{key:"on",value:function(e,t){this._events.has(e)||this._events.set(e,[]);var r=this.generateGUID();return this._events.get(e).push({guid:r,callback:t}),this.guidCallbacks.set(r,{eventName:e,callback:t}),r}},{key:"trigger",value:function(e,t){this._events.has(e)&&this._events.get(e).forEach(function(e){return(0,e.callback)(t)})}},{key:"off",value:function(e){if(this.guidCallbacks.has(e)){var t=this.guidCallbacks.get(e).eventName;if(this.guidCallbacks.delete(e),this._events.has(t)){var r=this._events.get(t),n=r.findIndex(function(t){return t.guid===e});-1!==n&&r.splice(n,1)}}}},{key:"_createArray",value:function(e,t){return r=this,n=void 0,o=void 0,i=ve().m(function r(){var n,o,i,a,s,u;return ve().w(function(r){for(;;)switch(r.n){case 0:n=[],o=Math.max(1,Math.floor(e/100)),i=0;case 1:if(!(i<e)){r.n=3;break}if(a=this._filterByFloor(t.actions,i),s=this._parseAngle(t.angleData,i,this._twirlCount%2),u={direction:t.angleData[i],_lastdir:t.angleData[i-1]||0,actions:a,angle:s,addDecorations:this._filterByFloorwithDeco(t.decorations,i),twirl:this._twirlCount,extraProps:{}},n.push(u),i%o!==0&&i!==e-1){r.n=2;break}if(this._emitProgress("relativeAngle",i+1,e,{tileIndex:i,tile:u,angle:t.angleData[i],relativeAngle:s}),i%(10*o)!=0){r.n=2;break}return r.n=2,new Promise(function(e){return setTimeout(e,0)});case 2:i++,r.n=1;break;case 3:return r.a(2,n)}},r,this)}),new(o||(o=Promise))(function(e,t){function a(e){try{u(i.next(e))}catch(e){t(e)}}function s(e){try{u(i.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o(function(e){e(r)})).then(a,s)}u((i=i.apply(r,n||[])).next())});var r,n,o,i}},{key:"_changeAngle",value:function(){var e=this,t=0;return this.tiles.map(function(r){return t++,r.angle=e._parsechangedAngle(r.direction,t,r.twirl,r._lastdir),r})}},{key:"_normalizeAngle",value:function(e){return(e%360+360)%360}},{key:"_parsechangedAngle",value:function(e,t,r,n){var o=0;if(0===t&&(this._angleDir=180),999===e)this._angleDir=this._normalizeAngle(n),isNaN(this._angleDir)&&(this._angleDir=0),o=0;else{var i=this._normalizeAngle(this._angleDir-e);0===(o=0===r?i:this._normalizeAngle(360-i))&&(o=360),this._angleDir=this._normalizeAngle(e+180)}return o}},{key:"_filterByFloor",value:function(e,t){var r=e.filter(function(e){return e.floor===t});return this._twirlCount+=r.filter(function(e){return"Twirl"===e.eventType}).length,r.map(function(e){return e.floor,_e(e,["floor"])})}},{key:"_flattenAngleDatas",value:function(e){return e.map(function(e){return e.direction})}},{key:"_flattenActionsWithFloor",value:function(e){return e.flatMap(function(e,t){return((null==e?void 0:e.actions)||[]).map(function(e){e.floor;var r=_e(e,["floor"]);return Object.assign({floor:t},r)})})}},{key:"_filterByFloorwithDeco",value:function(e,t){return e.filter(function(e){return e.floor===t}).map(function(e){return e.floor,_e(e,["floor"])})}},{key:"_flattenDecorationsWithFloor",value:function(e){return e.flatMap(function(e,t){return((null==e?void 0:e.addDecorations)||[]).map(function(e){e.floor;var r=_e(e,["floor"]);return Object.assign({floor:t},r)})})}},{key:"_parseAngle",value:function(e,t,r){var n=0;if(0===t&&(this._angleDir=180),999===e[t])this._angleDir=this._normalizeAngle(e[t-1]),isNaN(this._angleDir)&&(this._angleDir=0),n=0;else{var o=this._normalizeAngle(this._angleDir-e[t]);0===(n=0===r?o:this._normalizeAngle(360-o))&&(n=360),this._angleDir=this._normalizeAngle(e[t]+180)}return n}},{key:"filterActionsByEventType",value:function(e){return Object.entries(this.tiles).flatMap(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||me(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0];return(t[1].actions||[]).map(function(e){return{b:e,index:r}})}).filter(function(t){return t.b.eventType===e}).map(function(e){var t=e.b,r=e.index;return{index:Number(r),action:t}})}},{key:"getActionsByIndex",value:function(e,t){var r=this.filterActionsByEventType(e).filter(function(e){return e.index===t});return{count:r.length,actions:r.map(function(e){return e.action})}}},{key:"calculateTileCoordinates",value:function(){console.warn("calculateTileCoordinates is deprecated. Use calculateTilePosition instead.")}},{key:"calculateTilePosition",value:function(){var e,t=this.angleData,r=this.tiles.length,n=[],o=[0,0],i=new Map,a=ge(this.actions);try{for(a.s();!(e=a.n()).done;){var s=e.value;"PositionTrack"===s.eventType&&s.positionOffset&&!0!==s.editorOnly&&"Enabled"!==s.editorOnly&&i.set(s.floor,s)}}catch(e){a.e(e)}finally{a.f()}this._emitProgress("tilePosition",0,r);for(var u=new Array(r),c=0;c<r;c++)u[c]=999===t[c]?t[c-1]+180:t[c];for(var l=Math.max(100,Math.floor(r/100)),f=0;f<=r;f++){var p=f===r,h=p?u[f-1]||0:u[f],y=0===f?0:u[f-1]||0,v=this.tiles[f],d=i.get(f);(null==d?void 0:d.positionOffset)&&(o[0]+=d.positionOffset[0],o[1]+=d.positionOffset[1]);var b=[o[0],o[1]];n.push(b),v&&(v.position=b,v.extraProps.angle1=h,v.extraProps.angle2=y-180,v.extraProps.cangle=p?u[f-1]+180:u[f]);var g=h*Math.PI/180;o[0]+=Math.cos(g),o[1]+=Math.sin(g),(f%l===0||p)&&this._emitProgress("tilePosition",f,r,{tileIndex:f,tile:v,position:b,angle:h})}return this._emitProgress("tilePosition",r,r,{processed:n.flat()}),n}},{key:"floorOperation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{type:"append",direction:0};switch(e.type){case"append":this.appendFloor(e);break;case"insert":"number"==typeof e.id&&this.tiles.splice(e.id,0,{direction:e.direction||0,angle:0,actions:[],addDecorations:[],_lastdir:this.tiles[e.id-1].direction,twirl:this.tiles[e.id-1].twirl});break;case"delete":"number"==typeof e.id&&this.tiles.splice(e.id,1)}this._changeAngle()}},{key:"appendFloor",value:function(e){this.tiles.push({direction:e.direction,angle:0,actions:[],addDecorations:[],_lastdir:this.tiles[this.tiles.length-1].direction,twirl:this.tiles[this.tiles.length-1].twirl,extraProps:{}}),this._changeAngle()}},{key:"clearDeco",value:function(){return this.tiles=se(this.tiles),!0}},{key:"clearEffect",value:function(e){this.clearEvent(n[e])}},{key:"clearEvent",value:function(e){e.type==te.include?this.tiles=ce(e.events,this.tiles):e.type==te.exclude&&(this.tiles=ue(e.events,this.tiles))}},{key:"export",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i={angleData:this._flattenAngleDatas(this.tiles),settings:this.settings,actions:this._flattenActionsWithFloor(this.tiles),decorations:this._flattenDecorationsWithFloor(this.tiles)};return"object"===e?i:ee(i,t,r,n,o)}}],t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();return t})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adofai",
3
- "version": "2.11.1",
3
+ "version": "2.12.0",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {