@next-bricks/vb-experiment 1.2.8 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/bricks.json +1 -1
  2. package/dist/chunks/1370.dfe60dba.js +2 -0
  3. package/dist/chunks/1370.dfe60dba.js.map +1 -0
  4. package/dist/chunks/1655.48105266.js +2 -0
  5. package/dist/chunks/1655.48105266.js.map +1 -0
  6. package/dist/chunks/2750.ee5a8680.js +3 -0
  7. package/dist/chunks/2750.ee5a8680.js.map +1 -0
  8. package/dist/chunks/5084.24d43033.js +2 -0
  9. package/dist/chunks/5084.24d43033.js.map +1 -0
  10. package/dist/chunks/780.28286ed7.js +2 -0
  11. package/dist/chunks/780.28286ed7.js.map +1 -0
  12. package/dist/chunks/main.a75e6928.js +2 -0
  13. package/dist/chunks/{main.6acfea41.js.map → main.a75e6928.js.map} +1 -1
  14. package/dist/chunks/tsx-playground.81a2024b.js +2 -0
  15. package/dist/chunks/tsx-playground.81a2024b.js.map +1 -0
  16. package/dist/index.09975c92.js +2 -0
  17. package/dist/{index.b478cfe9.js.map → index.09975c92.js.map} +1 -1
  18. package/dist/manifest.json +8 -1
  19. package/dist/types.json +11 -1
  20. package/dist-types/tsx-playground/index.d.ts +1 -0
  21. package/package.json +2 -2
  22. package/dist/chunks/1370.612ec34f.js +0 -2
  23. package/dist/chunks/1370.612ec34f.js.map +0 -1
  24. package/dist/chunks/1663.4c514f78.js +0 -2
  25. package/dist/chunks/1663.4c514f78.js.map +0 -1
  26. package/dist/chunks/3569.7684b216.js +0 -3
  27. package/dist/chunks/3569.7684b216.js.map +0 -1
  28. package/dist/chunks/5084.ed747c17.js +0 -2
  29. package/dist/chunks/5084.ed747c17.js.map +0 -1
  30. package/dist/chunks/9425.21381ec2.js +0 -2
  31. package/dist/chunks/9425.21381ec2.js.map +0 -1
  32. package/dist/chunks/main.6acfea41.js +0 -2
  33. package/dist/chunks/tsx-playground.235800d9.js +0 -2
  34. package/dist/chunks/tsx-playground.235800d9.js.map +0 -1
  35. package/dist/index.b478cfe9.js +0 -2
  36. /package/dist/chunks/{3569.7684b216.js.LICENSE.txt → 2750.ee5a8680.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunks/2750.ee5a8680.js","mappings":";uLACe,SAASA,EAAuBC,EAAGC,GAChD,OAAOD,EAAEE,KAAI,OAAiBF,EAAGC,GACnC,iBCMAE,EAAOC,QANP,SAAwCC,GACtC,IAAIC,EAAmD,KACnDA,GACFD,EAAaE,aAAa,QAASD,EAEvC,gDCPe,SAASE,EAA2BC,EAAKC,EAAYC,IAClE,OAA0BF,EAAKC,GAC/BA,EAAWE,IAAIH,EAAKE,EACtB,WCEAR,EAAOC,QAAU,SAAUS,GACzB,IAAIC,EAAO,GA4EX,OAzEAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAU,GACVC,OAA+B,IAAZF,EAAK,GAoB5B,OAnBIA,EAAK,KACPC,GAAW,cAAcE,OAAOH,EAAK,GAAI,QAEvCA,EAAK,KACPC,GAAW,UAAUE,OAAOH,EAAK,GAAI,OAEnCE,IACFD,GAAW,SAASE,OAAOH,EAAK,GAAGI,OAAS,EAAI,IAAID,OAAOH,EAAK,IAAM,GAAI,OAE5EC,GAAWN,EAAuBK,GAC9BE,IACFD,GAAW,KAETD,EAAK,KACPC,GAAW,KAETD,EAAK,KACPC,GAAW,KAENA,CACT,IAAGI,KAAK,GACV,EAGAT,EAAKU,EAAI,SAAWC,EAASC,EAAOC,EAAQC,EAAUC,GAC7B,iBAAZJ,IACTA,EAAU,CAAC,CAAC,KAAMA,OAASK,KAE7B,IAAIC,EAAyB,CAAC,EAC9B,GAAIJ,EACF,IAAK,IAAIK,EAAI,EAAGA,EAAIhB,KAAKM,OAAQU,IAAK,CACpC,IAAIC,EAAKjB,KAAKgB,GAAG,GACP,MAANC,IACFF,EAAuBE,IAAM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babel/runtime/helpers/esm/classPrivateFieldGet2.js","webpack:///../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js","webpack:///../../node_modules/css-loader/dist/runtime/api.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack:///../../node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js","webpack:///../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/setFunctionName.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/applyDecs2311.js","webpack:///../../node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack:///../../node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack:///../../node_modules/css-loader/dist/runtime/noSourceMaps.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkInRHS.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:///../../node_modules/comlink/dist/esm/comlink.mjs","webpack:///../../node_modules/style-loader/dist/runtime/insertBySelector.js","webpack:///../../node_modules/@next-api-sdk/cmdb-sdk/dist/esm/api/cmdb/instance/postSearchV3.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","webpack:///../../node_modules/@next-api-sdk/cmdb-sdk/dist/esm/api/cmdb/instance/getDetail.js"],"sourcesContent":["import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateFieldInitSpec(obj, privateMap, value) {\n checkPrivateRedeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","export default function _checkPrivateRedeclaration(obj, privateCollection) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n }\n}","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","import _typeof from \"./typeof.js\";\nexport default function setFunctionName(e, t, n) {\n \"symbol\" == _typeof(t) && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\");\n try {\n Object.defineProperty(e, \"name\", {\n configurable: !0,\n value: n ? n + \" \" + t : t\n });\n } catch (e) {}\n return e;\n}","import _typeof from \"./typeof.js\";\nimport checkInRHS from \"./checkInRHS.js\";\nimport setFunctionName from \"./setFunctionName.js\";\nimport toPropertyKey from \"./toPropertyKey.js\";\nexport default function applyDecs2311(e, t, n, r, o, i) {\n var a,\n c,\n u,\n s,\n f,\n l,\n p,\n d = Symbol.metadata || Symbol[\"for\"](\"Symbol.metadata\"),\n m = Object.defineProperty,\n h = Object.create,\n y = [h(null), h(null)],\n v = t.length;\n function g(t, n, r) {\n return function (o, i) {\n n && (i = o, o = e);\n for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []);\n return r ? i : o;\n };\n }\n function b(e, t, n, r) {\n if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\"));\n return e;\n }\n function applyDec(e, t, n, r, o, i, u, s, f, l, p) {\n function d(e) {\n if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\");\n }\n var h = [].concat(t[0]),\n v = t[3],\n w = !u,\n D = 1 === o,\n S = 3 === o,\n j = 4 === o,\n E = 2 === o;\n function I(t, n, r) {\n return function (o, i) {\n return n && (i = o, o = e), r && r(o), P[t].call(o, i);\n };\n }\n if (!w) {\n var P = {},\n k = [],\n F = S ? \"get\" : j || D ? \"set\" : \"value\";\n if (f ? (l || D ? P = {\n get: setFunctionName(function () {\n return v(this);\n }, r, \"get\"),\n set: function set(e) {\n t[4](this, e);\n }\n } : P[F] = v, l || setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) {\n if ((c = y[+s][r]) && 7 != (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\");\n y[+s][r] = o < 3 ? 1 : o;\n }\n }\n for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) {\n var z = b(h[O], \"A decorator\", \"be\", !0),\n A = n ? h[O - 1] : void 0,\n H = {},\n K = {\n kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o],\n name: r,\n metadata: a,\n addInitializer: function (e, t) {\n if (e.v) throw Error(\"attempted to call addInitializer after decoration was finished\");\n b(t, \"An initializer\", \"be\", !0), i.push(t);\n }.bind(null, H)\n };\n if (w) c = z.call(A, N, K), H.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (K[\"static\"] = s, K[\"private\"] = f, c = K.access = {\n has: f ? p.bind() : function (e) {\n return r in e;\n }\n }, j || (c.get = f ? E ? function (e) {\n return d(e), P.value;\n } : I(\"get\", 0, d) : function (e) {\n return e[r];\n }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) {\n e[r] = t;\n }), N = z.call(A, D ? {\n get: P.get,\n set: P.set\n } : P[F], K), H.v = 1, D) {\n if (\"object\" == _typeof(N) && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\");\n } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N);\n }\n return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N;\n }\n function w(e) {\n return m(e, d, {\n configurable: !0,\n enumerable: !0,\n value: a\n });\n }\n return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function l(e) {\n e && f.push(g(e));\n }, p = function p(t, r) {\n for (var i = 0; i < n.length; i++) {\n var a = n[i],\n c = a[1],\n l = 7 & c;\n if ((8 & c) == t && !l == r) {\n var p = a[2],\n d = !!a[3],\n m = 16 & c;\n applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) {\n return checkInRHS(t) === e;\n } : o);\n }\n }\n }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), {\n e: c,\n get c() {\n var n = [];\n return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)];\n }\n };\n}","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateMethodInitSpec(obj, privateSet) {\n checkPrivateRedeclaration(obj, privateSet);\n privateSet.add(obj);\n}","export default function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateGetter(s, r, a) {\n return a(assertClassBrand(s, r));\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldSet2(s, a, r) {\n return s.set(assertClassBrand(s, a), r), r;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","\"use strict\";\n\nmodule.exports = function (i) {\n return i[1];\n};","import _typeof from \"./typeof.js\";\nexport default function _checkInRHS(e) {\n if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? _typeof(e) : \"null\"));\n return e;\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nconst proxyMarker = Symbol(\"Comlink.proxy\");\nconst createEndpoint = Symbol(\"Comlink.endpoint\");\nconst releaseProxy = Symbol(\"Comlink.releaseProxy\");\nconst finalizer = Symbol(\"Comlink.finalizer\");\nconst throwMarker = Symbol(\"Comlink.thrown\");\nconst isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n/**\n * Internal transfer handle to handle objects marked to proxy.\n */\nconst proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n};\n/**\n * Internal transfer handler to handle thrown exceptions.\n */\nconst throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n};\n/**\n * Allows customizing the serialization of certain values.\n */\nconst transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n]);\nfunction isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n}\nfunction expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n}\nfunction isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n}\nfunction closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n}\nfunction wrap(ep, target) {\n const pendingListeners = new Map();\n ep.addEventListener(\"message\", function handleMessage(ev) {\n const { data } = ev;\n if (!data || !data.id) {\n return;\n }\n const resolver = pendingListeners.get(data.id);\n if (!resolver) {\n return;\n }\n try {\n resolver(data);\n }\n finally {\n pendingListeners.delete(data.id);\n }\n });\n return createProxy(ep, pendingListeners, [], target);\n}\nfunction throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n}\nfunction releaseEndpoint(ep) {\n return requestResponseMessage(ep, new Map(), {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n}\nconst proxyCounter = new WeakMap();\nconst proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\nfunction registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n}\nfunction unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n}\nfunction createProxy(ep, pendingListeners, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n pendingListeners.clear();\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, pendingListeners, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, pendingListeners, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, pendingListeners, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, pendingListeners, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, pendingListeners, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, pendingListeners, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, pendingListeners, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n}\nfunction myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n}\nfunction processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n}\nconst transferCache = new WeakMap();\nfunction transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n}\nfunction proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n}\nfunction windowEndpoint(w, context = globalThis, targetOrigin = \"*\") {\n return {\n postMessage: (msg, transferables) => w.postMessage(msg, targetOrigin, transferables),\n addEventListener: context.addEventListener.bind(context),\n removeEventListener: context.removeEventListener.bind(context),\n };\n}\nfunction toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n}\nfunction fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n}\nfunction requestResponseMessage(ep, pendingListeners, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n pendingListeners.set(id, resolve);\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n}\nfunction generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n}\n\nexport { createEndpoint, expose, finalizer, proxy, proxyMarker, releaseProxy, transfer, transferHandlers, windowEndpoint, wrap };\n//# sourceMappingURL=comlink.mjs.map\n","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport { http } from \"@next-core/http\";\n/**\n * @description 搜索实例V3 (支持多属性排序)\n * @endpoint POST /v3/object/:objectId/instance/_search\n */\nexport var InstanceApi_postSearchV3 = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (objectId, data, options) {\n return (/**! @contract easyops.api.cmdb.instance.PostSearchV3@1.1.0 */(yield http.post(\"api/gateway/cmdb.instance.PostSearchV3/v3/object/\".concat(objectId, \"/instance/_search\"), data, options)).data\n );\n });\n return function InstanceApi_postSearchV3(_x, _x2, _x3) {\n return _ref.apply(this, arguments);\n };\n}();\n//# sourceMappingURL=postSearchV3.js.map","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nexport default function _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport { http } from \"@next-core/http\";\n/**\n * @description 获取实例详情\n * @endpoint GET /object/:objectId/instance/:instanceId\n */\nexport var InstanceApi_getDetail = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (objectId, instanceId, params, options) {\n return (/**! @contract easyops.api.cmdb.instance.GetDetail@1.0.0 */(yield http.get(\"api/gateway/cmdb.instance.GetDetail/object/\".concat(objectId, \"/instance/\").concat(instanceId), _objectSpread(_objectSpread({}, options), {}, {\n params\n }))).data\n );\n });\n return function InstanceApi_getDetail(_x, _x2, _x3, _x4) {\n return _ref.apply(this, arguments);\n };\n}();\n//# sourceMappingURL=getDetail.js.map"],"names":["_classPrivateFieldGet2","s","a","get","module","exports","styleElement","nonce","setAttribute","_classPrivateFieldInitSpec","obj","privateMap","value","set","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","id","_k","push","toPropertyKey","t","e","Symbol","toPrimitive","call","r","TypeError","String","options","document","update","remove","insertStyleElement","css","sourceMap","btoa","unescape","encodeURIComponent","JSON","stringify","styleTagTransform","apply","parentNode","removeChild","removeStyleElement","_checkPrivateRedeclaration","privateCollection","has","stylesInDOM","getIndexByIdentifier","identifier","result","modulesToDom","idCountMap","identifiers","base","count","indexByIdentifier","references","updater","addElementStyle","byIndex","splice","api","domAPI","newObj","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","setFunctionName","n","description","Object","defineProperty","configurable","applyDecs2311","o","c","u","f","l","p","d","metadata","m","h","create","y","v","g","b","applyDec","w","D","S","j","E","I","P","F","getOwnPropertyDescriptor","Error","name","N","O","z","A","H","K","kind","addInitializer","bind","access","init","unshift","enumerable","prototype","checkInRHS","element","createElement","setAttributes","attributes","insert","styleSheet","cssText","firstChild","appendChild","createTextNode","_defineProperty","key","writable","_classPrivateMethodInitSpec","privateSet","add","_assertClassBrand","arguments","_classPrivateGetter","_classPrivateFieldSet2","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","error","done","Promise","then","_asyncToGenerator","fn","self","args","err","_checkInRHS","_typeof","iterator","constructor","proxyMarker","createEndpoint","releaseProxy","finalizer","throwMarker","isObject","val","transferHandlers","Map","canHandle","serialize","port1","port2","MessageChannel","expose","deserialize","port","start","wrap","serialized","isError","message","stack","assign","ep","globalThis","allowedOrigins","addEventListener","callback","ev","data","origin","allowedOrigin","RegExp","test","isAllowedOrigin","console","warn","type","path","argumentList","fromWireValue","returnValue","parent","slice","reduce","prop","rawValue","proxy","transfers","transferCache","transfer","catch","wireValue","transferables","toWireValue","postMessage","removeEventListener","closeEndPoint","endpoint","isMessagePort","close","target","pendingListeners","resolver","delete","createProxy","throwIfProxyReleased","isReleased","releaseEndpoint","requestResponseMessage","proxyCounter","WeakMap","proxyFinalizers","FinalizationRegistry","newCount","isProxyReleased","Proxy","_target","unregister","unregisterProxy","clear","_thisArg","rawArgumentList","last","processArguments","construct","register","registerProxy","processed","arr","Array","handler","serializedValue","msg","fill","Math","floor","random","Number","MAX_SAFE_INTEGER","memo","style","styleTarget","querySelector","window","HTMLIFrameElement","contentDocument","head","getTarget","InstanceApi_postSearchV3","_ref","objectId","http","post","_x","_x2","_x3","ownKeys","keys","getOwnPropertySymbols","filter","_objectSpread2","forEach","getOwnPropertyDescriptors","defineProperties","InstanceApi_getDetail","instanceId","params","_x4"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ "use strict";(globalThis.webpackChunk_next_bricks_vb_experiment=globalThis.webpackChunk_next_bricks_vb_experiment||[]).push([[5084],{5084:(e,t,n)=>{var r=n(4558),s=n(2461),a=n.n(s),o=n(5060),i=n(2408),l=n(1914),c=n(3242),u=n(77),d=n(8403),p=n(8587),f=n(6315),m=n(743),h=n(7577),g=n(2582),x=n(535),y=n(4215),w=n(1330),v=n(3812),b=n(1259),A=n(1895),j=n(6414),_=n(4071),k=n(9055),$=n(8263);async function E(e){let{typescript:t,semi:n=!0,printWidth:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await(0,i.GP)(e,{parser:t?"babel-ts":"babel",plugins:[l,c],semi:n,printWidth:r,trailingComma:"es5"})}async function S(e,t,n){for(const r of e){const e=[...n,r.name];if("folder"===r.type){const n=t.folder(r.name);await S(r.items,n,e)}else t.file(`${r.name}.js${"routes"===r.nodeType||"bricks"===r.nodeType||"template"===r.nodeType?"x":""}`,await E((0,f.c)(r.node,r.nodeType,e)))}}function C(e){for(const[t,n]of Object.entries(e))switch(t){case"items":if(Array.isArray(n))for(const e of n)N(e);break;case"type":"main"===n&&delete e[t];break;case"if":break;case"i18n":0===Object.keys(n).length&&delete e[t];break;default:null!==n&&!1!==n||delete e[t]}}function N(e){for(const[t,n]of Object.entries(e))switch(t){case"children":Array.isArray(n)&&n.length>0&&N(n);break;case"if":break;case"activeExcludes":case"activeIncludes":Array.isArray(n)&&0===n.length&&delete e[t];break;default:null!==n&&!1!==n||delete e[t]}}customElements.define("vb-experiment.export-as-source-files",(0,r.createProviderClass)((async function(e){var t,n,r,s,i,l;let{projectDetail:c,storyboard:N}=e;const T=new(a()),M=T.folder("project"),I=M.folder("src"),O={extracts:[],namePool:new Map},P=(0,d.WM)(N.routes,[],O),L={id:c.appId,name:c.name,homepage:c.appSetting.homepage,layoutType:c.appSetting.layoutType,theme:c.appSetting.theme,noAuthGuard:c.appSetting.noAuthGuard,locales:c.appSetting.locales,defaultConfig:JSON.parse(c.appSetting.defaultConfig||"{}"),menuIcon:JSON.parse(c.appSetting.icon||"null"),standaloneMode:!0};I.file("app.js",await E(`export default ${JSON.stringify(L,null,2)};`));const W=null!==(t=N.meta)&&void 0!==t?t:{},J=null!==(n=W.customTemplates)&&void 0!==n?n:[],R=null!==(r=W.functions)&&void 0!==r?r:[],D=null!==(s=W.menus)&&void 0!==s?s:[],F=null!==(i=W.contracts)&&void 0!==i?i:[],G=null!==(l=W.i18n)&&void 0!==l?l:{};delete W.customTemplates,delete W.functions,delete W.menus,delete W.contracts,delete W.i18n,delete W.workflows,delete W.mocks,delete W.userGroups;const z=(0,d.pA)(J,["components"],O);O.extracts.push({name:"index",path:["components"],node:z,nodeType:"others"});const B=(0,p._)(O.extracts);I.file("index.js",h),I.file("routes.jsx",await E((0,f.c)(P,"routes",["routes.jsx"])));const U=I.folder("resources"),H=U.folder("functions"),q=[],V=[];for(const e of R){if("index"===e.name)throw new Error('Unexpected function name: "index"');const t=new Set;let{code:n}=(0,u.transform)(e.source,{filename:"expr."+(e.typescript?"ts":"js"),plugins:[...e.typescript?["syntax-typescript"]:[],k.A,[$.A,{imports:t}]]});const r=t.has("FN");r&&t.delete("FN");const s=[];t.size>0&&s.push(`import { ${[...t].join(", ")} } from "next-jsx/runtime";`),r&&s.push('import FN from "./index.js";'),s.length>0&&(n=`${s.join("\n")}\n\n${n}`),H.file(`${e.name}.${e.typescript?"ts":"js"}`,n),V.push(`import ${e.name} from "./${e.name}.js";`),q.push(e.name)}H.file("index.js",await E(`${V.join("\n")}\n\nconst FN = { ${q.join(",")} };\n\nexport default FN;`));const K=U.folder("menus"),Q=[],X=[];for(const e of D){if(C(e),"index"===e.menuId)throw new Error('Unexpected menu id: "index"');const t=`${e.menuId}.js`;K.file(t,await E((0,f.c)(e,"menu",["resources","menus",t])));let n=e.menuId.replace(/^\d+|[^\w]+/g,"_");_.bB.has(n)&&(n=`${n}__2`),X.push(`import ${n} from "./${t}";`),Q.push(n)}K.file("index.js",await E(`${X.join("\n")}\n\nexport default [${Q.join(",")}]`));const Y=U.folder("contracts"),Z=[],ee=new Set;for(const e of F){const t=e.name.replace(/^\d+|[^\w]+/g,"_");let n=2,r=t;for(;ee.has(r)||_.bB.has(r)||"index"===r;)r=`${t}_${n++}`;ee.add(r),Y.file(`${r}.js`,await E(`export default ${JSON.stringify(e)};`)),Z.push(`import ${r} from "./${r}.js";`)}Y.file("index.js",await E(`${Z.join("\n")}\n\nexport default [${[...ee].join(",")}]`)),U.folder("i18n").file("index.js",await E(`export default ${JSON.stringify(G)};`)),U.file("meta.js",await E(`export default ${JSON.stringify(W,null,2)};`)),U.file("index.js",m),await S(B,I,[]),M.folder("mock-micro-apps").folder(c.appId).file(".gitignore","*\n!.gitignore"),M.file(".editorconfig",g),M.file(".gitignore",x),M.file("dev.config.mjs",w),M.file("declarations.d.ts",y),M.file("jsconfig.json",v),M.file("next-jsx.config.js",b.replaceAll("__APP_ID__",c.appId)),M.file("package.json",A.replaceAll("__APP_ID__",c.appId)),M.file("README.md",j.replaceAll("__PROJECT_NAME__",c.name).replaceAll("__PROJECT_HOMEPAGE__",c.appSetting.homepage));const te=await T.generateAsync({type:"blob"});(0,o.saveAs)(te,"project.zip")}))),customElements.define("vb-experiment.export-widgets",(0,r.createProviderClass)((async function(e){let{name:t,files:n}=e;const r=new Map,s=new(a()),i=s.folder("widgets").folder(t);for(const{path:e,content:t}of n){const n=e.split("/"),s=n.pop();let a=i,o=1;for(const e of n){const t=n.slice(0,o).join("/"),s=r.get(t);s?a=s:(a=a.folder(e),r.set(t,a)),o++}a.file(s,t)}const l=await s.generateAsync({type:"blob"});(0,o.saveAs)(l,`${t}.zip`)})));var T,M=n(4635),I=n(918),O=n(6902),P=n(5536),L=n(6121),W=n(829),J=n(2740),R=n(8769),D=n.n(R),F=n(7921),G=n(9475),z=n(1280),B=n(8247),U=n(563),H=n(8189),q=n(2518),V=n(5947),K=(n(5168),n(795)),Q=n(8124),X=n(44);let Y,Z,ee,te,ne,re,se,ae,oe;const ie=D().lazy((async()=>({default:await(0,B.asyncWrapBrick)("vs.code-editor",{onCodeChange:"code.change"})}))),le=[{filePath:"tsx-view/actions.d.ts",content:H},{filePath:"tsx-view/components.d.ts",content:q.replaceAll("export interface","interface")}],{defineElement:ce,property:ue,event:de}=(0,F.createDecorators)();let pe;var fe=new WeakMap,me=new WeakMap,he=new WeakMap,ge=new WeakSet,xe=new WeakMap;class ye extends z.ReactNextElement{constructor(){super(...arguments),(0,M.A)(this,ge),(0,I.A)(this,fe,Z(this)),(0,I.A)(this,me,(ee(this),te(this))),(0,I.A)(this,he,(ne(this),re(this))),(0,I.A)(this,xe,(oe(this),e=>{var t;null===(t=(0,P.A)(ge,this,se))||void 0===t||t.emit(e)}))}get source(){return(0,W.A)(fe,this)}set source(e){(0,L.A)(fe,this,e)}get extraLibs(){return(0,W.A)(me,this)}set extraLibs(e){(0,L.A)(me,this,e)}render(){return D().createElement(ve,{source:this.source,extraLibs:this.extraLibs,onChange:(0,W.A)(xe,this)})}}function we(e){switch(e){case"notice":return"Hint";case"warning":return"Warning";case"error":case"fatal":return"Error"}return e}function ve(e){let{source:t,extraLibs:n,onChange:r}=e;const[s,a]=(0,R.useState)(null!=t?t:""),o=(0,R.useDeferredValue)(s),[i,l]=(0,R.useState)(),[c,u]=(0,R.useState)(),d=(0,R.useMemo)((()=>[...le,...null!=n?n:[]]),[n]),p=(0,R.useCallback)((e=>{a(e.detail),r(e.detail)}),[r]);(0,R.useEffect)((()=>{let e=!1;return async function(){const t=await(0,Q.f)();if(e)return;const n=await t.parse(o);if(e)return;u(n);const r=n.errors.filter((e=>!!e.node));r.length>0?l(r.map((e=>({message:e.message,severity:we(e.severity),startLineNumber:e.node.loc.start.line,startColumn:e.node.loc.start.column+1,endLineNumber:e.node.loc.end.line,endColumn:e.node.loc.end.column+1})))):l(void 0)}(),()=>{e=!0}}),[o]);const f=(0,R.useMemo)((()=>(0,U.uniqueId)()),[]),m=(0,R.useRef)(null),h=(0,R.useRef)(null);return(0,R.useEffect)((()=>{const e=m.current;if(!e)return;const t=(0,X.d)(f),n=(0,G.unstable_createRoot)(e,{portal:t,supportsUseChildren:!0});return h.current=n,()=>{n.unmount(),t.remove(),h.current=null}}),[f]),(0,R.useEffect)((()=>{let e=!1;return(async()=>{if(!c)return;let t;try{var n;if(t=await(0,V.d)(c,{rootId:f,expanded:!0}),e)return;const{brick:r,context:s,functions:a,templates:o}=null!=t?t:{};await(null===(n=h.current)||void 0===n?void 0:n.render(null!=r?r:[],{context:s,functions:a,templates:o}))}catch(e){var r;console.error("Failed to render view:",e),null===(r=h.current)||void 0===r||r.render({brick:customElements.get("easyops-default-error")?"easyops-default-error":"div",properties:{errorTitle:"解析失败",dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},children:[{brick:"div",properties:{textContent:(0,G.httpErrorToString)(e)}}]})}})(),()=>{e=!0}}),[f,c]),D().createElement("div",{className:K.A.container},D().createElement("div",{className:K.A.editor},D().createElement(R.Suspense,{fallback:"Loading..."},D().createElement(ie,{value:t,onCodeChange:p,language:"typescript",uri:"file:///view.tsx",automaticLayout:"fit-container",theme:"tm-vs-dark",extraLibs:d,extraMarkers:i,"data-override-theme":"dark-v2"}))),D().createElement("div",{className:K.A.preview},D().createElement("div",{"data-root-id":f,ref:m})))}T=ye,({e:[Z,ee,te,ne,re,se,ae,oe],c:[pe,Y]}=(0,J.A)(T,[ce("vb-experiment.tsx-playground",{shadowOptions:!1})],[[ue({attribute:!1}),1,"source"],[ue({attribute:!1}),1,"extraLibs"],[de({type:"change"}),1,"change",e=>(0,W.A)(he,e),(e,t)=>(0,L.A)(he,e,t)]],0,(e=>xe.has((0,O.A)(e))),z.ReactNextElement)),Y()}}]);
2
+ //# sourceMappingURL=5084.24d43033.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunks/5084.24d43033.js","mappings":"mYA8RAA,eAAeC,EACbC,GAEiB,IADjB,WAAEC,EAAU,KAAEC,GAAO,EAAI,WAAEC,GAA6BC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,CAAC,EAE5D,aAAaG,EAAAA,EAAAA,IAAOP,EAAQ,CAC1BQ,OAAQP,EAAa,WAAa,QAClCQ,QAAS,CAACC,EAAqBC,GAC/BT,OACAC,aACAS,cAAe,OAEnB,CAEAd,eAAee,EACbC,EACAC,EACAC,GAEA,IAAK,MAAMC,KAAQH,EAAO,CACxB,MAAMI,EAAY,IAAIF,EAAMC,EAAKE,MACjC,GAAkB,WAAdF,EAAKG,KAAmB,CAC1B,MAAMC,EAAcN,EAAOA,OAAOE,EAAKE,YACjCN,EAAwBI,EAAKH,MAAOO,EAAaH,EACzD,MACEH,EAAOO,KACL,GAAGL,EAAKE,UACY,WAAlBF,EAAKM,UACa,WAAlBN,EAAKM,UACa,aAAlBN,EAAKM,SACD,IACA,WAEAxB,GAASyB,EAAAA,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OQ,SACrBxH,IAAAA,cAAA,OAAK,eAAcgF,EAAQE,IAAKA,KAIxC,CAxLCuC,EAAArG,KAAAqC,GAAAhC,EAAAC,GAAAC,GAAAC,GAAAC,GAAAK,GAAAwF,GAAA5F,IAAA6F,GAAA/G,GAAAgH,KAAAC,EAAAA,EAAAA,GAAAJ,EAAA,CA5BAjH,GAAc,+BAAgC,CAE7CsH,eAAe,KACf,EAGCrH,GAAS,CAAEsH,WAAW,IAAQ,aAG9BtH,GAAS,CAAEsH,WAAW,IAAQ,gBAG9BrH,GAAM,CAAE/I,KAAM,WAAW,WAAAqQ,IAAA5F,EAAAA,EAAAA,GAAApB,GAAAgH,GAAA,CAAAA,EAAA3F,KAAAC,EAAAA,EAAAA,GAAAtB,GAAAgH,EAAA3F,KAAA,GAAA4F,GAAA9G,GAAAlE,KAAAiL,EAAAA,EAAAA,GAAAD,KARA5G,EAAAA,mBAAgBuG,G","sources":["webpack:///./src/data-providers/export-as-source-files.ts","webpack:///./src/data-providers/export-widgets.ts","webpack:///./src/tsx-playground/index.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport type { Storyboard, MicroApp, StoryboardMeta } from \"@next-core/types\";\nimport { createProviderClass } from \"@next-core/utils/general\";\nimport JSZip from \"jszip\";\nimport { saveAs } from \"file-saver\";\nimport { format } from \"prettier/standalone\";\nimport * as prettierPluginBabel from \"prettier/plugins/babel\";\nimport * as prettierPluginEstree from \"prettier/plugins/estree\";\nimport { transform } from \"@babel/standalone\";\nimport {\n ExtractState,\n extractRoutes,\n extractTemplates,\n} from \"./utils/extract.js\";\nimport {\n SourceFileOrFolder,\n buildFileStructure,\n} from \"./utils/buildFileStructure.js\";\nimport { generate } from \"./utils/generators/generate.js\";\nimport srcResourcesIndexJs from \"./raws/src/resources/index.js.txt\";\nimport srcIndexJs from \"./raws/src/index.js.txt\";\nimport editorConfig from \"./raws/.editorconfig.txt\";\nimport gitIgnore from \"./raws/.gitignore.txt\";\nimport declarationsDTs from \"./raws/declarations.d.ts.txt\";\nimport devConfigMjs from \"./raws/dev.config.mjs.txt\";\nimport jsconfigJson from \"./raws/jsconfig.json.txt\";\nimport nextJsxConfigJs from \"./raws/next-jsx.config.js.txt\";\nimport packageJson from \"./raws/package.json.txt\";\nimport readmeMd from \"./raws/README.md.txt\";\nimport { JS_RESERVED_WORDS } from \"./utils/constants.js\";\nimport TransformStoryboardFunction from \"./utils/plugins/storyboard-function.js\";\nimport SmartImports from \"./utils/plugins/smart-imports.js\";\n\nexport interface StoryboardAssemblyResult {\n storyboard: Storyboard;\n\n projectDetail: {\n appId: string;\n name: string;\n appSetting: Pick<\n MicroApp,\n \"homepage\" | \"theme\" | \"locales\" | \"noAuthGuard\"\n > & {\n layoutType?: string;\n defaultConfig?: string;\n icon?: string;\n };\n brickNextVersion?: number;\n };\n}\n\nexport async function exportAsSourceFiles({\n projectDetail,\n storyboard,\n}: StoryboardAssemblyResult): Promise<void> {\n const zip = new JSZip();\n const project = zip.folder(\"project\")!;\n const src = project.folder(\"src\")!;\n\n const extractState: ExtractState = {\n extracts: [],\n namePool: new Map(),\n };\n const extractedRoutes = extractRoutes(storyboard.routes, [], extractState);\n\n const app: MicroApp & { layoutType?: string } = {\n id: projectDetail.appId,\n name: projectDetail.name,\n homepage: projectDetail.appSetting.homepage,\n layoutType: projectDetail.appSetting.layoutType,\n theme: projectDetail.appSetting.theme,\n noAuthGuard: projectDetail.appSetting.noAuthGuard,\n locales: projectDetail.appSetting.locales,\n defaultConfig: JSON.parse(projectDetail.appSetting.defaultConfig || \"{}\"),\n menuIcon: JSON.parse(projectDetail.appSetting.icon || \"null\"),\n standaloneMode: true,\n };\n src.file(\n \"app.js\",\n await formatJs(`export default ${JSON.stringify(app, null, 2)};`)\n );\n\n const meta = (storyboard.meta ?? {}) as StoryboardMeta & {\n workflows?: unknown;\n userGroups?: unknown;\n };\n const customTemplates = meta.customTemplates ?? [];\n const functions = meta.functions ?? [];\n const menus = meta.menus ?? [];\n const contracts = meta.contracts ?? [];\n const i18n = meta.i18n ?? {};\n delete meta.customTemplates;\n delete meta.functions;\n delete meta.menus;\n delete meta.contracts;\n delete meta.i18n;\n delete meta.workflows;\n delete meta.mocks;\n delete meta.userGroups;\n\n const extractedTemplates = extractTemplates(\n customTemplates,\n [\"components\"],\n extractState\n );\n extractState.extracts.push({\n name: \"index\",\n path: [\"components\"],\n node: extractedTemplates,\n nodeType: \"others\",\n });\n\n const fileStructure = buildFileStructure(extractState.extracts);\n\n src.file(\"index.js\", srcIndexJs);\n\n src.file(\n \"routes.jsx\",\n await formatJs(generate(extractedRoutes, \"routes\", [\"routes.jsx\"]))\n );\n\n const resources = src.folder(\"resources\")!;\n\n // Functions\n const fnDir = resources.folder(\"functions\")!;\n const fnNames: string[] = [];\n const fnImports: string[] = [];\n for (const fn of functions) {\n if (fn.name === \"index\") {\n throw new Error('Unexpected function name: \"index\"');\n }\n\n // Prepend with `export default` for functions\n const inferredImports = new Set<string>();\n let { code } = transform(fn.source, {\n filename: `expr.${fn.typescript ? \"ts\" : \"js\"}`,\n plugins: [\n ...(fn.typescript ? [\"syntax-typescript\"] : []),\n TransformStoryboardFunction,\n [\n SmartImports,\n {\n imports: inferredImports,\n },\n ],\n ],\n }) as { code: string };\n const hasFN = inferredImports.has(\"FN\");\n if (hasFN) {\n inferredImports.delete(\"FN\");\n }\n const importStrings: string[] = [];\n if (inferredImports.size > 0) {\n importStrings.push(\n `import { ${[...inferredImports].join(\", \")} } from \"next-jsx/runtime\";`\n );\n }\n if (hasFN) {\n importStrings.push(`import FN from \"./index.js\";`);\n }\n if (importStrings.length > 0) {\n code = `${importStrings.join(\"\\n\")}\\n\\n${code}`;\n }\n\n fnDir.file(`${fn.name}.${fn.typescript ? \"ts\" : \"js\"}`, code);\n fnImports.push(`import ${fn.name} from \"./${fn.name}.js\";`);\n fnNames.push(fn.name);\n }\n fnDir.file(\n \"index.js\",\n await formatJs(\n `${fnImports.join(\"\\n\")}\\n\\nconst FN = { ${fnNames.join(\n \",\"\n )} };\\n\\nexport default FN;`\n )\n );\n\n // Menus\n const menusDir = resources.folder(\"menus\")!;\n const menuNames: string[] = [];\n const menuImports: string[] = [];\n for (const menu of menus) {\n cleanMenu(menu);\n if (menu.menuId === \"index\") {\n throw new Error('Unexpected menu id: \"index\"');\n }\n const filename = `${menu.menuId}.js`;\n menusDir.file(\n filename,\n await formatJs(generate(menu, \"menu\", [\"resources\", \"menus\", filename]))\n );\n let name = menu.menuId.replace(/^\\d+|[^\\w]+/g, \"_\");\n if (JS_RESERVED_WORDS.has(name)) {\n name = `${name}__2`;\n }\n menuImports.push(`import ${name} from \"./${filename}\";`);\n menuNames.push(name);\n }\n menusDir.file(\n \"index.js\",\n await formatJs(\n `${menuImports.join(\"\\n\")}\\n\\nexport default [${menuNames.join(\",\")}]`\n )\n );\n\n // Contracts\n const contractsDir = resources.folder(\"contracts\")!;\n const contractImports: string[] = [];\n const contractNames = new Set<string>();\n for (const contract of contracts) {\n const baseName = contract.name.replace(/^\\d+|[^\\w]+/g, \"_\");\n let counter = 2;\n let varName = baseName;\n while (\n contractNames.has(varName) ||\n JS_RESERVED_WORDS.has(varName) ||\n varName === \"index\"\n ) {\n varName = `${baseName}_${counter++}`;\n }\n contractNames.add(varName);\n\n contractsDir.file(\n `${varName}.js`,\n await formatJs(`export default ${JSON.stringify(contract)};`)\n );\n contractImports.push(`import ${varName} from \"./${varName}.js\";`);\n }\n contractsDir.file(\n \"index.js\",\n await formatJs(\n `${contractImports.join(\"\\n\")}\\n\\nexport default [${[\n ...contractNames,\n ].join(\",\")}]`\n )\n );\n\n resources\n .folder(\"i18n\")!\n .file(\n \"index.js\",\n await formatJs(`export default ${JSON.stringify(i18n)};`)\n );\n resources.file(\n \"meta.js\",\n await formatJs(`export default ${JSON.stringify(meta, null, 2)};`)\n );\n resources.file(\"index.js\", srcResourcesIndexJs);\n\n await generateByFileStructure(fileStructure, src, []);\n\n const appDir = project\n .folder(\"mock-micro-apps\")!\n .folder(projectDetail.appId)!;\n appDir.file(\".gitignore\", \"*\\n!.gitignore\");\n\n project.file(\".editorconfig\", editorConfig);\n project.file(\".gitignore\", gitIgnore);\n project.file(\"dev.config.mjs\", devConfigMjs);\n project.file(\"declarations.d.ts\", declarationsDTs);\n project.file(\"jsconfig.json\", jsconfigJson);\n project.file(\n \"next-jsx.config.js\",\n nextJsxConfigJs.replaceAll(\"__APP_ID__\", projectDetail.appId)\n );\n project.file(\n \"package.json\",\n packageJson.replaceAll(\"__APP_ID__\", projectDetail.appId)\n );\n project.file(\n \"README.md\",\n readmeMd\n .replaceAll(\"__PROJECT_NAME__\", projectDetail.name)\n .replaceAll(\"__PROJECT_HOMEPAGE__\", projectDetail.appSetting.homepage)\n );\n\n const blob = await zip.generateAsync({ type: \"blob\" });\n saveAs(blob, \"project.zip\");\n}\n\ninterface FormatJsOptions {\n typescript?: boolean;\n semi?: boolean;\n printWidth?: number;\n}\n\nasync function formatJs(\n source: string,\n { typescript, semi = true, printWidth }: FormatJsOptions = {}\n): Promise<string> {\n return await format(source, {\n parser: typescript ? \"babel-ts\" : \"babel\",\n plugins: [prettierPluginBabel, prettierPluginEstree as any],\n semi,\n printWidth,\n trailingComma: \"es5\",\n });\n}\n\nasync function generateByFileStructure(\n items: SourceFileOrFolder[],\n folder: JSZip,\n path: string[]\n) {\n for (const item of items) {\n const childPath = [...path, item.name];\n if (item.type === \"folder\") {\n const childFolder = folder.folder(item.name)!;\n await generateByFileStructure(item.items, childFolder, childPath);\n } else {\n folder.file(\n `${item.name}.js${\n item.nodeType === \"routes\" ||\n item.nodeType === \"bricks\" ||\n item.nodeType === \"template\"\n ? \"x\"\n : \"\"\n }`,\n await formatJs(generate(item.node, item.nodeType, childPath))\n );\n }\n }\n}\n\nfunction cleanMenu(menu: Record<string, any>) {\n for (const [key, value] of Object.entries(menu)) {\n switch (key) {\n case \"items\":\n if (Array.isArray(value)) {\n for (const item of value) {\n cleanMenuItem(item);\n }\n }\n break;\n case \"type\":\n if (value === \"main\") {\n delete menu[key];\n }\n break;\n case \"if\":\n break;\n case \"i18n\":\n if (Object.keys(value).length === 0) {\n delete menu[key];\n }\n break;\n default:\n if (value === null || value === false) {\n delete menu[key];\n }\n }\n }\n}\n\nfunction cleanMenuItem(menuItem: Record<string, any>) {\n for (const [key, value] of Object.entries(menuItem)) {\n switch (key) {\n case \"children\":\n if (Array.isArray(value) && value.length > 0) {\n cleanMenuItem(value);\n }\n break;\n case \"if\":\n break;\n case \"activeExcludes\":\n case \"activeIncludes\":\n if (Array.isArray(value) && value.length === 0) {\n delete menuItem[key];\n }\n break;\n default:\n if (value === null || value === false) {\n delete menuItem[key];\n }\n }\n }\n}\n\ncustomElements.define(\n \"vb-experiment.export-as-source-files\",\n createProviderClass(exportAsSourceFiles)\n);\n","import { createProviderClass } from \"@next-core/utils/general\";\nimport JSZip from \"jszip\";\nimport { saveAs } from \"file-saver\";\n\ninterface ExportWidgetsParams {\n name: string;\n files: FileInfo[];\n}\n\ninterface FileInfo {\n path: string;\n content: string;\n}\n\nexport async function exportWidgets({\n name,\n files,\n}: ExportWidgetsParams): Promise<void> {\n const fs = new Map<string, JSZip>();\n const zip = new JSZip();\n const widgets = zip.folder(\"widgets\")!;\n const project = widgets.folder(name)!;\n\n for (const { path, content } of files) {\n const segments = path.split(\"/\");\n const filename = segments.pop()!;\n let handle = project;\n let i = 1;\n for (const segment of segments) {\n const current = segments.slice(0, i).join(\"/\");\n const found = fs.get(current);\n if (found) {\n handle = found;\n } else {\n handle = handle.folder(segment)!;\n fs.set(current, handle);\n }\n i++;\n }\n handle.file(filename, content);\n }\n\n const blob = await zip.generateAsync({ type: \"blob\" });\n saveAs(blob, `${name}.zip`);\n}\n\ncustomElements.define(\n \"vb-experiment.export-widgets\",\n createProviderClass(exportWidgets)\n);\n","import React, {\n Suspense,\n useCallback,\n useDeferredValue,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { createDecorators, type EventEmitter } from \"@next-core/element\";\nimport { httpErrorToString, unstable_createRoot } from \"@next-core/runtime\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport { asyncWrapBrick } from \"@next-core/react-runtime\";\nimport { uniqueId } from \"lodash\";\nimport type {\n CodeEditor,\n CodeEditorProps,\n ExtraLib,\n ExtraMarker,\n} from \"@next-bricks/vs/code-editor\";\nimport actionsDefinition from \"@next-shared/tsx-converter/lib/actions.d.ts?raw\";\nimport componentsDefinition from \"@next-shared/tsx-converter/lib/components.d.ts?raw\";\nimport { convertTsx, type ConvertResult } from \"@next-shared/tsx-converter\";\nimport type { ParseResult } from \"@next-shared/tsx-parser\";\nimport \"@next-core/theme\";\nimport styles from \"./styles.module.css\";\nimport { getRemoteTsxParserWorker } from \"./workers/tsxParser.js\";\nimport { createPortal } from \"./createPortal.js\";\n\ninterface CodeEditorEvents {\n \"code.change\": CustomEvent<string>;\n}\n\ninterface CodeEditorMapEvents {\n onCodeChange: \"code.change\";\n}\n\nconst AsyncWrappedCodeEditor = React.lazy(async () => ({\n default: await asyncWrapBrick<\n CodeEditor,\n CodeEditorProps,\n CodeEditorEvents,\n CodeEditorMapEvents\n >(\"vs.code-editor\", {\n onCodeChange: \"code.change\",\n }),\n}));\n\nconst BUILTIN_LIBS: ExtraLib[] = [\n {\n filePath: \"tsx-view/actions.d.ts\",\n content: actionsDefinition,\n },\n {\n filePath: \"tsx-view/components.d.ts\",\n content: componentsDefinition.replaceAll(\"export interface\", \"interface\"),\n },\n // {\n // filePath: \"tsx-view/contracts.d.ts\",\n // content: `type ContractMap = Record<string, any>;`,\n // },\n];\n\nconst { defineElement, property, event } = createDecorators();\n\nexport interface TsxPlaygroundProps {\n source?: string;\n extraLibs?: ExtraLib[];\n}\n\n/**\n * 构件 `vb-experiment.tsx-playground`\n */\nexport\n@defineElement(\"vb-experiment.tsx-playground\", {\n // Monaco editor does not work well with shadow DOM\n shadowOptions: false,\n})\nclass TsxPlayground extends ReactNextElement implements TsxPlaygroundProps {\n /** 仅初始有效 */\n @property({ attribute: false })\n accessor source: string | undefined;\n\n @property({ attribute: false })\n accessor extraLibs: ExtraLib[] | undefined;\n\n @event({ type: \"change\" })\n accessor #change!: EventEmitter<string>;\n\n #handleChange = (value: string) => {\n this.#change?.emit(value);\n };\n\n render() {\n return (\n <TsxPlaygroundComponent\n source={this.source}\n extraLibs={this.extraLibs}\n onChange={this.#handleChange}\n />\n );\n }\n}\n\ninterface TsxPlaygroundComponentProps extends TsxPlaygroundProps {\n onChange: (value: string) => void;\n}\n\nfunction convertSeverity(\n severity: \"notice\" | \"warning\" | \"error\" | \"fatal\"\n): \"Hint\" | \"Info\" | \"Warning\" | \"Error\" {\n switch (severity) {\n case \"notice\":\n return \"Hint\";\n case \"warning\":\n return \"Warning\";\n case \"error\":\n return \"Error\";\n case \"fatal\":\n return \"Error\";\n }\n return severity;\n}\n\nfunction TsxPlaygroundComponent({\n source,\n extraLibs,\n onChange,\n}: TsxPlaygroundComponentProps) {\n const [code, setCode] = useState(source ?? \"\");\n const deferredCode = useDeferredValue(code);\n const [markers, setMarkers] = useState<ExtraMarker[] | undefined>();\n const [view, setView] = useState<ParseResult | undefined>();\n\n const allLibs = useMemo(\n () => [...BUILTIN_LIBS, ...(extraLibs ?? [])],\n [extraLibs]\n );\n\n const handleCodeChange = useCallback(\n (e: CustomEvent<string>) => {\n setCode(e.detail);\n onChange(e.detail);\n },\n [onChange]\n );\n useEffect(() => {\n let ignore = false;\n (async function run() {\n const worker = await getRemoteTsxParserWorker();\n if (ignore) {\n return;\n }\n const result = await worker.parse(deferredCode);\n if (ignore) {\n return;\n }\n setView(result);\n const withNodeErrors = result.errors.filter((err) => !!err.node);\n if (withNodeErrors.length > 0) {\n setMarkers(\n withNodeErrors.map((error) => ({\n message: error.message,\n severity: convertSeverity(error.severity),\n startLineNumber: error.node!.loc!.start.line,\n startColumn: error.node!.loc!.start.column + 1,\n endLineNumber: error.node!.loc!.end.line,\n endColumn: error.node!.loc!.end.column + 1,\n }))\n );\n } else {\n setMarkers(undefined);\n }\n if (ignore) {\n return;\n }\n })();\n return () => {\n ignore = true;\n };\n }, [deferredCode]);\n\n const rootId = useMemo(() => uniqueId(), []);\n const ref = useRef<HTMLDivElement>(null);\n const rootRef = useRef<Awaited<\n ReturnType<typeof unstable_createRoot>\n > | null>(null);\n\n useEffect(() => {\n const container = ref.current;\n if (!container) {\n return;\n }\n const portal = createPortal(rootId);\n const root = unstable_createRoot(container, {\n portal,\n supportsUseChildren: true,\n } as any);\n rootRef.current = root;\n\n return () => {\n root.unmount();\n portal.remove();\n rootRef.current = null;\n };\n }, [rootId]);\n\n // const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n let ignore = false;\n (async () => {\n if (!view) {\n return;\n }\n // setLoading(true);\n let convertedView: ConvertResult | undefined;\n try {\n convertedView = await convertTsx(view, { rootId, expanded: true });\n if (ignore) {\n return;\n }\n const { brick, context, functions, templates } = convertedView ?? {};\n await rootRef.current?.render(brick ?? [], {\n context,\n functions,\n templates,\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Failed to render view:\", error);\n rootRef.current?.render({\n brick: customElements.get(\"easyops-default-error\")\n ? \"easyops-default-error\"\n : \"div\",\n properties: {\n errorTitle: \"解析失败\",\n dataset: {\n errorBoundary: \"\",\n },\n style: {\n color: \"var(--color-error)\",\n },\n },\n children: [\n {\n brick: \"div\",\n properties: {\n textContent: httpErrorToString(error),\n },\n },\n ],\n });\n }\n // if (!ignore) {\n // setLoading(false);\n // }\n })();\n\n return () => {\n ignore = true;\n };\n }, [rootId, view]);\n\n return (\n <div className={styles.container}>\n <div className={styles.editor}>\n <Suspense fallback=\"Loading...\">\n <AsyncWrappedCodeEditor\n value={source}\n onCodeChange={handleCodeChange}\n language=\"typescript\"\n uri=\"file:///view.tsx\"\n automaticLayout=\"fit-container\"\n theme=\"tm-vs-dark\"\n extraLibs={allLibs}\n extraMarkers={markers}\n data-override-theme=\"dark-v2\"\n />\n </Suspense>\n </div>\n <div className={styles.preview}>\n <div data-root-id={rootId} ref={ref} />\n </div>\n </div>\n );\n}\n"],"names":["async","formatJs","source","typescript","semi","printWidth","arguments","length","undefined","format","parser","plugins","prettierPluginBabel","prettierPluginEstree","trailingComma","generateByFileStructure","items","folder","path","item","childPath","name","type","childFolder","file","nodeType","generate","node","cleanMenu","menu","key","value","Object","entries","Array","isArray","cleanMenuItem","keys","menuItem","customElements","define","createProviderClass","_ref","_storyboard$meta","_meta$customTemplates","_meta$functions","_meta$menus","_meta$contracts","_meta$i18n","projectDetail","storyboard","zip","JSZip","project","src","extractState","extracts","namePool","Map","extractedRoutes","extractRoutes","routes","app","id","appId","homepage","appSetting","layoutType","theme","noAuthGuard","locales","defaultConfig","JSON","parse","menuIcon","icon","standaloneMode","stringify","meta","customTemplates","functions","menus","contracts","i18n","workflows","mocks","userGroups","extractedTemplates","extractTemplates","push","fileStructure","buildFileStructure","srcIndexJs","resources","fnDir","fnNames","fnImports","fn","Error","inferredImports","Set","code","transform","filename","TransformStoryboardFunction","SmartImports","imports","hasFN","has","delete","importStrings","size","join","menusDir","menuNames","menuImports","menuId","replace","JS_RESERVED_WORDS","contractsDir","contractImports","contractNames","contract","baseName","counter","varName","add","srcResourcesIndexJs","editorConfig","gitIgnore","devConfigMjs","declarationsDTs","jsconfigJson","nextJsxConfigJs","replaceAll","packageJson","readmeMd","blob","generateAsync","saveAs","files","fs","content","segments","split","pop","handle","i","segment","current","slice","found","get","set","AsyncWrappedCodeEditor","React","default","asyncWrapBrick","onCodeChange","BUILTIN_LIBS","filePath","actionsDefinition","componentsDefinition","defineElement","property","event","createDecorators","_TsxPlayground","_A","WeakMap","_B","_C","_TsxPlayground_brand","WeakSet","_handleChange","TsxPlayground","ReactNextElement","constructor","_classPrivateMethodInitSpec","_classPrivateFieldInitSpec","_init_source","_init_extra_source","_init_extraLibs","_init_extra_extraLibs","_init_change","_init_extra_change","_classPrivateGetter2","_classPrivateGetter","this","_get_change","emit","_classPrivateFieldGet","v","_classPrivateFieldSet","extraLibs","render","TsxPlaygroundComponent","onChange","convertSeverity","severity","setCode","useState","deferredCode","useDeferredValue","markers","setMarkers","view","setView","allLibs","useMemo","handleCodeChange","useCallback","e","detail","useEffect","ignore","worker","getRemoteTsxParserWorker","result","withNodeErrors","errors","filter","err","map","error","message","startLineNumber","loc","start","line","startColumn","column","endLineNumber","end","endColumn","rootId","uniqueId","ref","useRef","rootRef","container","portal","createPortal","root","unstable_createRoot","supportsUseChildren","unmount","remove","convertedView","_rootRef$current","convertTsx","expanded","brick","context","templates","_rootRef$current2","console","properties","errorTitle","dataset","errorBoundary","style","color","children","textContent","httpErrorToString","className","styles","editor","Suspense","fallback","language","uri","automaticLayout","extraMarkers","preview","_TsxPlayground2","_set_change","c","_initClass","_applyDecs","shadowOptions","attribute","o","_","_checkInRHS"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ (()=>{"use strict";var e,r,t,n,s,o,i,a,p,l,u,c,d,m,f,y,g,h,v,b={780:(e,r,t)=>{var n=t(580),s=t(8135);const o=/^<%=?\s/,i=/\s%>$/;function a(e){let r=null;return s.traverse(e,{enter(e,t){var n;!r&&(s.isFunctionExpression(e)||s.isStatement(e)||s.isJSX(e)||s.isArrowFunctionExpression(e)&&(s.isBlockStatement(e.body)||s.isObjectProperty(null===(n=t[t.length-1])||void 0===n?void 0:n.node)))&&(r=e)}}),r}function p(e){return s.isNullLiteral(e)||s.isIdentifier(e)&&"undefined"===e.name}function l(e){let r=!1;return s.traverse(e,{enter(e){r||!s.isJSXElement(e)&&!s.isJSXFragment(e)||(r=!0)}}),r}function u(e){return e.slice(2).replace(/([a-z])([A-Z])/g,"$1.$2").toLowerCase()}var c=t(1321);function d(e,r){return f(e,new Map([...r.templateCollection?r.templateCollection.identifiers.map((e=>[e,`STATE.${e}`])):r.contexts.map((e=>[e,`CTX.${e}`])),...r.functionNames.map((e=>[e,`FN.${e}`]))]))}function m(e,r,t){return function(e,r){if(null==r||!r.size)return e;if([...r.keys()].some((r=>e.includes(r)))){const t=[];let n;try{n=(0,c.precookFunction)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,n){if(r.has(e.name)){var s;const r=null===(s=n[n.length-1])||void 0===s?void 0:s.node;let o;r&&"Property"===r.type&&!r.computed&&r.shorthand&&(o=!0),t.push({id:e,shorthand:o})}}}})}catch(e){console.error("Parse function failed:",e)}if(t.length>0&&n){const n=[];let s=0;for(let o=0;o<t.length;o++){const{id:i,shorthand:a}=t[o],{name:p,start:l,end:u}=i;n.push(e.substring(s,l),`${a?`${p}: `:""}${r.get(p)}`),s=u}return n.push(e.substring(s)),n.join("")}}return e}(e,new Map(r.functionNames.filter((e=>e!==t)).map((e=>[e,`FN.${e}`]))))}function f(e,r){if(null==r||!r.size)return e;if([...r.keys()].some((r=>e.includes(r)))){const t=[];let n;try{n=(0,c.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,n){if(r.has(e.name)){var s;const r=null===(s=n[n.length-1])||void 0===s?void 0:s.node;let o;r&&"Property"===r.type&&!r.computed&&r.shorthand&&(o=!0),t.push({id:e,shorthand:o})}}}})}catch(e){console.error("Parse expression failed:",e)}if(t.length>0&&n){const{prefix:e,source:s,suffix:o}=n,i=[];let a=0;for(let e=0;e<t.length;e++){const{id:n,shorthand:o}=t[e],{name:p,start:l,end:u}=n;i.push(s.substring(a,l),`${o?`${p}: `:""}${r.get(p)}`),a=u}return i.push(s.substring(a)),`${e}${i.join("")}${o}`}}return e}const y={callApi:[2,3],callHttp:[1,2],"Entity.list":[1,2],"Entity.get":[2]};function g(e,r,t,n){if(!s.isCallExpression(e)&&!s.isOptionalCallExpression(e))return r.errors.push({message:`Await expression must be a call expression, received ${e.type}`,node:e,severity:"error"}),null;const{callee:a}=e;let l;if(s.isMemberExpression(a)){if(null==t||!t.workspace)return r.errors.push({message:"Entity SDK calls require a workspace context",node:a,severity:"error"}),null;if(!s.isIdentifier(a.object)||"Entity"!==a.object.name||!s.isIdentifier(a.property)||a.computed||"list"!==a.property.name&&"get"!==a.property.name)return r.errors.push({message:"Unexpected awaited expression",node:a,severity:"error"}),null;l=`Entity.${a.property.name}`}else{if(!s.isIdentifier(a))return r.errors.push({message:`Await expression must call an identifier, received ${a.type}`,node:a,severity:"error"}),null;if(l=a.name,"callApi"!==l&&"callHttp"!==l)return r.errors.push({message:`Await expression must call "callApi" or "callHttp", received "${l}"`,node:a,severity:"error"}),null}const u=y[l],c=e.arguments.length<u[0];if((c||!u.includes(e.arguments.length))&&(r.errors.push({message:`"${l}()" expects ${u.join(" or ")} arguments, but got ${e.arguments.length}`,node:e,severity:c?"error":"warning"}),c))return null;let d;const m=e.arguments[0];if("callHttp"===l){const e=S(m,r,{...n,allowExpression:!0});if("string"!=typeof e)return r.errors.push({message:`"${l}()" expects a string value as the first argument, but got ${typeof e}`,node:m,severity:"error"}),null;d={api:e,http:!0}}else if("callApi"===l){const t=e.arguments[0];if(!s.isStringLiteral(t))return r.errors.push({message:`"${l}()" expects a string literal as the first argument, but got ${t.type}`,node:t,severity:"error"}),null;d={api:t.value}}else{const t=S(m,r,{...n,allowExpression:!0});if("string"!=typeof t)return r.errors.push({message:`"${l}()" expects a string value as the first argument, but got ${typeof t}`,node:m,severity:"error"}),null;const s=e.arguments[1];let o;s&&(o=S(s,r,{...n,allowExpression:!0})),d={api:l,entity:t,params:o}}if("callApi"===l||"callHttp"===l){const a=e.arguments[1];if(a&&!p(a)){s.isObjectExpression(a)||r.errors.push({message:`Data source "params" prefers an object literal, but got ${a.type}`,node:a,severity:"notice"});const e=S(a,r,{...n,allowExpression:!0});(function(e){if("string"!=typeof e)return!1;const r=e.trim();return o.test(r)&&i.test(r)})(e)||"object"==typeof e&&null!==e?d.params=e:r.errors.push({message:"API params expects an object or expression, but got "+typeof e,node:a,severity:"error"}),null!=t&&t.reward&&(d.ambiguousParams=S(a,{...r,errors:[]},{allowExpression:!0,ambiguous:!0}))}}if("callApi"===l){const t=e.arguments[2];if(t&&!p(t))if(s.isObjectExpression(t))for(const e of t.properties){if(!s.isObjectProperty(e)){r.errors.push({message:`"callApi()" third param "meta" expects object properties, but got ${e.type}`,node:e,severity:"error"});continue}const t=e.key;if(!s.isIdentifier(t)){r.errors.push({message:`"callApi()" third param "meta" property key must be an identifier, but got ${t.type}`,node:t,severity:"error"});continue}if("objectId"!==t.name){r.errors.push({message:`"callApi()" third param "meta" property key must be "objectId", but got "${t.name}"`,node:t,severity:"error"});continue}const n=e.value;if(!p(n)){if(!s.isStringLiteral(n)){r.errors.push({message:`"callApi()" third param "meta" property "${t.name}" expects a string literal, but got ${n.type}`,node:n,severity:"error"});continue}d.objectId=n.value}}else r.errors.push({message:`"callApi()" third param "meta" expects an object literal, but got ${t.type}`,node:t,severity:"error"})}return d}function h(e,r,t,n,o){var i;if(!s.isArrowFunctionExpression(e))return r.errors.push({message:`Expected arrow function expression as event handler, but got ${e.type}`,node:e,severity:"error"}),null;if(e.params.length>1)return r.errors.push({message:`Event handler expects 0 or 1 parameter, but got ${e.params.length}`,node:e,severity:"error"}),null;const a=new Map(null!==(i=null==n?void 0:n.replacePatterns)&&void 0!==i?i:[]),p=e.params[0];if(p){if(!s.isIdentifier(p))return r.errors.push({message:`Event handler parameter expects an identifier, but got ${p.type}`,node:p,severity:"error"}),null;const e=p.name;a.set(e,o?"EVENT.detail":"EVENT"),r.contexts.includes(e)&&r.errors.push({message:`Event handler parameter "${e}" conflicts with existing global variables`,node:p,severity:"error"})}if(!s.isBlockStatement(e.body))return r.errors.push({message:`Event handler body expects a block statement, but got ${e.body.type}`,node:e.body,severity:"error"}),null;const l=[];for(const o of e.body.body)if(s.isExpressionStatement(o))if(s.isAssignmentExpression(o.expression)){const{left:e,right:t}=o.expression;if(!s.isIdentifier(e)){r.errors.push({message:`Assignment in event handler expects an identifier on the left side, but got ${e.type}`,node:e,severity:"error"});continue}const i=S(t,r,{...n,allowExpression:!0,replacePatterns:a});l.push({action:"update_variable",payload:{name:e.name,value:i}})}else if(s.isCallExpression(o.expression)||s.isOptionalCallExpression(o.expression)){const{callee:e,arguments:i}=o.expression;if(s.isMemberExpression(e)||s.isOptionalMemberExpression(e)){if(!s.isCallExpression(e.object)){r.errors.push({message:`Member expression in event handler expects a call expression as object, but got ${e.object.type}`,node:e.object,severity:"error"});continue}if(!s.isIdentifier(e.object.callee)){r.errors.push({message:`Member expression in event handler expects an identifier as callee, but got ${e.object.callee.type}`,node:e.object.callee,severity:"error"});continue}if(!s.isIdentifier(e.property)){r.errors.push({message:`Member expression in event handler expects an identifier as property, but got ${e.property.type}`,node:e.property,severity:"error"});continue}const p=e.object.callee.name,u=e.object.arguments;if("getComponent"===p){if(2!==u.length){r.errors.push({message:`"getComponent()" expects 2 arguments, but got ${u.length}`,node:o.expression,severity:"error"});continue}const t=u[0];if(!s.isStringLiteral(t)){r.errors.push({message:`"getComponent()" expects a string literal as its first argument, but got ${t.type}`,node:t,severity:"error"});continue}const n=u[1];if(!s.isStringLiteral(n)){r.errors.push({message:`"getComponent()" expects a string literal as its second argument, but got ${n.type}`,node:n,severity:"error"});continue}l.push({action:"call_component",payload:{componentId:n.value,method:e.property.name,args:i.map((e=>S(e,r,{allowExpression:!0,replacePatterns:a})))}})}else if("callApi"===p||"callHttp"===p){if("then"!==e.property.name){r.errors.push({message:`"${p}()" expects "then" as its method, but got ${e.property.name}`,node:e.property,severity:"error"});continue}if(1!==i.length){r.errors.push({message:`"${p}().then()" expects exactly 1 argument, but got ${i.length}`,node:o.expression,severity:"error"});continue}const s=g(e.object,r,t,{replacePatterns:a});if(!s)continue;r.contracts.add(s.api);const u=h(i[0],r,t,n,!0);l.push({action:"call_api",payload:s,callback:u?{success:u}:void 0})}else r.errors.push({message:`Unsupported action in event handler: ${p}`,node:e.object.callee,severity:"error"});continue}if(!s.isIdentifier(e)){r.errors.push({message:`Call expression in event handler expects an identifier as callee, but got ${e.type}`,node:e,severity:"error"});continue}if(r.templateCollection){if(r.templateCollection.setters.has(e.name)){const t=i[0];l.push({action:"update_variable",payload:{scope:"template",name:r.templateCollection.setters.get(e.name),value:void 0===t?void 0:S(t,r,{allowExpression:!0,replacePatterns:a})}}),1!==i.length&&r.errors.push({message:`State setter expects exactly 1 argument, but got ${i.length}`,node:i[1],severity:"error"});continue}}else if(r.contextSetters.has(e.name)){const t=i[0];l.push({action:"update_variable",payload:{name:r.contextSetters.get(e.name),value:void 0===t?void 0:S(t,r,{allowExpression:!0,replacePatterns:a})}}),1!==i.length&&r.errors.push({message:`State setter expects exactly 1 argument, but got ${i.length}`,node:i[1],severity:"error"});continue}if("showMessage"===e.name){if(1!==i.length){r.errors.push({message:`"showMessage()" expects 1 argument, but got ${i.length}`,node:o.expression,severity:"error"});continue}const e=S(i[0],r,{allowExpression:!0,replacePatterns:a});l.push({action:"show_message",payload:e})}else if("refresh"===e.name){if(1!==i.length){r.errors.push({message:`"refresh()" expects 1 argument, but got ${i.length}`,node:o.expression,severity:"error"});continue}if(!s.isIdentifier(i[0])){r.errors.push({message:`"refresh()" expects an identifier as its argument, but got ${i[0].type}`,node:i[0],severity:"error"});continue}l.push({action:"refresh_data_source",payload:{name:i[0].name}})}else if("callApi"===e.name||"callHttp"===e.name){const e=g(o.expression,r,t,{replacePatterns:a});if(!e)continue;r.contracts.add(e.api),l.push({action:"call_api",payload:e})}else r.errors.push({message:`Unsupported action in event handler: ${e.name}`,node:e,severity:"error"})}else r.errors.push({message:`Unsupported event handler expression: ${o.expression.type}`,node:o.expression,severity:"error"});else r.errors.push({message:`Unsupported event handler statement: ${o.type}`,node:o,severity:"error"});return l}function v(e,r,t,n){if(s.isJSXElement(e)){if(!s.isJSXIdentifier(e.openingElement.name))return r.errors.push({message:`Expected JSXIdentifier, but got ${e.openingElement.name.type}`,node:e.openingElement.name,severity:"error"}),null;const a=e.openingElement.name.name;if("Fragment"===a){for(const t of e.openingElement.attributes)s.isJSXAttribute(t)&&s.isJSXIdentifier(t.name)&&"key"===t.name.name||r.errors.push({message:"Invalid attribute for Fragment",node:t,severity:"error"});return e.children.flatMap((e=>v(e,r,t,n)))}const l={},m={};let f,y;for(const a of e.openingElement.attributes){if(s.isJSXSpreadAttribute(a)){r.errors.push({message:"Spread attributes are not supported in component",node:a,severity:"error"});continue}if(!s.isJSXIdentifier(a.name)){r.errors.push({message:`Expected JSXIdentifier, but got ${a.name.type}`,node:a.name,severity:"error"});continue}const e=a.name.name;if(/^on[A-Z]/.test(e)){var o;if(!s.isJSXExpressionContainer(a.value)){var i,p;r.errors.push({message:`Event handler "${e}" expects a JSXExpressionContainer, but got ${null===(i=a.value)||void 0===i?void 0:i.type}`,node:null!==(p=a.value)&&void 0!==p?p:a,severity:"error"});continue}if(s.isJSXEmptyExpression(a.value.expression)){r.errors.push({message:"Empty expression in events is not allowed",node:a.value,severity:"warning"});continue}const n=a.value.expression;let l=null;l=s.isIdentifier(n)&&null!==(o=r.templateCollection)&&void 0!==o&&o.events.includes(n.name)?[{action:"dispatch_event",payload:{type:u(n.name),detail:"<% EVENT.detail %>"}}]:h(n,r,t),l&&(null!=f||(f={}),f[u(e)]=l)}else if("componentId"===e){if(!s.isStringLiteral(a.value)){var c,d;r.errors.push({message:`"componentId" attribute in component expects a string literal, but got ${null===(c=a.value)||void 0===c?void 0:c.type}`,node:null!==(d=a.value)&&void 0!==d?d:a,severity:"error"});continue}y=a.value.value}else if(null==a.value)l[e]=!0;else if(s.isStringLiteral(a.value))l[e]=a.value.value,m[e]=a.value.value;else if(s.isJSXExpressionContainer(a.value)){if(s.isJSXEmptyExpression(a.value.expression)){r.errors.push({message:`Empty expression in JSX attribute "${e}" is not allowed`,node:a.value,severity:"warning"});continue}l[e]=w(a.value.expression,r,{...n,allowExpression:!0,allowUseBrick:!0,modifier:"="}),null!=t&&t.reward&&(m[e]=S(a.value.expression,{...r,errors:[]},{allowExpression:!0,ambiguous:!0}))}else r.errors.push({message:`Unsupported attribute value type in component: ${a.value.type}`,node:a.value,severity:"error"})}const{textContent:g,children:x}=b(e.children,r,t,n);g&&(l.textContent=g);const $={name:a,componentId:y,properties:l,events:f,children:x};return null!=t&&t.reward&&($.ambiguousProps=m),y&&(r.componentsMap.has(y)?r.errors.push({message:`Duplicated componentId "${y}" found`,node:e,severity:"error"}):r.componentsMap.set(y,$)),{type:"component",component:$}}if(s.isJSXFragment(e))return e.children.flatMap((e=>v(e,r,t,n)));if(s.isJSXText(e))return e.value.trim()?{type:"text",text:e.value}:null;if(s.isJSXExpressionContainer(e))return v(e.expression,r,t,n);if(s.isJSXEmptyExpression(e))return null;if(s.isCallExpression(e)){const o=e.callee;if(s.isMemberExpression(o)&&s.isIdentifier(o.property)&&!o.computed&&"map"===o.property.name){const i=e.arguments;if(i.length>0){i.length>1&&r.errors.push({message:"Only one argument is allowed for map function",node:i[1],severity:"error"});const[e]=i;if(s.isArrowFunctionExpression(e)){if(s.isBlockStatement(e.body))return r.errors.push({message:"Block statement is not allowed in map function",node:e.body,severity:"error"}),null;if(l(e.body)){var m;const i=a(o.object);if(i)return r.errors.push({message:`Unsupported node type as the object of a map function with JSX element: ${i.type}`,node:i,severity:"error"}),null;if(e.params.length>2)return r.errors.push({message:"Only up to 2 parameters are allowed in map function with JSX element",node:e,severity:"error"}),null;const p=e.params.find((e=>!s.isIdentifier(e)));if(p)return r.errors.push({message:"Only identifier parameters are allowed in map function with JSX element",node:p,severity:"error"}),null;const l=new Map(null!==(m=null==n?void 0:n.replacePatterns)&&void 0!==m?m:[]);if(e.params.length>0){const[r,t]=e.params;l.set(r.name,"ITEM"),t&&l.set(t.name,"INDEX")}return{type:"component",component:{name:"ForEach",properties:{dataSource:w(o.object,r,{...n,modifier:"=",allowExpression:!0})},children:$([e.body],r,t,{...n,replacePatterns:l})}}}}}}}else if(s.isConditionalExpression(e)){const{test:s,consequent:o,alternate:i}=e;if(l(o)||l(i)){const e=a(s);return e?(r.errors.push({message:`Unsupported node type in conditional expression test: ${e.type}`,node:e,severity:"error"}),null):{type:"component",component:{name:"If",properties:{dataSource:w(s,r,{...n,modifier:"=",allowExpression:!0})},children:[...$([o],r,t,n),...$([i],r,t,n).map((e=>({...e,slot:"else"})))]}}}}else if(s.isLogicalExpression(e)){const{left:s,right:o,operator:i}=e;if(("&&"===i||"||"===i)&&l(o)){const i=a(s);if(i)return r.errors.push({message:`Unsupported node type in logical expression left: ${i.type}`,node:i,severity:"error"}),null;const p=$([o],r,t,n);return{type:"component",component:{name:"If",properties:{dataSource:w(s,r,{...n,modifier:"=",allowExpression:!0})},children:"&&"===e.operator?p:p.map((e=>({...e,slot:"else"})))}}}}if(s.isExpression(e)){const t=a(e);return t?(r.errors.push({message:`Unsupported node type in expression: ${t.type}`,node:t,severity:"error"}),null):{type:"expression",expression:e}}return r.errors.push({message:`Unsupported node type in component: ${e.type}`,node:e,severity:"error"}),null}function b(e,r,t,n){let s=e.flatMap((e=>v(e,r,t,n))),o=s.every((e=>"text"===(null==e?void 0:e.type)));if(!o){let e=null;const r=[];for(const t of s){if(null===t);else if("text"===t.type||"expression"===t.type){var i,a,p;if("text"===(null===(i=e)||void 0===i?void 0:i.type)||"expression"===(null===(a=e)||void 0===a?void 0:a.type)){e={type:"merged",children:[e,t]},r.splice(r.length-1,1,e);continue}if("merged"===(null===(p=e)||void 0===p?void 0:p.type)){e.children.push(t);continue}}e=t,r.push(t)}s=r,o=s.every((e=>"text"===(null==e?void 0:e.type)||"merged"===(null==e?void 0:e.type)&&e.children.every((e=>"text"===e.type))))}return o?{textContent:s.flatMap((e=>"text"===e.type?e.text:e.children.map((e=>e.text)))).join("").trim()}:s.every((e=>!!e&&"component"!==e.type))?{textContent:f(d(x(s.flatMap((e=>"merged"===e.type?e.children:e)),r.source),r),null==n?void 0:n.replacePatterns)}:{children:s.filter((e=>!!e)).map((e=>"component"===e.type?e.component:{name:"Plaintext",properties:{textContent:"text"===e.type?e.text:f(d("expression"===e.type?`<%= ${I(r.source,e.expression)} %>`:x(e.children,r.source),r),null==n?void 0:n.replacePatterns)}}))}}function x(e,r){return`<%= CTX.__builtin_fn_mergeTexts(${e.map((e=>"text"===e.type?JSON.stringify(e):`{type:"expression",value:(${I(r,e.expression)})}`)).join(", ")}) %>`}function $(e,r,t,n){const{textContent:s,children:o}=b(e,r,t,n);return null!=o?o:[{name:"Plaintext",properties:{textContent:s}}]}const E=Symbol("ambiguous");function S(e,r,t){if(s.isObjectExpression(e))return function(e,r,t){if(e.properties.some((e=>s.isSpreadElement(e)))&&t.allowExpression){const s=a(e);if(!s){var n;if(t.ambiguous)return E;const s=I(r.source,e);return f(d(`<%${null!==(n=t.modifier)&&void 0!==n?n:""} ${s} %>`,r),null==t?void 0:t.replacePatterns)}r.errors.push({message:`Unsupported node type: ${s.type}`,node:s,severity:"error"})}const o={};for(const n of e.properties)if(s.isObjectProperty(n)){if(n.computed||n.shorthand){r.errors.push({message:"Computed properties and shorthand properties are not supported",node:n.key,severity:"error"});continue}let e;if(s.isIdentifier(n.key))e=n.key.name;else{if(!s.isStringLiteral(n.key)){r.errors.push({message:`Unsupported object key type: ${n.key.type}`,node:n.key,severity:"error"});continue}e=n.key.value}o[e]=S(n.value,r,t)}else r.errors.push({message:`Unsupported property type: ${n.type}`,node:n,severity:"error"});return o}(e,r,t);if(s.isArrayExpression(e))return function(e,r,t){if(e.elements.some((e=>s.isSpreadElement(e)))&&t.allowExpression){const s=a(e);if(!s){var n;if(t.ambiguous)return E;const s=I(r.source,e);return f(d(`<%${null!==(n=t.modifier)&&void 0!==n?n:""} ${s} %>`,r),null==t?void 0:t.replacePatterns)}r.errors.push({message:`Unsupported node type: ${s.type}`,node:s,severity:"error"})}const o=[];for(const n of e.elements)null!==n?s.isSpreadElement(n)?r.errors.push({message:"Spread elements are not supported in arrays",node:n,severity:"error"}):o.push(S(n,r,t)):r.errors.push({message:"Array elements cannot be empty",node:e,severity:"error"});return o}(e,r,t);if(s.isStringLiteral(e)||s.isNumericLiteral(e)||s.isBooleanLiteral(e))return e.value;if(s.isNullLiteral(e))return null;if(!s.isIdentifier(e)||"undefined"!==e.name){if(t.allowUseBrick&&s.isArrowFunctionExpression(e)){const n=e.body;if(s.isBlockStatement(n))return r.errors.push({message:"Block statements are not supported in render callback",node:n,severity:"error"}),null;const o=[];for(const t of e.params){if(!s.isIdentifier(t))return r.errors.push({message:`Unsupported parameter type: ${t.type}`,node:t,severity:"error"}),null;o.push(t.name)}return{params:o,children:$([n],r,void 0,t)}}if(s.isExpression(e)&&t.allowExpression){const s=a(e);if(s)return r.errors.push({message:`Unsupported node type: ${s.type}`,node:s,severity:"error"}),null;{var n;if(t.ambiguous)return E;const s=I(r.source,e);return f(d(`<%${null!==(n=t.modifier)&&void 0!==n?n:""} ${s} %>`,r),null==t?void 0:t.replacePatterns)}}return r.errors.push({message:`Unsupported node type: ${e.type}`,node:e,severity:"error"}),null}}function w(e,r,t){let n=!1;if(s.traverse(e,{enter(e,r){var t;let o;n||s.isStringLiteral(e)||s.isNumericLiteral(e)||s.isBooleanLiteral(e)||s.isNullLiteral(e)||s.isObjectExpression(e)||s.isArrayExpression(e)||s.isObjectProperty(e)||s.isIdentifier(e)&&(o=null===(t=r[r.length-1])||void 0===t?void 0:t.node,1)&&(o&&s.isObjectProperty(o)?!o.computed&&!o.shorthand:"undefined"===e.name)||(n=!0)}}),n&&!a(e)){var o;const n=I(r.source,e);return f(d(`<%${null!==(o=t.modifier)&&void 0!==o?o:""} ${n} %>`,r),null==t?void 0:t.replacePatterns)}return S(e,r,t)}function I(e,r){const t=[];s.traverse(r,{enter(e){(s.isTSTypeAnnotation(e)||s.isTSTypeParameterInstantiation(e))&&t.push([e.start,e.end])}});let n="",o=r.start;for(const[r,s]of t)r>o&&(n+=e.substring(o,r),o=s);return n+=e.substring(o,r.end),n}function k(e,r,t){const n=e.openingElement;if(!s.isJSXIdentifier(n.name))return void r.errors.push({message:`Expected JSXIdentifier, but got ${n.name.type}`,node:n.name,severity:"error"});const o=n.name.name;if("View"!==o)return void r.errors.push({message:`Expected <View>, but got <${o}>`,node:n.name,severity:"error"});for(const e of n.attributes){if(s.isJSXSpreadAttribute(e)){r.errors.push({message:"Spread attributes are not supported in <eo-view>",node:e,severity:"error"});continue}if(!s.isJSXIdentifier(e.name)){r.errors.push({message:`Expected JSXIdentifier, but got ${e.name.type}`,node:e.name,severity:"error"});continue}const t=e.name.name;var i,a;"title"===t?s.isStringLiteral(e.value)?r.title=e.value.value:r.errors.push({message:`"title" attribute in <eo-view> expects a string literal, but got ${null===(i=e.value)||void 0===i?void 0:i.type}`,node:null!==(a=e.value)&&void 0!==a?a:e,severity:"error"}):r.errors.push({message:`Unsupported attribute "${t}" in <eo-view>`,node:e.name,severity:"notice"})}r.title||r.errors.push({message:'"title" attribute is required in <eo-view>',node:n.name,severity:"warning"});const p=$(e.children,r,t);r.components.push(...p)}function j(e,r){e.async||e.generator?r.errors.push({message:"Function declaration cannot be async or generator",node:e,severity:"error"}):e.id?r.functions.push({name:e.id.name,source:m(r.source.slice(e.start,e.end),r,e.id.name),typescript:!0}):r.errors.push({message:"Function declaration must have a name",node:e,severity:"error"})}function A(e,r,t,n,s,o,i){var a;const p=g(e,r,t);if(!p)return null;r.contracts.add(p.api);const l={name:n,scope:r.templateCollection?"template":"view",config:i,...p};if(s){if(s.length>("catch"===o?1:2))return r.errors.push({message:`"callApi().${o}()" expects no more than 2 arguments, but got ${s.length}`,node:s[1],severity:"error"}),!1;if(s.length>0){const e=C(s[0],r);e&&(l["catch"===o?"rejectTransform":"transform"]=e)}if("catch"!==o&&s.length>1){const e=C(s[1],r);e&&(l.rejectTransform=e)}}(null!==(a=r.templateCollection)&&void 0!==a?a:r).dataSources.push(l)}function C(e,r){if(!s.isArrowFunctionExpression(e))return r.errors.push({message:`"callApi().then()" callback expects an arrow function, but got ${e.type}`,node:e,severity:"error"}),null;if(!s.isExpression(e.body))return r.errors.push({message:`"callApi().then()" callback function body expects an expression, but got ${e.body.type}`,node:e.body,severity:"error"}),null;var t;if(e.params.length>1)return r.errors.push({message:`"callApi().then()" callback function expects exactly 0 or 1 parameter, but got ${e.params.length}`,node:null!==(t=e.params[1])&&void 0!==t?t:e,severity:"error"}),null;const n=`<% ${I(r.source,e.body)} %>`;if(0===e.params.length)return n;const o=e.params[0];return s.isIdentifier(o)?f(n,new Map([[o.name,"DATA"]])):(r.errors.push({message:`"callApi().then()" callback function parameter expects an identifier, but got ${o.type}`,node:o,severity:"error"}),null)}function P(e,r,t,n){if(e.async||e.generator)return void r.errors.push({message:"Function declaration cannot be async or generator",node:e,severity:"error"});if("template"===t){if(e.params.length>1)return void r.errors.push({message:`Component function expects at most 1 parameter, but got ${e.params.length}`,node:e.params[1],severity:"error"})}else if(e.params.length>0)return void r.errors.push({message:`View function expects no parameter, but got ${e.params.length}`,node:e.params[0],severity:"error"});let o,i,a,p;if("template"===t){o=[],i=new Map,a=[],p=[];const t=[];r.templateCollection={identifiers:o,setters:i,dataSources:p,events:t};const n=e.params[0];if(n){if(!s.isObjectPattern(n))return r.errors.push({message:`Component function parameter expects an object pattern, but got ${n.type}`,node:n,severity:"error"}),void delete r.templateCollection;for(const e of n.properties){if(s.isRestElement(e)){r.errors.push({message:"Component function parameter does not support rest element",node:e,severity:"error"});continue}if(e.computed||!e.shorthand){r.errors.push({message:"Unexpected computed or non-shorthand property in component function parameter",node:e,severity:"error"});continue}if(!s.isIdentifier(e.key)){r.errors.push({message:`Component function parameter property expects an identifier as key, but got ${e.key.type}`,node:e.key,severity:"error"});continue}const n=e.key.name;if(/^on[A-Z]/.test(n))s.isIdentifier(e.value)||r.errors.push({message:`Event handler property "${n}" expects an identifier as value, but got ${e.value.type}`,node:e.value,severity:"error"}),t.push(n);else if(o.push(n),s.isAssignmentPattern(e.value)){const t=S(e.value.right,r,{allowExpression:!0});a.push({name:n,value:t})}else a.push({name:n})}}}else o=r.contexts,i=r.contextSetters,a=r.variables,p=r.dataSources;for(const r of e.body.body)if(s.isVariableDeclaration(r))for(const e of r.declarations)if(s.isCallExpression(e.init)&&s.isIdentifier(e.init.callee))switch(e.init.callee.name){case"useState":if(s.isArrayPattern(e.id)){const[r,t]=e.id.elements;if(s.isIdentifier(r)){const e=r.name;o.push(e),s.isIdentifier(t)&&i.set(t.name,e)}}break;case"useResource":if(s.isArrayPattern(e.id)){const[r]=e.id.elements;if(s.isIdentifier(r)){const e=r.name;o.push(e)}}}else s.isIdentifier(e.id)&&o.push(e.id.name);for(const o of e.body.body)if(s.isVariableDeclaration(o)){if("const"!==o.kind){r.errors.push({message:`Unsupported variable declaration kind: ${o.kind}`,node:o,severity:"error"});continue}for(const e of o.declarations){if(e.init&&s.isCallExpression(e.init)&&s.isIdentifier(e.init.callee))switch(e.init.callee.name){case"useState":{if(!s.isArrayPattern(e.id)){r.errors.push({message:`"useState()" return value must be destructured into an array pattern, received ${e.id.type}`,node:e.id,severity:"error"});continue}const[t,n]=e.id.elements;if(!s.isIdentifier(t)){r.errors.push({message:`"useState()" expects an identifier as the variable name, received ${null==t?void 0:t.type}`,node:t,severity:"error"});continue}if(n&&!s.isIdentifier(n)){r.errors.push({message:`"useState()" expects an identifier as the setter name, received ${n.type}`,node:n,severity:"error"});continue}const o=t.name,i=e.init.arguments;if(0===i.length)a.push({name:o});else{i.length>1&&r.errors.push({message:`"useState()" expects at most 1 argument, but got ${i.length}`,node:e.init,severity:"error"});const t=S(i[0],r,{allowExpression:!0});a.push({name:o,value:t})}continue}case"useResource":{if(!s.isArrayPattern(e.id)){r.errors.push({message:`"useResource()" return value must be destructured into an array pattern, received ${e.id.type}`,node:e.id,severity:"error"});continue}const[t]=e.id.elements;if(!s.isIdentifier(t)){r.errors.push({message:`"useResource()" expects an identifier as the variable name, received ${null==t?void 0:t.type}`,node:t,severity:"error"});continue}const o=t.name,i=e.init.arguments;(0===i.length||i.length>2)&&r.errors.push({message:`"useResource()" expects 1 or 2 arguments, but got ${i.length}`,node:e.init,severity:"error"});const a=i[0];if(!s.isArrowFunctionExpression(a)){r.errors.push({message:`"useResource()" expects an arrow function as the argument, but got ${a.type}`,node:a,severity:"error"});continue}if(a.async||a.generator){r.errors.push({message:'"useResource()" argument function cannot be async or generator',node:a,severity:"error"});continue}const p=a.body;if(s.isBlockStatement(p)){r.errors.push({message:'Block statement is not supported in "useResource()" argument function',node:p,severity:"error"});continue}if(!s.isCallExpression(p)){r.errors.push({message:`"useResource()" argument function must return a call expression, but got ${p.type}`,node:p,severity:"error"});continue}const{callee:l}=p;if(!s.isIdentifier(l)&&!s.isMemberExpression(l)){r.errors.push({message:`"useResource()" argument function must return a call to an identifier or member expression, but got ${l.type}`,node:l,severity:"error"});continue}const u=i[1];let c;if(u){if(!s.isObjectExpression(u)){r.errors.push({message:`"useResource()" second argument must be an object expression, but got ${u.type}`,node:u,severity:"error"});continue}for(const e of u.properties){if(!s.isObjectProperty(e)){r.errors.push({message:`Unsupported property type in "useResource()" second argument: ${e.type}`,node:e,severity:"error"});continue}const t=e.key;s.isIdentifier(t)?e.computed?r.errors.push({message:'"useResource()" second argument property key cannot be computed',node:t,severity:"error"}):"enabled"===t.name||"fallback"===t.name?(null!=c||(c={}),c[t.name]=S(e.value,r,{allowExpression:!0})):r.errors.push({message:`"useResource()" second argument property key must be "enabled" or "fallback", but got "${t.name}"`,node:t,severity:"error"}):r.errors.push({message:`"useResource()" second argument property key must be an identifier, but got ${t.type}`,node:t,severity:"error"})}}if(s.isMemberExpression(l)){if(!s.isIdentifier(l.property)||l.computed||"then"!==l.property.name&&"catch"!==l.property.name){r.errors.push({message:"Unexpected awaited expression",node:l.property,severity:"error"});continue}A(l.object,r,n,o,p.arguments,l.property.name,c)}else A(p,r,n,o,void 0,void 0,c);continue}}if(!s.isIdentifier(e.id)){r.errors.push({message:`Expect an identifier as the variable name, received ${e.id.type}`,node:e.id,severity:"error"});continue}const t=e.id.name;if(null==e.init)e.id.typeAnnotation||r.errors.push({message:`Variable "${t}" with no initial value must have a type annotation`,node:e.id,severity:"error"}),a.push({name:t});else{const n=S(e.init,r,{allowExpression:!0});a.push({name:t,value:n})}}}else{if(s.isReturnStatement(o)){var l;if(!s.isJSXElement(o.argument))return void r.errors.push({message:`Exported default declaration must be a JSX element, but got ${null===(l=o.argument)||void 0===l?void 0:l.type}`,node:o.argument,severity:"error"});if("template"===t){const t=$([o.argument],r,n);return r.templates.push({name:e.id.name,variables:a,dataSources:p,components:t}),void delete r.templateCollection}return void k(o.argument,r,n)}s.isTSInterfaceDeclaration(o)||s.isTSTypeAliasDeclaration(o)||r.errors.push({message:`Unsupported top level statement type: ${o.type}`,node:o,severity:"error"})}r.errors.push({message:"Component function declaration must have a return statement returning a JSX element",node:e,severity:"error"})}function T(e,r,t){for(const t of e.program.body)s.isFunctionDeclaration(t)&&t.id&&!X(t.id)&&r.functionNames.push(t.id.name);for(const n of e.program.body)if(s.isFunctionDeclaration(n)){if(!n.id){r.errors.push({message:"Function declaration must have a name",node:n,severity:"error"});continue}X(n.id)?P(n,r,"template",t):j(n,r)}else if(s.isExportDefaultDeclaration(n)){if(!s.isFunctionDeclaration(n.declaration)){r.errors.push({message:`Expected function declaration as default export, but got ${n.declaration.type}`,node:n.declaration,severity:"error"});continue}P(n.declaration,r,"view",t)}else s.isTSInterfaceDeclaration(n)||s.isTSTypeAliasDeclaration(n)||r.errors.push({message:`Unsupported top level statement type: ${n.type}`,node:n,severity:"error"})}function X(e){return e.name[0]>="A"&&e.name[0]<="Z"}(0,t(7695).p)(class{parse(e,r){return function(e,r){var t,o;const i=[],a={source:e,title:void 0,dataSources:[],variables:[],components:[],componentsMap:new Map,errors:i,contexts:null!==(t=null==r?void 0:r.withContexts)&&void 0!==t?t:[],contextSetters:new Map,functionNames:[],functions:[],contracts:new Set,templates:[]};let p;try{p=(0,n.parse)(e,{plugins:["jsx","typescript"],sourceType:"module",errorRecovery:!0})}catch(e){return i.push({message:`Failed to parse TSX: ${e}`,node:null,severity:"fatal"}),a}if(null!==(o=p.errors)&&void 0!==o&&o.length)for(const e of p.errors)i.push({message:`${e.code}: ${e.reasonCode}`,node:null,severity:"error"});for(const e of p.program.body)if(s.isExportDefaultDeclaration(e)){if(s.isFunctionDeclaration(e.declaration))return T(p,a,r),a;break}return function(e,r,t){const{errors:n,contexts:o,functionNames:i,variables:a}=r;s.traverse(e.program,{enter(e){s.isTSAnyKeyword(e)?n.push({message:"Unexpected 'any' type",node:e,severity:"warning"}):s.isTSAsExpression(e)&&n.push({message:"Unexpected 'as' usage",node:e,severity:"warning"})}});for(const r of e.program.body)if(s.isVariableDeclaration(r))for(const e of r.declarations)s.isIdentifier(e.id)&&o.push(e.id.name);else s.isFunctionDeclaration(r)&&r.id&&i.push(r.id.name);let p=!1;for(const o of e.program.body)if(s.isVariableDeclaration(o)){if(p&&n.push({message:"Unexpected variable declaration after export",node:o,severity:"error"}),"let"!==o.kind&&"const"!==o.kind){n.push({message:`Unsupported variable declaration kind: ${o.kind}`,node:o,severity:"error"});continue}for(const e of o.declarations){if(!s.isIdentifier(e.id)){n.push({message:`Expect an identifier as the variable name, received ${e.id.type}`,node:e.id,severity:"error"});continue}const o=e.id.name;if(null==e.init)e.id.typeAnnotation||n.push({message:`Variable "${o}" with no initial value must have a type annotation`,node:e.id,severity:"error"}),a.push({name:o});else if(s.isAwaitExpression(e.init)){const i=e.init.argument;if(!s.isCallExpression(i)){n.push({message:`Await expression must be a call expression, received ${i.type}`,node:i,severity:"error"});continue}const{callee:a}=i;if(!s.isIdentifier(a)&&!s.isMemberExpression(a)){n.push({message:`Await expression must call an identifier or member expression, received ${a.type}`,node:a,severity:"error"});continue}if(s.isMemberExpression(a))if(s.isIdentifier(a.object)&&"Entity"===a.object.name){if(!s.isIdentifier(a.property)||a.computed||"list"!==a.property.name&&"get"!==a.property.name){n.push({message:"Unexpected awaited expression",node:a.property,severity:"error"});continue}A(i,r,t,o)}else{if(!s.isIdentifier(a.property)||a.computed||"then"!==a.property.name&&"catch"!==a.property.name){n.push({message:"Unexpected awaited expression",node:a.property,severity:"error"});continue}A(a.object,r,t,o,i.arguments,a.property.name)}else A(i,r,t,o)}else{const t=S(e.init,r,{allowExpression:!0});a.push({name:o,value:t})}}}else if(s.isFunctionDeclaration(o))p&&n.push({message:"Unexpected function declaration after export",node:o,severity:"error"}),j(o,r);else if(s.isExportDefaultDeclaration(o)){p=!0;const e=o.declaration;if(!s.isJSXElement(e)){n.push({message:`Exported default declaration must be a JSX element, but got ${e.type}`,node:e,severity:"error"});continue}k(e,r,t)}else s.isTSInterfaceDeclaration(o)||s.isTSTypeAliasDeclaration(o)||n.push({message:`Unsupported top level statement type: ${o.type}`,node:o,severity:"error"})}(p,a,r),a}(e,r)}})}},x={};function $(e){var r=x[e];if(void 0!==r)return r.exports;var t=x[e]={exports:{}};return b[e](t,t.exports,$),t.exports}$.m=b,$.c=x,$.x=()=>{var e=$.O(void 0,[5521,4957,1321,580],(()=>$(780)));return $.O(e)},e=[],$.O=(r,t,n,s)=>{if(!t){var o=1/0;for(l=0;l<e.length;l++){for(var[t,n,s]=e[l],i=!0,a=0;a<t.length;a++)(!1&s||o>=s)&&Object.keys($.O).every((e=>$.O[e](t[a])))?t.splice(a--,1):(i=!1,s<o&&(o=s));if(i){e.splice(l--,1);var p=n();void 0!==p&&(r=p)}}return r}s=s||0;for(var l=e.length;l>0&&e[l-1][2]>s;l--)e[l]=e[l-1];e[l]=[t,n,s]},$.d=(e,r)=>{for(var t in r)$.o(r,t)&&!$.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},$.f={},$.e=e=>Promise.all(Object.keys($.f).reduce(((r,t)=>($.f[t](e,r),r)),[])),$.u=e=>"chunks/"+e+"."+{1122:"e8137c1f",4957:"b8513749",5521:"17b56374",6773:"87d0ae93"}[e]+".js",$.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),$.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),$.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{$.S={};var e={},r={};$.I=(t,n)=>{n||(n=[]);var s=r[t];if(s||(s=r[t]={}),!(n.indexOf(s)>=0)){if(n.push(s),e[t])return e[t];$.o($.S,t)||($.S[t]={}),$.S[t];var o=[];return e[t]=o.length?Promise.all(o).then((()=>e[t]=1)):1}}})(),(()=>{var e;$.g.importScripts&&(e=$.g.location+"");var r=$.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),$.p=e+"../"})(),r=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},t=(e,t)=>{e=r(e),t=r(t);for(var n=0;;){if(n>=e.length)return n<t.length&&"u"!=(typeof t[n])[0];var s=e[n],o=(typeof s)[0];if(n>=t.length)return"u"==o;var i=t[n],a=(typeof i)[0];if(o!=a)return"o"==o&&"n"==a||"s"==a||"u"==o;if("o"!=o&&"u"!=o&&s!=i)return s<i;n++}},n=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var s=1,o=1;o<e.length;o++)s--,t+="u"==(typeof(a=e[o]))[0]?"-":(s>0?".":"")+(s=2,a);return t}var i=[];for(o=1;o<e.length;o++){var a=e[o];i.push(0===a?"not("+p()+")":1===a?"("+p()+" || "+p()+")":2===a?i.pop()+" "+i.pop():n(a))}return p();function p(){return i.pop().replace(/^\((.+)\)$/,"$1")}},s=(e,t)=>{if(0 in e){t=r(t);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,a=1,p=!0;;a++,i++){var l,u,c=a<e.length?(typeof e[a])[0]:"";if(i>=t.length||"o"==(u=(typeof(l=t[i]))[0]))return!p||("u"==c?a>n&&!o:""==c!=o);if("u"==u){if(!p||"u"!=c)return!1}else if(p)if(c==u)if(a<=n){if(l!=e[a])return!1}else{if(o?l>e[a]:l<e[a])return!1;l!=e[a]&&(p=!1)}else if("s"!=c&&"n"!=c){if(o||a<=n)return!1;p=!1,a--}else{if(a<=n||u<c!=o)return!1;p=!1}else"s"!=c&&"n"!=c&&(p=!1,a--)}}var d=[],m=d.pop.bind(d);for(i=1;i<e.length;i++){var f=e[i];d.push(1==f?m()|m():2==f?m()&m():f?s(f,t):!m())}return!!m()},o=(e,r)=>e&&$.o(e,r),i=e=>(e.loaded=1,e.get()),a=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),p=(e,r,n)=>{var s=n?a(e[r]):e[r];return Object.keys(s).reduce(((e,r)=>!e||!s[e].loaded&&t(e,r)?r:e),0)},l=(e,r,t,s)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+n(s)+")",u=e=>{throw new Error(e)},c=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},d=(e,r,t)=>t?t():((e,r)=>u("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),m=(e=>function(r,t,n,s,o){var i=$.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,$.S[r],t,!1,s,o)):e(r,$.S[r],t,n,s,o)})(((e,r,t,n,a,u)=>{if(!o(r,t))return d(e,t,u);var m=p(r,t,n);return s(a,m)||c(l(r,t,m,a)),i(r[t][m])})),f={},y={1321:()=>m("default","@next-core/cook",!1,[0],(()=>Promise.all([$.e(1122),$.e(580)]).then((()=>()=>$(1122))))),580:()=>m("default","@babel/parser",!1,[0],(()=>$.e(6773).then((()=>()=>$(6773)))))},g={580:[580],1321:[1321]},h={},$.f.consumes=(e,r)=>{$.o(g,e)&&g[e].forEach((e=>{if($.o(f,e))return r.push(f[e]);if(!h[e]){var t=r=>{f[e]=0,$.m[e]=t=>{delete $.c[e],t.exports=r()}};h[e]=!0;var n=r=>{delete f[e],$.m[e]=t=>{throw delete $.c[e],r}};try{var s=y[e]();s.then?r.push(f[e]=s.then(t).catch(n)):t(s)}catch(e){n(e)}}}))},(()=>{var e={780:1};$.f.i=(r,t)=>{e[r]||/^(1321|580)$/.test(r)||importScripts($.p+$.u(r))};var r=globalThis.webpackChunk_next_bricks_vb_experiment=globalThis.webpackChunk_next_bricks_vb_experiment||[],t=r.push.bind(r);r.push=r=>{var[n,s,o]=r;for(var i in s)$.o(s,i)&&($.m[i]=s[i]);for(o&&o($);n.length;)e[n.pop()]=1;t(r)}})(),v=$.x,$.x=()=>Promise.all([5521,4957,1321,580].map($.e,$)).then(v),$.x()})();
2
+ //# sourceMappingURL=780.28286ed7.js.map