f_00000c 89 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874
  1. import {
  2. require_lodash
  3. } from "/node_modules/.vite/deps/chunk-UFOLZL4F.js?v=9548b9c3";
  4. import {
  5. computed,
  6. defineComponent,
  7. inject,
  8. isProxy,
  9. markRaw,
  10. onUnmounted,
  11. provide,
  12. reactive,
  13. watch
  14. } from "/node_modules/.vite/deps/chunk-LJEY6MVM.js?v=9548b9c3";
  15. import {
  16. __commonJS,
  17. __export,
  18. __publicField,
  19. __toESM
  20. } from "/node_modules/.vite/deps/chunk-WQG2LZMB.js?v=9548b9c3";
  21. // node_modules/queenjs/node_modules/axios/lib/helpers/bind.js
  22. var require_bind = __commonJS({
  23. "node_modules/queenjs/node_modules/axios/lib/helpers/bind.js"(exports, module) {
  24. "use strict";
  25. module.exports = function bind(fn, thisArg) {
  26. return function wrap() {
  27. var args = new Array(arguments.length);
  28. for (var i = 0; i < args.length; i++) {
  29. args[i] = arguments[i];
  30. }
  31. return fn.apply(thisArg, args);
  32. };
  33. };
  34. }
  35. });
  36. // node_modules/queenjs/node_modules/axios/lib/utils.js
  37. var require_utils = __commonJS({
  38. "node_modules/queenjs/node_modules/axios/lib/utils.js"(exports, module) {
  39. "use strict";
  40. var bind = require_bind();
  41. var toString = Object.prototype.toString;
  42. var kindOf = function(cache) {
  43. return function(thing) {
  44. var str = toString.call(thing);
  45. return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
  46. };
  47. }(/* @__PURE__ */ Object.create(null));
  48. function kindOfTest(type) {
  49. type = type.toLowerCase();
  50. return function isKindOf(thing) {
  51. return kindOf(thing) === type;
  52. };
  53. }
  54. function isArray(val) {
  55. return Array.isArray(val);
  56. }
  57. function isUndefined(val) {
  58. return typeof val === "undefined";
  59. }
  60. function isBuffer(val) {
  61. return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && typeof val.constructor.isBuffer === "function" && val.constructor.isBuffer(val);
  62. }
  63. var isArrayBuffer = kindOfTest("ArrayBuffer");
  64. function isArrayBufferView(val) {
  65. var result;
  66. if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
  67. result = ArrayBuffer.isView(val);
  68. } else {
  69. result = val && val.buffer && isArrayBuffer(val.buffer);
  70. }
  71. return result;
  72. }
  73. function isString(val) {
  74. return typeof val === "string";
  75. }
  76. function isNumber(val) {
  77. return typeof val === "number";
  78. }
  79. function isObject(val) {
  80. return val !== null && typeof val === "object";
  81. }
  82. function isPlainObject(val) {
  83. if (kindOf(val) !== "object") {
  84. return false;
  85. }
  86. var prototype = Object.getPrototypeOf(val);
  87. return prototype === null || prototype === Object.prototype;
  88. }
  89. var isDate = kindOfTest("Date");
  90. var isFile = kindOfTest("File");
  91. var isBlob = kindOfTest("Blob");
  92. var isFileList = kindOfTest("FileList");
  93. function isFunction(val) {
  94. return toString.call(val) === "[object Function]";
  95. }
  96. function isStream(val) {
  97. return isObject(val) && isFunction(val.pipe);
  98. }
  99. function isFormData(thing) {
  100. var pattern = "[object FormData]";
  101. return thing && (typeof FormData === "function" && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern);
  102. }
  103. var isURLSearchParams = kindOfTest("URLSearchParams");
  104. function trim(str) {
  105. return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, "");
  106. }
  107. function isStandardBrowserEnv() {
  108. if (typeof navigator !== "undefined" && (navigator.product === "ReactNative" || navigator.product === "NativeScript" || navigator.product === "NS")) {
  109. return false;
  110. }
  111. return typeof window !== "undefined" && typeof document !== "undefined";
  112. }
  113. function forEach(obj, fn) {
  114. if (obj === null || typeof obj === "undefined") {
  115. return;
  116. }
  117. if (typeof obj !== "object") {
  118. obj = [obj];
  119. }
  120. if (isArray(obj)) {
  121. for (var i = 0, l = obj.length; i < l; i++) {
  122. fn.call(null, obj[i], i, obj);
  123. }
  124. } else {
  125. for (var key in obj) {
  126. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  127. fn.call(null, obj[key], key, obj);
  128. }
  129. }
  130. }
  131. }
  132. function merge() {
  133. var result = {};
  134. function assignValue(val, key) {
  135. if (isPlainObject(result[key]) && isPlainObject(val)) {
  136. result[key] = merge(result[key], val);
  137. } else if (isPlainObject(val)) {
  138. result[key] = merge({}, val);
  139. } else if (isArray(val)) {
  140. result[key] = val.slice();
  141. } else {
  142. result[key] = val;
  143. }
  144. }
  145. for (var i = 0, l = arguments.length; i < l; i++) {
  146. forEach(arguments[i], assignValue);
  147. }
  148. return result;
  149. }
  150. function extend(a, b, thisArg) {
  151. forEach(b, function assignValue(val, key) {
  152. if (thisArg && typeof val === "function") {
  153. a[key] = bind(val, thisArg);
  154. } else {
  155. a[key] = val;
  156. }
  157. });
  158. return a;
  159. }
  160. function stripBOM(content) {
  161. if (content.charCodeAt(0) === 65279) {
  162. content = content.slice(1);
  163. }
  164. return content;
  165. }
  166. function inherits(constructor, superConstructor, props, descriptors) {
  167. constructor.prototype = Object.create(superConstructor.prototype, descriptors);
  168. constructor.prototype.constructor = constructor;
  169. props && Object.assign(constructor.prototype, props);
  170. }
  171. function toFlatObject(sourceObj, destObj, filter) {
  172. var props;
  173. var i;
  174. var prop;
  175. var merged = {};
  176. destObj = destObj || {};
  177. do {
  178. props = Object.getOwnPropertyNames(sourceObj);
  179. i = props.length;
  180. while (i-- > 0) {
  181. prop = props[i];
  182. if (!merged[prop]) {
  183. destObj[prop] = sourceObj[prop];
  184. merged[prop] = true;
  185. }
  186. }
  187. sourceObj = Object.getPrototypeOf(sourceObj);
  188. } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
  189. return destObj;
  190. }
  191. function endsWith(str, searchString, position) {
  192. str = String(str);
  193. if (position === void 0 || position > str.length) {
  194. position = str.length;
  195. }
  196. position -= searchString.length;
  197. var lastIndex = str.indexOf(searchString, position);
  198. return lastIndex !== -1 && lastIndex === position;
  199. }
  200. function toArray(thing) {
  201. if (!thing)
  202. return null;
  203. var i = thing.length;
  204. if (isUndefined(i))
  205. return null;
  206. var arr = new Array(i);
  207. while (i-- > 0) {
  208. arr[i] = thing[i];
  209. }
  210. return arr;
  211. }
  212. var isTypedArray = function(TypedArray) {
  213. return function(thing) {
  214. return TypedArray && thing instanceof TypedArray;
  215. };
  216. }(typeof Uint8Array !== "undefined" && Object.getPrototypeOf(Uint8Array));
  217. module.exports = {
  218. isArray,
  219. isArrayBuffer,
  220. isBuffer,
  221. isFormData,
  222. isArrayBufferView,
  223. isString,
  224. isNumber,
  225. isObject,
  226. isPlainObject,
  227. isUndefined,
  228. isDate,
  229. isFile,
  230. isBlob,
  231. isFunction,
  232. isStream,
  233. isURLSearchParams,
  234. isStandardBrowserEnv,
  235. forEach,
  236. merge,
  237. extend,
  238. trim,
  239. stripBOM,
  240. inherits,
  241. toFlatObject,
  242. kindOf,
  243. kindOfTest,
  244. endsWith,
  245. toArray,
  246. isTypedArray,
  247. isFileList
  248. };
  249. }
  250. });
  251. // node_modules/queenjs/node_modules/axios/lib/helpers/buildURL.js
  252. var require_buildURL = __commonJS({
  253. "node_modules/queenjs/node_modules/axios/lib/helpers/buildURL.js"(exports, module) {
  254. "use strict";
  255. var utils = require_utils();
  256. function encode(val) {
  257. return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
  258. }
  259. module.exports = function buildURL(url, params, paramsSerializer) {
  260. if (!params) {
  261. return url;
  262. }
  263. var serializedParams;
  264. if (paramsSerializer) {
  265. serializedParams = paramsSerializer(params);
  266. } else if (utils.isURLSearchParams(params)) {
  267. serializedParams = params.toString();
  268. } else {
  269. var parts = [];
  270. utils.forEach(params, function serialize(val, key) {
  271. if (val === null || typeof val === "undefined") {
  272. return;
  273. }
  274. if (utils.isArray(val)) {
  275. key = key + "[]";
  276. } else {
  277. val = [val];
  278. }
  279. utils.forEach(val, function parseValue(v) {
  280. if (utils.isDate(v)) {
  281. v = v.toISOString();
  282. } else if (utils.isObject(v)) {
  283. v = JSON.stringify(v);
  284. }
  285. parts.push(encode(key) + "=" + encode(v));
  286. });
  287. });
  288. serializedParams = parts.join("&");
  289. }
  290. if (serializedParams) {
  291. var hashmarkIndex = url.indexOf("#");
  292. if (hashmarkIndex !== -1) {
  293. url = url.slice(0, hashmarkIndex);
  294. }
  295. url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  296. }
  297. return url;
  298. };
  299. }
  300. });
  301. // node_modules/queenjs/node_modules/axios/lib/core/InterceptorManager.js
  302. var require_InterceptorManager = __commonJS({
  303. "node_modules/queenjs/node_modules/axios/lib/core/InterceptorManager.js"(exports, module) {
  304. "use strict";
  305. var utils = require_utils();
  306. function InterceptorManager() {
  307. this.handlers = [];
  308. }
  309. InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
  310. this.handlers.push({
  311. fulfilled,
  312. rejected,
  313. synchronous: options ? options.synchronous : false,
  314. runWhen: options ? options.runWhen : null
  315. });
  316. return this.handlers.length - 1;
  317. };
  318. InterceptorManager.prototype.eject = function eject(id) {
  319. if (this.handlers[id]) {
  320. this.handlers[id] = null;
  321. }
  322. };
  323. InterceptorManager.prototype.forEach = function forEach(fn) {
  324. utils.forEach(this.handlers, function forEachHandler(h) {
  325. if (h !== null) {
  326. fn(h);
  327. }
  328. });
  329. };
  330. module.exports = InterceptorManager;
  331. }
  332. });
  333. // node_modules/queenjs/node_modules/axios/lib/helpers/normalizeHeaderName.js
  334. var require_normalizeHeaderName = __commonJS({
  335. "node_modules/queenjs/node_modules/axios/lib/helpers/normalizeHeaderName.js"(exports, module) {
  336. "use strict";
  337. var utils = require_utils();
  338. module.exports = function normalizeHeaderName(headers, normalizedName) {
  339. utils.forEach(headers, function processHeader(value, name) {
  340. if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
  341. headers[normalizedName] = value;
  342. delete headers[name];
  343. }
  344. });
  345. };
  346. }
  347. });
  348. // node_modules/queenjs/node_modules/axios/lib/core/AxiosError.js
  349. var require_AxiosError = __commonJS({
  350. "node_modules/queenjs/node_modules/axios/lib/core/AxiosError.js"(exports, module) {
  351. "use strict";
  352. var utils = require_utils();
  353. function AxiosError(message, code, config, request, response) {
  354. Error.call(this);
  355. this.message = message;
  356. this.name = "AxiosError";
  357. code && (this.code = code);
  358. config && (this.config = config);
  359. request && (this.request = request);
  360. response && (this.response = response);
  361. }
  362. utils.inherits(AxiosError, Error, {
  363. toJSON: function toJSON() {
  364. return {
  365. // Standard
  366. message: this.message,
  367. name: this.name,
  368. // Microsoft
  369. description: this.description,
  370. number: this.number,
  371. // Mozilla
  372. fileName: this.fileName,
  373. lineNumber: this.lineNumber,
  374. columnNumber: this.columnNumber,
  375. stack: this.stack,
  376. // Axios
  377. config: this.config,
  378. code: this.code,
  379. status: this.response && this.response.status ? this.response.status : null
  380. };
  381. }
  382. });
  383. var prototype = AxiosError.prototype;
  384. var descriptors = {};
  385. [
  386. "ERR_BAD_OPTION_VALUE",
  387. "ERR_BAD_OPTION",
  388. "ECONNABORTED",
  389. "ETIMEDOUT",
  390. "ERR_NETWORK",
  391. "ERR_FR_TOO_MANY_REDIRECTS",
  392. "ERR_DEPRECATED",
  393. "ERR_BAD_RESPONSE",
  394. "ERR_BAD_REQUEST",
  395. "ERR_CANCELED"
  396. // eslint-disable-next-line func-names
  397. ].forEach(function(code) {
  398. descriptors[code] = { value: code };
  399. });
  400. Object.defineProperties(AxiosError, descriptors);
  401. Object.defineProperty(prototype, "isAxiosError", { value: true });
  402. AxiosError.from = function(error, code, config, request, response, customProps) {
  403. var axiosError = Object.create(prototype);
  404. utils.toFlatObject(error, axiosError, function filter(obj) {
  405. return obj !== Error.prototype;
  406. });
  407. AxiosError.call(axiosError, error.message, code, config, request, response);
  408. axiosError.name = error.name;
  409. customProps && Object.assign(axiosError, customProps);
  410. return axiosError;
  411. };
  412. module.exports = AxiosError;
  413. }
  414. });
  415. // node_modules/queenjs/node_modules/axios/lib/defaults/transitional.js
  416. var require_transitional = __commonJS({
  417. "node_modules/queenjs/node_modules/axios/lib/defaults/transitional.js"(exports, module) {
  418. "use strict";
  419. module.exports = {
  420. silentJSONParsing: true,
  421. forcedJSONParsing: true,
  422. clarifyTimeoutError: false
  423. };
  424. }
  425. });
  426. // node_modules/queenjs/node_modules/axios/lib/helpers/toFormData.js
  427. var require_toFormData = __commonJS({
  428. "node_modules/queenjs/node_modules/axios/lib/helpers/toFormData.js"(exports, module) {
  429. "use strict";
  430. var utils = require_utils();
  431. function toFormData(obj, formData) {
  432. formData = formData || new FormData();
  433. var stack = [];
  434. function convertValue(value) {
  435. if (value === null)
  436. return "";
  437. if (utils.isDate(value)) {
  438. return value.toISOString();
  439. }
  440. if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
  441. return typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
  442. }
  443. return value;
  444. }
  445. function build(data, parentKey) {
  446. if (utils.isPlainObject(data) || utils.isArray(data)) {
  447. if (stack.indexOf(data) !== -1) {
  448. throw Error("Circular reference detected in " + parentKey);
  449. }
  450. stack.push(data);
  451. utils.forEach(data, function each(value, key) {
  452. if (utils.isUndefined(value))
  453. return;
  454. var fullKey = parentKey ? parentKey + "." + key : key;
  455. var arr;
  456. if (value && !parentKey && typeof value === "object") {
  457. if (utils.endsWith(key, "{}")) {
  458. value = JSON.stringify(value);
  459. } else if (utils.endsWith(key, "[]") && (arr = utils.toArray(value))) {
  460. arr.forEach(function(el) {
  461. !utils.isUndefined(el) && formData.append(fullKey, convertValue(el));
  462. });
  463. return;
  464. }
  465. }
  466. build(value, fullKey);
  467. });
  468. stack.pop();
  469. } else {
  470. formData.append(parentKey, convertValue(data));
  471. }
  472. }
  473. build(obj);
  474. return formData;
  475. }
  476. module.exports = toFormData;
  477. }
  478. });
  479. // node_modules/queenjs/node_modules/axios/lib/core/settle.js
  480. var require_settle = __commonJS({
  481. "node_modules/queenjs/node_modules/axios/lib/core/settle.js"(exports, module) {
  482. "use strict";
  483. var AxiosError = require_AxiosError();
  484. module.exports = function settle(resolve, reject, response) {
  485. var validateStatus = response.config.validateStatus;
  486. if (!response.status || !validateStatus || validateStatus(response.status)) {
  487. resolve(response);
  488. } else {
  489. reject(new AxiosError(
  490. "Request failed with status code " + response.status,
  491. [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
  492. response.config,
  493. response.request,
  494. response
  495. ));
  496. }
  497. };
  498. }
  499. });
  500. // node_modules/queenjs/node_modules/axios/lib/helpers/cookies.js
  501. var require_cookies = __commonJS({
  502. "node_modules/queenjs/node_modules/axios/lib/helpers/cookies.js"(exports, module) {
  503. "use strict";
  504. var utils = require_utils();
  505. module.exports = utils.isStandardBrowserEnv() ? (
  506. // Standard browser envs support document.cookie
  507. function standardBrowserEnv() {
  508. return {
  509. write: function write(name, value, expires, path, domain, secure) {
  510. var cookie = [];
  511. cookie.push(name + "=" + encodeURIComponent(value));
  512. if (utils.isNumber(expires)) {
  513. cookie.push("expires=" + new Date(expires).toGMTString());
  514. }
  515. if (utils.isString(path)) {
  516. cookie.push("path=" + path);
  517. }
  518. if (utils.isString(domain)) {
  519. cookie.push("domain=" + domain);
  520. }
  521. if (secure === true) {
  522. cookie.push("secure");
  523. }
  524. document.cookie = cookie.join("; ");
  525. },
  526. read: function read(name) {
  527. var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
  528. return match ? decodeURIComponent(match[3]) : null;
  529. },
  530. remove: function remove(name) {
  531. this.write(name, "", Date.now() - 864e5);
  532. }
  533. };
  534. }()
  535. ) : (
  536. // Non standard browser env (web workers, react-native) lack needed support.
  537. function nonStandardBrowserEnv() {
  538. return {
  539. write: function write() {
  540. },
  541. read: function read() {
  542. return null;
  543. },
  544. remove: function remove() {
  545. }
  546. };
  547. }()
  548. );
  549. }
  550. });
  551. // node_modules/queenjs/node_modules/axios/lib/helpers/isAbsoluteURL.js
  552. var require_isAbsoluteURL = __commonJS({
  553. "node_modules/queenjs/node_modules/axios/lib/helpers/isAbsoluteURL.js"(exports, module) {
  554. "use strict";
  555. module.exports = function isAbsoluteURL(url) {
  556. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
  557. };
  558. }
  559. });
  560. // node_modules/queenjs/node_modules/axios/lib/helpers/combineURLs.js
  561. var require_combineURLs = __commonJS({
  562. "node_modules/queenjs/node_modules/axios/lib/helpers/combineURLs.js"(exports, module) {
  563. "use strict";
  564. module.exports = function combineURLs(baseURL, relativeURL) {
  565. return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
  566. };
  567. }
  568. });
  569. // node_modules/queenjs/node_modules/axios/lib/core/buildFullPath.js
  570. var require_buildFullPath = __commonJS({
  571. "node_modules/queenjs/node_modules/axios/lib/core/buildFullPath.js"(exports, module) {
  572. "use strict";
  573. var isAbsoluteURL = require_isAbsoluteURL();
  574. var combineURLs = require_combineURLs();
  575. module.exports = function buildFullPath(baseURL, requestedURL) {
  576. if (baseURL && !isAbsoluteURL(requestedURL)) {
  577. return combineURLs(baseURL, requestedURL);
  578. }
  579. return requestedURL;
  580. };
  581. }
  582. });
  583. // node_modules/queenjs/node_modules/axios/lib/helpers/parseHeaders.js
  584. var require_parseHeaders = __commonJS({
  585. "node_modules/queenjs/node_modules/axios/lib/helpers/parseHeaders.js"(exports, module) {
  586. "use strict";
  587. var utils = require_utils();
  588. var ignoreDuplicateOf = [
  589. "age",
  590. "authorization",
  591. "content-length",
  592. "content-type",
  593. "etag",
  594. "expires",
  595. "from",
  596. "host",
  597. "if-modified-since",
  598. "if-unmodified-since",
  599. "last-modified",
  600. "location",
  601. "max-forwards",
  602. "proxy-authorization",
  603. "referer",
  604. "retry-after",
  605. "user-agent"
  606. ];
  607. module.exports = function parseHeaders(headers) {
  608. var parsed = {};
  609. var key;
  610. var val;
  611. var i;
  612. if (!headers) {
  613. return parsed;
  614. }
  615. utils.forEach(headers.split("\n"), function parser(line) {
  616. i = line.indexOf(":");
  617. key = utils.trim(line.substr(0, i)).toLowerCase();
  618. val = utils.trim(line.substr(i + 1));
  619. if (key) {
  620. if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
  621. return;
  622. }
  623. if (key === "set-cookie") {
  624. parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
  625. } else {
  626. parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
  627. }
  628. }
  629. });
  630. return parsed;
  631. };
  632. }
  633. });
  634. // node_modules/queenjs/node_modules/axios/lib/helpers/isURLSameOrigin.js
  635. var require_isURLSameOrigin = __commonJS({
  636. "node_modules/queenjs/node_modules/axios/lib/helpers/isURLSameOrigin.js"(exports, module) {
  637. "use strict";
  638. var utils = require_utils();
  639. module.exports = utils.isStandardBrowserEnv() ? (
  640. // Standard browser envs have full support of the APIs needed to test
  641. // whether the request URL is of the same origin as current location.
  642. function standardBrowserEnv() {
  643. var msie = /(msie|trident)/i.test(navigator.userAgent);
  644. var urlParsingNode = document.createElement("a");
  645. var originURL;
  646. function resolveURL(url) {
  647. var href = url;
  648. if (msie) {
  649. urlParsingNode.setAttribute("href", href);
  650. href = urlParsingNode.href;
  651. }
  652. urlParsingNode.setAttribute("href", href);
  653. return {
  654. href: urlParsingNode.href,
  655. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
  656. host: urlParsingNode.host,
  657. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
  658. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
  659. hostname: urlParsingNode.hostname,
  660. port: urlParsingNode.port,
  661. pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
  662. };
  663. }
  664. originURL = resolveURL(window.location.href);
  665. return function isURLSameOrigin(requestURL) {
  666. var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;
  667. return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
  668. };
  669. }()
  670. ) : (
  671. // Non standard browser envs (web workers, react-native) lack needed support.
  672. function nonStandardBrowserEnv() {
  673. return function isURLSameOrigin() {
  674. return true;
  675. };
  676. }()
  677. );
  678. }
  679. });
  680. // node_modules/queenjs/node_modules/axios/lib/cancel/CanceledError.js
  681. var require_CanceledError = __commonJS({
  682. "node_modules/queenjs/node_modules/axios/lib/cancel/CanceledError.js"(exports, module) {
  683. "use strict";
  684. var AxiosError = require_AxiosError();
  685. var utils = require_utils();
  686. function CanceledError(message) {
  687. AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED);
  688. this.name = "CanceledError";
  689. }
  690. utils.inherits(CanceledError, AxiosError, {
  691. __CANCEL__: true
  692. });
  693. module.exports = CanceledError;
  694. }
  695. });
  696. // node_modules/queenjs/node_modules/axios/lib/helpers/parseProtocol.js
  697. var require_parseProtocol = __commonJS({
  698. "node_modules/queenjs/node_modules/axios/lib/helpers/parseProtocol.js"(exports, module) {
  699. "use strict";
  700. module.exports = function parseProtocol(url) {
  701. var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
  702. return match && match[1] || "";
  703. };
  704. }
  705. });
  706. // node_modules/queenjs/node_modules/axios/lib/adapters/xhr.js
  707. var require_xhr = __commonJS({
  708. "node_modules/queenjs/node_modules/axios/lib/adapters/xhr.js"(exports, module) {
  709. "use strict";
  710. var utils = require_utils();
  711. var settle = require_settle();
  712. var cookies = require_cookies();
  713. var buildURL = require_buildURL();
  714. var buildFullPath = require_buildFullPath();
  715. var parseHeaders = require_parseHeaders();
  716. var isURLSameOrigin = require_isURLSameOrigin();
  717. var transitionalDefaults = require_transitional();
  718. var AxiosError = require_AxiosError();
  719. var CanceledError = require_CanceledError();
  720. var parseProtocol = require_parseProtocol();
  721. module.exports = function xhrAdapter(config) {
  722. return new Promise(function dispatchXhrRequest(resolve, reject) {
  723. var requestData = config.data;
  724. var requestHeaders = config.headers;
  725. var responseType = config.responseType;
  726. var onCanceled;
  727. function done() {
  728. if (config.cancelToken) {
  729. config.cancelToken.unsubscribe(onCanceled);
  730. }
  731. if (config.signal) {
  732. config.signal.removeEventListener("abort", onCanceled);
  733. }
  734. }
  735. if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
  736. delete requestHeaders["Content-Type"];
  737. }
  738. var request = new XMLHttpRequest();
  739. if (config.auth) {
  740. var username = config.auth.username || "";
  741. var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
  742. requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
  743. }
  744. var fullPath = buildFullPath(config.baseURL, config.url);
  745. request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
  746. request.timeout = config.timeout;
  747. function onloadend() {
  748. if (!request) {
  749. return;
  750. }
  751. var responseHeaders = "getAllResponseHeaders" in request ? parseHeaders(request.getAllResponseHeaders()) : null;
  752. var responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
  753. var response = {
  754. data: responseData,
  755. status: request.status,
  756. statusText: request.statusText,
  757. headers: responseHeaders,
  758. config,
  759. request
  760. };
  761. settle(function _resolve(value) {
  762. resolve(value);
  763. done();
  764. }, function _reject(err) {
  765. reject(err);
  766. done();
  767. }, response);
  768. request = null;
  769. }
  770. if ("onloadend" in request) {
  771. request.onloadend = onloadend;
  772. } else {
  773. request.onreadystatechange = function handleLoad() {
  774. if (!request || request.readyState !== 4) {
  775. return;
  776. }
  777. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
  778. return;
  779. }
  780. setTimeout(onloadend);
  781. };
  782. }
  783. request.onabort = function handleAbort() {
  784. if (!request) {
  785. return;
  786. }
  787. reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
  788. request = null;
  789. };
  790. request.onerror = function handleError() {
  791. reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, request));
  792. request = null;
  793. };
  794. request.ontimeout = function handleTimeout() {
  795. var timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
  796. var transitional = config.transitional || transitionalDefaults;
  797. if (config.timeoutErrorMessage) {
  798. timeoutErrorMessage = config.timeoutErrorMessage;
  799. }
  800. reject(new AxiosError(
  801. timeoutErrorMessage,
  802. transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
  803. config,
  804. request
  805. ));
  806. request = null;
  807. };
  808. if (utils.isStandardBrowserEnv()) {
  809. var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : void 0;
  810. if (xsrfValue) {
  811. requestHeaders[config.xsrfHeaderName] = xsrfValue;
  812. }
  813. }
  814. if ("setRequestHeader" in request) {
  815. utils.forEach(requestHeaders, function setRequestHeader(val, key) {
  816. if (typeof requestData === "undefined" && key.toLowerCase() === "content-type") {
  817. delete requestHeaders[key];
  818. } else {
  819. request.setRequestHeader(key, val);
  820. }
  821. });
  822. }
  823. if (!utils.isUndefined(config.withCredentials)) {
  824. request.withCredentials = !!config.withCredentials;
  825. }
  826. if (responseType && responseType !== "json") {
  827. request.responseType = config.responseType;
  828. }
  829. if (typeof config.onDownloadProgress === "function") {
  830. request.addEventListener("progress", config.onDownloadProgress);
  831. }
  832. if (typeof config.onUploadProgress === "function" && request.upload) {
  833. request.upload.addEventListener("progress", config.onUploadProgress);
  834. }
  835. if (config.cancelToken || config.signal) {
  836. onCanceled = function(cancel) {
  837. if (!request) {
  838. return;
  839. }
  840. reject(!cancel || cancel && cancel.type ? new CanceledError() : cancel);
  841. request.abort();
  842. request = null;
  843. };
  844. config.cancelToken && config.cancelToken.subscribe(onCanceled);
  845. if (config.signal) {
  846. config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
  847. }
  848. }
  849. if (!requestData) {
  850. requestData = null;
  851. }
  852. var protocol = parseProtocol(fullPath);
  853. if (protocol && ["http", "https", "file"].indexOf(protocol) === -1) {
  854. reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
  855. return;
  856. }
  857. request.send(requestData);
  858. });
  859. };
  860. }
  861. });
  862. // node_modules/queenjs/node_modules/axios/lib/helpers/null.js
  863. var require_null = __commonJS({
  864. "node_modules/queenjs/node_modules/axios/lib/helpers/null.js"(exports, module) {
  865. module.exports = null;
  866. }
  867. });
  868. // node_modules/queenjs/node_modules/axios/lib/defaults/index.js
  869. var require_defaults = __commonJS({
  870. "node_modules/queenjs/node_modules/axios/lib/defaults/index.js"(exports, module) {
  871. "use strict";
  872. var utils = require_utils();
  873. var normalizeHeaderName = require_normalizeHeaderName();
  874. var AxiosError = require_AxiosError();
  875. var transitionalDefaults = require_transitional();
  876. var toFormData = require_toFormData();
  877. var DEFAULT_CONTENT_TYPE = {
  878. "Content-Type": "application/x-www-form-urlencoded"
  879. };
  880. function setContentTypeIfUnset(headers, value) {
  881. if (!utils.isUndefined(headers) && utils.isUndefined(headers["Content-Type"])) {
  882. headers["Content-Type"] = value;
  883. }
  884. }
  885. function getDefaultAdapter() {
  886. var adapter;
  887. if (typeof XMLHttpRequest !== "undefined") {
  888. adapter = require_xhr();
  889. } else if (typeof process !== "undefined" && Object.prototype.toString.call(process) === "[object process]") {
  890. adapter = require_xhr();
  891. }
  892. return adapter;
  893. }
  894. function stringifySafely(rawValue, parser, encoder) {
  895. if (utils.isString(rawValue)) {
  896. try {
  897. (parser || JSON.parse)(rawValue);
  898. return utils.trim(rawValue);
  899. } catch (e) {
  900. if (e.name !== "SyntaxError") {
  901. throw e;
  902. }
  903. }
  904. }
  905. return (encoder || JSON.stringify)(rawValue);
  906. }
  907. var defaults = {
  908. transitional: transitionalDefaults,
  909. adapter: getDefaultAdapter(),
  910. transformRequest: [function transformRequest(data, headers) {
  911. normalizeHeaderName(headers, "Accept");
  912. normalizeHeaderName(headers, "Content-Type");
  913. if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
  914. return data;
  915. }
  916. if (utils.isArrayBufferView(data)) {
  917. return data.buffer;
  918. }
  919. if (utils.isURLSearchParams(data)) {
  920. setContentTypeIfUnset(headers, "application/x-www-form-urlencoded;charset=utf-8");
  921. return data.toString();
  922. }
  923. var isObjectPayload = utils.isObject(data);
  924. var contentType = headers && headers["Content-Type"];
  925. var isFileList;
  926. if ((isFileList = utils.isFileList(data)) || isObjectPayload && contentType === "multipart/form-data") {
  927. var _FormData = this.env && this.env.FormData;
  928. return toFormData(isFileList ? { "files[]": data } : data, _FormData && new _FormData());
  929. } else if (isObjectPayload || contentType === "application/json") {
  930. setContentTypeIfUnset(headers, "application/json");
  931. return stringifySafely(data);
  932. }
  933. return data;
  934. }],
  935. transformResponse: [function transformResponse(data) {
  936. var transitional = this.transitional || defaults.transitional;
  937. var silentJSONParsing = transitional && transitional.silentJSONParsing;
  938. var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
  939. var strictJSONParsing = !silentJSONParsing && this.responseType === "json";
  940. if (strictJSONParsing || forcedJSONParsing && utils.isString(data) && data.length) {
  941. try {
  942. return JSON.parse(data);
  943. } catch (e) {
  944. if (strictJSONParsing) {
  945. if (e.name === "SyntaxError") {
  946. throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
  947. }
  948. throw e;
  949. }
  950. }
  951. }
  952. return data;
  953. }],
  954. /**
  955. * A timeout in milliseconds to abort a request. If set to 0 (default) a
  956. * timeout is not created.
  957. */
  958. timeout: 0,
  959. xsrfCookieName: "XSRF-TOKEN",
  960. xsrfHeaderName: "X-XSRF-TOKEN",
  961. maxContentLength: -1,
  962. maxBodyLength: -1,
  963. env: {
  964. FormData: require_null()
  965. },
  966. validateStatus: function validateStatus(status) {
  967. return status >= 200 && status < 300;
  968. },
  969. headers: {
  970. common: {
  971. "Accept": "application/json, text/plain, */*"
  972. }
  973. }
  974. };
  975. utils.forEach(["delete", "get", "head"], function forEachMethodNoData(method) {
  976. defaults.headers[method] = {};
  977. });
  978. utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
  979. defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
  980. });
  981. module.exports = defaults;
  982. }
  983. });
  984. // node_modules/queenjs/node_modules/axios/lib/core/transformData.js
  985. var require_transformData = __commonJS({
  986. "node_modules/queenjs/node_modules/axios/lib/core/transformData.js"(exports, module) {
  987. "use strict";
  988. var utils = require_utils();
  989. var defaults = require_defaults();
  990. module.exports = function transformData(data, headers, fns) {
  991. var context = this || defaults;
  992. utils.forEach(fns, function transform(fn) {
  993. data = fn.call(context, data, headers);
  994. });
  995. return data;
  996. };
  997. }
  998. });
  999. // node_modules/queenjs/node_modules/axios/lib/cancel/isCancel.js
  1000. var require_isCancel = __commonJS({
  1001. "node_modules/queenjs/node_modules/axios/lib/cancel/isCancel.js"(exports, module) {
  1002. "use strict";
  1003. module.exports = function isCancel(value) {
  1004. return !!(value && value.__CANCEL__);
  1005. };
  1006. }
  1007. });
  1008. // node_modules/queenjs/node_modules/axios/lib/core/dispatchRequest.js
  1009. var require_dispatchRequest = __commonJS({
  1010. "node_modules/queenjs/node_modules/axios/lib/core/dispatchRequest.js"(exports, module) {
  1011. "use strict";
  1012. var utils = require_utils();
  1013. var transformData = require_transformData();
  1014. var isCancel = require_isCancel();
  1015. var defaults = require_defaults();
  1016. var CanceledError = require_CanceledError();
  1017. function throwIfCancellationRequested(config) {
  1018. if (config.cancelToken) {
  1019. config.cancelToken.throwIfRequested();
  1020. }
  1021. if (config.signal && config.signal.aborted) {
  1022. throw new CanceledError();
  1023. }
  1024. }
  1025. module.exports = function dispatchRequest(config) {
  1026. throwIfCancellationRequested(config);
  1027. config.headers = config.headers || {};
  1028. config.data = transformData.call(
  1029. config,
  1030. config.data,
  1031. config.headers,
  1032. config.transformRequest
  1033. );
  1034. config.headers = utils.merge(
  1035. config.headers.common || {},
  1036. config.headers[config.method] || {},
  1037. config.headers
  1038. );
  1039. utils.forEach(
  1040. ["delete", "get", "head", "post", "put", "patch", "common"],
  1041. function cleanHeaderConfig(method) {
  1042. delete config.headers[method];
  1043. }
  1044. );
  1045. var adapter = config.adapter || defaults.adapter;
  1046. return adapter(config).then(function onAdapterResolution(response) {
  1047. throwIfCancellationRequested(config);
  1048. response.data = transformData.call(
  1049. config,
  1050. response.data,
  1051. response.headers,
  1052. config.transformResponse
  1053. );
  1054. return response;
  1055. }, function onAdapterRejection(reason) {
  1056. if (!isCancel(reason)) {
  1057. throwIfCancellationRequested(config);
  1058. if (reason && reason.response) {
  1059. reason.response.data = transformData.call(
  1060. config,
  1061. reason.response.data,
  1062. reason.response.headers,
  1063. config.transformResponse
  1064. );
  1065. }
  1066. }
  1067. return Promise.reject(reason);
  1068. });
  1069. };
  1070. }
  1071. });
  1072. // node_modules/queenjs/node_modules/axios/lib/core/mergeConfig.js
  1073. var require_mergeConfig = __commonJS({
  1074. "node_modules/queenjs/node_modules/axios/lib/core/mergeConfig.js"(exports, module) {
  1075. "use strict";
  1076. var utils = require_utils();
  1077. module.exports = function mergeConfig(config1, config2) {
  1078. config2 = config2 || {};
  1079. var config = {};
  1080. function getMergedValue(target, source) {
  1081. if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
  1082. return utils.merge(target, source);
  1083. } else if (utils.isPlainObject(source)) {
  1084. return utils.merge({}, source);
  1085. } else if (utils.isArray(source)) {
  1086. return source.slice();
  1087. }
  1088. return source;
  1089. }
  1090. function mergeDeepProperties(prop) {
  1091. if (!utils.isUndefined(config2[prop])) {
  1092. return getMergedValue(config1[prop], config2[prop]);
  1093. } else if (!utils.isUndefined(config1[prop])) {
  1094. return getMergedValue(void 0, config1[prop]);
  1095. }
  1096. }
  1097. function valueFromConfig2(prop) {
  1098. if (!utils.isUndefined(config2[prop])) {
  1099. return getMergedValue(void 0, config2[prop]);
  1100. }
  1101. }
  1102. function defaultToConfig2(prop) {
  1103. if (!utils.isUndefined(config2[prop])) {
  1104. return getMergedValue(void 0, config2[prop]);
  1105. } else if (!utils.isUndefined(config1[prop])) {
  1106. return getMergedValue(void 0, config1[prop]);
  1107. }
  1108. }
  1109. function mergeDirectKeys(prop) {
  1110. if (prop in config2) {
  1111. return getMergedValue(config1[prop], config2[prop]);
  1112. } else if (prop in config1) {
  1113. return getMergedValue(void 0, config1[prop]);
  1114. }
  1115. }
  1116. var mergeMap = {
  1117. "url": valueFromConfig2,
  1118. "method": valueFromConfig2,
  1119. "data": valueFromConfig2,
  1120. "baseURL": defaultToConfig2,
  1121. "transformRequest": defaultToConfig2,
  1122. "transformResponse": defaultToConfig2,
  1123. "paramsSerializer": defaultToConfig2,
  1124. "timeout": defaultToConfig2,
  1125. "timeoutMessage": defaultToConfig2,
  1126. "withCredentials": defaultToConfig2,
  1127. "adapter": defaultToConfig2,
  1128. "responseType": defaultToConfig2,
  1129. "xsrfCookieName": defaultToConfig2,
  1130. "xsrfHeaderName": defaultToConfig2,
  1131. "onUploadProgress": defaultToConfig2,
  1132. "onDownloadProgress": defaultToConfig2,
  1133. "decompress": defaultToConfig2,
  1134. "maxContentLength": defaultToConfig2,
  1135. "maxBodyLength": defaultToConfig2,
  1136. "beforeRedirect": defaultToConfig2,
  1137. "transport": defaultToConfig2,
  1138. "httpAgent": defaultToConfig2,
  1139. "httpsAgent": defaultToConfig2,
  1140. "cancelToken": defaultToConfig2,
  1141. "socketPath": defaultToConfig2,
  1142. "responseEncoding": defaultToConfig2,
  1143. "validateStatus": mergeDirectKeys
  1144. };
  1145. utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
  1146. var merge = mergeMap[prop] || mergeDeepProperties;
  1147. var configValue = merge(prop);
  1148. utils.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
  1149. });
  1150. return config;
  1151. };
  1152. }
  1153. });
  1154. // node_modules/queenjs/node_modules/axios/lib/env/data.js
  1155. var require_data = __commonJS({
  1156. "node_modules/queenjs/node_modules/axios/lib/env/data.js"(exports, module) {
  1157. module.exports = {
  1158. "version": "0.27.2"
  1159. };
  1160. }
  1161. });
  1162. // node_modules/queenjs/node_modules/axios/lib/helpers/validator.js
  1163. var require_validator = __commonJS({
  1164. "node_modules/queenjs/node_modules/axios/lib/helpers/validator.js"(exports, module) {
  1165. "use strict";
  1166. var VERSION = require_data().version;
  1167. var AxiosError = require_AxiosError();
  1168. var validators = {};
  1169. ["object", "boolean", "number", "function", "string", "symbol"].forEach(function(type, i) {
  1170. validators[type] = function validator(thing) {
  1171. return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
  1172. };
  1173. });
  1174. var deprecatedWarnings = {};
  1175. validators.transitional = function transitional(validator, version, message) {
  1176. function formatMessage(opt, desc) {
  1177. return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
  1178. }
  1179. return function(value, opt, opts) {
  1180. if (validator === false) {
  1181. throw new AxiosError(
  1182. formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
  1183. AxiosError.ERR_DEPRECATED
  1184. );
  1185. }
  1186. if (version && !deprecatedWarnings[opt]) {
  1187. deprecatedWarnings[opt] = true;
  1188. console.warn(
  1189. formatMessage(
  1190. opt,
  1191. " has been deprecated since v" + version + " and will be removed in the near future"
  1192. )
  1193. );
  1194. }
  1195. return validator ? validator(value, opt, opts) : true;
  1196. };
  1197. };
  1198. function assertOptions(options, schema, allowUnknown) {
  1199. if (typeof options !== "object") {
  1200. throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
  1201. }
  1202. var keys = Object.keys(options);
  1203. var i = keys.length;
  1204. while (i-- > 0) {
  1205. var opt = keys[i];
  1206. var validator = schema[opt];
  1207. if (validator) {
  1208. var value = options[opt];
  1209. var result = value === void 0 || validator(value, opt, options);
  1210. if (result !== true) {
  1211. throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
  1212. }
  1213. continue;
  1214. }
  1215. if (allowUnknown !== true) {
  1216. throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
  1217. }
  1218. }
  1219. }
  1220. module.exports = {
  1221. assertOptions,
  1222. validators
  1223. };
  1224. }
  1225. });
  1226. // node_modules/queenjs/node_modules/axios/lib/core/Axios.js
  1227. var require_Axios = __commonJS({
  1228. "node_modules/queenjs/node_modules/axios/lib/core/Axios.js"(exports, module) {
  1229. "use strict";
  1230. var utils = require_utils();
  1231. var buildURL = require_buildURL();
  1232. var InterceptorManager = require_InterceptorManager();
  1233. var dispatchRequest = require_dispatchRequest();
  1234. var mergeConfig = require_mergeConfig();
  1235. var buildFullPath = require_buildFullPath();
  1236. var validator = require_validator();
  1237. var validators = validator.validators;
  1238. function Axios(instanceConfig) {
  1239. this.defaults = instanceConfig;
  1240. this.interceptors = {
  1241. request: new InterceptorManager(),
  1242. response: new InterceptorManager()
  1243. };
  1244. }
  1245. Axios.prototype.request = function request(configOrUrl, config) {
  1246. if (typeof configOrUrl === "string") {
  1247. config = config || {};
  1248. config.url = configOrUrl;
  1249. } else {
  1250. config = configOrUrl || {};
  1251. }
  1252. config = mergeConfig(this.defaults, config);
  1253. if (config.method) {
  1254. config.method = config.method.toLowerCase();
  1255. } else if (this.defaults.method) {
  1256. config.method = this.defaults.method.toLowerCase();
  1257. } else {
  1258. config.method = "get";
  1259. }
  1260. var transitional = config.transitional;
  1261. if (transitional !== void 0) {
  1262. validator.assertOptions(transitional, {
  1263. silentJSONParsing: validators.transitional(validators.boolean),
  1264. forcedJSONParsing: validators.transitional(validators.boolean),
  1265. clarifyTimeoutError: validators.transitional(validators.boolean)
  1266. }, false);
  1267. }
  1268. var requestInterceptorChain = [];
  1269. var synchronousRequestInterceptors = true;
  1270. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  1271. if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
  1272. return;
  1273. }
  1274. synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
  1275. requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
  1276. });
  1277. var responseInterceptorChain = [];
  1278. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  1279. responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  1280. });
  1281. var promise;
  1282. if (!synchronousRequestInterceptors) {
  1283. var chain = [dispatchRequest, void 0];
  1284. Array.prototype.unshift.apply(chain, requestInterceptorChain);
  1285. chain = chain.concat(responseInterceptorChain);
  1286. promise = Promise.resolve(config);
  1287. while (chain.length) {
  1288. promise = promise.then(chain.shift(), chain.shift());
  1289. }
  1290. return promise;
  1291. }
  1292. var newConfig = config;
  1293. while (requestInterceptorChain.length) {
  1294. var onFulfilled = requestInterceptorChain.shift();
  1295. var onRejected = requestInterceptorChain.shift();
  1296. try {
  1297. newConfig = onFulfilled(newConfig);
  1298. } catch (error) {
  1299. onRejected(error);
  1300. break;
  1301. }
  1302. }
  1303. try {
  1304. promise = dispatchRequest(newConfig);
  1305. } catch (error) {
  1306. return Promise.reject(error);
  1307. }
  1308. while (responseInterceptorChain.length) {
  1309. promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
  1310. }
  1311. return promise;
  1312. };
  1313. Axios.prototype.getUri = function getUri(config) {
  1314. config = mergeConfig(this.defaults, config);
  1315. var fullPath = buildFullPath(config.baseURL, config.url);
  1316. return buildURL(fullPath, config.params, config.paramsSerializer);
  1317. };
  1318. utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
  1319. Axios.prototype[method] = function(url, config) {
  1320. return this.request(mergeConfig(config || {}, {
  1321. method,
  1322. url,
  1323. data: (config || {}).data
  1324. }));
  1325. };
  1326. });
  1327. utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
  1328. function generateHTTPMethod(isForm) {
  1329. return function httpMethod(url, data, config) {
  1330. return this.request(mergeConfig(config || {}, {
  1331. method,
  1332. headers: isForm ? {
  1333. "Content-Type": "multipart/form-data"
  1334. } : {},
  1335. url,
  1336. data
  1337. }));
  1338. };
  1339. }
  1340. Axios.prototype[method] = generateHTTPMethod();
  1341. Axios.prototype[method + "Form"] = generateHTTPMethod(true);
  1342. });
  1343. module.exports = Axios;
  1344. }
  1345. });
  1346. // node_modules/queenjs/node_modules/axios/lib/cancel/CancelToken.js
  1347. var require_CancelToken = __commonJS({
  1348. "node_modules/queenjs/node_modules/axios/lib/cancel/CancelToken.js"(exports, module) {
  1349. "use strict";
  1350. var CanceledError = require_CanceledError();
  1351. function CancelToken(executor) {
  1352. if (typeof executor !== "function") {
  1353. throw new TypeError("executor must be a function.");
  1354. }
  1355. var resolvePromise;
  1356. this.promise = new Promise(function promiseExecutor(resolve) {
  1357. resolvePromise = resolve;
  1358. });
  1359. var token = this;
  1360. this.promise.then(function(cancel) {
  1361. if (!token._listeners)
  1362. return;
  1363. var i;
  1364. var l = token._listeners.length;
  1365. for (i = 0; i < l; i++) {
  1366. token._listeners[i](cancel);
  1367. }
  1368. token._listeners = null;
  1369. });
  1370. this.promise.then = function(onfulfilled) {
  1371. var _resolve;
  1372. var promise = new Promise(function(resolve) {
  1373. token.subscribe(resolve);
  1374. _resolve = resolve;
  1375. }).then(onfulfilled);
  1376. promise.cancel = function reject() {
  1377. token.unsubscribe(_resolve);
  1378. };
  1379. return promise;
  1380. };
  1381. executor(function cancel(message) {
  1382. if (token.reason) {
  1383. return;
  1384. }
  1385. token.reason = new CanceledError(message);
  1386. resolvePromise(token.reason);
  1387. });
  1388. }
  1389. CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  1390. if (this.reason) {
  1391. throw this.reason;
  1392. }
  1393. };
  1394. CancelToken.prototype.subscribe = function subscribe(listener) {
  1395. if (this.reason) {
  1396. listener(this.reason);
  1397. return;
  1398. }
  1399. if (this._listeners) {
  1400. this._listeners.push(listener);
  1401. } else {
  1402. this._listeners = [listener];
  1403. }
  1404. };
  1405. CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
  1406. if (!this._listeners) {
  1407. return;
  1408. }
  1409. var index = this._listeners.indexOf(listener);
  1410. if (index !== -1) {
  1411. this._listeners.splice(index, 1);
  1412. }
  1413. };
  1414. CancelToken.source = function source() {
  1415. var cancel;
  1416. var token = new CancelToken(function executor(c) {
  1417. cancel = c;
  1418. });
  1419. return {
  1420. token,
  1421. cancel
  1422. };
  1423. };
  1424. module.exports = CancelToken;
  1425. }
  1426. });
  1427. // node_modules/queenjs/node_modules/axios/lib/helpers/spread.js
  1428. var require_spread = __commonJS({
  1429. "node_modules/queenjs/node_modules/axios/lib/helpers/spread.js"(exports, module) {
  1430. "use strict";
  1431. module.exports = function spread(callback) {
  1432. return function wrap(arr) {
  1433. return callback.apply(null, arr);
  1434. };
  1435. };
  1436. }
  1437. });
  1438. // node_modules/queenjs/node_modules/axios/lib/helpers/isAxiosError.js
  1439. var require_isAxiosError = __commonJS({
  1440. "node_modules/queenjs/node_modules/axios/lib/helpers/isAxiosError.js"(exports, module) {
  1441. "use strict";
  1442. var utils = require_utils();
  1443. module.exports = function isAxiosError(payload) {
  1444. return utils.isObject(payload) && payload.isAxiosError === true;
  1445. };
  1446. }
  1447. });
  1448. // node_modules/queenjs/node_modules/axios/lib/axios.js
  1449. var require_axios = __commonJS({
  1450. "node_modules/queenjs/node_modules/axios/lib/axios.js"(exports, module) {
  1451. "use strict";
  1452. var utils = require_utils();
  1453. var bind = require_bind();
  1454. var Axios = require_Axios();
  1455. var mergeConfig = require_mergeConfig();
  1456. var defaults = require_defaults();
  1457. function createInstance2(defaultConfig) {
  1458. var context = new Axios(defaultConfig);
  1459. var instance = bind(Axios.prototype.request, context);
  1460. utils.extend(instance, Axios.prototype, context);
  1461. utils.extend(instance, context);
  1462. instance.create = function create(instanceConfig) {
  1463. return createInstance2(mergeConfig(defaultConfig, instanceConfig));
  1464. };
  1465. return instance;
  1466. }
  1467. var axios2 = createInstance2(defaults);
  1468. axios2.Axios = Axios;
  1469. axios2.CanceledError = require_CanceledError();
  1470. axios2.CancelToken = require_CancelToken();
  1471. axios2.isCancel = require_isCancel();
  1472. axios2.VERSION = require_data().version;
  1473. axios2.toFormData = require_toFormData();
  1474. axios2.AxiosError = require_AxiosError();
  1475. axios2.Cancel = axios2.CanceledError;
  1476. axios2.all = function all(promises) {
  1477. return Promise.all(promises);
  1478. };
  1479. axios2.spread = require_spread();
  1480. axios2.isAxiosError = require_isAxiosError();
  1481. module.exports = axios2;
  1482. module.exports.default = axios2;
  1483. }
  1484. });
  1485. // node_modules/queenjs/node_modules/axios/index.js
  1486. var require_axios2 = __commonJS({
  1487. "node_modules/queenjs/node_modules/axios/index.js"(exports, module) {
  1488. module.exports = require_axios();
  1489. }
  1490. });
  1491. // node_modules/eventemitter3/index.js
  1492. var require_eventemitter3 = __commonJS({
  1493. "node_modules/eventemitter3/index.js"(exports, module) {
  1494. "use strict";
  1495. var has = Object.prototype.hasOwnProperty;
  1496. var prefix = "~";
  1497. function Events2() {
  1498. }
  1499. if (Object.create) {
  1500. Events2.prototype = /* @__PURE__ */ Object.create(null);
  1501. if (!new Events2().__proto__)
  1502. prefix = false;
  1503. }
  1504. function EE(fn, context, once) {
  1505. this.fn = fn;
  1506. this.context = context;
  1507. this.once = once || false;
  1508. }
  1509. function addListener(emitter, event, fn, context, once) {
  1510. if (typeof fn !== "function") {
  1511. throw new TypeError("The listener must be a function");
  1512. }
  1513. var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;
  1514. if (!emitter._events[evt])
  1515. emitter._events[evt] = listener, emitter._eventsCount++;
  1516. else if (!emitter._events[evt].fn)
  1517. emitter._events[evt].push(listener);
  1518. else
  1519. emitter._events[evt] = [emitter._events[evt], listener];
  1520. return emitter;
  1521. }
  1522. function clearEvent(emitter, evt) {
  1523. if (--emitter._eventsCount === 0)
  1524. emitter._events = new Events2();
  1525. else
  1526. delete emitter._events[evt];
  1527. }
  1528. function EventEmitter() {
  1529. this._events = new Events2();
  1530. this._eventsCount = 0;
  1531. }
  1532. EventEmitter.prototype.eventNames = function eventNames() {
  1533. var names = [], events, name;
  1534. if (this._eventsCount === 0)
  1535. return names;
  1536. for (name in events = this._events) {
  1537. if (has.call(events, name))
  1538. names.push(prefix ? name.slice(1) : name);
  1539. }
  1540. if (Object.getOwnPropertySymbols) {
  1541. return names.concat(Object.getOwnPropertySymbols(events));
  1542. }
  1543. return names;
  1544. };
  1545. EventEmitter.prototype.listeners = function listeners(event) {
  1546. var evt = prefix ? prefix + event : event, handlers = this._events[evt];
  1547. if (!handlers)
  1548. return [];
  1549. if (handlers.fn)
  1550. return [handlers.fn];
  1551. for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
  1552. ee[i] = handlers[i].fn;
  1553. }
  1554. return ee;
  1555. };
  1556. EventEmitter.prototype.listenerCount = function listenerCount(event) {
  1557. var evt = prefix ? prefix + event : event, listeners = this._events[evt];
  1558. if (!listeners)
  1559. return 0;
  1560. if (listeners.fn)
  1561. return 1;
  1562. return listeners.length;
  1563. };
  1564. EventEmitter.prototype.emit = function emit2(event, a1, a2, a3, a4, a5) {
  1565. var evt = prefix ? prefix + event : event;
  1566. if (!this._events[evt])
  1567. return false;
  1568. var listeners = this._events[evt], len = arguments.length, args, i;
  1569. if (listeners.fn) {
  1570. if (listeners.once)
  1571. this.removeListener(event, listeners.fn, void 0, true);
  1572. switch (len) {
  1573. case 1:
  1574. return listeners.fn.call(listeners.context), true;
  1575. case 2:
  1576. return listeners.fn.call(listeners.context, a1), true;
  1577. case 3:
  1578. return listeners.fn.call(listeners.context, a1, a2), true;
  1579. case 4:
  1580. return listeners.fn.call(listeners.context, a1, a2, a3), true;
  1581. case 5:
  1582. return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
  1583. case 6:
  1584. return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
  1585. }
  1586. for (i = 1, args = new Array(len - 1); i < len; i++) {
  1587. args[i - 1] = arguments[i];
  1588. }
  1589. listeners.fn.apply(listeners.context, args);
  1590. } else {
  1591. var length = listeners.length, j;
  1592. for (i = 0; i < length; i++) {
  1593. if (listeners[i].once)
  1594. this.removeListener(event, listeners[i].fn, void 0, true);
  1595. switch (len) {
  1596. case 1:
  1597. listeners[i].fn.call(listeners[i].context);
  1598. break;
  1599. case 2:
  1600. listeners[i].fn.call(listeners[i].context, a1);
  1601. break;
  1602. case 3:
  1603. listeners[i].fn.call(listeners[i].context, a1, a2);
  1604. break;
  1605. case 4:
  1606. listeners[i].fn.call(listeners[i].context, a1, a2, a3);
  1607. break;
  1608. default:
  1609. if (!args)
  1610. for (j = 1, args = new Array(len - 1); j < len; j++) {
  1611. args[j - 1] = arguments[j];
  1612. }
  1613. listeners[i].fn.apply(listeners[i].context, args);
  1614. }
  1615. }
  1616. }
  1617. return true;
  1618. };
  1619. EventEmitter.prototype.on = function on(event, fn, context) {
  1620. return addListener(this, event, fn, context, false);
  1621. };
  1622. EventEmitter.prototype.once = function once(event, fn, context) {
  1623. return addListener(this, event, fn, context, true);
  1624. };
  1625. EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
  1626. var evt = prefix ? prefix + event : event;
  1627. if (!this._events[evt])
  1628. return this;
  1629. if (!fn) {
  1630. clearEvent(this, evt);
  1631. return this;
  1632. }
  1633. var listeners = this._events[evt];
  1634. if (listeners.fn) {
  1635. if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {
  1636. clearEvent(this, evt);
  1637. }
  1638. } else {
  1639. for (var i = 0, events = [], length = listeners.length; i < length; i++) {
  1640. if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {
  1641. events.push(listeners[i]);
  1642. }
  1643. }
  1644. if (events.length)
  1645. this._events[evt] = events.length === 1 ? events[0] : events;
  1646. else
  1647. clearEvent(this, evt);
  1648. }
  1649. return this;
  1650. };
  1651. EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
  1652. var evt;
  1653. if (event) {
  1654. evt = prefix ? prefix + event : event;
  1655. if (this._events[evt])
  1656. clearEvent(this, evt);
  1657. } else {
  1658. this._events = new Events2();
  1659. this._eventsCount = 0;
  1660. }
  1661. return this;
  1662. };
  1663. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  1664. EventEmitter.prototype.addListener = EventEmitter.prototype.on;
  1665. EventEmitter.prefixed = prefix;
  1666. EventEmitter.EventEmitter = EventEmitter;
  1667. if ("undefined" !== typeof module) {
  1668. module.exports = EventEmitter;
  1669. }
  1670. }
  1671. });
  1672. // node_modules/queenjs/src/core/comm/bus.ts
  1673. var Bus = class {
  1674. constructor() {
  1675. this._hooks = {};
  1676. }
  1677. method(name, fn) {
  1678. if (this._hooks[name] !== void 0) {
  1679. throw new Error("can't override hook: " + name);
  1680. }
  1681. this._hooks[name] = fn;
  1682. }
  1683. methodRemove(name) {
  1684. delete this._hooks[name];
  1685. }
  1686. call(name, ...args) {
  1687. if (this._hooks[name]) {
  1688. try {
  1689. return this._hooks[name].apply(null, args);
  1690. } catch (ex) {
  1691. console.info(
  1692. "%c%s %c(editor.method error)",
  1693. "color: #06f",
  1694. name,
  1695. "color: #f00"
  1696. );
  1697. console.error(ex);
  1698. }
  1699. } else {
  1700. }
  1701. return null;
  1702. }
  1703. };
  1704. // node_modules/queenjs/src/core/comm/event.ts
  1705. var EventHandle = class {
  1706. constructor(owner, name, fn) {
  1707. this.owner = owner;
  1708. this.name = name;
  1709. this.fn = fn;
  1710. }
  1711. unbind() {
  1712. if (!this.owner)
  1713. return;
  1714. this.owner.unbind(this.name, this.fn);
  1715. this.owner = null;
  1716. this.name = null;
  1717. this.fn = null;
  1718. }
  1719. call() {
  1720. if (!this.fn)
  1721. return;
  1722. this.fn.call(
  1723. this.owner,
  1724. arguments[0],
  1725. arguments[1],
  1726. arguments[2],
  1727. arguments[3],
  1728. arguments[4],
  1729. arguments[5],
  1730. arguments[6],
  1731. arguments[7]
  1732. );
  1733. }
  1734. on(name, fn) {
  1735. return this.owner.on(name, fn);
  1736. }
  1737. };
  1738. var Events = class {
  1739. constructor() {
  1740. this._events = {};
  1741. this._suspendEvents = false;
  1742. }
  1743. get suspendEvents() {
  1744. return this._suspendEvents;
  1745. }
  1746. set suspendEvents(value) {
  1747. this._suspendEvents = !!value;
  1748. }
  1749. nextTick(name, fn) {
  1750. this.on(
  1751. name,
  1752. function() {
  1753. let timer = null;
  1754. return function(...args) {
  1755. if (timer)
  1756. clearTimeout(timer);
  1757. timer = setTimeout(fn.bind(null, ...args));
  1758. };
  1759. }()
  1760. );
  1761. }
  1762. on(name, fn) {
  1763. const events = this._events[name];
  1764. if (events === void 0) {
  1765. this._events[name] = [fn];
  1766. } else {
  1767. if (events.indexOf(fn) == -1)
  1768. events.push(fn);
  1769. }
  1770. return new EventHandle(this, name, fn);
  1771. }
  1772. once(name, fn) {
  1773. const self = this;
  1774. const evt = this.on(name, function(...args) {
  1775. fn.call(self, ...args);
  1776. evt.unbind();
  1777. });
  1778. return evt;
  1779. }
  1780. emit(name, ...args) {
  1781. if (this._suspendEvents)
  1782. return;
  1783. let events = this._events[name];
  1784. if (!events)
  1785. return;
  1786. events = events.slice(0);
  1787. for (let i = 0; i < events.length; i++) {
  1788. if (!events[i])
  1789. continue;
  1790. try {
  1791. events[i].call(this, ...args);
  1792. } catch (ex) {
  1793. console.info(
  1794. "%c%s %c(event error)",
  1795. "color: #06f",
  1796. name,
  1797. "color: #f00"
  1798. );
  1799. console.error(ex);
  1800. }
  1801. }
  1802. }
  1803. unbind(name, fn) {
  1804. if (name) {
  1805. const events = this._events[name];
  1806. if (!events)
  1807. return this;
  1808. if (fn) {
  1809. const i = events.indexOf(fn);
  1810. if (i !== -1) {
  1811. if (events.length === 1) {
  1812. delete this._events[name];
  1813. } else {
  1814. events.splice(i, 1);
  1815. }
  1816. }
  1817. } else {
  1818. delete this._events[name];
  1819. }
  1820. } else {
  1821. this._events = {};
  1822. }
  1823. return this;
  1824. }
  1825. };
  1826. // node_modules/queenjs/src/core/defineUI/index.tsx
  1827. var defineUI = function(options) {
  1828. delete options.slotOptions;
  1829. const { slots = {}, ...componentOptions } = options;
  1830. const UI = defineComponent(componentOptions);
  1831. const originComp = function(props) {
  1832. const { slots: slots2, ...uiProps } = props;
  1833. return React.createElement(UI, { ...uiProps }, buildSlots(this, slots2));
  1834. };
  1835. const Component = originComp.bind(() => Component);
  1836. Object.setPrototypeOf(Component, originComp);
  1837. Object.keys(slots).forEach((key) => {
  1838. Component[key] = slots[key];
  1839. });
  1840. Component.slots = function(config) {
  1841. return config;
  1842. };
  1843. return Component;
  1844. };
  1845. function buildSlots(getComp, customSlots = {}) {
  1846. const Component = getComp();
  1847. const slotKeys = Object.keys(Component);
  1848. slotKeys.forEach((key) => {
  1849. customSlots[key] = buildSlot(customSlots, key, Component[key]);
  1850. });
  1851. return customSlots;
  1852. }
  1853. function buildSlot(conf, slotName, SlotUI) {
  1854. const originSlot = conf[slotName];
  1855. if (!originSlot) {
  1856. return (props) => React.createElement(SlotUI, { ...props });
  1857. } else {
  1858. return (props = {}, option = {}) => {
  1859. const slotImpl = originSlot(props, option);
  1860. if (!slotImpl) {
  1861. return;
  1862. }
  1863. if (slotImpl != props) {
  1864. return slotImpl;
  1865. }
  1866. return React.createElement(SlotUI, { ...slotImpl });
  1867. };
  1868. }
  1869. }
  1870. // node_modules/queenjs/src/core/defineUI/DefaultUI.tsx
  1871. var NullDefineUI = defineUI({
  1872. setup() {
  1873. return () => null;
  1874. }
  1875. });
  1876. var Null = () => null;
  1877. var DefaultUI = {
  1878. Null
  1879. };
  1880. // node_modules/queenjs/src/core/dict/index.ts
  1881. function createDictMap(data, methods) {
  1882. const dictMap = new DictMap();
  1883. Object.entries(data).forEach(([key, item]) => {
  1884. methods && Object.setPrototypeOf(item, methods);
  1885. dictMap.set(key, item);
  1886. });
  1887. return dictMap;
  1888. }
  1889. function createDictArr(data, methods) {
  1890. let dictArr = new DictArr();
  1891. if (methods) {
  1892. dictArr = new Proxy(dictArr, {
  1893. set: (target, key, value, receiver) => {
  1894. Object.setPrototypeOf(value, methods);
  1895. return Reflect.set(target, key, value, receiver);
  1896. }
  1897. });
  1898. }
  1899. data.forEach((item) => {
  1900. dictArr.push(item);
  1901. });
  1902. return dictArr;
  1903. }
  1904. function createDictStorage(data, type) {
  1905. const storage = type === "localStorage" ? localStorage : sessionStorage;
  1906. Object.entries(data || {}).map(([key, value]) => {
  1907. if (!storage.getItem(key)) {
  1908. storage.setItem(key, JSON.stringify(value));
  1909. }
  1910. });
  1911. return {
  1912. get(key) {
  1913. try {
  1914. return JSON.parse(storage.getItem(key));
  1915. } catch (error) {
  1916. console.error(
  1917. `调用JSON.parse(${type}.getItem("${key}"))失败`
  1918. );
  1919. return data[key];
  1920. }
  1921. },
  1922. set(key, value) {
  1923. storage.setItem(key, JSON.stringify(value));
  1924. }
  1925. };
  1926. }
  1927. var DictMap = class extends Map {
  1928. arrayWith(keys) {
  1929. const list = new DictArr();
  1930. keys.forEach((key) => {
  1931. const item = this.get(key);
  1932. item && list.push(item);
  1933. });
  1934. return list;
  1935. }
  1936. find(cb) {
  1937. return [...this.values()].find(cb);
  1938. }
  1939. };
  1940. var DictArr = class extends Array {
  1941. filterWith(key, values, sort = "sort:value") {
  1942. const filterList = this.filter((item) => {
  1943. return values.includes(item[key]);
  1944. });
  1945. if (sort === "sort:value") {
  1946. const sortBy = values.join(",") + ",";
  1947. return filterList.sort((a, b) => {
  1948. return sortBy.indexOf(a[key] + ",") - sortBy.indexOf(b[key] + ",");
  1949. });
  1950. } else {
  1951. return filterList;
  1952. }
  1953. }
  1954. delete(cb) {
  1955. for (let i = this.length - 1; i >= 0; i--) {
  1956. if (cb(this[i])) {
  1957. this.splice(i, 1);
  1958. }
  1959. }
  1960. }
  1961. };
  1962. // node_modules/queenjs/src/core/effect/index.ts
  1963. var import_lodash = __toESM(require_lodash());
  1964. var Effect = class {
  1965. constructor(type, observer) {
  1966. this.type = type;
  1967. this.observer = observer;
  1968. this.pauseStatus = false;
  1969. this.watchs = [];
  1970. this.listHandlers = {};
  1971. }
  1972. static array(ob) {
  1973. return new Effect("array", ob);
  1974. }
  1975. static object(ob) {
  1976. return new Effect("object", ob);
  1977. }
  1978. static value(ob) {
  1979. return new Effect("value", ob);
  1980. }
  1981. list(handlers) {
  1982. if (!(this.observer() instanceof Array)) {
  1983. console.error("observer不是数组类型");
  1984. }
  1985. if (handlers)
  1986. this.listHandlers = handlers;
  1987. return this;
  1988. }
  1989. item(itemObserver, handler) {
  1990. this.watchs.push([itemObserver, handler, null]);
  1991. return this;
  1992. }
  1993. run() {
  1994. this.stop();
  1995. this.pauseStatus = false;
  1996. if (this.type === "array") {
  1997. if (!this.watchs.length)
  1998. this.watchs.push([() => null, () => null, null]);
  1999. this.listHandlers.stop = watchList.call(
  2000. this,
  2001. this.observer,
  2002. this.listHandlers,
  2003. this.watchs
  2004. );
  2005. } else {
  2006. watchObject.call(this, this.observer, this.watchs);
  2007. }
  2008. return this;
  2009. }
  2010. stop() {
  2011. var _a, _b;
  2012. for (const [, , watchStop] of this.watchs) {
  2013. if (watchStop instanceof Function) {
  2014. watchStop();
  2015. } else if (watchStop instanceof Map) {
  2016. for (const stop of watchStop.values()) {
  2017. stop();
  2018. }
  2019. }
  2020. }
  2021. (_b = (_a = this.listHandlers).stop) == null ? void 0 : _b.call(_a);
  2022. return this;
  2023. }
  2024. pause() {
  2025. this.pauseStatus = true;
  2026. }
  2027. async play() {
  2028. this.pauseStatus = await Promise.resolve(false);
  2029. }
  2030. };
  2031. var getItemByCompare = function(currItem, oldItem) {
  2032. if (!(currItem instanceof Array))
  2033. return currItem === oldItem ? oldItem : currItem;
  2034. if (currItem.length !== (oldItem == null ? void 0 : oldItem.length))
  2035. return currItem;
  2036. for (let i = 0; i < currItem.length; i++) {
  2037. if (currItem[i] !== (oldItem == null ? void 0 : oldItem[i]))
  2038. return currItem;
  2039. }
  2040. return oldItem;
  2041. };
  2042. function watchList(list, listHandlers, watchs) {
  2043. const listObserver = [() => [...list() || []]];
  2044. watchs.forEach((w) => w[2] = /* @__PURE__ */ new Map());
  2045. watchItemHandler.call(this);
  2046. return watch(listObserver, () => {
  2047. var _a, _b;
  2048. if (this.pauseStatus)
  2049. return;
  2050. const updateMap = (0, import_lodash.clone)(watchs[0][2]);
  2051. watchItemHandler.call(this, updateMap);
  2052. const added = [];
  2053. const removed = [];
  2054. for (const [item, stop] of updateMap.entries()) {
  2055. if (stop) {
  2056. watchs.forEach(([, , itemMap]) => {
  2057. var _a2;
  2058. (_a2 = itemMap.get(item)) == null ? void 0 : _a2();
  2059. itemMap.delete(item);
  2060. });
  2061. }
  2062. !stop ? added.push(item) : removed.push(item);
  2063. (_a = listHandlers[stop ? "remove" : "add"]) == null ? void 0 : _a.call(listHandlers, item);
  2064. }
  2065. if (updateMap.size > 0) {
  2066. (_b = listHandlers["change"]) == null ? void 0 : _b.call(listHandlers, added, removed);
  2067. }
  2068. });
  2069. function watchItemHandler(updateMap) {
  2070. list().forEach((item) => {
  2071. watchs.forEach(([observer, handler, itemMap], i) => {
  2072. if (i === 0 && updateMap) {
  2073. if (!itemMap.has(item)) {
  2074. updateMap.set(item, null);
  2075. } else {
  2076. updateMap.delete(item);
  2077. }
  2078. }
  2079. if (!itemMap.has(item)) {
  2080. let oldItem;
  2081. itemMap.set(
  2082. item,
  2083. watch(
  2084. () => oldItem = getItemByCompare(observer(item), oldItem),
  2085. () => {
  2086. if (this.pauseStatus)
  2087. return;
  2088. handler(item, oldItem);
  2089. }
  2090. )
  2091. );
  2092. }
  2093. });
  2094. });
  2095. }
  2096. }
  2097. function watchObject(observer, watchs) {
  2098. const handler = (item) => {
  2099. if (this.pauseStatus)
  2100. return;
  2101. watchs.forEach((watchItem) => {
  2102. var _a;
  2103. const [itemObserver, itemHandler] = watchItem;
  2104. let oldItem;
  2105. (_a = watchItem[2]) == null ? void 0 : _a.call(watchItem);
  2106. watchItem[2] = watch(
  2107. () => oldItem = getItemByCompare(itemObserver(item), oldItem),
  2108. () => {
  2109. if (this.pauseStatus)
  2110. return;
  2111. itemHandler(observer(), oldItem);
  2112. }
  2113. );
  2114. });
  2115. };
  2116. handler(observer());
  2117. watch(observer, handler);
  2118. }
  2119. // node_modules/queenjs/src/api/feedback.ts
  2120. var feedback_exports = {};
  2121. __export(feedback_exports, {
  2122. dialog: () => dialog,
  2123. hideLoading: () => hideLoading,
  2124. messageError: () => messageError,
  2125. messageInfo: () => messageInfo,
  2126. messageSuccess: () => messageSuccess,
  2127. messageWarn: () => messageWarn,
  2128. showConfirm: () => showConfirm,
  2129. showInput: () => showInput,
  2130. showLoading: () => showLoading,
  2131. useDialog: () => useDialog
  2132. });
  2133. // node_modules/queenjs/src/api/bus.ts
  2134. var queenBus = new Bus();
  2135. // node_modules/queenjs/src/api/feedback.ts
  2136. function showLoading(tip) {
  2137. queenBus.call("ui:showLoading", tip);
  2138. }
  2139. function hideLoading() {
  2140. queenBus.call("ui:hideLoading");
  2141. }
  2142. function messageSuccess(msg) {
  2143. queenBus.call("ui:message:success", msg);
  2144. }
  2145. function messageInfo(msg) {
  2146. queenBus.call("ui:message:info", msg);
  2147. }
  2148. function messageWarn(msg) {
  2149. queenBus.call("ui:message:warn", msg);
  2150. return msg;
  2151. }
  2152. function messageError(msg) {
  2153. queenBus.call("ui:message:error", msg);
  2154. return msg;
  2155. }
  2156. function showInput(params) {
  2157. return queenBus.call("ui:dialog:input", params);
  2158. }
  2159. function showConfirm(params) {
  2160. return queenBus.call("ui:dialog:confirm", params);
  2161. }
  2162. function dialog(component, params, context) {
  2163. return queenBus.call(
  2164. "ui:dialog:custom",
  2165. component,
  2166. params,
  2167. context
  2168. );
  2169. }
  2170. function useDialog() {
  2171. return queenBus.call("ui:dialog:use");
  2172. }
  2173. // node_modules/queenjs/src/api/file.ts
  2174. var file_exports = {};
  2175. __export(file_exports, {
  2176. selectFile: () => selectFile
  2177. });
  2178. function selectFile(opts) {
  2179. return new Promise((resolve, reject) => {
  2180. const fileInput = document.createElement("input");
  2181. fileInput.type = "file";
  2182. fileInput.accept = (opts == null ? void 0 : opts.accept) || "images/*";
  2183. fileInput.multiple = (opts == null ? void 0 : opts.multiple) || false;
  2184. fileInput.onchange = function() {
  2185. resolve([...this.files]);
  2186. };
  2187. window.addEventListener(
  2188. "mousedown",
  2189. () => {
  2190. reject(Exception.cancel("select file cancel"));
  2191. },
  2192. { once: true }
  2193. );
  2194. fileInput.click();
  2195. });
  2196. }
  2197. // node_modules/queenjs/src/api/url.ts
  2198. var url_exports = {};
  2199. __export(url_exports, {
  2200. blobURLMaps: () => blobURLMaps,
  2201. getBlobURLExt: () => getBlobURLExt,
  2202. getBlobURLName: () => getBlobURLName,
  2203. isBlobURL: () => isBlobURL
  2204. });
  2205. var createObjectURL = URL.createObjectURL;
  2206. var revokeObjectURL = URL.revokeObjectURL;
  2207. URL.createObjectURL = function(obj) {
  2208. const url = createObjectURL(obj);
  2209. blobURLMaps.set(url, obj);
  2210. return url;
  2211. };
  2212. URL.revokeObjectURL = function(url) {
  2213. revokeObjectURL(url);
  2214. blobURLMaps.delete(url);
  2215. };
  2216. var blobURLMaps = /* @__PURE__ */ new Map();
  2217. function getBlobURLName(url) {
  2218. var _a;
  2219. return (_a = blobURLMaps.get(url)) == null ? void 0 : _a.name;
  2220. }
  2221. function getBlobURLExt(url) {
  2222. const blob = blobURLMaps.get(url);
  2223. let ext = "unkown";
  2224. if (blob) {
  2225. const exp = /^.+\.(.+)$/;
  2226. if (blob.name && exp.test(blob.name)) {
  2227. ext = exp.exec(blob.name)[1];
  2228. } else if (blob.type) {
  2229. ext = blob.type.split("/").pop();
  2230. }
  2231. return ext.toLowerCase();
  2232. } else {
  2233. return ext;
  2234. }
  2235. }
  2236. function isBlobURL(url) {
  2237. return /^blob:/.test(url);
  2238. }
  2239. // node_modules/queenjs/src/api/index.ts
  2240. var queenApi = {
  2241. router: {},
  2242. ...feedback_exports,
  2243. ...url_exports,
  2244. ...file_exports
  2245. };
  2246. var useModal = useDialog;
  2247. // node_modules/queenjs/src/core/exception/index.ts
  2248. var Exception_Types = {
  2249. Cancel: {
  2250. label: "取消",
  2251. silence: true
  2252. },
  2253. Warn: {
  2254. label: "警告",
  2255. silence: false
  2256. },
  2257. Error: {
  2258. label: "错误",
  2259. silence: false
  2260. }
  2261. };
  2262. var Exception = class {
  2263. constructor(type, options) {
  2264. this.type = type;
  2265. this.msg = Exception_Types[type].label;
  2266. this.silence = Exception_Types[type].silence;
  2267. if (options) {
  2268. Object.assign(
  2269. this,
  2270. typeof options === "string" ? { msg: options } : options
  2271. );
  2272. }
  2273. if (this.silence)
  2274. return;
  2275. switch (this.type) {
  2276. case "Cancel":
  2277. case "Warn":
  2278. queenApi.messageWarn(this.msg);
  2279. break;
  2280. case "Error":
  2281. queenApi.messageError(this.msg);
  2282. break;
  2283. }
  2284. }
  2285. static cancel(options) {
  2286. return new Exception("Cancel", options);
  2287. }
  2288. static warn(options) {
  2289. return new Exception("Warn", options);
  2290. }
  2291. static error(options) {
  2292. return new Exception("Error", options);
  2293. }
  2294. };
  2295. // node_modules/queenjs/src/core/http/index.ts
  2296. var import_axios = __toESM(require_axios2());
  2297. var import_lodash2 = __toESM(require_lodash());
  2298. function createRequest(defReqConfig) {
  2299. var _a;
  2300. const { interceptors, ...httpConfig } = defReqConfig;
  2301. const http = import_axios.default.create(httpConfig);
  2302. (_a = Object.values(interceptors || {})) == null ? void 0 : _a.forEach((item) => {
  2303. item.request && http.interceptors.request.use(item.request);
  2304. item.response && http.interceptors.response.use(item.response);
  2305. });
  2306. return async function(url, config) {
  2307. const { originBody, prefix, silence, ...thisConfig } = Object.assign(
  2308. {},
  2309. config,
  2310. { url }
  2311. );
  2312. if (prefix) {
  2313. thisConfig.url = prefix + thisConfig.url;
  2314. }
  2315. try {
  2316. let response = (await http(thisConfig)).data;
  2317. if (originBody) {
  2318. response = {
  2319. errorNo: 200,
  2320. errorDesc: "",
  2321. result: response
  2322. };
  2323. }
  2324. if (response.errorNo !== 200) {
  2325. const silence2 = config.silence ?? config.method === "GET";
  2326. throw Exception.error({
  2327. msg: response.errorDesc,
  2328. silence: silence2,
  2329. result: response
  2330. });
  2331. }
  2332. return response;
  2333. } catch (error) {
  2334. if (error instanceof Exception)
  2335. throw error;
  2336. throw Exception.error({ msg: `${error}`, silence, result: error });
  2337. }
  2338. };
  2339. }
  2340. var Http = class {
  2341. static setConfig(config) {
  2342. Object.assign(this.config, config);
  2343. }
  2344. static defaultConfig(config) {
  2345. (0, import_lodash2.defaultsDeep)(this.config, config);
  2346. }
  2347. static create(config) {
  2348. return createRequest(Object.assign({}, this.config, config));
  2349. }
  2350. static interceptor(interceptor) {
  2351. return interceptor;
  2352. }
  2353. };
  2354. Http.config = {
  2355. timeout: 1e4,
  2356. headers: { "Content-Type": "application/json; charset=utf-8" }
  2357. };
  2358. // node_modules/queenjs/src/core/module/index.ts
  2359. var import_eventemitter3 = __toESM(require_eventemitter3());
  2360. // node_modules/moduse/es/module.js
  2361. var import_lodash3 = __toESM(require_lodash());
  2362. var ModuleRoot = class {
  2363. constructor(options) {
  2364. __publicField(this, "options");
  2365. __publicField(this, "use", createUse());
  2366. this.options = options;
  2367. }
  2368. };
  2369. __publicField(ModuleRoot, "create", createInstance());
  2370. __publicField(ModuleRoot, "define", createDefine());
  2371. function createDefine(options) {
  2372. return function(define) {
  2373. var _a;
  2374. return ((_a = options == null ? void 0 : options.transform) == null ? void 0 : _a.call(options, define)) || define;
  2375. };
  2376. }
  2377. function createInstance() {
  2378. return function(options) {
  2379. const ModuleClass = this;
  2380. return new ModuleClass(options);
  2381. };
  2382. }
  2383. function createUse(name, useOptions) {
  2384. return function(defines, options) {
  2385. const { optionsKey = name, transform = (useOptions == null ? void 0 : useOptions.transform) || useTransformDefault, ...ohterOptions } = options || {};
  2386. const defs = (0, import_lodash3.defaultsDeep)({}, optionsKey ? (0, import_lodash3.get)(this.options, optionsKey) : void 0, ...defines instanceof Array ? defines.reverse() : [defines]);
  2387. return transform.call(this, defs, ohterOptions);
  2388. };
  2389. }
  2390. var useTransformDefault = function(defines) {
  2391. Object.entries(defines).forEach(([key, value]) => {
  2392. if (value instanceof Function) {
  2393. defines[key] = value.bind(this);
  2394. }
  2395. });
  2396. return defines;
  2397. };
  2398. // node_modules/queenjs/src/core/module/actions.ts
  2399. var defineAction = function(...args) {
  2400. let [options, actions] = args;
  2401. if (!actions) {
  2402. actions = options;
  2403. options = void 0;
  2404. }
  2405. if (options) {
  2406. let funcOpts = {};
  2407. if (typeof options === "string") {
  2408. funcOpts[options] = true;
  2409. } else if (options instanceof Array) {
  2410. options.forEach((key) => funcOpts[key] = true);
  2411. } else {
  2412. funcOpts = options;
  2413. }
  2414. Object.values(actions).forEach((func) => {
  2415. Object.assign(func, funcOpts);
  2416. });
  2417. }
  2418. return actions;
  2419. };
  2420. var createUseActions = function() {
  2421. return createUse("actions", {
  2422. transform: (actions) => {
  2423. Object.entries(actions).forEach(([key, func]) => {
  2424. this._actions[key] = {};
  2425. Object.keys(func).forEach((optionKey) => {
  2426. this._actions[key][optionKey] = func[optionKey];
  2427. });
  2428. actions[key] = async (...args) => {
  2429. const _action = this._actions[key];
  2430. if (_action.once && _action.result !== void 0) {
  2431. throw Exception.error(`${key}方法在模块生命周期内只能调用一次!`);
  2432. }
  2433. let funcResult;
  2434. try {
  2435. if (false) {
  2436. console.log(key, "start");
  2437. }
  2438. this._bus.emit(key, ...args);
  2439. funcResult = func.call(this, ...args) || Promise.resolve();
  2440. } catch (error) {
  2441. funcResult = Promise.reject(error);
  2442. }
  2443. _action.result = _action.keepActive ? funcResult : null;
  2444. funcResult.then((res) => {
  2445. if (true) {
  2446. console.log(`${key}:success`, res);
  2447. }
  2448. this._bus.emit(`${key}:success`, res);
  2449. }).catch((err) => {
  2450. if (true) {
  2451. console.log(`${key}:fail`, err);
  2452. }
  2453. this._bus.emit(`${key}:fail`, err);
  2454. });
  2455. return funcResult;
  2456. };
  2457. });
  2458. actions.on = (name, fn) => {
  2459. const [key, status] = name.split(":");
  2460. const _action = this._actions[key];
  2461. if (status && _action.keepActive && _action.result) {
  2462. _action.result.then(fn).catch(fn).finally(() => {
  2463. this._bus.on(name, fn);
  2464. });
  2465. } else {
  2466. this._bus.on(name, fn);
  2467. }
  2468. onUnmounted(() => {
  2469. this._bus.removeListener(name, fn);
  2470. });
  2471. };
  2472. return actions;
  2473. }
  2474. });
  2475. };
  2476. // node_modules/vue-moduse/es/hook.js
  2477. var import_lodash4 = __toESM(require_lodash());
  2478. function createHook(ModuleClass, moduleName) {
  2479. const moduleOptionsKey = `${moduleName}_Options`;
  2480. let isSetted = false;
  2481. function setModule(options) {
  2482. const defineOptions = isSetted && inject(moduleOptionsKey) || {};
  2483. isSetted = true;
  2484. provide(moduleOptionsKey, (0, import_lodash4.defaultsDeep)(options, defineOptions));
  2485. }
  2486. function initModule(options) {
  2487. const defineOptions = isSetted && inject(moduleOptionsKey) || {};
  2488. const currOptions = (0, import_lodash4.defaultsDeep)(options, defineOptions);
  2489. const module = ModuleClass.create(currOptions);
  2490. provide(moduleName, module);
  2491. return module;
  2492. }
  2493. function useModule() {
  2494. return inject(moduleName);
  2495. }
  2496. return {
  2497. [`use${moduleName}`]: useModule,
  2498. [`init${moduleName}`]: initModule,
  2499. [`set${moduleName}`]: setModule
  2500. };
  2501. }
  2502. // node_modules/queenjs/src/core/module/hook.ts
  2503. function defineHook(name) {
  2504. const initName = `init${name}`;
  2505. const hooks = createHook(this, name);
  2506. const initModule = hooks[initName];
  2507. hooks[initName] = function(options) {
  2508. const instance = initModule(options);
  2509. instance.moduleName = name;
  2510. instance.onReady();
  2511. onUnmounted(() => {
  2512. instance.destroy();
  2513. });
  2514. if (instance.components) {
  2515. Object.entries(instance.components).forEach(([key, value]) => {
  2516. instance.components[key] = value ? markRaw(value) : value;
  2517. });
  2518. }
  2519. return instance;
  2520. };
  2521. return hooks;
  2522. }
  2523. // node_modules/queenjs/src/core/module/https.ts
  2524. var defineHttp = createDefine();
  2525. function createUseHttps() {
  2526. return createUse("https", {
  2527. transform: (https, options) => {
  2528. var _a, _b, _c;
  2529. Object.entries(https).forEach(([key, func]) => {
  2530. https[key] = func.bind(https);
  2531. });
  2532. https.request = Http.create(
  2533. options.httpConfig || ((_a = this.config) == null ? void 0 : _a.httpConfig) || ((_c = (_b = this.options) == null ? void 0 : _b.config) == null ? void 0 : _c.httpConfig)
  2534. );
  2535. Object.setPrototypeOf(https, this);
  2536. return https;
  2537. }
  2538. });
  2539. }
  2540. // node_modules/queenjs/src/core/module/store.ts
  2541. var defineStore = function(store) {
  2542. return store;
  2543. };
  2544. function createStore(store, options) {
  2545. const data = {}, actions = {};
  2546. const stores = store instanceof Array ? store : [store];
  2547. stores.forEach((store2) => {
  2548. Object.assign(data, store2.state());
  2549. if (store2.getters) {
  2550. Object.entries(store2.getters).forEach(([key, value]) => {
  2551. data[key] = computed(() => value.call(this, state));
  2552. });
  2553. }
  2554. if (store2.actions) {
  2555. Object.entries(store2.actions).forEach(([key, value]) => {
  2556. actions[key] = value.bind(this);
  2557. });
  2558. }
  2559. });
  2560. const state = reactive((options == null ? void 0 : options.transform) ? options.transform(data) : data);
  2561. Object.setPrototypeOf(state, actions);
  2562. return state;
  2563. }
  2564. // node_modules/queenjs/src/core/module/subModule.ts
  2565. function useSubModules(mods) {
  2566. var _a;
  2567. const modules = {};
  2568. for (const key in mods) {
  2569. modules[key] = ((_a = this.options.modules) == null ? void 0 : _a[key]) || mods[key]();
  2570. }
  2571. return modules;
  2572. }
  2573. // node_modules/queenjs/src/core/module/index.ts
  2574. var QueenModuleRoot = class extends ModuleRoot {
  2575. constructor() {
  2576. super(...arguments);
  2577. this.components = {};
  2578. this.modules = {};
  2579. this.moduleName = "";
  2580. this._bus = new import_eventemitter3.default();
  2581. this._actions = {};
  2582. this.setConfig = createUse("config");
  2583. this.useComponents = createUse("components", {
  2584. transform(comps) {
  2585. return comps;
  2586. }
  2587. });
  2588. this.useModules = useSubModules;
  2589. this.createHelper = createUse("helper");
  2590. this.createStore = createStore;
  2591. this.createActions = createUseActions.call(this);
  2592. this.createHttps = createUseHttps.call(this);
  2593. this.showModal = (...args) => {
  2594. const [component, params, context = {}] = args;
  2595. const modules = {};
  2596. Object.values(context).forEach((value) => {
  2597. if (value.moduleName) {
  2598. modules[value.moduleName] = value;
  2599. }
  2600. });
  2601. modules[this.moduleName] = this;
  2602. return queenApi.dialog(component, params, modules);
  2603. };
  2604. }
  2605. onReady() {
  2606. }
  2607. // 在上下文销毁时调用
  2608. destroy() {
  2609. if (this.controls) {
  2610. Object.values(this.controls).forEach((control) => {
  2611. var _a;
  2612. (_a = control.destroy) == null ? void 0 : _a.call(control);
  2613. });
  2614. }
  2615. }
  2616. initComponents(config) {
  2617. Object.entries(config).forEach(([key, compConf]) => {
  2618. this.components[key] = initCompsDeep(this.components[key], compConf);
  2619. });
  2620. function initCompsDeep(comp, compConf) {
  2621. if (comp.compType === "overwrite")
  2622. return comp;
  2623. if (!compConf)
  2624. return () => null;
  2625. if (compConf instanceof Function) {
  2626. Object.keys(comp).forEach((key) => {
  2627. if (key === "name" || key === "compType")
  2628. return;
  2629. compConf[key] = compConf[key] || comp[key];
  2630. });
  2631. return compConf;
  2632. } else {
  2633. const customComp = compConf.default || Object.getPrototypeOf(comp).bind(() => customComp);
  2634. if (compConf.default) {
  2635. customComp.compType = "overwrite";
  2636. } else {
  2637. Object.setPrototypeOf(customComp, Object.getPrototypeOf(comp));
  2638. }
  2639. Object.keys(comp).forEach((key) => {
  2640. if (key === "name" || key === "compType")
  2641. return;
  2642. customComp[key] = customComp[key] || (compConf[key] ? initCompsDeep(comp[key], compConf[key]) : comp[key]);
  2643. });
  2644. return customComp;
  2645. }
  2646. }
  2647. }
  2648. };
  2649. // createInstance中可声明的泛型字段在模块中也需要声明
  2650. QueenModuleRoot.create = createInstance();
  2651. QueenModuleRoot.hook = defineHook;
  2652. QueenModuleRoot.helper = createDefine();
  2653. QueenModuleRoot.action = defineAction;
  2654. QueenModuleRoot.http = defineHttp;
  2655. QueenModuleRoot.store = defineStore;
  2656. // node_modules/queenjs/src/core/module/control.ts
  2657. var ModuleControl = class {
  2658. constructor(module) {
  2659. this.module = module;
  2660. }
  2661. get store() {
  2662. return this.module.store;
  2663. }
  2664. get https() {
  2665. return this.module.https;
  2666. }
  2667. get actions() {
  2668. return this.module.actions;
  2669. }
  2670. get helper() {
  2671. return this.module.helper;
  2672. }
  2673. get controls() {
  2674. return this.module.controls;
  2675. }
  2676. destroy() {
  2677. }
  2678. };
  2679. // node_modules/queenjs/src/core/state/index.ts
  2680. var stateWatchers = /* @__PURE__ */ new WeakMap();
  2681. var StateRoot = class {
  2682. constructor() {
  2683. this.isProxy = false;
  2684. this.reactive = () => {
  2685. return createReactive(this);
  2686. };
  2687. }
  2688. computed(fn) {
  2689. return fn;
  2690. }
  2691. };
  2692. function createReactive(obj) {
  2693. const data = {};
  2694. for (const name in obj) {
  2695. if (name === "reactive" || name === "computed" || name === "proxy")
  2696. continue;
  2697. const objItem = obj[name];
  2698. if (objItem instanceof Function) {
  2699. data[name] = computed(() => objItem(state));
  2700. } else {
  2701. data[name] = objItem;
  2702. }
  2703. }
  2704. const state = reactive(data);
  2705. return state;
  2706. }
  2707. function createProxy(target, paths, getRoot) {
  2708. if (typeof target === "object" && !isProxy(target) && !(target instanceof Function) && target !== null) {
  2709. for (const key in target) {
  2710. const proxy = createProxy(target[key], [...paths, key], getRoot);
  2711. target[key] = proxy;
  2712. }
  2713. return new Proxy(target, {
  2714. get: (target2, key, receiver) => {
  2715. if (key == "isProxy") {
  2716. return true;
  2717. }
  2718. return Reflect.get(target2, key, receiver);
  2719. },
  2720. ...target instanceof Array ? arrayHandler(paths, getRoot) : objectHandler(paths, getRoot)
  2721. });
  2722. } else {
  2723. return target;
  2724. }
  2725. }
  2726. function arrayHandler(paths, getRoot) {
  2727. let removeIndex = null;
  2728. let removeOld = null;
  2729. return {
  2730. set: (target, key, value, receiver) => {
  2731. if (key === "length") {
  2732. removeIndex = null;
  2733. removeOld = null;
  2734. } else if (!removeIndex) {
  2735. if (!value.isProxy) {
  2736. const pathArr = [...paths, key];
  2737. if (+key == target.length) {
  2738. emit("add", pathArr, value, null, getRoot);
  2739. } else {
  2740. emit("set", pathArr, value, target[+key], getRoot);
  2741. }
  2742. value = createProxy(value, pathArr, getRoot);
  2743. } else {
  2744. removeIndex = key;
  2745. removeOld = target[+key];
  2746. }
  2747. }
  2748. return Reflect.set(target, key, value, receiver);
  2749. },
  2750. deleteProperty: (target, key) => {
  2751. if (!removeIndex) {
  2752. removeIndex = key;
  2753. removeOld = target[+key];
  2754. }
  2755. emit("remove", [...paths, removeIndex], null, removeOld, getRoot);
  2756. return Reflect.deleteProperty(target, key);
  2757. }
  2758. };
  2759. }
  2760. function objectHandler(paths, getRoot) {
  2761. return {
  2762. set: (target, key, value, receiver) => {
  2763. const actionType = target.hasOwnProperty(key) ? "set" : "add";
  2764. emit(actionType, [...paths, key], value, target[key], getRoot);
  2765. return Reflect.set(
  2766. target,
  2767. key,
  2768. createProxy(value, [...paths, key], getRoot),
  2769. receiver
  2770. );
  2771. },
  2772. deleteProperty: (target, key) => {
  2773. emit("remove", [...paths, key], null, target[key], getRoot);
  2774. return Reflect.deleteProperty(target, key);
  2775. }
  2776. };
  2777. }
  2778. function emit(type, paths, val, old, getRoot) {
  2779. const handlers = stateWatchers.get(getRoot());
  2780. handlers == null ? void 0 : handlers.forEach((handle) => handle(type, paths, val, old));
  2781. }
  2782. function createProxyEffect(target, handler) {
  2783. const handlers = stateWatchers.get(target);
  2784. if (handlers) {
  2785. handlers.add(handler);
  2786. } else {
  2787. stateWatchers.set(target, /* @__PURE__ */ new Set([handler]));
  2788. }
  2789. return {
  2790. stop() {
  2791. const handlers2 = stateWatchers.get(target);
  2792. handlers2 == null ? void 0 : handlers2.delete(handler);
  2793. }
  2794. };
  2795. }
  2796. export {
  2797. Bus,
  2798. DefaultUI,
  2799. Effect,
  2800. EventHandle,
  2801. Events,
  2802. Exception,
  2803. Http,
  2804. ModuleControl,
  2805. QueenModuleRoot as ModuleRoot,
  2806. StateRoot,
  2807. createDictArr,
  2808. createDictMap,
  2809. createDictStorage,
  2810. createProxy,
  2811. createProxyEffect,
  2812. defineUI,
  2813. queenApi,
  2814. useModal
  2815. };
  2816. //# sourceMappingURL=queenjs.js.map