Commit 871911f5 authored by 范雪寒's avatar 范雪寒

feat:

parent 68846306
{
"ver": "1.1.2",
"uuid": "b4b62bd3-1442-4e7e-8b59-38c0f3bf6c52",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {
"android": "default"
},
"optimizeHotUpdate": {
"android": true
},
"inlineSpriteFrames": {
"android": false
},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"ver": "1.2.9",
"uuid": "2a58ffcd-1d90-4998-a625-391e8f63e2bc",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "fff45320-253a-4fca-8d41-71657ca56be0",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "cb3bc965-0fb2-4a72-aa15-9ccbb8543671",
"downloadMode": 0,
"duration": 19.435102,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "e16e2ad2-276a-495a-83d0-5b16756e02a6",
"downloadMode": 0,
"duration": 67.970612,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "364b705a-1783-4f46-8240-bca1627c3a4b",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "border_prefbab",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
}
],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 10
}
],
"_prefab": {
"__id__": 11
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 868,
"height": 563
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
310.126,
-230,
0,
0,
0,
0,
1,
0.5,
0.5,
0.5
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "cover",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 868,
"height": 563
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "98403cdc-f16c-432c-8f58-50b78acc5caf"
},
"fileId": "d17RVDfvZJNq7kLF7rLrBJ",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "frame",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
},
{
"__id__": 7
}
],
"_prefab": {
"__id__": 8
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 868,
"height": 563
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "afbee15e-e24a-4b66-bf52-fc2b93b889f7"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 868,
"_originalHeight": 563,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "98403cdc-f16c-432c-8f58-50b78acc5caf"
},
"fileId": "54LfqtYRRMTo13Z+QDKZlh",
"sync": false
},
{
"__type__": "bd34eayA01P0KaOMasxsTM+",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_id": ""
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "98403cdc-f16c-432c-8f58-50b78acc5caf"
},
"fileId": "",
"sync": false
}
]
\ No newline at end of file
{
"ver": "1.2.9",
"uuid": "98403cdc-f16c-432c-8f58-50b78acc5caf",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "eb535010-e6f8-48ff-b5e6-a427458eedfc",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent";
// @ts-ignore
import { assign, createMachine, interpret, actions, forwardTo, matchesState } from "../script/xstate";
const { pure, send, raise, sendParent } = actions;
const { ccclass, property } = cc._decorator;
@ccclass
export default class SceneComponent extends MyCocosSceneComponent {
@property(cc.PageView)
submarineView: cc.PageView = null;
@property(cc.Node)
submarineViewBackground: cc.Node = null;
@property(cc.Node)
loading: cc.Node = null;
@property(cc.Node)
LetterView: cc.Node = null;
@property(cc.Node)
StoryView: cc.Node = null;
@property(cc.Node)
ReviewView: cc.Node = null;
@property(cc.Node)
SubmarineView: cc.Node = null;
@property(cc.AudioClip)
bgMusic1: cc.AudioClip = null;
@property(cc.AudioClip)
bgMusic2: cc.AudioClip = null;
@property([cc.Node])
BackViewButtons: cc.Node[] = [];
@property([cc.Node])
SpaceViewButtons: cc.Node[] = [];
@property([cc.Node])
SubmarineViewButtons: cc.Node[] = [];
@property([cc.Node])
LetterViewButtons: cc.Node[] = [];
@property(cc.Label)
LetterViewLabel: cc.Label = null;
@property([cc.Node])
ReviewViewButtons: cc.Node[] = [];
@property([cc.Node])
StoryViewButtons: cc.Node[] = [];
@property([cc.Node])
FullPageNode: cc.Node[] = [];
@property(cc.Node)
BackDoorNode: cc.Node = null;
tws: any[] = [];
gameMachineService: any = null;
LoadingCount: number = 1;
_mapScaleMin: number = 1;
_mapScaleMax: number = 1;
_cocosScale: number = 1;
BASE_URL: string = null;
MACHINE_INITED: boolean = false;
onLoad(){
this.tws = [];
this.LoadingCount = 0;
this.initSize();
}
initialized() {
if(this.BASE_URL && this.gameMachineService) {
this.gameMachineService.start();
this.restore();
}
}
callOcMethod(method, param) {
const paramStr = JSON.stringify(param);
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
return jsb.reflection.callStaticMethod('RootViewController', `${method}:`, paramStr);
} else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_ANDROID) {
return jsb.reflection.callStaticMethod('com/iplayabc/cocos/AppActivity', method, '(Ljava/lang/String;)Ljava/lang/String;', paramStr);
} else if (cc.sys.isNative && cc.sys.os == cc.sys.OS_WINDOWS) {
console.log('汪汪汪')
} else {
console.warn('非源生环境');
}
}
initSize() {
// 注意cc.winSize只有在适配后(修改fitHeight/fitWidth后)才能获取到正确的值,因此使用cc.getFrameSize()来获取初始的屏幕大小
let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height
let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height
let f = screen_size >= design_size
cc.Canvas.instance.fitHeight = f
cc.Canvas.instance.fitWidth = !f
const frameSize = cc.view.getFrameSize();
this._frameSize = frameSize;
this._designSize = cc.view.getDesignResolutionSize();
let sx = cc.winSize.width / frameSize.width;
let sy = cc.winSize.height / frameSize.height;
this._cocosScale = Math.min(sx, sy);
sx = frameSize.width / this._designSize.width;
sy = frameSize.height / this._designSize.height;
this._mapScaleMin = Math.min(sx, sy) * this._cocosScale;
this._mapScaleMax = Math.max(sx, sy) * this._cocosScale;
}
start() {
this.showWaitingLetters();
this.initBg();
this.initSubmarineView();
this.createFiniteStateMachines();
this.BackViewButtons.forEach(b => {
b.on(cc.Node.EventType.TOUCH_START, function () {
this.gameMachineService.send('BACK');
// this.node.emit('BACK');
}, this, true);
});
for (let bs of [this.SpaceViewButtons, this.SubmarineViewButtons, this.LetterViewButtons, this.StoryViewButtons, this.ReviewViewButtons]) {
bs.forEach(b => {
// const env = this;
b.on(cc.Node.EventType.TOUCH_START, function () {
// this.gameMachineService.send('BACK')
// env.node.emit('BACK');
const [buttonName, state, index] = b.name.split('@');
console.log(buttonName, state, index);
let stateName = b.parent.name;
if (stateName.includes('@')) {
let [_, sn] = stateName.split('@')
stateName = sn;
}
console.log(stateName);
const currentDataset = this.gameMachineService.machine.config.context[stateName + 'Data'];
if (!currentDataset || !currentDataset[index]) {
return;
}
const linkFlag = stateName === 'LetterView';
globalThis.PREV_STATE = globalThis.CURRENT_STATE ? JSON.parse(JSON.stringify(globalThis.CURRENT_STATE)) : null;
const param = JSON.parse(JSON.stringify(currentDataset[index]));
globalThis.CURRENT_STATE = {
state,
data: { ...param, buttonName, linkFlag }
}
console.log(globalThis.PREV_STATE, globalThis.CURRENT_STATE);
globalThis.CURRENT_PID = param.pid;
globalThis.CURRENT_ID = param.id;
this.gameMachineService.send(state, { ...param, buttonName, linkFlag });
}, this, true);
});
}
globalThis.aaa = this;
const that = this;
// @ts-ignores
window.air = window.air || {};
// @ts-ignores
window.air.getEngineInfoCallback = function(res) {
let isDev;
if(typeof(res) == 'string') {
isDev = JSON.parse(res).isDev;
} else {
isDev = res.isDev;
}
console.log('isDev ' +(+isDev));
if (+isDev) {
that.BASE_URL = 'https://staging-teach.ireadabc.com';
} else {
that.BASE_URL = 'https://iteachabc.com';
}
console.log(111111);
that.initialized();
}
// @ts-ignores
const success = this.callOcMethod('getEngineInfo');
if (success) {
console.log("callOcMethod('getEngineInfo') success" + success);
} else {
console.log("callOcMethod('getEngineInfo') error" + success);
}
if (!cc.sys.isNative) {
// @ts-ignores
window.air.getEngineInfoCallback({isDev: 1})
}
}
initBg() {
// const bgNode = cc.find('Canvas/MainScene/SpaceView/bg');
this.FullPageNode.forEach(n => {
n.scale = this._mapScaleMax;
});
}
addPreloadImage() {
// TODO 根据自己的配置预加载图片资源
this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
}
addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源
this._audioResList.push({ url: this.data.audio_url });
}
addPreloadAnima() {
}
initSubmarineView() {
this.submarineView.node.on('scrolling', this.moveSubmarineBackground, this);
this.SubmarineView.active = false;
}
moveSubmarineBackground() {
//获取滚动视图相对于左上角原点的当前滚动偏移
let scrollOffset: cc.Vec2 = this.submarineView.getScrollOffset();
// console.log(scrollOffset.x);
this.submarineViewBackground.x = scrollOffset.x * 0.65;
}
createFiniteStateMachines() {
const canvas = cc.find('Canvas');
canvas.on('MIDDLE_LAYER_LOADED', ({ scene }) => {
this.hideWaitingLetters();
});
const operationState = {
id: 'operation',
initial: 'SpaceView',
context: {
SpaceViewData: null,
SubmarineViewData: null,
LetterVewData: null,
StoryViewData: null,
ReviewViewData: null,
currentDataset: null,
},
states: {
SpaceView: {
entry: (ctx, event) => {
this.LetterView.active = false;
this.StoryView.active = false;
this.ReviewView.active = false;
this.SubmarineView.active = false;
cc.audioEngine.stopMusic();
cc.audioEngine.playMusic(this.bgMusic1, true);
// event.type !== 'BACK'
this.callNetworkApiGet(this.BASE_URL + '/api/syllabus/v1/list?orgid=507', (resp: any) => {
resp = JSON.parse(resp);
if (resp.msg == 'success') {
let { rows } = resp
rows = rows.filter(r => !r.has_courseware);
console.log('SpaceView111', rows)
ctx.SpaceViewData = rows;
ctx.currentDataset = rows;
}
});
},
exit: () => {
console.log('exit SpaceView stage');
cc.audioEngine.stopMusic();
cc.audioEngine.playMusic(this.bgMusic2, true);
},
on: {
SUBMARINE: 'SubmarineView',
LETTER: 'LetterView',
STORY: 'StoryView',
REVIEW: 'ReviewView',
},
},
SubmarineView: {
entry: (ctx, event) => {
console.log('entry SubmarineView stage');
this.LetterView.active = false;
this.StoryView.active = false;
this.ReviewView.active = false;
this.SubmarineView.active = true;
},
exit: () => {
// console.log('exit SubmarineView stage');
},
invoke: {
src: (ctx, event) => {
console.log(111, event)
// this.submarineView.scrollToPage(0, 0)
this.callNetworkApiGet(this.BASE_URL + '/api/syllabus/v1/list?orgid=507&pid=' + globalThis.CURRENT_ID, (resp: any) => {
resp = JSON.parse(resp);
if (resp.msg == 'success') {
let { rows } = resp;
rows = rows.filter(r => !r.has_courseware)
console.log('SubmarineView', rows);
ctx.SubmarineViewData = rows;
ctx.currentDataset = rows;
}
});
}
},
on: {
LOAD: {
target: 'SubmarineView',
actions: (ctx, event) => {
console.log('SubmarineView LOAD', ctx, event);
}
},
LETTER: 'LetterView',
STORY: 'StoryView',
REVIEW: 'ReviewView',
BACK: {
target: 'SpaceView',
actions: (ctx, event) => {
console.log('back', ctx, event);
}
}
},
},
LetterView: {
on: {
BACK: {
target: 'SubmarineView',
actions: () => {
globalThis.CURRENT_ID = globalThis.CURRENT_PID;
}
},
PLAY: {
target: 'PlayView',
actions: (ctx, event) => {
console.log('PLAY', ctx, event);
}
}
},
invoke: {
src: (ctx, event) => {
// console.log(222,event)
// if (event.id) {
// globalThis.CURRENT_PID = globalThis.CURRENT_ID;
// globalThis.CURRENT_ID = event.id;
// }
this.callNetworkApiGet(this.BASE_URL + '/api/syllabus/v1/list?orgid=507&pid=' + globalThis.CURRENT_ID, (resp: any) => {
resp = JSON.parse(resp);
if (resp.msg == 'success') {
let { rows } = resp;
rows = rows.filter(r => r.has_courseware);
console.log('LetterView', rows);
ctx.LetterViewData = rows;
ctx.currentDataset = rows;
}
});
}
},
entry: (ctx, event) => {
console.log('entry LetterView stage',);
this.LetterView.active = true;
this.StoryView.active = false;
this.ReviewView.active = false;
this.SubmarineView.active = true;
this.LetterViewLabel.string = event.buttonName;
},
exit: () => {
console.log('exit LetterView stage');
}
},
StoryView: {
on: {
BACK: {
target: 'SubmarineView',
actions: (ctx) => {
globalThis.CURRENT_ID = globalThis.CURRENT_PID;
}
},
PLAY: {
target: 'PlayView',
actions: (ctx, event) => {
console.log('back', ctx, event);
}
},
},
invoke: {
src: (ctx, event) => {
return new Promise<void>((resolve, reject) => {
this.callNetworkApiGet(this.BASE_URL + '/api/syllabus/v1/list?orgid=507&pid=' + globalThis.CURRENT_ID, (resp: any) => {
resp = JSON.parse(resp);
if (resp.msg == 'success') {
let { rows } = resp;
rows = rows.filter(r => r.has_courseware);
console.log('StoryView', rows);
ctx.StoryViewData = rows;
ctx.currentDataset = rows;
rows.forEach((r, idx) => {
const btn = this.StoryViewButtons[idx];
btn.active = true;
const cover = btn.getComponent('Cover')
console.log(r.cover);
cover.setUrl(r.cover);
});
resolve()
}
});
});
}
},
entry: (ctx, event) => {
// console.log('entry StoryView stage');
this.LetterView.active = false;
this.StoryView.active = true;
this.ReviewView.active = false;
this.SubmarineView.active = true;
this.ReviewViewButtons
},
exit: () => {
// console.log('exit StoryView stage');
},
},
ReviewView: {
on: {
BACK: {
target: 'SubmarineView',
actions: (ctx) => {
globalThis.CURRENT_ID = globalThis.CURRENT_PID;
}
},
PLAY: {
target: 'PlayView',
actions: (ctx, event) => {
// console.log('back', ctx, event);
}
},
},
invoke: {
src: (ctx, event) => {
this.callNetworkApiGet(this.BASE_URL + '/api/syllabus/v1/list?orgid=507&pid=' + globalThis.CURRENT_ID, (resp: any) => {
resp = JSON.parse(resp);
if (resp.msg == 'success') {
let { rows } = resp;
rows = rows.filter(r => r.has_courseware);
console.log('ReviewView', rows);
ctx.ReviewViewData = rows;
ctx.currentDataset = rows;
rows.forEach((r, idx) => {
const btn = this.ReviewViewButtons[idx];
btn.active = true;
const cover = btn.getComponent('Cover')
cover.setUrl(r.cover);
});
}
});
}
},
entry: (ctx, event) => {
// console.log('entry ReviewView stage');
this.LetterView.active = false;
this.StoryView.active = false;
this.ReviewView.active = true;
this.SubmarineView.active = true;
},
exit: () => {
// console.log('exit ReviewView stage');
},
},
PlayView: {
on: {
},
invoke: {
src: (ctx, event) => {
this.showWaitingLetters();
}
},
entry: (ctx, event) => {
console.log('entry PlayView stage');
this.showWaitingLetters();
cc.audioEngine.stopMusic();
const configData = globalThis.configData;
console.log(this);
let isDebug = false;
if (this.BackDoorNode) {
const bd = this.BackDoorNode.getComponent('BackDoor');
if (bd && bd.isDebug()) {
isDebug = true;
}
}
cc.assetManager.loadBundle(configData.bondleUrl, { version: configData.version }, async (err, bundle) => {
if (err) {
return console.log(err);
}
bundle.loadScene(configData.sceneName, null, null, (err, scene) => {
cc.director.runScene(scene, null, () => {
try {
const middleLayer = cc.find('middleLayer').getComponent('middleLayer');
console.log(event.id, event.linkFlag);
if (!isDebug) {
middleLayer.loadOnlineCourseWare(event.id, event.linkFlag);
}
} catch (e) {
console.error(e);
}
});
});
});
// this.LetterView.active = false;
// this.StoryView.active = false;
// this.ReviewView.active = true;
// this.SubmarineView.active = false;
},
exit: () => {
this.hideWaitingLetters();
console.log('exit PlayView stage');
},
},
}
};
const operationMachine = createMachine(operationState);
this.gameMachineService = interpret(operationMachine).onTransition((state) => {
console.log(1, state);
});
}
restore() {
if (globalThis.PREV_STATE) {
globalThis.CURRENT_ID = globalThis.PREV_STATE.data.id
globalThis.CURRENT_PID = globalThis.PREV_STATE.data.pid
this.gameMachineService.send('SpaceView', { ...globalThis.PREV_STATE.data, type: globalThis.PREV_STATE.state });
globalThis.CURRENT_STATE = JSON.parse(JSON.stringify(globalThis.PREV_STATE));
globalThis.PREV_STATE = null;
}
}
setStateContextData({ rows, buttonsKey }) {
const buttons = buttonsKey;
buttons.forEach((b: any) => {
b.getComponent(cc.Button).interactable = false;
});
rows.forEach((item, idx) => {
if (!buttons[idx]) {
return;
}
(buttons[idx] as any).getComponent(cc.Button).interactable = true;
(buttons[idx] as any).getComponent(cc.Button).dataIndex = idx;
(buttons[idx] as any).getComponent(cc.Button).dataMeta = item;
const [_, action, index] = (buttons[idx] as any).name.split('@');
(buttons[idx] as any).off(cc.Node.EventType.TOUCH_START);
(buttons[idx] as any).on(cc.Node.EventType.TOUCH_START, function () {
this.gameMachineService.send(action, item)
}, this, true)
});
}
callNetworkApiGet(uri, successCallBack: (resp: string) => void, errorCallback?: (any) => void) {
this.showWaitingLetters()
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = () => {
if (xhr.readyState == 4) {
this.hideWaitingLetters()
if ((xhr.status >= 200 && xhr.status < 400)) {
successCallBack && successCallBack(xhr.responseText);
} else {
errorCallback && errorCallback(xhr)
}
}
};
console.log('url = ' + uri);
xhr.open('GET', uri, true);
xhr.send();
}
hideWaitingLetters() {
this.LoadingCount--;
if (this.LoadingCount <= 0) {
this.LoadingCount = 0;
setTimeout(() => {
if (this.tws){
for (const tw of this.tws) {
tw.node.y = 0;
tw.tw.stop();
}
}
this.loading.active = false;
});
}
}
showWaitingLetters() {
this.LoadingCount += 1;
if (this.loading.active) {
return;
}
const colorList = this.getRainbowColorList();
const text = this.loading.getChildByName('text')
text.children.forEach((node, idx) => {
node.color = colorList[idx];
const tw = cc.tween(node)
.delay(idx / 4)
.to(0.3, { y: 50 }, { easing: 'sineOut' })
.to(0.3, { y: -50 }, { easing: 'sineIn' })
.delay((text.children.length - idx) / 4)
.union()
.repeatForever()
.start();
this.tws.push({
tw,
node
});
});
this.loading.active = true;
}
getRainbowColorList() {
return [
cc.color(255, 255, 0),
cc.color(128, 255, 0),
cc.color(0, 255, 0),
cc.color(0, 255, 128),
cc.color(0, 255, 255),
cc.color(0, 128, 255),
cc.color(0, 0, 255),
cc.color(128, 0, 255),
cc.color(255, 0, 255),
cc.color(255, 0, 128),
cc.color(255, 0, 0),
cc.color(255, 128, 0),
cc.color(255, 255, 0),
];
}
}
{
"ver": "1.0.8",
"uuid": "408a67f8-65fa-4cf1-8cf2-83e20e1a0fd5",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "ecdde385-d614-491b-b29d-3f33445f948b",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
// @property(cc.Label)
// label: cc.Label = null;
// @property
// text: string = 'hello';
@property
need: number = 5;
touchCounter = 0;
countTimer = null;
hat = null;
// isDebug = false;
// touchTimeline = [];
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
isDebug() {
return this.hat && this.hat.active;
}
start () {
console.log(111)
this.hat = this.node.getChildByName('hat');
if (!this.hat) {
return;
}
this.node.on(cc.Node.EventType.TOUCH_START, () => {
// console.log(Date.now());
// this.touchTimeline.push(Date.now());
this.touchCounter++;
if (!this.countTimer) {
this.countTimer = setTimeout(() =>{
this.touchCounter = 0;
clearTimeout(this.countTimer);
this.countTimer = null;
}, 2000);
}
if (this.touchCounter == this.need) {
clearTimeout(this.countTimer);
this.countTimer = null;
if (this.hat.active) {
this.hat.active = false
} else {
this.hat.active = true
}
}
});
}
// update (dt) {}
}
{
"ver": "1.0.8",
"uuid": "9c2d1f95-a5c9-46fb-bccb-d8ddfea5bc5c",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const {ccclass, property} = cc._decorator;
@ccclass
export default class CoverClass extends cc.Component {
// @property
// url: string = '';
// @property(cc.Node)
// coverFrame: cc.SpriteFrame = null;
coverNode: cc.Node = null;
loaded = false;
spriteFrameCache = {};
// LIFE-CYCLE CALLBACKS:
onLoad () {
this.coverNode = this.node.getChildByName('cover')
}
start () {
// this.coverFrame = this.coverNode.getComponent(cc.Sprite).spriteFrame
}
setSpriteFrame(spriteFrame) {
if(!this.coverNode) {
return;
}
if(!spriteFrame) {
return;
}
const {width, height} = spriteFrame.getOriginalSize()
this.coverNode.getComponent(cc.Sprite).spriteFrame = spriteFrame;
this.coverNode.width = width;
this.coverNode.height = height;
const sx = this.node.width / width;
const sy = this.node.height / height;
const s = Math.min(sx, sy);
const scale = Math.round(s * 1000) / 1000;
this.coverNode.scale = scale * .9
return spriteFrame
}
setUrl(url) {
if (!url) {
return;
}
if (this.spriteFrameCache[url]) {
this.setSpriteFrame(this.spriteFrameCache[url]);
return;
}
if (this.coverNode) {
cc.assetManager.loadRemote( url, (err, tex) => {
const spriteFrame = new cc.SpriteFrame(tex);
// console.log(spriteFrame);
this.setSpriteFrame(spriteFrame);
this.spriteFrameCache[url] = spriteFrame
});
}
}
// update (dt) {}
}
{
"ver": "1.0.8",
"uuid": "bd34e6b2-034d-4fd0-a68e-31ab31b1333e",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { defaultData } from "../script/defaultData";
export class MyCocosSceneComponent extends cc.Component {
// 生命周期 onLoad
onLoad() {
this.initSceneData();
this.initSize();
}
_imageResList = null;
_audioResList = null;
_animaResList = null;
initSceneData() {
this._imageResList = [];
this._audioResList = [];
this._animaResList = [];
}
_designSize = null; // 设计分辨率
_frameSize = null; // 屏幕分辨率
_mapScaleMin = null; // 场景中常用缩放(取大值)
_mapScaleMax = null; // 场景中常用缩放(取小值)
_cocosScale = null; // cocos 自缩放 (较少用到)
initSize() {
// 注意cc.winSize只有在适配后(修改fitHeight/fitWidth后)才能获取到正确的值,因此使用cc.getFrameSize()来获取初始的屏幕大小
let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height
let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height
let f = screen_size >= design_size
cc.Canvas.instance.fitHeight = f
cc.Canvas.instance.fitWidth = !f
const frameSize = cc.view.getFrameSize();
this._frameSize = frameSize;
this._designSize = cc.view.getDesignResolutionSize();
let sx = cc.winSize.width / frameSize.width;
let sy = cc.winSize.height / frameSize.height;
this._cocosScale = Math.min(sx, sy);
sx = frameSize.width / this._designSize.width;
sy = frameSize.height / this._designSize.height;
this._mapScaleMin = Math.min(sx, sy) * this._cocosScale;
this._mapScaleMax = Math.max(sx, sy) * this._cocosScale;
cc.director['_scene'].width = frameSize.width;
cc.director['_scene'].height = frameSize.height;
}
data = null;
// 生命周期 start
start() {
if (window && (<any>window).courseware && (<any>window).courseware.getData) {
(<any>window).courseware.getData((data) => {
this.log('data:' + data);
this.data = data || this.getDefaultData();
this.data = JSON.parse(JSON.stringify(this.data));
this.preloadItem();
})
} else {
this.data = this.getDefaultData();
this.preloadItem();
}
}
getDefaultData() {
return defaultData;
}
preloadItem() {
this.addPreloadImage();
this.addPreloadAudio();
this.addPreloadAnima();
this.preload();
}
addPreloadImage() {
}
addPreloadAudio() {
}
addPreloadAnima() {
}
preload() {
const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList);
cc.assetManager.loadAny(preloadArr, null, null, (err, data) => {
if (window && window["air"]) {
// window["air"].onCourseInScreen = (next) => {
// window["air"].isCourseInScreen = true;
// this.onLoadEnd();
// next();
// };
this.onLoadEnd();
window["air"].hideAirClassLoading();
} else {
this.onLoadEnd();
}
cc.debug.setDisplayStats(false);
});
}
log (str) {
const node = cc.find('middleLayer');
if(node){
node.getComponent('middleLayer').log(str);
}else{
cc.log(str);
}
}
onLoadEnd() {
}
// ------------------------------------------------
getSprNode(resName) {
const sf = cc.find('Canvas/res/img/' + resName).getComponent(cc.Sprite).spriteFrame;
const node = new cc.Node();
node.addComponent(cc.Sprite).spriteFrame = sf;
return node;
}
getSpriteFrimeByUrl(url, cb) {
cc.loader.load({ url }, (err, img) => {
const spriteFrame = new cc.SpriteFrame(img)
if (cb) {
cb(spriteFrame);
}
})
}
getSprNodeByUrl(url, cb) {
const node = new cc.Node();
const spr = node.addComponent(cc.Sprite);
this.getSpriteFrimeByUrl(url, (sf) => {
spr.spriteFrame = sf;
if (cb) {
cb(node);
}
})
}
playAudioByUrl(audio_url, cb = null) {
if (audio_url) {
cc.assetManager.loadRemote(audio_url, (err, audioClip) => {
const audioId = cc.audioEngine.play(audioClip, false, 0.8);
if (cb) {
cc.audioEngine.setFinishCallback(audioId, () => {
cb();
});
}
});
}
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "f8b451ff-857c-4ca8-9870-866bc5154a29",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).XState={})}(this,(function(t){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var e=function(){return(e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function n(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function r(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function o(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var a={};function s(t){return Object.keys(t)}function c(t,e,n){void 0===n&&(n=".");var r=f(t,n),i=f(e,n);return A(i)?!!A(r)&&i===r:A(r)?r in i:s(r).every((function(t){return t in i&&c(r[t],i[t])}))}function u(t){try{return A(t)||"number"==typeof t?"".concat(t):t.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}}function h(t,e){try{return T(t)?t:t.toString().split(e)}catch(e){throw new Error("'".concat(t,"' is not a valid state path."))}}function f(t,e){return"object"==typeof(n=t)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?t.value:T(t)?l(t):"string"!=typeof t?t:l(h(t,e));var n}function l(t){if(1===t.length)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function d(t,e){for(var n={},r=s(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function p(t,e,n){var i,o,a={};try{for(var c=r(s(t)),u=c.next();!u.done;u=c.next()){var h=u.value,f=t[h];n(f)&&(a[h]=e(f,h,t))}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}return a}var v=function(t){return function(e){var n,i,o=e;try{for(var a=r(t),s=a.next();!s.done;s=a.next()){o=o[s.value]}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o}};function y(t){return t?A(t)?[[t]]:g(s(t).map((function(e){var n=t[e];return"string"==typeof n||n&&Object.keys(n).length?y(t[e]).map((function(t){return[e].concat(t)})):[[e]]}))):[[]]}function g(t){var e;return(e=[]).concat.apply(e,o([],i(t),!1))}function m(t){return T(t)?t:[t]}function S(t){return void 0===t?[]:m(t)}function x(t,e,n){var i,o;if(N(t))return t(e,n.data);var a={};try{for(var s=r(Object.keys(t)),c=s.next();!c.done;c=s.next()){var u=c.value,h=t[u];N(h)?a[u]=h(e,n.data):a[u]=h}}catch(t){i={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a}function w(t){return t instanceof Promise||!(null===t||!N(t)&&"object"!=typeof t||!N(t.then))}function b(t,e){var n,o,a=i([[],[]],2),s=a[0],c=a[1];try{for(var u=r(t),h=u.next();!h.done;h=u.next()){var f=h.value;e(f)?s.push(f):c.push(f)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return[s,c]}function _(t,e){return d(t.states,(function(t,n){if(t){var r=(A(e)?void 0:e[n])||(t?t.current:void 0);if(r)return{current:r,states:_(t,r)}}}))}function E(t,e,n,i){return t?n.reduce((function(t,n){var o,a,c=n.assignment,u={state:i,action:n,_event:e},h={};if(N(c))h=c(t,e.data,u);else try{for(var f=r(s(c)),l=f.next();!l.done;l=f.next()){var d=l.value,p=c[d];h[d]=N(p)?p(t,e.data,u):p}}catch(t){o={error:t}}finally{try{l&&!l.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}return Object.assign({},t,h)}),t):t}function T(t){return Array.isArray(t)}function N(t){return"function"==typeof t}function A(t){return"string"==typeof t}function O(t,e){if(t)return A(t)?{type:"xstate.guard",name:t,predicate:e?e[t]:void 0}:N(t)?{type:"xstate.guard",name:t.name,predicate:t}:t}var P=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function k(t){try{return"__xstatenode"in t}catch(t){return!1}}var I,j,C=function(){var t=0;return function(){return(++t).toString(16)}}();function V(t,n){return A(t)||"number"==typeof t?e({type:t},n):t}function L(t,n){if(!A(t)&&"$$type"in t&&"scxml"===t.$$type)return t;var r=V(t);return e({name:r.type,data:r,$$type:"scxml",type:"external"},n)}function D(t,n){return m(n).map((function(n){return void 0===n||"string"==typeof n||k(n)?{target:n,event:t}:e(e({},n),{event:t})}))}function R(t,e,n,r,i){var o=t.options.guards,a={state:i,cond:e,_event:r};if("xstate.guard"===e.type)return((null==o?void 0:o[e.name])||e.predicate)(n,r.data,a);var s=o[e.type];if(!s)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return s(n,r.data,a)}function M(t){return"string"==typeof t?{type:t}:t}function z(t,e,n){if("object"==typeof t)return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}(I=t.ActionTypes||(t.ActionTypes={})).Start="xstate.start",I.Stop="xstate.stop",I.Raise="xstate.raise",I.Send="xstate.send",I.Cancel="xstate.cancel",I.NullEvent="",I.Assign="xstate.assign",I.After="xstate.after",I.DoneState="done.state",I.DoneInvoke="done.invoke",I.Log="xstate.log",I.Init="xstate.init",I.Invoke="xstate.invoke",I.ErrorExecution="error.execution",I.ErrorCommunication="error.communication",I.ErrorPlatform="error.platform",I.ErrorCustom="xstate.error",I.Update="xstate.update",I.Pure="xstate.pure",I.Choose="xstate.choose",(j=t.SpecialTargets||(t.SpecialTargets={})).Parent="#_parent",j.Internal="#_internal";var F=function(t){return"atomic"===t.type||"final"===t.type};function U(t){return s(t.states).map((function(e){return t.states[e]}))}function B(t){var e=[t];return F(t)?e:e.concat(g(U(t).map(B)))}function J(t,e){var n,i,o,a,s,c,u,h,f=q(new Set(t)),l=new Set(e);try{for(var d=r(l),p=d.next();!p.done;p=d.next())for(var v=(E=p.value).parent;v&&!l.has(v);)l.add(v),v=v.parent}catch(t){n={error:t}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}var y=q(l);try{for(var g=r(l),m=g.next();!m.done;m=g.next()){if("compound"!==(E=m.value).type||y.get(E)&&y.get(E).length){if("parallel"===E.type)try{for(var S=(s=void 0,r(U(E))),x=S.next();!x.done;x=S.next()){var w=x.value;"history"!==w.type&&(l.has(w)||(l.add(w),f.get(w)?f.get(w).forEach((function(t){return l.add(t)})):w.initialStateNodes.forEach((function(t){return l.add(t)}))))}}catch(t){s={error:t}}finally{try{x&&!x.done&&(c=S.return)&&c.call(S)}finally{if(s)throw s.error}}}else f.get(E)?f.get(E).forEach((function(t){return l.add(t)})):E.initialStateNodes.forEach((function(t){return l.add(t)}))}}catch(t){o={error:t}}finally{try{m&&!m.done&&(a=g.return)&&a.call(g)}finally{if(o)throw o.error}}try{for(var b=r(l),_=b.next();!_.done;_=b.next()){var E;for(v=(E=_.value).parent;v&&!l.has(v);)l.add(v),v=v.parent}}catch(t){u={error:t}}finally{try{_&&!_.done&&(h=b.return)&&h.call(b)}finally{if(u)throw u.error}}return l}function q(t){var e,n,i=new Map;try{for(var o=r(t),a=o.next();!a.done;a=o.next()){var s=a.value;i.has(s)||i.set(s,[]),s.parent&&(i.has(s.parent)||i.set(s.parent,[]),i.get(s.parent).push(s))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return i}function $(t,e){return function t(e,n){var r=n.get(e);if(!r)return{};if("compound"===e.type){var i=r[0];if(!i)return{};if(F(i))return i.key}var o={};return r.forEach((function(e){o[e.key]=t(e,n)})),o}(t,q(J([t],e)))}function X(t,e){return Array.isArray(t)?t.some((function(t){return t===e})):t instanceof Set&&t.has(e)}function H(t,e){return"compound"===e.type?U(e).some((function(e){return"final"===e.type&&X(t,e)})):"parallel"===e.type&&U(e).every((function(e){return H(t,e)}))}function G(t){return new Set(g(t.map((function(t){return t.tags}))))}var K=t.ActionTypes.Start,Q=t.ActionTypes.Stop,W=t.ActionTypes.Raise,Y=t.ActionTypes.Send,Z=t.ActionTypes.Cancel,tt=t.ActionTypes.NullEvent,et=t.ActionTypes.Assign,nt=(t.ActionTypes.After,t.ActionTypes.DoneState,t.ActionTypes.Log),rt=t.ActionTypes.Init,it=t.ActionTypes.Invoke,ot=(t.ActionTypes.ErrorExecution,t.ActionTypes.ErrorPlatform),at=t.ActionTypes.ErrorCustom,st=t.ActionTypes.Update,ct=t.ActionTypes.Choose,ut=t.ActionTypes.Pure,ht=L({type:rt});function ft(t,e){return e&&e[t]||void 0}function lt(t,n){var r;if(A(t)||"number"==typeof t)r=N(i=ft(t,n))?{type:t,exec:i}:i||{type:t,exec:void 0};else if(N(t))r={type:t.name||t.toString(),exec:t};else{var i;if(N(i=ft(t.type,n)))r=e(e({},t),{exec:i});else if(i){var o=i.type||t.type;r=e(e(e({},i),t),{type:o})}else r=t}return r}var dt=function(t,e){return t?(T(t)?t:[t]).map((function(t){return lt(t,e)})):[]};function pt(t){var n=lt(t);return e(e({id:A(t)?t:n.id},n),{type:n.type})}function vt(e){return A(e)?{type:W,event:e}:yt(e,{to:t.SpecialTargets.Internal})}function yt(t,e){return{to:e?e.to:void 0,type:Y,event:N(t)?t:V(t),delay:e?e.delay:void 0,id:e&&void 0!==e.id?e.id:N(t)?t.name:u(t)}}function gt(n,r){return yt(n,e(e({},r),{to:t.SpecialTargets.Parent}))}function mt(){return gt(st)}var St=function(t,e){return{context:t,event:e}};var xt=function(t){return{type:Z,sendId:t}};function wt(e){var n=pt(e);return{type:t.ActionTypes.Start,activity:n,exec:void 0}}function bt(e){var n=N(e)?e:pt(e);return{type:t.ActionTypes.Stop,activity:n,exec:void 0}}var _t=function(t){return{type:et,assignment:t}};function Et(e,n){var r=n?"#".concat(n):"";return"".concat(t.ActionTypes.After,"(").concat(e,")").concat(r)}function Tt(e,n){var r="".concat(t.ActionTypes.DoneState,".").concat(e),i={type:r,data:n,toString:function(){return r}};return i}function Nt(e,n){var r="".concat(t.ActionTypes.DoneInvoke,".").concat(e),i={type:r,data:n,toString:function(){return r}};return i}function At(e,n){var r="".concat(t.ActionTypes.ErrorPlatform,".").concat(e),i={type:r,data:n,toString:function(){return r}};return i}function Ot(t,n){return yt((function(t,e){return e}),e(e({},n),{to:t}))}function Pt(n,r,a,s,c,u){void 0===u&&(u=!1);var h=i(u?[[],c]:b(c,(function(t){return t.type===et})),2),f=h[0],l=h[1],d=f.length?E(a,s,f,r):a,p=u?[a]:void 0;return[g(l.map((function(a){var c;switch(a.type){case W:return{type:W,_event:L(a.event)};case Y:return function(t,n,r,i){var o,a={_event:r},s=L(N(t.event)?t.event(n,r.data,a):t.event);if(A(t.delay)){var c=i&&i[t.delay];o=N(c)?c(n,r.data,a):c}else o=N(t.delay)?t.delay(n,r.data,a):t.delay;var u=N(t.to)?t.to(n,r.data,a):t.to;return e(e({},t),{to:u,_event:s,event:s.data,delay:o})}(a,d,s,n.options.delays);case nt:return function(t,n,r){return e(e({},t),{value:A(t.expr)?t.expr:t.expr(n,r.data,{_event:r})})}(a,d,s);case ct:if(!(v=null===(c=a.conds.find((function(t){var e=O(t.cond,n.options.guards);return!e||R(n,e,d,s,r)})))||void 0===c?void 0:c.actions))return[];var h=i(Pt(n,r,d,s,dt(S(v),n.options.actions),u),2),f=h[0],l=h[1];return d=l,null==p||p.push(d),f;case ut:var v;if(!(v=a.get(d,s.data)))return[];var y=i(Pt(n,r,d,s,dt(S(v),n.options.actions),u),2),g=y[0],m=y[1];return d=m,null==p||p.push(d),g;case Q:return function(e,n,r){var i=N(e.activity)?e.activity(n,r.data):e.activity,o="string"==typeof i?{id:i}:i;return{type:t.ActionTypes.Stop,activity:o}}(a,d,s);case et:d=E(d,s,[a],r),null==p||p.push(d);break;default:var x=lt(a,n.options.actions),w=x.exec;if(w&&p){var b=p.length-1;x=e(e({},x),{exec:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];w.apply(void 0,o([p[b]],i(e),!1))}})}return x}})).filter((function(t){return!!t}))),d]}var kt=function(){function t(t){var e,n,r=this;this.actions=[],this.activities=a,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||a,this.meta=(void 0===(n=t.configuration)&&(n=[]),n.reduce((function(t,e){return void 0!==e.meta&&(t[e.id]=e.meta),t}),{})),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=null!==(e=Array.isArray(t.tags)?new Set(t.tags):t.tags)&&void 0!==e?e:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(t){return o([],i(new Set(g(o([],i(t.map((function(t){return t.ownEvents}))),!1)))),!1)}(r.configuration)}})}return t.from=function(e,n){return e instanceof t?e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):e:new t({value:e,context:n,_event:ht,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=ht;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(t,e){var n=this;if(void 0===t&&(t=this.value),void 0===e&&(e="."),A(t))return[t];var r=s(t);return r.concat.apply(r,o([],i(r.map((function(r){return n.toStrings(t[r],e).map((function(t){return r+e+t}))}))),!1))},t.prototype.toJSON=function(){var t=this,r=(t.configuration,t.transitions,t.tags),i=(t.machine,n(t,["configuration","transitions","tags","machine"]));return e(e({},i),{tags:Array.from(r)})},t.prototype.matches=function(t){return c(t,this.value)},t.prototype.hasTag=function(t){return this.tags.has(t)},t.prototype.can=function(t){var e;return this.machine,!!(null===(e=this.machine)||void 0===e?void 0:e.transition(this,t).changed)},t}(),It=[],jt=function(t,e){It.push(t);var n=e(t);return It.pop(),n};function Ct(t){return{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}}}function Vt(t,e,n){var r=Ct(e);if(r.deferred=!0,k(t)){var i=r.state=jt(void 0,(function(){return(n?t.withContext(n):t).initialState}));r.getSnapshot=function(){return i}}return r}function Lt(t){if("string"==typeof t){var e={type:t,toString:function(){return t}};return e}return t}function Dt(t){return e(e({type:it},t),{toJSON:function(){t.onDone,t.onError;var r=n(t,["onDone","onError"]);return e(e({},r),{type:it,src:Lt(t.src)})}})}var Rt={},Mt=function(t){return"#"===t[0]},zt=function(){function a(t,n,c){var u,h=this;void 0===c&&(c="context"in t?t.context:void 0),this.config=t,this._context=c,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=this.options._parent,this.key=this.config.key||this.options._key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||o([this.machine.key],i(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&s(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(u=this.config.schema)&&void 0!==u?u:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?d(this.config.states,(function(t,n){var r,i=new a(t,{_parent:h,_key:n});return Object.assign(h.idMap,e(((r={})[i.id]=i,r),i.idMap)),i})):Rt;var f=0;!function t(e){var n,i;e.order=f++;try{for(var o=r(U(e)),a=o.next();!a.done;a=o.next()){t(a.value)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(t){return""===t.event})):""in this.config.on),this.strict=!!this.config.strict,this.onEntry=S(this.config.entry||this.config.onEntry).map((function(t){return lt(t)})),this.onExit=S(this.config.exit||this.config.onExit).map((function(t){return lt(t)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=S(this.config.invoke).map((function(t,n){var r,i;if(k(t))return h.machine.options.services=e(((r={})[t.id]=t,r),h.machine.options.services),Dt({src:t.id,id:t.id});if(A(t.src))return Dt(e(e({},t),{id:t.id||t.src,src:t.src}));if(k(t.src)||N(t.src)){var o="".concat(h.id,":invocation[").concat(n,"]");return h.machine.options.services=e(((i={})[o]=t.src,i),h.machine.options.services),Dt(e(e({id:o},t),{src:o}))}var a=t.src;return Dt(e(e({id:a.type},t),{src:a}))})),this.activities=S(this.config.activities).concat(this.invoke).map((function(t){return pt(t)})),this.transition=this.transition.bind(this),this.tags=S(this.config.tags)}return a.prototype._init=function(){this.__cache.transitions||B(this).forEach((function(t){return t.on}))},a.prototype.withConfig=function(t,n){var r=this.options,i=r.actions,o=r.activities,s=r.guards,c=r.services,u=r.delays;return new a(this.config,{actions:e(e({},i),t.actions),activities:e(e({},o),t.activities),guards:e(e({},s),t.guards),services:e(e({},c),t.services),delays:e(e({},u),t.delays)},null!=n?n:this.context)},a.prototype.withContext=function(t){return new a(this.config,this.options,t)},Object.defineProperty(a.prototype,"context",{get:function(){return N(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:d(this.states,(function(t){return t.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),a.prototype.toJSON=function(){return this.definition},Object.defineProperty(a.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce((function(t,e){return t[e.eventType]=t[e.eventType]||[],t[e.eventType].push(e),t}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),a.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var e=""===t,n=this.transitions.filter((function(n){var r=n.eventType===t;return e?r:r||"*"===n.eventType}));return this.__cache.candidates[t]=n,n},a.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var r=function(e,n){var r=Et(N(e)?"".concat(t.id,":delay[").concat(n,"]"):e,t.id);return t.onEntry.push(yt(r,{delay:e})),t.onExit.push(xt(r)),r};return(T(n)?n.map((function(t,n){var i=r(t.delay,n);return e(e({},t),{event:i})})):g(s(n).map((function(t,i){var o=n[t],a=A(o)?{target:o}:o,s=isNaN(+t)?t:+t,c=r(s,i);return S(a).map((function(t){return e(e({},t),{event:c,delay:s})}))})))).map((function(n){var r=n.delay;return e(e({},t.formatTransition(n)),{delay:r})}))},a.prototype.getStateNodes=function(t){var e,n=this;if(!t)return[];var r=t instanceof kt?t.value:f(t,this.delimiter);if(A(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((e={})[r]=i,e)):[this,this.states[r]]}var o=s(r),a=o.map((function(t){return n.getStateNode(t)}));return a.push(this),a.concat(o.reduce((function(t,e){var i=n.getStateNode(e).getStateNodes(r[e]);return t.concat(i)}),[]))},a.prototype.handles=function(t){var e=u(t);return this.events.includes(e)},a.prototype.resolveState=function(t){var n=Array.from(J([],this.getStateNodes(t.value)));return new kt(e(e({},t),{value:this.resolve(t.value),configuration:n,done:H(n,this),tags:G(n)}))},a.prototype.transitionLeafNode=function(t,e,n){var r=this.getStateNode(t).next(e,n);return r&&r.transitions.length?r:this.next(e,n)},a.prototype.transitionCompoundNode=function(t,e,n){var r=s(t),i=this.getStateNode(r[0])._transition(t[r[0]],e,n);return i&&i.transitions.length?i:this.next(e,n)},a.prototype.transitionParallelNode=function(t,e,n){var i,o,a={};try{for(var c=r(s(t)),u=c.next();!u.done;u=c.next()){var h=u.value,f=t[h];if(f){var l=this.getStateNode(h)._transition(f,e,n);l&&(a[h]=l)}}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}var d=s(a).map((function(t){return a[t]})),p=g(d.map((function(t){return t.transitions})));if(!d.some((function(t){return t.transitions.length>0})))return this.next(e,n);var v=g(d.map((function(t){return t.entrySet}))),y=g(s(a).map((function(t){return a[t].configuration})));return{transitions:p,entrySet:v,exitSet:g(d.map((function(t){return t.exitSet}))),configuration:y,source:e,actions:g(s(a).map((function(t){return a[t].actions})))}},a.prototype._transition=function(t,e,n){return A(t)?this.transitionLeafNode(t,e,n):1===s(t).length?this.transitionCompoundNode(t,e,n):this.transitionParallelNode(t,e,n)},a.prototype.next=function(t,e){var n,a,s,u=this,h=e.name,l=[],d=[];try{for(var p=r(this.getCandidates(h)),y=p.next();!y.done;y=p.next()){var m=y.value,S=m.cond,x=m.in,w=t.context,b=!x||(A(x)&&Mt(x)?t.matches(f(this.getStateNodeById(x).path,this.delimiter)):c(f(x,this.delimiter),v(this.path.slice(0,-2))(t.value))),_=!1;try{_=!S||R(this.machine,S,w,e,t)}catch(t){throw new Error("Unable to evaluate guard '".concat(S.name||S.type,"' in transition for event '").concat(h,"' in state node '").concat(this.id,"':\n").concat(t.message))}if(_&&b){void 0!==m.target&&(d=m.target),l.push.apply(l,o([],i(m.actions),!1)),s=m;break}}}catch(t){n={error:t}}finally{try{y&&!y.done&&(a=p.return)&&a.call(p)}finally{if(n)throw n.error}}if(s){if(!d.length)return{transitions:[s],entrySet:[],exitSet:[],configuration:t.value?[this]:[],source:t,actions:l};var E=g(d.map((function(e){return u.getRelativeStateNodes(e,t.historyValue)}))),T=!!s.internal;return{transitions:[s],entrySet:T?[]:g(E.map((function(t){return u.nodesFromChild(t)}))),exitSet:T?[]:[this],configuration:E,source:t,actions:l}}},a.prototype.nodesFromChild=function(t){if(t.escapes(this))return[];for(var e=[],n=t;n&&n!==this;)e.push(n),n=n.parent;return e.push(this),e},a.prototype.escapes=function(t){if(this===t)return!1;for(var e=this.parent;e;){if(e===t)return!1;e=e.parent}return!0},a.prototype.getActions=function(t,e,n,a){var s,c,u,h,f=J([],a?this.getStateNodes(a.value):[this]),l=t.configuration.length?J(f,t.configuration):f;try{for(var d=r(l),p=d.next();!p.done;p=d.next()){X(f,m=p.value)||t.entrySet.push(m)}}catch(t){s={error:t}}finally{try{p&&!p.done&&(c=d.return)&&c.call(d)}finally{if(s)throw s.error}}try{for(var v=r(f),y=v.next();!y.done;y=v.next()){var m;X(l,m=y.value)&&!X(t.exitSet,m.parent)||t.exitSet.push(m)}}catch(t){u={error:t}}finally{try{y&&!y.done&&(h=v.return)&&h.call(v)}finally{if(u)throw u.error}}t.source||(t.exitSet=[],t.entrySet.push(this));var S=g(t.entrySet.map((function(r){var i=[];if("final"!==r.type)return i;var o=r.parent;if(!o.parent)return i;i.push(Tt(r.id,r.doneData),Tt(o.id,r.doneData?x(r.doneData,e,n):void 0));var a=o.parent;return"parallel"===a.type&&U(a).every((function(e){return H(t.configuration,e)}))&&i.push(Tt(a.id)),i})));t.exitSet.sort((function(t,e){return e.order-t.order})),t.entrySet.sort((function(t,e){return t.order-e.order}));var w=new Set(t.entrySet),b=new Set(t.exitSet),_=i([g(Array.from(w).map((function(t){return o(o([],i(t.activities.map((function(t){return wt(t)}))),!1),i(t.onEntry),!1)}))).concat(S.map(vt)),g(Array.from(b).map((function(t){return o(o([],i(t.onExit),!1),i(t.activities.map((function(t){return bt(t)}))),!1)})))],2),E=_[0],T=_[1];return dt(T.concat(t.actions).concat(E),this.machine.options.actions)},a.prototype.transition=function(t,e,n){void 0===t&&(t=this.initialState);var r,a,s=L(e);if(t instanceof kt)r=void 0===n?t:this.resolveState(kt.from(t,n));else{var c=A(t)?this.resolve(l(this.getResolvedPath(t))):this.resolve(t),u=null!=n?n:this.machine.context;r=this.resolveState(kt.from(c,u))}if(this.strict&&!this.events.includes(s.name)&&(a=s.name,!/^(done|error)\./.test(a)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var h=this._transition(r.value,r,s)||{transitions:[],configuration:[],entrySet:[],exitSet:[],source:r,actions:[]},f=J([],this.getStateNodes(r.value)),d=h.configuration.length?J(f,h.configuration):f;return h.configuration=o([],i(d),!1),this.resolveTransition(h,r,s)},a.prototype.resolveRaisedTransition=function(t,e,n){var r,a=t.actions;return(t=this.transition(t,e))._event=n,t.event=n.data,(r=t.actions).unshift.apply(r,o([],i(a),!1)),t},a.prototype.resolveTransition=function(n,o,a,c){var u,h,f=this;void 0===a&&(a=ht),void 0===c&&(c=this.machine.context);var l=n.configuration,d=!o||n.transitions.length>0,p=d?$(this.machine,l):void 0,v=o?o.historyValue?o.historyValue:n.source?this.machine.historyValue(o.value):void 0:void 0,y=o?o.context:c,g=this.getActions(n,y,a,o),m=o?e({},o.activities):{};try{for(var S=r(g),w=S.next();!w.done;w=S.next()){var E=w.value;E.type===K?m[E.activity.id||E.activity.type]=E:E.type===Q&&(m[E.activity.id||E.activity.type]=!1)}}catch(t){u={error:t}}finally{try{w&&!w.done&&(h=S.return)&&h.call(S)}finally{if(u)throw u.error}}var T,N,O=i(Pt(this,o,y,a,g,this.machine.config.preserveActionOrder),2),P=O[0],k=O[1],I=i(b(P,(function(e){return e.type===W||e.type===Y&&e.to===t.SpecialTargets.Internal})),2),j=I[0],C=I[1],V=P.filter((function(t){var e;return t.type===K&&(null===(e=t.activity)||void 0===e?void 0:e.type)===it})).reduce((function(t,e){return t[e.activity.id]=function(t,e,n,r){var i,o=M(t.src),a=null===(i=null==e?void 0:e.options.services)||void 0===i?void 0:i[o.type],s=t.data?x(t.data,n,r):void 0,c=a?Vt(a,t.id,s):Ct(t.id);return c.meta=t,c}(e.activity,f.machine,k,a),t}),o?e({},o.children):{}),L=p?n.configuration:o?o.configuration:[],D=H(L,this),R=new kt({value:p||o.value,context:k,_event:a,_sessionid:o?o._sessionid:null,historyValue:p?v?(T=v,N=p,{current:N,states:_(T,N)}):void 0:o?o.historyValue:void 0,history:!p||n.source?o:void 0,actions:p?C:[],activities:p?m:o?o.activities:{},events:[],configuration:L,transitions:n.transitions,children:V,done:D,tags:null==o?void 0:o.tags,machine:this}),z=y!==k;R.changed=a.name===st||z;var F=R.history;F&&delete F.history;var U=!D&&(this._transient||l.some((function(t){return t._transient})));if(!(d||U&&""!==a.name))return R;var B=R;if(!D)for(U&&(B=this.resolveRaisedTransition(B,{type:tt},a));j.length;){var J=j.shift();B=this.resolveRaisedTransition(B,J._event,a)}var q=B.changed||(F?!!B.actions.length||z||typeof F.value!=typeof B.value||!function t(e,n){if(e===n)return!0;if(void 0===e||void 0===n)return!1;if(A(e)||A(n))return e===n;var r=s(e),i=s(n);return r.length===i.length&&r.every((function(r){return t(e[r],n[r])}))}(B.value,F.value):void 0);return B.changed=q,B.history=F,B.tags=G(B.configuration),B},a.prototype.getStateNode=function(t){if(Mt(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var e=this.states[t];if(!e)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return e},a.prototype.getStateNodeById=function(t){var e=Mt(t)?t.slice("#".length):t;if(e===this.id)return this;var n=this.machine.idMap[e];if(!n)throw new Error("Child state node '#".concat(e,"' does not exist on machine '").concat(this.id,"'"));return n},a.prototype.getStateNodeByPath=function(t){if("string"==typeof t&&Mt(t))try{return this.getStateNodeById(t.slice(1))}catch(t){}for(var e=h(t,this.delimiter).slice(),n=this;e.length;){var r=e.shift();if(!r.length)break;n=n.getStateNode(r)}return n},a.prototype.resolve=function(t){var e,n=this;if(!t)return this.initialStateValue||Rt;switch(this.type){case"parallel":return d(this.initialStateValue,(function(e,r){return e?n.getStateNode(r).resolve(t[r]||e):Rt}));case"compound":if(A(t)){var r=this.getStateNode(t);return"parallel"===r.type||"compound"===r.type?((e={})[t]=r.initialStateValue,e):t}return s(t).length?d(t,(function(t,e){return t?n.getStateNode(e).resolve(t):Rt})):this.initialStateValue||{};default:return t||Rt}},a.prototype.getResolvedPath=function(t){if(Mt(t)){var e=this.machine.idMap[t.slice("#".length)];if(!e)throw new Error("Unable to find state node '".concat(t,"'"));return e.path}return h(t,this.delimiter)},Object.defineProperty(a.prototype,"initialStateValue",{get:function(){var t,e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)e=p(this.states,(function(t){return t.initialStateValue||Rt}),(function(t){return!("history"===t.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));e=F(this.states[this.initial])?this.initial:((t={})[this.initial]=this.states[this.initial].initialStateValue,t)}else e={};return this.__cache.initialStateValue=e,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),a.prototype.getInitialState=function(t,e){var n=this.getStateNodes(t);return this.resolveTransition({configuration:n,entrySet:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,void 0,e)},Object.defineProperty(a.prototype,"initialState",{get:function(){this._init();var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"target",{get:function(){var t;if("history"===this.type){var e=this.config;t=A(e.target)&&Mt(e.target)?l(this.machine.getStateNodeById(e.target).path.slice(this.path.length-1)):e.target}return t},enumerable:!1,configurable:!0}),a.prototype.getRelativeStateNodes=function(t,e,n){return void 0===n&&(n=!0),n?"history"===t.type?t.resolveHistory(e):t.initialStateNodes:[t]},Object.defineProperty(a.prototype,"initialStateNodes",{get:function(){var t=this;return F(this)?[this]:"compound"!==this.type||this.initial?g(y(this.initialStateValue).map((function(e){return t.getFromRelativePath(e)}))):[this]},enumerable:!1,configurable:!0}),a.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var e=i(t),n=e[0],r=e.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},a.prototype.historyValue=function(t){if(s(this.states).length)return{current:t||this.initialStateValue,states:p(this.states,(function(e,n){if(!t)return e.historyValue();var r=A(t)?void 0:t[n];return e.historyValue(r||e.initialStateValue)}),(function(t){return!t.history}))}},a.prototype.resolveHistory=function(t){var e=this;if("history"!==this.type)return[this];var n=this.parent;if(!t){var i=this.target;return i?g(y(i).map((function(t){return n.getFromRelativePath(t)}))):n.initialStateNodes}var o,a,s=(o=n.path,a="states",function(t){var e,n,i=t;try{for(var s=r(o),c=s.next();!c.done;c=s.next()){var u=c.value;i=i[a][u]}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return i})(t).current;return A(s)?[n.getStateNode(s)]:g(y(s).map((function(t){return"deep"===e.history?n.getFromRelativePath(t):[n.states[t[0]]]})))},Object.defineProperty(a.prototype,"stateIds",{get:function(){var t=this,e=g(s(this.states).map((function(e){return t.states[e].stateIds})));return[this.id].concat(e)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"events",{get:function(){var t,e,n,i;if(this.__cache.events)return this.__cache.events;var o=this.states,a=new Set(this.ownEvents);if(o)try{for(var c=r(s(o)),u=c.next();!u.done;u=c.next()){var h=o[u.value];if(h.states)try{for(var f=(n=void 0,r(h.events)),l=f.next();!l.done;l=f.next()){var d=l.value;a.add("".concat(d))}}catch(t){n={error:t}}finally{try{l&&!l.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter((function(t){return!(!t.target&&!t.actions.length&&t.internal)})).map((function(t){return t.eventType})));return Array.from(t)},enumerable:!1,configurable:!0}),a.prototype.resolveTarget=function(t){var e=this;if(void 0!==t)return t.map((function(t){if(!A(t))return t;var n=t[0]===e.delimiter;if(n&&!e.parent)return e.getStateNodeByPath(t.slice(1));var r=n?e.key+t:t;if(!e.parent)return e.getStateNodeByPath(r);try{return e.parent.getStateNodeByPath(r)}catch(t){throw new Error("Invalid transition definition for state node '".concat(e.id,"':\n").concat(t.message))}}))},a.prototype.formatTransition=function(t){var n=this,r=function(t){if(void 0!==t&&""!==t)return S(t)}(t.target),i="internal"in t?t.internal:!r||r.some((function(t){return A(t)&&t[0]===n.delimiter})),o=this.machine.options.guards,a=this.resolveTarget(r),s=e(e({},t),{actions:dt(S(t.actions)),cond:O(t.cond,o),target:a,source:this,internal:i,eventType:t.event,toJSON:function(){return e(e({},s),{target:s.target?s.target.map((function(t){return"#".concat(t.id)})):void 0,source:"#".concat(n.id)})}});return s},a.prototype.formatTransitions=function(){var t,e,a,c=this;if(this.config.on)if(Array.isArray(this.config.on))a=this.config.on;else{var u=this.config.on,h=u["*"],f=void 0===h?[]:h,l=n(u,["*"]);a=g(s(l).map((function(t){return D(t,l[t])})).concat(D("*",f)))}else a=[];var d=this.config.always?D("",this.config.always):[],p=this.config.onDone?D(String(Tt(this.id)),this.config.onDone):[],v=g(this.invoke.map((function(t){var e=[];return t.onDone&&e.push.apply(e,o([],i(D(String(Nt(t.id)),t.onDone)),!1)),t.onError&&e.push.apply(e,o([],i(D(String(At(t.id)),t.onError)),!1)),e}))),y=this.after,m=g(o(o(o(o([],i(p),!1),i(v),!1),i(a),!1),i(d),!1).map((function(t){return S(t).map((function(t){return c.formatTransition(t)}))})));try{for(var x=r(y),w=x.next();!w.done;w=x.next()){var b=w.value;m.push(b)}}catch(e){t={error:e}}finally{try{w&&!w.done&&(e=x.return)&&e.call(x)}finally{if(t)throw t.error}}return m},a}();var Ft={deferEvents:!1},Ut=function(){function t(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=e(e({},Ft),t)}return t.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},t.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},t.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},t}(),Bt=new Map,Jt=0,qt=function(){return"x:".concat(Jt++)},$t=function(t,e){return Bt.set(t,e),t},Xt=function(t){return Bt.get(t)},Ht=function(t){Bt.delete(t)};function Gt(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}function Kt(t){if(Gt()){var e=function(){var t=Gt();if(t&&"__xstate__"in t)return t.__xstate__}();e&&e.register(t)}}function Qt(t,n){void 0===n&&(n={});var r,i=t.initialState,o=new Set,a=[],s=!1,c=(r={id:n.id,send:function(e){a.push(e),function(){if(!s){for(s=!0;a.length>0;){var e=a.shift();i=t.transition(i,e,u),o.forEach((function(t){return t.next(i)}))}s=!1}}()},getSnapshot:function(){return i},subscribe:function(t,e,n){var r=z(t,e,n);return o.add(r),r.next(i),{unsubscribe:function(){o.delete(r)}}}},e({subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},r)),u={parent:n.parent,self:c,id:n.id||"anonymous",observers:o};return i=t.start?t.start(u):i,c}var Wt,Yt={sync:!1,autoForward:!1};(Wt=t.InterpreterStatus||(t.InterpreterStatus={}))[Wt.NotStarted=0]="NotStarted",Wt[Wt.Running=1]="Running",Wt[Wt.Stopped=2]="Stopped";var Zt=function(){function n(r,i){var o=this;void 0===i&&(i=n.defaultOptions),this.machine=r,this.scheduler=new Ut,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=t.InterpreterStatus.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(e,n){if(T(e))return o.batch(e),o.state;var r=L(V(e,n));if(o.status===t.InterpreterStatus.Stopped)return o.state;if(o.status!==t.InterpreterStatus.Running&&!o.options.deferEvents)throw new Error('Event "'.concat(r.name,'" was sent to uninitialized service "').concat(o.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(r.data)));return o.scheduler.schedule((function(){o.forward(r);var t=o.nextState(r);o.update(t,r)})),o._state},this.sendTo=function(n,r){var i,a=o.parent&&(r===t.SpecialTargets.Parent||o.parent.id===r),s=a?o.parent:A(r)?o.children.get(r)||Xt(r):(i=r)&&"function"==typeof i.send?r:void 0;if(s)"machine"in s?s.send(e(e({},n),{name:n.name===at?"".concat(At(o.id)):n.name,origin:o.sessionId})):s.send(n.data);else if(!a)throw new Error("Unable to send event to child '".concat(r,"' from service '").concat(o.id,"'."))};var a=e(e({},n.defaultOptions),i),s=a.clock,c=a.logger,u=a.parent,h=a.id,f=void 0!==h?h:r.id;this.id=f,this.logger=c,this.clock=s,this.parent=u,this.options=a,this.scheduler=new Ut({deferEvents:this.options.deferEvents}),this.sessionId=qt()}return Object.defineProperty(n.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:jt(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),n.prototype.execute=function(t,e){var n,i;try{for(var o=r(t.actions),a=o.next();!a.done;a=o.next()){var s=a.value;this.exec(s,t,e)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},n.prototype.update=function(t,e){var n,i,o,a,s,c,u,h,f=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){f.state.children[t.id]=t})),this.devTools&&this.devTools.send(e.data,t),t.event)try{for(var l=r(this.eventListeners),d=l.next();!d.done;d=l.next()){(0,d.value)(t.event)}}catch(t){n={error:t}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}try{for(var p=r(this.listeners),v=p.next();!v.done;v=p.next()){(0,v.value)(t,t.event)}}catch(t){o={error:t}}finally{try{v&&!v.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}try{for(var y=r(this.contextListeners),g=y.next();!g.done;g=y.next()){(0,g.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(t){s={error:t}}finally{try{g&&!g.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}var m=H(t.configuration||[],this.machine);if(this.state.configuration&&m){var S=t.configuration.find((function(t){return"final"===t.type&&t.parent===f.machine})),w=S&&S.doneData?x(S.doneData,t.context,e):void 0;try{for(var b=r(this.doneListeners),_=b.next();!_.done;_=b.next()){(0,_.value)(Nt(this.id,w))}}catch(t){u={error:t}}finally{try{_&&!_.done&&(h=b.return)&&h.call(b)}finally{if(u)throw u.error}}this.stop()}},n.prototype.onTransition=function(e){return this.listeners.add(e),this.status===t.InterpreterStatus.Running&&e(this.state,this.state.event),this},n.prototype.subscribe=function(e,n,r){var i,o=this;if(!e)return{unsubscribe:function(){}};var a=r;return"function"==typeof e?i=e:(i=e.next.bind(e),a=e.complete.bind(e)),this.listeners.add(i),this.status===t.InterpreterStatus.Running&&i(this.state),a&&this.onDone(a),{unsubscribe:function(){i&&o.listeners.delete(i),a&&o.doneListeners.delete(a)}}},n.prototype.onEvent=function(t){return this.eventListeners.add(t),this},n.prototype.onSend=function(t){return this.sendListeners.add(t),this},n.prototype.onChange=function(t){return this.contextListeners.add(t),this},n.prototype.onStop=function(t){return this.stopListeners.add(t),this},n.prototype.onDone=function(t){return this.doneListeners.add(t),this},n.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},n.prototype.start=function(e){var n=this;if(this.status===t.InterpreterStatus.Running)return this;$t(this.sessionId,this),this.initialized=!0,this.status=t.InterpreterStatus.Running;var r=void 0===e?this.initialState:jt(this,(function(){return!A(t=e)&&"value"in t&&"history"in t?n.machine.resolveState(e):n.machine.resolveState(kt.from(e,n.machine.context));var t}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){n.update(r,ht)})),this},n.prototype.stop=function(){var e,n,i,o,a,c,u,h,f,l,d=this;try{for(var p=r(this.listeners),v=p.next();!v.done;v=p.next()){var y=v.value;this.listeners.delete(y)}}catch(t){e={error:t}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(e)throw e.error}}try{for(var g=r(this.stopListeners),m=g.next();!m.done;m=g.next()){(y=m.value)(),this.stopListeners.delete(y)}}catch(t){i={error:t}}finally{try{m&&!m.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}try{for(var S=r(this.contextListeners),x=S.next();!x.done;x=S.next()){y=x.value;this.contextListeners.delete(y)}}catch(t){a={error:t}}finally{try{x&&!x.done&&(c=S.return)&&c.call(S)}finally{if(a)throw a.error}}try{for(var w=r(this.doneListeners),b=w.next();!b.done;b=w.next()){y=b.value;this.doneListeners.delete(y)}}catch(t){u={error:t}}finally{try{b&&!b.done&&(h=w.return)&&h.call(w)}finally{if(u)throw u.error}}if(!this.initialized)return this;this.state.configuration.forEach((function(t){var e,n;try{for(var i=r(t.definition.exit),o=i.next();!o.done;o=i.next()){var a=o.value;d.exec(a,d.state)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}})),this.children.forEach((function(t){N(t.stop)&&t.stop()}));try{for(var _=r(s(this.delayedEventsMap)),E=_.next();!E.done;E=_.next()){var T=E.value;this.clock.clearTimeout(this.delayedEventsMap[T])}}catch(t){f={error:t}}finally{try{E&&!E.done&&(l=_.return)&&l.call(_)}finally{if(f)throw f.error}}return this.scheduler.clear(),this.initialized=!1,this.status=t.InterpreterStatus.Stopped,Ht(this.sessionId),this},n.prototype.batch=function(n){var a=this;if(this.status===t.InterpreterStatus.NotStarted&&this.options.deferEvents);else if(this.status!==t.InterpreterStatus.Running)throw new Error("".concat(n.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));this.scheduler.schedule((function(){var t,s,c=a.state,u=!1,h=[],f=function(t){var n=L(t);a.forward(n),c=jt(a,(function(){return a.machine.transition(c,n)})),h.push.apply(h,o([],i(c.actions.map((function(t){return r=c,i=(n=t).exec,e(e({},n),{exec:void 0!==i?function(){return i(r.context,r.event,{action:n,state:r,_event:r._event})}:void 0});var n,r,i}))),!1)),u=u||!!c.changed};try{for(var l=r(n),d=l.next();!d.done;d=l.next()){f(d.value)}}catch(e){t={error:e}}finally{try{d&&!d.done&&(s=l.return)&&s.call(l)}finally{if(t)throw t.error}}c.changed=u,c.actions=h,a.update(c,L(n[n.length-1]))}))},n.prototype.sender=function(t){return this.send.bind(this,t)},n.prototype.nextState=function(t){var e=this,n=L(t);if(0===n.name.indexOf(ot)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(ot)})))throw n.data.data;return jt(this,(function(){return e.machine.transition(e.state,n)}))},n.prototype.forward=function(t){var e,n;try{for(var i=r(this.forwardTo),o=i.next();!o.done;o=i.next()){var a=o.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},n.prototype.defer=function(t){var e=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?e.sendTo(t._event,t.to):e.send(t._event)}),t.delay)},n.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},n.prototype.exec=function(e,n,r){void 0===r&&(r=this.machine.options.actions);var i=n.context,o=n._event,a=e.exec||ft(e.type,r),s=N(a)?a:a?a.exec:e.exec;if(s)try{return s(i,o.data,{action:e,state:this.state,_event:o})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(e.type){case Y:var c=e;if("number"==typeof c.delay)return void this.defer(c);c.to?this.sendTo(c._event,c.to):this.send(c._event);break;case Z:this.cancel(e.sendId);break;case K:var u=e.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===t.ActionTypes.Invoke){var h=M(u.src),f=this.machine.options.services?this.machine.options.services[h.type]:void 0,l=u.id,d=u.data,p="autoForward"in u?u.autoForward:!!u.forward;if(!f)return;var v=d?x(d,i,o):void 0;if("string"==typeof f)return;var y=N(f)?f(i,o.data,{data:v,src:h,meta:u.meta}):f;if(!y)return;var g=void 0;k(y)&&(y=v?y.withContext(v):y,g={autoForward:p}),this.spawn(y,l,g)}else this.spawnActivity(u);break;case Q:this.stopChild(e.activity.id);break;case nt:var m=e.label,S=e.value;m?this.logger(m,S):this.logger(S)}},n.prototype.removeChild=function(t){var e;this.children.delete(t),this.forwardTo.delete(t),null===(e=this.state)||void 0===e||delete e.children[t]},n.prototype.stopChild=function(t){var e=this.children.get(t);e&&(this.removeChild(t),N(e.stop)&&e.stop())},n.prototype.spawn=function(t,n,r){if(w(t))return this.spawnPromise(Promise.resolve(t),n);if(N(t))return this.spawnCallback(t,n);if(function(t){try{return"function"==typeof t.send}catch(t){return!1}}(o=t)&&"id"in o)return this.spawnActor(t,n);if(function(t){try{return"subscribe"in t&&N(t.subscribe)}catch(t){return!1}}(t))return this.spawnObservable(t,n);if(k(t))return this.spawnMachine(t,e(e({},r),{id:n}));if(null!==(i=t)&&"object"==typeof i&&"transition"in i&&"function"==typeof i.transition)return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'));var i,o},n.prototype.spawnMachine=function(t,r){var i=this;void 0===r&&(r={});var o=new n(t,e(e({},this.options),{parent:this,id:r.id||t.id})),a=e(e({},Yt),r);a.sync&&o.onTransition((function(t){i.send(st,{state:t,id:o.id})}));var s=o;return this.children.set(o.id,s),a.autoForward&&this.forwardTo.add(o.id),o.onDone((function(t){i.removeChild(o.id),i.send(L(t,{origin:o.id}))})).start(),s},n.prototype.spawnBehavior=function(t,e){var n=Qt(t,{id:e,parent:this});return this.children.set(e,n),n},n.prototype.spawnPromise=function(t,e){var n,r=this,i=!1;t.then((function(t){i||(n=t,r.removeChild(e),r.send(L(Nt(e,t),{origin:e})))}),(function(t){if(!i){r.removeChild(e);var n=At(e,t);try{r.send(L(n,{origin:e}))}catch(t){r.devTools&&r.devTools.send(n,r.state),r.machine.strict&&r.stop()}}}));var o={id:e,send:function(){},subscribe:function(e,n,r){var i=z(e,n,r),o=!1;return t.then((function(t){o||(i.next(t),o||i.complete())}),(function(t){o||i.error(t)})),{unsubscribe:function(){return o=!0}}},stop:function(){i=!0},toJSON:function(){return{id:e}},getSnapshot:function(){return n}};return this.children.set(e,o),o},n.prototype.spawnCallback=function(t,e){var n,r,i=this,o=!1,a=new Set,s=new Set;try{r=t((function(t){n=t,s.forEach((function(e){return e(t)})),o||i.send(L(t,{origin:e}))}),(function(t){a.add(t)}))}catch(t){this.send(At(e,t))}if(w(r))return this.spawnPromise(r,e);var c={id:e,send:function(t){return a.forEach((function(e){return e(t)}))},subscribe:function(t){return s.add(t),{unsubscribe:function(){s.delete(t)}}},stop:function(){o=!0,N(r)&&r()},toJSON:function(){return{id:e}},getSnapshot:function(){return n}};return this.children.set(e,c),c},n.prototype.spawnObservable=function(t,e){var n,r=this,i=t.subscribe((function(t){n=t,r.send(L(t,{origin:e}))}),(function(t){r.removeChild(e),r.send(L(At(e,t),{origin:e}))}),(function(){r.removeChild(e),r.send(L(Nt(e),{origin:e}))})),o={id:e,send:function(){},subscribe:function(e,n,r){return t.subscribe(e,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return n},toJSON:function(){return{id:e}}};return this.children.set(e,o),o},n.prototype.spawnActor=function(t,e){return this.children.set(e,t),t},n.prototype.spawnActivity=function(t){var e=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(e){var n=e(this.state.context,t);this.spawnEffect(t.id,n)}},n.prototype.spawnEffect=function(t,e){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:e||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}})},n.prototype.attachDev=function(){var t=Gt();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(e(e({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},n),{features:e({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}Kt(this)}},n.prototype.toJSON=function(){return{id:this.id}},n.prototype[P]=function(){return this},n.prototype.getSnapshot=function(){return this.status===t.InterpreterStatus.NotStarted?this.initialState:this._state},n.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,e){return setTimeout(t,e)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),n.interpret=te,n}();function te(t,e){return new Zt(t,e)}var ee={raise:vt,send:yt,sendParent:gt,sendUpdate:mt,log:function(t,e){return void 0===t&&(t=St),{type:nt,label:e,expr:t}},cancel:xt,start:wt,stop:bt,assign:_t,after:Et,done:Tt,respond:function(t,n){return yt(t,e(e({},n),{to:function(t,e,n){return n._event.origin}}))},forwardTo:Ot,escalate:function(n,r){return gt((function(t,e,r){return{type:at,data:N(n)?n(t,e,r):n}}),e(e({},r),{to:t.SpecialTargets.Parent}))},choose:function(e){return{type:t.ActionTypes.Choose,conds:e}},pure:function(e){return{type:t.ActionTypes.Pure,get:e}}};t.Interpreter=Zt,t.Machine=function(t,e,n){return void 0===n&&(n=t.context),new zt(t,e,n)},t.State=kt,t.StateNode=zt,t.actions=ee,t.assign=_t,t.createMachine=function(t,e){return new zt(t,e)},t.createSchema=function(t){return t},t.doneInvoke=Nt,t.forwardTo=Ot,t.interpret=te,t.mapState=function(t,e){var n,i,o;try{for(var a=r(s(t)),u=a.next();!u.done;u=a.next()){var h=u.value;c(h,e)&&(!o||e.length>o.length)&&(o=h)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return t[o]},t.matchState=function(t,e,n){var o,a,s=kt.from(t,t instanceof kt?t.context:void 0);try{for(var c=r(e),u=c.next();!u.done;u=c.next()){var h=i(u.value,2),f=h[0],l=h[1];if(s.matches(f))return l(s)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}return n(s)},t.matchesState=c,t.send=yt,t.sendParent=gt,t.sendUpdate=mt,t.spawn=function(t,n){var r=function(t){return A(t)?e(e({},Yt),{name:t}):e(e(e({},Yt),{name:C()}),t)}(n);return function(e){return e?e.spawn(t,r.name,r):Vt(t,r.name)}(It[It.length-1])},Object.defineProperty(t,"__esModule",{value:!0})}));
{
"ver": "1.0.8",
"uuid": "915ea301-b224-43b0-92cc-5f419c9b54c7",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "479b1654-507c-41d0-af5b-94ab3e8a9a0b",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "28faf5f2-3e84-419a-b8e8-404b244e0093",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 868,
"height": 563,
"platformSettings": {},
"subMetas": {
"border": {
"ver": "1.0.4",
"uuid": "afbee15e-e24a-4b66-bf52-fc2b93b889f7",
"rawTextureUuid": "28faf5f2-3e84-419a-b8e8-404b244e0093",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 868,
"height": 563,
"rawWidth": 868,
"rawHeight": 563,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "d2a43719-b9c0-4786-a377-e06638506275",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 107,
"height": 112,
"platformSettings": {},
"subMetas": {
"btn_return": {
"ver": "1.0.4",
"uuid": "406b55f2-73f3-4b9c-96aa-b2f74228116c",
"rawTextureUuid": "d2a43719-b9c0-4786-a377-e06638506275",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 107,
"height": 112,
"rawWidth": 107,
"rawHeight": 112,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "a593d336-7107-41aa-a5e4-40c0b6d06d1e",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "83e23ac7-f58a-46cc-a784-dc66ae97b914",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 720,
"platformSettings": {},
"subMetas": {
"letter_bg": {
"ver": "1.0.4",
"uuid": "daa33286-325e-4e36-8708-53c6bc1d9f69",
"rawTextureUuid": "83e23ac7-f58a-46cc-a784-dc66ae97b914",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 720,
"rawWidth": 1280,
"rawHeight": 720,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "5f742634-87b8-47b6-a153-e2fdb90654b1",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 720,
"platformSettings": {},
"subMetas": {
"letter_bottom": {
"ver": "1.0.4",
"uuid": "fc09251e-4ee2-4073-85da-d72e33f28d4a",
"rawTextureUuid": "5f742634-87b8-47b6-a153-e2fdb90654b1",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 720,
"rawWidth": 1280,
"rawHeight": 720,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "b1ac68ab-9afa-4ebe-a360-2ec117f44e48",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 283,
"height": 273,
"platformSettings": {},
"subMetas": {
"letter_dod": {
"ver": "1.0.4",
"uuid": "09aa8714-1a6e-4cb2-8605-8a5ca174f158",
"rawTextureUuid": "b1ac68ab-9afa-4ebe-a360-2ec117f44e48",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 0,
"trimY": 1,
"width": 283,
"height": 272,
"rawWidth": 283,
"rawHeight": 273,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "fd3aff7f-0d68-479b-963e-dcfb1882b062",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 243,
"height": 225,
"platformSettings": {},
"subMetas": {
"letter_pop": {
"ver": "1.0.4",
"uuid": "97753a55-f898-427f-8c25-64a2d6e909b0",
"rawTextureUuid": "fd3aff7f-0d68-479b-963e-dcfb1882b062",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 0,
"trimY": 1,
"width": 243,
"height": 224,
"rawWidth": 243,
"rawHeight": 225,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a815a093-c860-4384-8103-8eec0d2c71ea",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 329,
"height": 386,
"platformSettings": {},
"subMetas": {
"letter_ror": {
"ver": "1.0.4",
"uuid": "f1e9fd38-d3a2-4e53-8c2e-0b7b9c8f4a61",
"rawTextureUuid": "a815a093-c860-4384-8103-8eec0d2c71ea",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 329,
"height": 386,
"rawWidth": 329,
"rawHeight": 386,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "9c5e7674-ec29-4353-9d41-6449cfb1866f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 282,
"height": 300,
"platformSettings": {},
"subMetas": {
"letter_sos": {
"ver": "1.0.4",
"uuid": "31e4ea16-b681-404b-9654-7edcb6f1a9be",
"rawTextureUuid": "9c5e7674-ec29-4353-9d41-6449cfb1866f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 282,
"height": 300,
"rawWidth": 282,
"rawHeight": 300,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "00cf9cd6-06e8-451e-be1b-02a5e6d8911f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 314,
"height": 164,
"platformSettings": {},
"subMetas": {
"letter_sub": {
"ver": "1.0.4",
"uuid": "72cf4970-3dec-47dc-9716-a38c323119d4",
"rawTextureUuid": "00cf9cd6-06e8-451e-be1b-02a5e6d8911f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 314,
"height": 164,
"rawWidth": 314,
"rawHeight": 164,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "4dc76122-47a9-4e67-b93e-329509dfe291",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "23353a81-1863-44f3-b551-2e5a0d2d17b7",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1268,
"height": 600,
"platformSettings": {},
"subMetas": {
"bg": {
"ver": "1.0.4",
"uuid": "8abb8913-c8f2-4856-88fa-d2195a9d52ba",
"rawTextureUuid": "23353a81-1863-44f3-b551-2e5a0d2d17b7",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1268,
"height": 600,
"rawWidth": 1268,
"rawHeight": 600,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a5db5d56-2185-4662-a8d8-ba6ab6f8eb15",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1034,
"height": 323,
"platformSettings": {},
"subMetas": {
"bg_line": {
"ver": "1.0.4",
"uuid": "750229c2-ec49-4652-81eb-1902807cf53b",
"rawTextureUuid": "a5db5d56-2185-4662-a8d8-ba6ab6f8eb15",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0.5,
"offsetY": -0.5,
"trimX": 1,
"trimY": 1,
"width": 1033,
"height": 322,
"rawWidth": 1034,
"rawHeight": 323,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "6f2b5147-e49c-4458-8010-acb18043b6ba",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 94,
"height": 59,
"platformSettings": {},
"subMetas": {
"hat": {
"ver": "1.0.4",
"uuid": "8695e6d3-64a6-457c-962c-252616530caf",
"rawTextureUuid": "6f2b5147-e49c-4458-8010-acb18043b6ba",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 94,
"height": 59,
"rawWidth": 94,
"rawHeight": 59,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "8a4be07e-ee24-498b-80d0-bb07c89dbf09",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 276,
"height": 272,
"platformSettings": {},
"subMetas": {
"icon_1": {
"ver": "1.0.4",
"uuid": "2cd9c6f4-a1a2-4d33-9e65-2e3c222a42dc",
"rawTextureUuid": "8a4be07e-ee24-498b-80d0-bb07c89dbf09",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -2,
"offsetY": -1,
"trimX": 0,
"trimY": 4,
"width": 272,
"height": 266,
"rawWidth": 276,
"rawHeight": 272,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "149a4061-6144-4c9b-80ba-9c8e020ba6de",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 256,
"height": 241,
"platformSettings": {},
"subMetas": {
"icon_2": {
"ver": "1.0.4",
"uuid": "b292b776-b6d9-4c88-9a48-17955aa90100",
"rawTextureUuid": "149a4061-6144-4c9b-80ba-9c8e020ba6de",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 4,
"trimY": 3,
"width": 248,
"height": 236,
"rawWidth": 256,
"rawHeight": 241,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "5152b609-8e30-4286-bd20-5cb5f833faa9",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 264,
"height": 268,
"platformSettings": {},
"subMetas": {
"icon_3": {
"ver": "1.0.4",
"uuid": "c78de449-76ab-41f7-a89c-2cbb0c73408c",
"rawTextureUuid": "5152b609-8e30-4286-bd20-5cb5f833faa9",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 3,
"trimY": 3,
"width": 258,
"height": 263,
"rawWidth": 264,
"rawHeight": 268,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "d83a940b-794f-4916-8dc7-bbdaf924ecac",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 261,
"height": 238,
"platformSettings": {},
"subMetas": {
"icon_4": {
"ver": "1.0.4",
"uuid": "116bbf15-0244-4b59-9c4b-e25e18fea0ae",
"rawTextureUuid": "d83a940b-794f-4916-8dc7-bbdaf924ecac",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 1,
"offsetY": -0.5,
"trimX": 2,
"trimY": 3,
"width": 259,
"height": 233,
"rawWidth": 261,
"rawHeight": 238,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "4354018f-b765-4cb4-9010-b86b04c2a957",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 290,
"height": 265,
"platformSettings": {},
"subMetas": {
"icon_5": {
"ver": "1.0.4",
"uuid": "28970c22-48f2-49ba-bd4d-8b796f4fc4b5",
"rawTextureUuid": "4354018f-b765-4cb4-9010-b86b04c2a957",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0.5,
"offsetY": -0.5,
"trimX": 4,
"trimY": 3,
"width": 283,
"height": 260,
"rawWidth": 290,
"rawHeight": 265,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "8744e325-352e-4a59-a441-f47e5b3109d8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 338,
"height": 166,
"platformSettings": {},
"subMetas": {
"user": {
"ver": "1.0.4",
"uuid": "ce99e558-bc90-4715-998a-253204ab0d71",
"rawTextureUuid": "8744e325-352e-4a59-a441-f47e5b3109d8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 338,
"height": 166,
"rawWidth": 338,
"rawHeight": 166,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "12cba609-4cc2-4cab-8a95-9768a0f24161",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "1d750c51-6689-4b9f-8076-e1b6e924394a",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 2000,
"height": 1200,
"platformSettings": {},
"subMetas": {
"bg_bg1": {
"ver": "1.0.4",
"uuid": "5182a89f-5b25-435d-9817-d9c9e761f391",
"rawTextureUuid": "1d750c51-6689-4b9f-8076-e1b6e924394a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 2000,
"height": 1200,
"rawWidth": 2000,
"rawHeight": 1200,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "71c9800f-a6e9-4535-a086-64bb58f1a319",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 2000,
"height": 1200,
"platformSettings": {},
"subMetas": {
"bg_bg2": {
"ver": "1.0.4",
"uuid": "8e6efaa7-4f64-481c-aef6-c7635f964f7c",
"rawTextureUuid": "71c9800f-a6e9-4535-a086-64bb58f1a319",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 2000,
"height": 1200,
"rawWidth": 2000,
"rawHeight": 1200,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "693ac76b-1094-4123-a39e-b467a12417c9",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 2000,
"height": 1200,
"platformSettings": {},
"subMetas": {
"bg_bg3": {
"ver": "1.0.4",
"uuid": "6a9a6963-7378-4a1c-931e-b4e6a13f8f92",
"rawTextureUuid": "693ac76b-1094-4123-a39e-b467a12417c9",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 2000,
"height": 1200,
"rawWidth": 2000,
"rawHeight": 1200,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "dbf2c934-fc15-433c-8ca8-f781e92d5537",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 372,
"height": 788,
"platformSettings": {},
"subMetas": {
"bg_unit1": {
"ver": "1.0.4",
"uuid": "b62d4c8b-27bc-4505-b0e7-c53cbed8249c",
"rawTextureUuid": "dbf2c934-fc15-433c-8ca8-f781e92d5537",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 372,
"height": 788,
"rawWidth": 372,
"rawHeight": 788,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "67e97053-2e73-4078-8d9b-3e7abfef38d6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 372,
"height": 788,
"platformSettings": {},
"subMetas": {
"bg_unit2": {
"ver": "1.0.4",
"uuid": "3ad6caeb-e48b-4bdc-a25d-9bf519c19619",
"rawTextureUuid": "67e97053-2e73-4078-8d9b-3e7abfef38d6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -2.5,
"trimX": 0,
"trimY": 5,
"width": 372,
"height": 783,
"rawWidth": 372,
"rawHeight": 788,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "4a677c1a-5829-4b58-83c0-e9d921c21401",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 372,
"height": 788,
"platformSettings": {},
"subMetas": {
"bg_unit3": {
"ver": "1.0.4",
"uuid": "e4139de8-8240-4208-9cb6-2f4956ba60d5",
"rawTextureUuid": "4a677c1a-5829-4b58-83c0-e9d921c21401",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -5,
"trimX": 0,
"trimY": 10,
"width": 372,
"height": 778,
"rawWidth": 372,
"rawHeight": 788,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "744ad42c-c2bb-4fe2-8aa6-7c40495d4691",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 372,
"height": 788,
"platformSettings": {},
"subMetas": {
"bg_unit4": {
"ver": "1.0.4",
"uuid": "88ce7fb1-c319-449d-95cf-292c277fdd65",
"rawTextureUuid": "744ad42c-c2bb-4fe2-8aa6-7c40495d4691",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -5,
"trimX": 0,
"trimY": 10,
"width": 372,
"height": 778,
"rawWidth": 372,
"rawHeight": 788,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "ab76f2fa-42af-4465-bd32-59b2c950cfe0",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 372,
"height": 788,
"platformSettings": {},
"subMetas": {
"bg_unit5": {
"ver": "1.0.4",
"uuid": "11480cd9-00f0-483e-9593-39f74b5754c4",
"rawTextureUuid": "ab76f2fa-42af-4465-bd32-59b2c950cfe0",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -11,
"trimX": 0,
"trimY": 22,
"width": 372,
"height": 766,
"rawWidth": 372,
"rawHeight": 788,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "85da7503-62ce-405c-b5dc-68640ddad0f0",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 372,
"height": 788,
"platformSettings": {},
"subMetas": {
"bg_unit6": {
"ver": "1.0.4",
"uuid": "f8a04347-5924-497a-89f5-f26c8138d646",
"rawTextureUuid": "85da7503-62ce-405c-b5dc-68640ddad0f0",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -9.5,
"trimX": 0,
"trimY": 19,
"width": 372,
"height": 769,
"rawWidth": 372,
"rawHeight": 788,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a41bb72d-0dd1-493f-a307-142c0419ac75",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 372,
"height": 933,
"platformSettings": {},
"subMetas": {
"bg_unit7": {
"ver": "1.0.4",
"uuid": "a6b5dd8a-a085-4b24-9694-e3a365b74e64",
"rawTextureUuid": "a41bb72d-0dd1-493f-a307-142c0419ac75",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 372,
"height": 933,
"rawWidth": 372,
"rawHeight": 933,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "780c3191-e0f0-49f4-b4ea-74ea9ecc51ea",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 372,
"height": 933,
"platformSettings": {},
"subMetas": {
"bg_unit8": {
"ver": "1.0.4",
"uuid": "6a8aeff9-3946-43af-92a6-04d0d56795c9",
"rawTextureUuid": "780c3191-e0f0-49f4-b4ea-74ea9ecc51ea",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -1.5,
"trimX": 0,
"trimY": 3,
"width": 372,
"height": 930,
"rawWidth": 372,
"rawHeight": 933,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a0f176aa-2c11-48c2-91aa-f0e372b2e6df",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 670,
"height": 538,
"platformSettings": {},
"subMetas": {
"boat": {
"ver": "1.0.4",
"uuid": "864f01eb-a809-4e53-b6be-3a2e71973d92",
"rawTextureUuid": "a0f176aa-2c11-48c2-91aa-f0e372b2e6df",
"trimType": "none",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 670,
"height": 538,
"rawWidth": 670,
"rawHeight": 538,
"borderTop": 254,
"borderBottom": 255,
"borderLeft": 584,
"borderRight": 26,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "4c192698-742f-4758-83af-f840729fae27",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 451,
"height": 538,
"platformSettings": {},
"subMetas": {
"boat_line": {
"ver": "1.0.4",
"uuid": "36b0fa6f-3930-4096-9d87-31d871a759f5",
"rawTextureUuid": "4c192698-742f-4758-83af-f840729fae27",
"trimType": "none",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 451,
"height": 538,
"rawWidth": 451,
"rawHeight": 538,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 41,
"borderRight": 72,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "774fb6f7-9fef-4775-8233-82ade9be2a70",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 308,
"height": 341,
"platformSettings": {},
"subMetas": {
"icon_review": {
"ver": "1.0.4",
"uuid": "9fd9dc6b-1888-4dc9-a561-f442da4e3404",
"rawTextureUuid": "774fb6f7-9fef-4775-8233-82ade9be2a70",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 308,
"height": 341,
"rawWidth": 308,
"rawHeight": 341,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "0dadd8b2-b0b2-44cb-9579-03cc32e89cf7",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 308,
"height": 341,
"platformSettings": {},
"subMetas": {
"icon_review2": {
"ver": "1.0.4",
"uuid": "9d2771b1-77c6-4a9c-9266-c3f23d680bbf",
"rawTextureUuid": "0dadd8b2-b0b2-44cb-9579-03cc32e89cf7",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 308,
"height": 341,
"rawWidth": 308,
"rawHeight": 341,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a1f723fd-8bf2-43f8-b2c2-ac3c3459f7bc",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 308,
"height": 341,
"platformSettings": {},
"subMetas": {
"icon_review3": {
"ver": "1.0.4",
"uuid": "06059fd3-e2bd-4f7d-9836-103fc86c89d2",
"rawTextureUuid": "a1f723fd-8bf2-43f8-b2c2-ac3c3459f7bc",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 308,
"height": 341,
"rawWidth": 308,
"rawHeight": 341,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "fc8521e8-5e92-4d4f-969e-d5d3a4b4f34f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 308,
"height": 341,
"platformSettings": {},
"subMetas": {
"icon_review4": {
"ver": "1.0.4",
"uuid": "515c9866-24a3-449d-8f44-440d3f205f1a",
"rawTextureUuid": "fc8521e8-5e92-4d4f-969e-d5d3a4b4f34f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 308,
"height": 341,
"rawWidth": 308,
"rawHeight": 341,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
cc.Class({ cc.Class({
extends: cc.Component, extends: cc.Component,
properties: { properties: {},
},
start() { start() {
const layout = cc.find('Canvas/layout'); const layout = cc.find("Canvas/layout");
const str = 'Now Loading...'; const str = "Now Loading...";
// str.split('').forEach((word, idx) => { str.split("").forEach((word, idx) => {
// const node = new cc.Node(); const node = new cc.Node();
// const label = node.addComponent(cc.Label); const label = node.addComponent(cc.Label);
// label.string = word; label.string = word;
// node.parent = layout; node.parent = layout;
// cc.tween(node) cc.tween(node)
// .delay(idx / 4) .delay(idx / 4)
// .by(0.3, { y: 50 }, { easing: 'sineOut' }) .by(0.3, { y: 50 }, { easing: "sineOut" })
// .by(0.3, { y: -50 }, { easing: 'sineIn' }) .by(0.3, { y: -50 }, { easing: "sineIn" })
// .delay((str.length - idx) / 4) .delay((str.length - idx) / 4)
// .union() .union()
// .repeatForever() .repeatForever()
// .start(); .start();
// }); });
const totalWidth = layout.children.reduce((width, node, idx) => { const totalWidth = layout.children.reduce((width, node, idx) => {
return width + node.width; return width + node.width;
}, 0); }, 0);
layout.width = totalWidth; layout.width = totalWidth;
const baseUrl = 'https://staging-teach.ireadabc.com'; const baseUrl = "https://staging-teach.ireadabc.com";
const uri = '/api/template/v1/middleLayer_for_debug' let uri = "/api/template/v1/middleLayer_for_debug";
const reqData = {}; const reqData = {};
cc.game.addPersistRootNode(cc.find('cacertNode'));
cc.game.addPersistRootNode(cc.find("cacertNode"));
this.callNetworkApiGet(baseUrl, uri, reqData, (respData) => { this.callNetworkApiGet(baseUrl, uri, reqData, (respData) => {
const data = JSON.parse(respData); const data = JSON.parse(respData);
...@@ -42,17 +43,17 @@ cc.Class({ ...@@ -42,17 +43,17 @@ cc.Class({
configData = data.data.conf.android; configData = data.data.conf.android;
} }
console.log('汪汪汪: ' + configData.sceneName); console.log("汪汪汪: " + configData.sceneName);
cc.assetManager.loadBundle(configData.bondleUrl, { version: configData.version }, async (err, bundle) => { cc.assetManager.loadBundle(
configData.bondleUrl,
{ version: configData.version },
async (err, bundle) => {
if (err) { if (err) {
console.log(err); console.log(err);
return; return;
} }
// 方便Debug壳的打包 // 显示debug的界面,方便调试
const isDebug = cc.find('Canvas/MainScene').active === false;
if(isDebug){
// 如果没有牛津的主界面,就显示debug的界面,方便调试
bundle.loadScene(configData.sceneName, null, null, (e, scene) => { bundle.loadScene(configData.sceneName, null, null, (e, scene) => {
if (e) { if (e) {
console.log(e); console.log(e);
...@@ -61,16 +62,12 @@ cc.Class({ ...@@ -61,16 +62,12 @@ cc.Class({
cc.director.runScene(scene); cc.director.runScene(scene);
}); });
} }
);
const canvas = cc.find('Canvas');
canvas.emit('MIDDLE_LAYER_LOADED', { scene: null });
globalThis.configData = configData;
});
}); });
}, },
callNetworkApiGet(baseUrl, uri, data, callBack) { callNetworkApiGet(baseUrl, uri, data, callBack) {
let queryStr = '?'; let queryStr = "?";
for (const key in data) { for (const key in data) {
if (Object.hasOwnProperty.call(data, key)) { if (Object.hasOwnProperty.call(data, key)) {
const value = data[key]; const value = data[key];
...@@ -79,14 +76,13 @@ cc.Class({ ...@@ -79,14 +76,13 @@ cc.Class({
} }
const xhr = new XMLHttpRequest(); const xhr = new XMLHttpRequest();
xhr.onreadystatechange = () => { xhr.onreadystatechange = () => {
if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status < 400)) { if (xhr.readyState == 4 && xhr.status >= 200 && xhr.status < 400) {
callBack(xhr.responseText); callBack(xhr.responseText);
} }
}; };
const url = `${baseUrl}${uri}${queryStr}`; const url = `${baseUrl}${uri}${queryStr}`;
console.log('url = ' + url); console.log("url = " + url);
xhr.open('GET', url, true); xhr.open("GET", url, true);
xhr.send(); xhr.send();
}, },
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment