@famibee/skynovel 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button.js +36 -34
- package/dist/Button.js.map +1 -1
- package/dist/CallStack.js +11 -6
- package/dist/CallStack.js.map +1 -1
- package/dist/CmnInterface.js +13 -11
- package/dist/CmnInterface.js.map +1 -1
- package/dist/CmnLib.js +58 -56
- package/dist/CmnLib.js.map +1 -1
- package/dist/Config.js +9 -7
- package/dist/Config.js.map +1 -1
- package/dist/ConfigBase.js +52 -49
- package/dist/ConfigBase.js.map +1 -1
- package/dist/DebugMng.js +9 -6
- package/dist/DebugMng.js.map +1 -1
- package/dist/EventListenerCtn.js +6 -4
- package/dist/EventListenerCtn.js.map +1 -1
- package/dist/EventMng.js +522 -417
- package/dist/EventMng.js.map +1 -1
- package/dist/Grammar.js +22 -20
- package/dist/Grammar.js.map +1 -1
- package/dist/GrpLayer.js +58 -57
- package/dist/GrpLayer.js.map +1 -1
- package/dist/Layer.js +66 -64
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMng.js +461 -441
- package/dist/LayerMng.js.map +1 -1
- package/dist/Main.js +69 -67
- package/dist/Main.js.map +1 -1
- package/dist/PropParser.js +23 -19
- package/dist/PropParser.js.map +1 -1
- package/dist/Reading.js +422 -418
- package/dist/Reading.js.map +1 -1
- package/dist/RubySpliter.js +4 -2
- package/dist/RubySpliter.js.map +1 -1
- package/dist/ScriptIterator.js +374 -370
- package/dist/ScriptIterator.js.map +1 -1
- package/dist/SndBuf.js +643 -622
- package/dist/SndBuf.js.map +1 -1
- package/dist/SoundMng.js +59 -60
- package/dist/SoundMng.js.map +1 -1
- package/dist/SpritesMng.js +135 -129
- package/dist/SpritesMng.js.map +1 -1
- package/dist/SysBase.js +1019 -955
- package/dist/SysBase.js.map +1 -1
- package/dist/TxtLayer.js +558 -551
- package/dist/TxtLayer.js.map +1 -1
- package/dist/Variable.js +47 -45
- package/dist/Variable.js.map +1 -1
- package/dist/chunk.js +11 -9
- package/dist/gamepad.js +396 -660
- package/dist/gamepad.js.map +1 -1
- package/dist/pixi.js +3044 -3648
- package/dist/pixi.js.map +1 -1
- package/dist/platform.js +6 -4
- package/dist/platform.js.map +1 -1
- package/dist/rolldown-runtime.js +20 -0
- package/dist/web.js +106 -590
- package/dist/web.js.map +1 -1
- package/dist_app/Button.js +36 -34
- package/dist_app/Button.js.map +1 -1
- package/dist_app/CallStack.js +11 -6
- package/dist_app/CallStack.js.map +1 -1
- package/dist_app/CmnInterface.js +13 -11
- package/dist_app/CmnInterface.js.map +1 -1
- package/dist_app/CmnLib.js +58 -56
- package/dist_app/CmnLib.js.map +1 -1
- package/dist_app/Config.js +9 -7
- package/dist_app/Config.js.map +1 -1
- package/dist_app/ConfigBase.js +52 -49
- package/dist_app/ConfigBase.js.map +1 -1
- package/dist_app/DebugMng.js +9 -6
- package/dist_app/DebugMng.js.map +1 -1
- package/dist_app/EventListenerCtn.js +6 -4
- package/dist_app/EventListenerCtn.js.map +1 -1
- package/dist_app/EventMng.js +522 -417
- package/dist_app/EventMng.js.map +1 -1
- package/dist_app/Grammar.js +22 -20
- package/dist_app/Grammar.js.map +1 -1
- package/dist_app/GrpLayer.js +58 -57
- package/dist_app/GrpLayer.js.map +1 -1
- package/dist_app/Layer.js +66 -64
- package/dist_app/Layer.js.map +1 -1
- package/dist_app/LayerMng.js +461 -441
- package/dist_app/LayerMng.js.map +1 -1
- package/dist_app/Main.js +69 -67
- package/dist_app/Main.js.map +1 -1
- package/dist_app/PropParser.js +23 -19
- package/dist_app/PropParser.js.map +1 -1
- package/dist_app/Reading.js +422 -418
- package/dist_app/Reading.js.map +1 -1
- package/dist_app/RubySpliter.js +4 -2
- package/dist_app/RubySpliter.js.map +1 -1
- package/dist_app/ScriptIterator.js +374 -370
- package/dist_app/ScriptIterator.js.map +1 -1
- package/dist_app/SndBuf.js +643 -622
- package/dist_app/SndBuf.js.map +1 -1
- package/dist_app/SoundMng.js +59 -60
- package/dist_app/SoundMng.js.map +1 -1
- package/dist_app/SpritesMng.js +135 -129
- package/dist_app/SpritesMng.js.map +1 -1
- package/dist_app/SysBase.js +1019 -955
- package/dist_app/SysBase.js.map +1 -1
- package/dist_app/TxtLayer.js +558 -551
- package/dist_app/TxtLayer.js.map +1 -1
- package/dist_app/Variable.js +47 -45
- package/dist_app/Variable.js.map +1 -1
- package/dist_app/app.js +62 -63
- package/dist_app/app.js.map +1 -1
- package/dist_app/appMain.js +1 -21
- package/dist_app/appMain.js.map +1 -1
- package/dist_app/chunk.js +11 -9
- package/dist_app/gamepad.js +396 -660
- package/dist_app/gamepad.js.map +1 -1
- package/dist_app/pixi.js +2028 -1990
- package/dist_app/pixi.js.map +1 -1
- package/dist_app/platform.js +6 -4
- package/dist_app/platform.js.map +1 -1
- package/dist_app/preload.js +1 -1
- package/dist_app/preload.js.map +1 -1
- package/dist_app/rolldown-runtime.js +20 -0
- package/package.json +20 -47
package/dist/web.js
CHANGED
|
@@ -1,593 +1,108 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var assign = make_assign();
|
|
11
|
-
module.exports = {
|
|
12
|
-
assign,
|
|
13
|
-
create: make_create(),
|
|
14
|
-
trim: make_trim(),
|
|
15
|
-
bind,
|
|
16
|
-
slice,
|
|
17
|
-
each,
|
|
18
|
-
map,
|
|
19
|
-
pluck,
|
|
20
|
-
isList,
|
|
21
|
-
isFunction,
|
|
22
|
-
isObject,
|
|
23
|
-
Global: typeof window < "u" ? window : global
|
|
24
|
-
};
|
|
25
|
-
function make_assign() {
|
|
26
|
-
return Object.assign ? Object.assign : function(obj, props1, props2, etc) {
|
|
27
|
-
for (var i = 1; i < arguments.length; i++) each(Object(arguments[i]), function(val, key) {
|
|
28
|
-
obj[key] = val;
|
|
29
|
-
});
|
|
30
|
-
return obj;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function make_create() {
|
|
34
|
-
if (Object.create) return function(obj, assignProps1, assignProps2, etc) {
|
|
35
|
-
var assignArgsList = slice(arguments, 1);
|
|
36
|
-
return assign.apply(this, [Object.create(obj)].concat(assignArgsList));
|
|
37
|
-
};
|
|
38
|
-
{
|
|
39
|
-
function F() {}
|
|
40
|
-
return function(obj, assignProps1, assignProps2, etc) {
|
|
41
|
-
var assignArgsList = slice(arguments, 1);
|
|
42
|
-
return F.prototype = obj, assign.apply(this, [new F()].concat(assignArgsList));
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function make_trim() {
|
|
47
|
-
return String.prototype.trim ? function(str) {
|
|
48
|
-
return String.prototype.trim.call(str);
|
|
49
|
-
} : function(str) {
|
|
50
|
-
return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function bind(obj, fn) {
|
|
54
|
-
return function() {
|
|
55
|
-
return fn.apply(obj, Array.prototype.slice.call(arguments, 0));
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
function slice(arr, index) {
|
|
59
|
-
return Array.prototype.slice.call(arr, index || 0);
|
|
60
|
-
}
|
|
61
|
-
function each(obj, fn) {
|
|
62
|
-
pluck(obj, function(val, key) {
|
|
63
|
-
return fn(val, key), !1;
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function map(obj, fn) {
|
|
67
|
-
var res = isList(obj) ? [] : {};
|
|
68
|
-
return pluck(obj, function(v, k) {
|
|
69
|
-
return res[k] = fn(v, k), !1;
|
|
70
|
-
}), res;
|
|
71
|
-
}
|
|
72
|
-
function pluck(obj, fn) {
|
|
73
|
-
if (isList(obj)) {
|
|
74
|
-
for (var i = 0; i < obj.length; i++) if (fn(obj[i], i)) return obj[i];
|
|
75
|
-
} else for (var key in obj) if (obj.hasOwnProperty(key) && fn(obj[key], key)) return obj[key];
|
|
76
|
-
}
|
|
77
|
-
function isList(val) {
|
|
78
|
-
return val != null && typeof val != "function" && typeof val.length == "number";
|
|
79
|
-
}
|
|
80
|
-
function isFunction(val) {
|
|
81
|
-
return val && {}.toString.call(val) === "[object Function]";
|
|
82
|
-
}
|
|
83
|
-
function isObject(val) {
|
|
84
|
-
return val && {}.toString.call(val) === "[object Object]";
|
|
85
|
-
}
|
|
86
|
-
})), require_store_engine = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
87
|
-
var util = require_util(), slice = util.slice, pluck = util.pluck, each = util.each, bind = util.bind, create = util.create, isList = util.isList, isFunction = util.isFunction, isObject = util.isObject;
|
|
88
|
-
module.exports = { createStore };
|
|
89
|
-
var storeAPI = {
|
|
90
|
-
version: "2.0.12",
|
|
91
|
-
enabled: !1,
|
|
92
|
-
get: function(key, optionalDefaultValue) {
|
|
93
|
-
var data = this.storage.read(this._namespacePrefix + key);
|
|
94
|
-
return this._deserialize(data, optionalDefaultValue);
|
|
95
|
-
},
|
|
96
|
-
set: function(key, value) {
|
|
97
|
-
return value === void 0 ? this.remove(key) : (this.storage.write(this._namespacePrefix + key, this._serialize(value)), value);
|
|
98
|
-
},
|
|
99
|
-
remove: function(key) {
|
|
100
|
-
this.storage.remove(this._namespacePrefix + key);
|
|
101
|
-
},
|
|
102
|
-
each: function(callback) {
|
|
103
|
-
var self = this;
|
|
104
|
-
this.storage.each(function(val, namespacedKey) {
|
|
105
|
-
callback.call(self, self._deserialize(val), (namespacedKey || "").replace(self._namespaceRegexp, ""));
|
|
106
|
-
});
|
|
107
|
-
},
|
|
108
|
-
clearAll: function() {
|
|
109
|
-
this.storage.clearAll();
|
|
110
|
-
},
|
|
111
|
-
hasNamespace: function(namespace) {
|
|
112
|
-
return this._namespacePrefix == "__storejs_" + namespace + "_";
|
|
113
|
-
},
|
|
114
|
-
createStore: function() {
|
|
115
|
-
return createStore.apply(this, arguments);
|
|
116
|
-
},
|
|
117
|
-
addPlugin: function(plugin) {
|
|
118
|
-
this._addPlugin(plugin);
|
|
119
|
-
},
|
|
120
|
-
namespace: function(namespace) {
|
|
121
|
-
return createStore(this.storage, this.plugins, namespace);
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
function _warn() {
|
|
125
|
-
var _console = typeof console > "u" ? null : console;
|
|
126
|
-
_console && (_console.warn ? _console.warn : _console.log).apply(_console, arguments);
|
|
127
|
-
}
|
|
128
|
-
function createStore(storages, plugins, namespace) {
|
|
129
|
-
namespace ||= "", storages && !isList(storages) && (storages = [storages]), plugins && !isList(plugins) && (plugins = [plugins]);
|
|
130
|
-
var namespacePrefix = namespace ? "__storejs_" + namespace + "_" : "", namespaceRegexp = namespace ? /* @__PURE__ */ RegExp("^" + namespacePrefix) : null;
|
|
131
|
-
if (!/^[a-zA-Z0-9_\-]*$/.test(namespace)) throw Error("store.js namespaces can only have alphanumerics + underscores and dashes");
|
|
132
|
-
var store$1 = create({
|
|
133
|
-
_namespacePrefix: namespacePrefix,
|
|
134
|
-
_namespaceRegexp: namespaceRegexp,
|
|
135
|
-
_testStorage: function(storage) {
|
|
136
|
-
try {
|
|
137
|
-
var testStr = "__storejs__test__";
|
|
138
|
-
storage.write(testStr, testStr);
|
|
139
|
-
var ok = storage.read(testStr) === testStr;
|
|
140
|
-
return storage.remove(testStr), ok;
|
|
141
|
-
} catch {
|
|
142
|
-
return !1;
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
_assignPluginFnProp: function(pluginFnProp, propName) {
|
|
146
|
-
var oldFn = this[propName];
|
|
147
|
-
this[propName] = function() {
|
|
148
|
-
var args = slice(arguments, 0), self = this;
|
|
149
|
-
function super_fn() {
|
|
150
|
-
if (oldFn) return each(arguments, function(arg, i) {
|
|
151
|
-
args[i] = arg;
|
|
152
|
-
}), oldFn.apply(self, args);
|
|
153
|
-
}
|
|
154
|
-
var newFnArgs = [super_fn].concat(args);
|
|
155
|
-
return pluginFnProp.apply(self, newFnArgs);
|
|
156
|
-
};
|
|
157
|
-
},
|
|
158
|
-
_serialize: function(obj) {
|
|
159
|
-
return JSON.stringify(obj);
|
|
160
|
-
},
|
|
161
|
-
_deserialize: function(strVal, defaultVal) {
|
|
162
|
-
if (!strVal) return defaultVal;
|
|
163
|
-
var val = "";
|
|
164
|
-
try {
|
|
165
|
-
val = JSON.parse(strVal);
|
|
166
|
-
} catch {
|
|
167
|
-
val = strVal;
|
|
168
|
-
}
|
|
169
|
-
return val === void 0 ? defaultVal : val;
|
|
170
|
-
},
|
|
171
|
-
_addStorage: function(storage) {
|
|
172
|
-
this.enabled || this._testStorage(storage) && (this.storage = storage, this.enabled = !0);
|
|
173
|
-
},
|
|
174
|
-
_addPlugin: function(plugin) {
|
|
175
|
-
var self = this;
|
|
176
|
-
if (isList(plugin)) {
|
|
177
|
-
each(plugin, function(plugin$1) {
|
|
178
|
-
self._addPlugin(plugin$1);
|
|
179
|
-
});
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
if (!pluck(this.plugins, function(seenPlugin) {
|
|
183
|
-
return plugin === seenPlugin;
|
|
184
|
-
})) {
|
|
185
|
-
if (this.plugins.push(plugin), !isFunction(plugin)) throw Error("Plugins must be function values that return objects");
|
|
186
|
-
var pluginProperties = plugin.call(this);
|
|
187
|
-
if (!isObject(pluginProperties)) throw Error("Plugins must return an object of function properties");
|
|
188
|
-
each(pluginProperties, function(pluginFnProp, propName) {
|
|
189
|
-
if (!isFunction(pluginFnProp)) throw Error("Bad plugin property: " + propName + " from plugin " + plugin.name + ". Plugins should only return functions.");
|
|
190
|
-
self._assignPluginFnProp(pluginFnProp, propName);
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
addStorage: function(storage) {
|
|
195
|
-
_warn("store.addStorage(storage) is deprecated. Use createStore([storages])"), this._addStorage(storage);
|
|
196
|
-
}
|
|
197
|
-
}, storeAPI, { plugins: [] });
|
|
198
|
-
return store$1.raw = {}, each(store$1, function(prop, propName) {
|
|
199
|
-
isFunction(prop) && (store$1.raw[propName] = bind(store$1, prop));
|
|
200
|
-
}), each(storages, function(storage) {
|
|
201
|
-
store$1._addStorage(storage);
|
|
202
|
-
}), each(plugins, function(plugin) {
|
|
203
|
-
store$1._addPlugin(plugin);
|
|
204
|
-
}), store$1;
|
|
205
|
-
}
|
|
206
|
-
})), require_localStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
207
|
-
var Global = require_util().Global;
|
|
208
|
-
module.exports = {
|
|
209
|
-
name: "localStorage",
|
|
210
|
-
read,
|
|
211
|
-
write,
|
|
212
|
-
each,
|
|
213
|
-
remove,
|
|
214
|
-
clearAll
|
|
215
|
-
};
|
|
216
|
-
function localStorage() {
|
|
217
|
-
return Global.localStorage;
|
|
218
|
-
}
|
|
219
|
-
function read(key) {
|
|
220
|
-
return localStorage().getItem(key);
|
|
221
|
-
}
|
|
222
|
-
function write(key, data) {
|
|
223
|
-
return localStorage().setItem(key, data);
|
|
224
|
-
}
|
|
225
|
-
function each(fn) {
|
|
226
|
-
for (var i = localStorage().length - 1; i >= 0; i--) {
|
|
227
|
-
var key = localStorage().key(i);
|
|
228
|
-
fn(read(key), key);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
function remove(key) {
|
|
232
|
-
return localStorage().removeItem(key);
|
|
233
|
-
}
|
|
234
|
-
function clearAll() {
|
|
235
|
-
return localStorage().clear();
|
|
236
|
-
}
|
|
237
|
-
})), require_oldFF_globalStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
238
|
-
var Global = require_util().Global;
|
|
239
|
-
module.exports = {
|
|
240
|
-
name: "oldFF-globalStorage",
|
|
241
|
-
read,
|
|
242
|
-
write,
|
|
243
|
-
each,
|
|
244
|
-
remove,
|
|
245
|
-
clearAll
|
|
246
|
-
};
|
|
247
|
-
var globalStorage = Global.globalStorage;
|
|
248
|
-
function read(key) {
|
|
249
|
-
return globalStorage[key];
|
|
250
|
-
}
|
|
251
|
-
function write(key, data) {
|
|
252
|
-
globalStorage[key] = data;
|
|
253
|
-
}
|
|
254
|
-
function each(fn) {
|
|
255
|
-
for (var i = globalStorage.length - 1; i >= 0; i--) {
|
|
256
|
-
var key = globalStorage.key(i);
|
|
257
|
-
fn(globalStorage[key], key);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
function remove(key) {
|
|
261
|
-
return globalStorage.removeItem(key);
|
|
262
|
-
}
|
|
263
|
-
function clearAll() {
|
|
264
|
-
each(function(key, _) {
|
|
265
|
-
delete globalStorage[key];
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
})), require_oldIE_userDataStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
269
|
-
var Global = require_util().Global;
|
|
270
|
-
module.exports = {
|
|
271
|
-
name: "oldIE-userDataStorage",
|
|
272
|
-
write,
|
|
273
|
-
read,
|
|
274
|
-
each,
|
|
275
|
-
remove,
|
|
276
|
-
clearAll
|
|
277
|
-
};
|
|
278
|
-
var storageName = "storejs", doc = Global.document, _withStorageEl = _makeIEStorageElFunction(), disable = (Global.navigator ? Global.navigator.userAgent : "").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);
|
|
279
|
-
function write(unfixedKey, data) {
|
|
280
|
-
if (!disable) {
|
|
281
|
-
var fixedKey = fixKey(unfixedKey);
|
|
282
|
-
_withStorageEl(function(storageEl) {
|
|
283
|
-
storageEl.setAttribute(fixedKey, data), storageEl.save(storageName);
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
function read(unfixedKey) {
|
|
288
|
-
if (!disable) {
|
|
289
|
-
var fixedKey = fixKey(unfixedKey), res = null;
|
|
290
|
-
return _withStorageEl(function(storageEl) {
|
|
291
|
-
res = storageEl.getAttribute(fixedKey);
|
|
292
|
-
}), res;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
function each(callback) {
|
|
296
|
-
_withStorageEl(function(storageEl) {
|
|
297
|
-
for (var attributes = storageEl.XMLDocument.documentElement.attributes, i = attributes.length - 1; i >= 0; i--) {
|
|
298
|
-
var attr = attributes[i];
|
|
299
|
-
callback(storageEl.getAttribute(attr.name), attr.name);
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
function remove(unfixedKey) {
|
|
304
|
-
var fixedKey = fixKey(unfixedKey);
|
|
305
|
-
_withStorageEl(function(storageEl) {
|
|
306
|
-
storageEl.removeAttribute(fixedKey), storageEl.save(storageName);
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
function clearAll() {
|
|
310
|
-
_withStorageEl(function(storageEl) {
|
|
311
|
-
var attributes = storageEl.XMLDocument.documentElement.attributes;
|
|
312
|
-
storageEl.load(storageName);
|
|
313
|
-
for (var i = attributes.length - 1; i >= 0; i--) storageEl.removeAttribute(attributes[i].name);
|
|
314
|
-
storageEl.save(storageName);
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
var forbiddenCharsRegex = RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]", "g");
|
|
318
|
-
function fixKey(key) {
|
|
319
|
-
return key.replace(/^\d/, "___$&").replace(forbiddenCharsRegex, "___");
|
|
320
|
-
}
|
|
321
|
-
function _makeIEStorageElFunction() {
|
|
322
|
-
if (!doc || !doc.documentElement || !doc.documentElement.addBehavior) return null;
|
|
323
|
-
var scriptTag = "script", storageOwner, storageContainer, storageEl;
|
|
324
|
-
try {
|
|
325
|
-
storageContainer = new ActiveXObject("htmlfile"), storageContainer.open(), storageContainer.write("<" + scriptTag + ">document.w=window</" + scriptTag + "><iframe src=\"/favicon.ico\"></iframe>"), storageContainer.close(), storageOwner = storageContainer.w.frames[0].document, storageEl = storageOwner.createElement("div");
|
|
1
|
+
import { l as e, s as t, t as n, u as r } from "./CmnLib.js";
|
|
2
|
+
import { t as i } from "./SysBase.js";
|
|
3
|
+
import { t as a } from "./Layer.js";
|
|
4
|
+
//#region src/sn/localStore.ts
|
|
5
|
+
var o = {
|
|
6
|
+
get(e) {
|
|
7
|
+
let t = localStorage.getItem(e);
|
|
8
|
+
if (t != null) try {
|
|
9
|
+
return JSON.parse(t);
|
|
326
10
|
} catch {
|
|
327
|
-
|
|
328
|
-
}
|
|
329
|
-
return function(storeFunction) {
|
|
330
|
-
var args = [].slice.call(arguments, 0);
|
|
331
|
-
args.unshift(storageEl), storageOwner.appendChild(storageEl), storageEl.addBehavior("#default#userData"), storageEl.load(storageName), storeFunction.apply(this, args), storageOwner.removeChild(storageEl);
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
})), require_cookieStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
335
|
-
var util = require_util(), Global = util.Global, trim = util.trim;
|
|
336
|
-
module.exports = {
|
|
337
|
-
name: "cookieStorage",
|
|
338
|
-
read,
|
|
339
|
-
write,
|
|
340
|
-
each,
|
|
341
|
-
remove,
|
|
342
|
-
clearAll
|
|
343
|
-
};
|
|
344
|
-
var doc = Global.document;
|
|
345
|
-
function read(key) {
|
|
346
|
-
if (!key || !_has(key)) return null;
|
|
347
|
-
var regexpStr = "(?:^|.*;\\s*)" + escape(key).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";
|
|
348
|
-
return unescape(doc.cookie.replace(new RegExp(regexpStr), "$1"));
|
|
349
|
-
}
|
|
350
|
-
function each(callback) {
|
|
351
|
-
for (var cookies = doc.cookie.split(/; ?/g), i = cookies.length - 1; i >= 0; i--) if (trim(cookies[i])) {
|
|
352
|
-
var kvp = cookies[i].split("="), key = unescape(kvp[0]);
|
|
353
|
-
callback(unescape(kvp[1]), key);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
function write(key, data) {
|
|
357
|
-
key && (doc.cookie = escape(key) + "=" + escape(data) + "; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/");
|
|
358
|
-
}
|
|
359
|
-
function remove(key) {
|
|
360
|
-
!key || !_has(key) || (doc.cookie = escape(key) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/");
|
|
361
|
-
}
|
|
362
|
-
function clearAll() {
|
|
363
|
-
each(function(_, key) {
|
|
364
|
-
remove(key);
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
function _has(key) {
|
|
368
|
-
return (/* @__PURE__ */ RegExp("(?:^|;\\s*)" + escape(key).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(doc.cookie);
|
|
369
|
-
}
|
|
370
|
-
})), require_sessionStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
371
|
-
var Global = require_util().Global;
|
|
372
|
-
module.exports = {
|
|
373
|
-
name: "sessionStorage",
|
|
374
|
-
read,
|
|
375
|
-
write,
|
|
376
|
-
each,
|
|
377
|
-
remove,
|
|
378
|
-
clearAll
|
|
379
|
-
};
|
|
380
|
-
function sessionStorage() {
|
|
381
|
-
return Global.sessionStorage;
|
|
382
|
-
}
|
|
383
|
-
function read(key) {
|
|
384
|
-
return sessionStorage().getItem(key);
|
|
385
|
-
}
|
|
386
|
-
function write(key, data) {
|
|
387
|
-
return sessionStorage().setItem(key, data);
|
|
388
|
-
}
|
|
389
|
-
function each(fn) {
|
|
390
|
-
for (var i = sessionStorage().length - 1; i >= 0; i--) {
|
|
391
|
-
var key = sessionStorage().key(i);
|
|
392
|
-
fn(read(key), key);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
function remove(key) {
|
|
396
|
-
return sessionStorage().removeItem(key);
|
|
397
|
-
}
|
|
398
|
-
function clearAll() {
|
|
399
|
-
return sessionStorage().clear();
|
|
400
|
-
}
|
|
401
|
-
})), require_memoryStorage = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
402
|
-
module.exports = {
|
|
403
|
-
name: "memoryStorage",
|
|
404
|
-
read,
|
|
405
|
-
write,
|
|
406
|
-
each,
|
|
407
|
-
remove,
|
|
408
|
-
clearAll
|
|
409
|
-
};
|
|
410
|
-
var memoryStorage = {};
|
|
411
|
-
function read(key) {
|
|
412
|
-
return memoryStorage[key];
|
|
413
|
-
}
|
|
414
|
-
function write(key, data) {
|
|
415
|
-
memoryStorage[key] = data;
|
|
416
|
-
}
|
|
417
|
-
function each(callback) {
|
|
418
|
-
for (var key in memoryStorage) memoryStorage.hasOwnProperty(key) && callback(memoryStorage[key], key);
|
|
419
|
-
}
|
|
420
|
-
function remove(key) {
|
|
421
|
-
delete memoryStorage[key];
|
|
422
|
-
}
|
|
423
|
-
function clearAll(key) {
|
|
424
|
-
memoryStorage = {};
|
|
425
|
-
}
|
|
426
|
-
})), require_all = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
427
|
-
module.exports = [
|
|
428
|
-
require_localStorage(),
|
|
429
|
-
require_oldFF_globalStorage(),
|
|
430
|
-
require_oldIE_userDataStorage(),
|
|
431
|
-
require_cookieStorage(),
|
|
432
|
-
require_sessionStorage(),
|
|
433
|
-
require_memoryStorage()
|
|
434
|
-
];
|
|
435
|
-
})), require_json2$1 = /* @__PURE__ */ __commonJSMin((() => {
|
|
436
|
-
typeof JSON != "object" && (JSON = {}), (function() {
|
|
437
|
-
var rx_one = /^[\],:{}\s]*$/, rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, rx_three = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, rx_four = /(?:^|:|,)(?:\s*\[)+/g, rx_escapable = /[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
|
438
|
-
function f(n) {
|
|
439
|
-
return n < 10 ? "0" + n : n;
|
|
440
|
-
}
|
|
441
|
-
function this_value() {
|
|
442
|
-
return this.valueOf();
|
|
443
|
-
}
|
|
444
|
-
typeof Date.prototype.toJSON != "function" && (Date.prototype.toJSON = function() {
|
|
445
|
-
return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null;
|
|
446
|
-
}, Boolean.prototype.toJSON = this_value, Number.prototype.toJSON = this_value, String.prototype.toJSON = this_value);
|
|
447
|
-
var gap, indent, meta, rep;
|
|
448
|
-
function quote(string) {
|
|
449
|
-
return rx_escapable.lastIndex = 0, rx_escapable.test(string) ? "\"" + string.replace(rx_escapable, function(a) {
|
|
450
|
-
var c = meta[a];
|
|
451
|
-
return typeof c == "string" ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
|
|
452
|
-
}) + "\"" : "\"" + string + "\"";
|
|
453
|
-
}
|
|
454
|
-
function str(key, holder) {
|
|
455
|
-
var i, k, v, length, mind = gap, partial, value = holder[key];
|
|
456
|
-
switch (value && typeof value == "object" && typeof value.toJSON == "function" && (value = value.toJSON(key)), typeof rep == "function" && (value = rep.call(holder, key, value)), typeof value) {
|
|
457
|
-
case "string": return quote(value);
|
|
458
|
-
case "number": return isFinite(value) ? String(value) : "null";
|
|
459
|
-
case "boolean":
|
|
460
|
-
case "null": return String(value);
|
|
461
|
-
case "object":
|
|
462
|
-
if (!value) return "null";
|
|
463
|
-
if (gap += indent, partial = [], Object.prototype.toString.apply(value) === "[object Array]") {
|
|
464
|
-
for (length = value.length, i = 0; i < length; i += 1) partial[i] = str(i, value) || "null";
|
|
465
|
-
return v = partial.length === 0 ? "[]" : gap ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial.join(",") + "]", gap = mind, v;
|
|
466
|
-
}
|
|
467
|
-
if (rep && typeof rep == "object") for (length = rep.length, i = 0; i < length; i += 1) typeof rep[i] == "string" && (k = rep[i], v = str(k, value), v && partial.push(quote(k) + (gap ? ": " : ":") + v));
|
|
468
|
-
else for (k in value) Object.prototype.hasOwnProperty.call(value, k) && (v = str(k, value), v && partial.push(quote(k) + (gap ? ": " : ":") + v));
|
|
469
|
-
return v = partial.length === 0 ? "{}" : gap ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial.join(",") + "}", gap = mind, v;
|
|
470
|
-
}
|
|
11
|
+
return;
|
|
471
12
|
}
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
"\"": "\\\"",
|
|
479
|
-
"\\": "\\\\"
|
|
480
|
-
}, JSON.stringify = function(value, replacer, space) {
|
|
481
|
-
var i;
|
|
482
|
-
if (gap = "", indent = "", typeof space == "number") for (i = 0; i < space; i += 1) indent += " ";
|
|
483
|
-
else typeof space == "string" && (indent = space);
|
|
484
|
-
if (rep = replacer, replacer && typeof replacer != "function" && (typeof replacer != "object" || typeof replacer.length != "number")) throw Error("JSON.stringify");
|
|
485
|
-
return str("", { "": value });
|
|
486
|
-
}), typeof JSON.parse != "function" && (JSON.parse = function(text, reviver) {
|
|
487
|
-
var j;
|
|
488
|
-
function walk(holder, key) {
|
|
489
|
-
var k, v, value = holder[key];
|
|
490
|
-
if (value && typeof value == "object") for (k in value) Object.prototype.hasOwnProperty.call(value, k) && (v = walk(value, k), v === void 0 ? delete value[k] : value[k] = v);
|
|
491
|
-
return reviver.call(holder, key, value);
|
|
492
|
-
}
|
|
493
|
-
if (text = String(text), rx_dangerous.lastIndex = 0, rx_dangerous.test(text) && (text = text.replace(rx_dangerous, function(a) {
|
|
494
|
-
return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
|
|
495
|
-
})), rx_one.test(text.replace(rx_two, "@").replace(rx_three, "]").replace(rx_four, ""))) return j = eval("(" + text + ")"), typeof reviver == "function" ? walk({ "": j }, "") : j;
|
|
496
|
-
throw SyntaxError("JSON.parse");
|
|
497
|
-
});
|
|
498
|
-
})();
|
|
499
|
-
})), require_json2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
500
|
-
module.exports = json2Plugin;
|
|
501
|
-
function json2Plugin() {
|
|
502
|
-
return require_json2$1(), {};
|
|
13
|
+
},
|
|
14
|
+
set(e, t) {
|
|
15
|
+
localStorage.setItem(e, JSON.stringify(t));
|
|
16
|
+
},
|
|
17
|
+
remove(e) {
|
|
18
|
+
localStorage.removeItem(e);
|
|
503
19
|
}
|
|
504
|
-
}
|
|
505
|
-
var engine = require_store_engine(), storages = require_all(), plugins = [require_json2()];
|
|
506
|
-
module.exports = engine.createStore(storages, plugins);
|
|
507
|
-
})), import_store_legacy = /* @__PURE__ */ __toESM(require_store_legacy()), devtools = {
|
|
20
|
+
}, s = {
|
|
508
21
|
isOpen: !1,
|
|
509
22
|
orientation: void 0
|
|
510
|
-
},
|
|
23
|
+
}, c = 170, l = (e, t) => {
|
|
511
24
|
globalThis.dispatchEvent(new globalThis.CustomEvent("devtoolschange", { detail: {
|
|
512
|
-
isOpen,
|
|
513
|
-
orientation
|
|
25
|
+
isOpen: e,
|
|
26
|
+
orientation: t
|
|
514
27
|
} }));
|
|
515
|
-
},
|
|
516
|
-
let
|
|
517
|
-
!(
|
|
28
|
+
}, u = ({ emitEvents: e = !0 } = {}) => {
|
|
29
|
+
let t = globalThis.outerWidth - globalThis.innerWidth > c, n = globalThis.outerHeight - globalThis.innerHeight > c, r = t ? "vertical" : "horizontal";
|
|
30
|
+
!(n && t) && (globalThis.Firebug && globalThis.Firebug.chrome && globalThis.Firebug.chrome.isInitialized || t || n) ? ((!s.isOpen || s.orientation !== r) && e && l(!0, r), s.isOpen = !0, s.orientation = r) : (s.isOpen && e && l(!1, void 0), s.isOpen = !1, s.orientation = void 0);
|
|
518
31
|
};
|
|
519
|
-
|
|
520
|
-
|
|
32
|
+
u({ emitEvents: !1 }), setInterval(u, 500);
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/sn/SysWeb.ts
|
|
35
|
+
var d = class extends i {
|
|
521
36
|
#e;
|
|
522
|
-
constructor(...[
|
|
37
|
+
constructor(...[e = {}, t = {
|
|
523
38
|
cur: "prj/",
|
|
524
39
|
crypto: !1,
|
|
525
40
|
dip: ""
|
|
526
41
|
}]) {
|
|
527
|
-
super(
|
|
528
|
-
let
|
|
529
|
-
this.#e =
|
|
530
|
-
}
|
|
531
|
-
async loaded(...[
|
|
532
|
-
await super.loaded(
|
|
533
|
-
let
|
|
534
|
-
|
|
535
|
-
this.runSN(
|
|
42
|
+
super(e, t);
|
|
43
|
+
let n = t.cur.split("/");
|
|
44
|
+
this.#e = n.length > 2 ? n.slice(0, -2).join("/") + "/" : "", this.loaded(e, t);
|
|
45
|
+
}
|
|
46
|
+
async loaded(...[r, i]) {
|
|
47
|
+
await super.loaded(r, i), document.querySelectorAll("[data-prj]").forEach((e) => {
|
|
48
|
+
let t = e.attributes.getNamedItem("data-prj");
|
|
49
|
+
t && e.addEventListener("click", () => {
|
|
50
|
+
this.runSN(t.value);
|
|
536
51
|
}, { passive: !0 });
|
|
537
|
-
}), document.querySelectorAll("[data-reload]").forEach((
|
|
52
|
+
}), document.querySelectorAll("[data-reload]").forEach((e) => e.addEventListener("click", () => {
|
|
538
53
|
this.run();
|
|
539
|
-
}, { passive: !0 })),
|
|
540
|
-
let
|
|
541
|
-
if (
|
|
542
|
-
...
|
|
543
|
-
...JSON.parse(
|
|
544
|
-
}), !
|
|
545
|
-
|
|
546
|
-
...
|
|
54
|
+
}, { passive: !0 })), i.dip && (n.hDip = JSON.parse(i.dip));
|
|
55
|
+
let a = new URLSearchParams(location.search), o = a.get("dip");
|
|
56
|
+
if (o && (n.hDip = {
|
|
57
|
+
...n.hDip,
|
|
58
|
+
...JSON.parse(o.replaceAll("%2C", ","))
|
|
59
|
+
}), !t(n.hDip, "oninit_run", !0)) return;
|
|
60
|
+
t(n.hDip, "dbg", !1) && (n.isDbg = !0, this.fetch = (e, t) => fetch(e, {
|
|
61
|
+
...t,
|
|
547
62
|
mode: "cors"
|
|
548
|
-
})), this.extPort =
|
|
549
|
-
let
|
|
550
|
-
|
|
63
|
+
})), this.extPort = e(n.hDip, "port", this.extPort);
|
|
64
|
+
let s = a.get("cur");
|
|
65
|
+
s && (i.cur = this.#e + s + "/"), await this.run();
|
|
551
66
|
}
|
|
552
67
|
#t = ":";
|
|
553
|
-
async runSN(
|
|
554
|
-
this.arg.cur = this.#e +
|
|
68
|
+
async runSN(e) {
|
|
69
|
+
this.arg.cur = this.#e + e + "/", this.#t !== this.arg.cur && (this.#t = this.arg.cur, await this.run());
|
|
555
70
|
}
|
|
556
|
-
async initVal(
|
|
557
|
-
let
|
|
558
|
-
|
|
559
|
-
let
|
|
71
|
+
async initVal(e, t) {
|
|
72
|
+
let n = encodeURIComponent(document.location.hostname);
|
|
73
|
+
e["const.sn.isDebugger"] = n === "localhost" || n === "127.0.0.1";
|
|
74
|
+
let r = this.cfg.headNs;
|
|
560
75
|
this.flushSub = this.arg.crypto ? async () => {
|
|
561
|
-
|
|
76
|
+
o.set(r + "sys_", await this.enc(JSON.stringify(this.data.sys))), o.set(r + "mark_", await this.enc(JSON.stringify(this.data.mark))), o.set(r + "kidoku_", await this.enc(JSON.stringify(this.data.kidoku)));
|
|
562
77
|
} : () => {
|
|
563
|
-
|
|
78
|
+
o.set(r + "sys", this.data.sys), o.set(r + "mark", this.data.mark), o.set(r + "kidoku", this.data.kidoku);
|
|
564
79
|
};
|
|
565
|
-
let
|
|
566
|
-
if (
|
|
567
|
-
this.data.sys = {}, this.data.mark = {}, this.data.kidoku = {},
|
|
80
|
+
let i = r + (this.arg.crypto ? "sys_" : "sys");
|
|
81
|
+
if (e["const.sn.isFirstBoot"] = o.get(i) === void 0) {
|
|
82
|
+
this.data.sys = {}, this.data.mark = {}, this.data.kidoku = {}, t(this.data);
|
|
568
83
|
return;
|
|
569
84
|
}
|
|
570
85
|
if (!this.arg.crypto) {
|
|
571
|
-
this.data.sys =
|
|
86
|
+
this.data.sys = o.get(r + "sys"), this.data.mark = o.get(r + "mark"), this.data.kidoku = o.get(r + "kidoku"), t(this.data);
|
|
572
87
|
return;
|
|
573
88
|
}
|
|
574
|
-
let
|
|
89
|
+
let a = "";
|
|
575
90
|
try {
|
|
576
|
-
|
|
91
|
+
a = "sys", this.data.sys = JSON.parse(await this.dec("json", o.get(r + "sys_"))), a += String(this.val.getVal("sys:TextLayer.Back.Alpha", 1)), a = "mark", this.data.mark = JSON.parse(await this.dec("json", o.get(r + "mark_"))), a = "kidoku", this.data.kidoku = JSON.parse(await this.dec("json", o.get(r + "kidoku_")));
|
|
577
92
|
} catch (e) {
|
|
578
|
-
console.error(`セーブデータ(${
|
|
93
|
+
console.error(`セーブデータ(${a})が壊れています。一度クリアする必要があります(a) %o`, e);
|
|
579
94
|
}
|
|
580
|
-
|
|
95
|
+
t(this.data);
|
|
581
96
|
}
|
|
582
|
-
init(
|
|
583
|
-
let
|
|
584
|
-
if ("requestFullscreen" in document.body) this.tglFlscr_sub = this.isFullScr ? () => document.exitFullscreen() : () =>
|
|
97
|
+
init(e, t, n) {
|
|
98
|
+
let r = super.init(e, t, n), i = t.view.parentElement;
|
|
99
|
+
if ("requestFullscreen" in document.body) this.tglFlscr_sub = this.isFullScr ? () => document.exitFullscreen() : () => i.requestFullscreen(), this.elc.add(document, "fullscreenchange", () => {
|
|
585
100
|
this.isFullScr = !!document.fullscreenElement;
|
|
586
101
|
});
|
|
587
102
|
else {
|
|
588
|
-
let
|
|
589
|
-
this.tglFlscr_sub = this.isFullScr ? () =>
|
|
590
|
-
this.isFullScr = !!
|
|
103
|
+
let e = document;
|
|
104
|
+
this.tglFlscr_sub = this.isFullScr ? () => e.webkitCancelFullScreen() : () => i.webkitRequestFullscreen(), this.elc.add(document, "fullscreenchange", () => {
|
|
105
|
+
this.isFullScr = !!e.webkitFullscreenElement;
|
|
591
106
|
});
|
|
592
107
|
}
|
|
593
108
|
return this.cfg.oCfg.debug.devtool || this.elc.add(globalThis, "devtoolschange", (e) => {
|
|
@@ -595,60 +110,61 @@ var SysWeb = class extends SysBase {
|
|
|
595
110
|
}, {
|
|
596
111
|
once: !0,
|
|
597
112
|
passive: !0
|
|
598
|
-
}),
|
|
113
|
+
}), r;
|
|
599
114
|
}
|
|
600
115
|
cvsResize() {
|
|
601
116
|
if (super.cvsResize(), !this.isFullScr || !this.main) return;
|
|
602
|
-
let
|
|
603
|
-
|
|
117
|
+
let e = this.main.cvs.style;
|
|
118
|
+
e.width = e.height = "";
|
|
604
119
|
}
|
|
605
120
|
pathBaseCnvSnPath4Dbg = "${pathbase}/";
|
|
606
121
|
_export = () => ((async () => {
|
|
607
|
-
let
|
|
122
|
+
let e = JSON.stringify({
|
|
608
123
|
sys: this.data.sys,
|
|
609
124
|
mark: this.data.mark,
|
|
610
125
|
kidoku: this.data.kidoku
|
|
611
|
-
}),
|
|
612
|
-
a.href = URL.createObjectURL(
|
|
126
|
+
}), t = this.arg.crypto ? await this.enc(e) : e, i = new Blob([t], { type: "text/json" }), a = document.createElement("a");
|
|
127
|
+
a.href = URL.createObjectURL(i), a.download = (this.arg.crypto ? "" : "no_crypto_") + this.cfg.headNs + r("-", "_", "") + ".swpd", a.click(), n.debugLog && console.log("プレイデータをエクスポートしました"), setTimeout(() => this.fire("sn:exported", new MouseEvent("click")), 10);
|
|
613
128
|
})(), !1);
|
|
614
|
-
_import = () => (new Promise((
|
|
615
|
-
let
|
|
616
|
-
|
|
617
|
-
let
|
|
618
|
-
|
|
619
|
-
},
|
|
620
|
-
}).then(async (
|
|
621
|
-
let
|
|
622
|
-
if (
|
|
623
|
-
console.error(`別のゲーム【プロジェクト名=${
|
|
129
|
+
_import = () => (new Promise((e, t) => {
|
|
130
|
+
let n = document.createElement("input");
|
|
131
|
+
n.type = "file", n.accept = ".swpd, text/plain", n.onchange = () => {
|
|
132
|
+
let r = n.files?.[0];
|
|
133
|
+
r ? e(r) : t(/* @__PURE__ */ Error("ファイル選択に失敗しました"));
|
|
134
|
+
}, n.click();
|
|
135
|
+
}).then(async (e) => {
|
|
136
|
+
let t = await e.text(), r = JSON.parse(this.arg.crypto ? await this.dec("json", t) : t);
|
|
137
|
+
if (r.sys["const.sn.cfg.ns"] !== this.cfg.oCfg.save_ns) {
|
|
138
|
+
console.error(`別のゲーム【プロジェクト名=${r.sys["const.sn.cfg.ns"]}】のプレイデータです`);
|
|
624
139
|
return;
|
|
625
140
|
}
|
|
626
|
-
this.data.sys =
|
|
141
|
+
this.data.sys = r.sys, this.data.mark = r.mark, this.data.kidoku = r.kidoku, this.flush(), this.val.updateData(r), n.debugLog && console.log("プレイデータをインポートしました"), this.fire("sn:imported", new MouseEvent("click"));
|
|
627
142
|
}).catch((e) => console.error(`異常なプレイデータです ${String(e)}`)), !1);
|
|
628
|
-
navigate_to = (
|
|
629
|
-
let { url } =
|
|
630
|
-
if (!
|
|
631
|
-
return globalThis.open(
|
|
143
|
+
navigate_to = (e) => {
|
|
144
|
+
let { url: t } = e;
|
|
145
|
+
if (!t) throw "[navigate_to] urlは必須です";
|
|
146
|
+
return globalThis.open(t, "_blank"), !1;
|
|
632
147
|
};
|
|
633
|
-
titleSub(
|
|
634
|
-
document.title =
|
|
635
|
-
|
|
148
|
+
titleSub(e) {
|
|
149
|
+
document.title = e, document.querySelectorAll("[data-title]").forEach((t) => {
|
|
150
|
+
t.textContent = e;
|
|
636
151
|
});
|
|
637
152
|
}
|
|
638
|
-
async savePic(
|
|
639
|
-
let
|
|
640
|
-
|
|
153
|
+
async savePic(e, t) {
|
|
154
|
+
let r = document.createElement("a");
|
|
155
|
+
r.href = t, r.download = e, r.click(), n.debugLog && console.log("画像ファイルをダウンロードします");
|
|
641
156
|
}
|
|
642
157
|
#n = {};
|
|
643
|
-
async appendFile(
|
|
644
|
-
let
|
|
645
|
-
this.#n[
|
|
158
|
+
async appendFile(e, t) {
|
|
159
|
+
let n = (this.#n[e] ?? "") + t;
|
|
160
|
+
this.#n[e] = n, await this.outputFile(e, n);
|
|
646
161
|
}
|
|
647
|
-
async outputFile(
|
|
648
|
-
let
|
|
649
|
-
|
|
162
|
+
async outputFile(e, t) {
|
|
163
|
+
let n = new Blob([t], { type: "text/json" }), r = document.createElement("a");
|
|
164
|
+
r.href = URL.createObjectURL(n), r.download = e, r.click();
|
|
650
165
|
}
|
|
651
166
|
};
|
|
652
|
-
|
|
167
|
+
//#endregion
|
|
168
|
+
export { n as CmnLib, a as Layer, d as SysWeb, t as argChk_Boolean, e as argChk_Num };
|
|
653
169
|
|
|
654
170
|
//# sourceMappingURL=web.js.map
|