@next-core/brick-container 2.96.47 → 2.96.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./packages/brick-container/src/i18n/constants.ts","webpack:///delegated ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js from dll-reference dll","webpack:///delegated ./node_modules/@next-core/fontawesome-library/dist/index.esm.js from dll-reference dll","webpack:///delegated ./node_modules/react-i18next/dist/es/index.js from dll-reference dll","webpack:///delegated ./node_modules/@next-core/brick-utils/dist/index.esm.js from dll-reference dll","webpack:///./node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js","webpack:///./packages/brick-container/src/i18n/locales/en.ts","webpack:///./packages/brick-container/src/i18n/locales/zh.ts","webpack:///./packages/brick-container/src/i18n/index.ts","webpack:///delegated ./node_modules/@next-core/brick-http/dist/index.esm.js from dll-reference dll","webpack:///./packages/brick-container/src/replaceUseChildren.ts","webpack:///./packages/brick-container/src/preview.ts","webpack:///external \"dll\"","webpack:///delegated ./node_modules/i18next/dist/esm/i18next.js from dll-reference dll","webpack:///delegated ./node_modules/@next-core/brick-kit/dist/index.esm.js from dll-reference dll","webpack:///delegated ./node_modules/@babel/runtime/helpers/esm/createClass.js from dll-reference dll","webpack:///delegated ./node_modules/moment/moment.js from dll-reference dll","webpack:///delegated ./node_modules/@babel/runtime/helpers/asyncToGenerator.js from dll-reference dll"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","K","NS_BRICK_CONTAINER","arr","each","forEach","slice","defaults","obj","arguments","source","prop","undefined","fieldContentRegExp","serializeCookie","val","options","opt","path","encodeURIComponent","str","concat","maxAge","Number","isNaN","Error","Math","floor","domain","test","TypeError","expires","toUTCString","httpOnly","secure","sameSite","toLowerCase","cookie","minutes","cookieOptions","length","Date","setTime","getTime","document","nameEQ","ca","split","charAt","substring","indexOf","cookie$1","lookup","found","lookupCookie","cacheUserLanguage","lng","cookieMinutes","cookieDomain","querystring","window","search","location","hash","params","pos","lookupQuerystring","hasLocalStorageSupport","localStorageAvailable","localStorage","setItem","removeItem","e","lookupLocalStorage","getItem","hasSessionStorageSupport","sessionStorageAvailable","sessionStorage","lookupSessionStorage","navigator$1","navigator","languages","push","userLanguage","language","htmlTag","documentElement","getAttribute","pathname","match","Array","lookupFromPathIndex","replace","subdomain","lookupFromSubdomainIndex","hostname","Browser","services","this","type","detectors","init","i18nOptions","order","caches","excludeCacheFor","lookupFromUrlIndex","addDetector","detector","detectionOrder","_this","detected","detectorName","languageUtils","getBestMatchFromCodes","_this2","cacheName","locale","BOOTSTRAP_ERROR","NETWORK_ERROR","i18n","on","moment","setAttribute","use","LanguageDetector","initReactI18next","fallbackLng","debug","process","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","en","zh","initI18n","USE_CHILDREN_SLOT_REGEXP","replaceUseChildren","bricks","brick","replaceInBrick","slots","useChildrenMap","Map","slot","slotConf","entries","children","isArray","set","size","replaceInProperties","item","isObject","k","v","useBrick","properties","initializeLibrary","DLL_PATH","BRICK_NEXT_VERSIONS","http","interceptors","response","config","observe","data","error","Promise","reject","main","querySelector","bg","portal","_preview_render","conf","theme","applyTheme","developHelper","render","dll"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF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M+K,SAA+B,IAApBT,EAAShH,OAAegH,EAAS,GAAKA,QAGzDI,EAAoBI,EAAGb,GArB3BS,CAAoBZ,EAAMkB,WAAYf,GCpB1CgB,8BAGAvG,OAAOwG,SAAWA,2MAGlBxG,OAAOyG,oBAAsBA,iGAE7BC,OAAKC,aAAaC,SAAS5C,KACzB,SAAU4C,GAAwB,MAChC,MAA4C,cAAd,QAAvB,EAAAA,EAASC,OAAOzJ,eAAO,aAAvB,EAAyB0J,SAC5BF,EACAA,EAASG,QAEf,SAAUC,GACR,OAAOC,QAAQC,OAAOF,EAAMA,UAIhC,IAAMG,EAAOnI,SAASoI,cAA2B,qBAC3CC,EAAKrI,SAASoI,cAA2B,mBACzCE,EAAStI,SAASoI,cAA2B,uBAGlDpH,OAAeuH,gBAAe,sBAAG,aAM5B,IANmC,KACvCC,EAAI,MACJC,GAID,EACCC,qBAAWD,GACXvC,EAAoB,GAAmBzH,OAAO+J,UACxCG,gBAAcC,OAAO,CAAET,OAAME,KAAIC,UAAyBE,MACjE,mDAV8B,I,mBCrC/BpN,EAAOD,QAAU0N,K,qBCAjBzN,EAAOD,QAAWF,EAAoB,OAArB,CAA8B,S,mECA/CG,EAAOD,QAAWF,EAAoB,OAArB,CAA8B,S,qBCA/CG,EAAOD,QAAWF,EAAoB,OAArB,CAA8B,S,uBCA/CG,EAAOD,QAAWF,EAAoB,OAArB,CAA8B,S,qBCA/CG,EAAOD,QAAWF,EAAoB,OAArB,CAA8B","file":"preview.e89609cf80e274fcf497.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"Tkf5\");\n","export const NS_BRICK_CONTAINER = \"brick-container\";\n\nexport enum K {\n BOOTSTRAP_ERROR = \"BOOTSTRAP_ERROR\",\n NETWORK_ERROR = \"NETWORK_ERROR\",\n}\n\nexport type Locale = { [key in K]: string };\n","module.exports = (__webpack_require__(\"XuQu\"))(\"1OyB\");","module.exports = (__webpack_require__(\"XuQu\"))(\"9RIe\");","module.exports = (__webpack_require__(\"XuQu\"))(\"9kay\");","module.exports = (__webpack_require__(\"XuQu\"))(\"A+yw\");","import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\n\nvar arr = [];\nvar each = arr.forEach;\nvar slice = arr.slice;\nfunction defaults(obj) {\n each.call(slice.call(arguments, 1), function (source) {\n if (source) {\n for (var prop in source) {\n if (obj[prop] === undefined) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}\n\n// eslint-disable-next-line no-control-regex\nvar fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\nvar serializeCookie = function serializeCookie(name, val, options) {\n var opt = options || {};\n opt.path = opt.path || '/';\n var value = encodeURIComponent(val);\n var str = \"\".concat(name, \"=\").concat(value);\n\n if (opt.maxAge > 0) {\n var maxAge = opt.maxAge - 0;\n if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');\n str += \"; Max-Age=\".concat(Math.floor(maxAge));\n }\n\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n\n str += \"; Domain=\".concat(opt.domain);\n }\n\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n\n str += \"; Path=\".concat(opt.path);\n }\n\n if (opt.expires) {\n if (typeof opt.expires.toUTCString !== 'function') {\n throw new TypeError('option expires is invalid');\n }\n\n str += \"; Expires=\".concat(opt.expires.toUTCString());\n }\n\n if (opt.httpOnly) str += '; HttpOnly';\n if (opt.secure) str += '; Secure';\n\n if (opt.sameSite) {\n var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n switch (sameSite) {\n case true:\n str += '; SameSite=Strict';\n break;\n\n case 'lax':\n str += '; SameSite=Lax';\n break;\n\n case 'strict':\n str += '; SameSite=Strict';\n break;\n\n case 'none':\n str += '; SameSite=None';\n break;\n\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n\n return str;\n};\n\nvar cookie = {\n create: function create(name, value, minutes, domain) {\n var cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n path: '/',\n sameSite: 'strict'\n };\n\n if (minutes) {\n cookieOptions.expires = new Date();\n cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);\n }\n\n if (domain) cookieOptions.domain = domain;\n document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);\n },\n read: function read(name) {\n var nameEQ = \"\".concat(name, \"=\");\n var ca = document.cookie.split(';');\n\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n\n while (c.charAt(0) === ' ') {\n c = c.substring(1, c.length);\n }\n\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n\n return null;\n },\n remove: function remove(name) {\n this.create(name, '', -1);\n }\n};\nvar cookie$1 = {\n name: 'cookie',\n lookup: function lookup(options) {\n var found;\n\n if (options.lookupCookie && typeof document !== 'undefined') {\n var c = cookie.read(options.lookupCookie);\n if (c) found = c;\n }\n\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupCookie && typeof document !== 'undefined') {\n cookie.create(options.lookupCookie, lng, options.cookieMinutes, options.cookieDomain, options.cookieOptions);\n }\n }\n};\n\nvar querystring = {\n name: 'querystring',\n lookup: function lookup(options) {\n var found;\n\n if (typeof window !== 'undefined') {\n var search = window.location.search;\n\n if (!window.location.search && window.location.hash && window.location.hash.indexOf('?') > -1) {\n search = window.location.hash.substring(window.location.hash.indexOf('?'));\n }\n\n var query = search.substring(1);\n var params = query.split('&');\n\n for (var i = 0; i < params.length; i++) {\n var pos = params[i].indexOf('=');\n\n if (pos > 0) {\n var key = params[i].substring(0, pos);\n\n if (key === options.lookupQuerystring) {\n found = params[i].substring(pos + 1);\n }\n }\n }\n }\n\n return found;\n }\n};\n\nvar hasLocalStorageSupport = null;\n\nvar localStorageAvailable = function localStorageAvailable() {\n if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;\n\n try {\n hasLocalStorageSupport = window !== 'undefined' && window.localStorage !== null;\n var testKey = 'i18next.translate.boo';\n window.localStorage.setItem(testKey, 'foo');\n window.localStorage.removeItem(testKey);\n } catch (e) {\n hasLocalStorageSupport = false;\n }\n\n return hasLocalStorageSupport;\n};\n\nvar localStorage = {\n name: 'localStorage',\n lookup: function lookup(options) {\n var found;\n\n if (options.lookupLocalStorage && localStorageAvailable()) {\n var lng = window.localStorage.getItem(options.lookupLocalStorage);\n if (lng) found = lng;\n }\n\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupLocalStorage && localStorageAvailable()) {\n window.localStorage.setItem(options.lookupLocalStorage, lng);\n }\n }\n};\n\nvar hasSessionStorageSupport = null;\n\nvar sessionStorageAvailable = function sessionStorageAvailable() {\n if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;\n\n try {\n hasSessionStorageSupport = window !== 'undefined' && window.sessionStorage !== null;\n var testKey = 'i18next.translate.boo';\n window.sessionStorage.setItem(testKey, 'foo');\n window.sessionStorage.removeItem(testKey);\n } catch (e) {\n hasSessionStorageSupport = false;\n }\n\n return hasSessionStorageSupport;\n};\n\nvar sessionStorage = {\n name: 'sessionStorage',\n lookup: function lookup(options) {\n var found;\n\n if (options.lookupSessionStorage && sessionStorageAvailable()) {\n var lng = window.sessionStorage.getItem(options.lookupSessionStorage);\n if (lng) found = lng;\n }\n\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupSessionStorage && sessionStorageAvailable()) {\n window.sessionStorage.setItem(options.lookupSessionStorage, lng);\n }\n }\n};\n\nvar navigator$1 = {\n name: 'navigator',\n lookup: function lookup(options) {\n var found = [];\n\n if (typeof navigator !== 'undefined') {\n if (navigator.languages) {\n // chrome only; not an array, so can't use .push.apply instead of iterating\n for (var i = 0; i < navigator.languages.length; i++) {\n found.push(navigator.languages[i]);\n }\n }\n\n if (navigator.userLanguage) {\n found.push(navigator.userLanguage);\n }\n\n if (navigator.language) {\n found.push(navigator.language);\n }\n }\n\n return found.length > 0 ? found : undefined;\n }\n};\n\nvar htmlTag = {\n name: 'htmlTag',\n lookup: function lookup(options) {\n var found;\n var htmlTag = options.htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);\n\n if (htmlTag && typeof htmlTag.getAttribute === 'function') {\n found = htmlTag.getAttribute('lang');\n }\n\n return found;\n }\n};\n\nvar path = {\n name: 'path',\n lookup: function lookup(options) {\n var found;\n\n if (typeof window !== 'undefined') {\n var language = window.location.pathname.match(/\\/([a-zA-Z-]*)/g);\n\n if (language instanceof Array) {\n if (typeof options.lookupFromPathIndex === 'number') {\n if (typeof language[options.lookupFromPathIndex] !== 'string') {\n return undefined;\n }\n\n found = language[options.lookupFromPathIndex].replace('/', '');\n } else {\n found = language[0].replace('/', '');\n }\n }\n }\n\n return found;\n }\n};\n\nvar subdomain = {\n name: 'subdomain',\n lookup: function lookup(options) {\n // If given get the subdomain index else 1\n var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === 'number' ? options.lookupFromSubdomainIndex + 1 : 1; // get all matches if window.location. is existing\n // first item of match is the match itself and the second is the first group macht which sould be the first subdomain match\n // is the hostname no public domain get the or option of localhost\n\n var language = typeof window !== 'undefined' && window.location && window.location.hostname && window.location.hostname.match(/^(\\w{2,5})\\.(([a-z0-9-]{1,63}\\.[a-z]{2,6})|localhost)/i); // if there is no match (null) return undefined\n\n if (!language) return undefined; // return the given group match\n\n return language[lookupFromSubdomainIndex];\n }\n};\n\nfunction getDefaults() {\n return {\n order: ['querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'],\n lookupQuerystring: 'lng',\n lookupCookie: 'i18next',\n lookupLocalStorage: 'i18nextLng',\n lookupSessionStorage: 'i18nextLng',\n // cache user language\n caches: ['localStorage'],\n excludeCacheFor: ['cimode'] // cookieMinutes: 10,\n // cookieDomain: 'myDomain'\n\n };\n}\n\nvar Browser = /*#__PURE__*/function () {\n function Browser(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Browser);\n\n this.type = 'languageDetector';\n this.detectors = {};\n this.init(services, options);\n }\n\n _createClass(Browser, [{\n key: \"init\",\n value: function init(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n this.services = services;\n this.options = defaults(options, this.options || {}, getDefaults()); // backwards compatibility\n\n if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;\n this.i18nOptions = i18nOptions;\n this.addDetector(cookie$1);\n this.addDetector(querystring);\n this.addDetector(localStorage);\n this.addDetector(sessionStorage);\n this.addDetector(navigator$1);\n this.addDetector(htmlTag);\n this.addDetector(path);\n this.addDetector(subdomain);\n }\n }, {\n key: \"addDetector\",\n value: function addDetector(detector) {\n this.detectors[detector.name] = detector;\n }\n }, {\n key: \"detect\",\n value: function detect(detectionOrder) {\n var _this = this;\n\n if (!detectionOrder) detectionOrder = this.options.order;\n var detected = [];\n detectionOrder.forEach(function (detectorName) {\n if (_this.detectors[detectorName]) {\n var lookup = _this.detectors[detectorName].lookup(_this.options);\n\n if (lookup && typeof lookup === 'string') lookup = [lookup];\n if (lookup) detected = detected.concat(lookup);\n }\n });\n if (this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0\n\n return detected.length > 0 ? detected[0] : null; // a little backward compatibility\n }\n }, {\n key: \"cacheUserLanguage\",\n value: function cacheUserLanguage(lng, caches) {\n var _this2 = this;\n\n if (!caches) caches = this.options.caches;\n if (!caches) return;\n if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;\n caches.forEach(function (cacheName) {\n if (_this2.detectors[cacheName]) _this2.detectors[cacheName].cacheUserLanguage(lng, _this2.options);\n });\n }\n }]);\n\n return Browser;\n}();\n\nBrowser.type = 'languageDetector';\n\nexport { Browser as default };\n","import { Locale, K } from \"../constants\";\n\nconst locale: Locale = {\n [K.BOOTSTRAP_ERROR]: \"Bootstrap Error\",\n [K.NETWORK_ERROR]: \"Network error, please check your network.\",\n};\n\nexport default locale;\n","import { Locale, K } from \"../constants\";\n\nconst locale: Locale = {\n [K.BOOTSTRAP_ERROR]: \"启动错误\",\n [K.NETWORK_ERROR]: \"网络错误,请检查您的网络连接。\",\n};\n\nexport default locale;\n","import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport moment from \"moment\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport { initI18n } from \"@next-core/brick-kit\";\n\nimport { NS_BRICK_CONTAINER } from \"./constants\";\nimport en from \"./locales/en\";\nimport zh from \"./locales/zh\";\n\n// I18next is synchronously initialized now,\n// so we listen on language change before initialization.\ni18n.on(\"languageChanged\", function (lng) {\n moment.locale(lng);\n document.documentElement.setAttribute(\"lang\", lng);\n});\n\ni18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(LanguageDetector)\n .use(initReactI18next)\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n /*global process*/\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false, // not needed for react as it escapes by default\n },\n react: {\n useSuspense: false,\n },\n compatibilityJSON: \"v3\",\n resources: {\n en: {\n [NS_BRICK_CONTAINER]: en,\n },\n zh: {\n [NS_BRICK_CONTAINER]: zh,\n },\n },\n });\n\ninitI18n();\n\nexport default i18n;\n","module.exports = (__webpack_require__(\"XuQu\"))(\"JxWY\");","import type { BrickConf, SlotConfOfBricks } from \"@next-core/brick-types\";\nimport { isObject } from \"@next-core/brick-utils\";\n\nconst USE_CHILDREN_SLOT_REGEXP = /^\\[\\w+\\]$/;\n\n/**\n * Replace `useChildren: \"[xxx]\"` with `useBrick`.\n */\nexport function replaceUseChildren(bricks: BrickConf[]): void {\n for (const brick of bricks) {\n replaceInBrick(brick);\n }\n}\n\nfunction replaceInBrick(brick: BrickConf): void {\n const slots = brick.slots ?? {};\n const useChildrenMap = new Map<string, BrickConf[]>();\n for (const [slot, slotConf] of Object.entries(slots)) {\n const { bricks: children } = slotConf as SlotConfOfBricks;\n if (USE_CHILDREN_SLOT_REGEXP.test(slot)) {\n if (Array.isArray(children) && children.length > 0) {\n useChildrenMap.set(slot, children);\n replaceUseChildren(children);\n }\n delete slots[slot];\n }\n\n if (Array.isArray(children)) {\n replaceUseChildren(children);\n }\n }\n\n if (useChildrenMap.size > 0) {\n replaceInProperties(brick.properties, useChildrenMap);\n }\n}\n\nfunction replaceInProperties(\n value: unknown,\n useChildrenMap: Map<string, BrickConf[]>\n): void {\n if (Array.isArray(value)) {\n for (const item of value) {\n replaceInProperties(item, useChildrenMap);\n }\n } else if (isObject(value)) {\n for (const [k, v] of Object.entries(value)) {\n if (k === \"useChildren\") {\n const children = useChildrenMap.get(v as string);\n if (children) {\n delete value[k];\n value.useBrick = children.length === 1 ? children[0] : children;\n }\n } else {\n replaceInProperties(v, useChildrenMap);\n }\n }\n }\n}\n","import { SiteTheme, StoryConf, type MountPoints } from \"@next-core/brick-types\";\nimport { developHelper, applyTheme } from \"@next-core/brick-kit\";\n\nimport { http, HttpResponse, type HttpError } from \"@next-core/brick-http\";\nimport { initializeLibrary } from \"@next-core/fontawesome-library\";\nimport \"./i18n\";\nimport \"@next-core/theme\";\nimport \"./styles/antd.less\";\nimport \"./styles/antd-compatible.less\";\nimport \"./styles/default.css\";\nimport \"./styles/preview.css\";\nimport { replaceUseChildren } from \"./replaceUseChildren\";\n\ninitializeLibrary();\n// eslint-disable-next-line\n// @ts-ignore\nwindow.DLL_PATH = DLL_PATH;\n// eslint-disable-next-line\n// @ts-ignore\nwindow.BRICK_NEXT_VERSIONS = BRICK_NEXT_VERSIONS;\n\nhttp.interceptors.response.use(\n function (response: HttpResponse) {\n return response.config.options?.observe === \"response\"\n ? response\n : response.data;\n },\n function (error: HttpError) {\n return Promise.reject(error.error);\n }\n);\n\nconst main = document.querySelector<HTMLElement>(\"#main-mount-point\");\nconst bg = document.querySelector<HTMLElement>(\"#bg-mount-point\");\nconst portal = document.querySelector<HTMLElement>(\"#portal-mount-point\");\n\ntype BrickPreviewProps = StoryConf;\n(window as any)._preview_render = async ({\n conf,\n theme,\n}: {\n conf: BrickPreviewProps;\n theme: SiteTheme;\n}) => {\n applyTheme(theme);\n replaceUseChildren(([] as StoryConf[]).concat(conf));\n await developHelper.render({ main, bg, portal } as MountPoints, conf);\n};\n","module.exports = dll;","module.exports = (__webpack_require__(\"XuQu\"))(\"XzT5\");","module.exports = (__webpack_require__(\"XuQu\"))(\"tYg3\");","module.exports = (__webpack_require__(\"XuQu\"))(\"vuIU\");","module.exports = (__webpack_require__(\"XuQu\"))(\"wd/R\");","module.exports = (__webpack_require__(\"XuQu\"))(\"yXPU\");"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./packages/brick-container/src/i18n/constants.ts","webpack:///delegated ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js from dll-reference dll","webpack:///delegated ./node_modules/@next-core/fontawesome-library/dist/index.esm.js from dll-reference dll","webpack:///delegated ./node_modules/react-i18next/dist/es/index.js from dll-reference dll","webpack:///delegated ./node_modules/@next-core/brick-utils/dist/index.esm.js from dll-reference dll","webpack:///./node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js","webpack:///./packages/brick-container/src/i18n/locales/en.ts","webpack:///./packages/brick-container/src/i18n/locales/zh.ts","webpack:///./packages/brick-container/src/i18n/index.ts","webpack:///delegated ./node_modules/@next-core/brick-http/dist/index.esm.js from dll-reference dll","webpack:///./packages/brick-container/src/replaceUseChildren.ts","webpack:///./packages/brick-container/src/preview.ts","webpack:///external \"dll\"","webpack:///delegated ./node_modules/i18next/dist/esm/i18next.js from dll-reference dll","webpack:///delegated ./node_modules/@next-core/brick-kit/dist/index.esm.js from dll-reference dll","webpack:///delegated ./node_modules/@babel/runtime/helpers/esm/createClass.js from dll-reference dll","webpack:///delegated ./node_modules/moment/moment.js from dll-reference dll","webpack:///delegated ./node_modules/@babel/runtime/helpers/asyncToGenerator.js from dll-reference dll"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","K","NS_BRICK_CONTAINER","arr","each","forEach","slice","defaults","obj","arguments","source","prop","undefined","fieldContentRegExp","serializeCookie","val","options","opt","path","encodeURIComponent","str","concat","maxAge","Number","isNaN","Error","Math","floor","domain","test","TypeError","expires","toUTCString","httpOnly","secure","sameSite","toLowerCase","cookie","minutes","cookieOptions","length","Date","setTime","getTime","document","nameEQ","ca","split","charAt","substring","indexOf","cookie$1","lookup","found","lookupCookie","cacheUserLanguage","lng","cookieMinutes","cookieDomain","querystring","window","search","location","hash","params","pos","lookupQuerystring","hasLocalStorageSupport","localStorageAvailable","localStorage","setItem","removeItem","e","lookupLocalStorage","getItem","hasSessionStorageSupport","sessionStorageAvailable","sessionStorage","lookupSessionStorage","navigator$1","navigator","languages","push","userLanguage","language","htmlTag","documentElement","getAttribute","pathname","match","Array","lookupFromPathIndex","replace","subdomain","lookupFromSubdomainIndex","hostname","Browser","services","this","type","detectors","init","i18nOptions","order","caches","excludeCacheFor","lookupFromUrlIndex","addDetector","detector","detectionOrder","_this","detected","detectorName","languageUtils","getBestMatchFromCodes","_this2","cacheName","locale","BOOTSTRAP_ERROR","NETWORK_ERROR","i18n","on","moment","setAttribute","use","LanguageDetector","initReactI18next","fallbackLng","debug","process","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","en","zh","initI18n","USE_CHILDREN_SLOT_REGEXP","replaceUseChildren","bricks","brick","replaceInBrick","slots","useChildrenMap","Map","slot","slotConf","entries","children","isArray","set","size","replaceInProperties","item","isObject","k","v","useBrick","properties","initializeLibrary","DLL_PATH","BRICK_NEXT_VERSIONS","http","interceptors","response","config","observe","data","error","Promise","reject","main","querySelector","bg","portal","_preview_render","conf","theme","applyTheme","developHelper","render","dll"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,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cAA2B,qBAC3CC,EAAKrI,SAASoI,cAA2B,mBACzCE,EAAStI,SAASoI,cAA2B,uBAGlDpH,OAAeuH,gBAAe,sBAAG,aAM5B,IANmC,KACvCC,EAAI,MACJC,GAID,EACCC,qBAAWD,GACXvC,EAAoB,GAAmBzH,OAAO+J,UACxCG,gBAAcC,OAAO,CAAET,OAAME,KAAIC,UAAyBE,MACjE,mDAV8B,I,mBCrC/BpN,EAAOD,QAAU0N,K,qBCAjBzN,EAAOD,QAAWF,EAAoB,OAArB,CAA8B,S,mECA/CG,EAAOD,QAAWF,EAAoB,OAArB,CAA8B,S,qBCA/CG,EAAOD,QAAWF,EAAoB,OAArB,CAA8B,S,uBCA/CG,EAAOD,QAAWF,EAAoB,OAArB,CAA8B,S,qBCA/CG,EAAOD,QAAWF,EAAoB,OAArB,CAA8B","file":"preview.deb0fd03af7698ad620c.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"Tkf5\");\n","export const NS_BRICK_CONTAINER = \"brick-container\";\n\nexport enum K {\n BOOTSTRAP_ERROR = \"BOOTSTRAP_ERROR\",\n NETWORK_ERROR = \"NETWORK_ERROR\",\n}\n\nexport type Locale = { [key in K]: string };\n","module.exports = (__webpack_require__(\"XuQu\"))(\"1OyB\");","module.exports = (__webpack_require__(\"XuQu\"))(\"9RIe\");","module.exports = (__webpack_require__(\"XuQu\"))(\"9kay\");","module.exports = (__webpack_require__(\"XuQu\"))(\"A+yw\");","import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\n\nvar arr = [];\nvar each = arr.forEach;\nvar slice = arr.slice;\nfunction defaults(obj) {\n each.call(slice.call(arguments, 1), function (source) {\n if (source) {\n for (var prop in source) {\n if (obj[prop] === undefined) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}\n\n// eslint-disable-next-line no-control-regex\nvar fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\nvar serializeCookie = function serializeCookie(name, val, options) {\n var opt = options || {};\n opt.path = opt.path || '/';\n var value = encodeURIComponent(val);\n var str = \"\".concat(name, \"=\").concat(value);\n\n if (opt.maxAge > 0) {\n var maxAge = opt.maxAge - 0;\n if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');\n str += \"; Max-Age=\".concat(Math.floor(maxAge));\n }\n\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n\n str += \"; Domain=\".concat(opt.domain);\n }\n\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n\n str += \"; Path=\".concat(opt.path);\n }\n\n if (opt.expires) {\n if (typeof opt.expires.toUTCString !== 'function') {\n throw new TypeError('option expires is invalid');\n }\n\n str += \"; Expires=\".concat(opt.expires.toUTCString());\n }\n\n if (opt.httpOnly) str += '; HttpOnly';\n if (opt.secure) str += '; Secure';\n\n if (opt.sameSite) {\n var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n switch (sameSite) {\n case true:\n str += '; SameSite=Strict';\n break;\n\n case 'lax':\n str += '; SameSite=Lax';\n break;\n\n case 'strict':\n str += '; SameSite=Strict';\n break;\n\n case 'none':\n str += '; SameSite=None';\n break;\n\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n\n return str;\n};\n\nvar cookie = {\n create: function create(name, value, minutes, domain) {\n var cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n path: '/',\n sameSite: 'strict'\n };\n\n if (minutes) {\n cookieOptions.expires = new Date();\n cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);\n }\n\n if (domain) cookieOptions.domain = domain;\n document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);\n },\n read: function read(name) {\n var nameEQ = \"\".concat(name, \"=\");\n var ca = document.cookie.split(';');\n\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n\n while (c.charAt(0) === ' ') {\n c = c.substring(1, c.length);\n }\n\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n\n return null;\n },\n remove: function remove(name) {\n this.create(name, '', -1);\n }\n};\nvar cookie$1 = {\n name: 'cookie',\n lookup: function lookup(options) {\n var found;\n\n if (options.lookupCookie && typeof document !== 'undefined') {\n var c = cookie.read(options.lookupCookie);\n if (c) found = c;\n }\n\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupCookie && typeof document !== 'undefined') {\n cookie.create(options.lookupCookie, lng, options.cookieMinutes, options.cookieDomain, options.cookieOptions);\n }\n }\n};\n\nvar querystring = {\n name: 'querystring',\n lookup: function lookup(options) {\n var found;\n\n if (typeof window !== 'undefined') {\n var search = window.location.search;\n\n if (!window.location.search && window.location.hash && window.location.hash.indexOf('?') > -1) {\n search = window.location.hash.substring(window.location.hash.indexOf('?'));\n }\n\n var query = search.substring(1);\n var params = query.split('&');\n\n for (var i = 0; i < params.length; i++) {\n var pos = params[i].indexOf('=');\n\n if (pos > 0) {\n var key = params[i].substring(0, pos);\n\n if (key === options.lookupQuerystring) {\n found = params[i].substring(pos + 1);\n }\n }\n }\n }\n\n return found;\n }\n};\n\nvar hasLocalStorageSupport = null;\n\nvar localStorageAvailable = function localStorageAvailable() {\n if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;\n\n try {\n hasLocalStorageSupport = window !== 'undefined' && window.localStorage !== null;\n var testKey = 'i18next.translate.boo';\n window.localStorage.setItem(testKey, 'foo');\n window.localStorage.removeItem(testKey);\n } catch (e) {\n hasLocalStorageSupport = false;\n }\n\n return hasLocalStorageSupport;\n};\n\nvar localStorage = {\n name: 'localStorage',\n lookup: function lookup(options) {\n var found;\n\n if (options.lookupLocalStorage && localStorageAvailable()) {\n var lng = window.localStorage.getItem(options.lookupLocalStorage);\n if (lng) found = lng;\n }\n\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupLocalStorage && localStorageAvailable()) {\n window.localStorage.setItem(options.lookupLocalStorage, lng);\n }\n }\n};\n\nvar hasSessionStorageSupport = null;\n\nvar sessionStorageAvailable = function sessionStorageAvailable() {\n if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;\n\n try {\n hasSessionStorageSupport = window !== 'undefined' && window.sessionStorage !== null;\n var testKey = 'i18next.translate.boo';\n window.sessionStorage.setItem(testKey, 'foo');\n window.sessionStorage.removeItem(testKey);\n } catch (e) {\n hasSessionStorageSupport = false;\n }\n\n return hasSessionStorageSupport;\n};\n\nvar sessionStorage = {\n name: 'sessionStorage',\n lookup: function lookup(options) {\n var found;\n\n if (options.lookupSessionStorage && sessionStorageAvailable()) {\n var lng = window.sessionStorage.getItem(options.lookupSessionStorage);\n if (lng) found = lng;\n }\n\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupSessionStorage && sessionStorageAvailable()) {\n window.sessionStorage.setItem(options.lookupSessionStorage, lng);\n }\n }\n};\n\nvar navigator$1 = {\n name: 'navigator',\n lookup: function lookup(options) {\n var found = [];\n\n if (typeof navigator !== 'undefined') {\n if (navigator.languages) {\n // chrome only; not an array, so can't use .push.apply instead of iterating\n for (var i = 0; i < navigator.languages.length; i++) {\n found.push(navigator.languages[i]);\n }\n }\n\n if (navigator.userLanguage) {\n found.push(navigator.userLanguage);\n }\n\n if (navigator.language) {\n found.push(navigator.language);\n }\n }\n\n return found.length > 0 ? found : undefined;\n }\n};\n\nvar htmlTag = {\n name: 'htmlTag',\n lookup: function lookup(options) {\n var found;\n var htmlTag = options.htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);\n\n if (htmlTag && typeof htmlTag.getAttribute === 'function') {\n found = htmlTag.getAttribute('lang');\n }\n\n return found;\n }\n};\n\nvar path = {\n name: 'path',\n lookup: function lookup(options) {\n var found;\n\n if (typeof window !== 'undefined') {\n var language = window.location.pathname.match(/\\/([a-zA-Z-]*)/g);\n\n if (language instanceof Array) {\n if (typeof options.lookupFromPathIndex === 'number') {\n if (typeof language[options.lookupFromPathIndex] !== 'string') {\n return undefined;\n }\n\n found = language[options.lookupFromPathIndex].replace('/', '');\n } else {\n found = language[0].replace('/', '');\n }\n }\n }\n\n return found;\n }\n};\n\nvar subdomain = {\n name: 'subdomain',\n lookup: function lookup(options) {\n // If given get the subdomain index else 1\n var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === 'number' ? options.lookupFromSubdomainIndex + 1 : 1; // get all matches if window.location. is existing\n // first item of match is the match itself and the second is the first group macht which sould be the first subdomain match\n // is the hostname no public domain get the or option of localhost\n\n var language = typeof window !== 'undefined' && window.location && window.location.hostname && window.location.hostname.match(/^(\\w{2,5})\\.(([a-z0-9-]{1,63}\\.[a-z]{2,6})|localhost)/i); // if there is no match (null) return undefined\n\n if (!language) return undefined; // return the given group match\n\n return language[lookupFromSubdomainIndex];\n }\n};\n\nfunction getDefaults() {\n return {\n order: ['querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'],\n lookupQuerystring: 'lng',\n lookupCookie: 'i18next',\n lookupLocalStorage: 'i18nextLng',\n lookupSessionStorage: 'i18nextLng',\n // cache user language\n caches: ['localStorage'],\n excludeCacheFor: ['cimode'] // cookieMinutes: 10,\n // cookieDomain: 'myDomain'\n\n };\n}\n\nvar Browser = /*#__PURE__*/function () {\n function Browser(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Browser);\n\n this.type = 'languageDetector';\n this.detectors = {};\n this.init(services, options);\n }\n\n _createClass(Browser, [{\n key: \"init\",\n value: function init(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n this.services = services;\n this.options = defaults(options, this.options || {}, getDefaults()); // backwards compatibility\n\n if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;\n this.i18nOptions = i18nOptions;\n this.addDetector(cookie$1);\n this.addDetector(querystring);\n this.addDetector(localStorage);\n this.addDetector(sessionStorage);\n this.addDetector(navigator$1);\n this.addDetector(htmlTag);\n this.addDetector(path);\n this.addDetector(subdomain);\n }\n }, {\n key: \"addDetector\",\n value: function addDetector(detector) {\n this.detectors[detector.name] = detector;\n }\n }, {\n key: \"detect\",\n value: function detect(detectionOrder) {\n var _this = this;\n\n if (!detectionOrder) detectionOrder = this.options.order;\n var detected = [];\n detectionOrder.forEach(function (detectorName) {\n if (_this.detectors[detectorName]) {\n var lookup = _this.detectors[detectorName].lookup(_this.options);\n\n if (lookup && typeof lookup === 'string') lookup = [lookup];\n if (lookup) detected = detected.concat(lookup);\n }\n });\n if (this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0\n\n return detected.length > 0 ? detected[0] : null; // a little backward compatibility\n }\n }, {\n key: \"cacheUserLanguage\",\n value: function cacheUserLanguage(lng, caches) {\n var _this2 = this;\n\n if (!caches) caches = this.options.caches;\n if (!caches) return;\n if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;\n caches.forEach(function (cacheName) {\n if (_this2.detectors[cacheName]) _this2.detectors[cacheName].cacheUserLanguage(lng, _this2.options);\n });\n }\n }]);\n\n return Browser;\n}();\n\nBrowser.type = 'languageDetector';\n\nexport { Browser as default };\n","import { Locale, K } from \"../constants\";\n\nconst locale: Locale = {\n [K.BOOTSTRAP_ERROR]: \"Bootstrap Error\",\n [K.NETWORK_ERROR]: \"Network error, please check your network.\",\n};\n\nexport default locale;\n","import { Locale, K } from \"../constants\";\n\nconst locale: Locale = {\n [K.BOOTSTRAP_ERROR]: \"启动错误\",\n [K.NETWORK_ERROR]: \"网络错误,请检查您的网络连接。\",\n};\n\nexport default locale;\n","import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport moment from \"moment\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport { initI18n } from \"@next-core/brick-kit\";\n\nimport { NS_BRICK_CONTAINER } from \"./constants\";\nimport en from \"./locales/en\";\nimport zh from \"./locales/zh\";\n\n// I18next is synchronously initialized now,\n// so we listen on language change before initialization.\ni18n.on(\"languageChanged\", function (lng) {\n moment.locale(lng);\n document.documentElement.setAttribute(\"lang\", lng);\n});\n\ni18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(LanguageDetector)\n .use(initReactI18next)\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n /*global process*/\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false, // not needed for react as it escapes by default\n },\n react: {\n useSuspense: false,\n },\n compatibilityJSON: \"v3\",\n resources: {\n en: {\n [NS_BRICK_CONTAINER]: en,\n },\n zh: {\n [NS_BRICK_CONTAINER]: zh,\n },\n },\n });\n\ninitI18n();\n\nexport default i18n;\n","module.exports = (__webpack_require__(\"XuQu\"))(\"JxWY\");","import type { BrickConf, SlotConfOfBricks } from \"@next-core/brick-types\";\nimport { isObject } from \"@next-core/brick-utils\";\n\nconst USE_CHILDREN_SLOT_REGEXP = /^\\[\\w+\\]$/;\n\n/**\n * Replace `useChildren: \"[xxx]\"` with `useBrick`.\n */\nexport function replaceUseChildren(bricks: BrickConf[]): void {\n for (const brick of bricks) {\n replaceInBrick(brick);\n }\n}\n\nfunction replaceInBrick(brick: BrickConf): void {\n const slots = brick.slots ?? {};\n const useChildrenMap = new Map<string, BrickConf[]>();\n for (const [slot, slotConf] of Object.entries(slots)) {\n const { bricks: children } = slotConf as SlotConfOfBricks;\n if (USE_CHILDREN_SLOT_REGEXP.test(slot)) {\n if (Array.isArray(children) && children.length > 0) {\n useChildrenMap.set(slot, children);\n replaceUseChildren(children);\n }\n delete slots[slot];\n }\n\n if (Array.isArray(children)) {\n replaceUseChildren(children);\n }\n }\n\n if (useChildrenMap.size > 0) {\n replaceInProperties(brick.properties, useChildrenMap);\n }\n}\n\nfunction replaceInProperties(\n value: unknown,\n useChildrenMap: Map<string, BrickConf[]>\n): void {\n if (Array.isArray(value)) {\n for (const item of value) {\n replaceInProperties(item, useChildrenMap);\n }\n } else if (isObject(value)) {\n for (const [k, v] of Object.entries(value)) {\n if (k === \"useChildren\") {\n const children = useChildrenMap.get(v as string);\n if (children) {\n delete value[k];\n value.useBrick = children.length === 1 ? children[0] : children;\n }\n } else {\n replaceInProperties(v, useChildrenMap);\n }\n }\n }\n}\n","import { SiteTheme, StoryConf, type MountPoints } from \"@next-core/brick-types\";\nimport { developHelper, applyTheme } from \"@next-core/brick-kit\";\n\nimport { http, HttpResponse, type HttpError } from \"@next-core/brick-http\";\nimport { initializeLibrary } from \"@next-core/fontawesome-library\";\nimport \"./i18n\";\nimport \"@next-core/theme\";\nimport \"./styles/antd.less\";\nimport \"./styles/antd-compatible.less\";\nimport \"./styles/default.css\";\nimport \"./styles/preview.css\";\nimport { replaceUseChildren } from \"./replaceUseChildren\";\n\ninitializeLibrary();\n// eslint-disable-next-line\n// @ts-ignore\nwindow.DLL_PATH = DLL_PATH;\n// eslint-disable-next-line\n// @ts-ignore\nwindow.BRICK_NEXT_VERSIONS = BRICK_NEXT_VERSIONS;\n\nhttp.interceptors.response.use(\n function (response: HttpResponse) {\n return response.config.options?.observe === \"response\"\n ? response\n : response.data;\n },\n function (error: HttpError) {\n return Promise.reject(error.error);\n }\n);\n\nconst main = document.querySelector<HTMLElement>(\"#main-mount-point\");\nconst bg = document.querySelector<HTMLElement>(\"#bg-mount-point\");\nconst portal = document.querySelector<HTMLElement>(\"#portal-mount-point\");\n\ntype BrickPreviewProps = StoryConf;\n(window as any)._preview_render = async ({\n conf,\n theme,\n}: {\n conf: BrickPreviewProps;\n theme: SiteTheme;\n}) => {\n applyTheme(theme);\n replaceUseChildren(([] as StoryConf[]).concat(conf));\n await developHelper.render({ main, bg, portal } as MountPoints, conf);\n};\n","module.exports = dll;","module.exports = (__webpack_require__(\"XuQu\"))(\"XzT5\");","module.exports = (__webpack_require__(\"XuQu\"))(\"tYg3\");","module.exports = (__webpack_require__(\"XuQu\"))(\"vuIU\");","module.exports = (__webpack_require__(\"XuQu\"))(\"wd/R\");","module.exports = (__webpack_require__(\"XuQu\"))(\"yXPU\");"],"sourceRoot":""}
package/dist/preview.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html lang="zh-CN" data-theme="light" data-mode="default"><head><meta charset="utf-8"/><base href="<!--# echo var='base_href' default='/' -->"/><script>window.DEVELOPER_PREVIEW = true;</script><link href="preview.5fb551513edc8051ce6c.css" rel="stylesheet"></head><body><div id="preview-root"><div id="main-mount-point"></div><div id="bg-mount-point" style="display: none"></div><div id="portal-mount-point"></div></div><script src="dll.4d26767d.js"></script><script src="polyfill.3e88f145a0893497373b.js"></script><script src="preview.e89609cf80e274fcf497.js"></script></body></html>
1
+ <!doctype html><html lang="zh-CN" data-theme="light" data-mode="default"><head><meta charset="utf-8"/><base href="<!--# echo var='base_href' default='/' -->"/><script>window.DEVELOPER_PREVIEW = true;</script><link href="preview.5fb551513edc8051ce6c.css" rel="stylesheet"></head><body><div id="preview-root"><div id="main-mount-point"></div><div id="bg-mount-point" style="display: none"></div><div id="portal-mount-point"></div></div><script src="dll.4d26767d.js"></script><script src="polyfill.3e88f145a0893497373b.js"></script><script src="preview.deb0fd03af7698ad620c.js"></script></body></html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/brick-container",
3
- "version": "2.96.47",
3
+ "version": "2.96.49",
4
4
  "description": "Brick Container Server",
5
5
  "homepage": "https://github.com/easyops-cn/next-core/tree/master/packages/brick-container",
6
6
  "license": "GPL-3.0",
@@ -51,7 +51,7 @@
51
51
  "@next-dll/ace": "^2.0.789",
52
52
  "@next-dll/d3": "^2.0.83",
53
53
  "@next-dll/echarts": "^2.0.84",
54
- "@next-dll/editor-bricks-helper": "^0.40.2",
54
+ "@next-dll/editor-bricks-helper": "^0.40.4",
55
55
  "@next-dll/react-dnd": "^0.1.727",
56
56
  "babel-loader": "^8.3.0",
57
57
  "clean-webpack-plugin": "^4.0.0",
@@ -73,5 +73,5 @@
73
73
  "webpack-dev-server": "^4.11.1",
74
74
  "webpack-merge": "^5.8.0"
75
75
  },
76
- "gitHead": "d2b62703d1233ff9f97c2e736c41e2aa9a468317"
76
+ "gitHead": "b8359035c0c0ac7da364910758f3a2f985e51f39"
77
77
  }
@@ -1,8 +0,0 @@
1
- var DllOfEditorBricksHelper=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}({"/8r5":function(e,t){e.exports=DllOfReactDnd},0:function(e,t,n){e.exports=n},"3tO9":function(e,t,n){e.exports=n("XuQu")("3tO9")},"A+yw":function(e,t,n){e.exports=n("XuQu")("A+yw")},ACCw:function(e,t,n){e.exports=n("XuQu")("ACCw")},IYwU:function(e,t,n){e.exports=n("/8r5")("IYwU")},LvDl:function(e,t,n){e.exports=n("XuQu")("LvDl")},QILm:function(e,t,n){e.exports=n("XuQu")("QILm")},WnDu:function(e,t,n){"use strict";n.r(t),n.d(t,"BuilderDataTransferType",(function(){return u})),n.d(t,"BuilderProvider",(function(){return Ue})),n.d(t,"DropZone",(function(){return Pe})),n.d(t,"DroppingStatusContext",(function(){return He})),n.d(t,"EditorBrickType",(function(){return c})),n.d(t,"EditorContainer",(function(){return ce})),n.d(t,"EditorElementFactory",(function(){return Me})),n.d(t,"EditorSelfLayout",(function(){return v})),n.d(t,"EditorSlotContentLayout",(function(){return g})),n.d(t,"SlotContainer",(function(){return Le})),n.d(t,"getSortedIdsAfterDropped",(function(){return $e})),n.d(t,"getUniqueNodeId",(function(){return _})),n.d(t,"useActiveNodeUid",(function(){return ze})),n.d(t,"useBuilderContextMenuStatus",(function(){return re})),n.d(t,"useBuilderData",(function(){return ne})),n.d(t,"useBuilderDataManager",(function(){return te})),n.d(t,"useBuilderGroupedChildNodes",(function(){return De})),n.d(t,"useBuilderNode",(function(){return oe})),n.d(t,"useBuilderNodeMountPoints",(function(){return qe})),n.d(t,"useBuilderParentNode",(function(){return Ge})),n.d(t,"useCanDrop",(function(){return ye})),n.d(t,"useCanvasList",(function(){return Te})),n.d(t,"useHighlightNodes",(function(){return pe})),n.d(t,"useHoverNodeUid",(function(){return le})),n.d(t,"useOutlineEnabled",(function(){return We})),n.d(t,"useRouteList",(function(){return Ve})),n.d(t,"useShowRelatedNodesBasedOnEvents",(function(){return ie}));var o=n("q1tI"),r=n.n(o),i=n("3tO9"),a=n.n(i),d=n("lSNA"),s=n.n(d),l=n("LvDl"),p=n("A+yw");n.d(t,"isBrickNode",(function(){return p.isBrickNode})),n.d(t,"isCustomTemplateNode",(function(){return p.isCustomTemplateNode})),n.d(t,"isRouteNode",(function(){return p.isRouteNode})),n.d(t,"isSnippetNode",(function(){return p.isSnippetNode}));var u,c,v,g,f=n("ZR4k"),h=n.n(f),E=n("QILm"),m=n.n(E),C=n("IYwU"),b=n("yXPU"),N=n.n(b),D=n("tYg3"),O=n("ACCw"),y=n.n(O),x=n("i8i4"),I=n.n(x),$=n("qJlv");!function(e){e.NODE_TO_ADD="builder/node-to-add",e.NODE_TO_MOVE="builder/node-to-move",e.SNIPPET_TO_APPLY="builder/snippet-to-apply"}(u||(u={})),function(e){e.DEFAULT="editorOfDefault",e.CONTAINER="editorOfContainer",e.TRANSPARENT_CONTAINER="editorOfTransparentContainer"}(c||(c={})),function(e){e.BLOCK="block",e.INLINE="inline",e.CONTAINER="container"}(v||(v={})),function(e){e.BLOCK="block",e.INLINE="inline",e.GRID="grid"}(g||(g={}));var T={exports:{}};
2
- /*!
3
- Copyright (c) 2018 Jed Watson.
4
- Licensed under the MIT License (MIT), see
5
- http://jedwatson.github.io/classnames
6
- */!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],o=0;o<arguments.length;o++){var r=arguments[o];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=n.apply(null,r);a&&e.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var d in r)t.call(r,d)&&r[d]&&e.push(d);else e.push(r.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(T);var S=T.exports,A={};
7
- /*! (c) Andrea Giammarchi - ISC */try{A.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var n=e.create,o=e.defineProperty,r=i.prototype;function i(){t.set(this,n(null))}function a(e,t,n){o(e,t,{configurable:!0,writable:!0,value:n})}function d(e){var t=e.options;return t&&t.once&&e.target.removeEventListener(this.type,e.listener),"function"==typeof e.listener?e.listener.call(e.target,this):e.listener.handleEvent(this),this._stopImmediatePropagationFlag}a(r,"addEventListener",(function(e,n,o){for(var r=t.get(this),i=r[e]||(r[e]=[]),a=0,d=i.length;a<d;a++)if(i[a].listener===n)return;i.push({target:this,listener:n,options:o})})),a(r,"dispatchEvent",(function(e){var n=t.get(this)[e.type];return n&&(a(e,"target",this),a(e,"currentTarget",this),n.slice(0).some(d,e),delete e.currentTarget,delete e.target),!0})),a(r,"removeEventListener",(function(e,n){for(var o=t.get(this),r=o[e]||(o[e]=[]),i=0,a=r.length;i<a;i++)if(r[i].listener===n)return void r.splice(i,1)})),A.EventTarget=i}(Object,new WeakMap)}var P=A.EventTarget,k=0;function _(){return k+=1}function w(e){var{nodes:t,edges:n,rootId:o}=e,r=n.slice(),i=new WeakMap,d=(e,o)=>{var r=t.find(t=>t.$$uid===e),i=Object(l.sortBy)(n.filter(e=>e.parent===r.$$uid),e=>e.sort);for(var a of(o(r,i),i))d(a.child,o)},s=(e,n,o)=>{var a,d,u;if(e.$$isExpandableTemplate&&null!==(a=e.$$templateProxy)&&void 0!==a&&a.slots&&Object(p.hasOwnProperty)(e.$$templateProxy.slots,n)&&(d=e.$$templateProxy.slots[n])&&(u=e.$$templateRefToUid.get(d.ref))){var c=t.find(e=>e.$$uid===u),v=d.refSlot;if(c.$$isExpandableTemplate)s(c,v,o);else{var g,f={child:o,parent:u,mountPoint:v,sort:void 0,$$isTemplateExpanded:!0},h=Object(l.sortBy)(r.filter(e=>e.parent===u),e=>{var t;return null!==(t=i.get(e))&&void 0!==t?t:e.sort}),E=h.filter(e=>e.$$isTemplateInternal),m=null!==(g=d.refPosition)&&void 0!==g?g:-1,C=Object(l.clamp)(m<0?E.length+1+m:m,0,E.length);h.splice(C<E.length?h.findIndex(e=>e===E[C]):h.length,0,f),h.forEach((e,t)=>{i.set(e,t)}),r.push(f)}}};return d(o,(e,t)=>{if(e.$$isExpandableTemplate)for(var n of t)s(e,n.mountPoint,n.child)}),r.length>n.length?r.map(e=>{var t=i.get(e);return void 0===t?e:a()(a()({},e),{},{sort:t})}):n}function L(e,t){var{rootId:n,nodes:o,edges:r}=e,{parentUid:i,nodeUids:d}=t;return w({rootId:n,nodes:o,edges:r.filter(e=>!e.$$isTemplateExpanded).map(e=>{var t=e.parent===i?d.indexOf(e.child):-1;return t>=0?a()(a()({},e),{},{sort:t}):e})})}function U(e,t){var{rootId:n,nodes:o,edges:r,wrapperNode:i}=t,a=new Set;return function e(t,n,o){o.add(t);var r=new Set;for(var i of n)i.parent===t&&r.add(i.child);for(var a of r)e(a,n,o)}(e,r,a),{rootId:n,nodes:o.filter(e=>!a.has(e.$$uid)),edges:r.filter(e=>!a.has(e.parent)&&!a.has(e.child)),wrapperNode:(null==i?void 0:i.$$uid)===e?null:i}}function j(e,t,n,o,r){for(var i of t)if(i){if(i.target){var a=o.get(i.target);a&&(n.get(e.$$uid).downstreamNodes.add(a),n.get(a).upstreamNodes.add(e.$$uid))}else if(i.targetRef)for(var d of[].concat(i.targetRef)){var s=r.get(d);s&&(n.get(e.$$uid).downstreamNodes.add(s),n.get(s).upstreamNodes.add(e.$$uid))}if(i.callback)for(var l of Object.values(i.callback))j(e,[].concat(l),n,o,r)}}var B=["parent","children","graphInfo","mountPoint"],R=/[<{]/;function Z(e,t,n){var o=[];e.brick&&o.push(e.brick.replace(/\./g,"\\."));var r,i,a=Object(p.normalizeBuilderNode)(e),d=[];for(var s of["properties","events","lifeCycle"]){var u=Object(l.cloneDeep)(null==a?void 0:a[s]);if(d.push(["$$parsed".concat(Object(l.upperFirst)(s)),null!=u?u:{}]),"properties"===s){var c,v,g=void 0;"string"!=typeof(v=null==u||null===(c=u.dataset)||void 0===c?void 0:c.testid)||R.test(v)?"string"!=typeof(g=null==u?void 0:u.id)||R.test(g)||(r=g,o.push("#".concat(r))):i=v}}var f=Object(p.isBrickNode)(e),h=f?e.brick.split(".").pop():null,E=!1;if(void 0!==(null==a?void 0:a.if)&&(f||Object(p.isRouteNode)(e))){var m={if:a.if};Object(p.computeConstantCondition)(m),!1===m.if&&(E=!0)}return Object.fromEntries(Object.entries(e).filter(e=>!B.includes(e[0])).concat([["displayName",!(f&&e.alias===h)&&e.alias||(f?e.ref||i||r||h:void 0)],["$$uid",t],["$$matchedSelectors",o],["$$isTemplateInternalNode",n],["$$normalized",a],["$$unreachable",E]]).concat(d))}function M(e,t,n){var o,r=arguments.length>4?arguments[4]:void 0,i=[],a=[],d=(e,t,o,r,s,u)=>{var c,v,g=Z(e,t,r);if(i.push(g),s&&g.ref&&s.set(g.ref,t),Object(p.isBrickNode)(g)&&!g.brick.includes(".")&&g.brick.startsWith("tpl-")&&!o.has(g.brick)&&(v=null==n?void 0:n.get(g.brick))&&(null===(c=v.children)||void 0===c?void 0:c.length)>0){"wrapper"===v.layoutType&&(g.layoutType="wrapper"),o.add(g.brick),g.$$isExpandableTemplate=!0,g.$$templateProxy=v.proxy&&JSON.parse(v.proxy);var f=new Map;if(g.$$templateRefToUid=f,Object(l.sortBy)(v.children,[e=>{var t;return null!==(t=e.sort)&&void 0!==t?t:-1/0}]).forEach((e,n)=>{var r=_();d(e,r,new Set(o),!0,f),a.push({child:r,parent:t,mountPoint:"",sort:n,$$isTemplateInternal:!0})}),!g.$$isTemplateInternalNode){var h=(e,t,n)=>{var o;if(null!==(o=e.$$templateProxy)&&void 0!==o&&o.slots){var r,a=Object.entries(null===(r=e.$$templateProxy)||void 0===r?void 0:r.slots).filter(e=>void 0===t||e[0]===t),d=function(t,o){var r=e.$$templateRefToUid.get(o.ref);if(r){var a=i.find(e=>e.$$uid===r);if(a.$$isExpandableTemplate)h(a,o.refSlot,t);else{a.$$delegatedSlots||(a.$$delegatedSlots=new Map);var d=a.$$delegatedSlots.get(o.refSlot);d||(d=[],a.$$delegatedSlots.set(o.refSlot,d)),d.push({templateUid:g.$$uid,templateMountPoint:n||t})}}};for(var[s,l]of a)d(s,l)}};h(g);var E=(e,t)=>{var n;if(null!==(n=e.$$templateProxy)&&void 0!==n&&n.properties){var o,r=Object.entries(null===(o=e.$$templateProxy)||void 0===o?void 0:o.properties).filter(e=>void 0===t||e[0]===t);for(var[a,d]of r)Object(p.hasOwnProperty)(e.$$parsedProperties,a)&&H(d)&&function(){var t=e.$$templateRefToUid.get(d.ref),n=e.$$parsedProperties[a];if(t){var o=i.find(e=>e.$$uid===t);o.$$parsedProperties[d.refProperty]=n,o.$$isExpandableTemplate&&E(o,d.refProperty)}}()}};E(g)}}if(Array.isArray(e.children)){var m;switch(g.type){case"bricks":case"custom-template":case"snippet":m="bricks";break;case"routes":m="routes"}Object(l.sortBy)(e.children,[e=>{var t;return null!==(t=e.sort)&&void 0!==t?t:-1/0}]).forEach((e,n)=>{var i,l=_();d(e,l,new Set(o),r,s),a.push({child:l,parent:t,mountPoint:null!==(i=m)&&void 0!==i?i:e.mountPoint,sort:n,$$isTemplateInternal:r,$$isTemplateDelegated:g.$$isExpandableTemplate})})}};d(e,t,new Set);for(var s=function(e){var n=i[e];if("wrapper"===n.layoutType&&r&&a.find(e=>e.child===n.$$uid).parent===t)return o||(o=n),"break"},u=0;u<i.length;u++){var c=s(u);if("break"===c)break}return{nodes:i,edges:a,wrapperNode:o}}function H(e){return!!e.ref&&!!e.refProperty}function q(e,t){return e.find(e=>e.$$uid===t).$$isExpandableTemplate}var G=["properties","events","lifeCycle","params","if","transform"],V=["permissionsPreCheck","transformFrom"],z=["brick","template","portal","slots","id","children","instanceId"];function W(e,t){return Object.fromEntries(Object.entries(e).map(e=>{var[t,n]=e;return void 0===n||z.includes(t)?void 0:G.includes(t)?[t,JSON.stringify(n)]:V.includes(t)?[t,h.a.safeDump(n)]:[t,n]}).filter(Boolean).concat(Object.entries(t.nodeData),[["brick","template"===t.nodeData.type?e.template:e.brick],["portal",t.isPortalCanvas||e.portal]]))}function X(e){var{parent:t,parentUid:n,mountPoint:o,nodeUid:r,brickConf:i,isPortalCanvas:a,sort:d}=e,s=i.template?"template":i.bg?"provider":"brick";return{nodeUid:r,parentUid:n,nodeData:W(i,{isPortalCanvas:a,nodeData:{type:s,parent:t,mountPoint:o,sort:d}}),children:i.slots?Object.entries(i.slots).flatMap(e=>{var[t,n]=e;return n.bricks.map(e=>({childBrickConf:e,mountPoint:t}))}).map((e,t)=>{var{childBrickConf:n,mountPoint:o}=e;return X({parentUid:r,mountPoint:o,nodeUid:_(),brickConf:n,sort:t})}):[]}}var Y,K=e=>Object(p.isRouteNode)(e)?"STORYBOARD_ROUTE":Object(p.isBrickNode)(e)?"STORYBOARD_BRICK":Object(p.isCustomTemplateNode)(e)?"STORYBOARD_TEMPLATE":Object(p.isSnippetNode)(e)?"STORYBOARD_SNIPPET":void 0;!function(e){e.NODE_ADD="builder.node.add",e.NODE_MOVE="builder.node.move",e.NODE_REORDER="builder.node.reorder",e.NODE_CLICK="builder.node.click",e.NODE_UPDATE="builder.node.update",e.SNIPPET_APPLY="builder.snippet.apply",e.CONTEXT_MENU_CHANGE="builder.contextMenu.change",e.DATA_CHANGE="builder.data.change",e.SHARED_EDITOR_LIST_CHANGE="builder.sharedEditorList.change",e.ROUTE_LIST_CHANGE="builder.routeList.change",e.HOVER_NODE_CHANGE="builder.hoverNode.change",e.ACTIVE_NODE_CHANGE="builder.activeNode.change",e.SHOW_RELATED_NODES_BASED_ON_EVENTS="builder.showRelatedNodesBasedOnEvents.change",e.HIGHLIGHT_NODES_CHANGE="builder.highlightNodes.change",e.OUTLINE_DISABLED_NODES_CHANGE="builder.outlineDisabledNodes.change",e.DROPPING_STATUS_CHANGE="builder.droppingStatus.change",e.WORKBENCH_TREE_NODE_MOVE="workbench.tree.node.move"}(Y||(Y={}));class Q{constructor(){var e;s()(this,"data",{rootId:null,nodes:[],edges:[],wrapperNode:null}),s()(this,"hoverNodeUid",void 0),s()(this,"activeNodeUid",void 0),s()(this,"sharedEditorList",void 0),s()(this,"routeList",void 0),s()(this,"storyList",void 0),s()(this,"eventTarget",new P),s()(this,"contextMenuStatus",{active:!1}),s()(this,"showRelatedNodesBasedOnEvents",void 0),s()(this,"relatedNodesBasedOnEventsMap",void 0),s()(this,"highlightNodes",new Set),s()(this,"templateSourceMap",void 0),s()(this,"droppingStatus",new Map),s()(this,"localJsonStorage",new p.JsonStorage(localStorage)),s()(this,"outlineDisabledNodes",new Set(null!==(e=this.localJsonStorage.getItem("builder-outline-disabled-nodes"))&&void 0!==e?e:[]))}getData(){return this.data}getContextMenuStatus(){return this.contextMenuStatus}getRelatedNodesBasedOnEventsMap(){return this.relatedNodesBasedOnEventsMap}sharedEditorListInit(e){this.sharedEditorList=e,this.eventTarget.dispatchEvent(new CustomEvent(Y.SHARED_EDITOR_LIST_CHANGE))}getSharedEditorList(){var e;return null!==(e=this.sharedEditorList)&&void 0!==e?e:[]}onSharedEditorListChange(e){return this.eventTarget.addEventListener(Y.SHARED_EDITOR_LIST_CHANGE,e),()=>{this.eventTarget.removeEventListener(Y.SHARED_EDITOR_LIST_CHANGE,e)}}routeListInit(e){this.routeList=e,this.eventTarget.dispatchEvent(new CustomEvent(Y.ROUTE_LIST_CHANGE))}getRouteList(){var e;return null!==(e=this.routeList)&&void 0!==e?e:[]}storyListInit(e){this.storyList=e}getStoryList(){return this.storyList}onRouteListChange(e){return this.eventTarget.addEventListener(Y.ROUTE_LIST_CHANGE,e),()=>{this.eventTarget.removeEventListener(Y.ROUTE_LIST_CHANGE,e)}}dataInit(e,t){this.templateSourceMap=t;var n=_(),o=a()({rootId:n},M(e,n,t,this.storyList,!0));this.data=a()(a()({},o),{},{edges:w(o)}),this.triggerDataChange()}triggerDataChange(){var{rootId:e,nodes:t}=this.data,n="custom-template"===t.find(t=>t.$$uid===e).type;this.relatedNodesBasedOnEventsMap=function(e,t){var n=new Map,o=new Map,r=new Map;for(var i of e){for(var a of(n.set(i.$$uid,{upstreamNodes:new Set,downstreamNodes:new Set}),i.$$matchedSelectors))o.get(a)||o.set(a,i.$$uid);t&&i.ref&&r.set(i.ref,i.$$uid)}for(var d of e){var s=[];Object(l.isEmpty)(d.$$parsedEvents)||(s=Object.values(d.$$parsedEvents).flat()),Object(l.isEmpty)(d.$$parsedLifeCycle)||(s=s.concat(Object.entries(d.$$parsedLifeCycle).flatMap(e=>{var[t,n]=e;switch(t){case"onBeforePageLoad":case"onPageLoad":case"onPageLeave":case"onBeforePageLeave":case"onAnchorLoad":case"onAnchorUnload":case"onMessageClose":return n;case"onMessage":return[].concat(n).flatMap(e=>[].concat(e.handlers));default:return console.warn("unknown lifeCycle: ".concat(t)),[]}}))),s.length>0&&j(d,s,n,o,r)}return n}(t,n),this.eventTarget.dispatchEvent(new CustomEvent(Y.DATA_CHANGE,{detail:this.data}))}runAddNodeAction(e){var{rootId:t,nodes:n,edges:o,wrapperNode:r}=this.data,{nodeUid:i,parentUid:d,nodeUids:s,nodeData:p,sort:u}=e,{nodes:c,edges:v}=M(Object(l.omit)(p,["parent"]),i,this.templateSourceMap,this.getStoryList()),g={rootId:t,nodes:n.concat(c),edges:o.concat({parent:d,child:i,mountPoint:p.mountPoint,sort:null!=u?u:void 0,$$isTemplateDelegated:q(n,d)}).concat(v),wrapperNode:r};this.data=a()(a()({},g),{},{edges:L(g,{parentUid:d,nodeUids:s})}),this.triggerDataChange()}updateBrick(e){this.data=U(e.nodeUid,this.data),this.runAddNodeAction(e)}updateNode(e,t){var{rootId:n,nodes:o,edges:r,wrapperNode:i}=this.data,d=o.find(t=>t.instanceId===e),s=o.map(n=>{if(n.instanceId===e){var o=!1,r=t.$$normalized;if(void 0!==(null==r?void 0:r.if)&&(Object(p.isBrickNode)(n)||Object(p.isRouteNode)(n))){var i={if:r.if};Object(p.computeConstantCondition)(i),!1===i.if&&(o=!0)}return a()(a()(a()({},n),t),{},{$$unreachable:o})}return n}),l=void 0===t.mountPoint||null===t.mountPoint?r:r.map(e=>e.child===d.$$uid?a()(a()({},e),{},{mountPoint:t.mountPoint}):e);this.data={rootId:n,nodes:s,edges:l,wrapperNode:i},this.triggerDataChange(),this.eventTarget.dispatchEvent(new CustomEvent(Y.NODE_UPDATE,{detail:this.data}))}redirectMountPoint(e){var{rootId:t,wrapperNode:n}=this.data;e.parentUid===t&&(e.nodeData.mountPoint="bricks"),n&&n.instanceId===e.nodeData.parent&&(e.nodeData.mountPoint="content")}redirectSnippetMountPoint(e){var t;null===(t=e.nodeDetails)||void 0===t||t.forEach(e=>{this.redirectMountPoint(e)})}nodeAdd(e){this.redirectMountPoint(e),this.runAddNodeAction(e),this.eventTarget.dispatchEvent(new CustomEvent(Y.NODE_ADD,{detail:e}))}nodeAddStored(e){var{rootId:t,nodes:n,edges:o,wrapperNode:r}=this.data,{nodeUid:i,nodeData:d}=e;this.data={rootId:t,nodes:n.map(e=>e.$$uid===i?a()(a()({},e),{},{id:d.id,instanceId:d.instanceId}):e),edges:o,wrapperNode:r},this.triggerDataChange()}snippetApply(e){this.redirectSnippetMountPoint(e);var{rootId:t,nodes:n,edges:o,wrapperNode:r}=this.data,{nodeDetails:i,parentUid:d,nodeUids:s}=e,p=n.slice(),u=o.slice(),c=e=>{var{parentUid:t,nodeUid:n,nodeData:o,children:r}=e,{nodes:i,edges:a}=M(Object(l.omit)(o,["parent"]),n,this.templateSourceMap,this.storyList);for(var d of(p.push(...i),u.push({parent:t,child:n,mountPoint:o.mountPoint,sort:o.sort,$$isTemplateDelegated:q(p,t)},...a),r))c(d)};for(var v of i)c(v);var g={rootId:t,nodes:p,edges:u,wrapperNode:r};this.data=a()(a()({},g),{},{edges:L(g,{parentUid:d,nodeUids:s})}),this.triggerDataChange(),this.eventTarget.dispatchEvent(new CustomEvent(Y.SNIPPET_APPLY,{detail:e}))}snippetApplyStored(e){var{rootId:t,nodes:n,edges:o,wrapperNode:r}=this.data,{flattenNodeDetails:i}=e;this.data={rootId:t,nodes:n.map(e=>{var t=i.find(t=>t.nodeUid===e.$$uid);return t?a()(a()({},e),{},{id:t.nodeData.id,instanceId:t.nodeData.instanceId}):e}),edges:o,wrapperNode:r},this.triggerDataChange()}nodeMove(e){var{rootId:t,nodes:n,edges:o,wrapperNode:r}=this.data;this.redirectMountPoint(e);var{nodeUid:i,parentUid:d,nodeUids:s,nodeData:l}=e,p={rootId:t,nodes:n,edges:o.filter(e=>e.child!==i).concat({parent:d,child:i,mountPoint:l.mountPoint,sort:void 0,$$isTemplateDelegated:q(n,d)}),wrapperNode:r};this.data=a()(a()({},p),{},{edges:L(p,{parentUid:d,nodeUids:s})}),this.triggerDataChange(),this.eventTarget.dispatchEvent(new CustomEvent(Y.NODE_MOVE,{detail:e}))}moveNode(e,t){var{$$uid:n}=e,{parent:o,mountPoint:r}=this.data.edges.find(e=>e.child===n),{relatedEdges:i,mountPoints:a}=F(this.data.edges,o),d=i.filter(e=>e.mountPoint===r),s=d.findIndex(e=>e.child===n),p=J(d,s,t);if(p){var u=Object(l.sortBy)(i,e=>a.indexOf(e.mountPoint),e=>p.indexOf(e));this.reorder(o,u),this.eventTarget.dispatchEvent(new CustomEvent(Y.NODE_UPDATE,{detail:this.data}))}}getDragInfo(e){var t,{nodeData:n,dragNodeUid:o,dragOverNodeUid:r,dragStatus:i}=e,{rootId:a,nodes:d,edges:s}=this.data,p=r===a,u=s.find(e=>e.child===o),c=s.find(e=>e.child===r),v=p?"bricks":"inside"===i?"content":c.mountPoint,g=s.find(e=>e.child===r),f=p?a:"inside"===i?g.child:g.parent,h=d.find(e=>e.$$uid===f),E=s.filter(e=>e.child!==o&&e.parent===f),m=Object(l.sortBy)(E,"sort").map(e=>e.child),C=[],b=[];if(m.forEach(e=>{var t=d.find(t=>t.$$uid===e);C.push(t.id),b.push(t.instanceId)}),"inside"===i)t=E.length?Math.max(...E.map(e=>e.sort))+1:0,C.push(n.id),b.push(n.instanceId);else if("top"===i||"bottom"===i){var N,D=m.findIndex(e=>e===r);t="top"===i?D:D+1,C.splice(t,0,n.id),m.splice(t,0,null!==(N=null==u?void 0:u.child)&&void 0!==N?N:o),b.splice(t,0,n.instanceId)}return{parentUid:f,mountPoint:v,sortIndex:t,parnetNodeData:h,sortUids:m,sortNodeIds:C,sortNodeInstanceIds:b}}workbenchNodeAdd(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],{nodes:n,edges:o,rootId:r}=this.data,{nodeData:i,dragOverInstanceId:a,dragStatus:d,mountPoint:s}=e;if(i.instanceId&&!i.instanceId.startsWith("mock"));else{var l,p,u=e.parent||e.parentInstanceId,c=i.$$uid||_(),v=n.find(e=>e.instanceId===a).$$uid,g=d;if(v===r)g="inside";else{var f=o.find(e=>e.child===v);n.find(e=>"inside"===d?e.$$uid===f.child:e.$$uid===f.parent).instanceId!==u&&(g="inside",v=n.find(e=>e.instanceId===u).$$uid)}var{parentUid:h,sortIndex:E,sortUids:m,sortNodeIds:C,sortNodeInstanceIds:b}=this.getDragInfo({nodeData:{id:null!==(l=i.id)&&void 0!==l?l:null,instanceId:null!==(p=i.instanceId)&&void 0!==p?p:null},dragNodeUid:c,dragOverNodeUid:v,dragStatus:g});if(i.parent=u,i.mountPoint=s,i.sort=E,i.bricks){var N={parentUid:h,nodeDetails:i.bricks.map(e=>X({parent:u,parentUid:h,mountPoint:s,nodeUid:c,brickConf:e,isPortalCanvas:!1})),nodeIds:C,nodeUids:m};if(!t)return N;this.snippetApply(N)}this.runAddNodeAction({nodeUid:c,parentUid:h,nodeUids:m,nodeIds:C,nodeData:i,sort:E});var D={nodeUids:m,nodeInstanceIds:b,nodeIds:C};e.sortData=D,this.eventTarget.dispatchEvent(new CustomEvent(Y.NODE_ADD,{detail:{nodeUid:c,parentUid:h,nodeUids:m,nodeInstanceIds:b,nodeIds:C,nodeData:i}}))}}workbenchTreeNodeMove(e){var{rootId:t,nodes:n,edges:o,wrapperNode:r}=this.data,{dragNodeUid:i,dragOverNodeUid:d,dragStatus:s}=e,l=n.find(e=>e.$$uid===i),p=o.find(e=>e.child===l.$$uid),u=p.parent,c=n.find(e=>e.$$uid===u),{parentUid:v,parnetNodeData:g,mountPoint:f,sortIndex:h,sortUids:E,sortNodeIds:m}=this.getDragInfo({nodeData:l,dragNodeUid:i,dragOverNodeUid:d,dragStatus:s}),C={rootId:t,nodes:n,edges:o.filter(e=>e.child!==i).concat({parent:v,child:i,mountPoint:f,sort:h,$$isTemplateDelegated:q(n,v)}),wrapperNode:r};this.data=a()(a()({},C),{},{edges:L(C,{parentUid:v,nodeUids:E})}),this.triggerDataChange(),this.eventTarget.dispatchEvent(new CustomEvent(Y.WORKBENCH_TREE_NODE_MOVE,{detail:a()(a()({nodeUid:i,nodeInstanceId:l.instanceId,nodeIds:m},c.instanceId!==g.instanceId||p.mountPoint!==f?{nodeData:{parent:g.instanceId,mountPoint:f}}:{}),{},{objectId:K(l)})})),this.eventTarget.dispatchEvent(new CustomEvent(Y.NODE_UPDATE,{detail:this.data}))}moveMountPoint(e,t,n){var{$$uid:o}=e,{relatedEdges:r,mountPoints:i}=F(this.data.edges,o),a=i.indexOf(t),d=J(i,a,n);if(d){var s=Object(l.sortBy)(r,e=>d.indexOf(e.mountPoint),"sort");this.reorder(o,s)}}reorder(e,t){var{nodes:n}=this.data,o=t.map(e=>e.child);this.data=a()(a()({},this.data),{},{edges:L(this.data,{parentUid:e,nodeUids:o})}),this.triggerDataChange();var r=o.map(e=>n.find(t=>t.$$uid===e)).map(e=>e.id);this.eventTarget.dispatchEvent(new CustomEvent(Y.NODE_REORDER,{detail:{nodeUids:o,parentUid:e,nodeIds:r,objectId:K(n.find(t=>t.$$uid===e))}}))}contextUpdated(e){var{rootId:t,nodes:n,edges:o,wrapperNode:r}=this.data;this.data={rootId:t,edges:o,nodes:n.map(n=>n.$$uid===t?a()(a()({},n),{},{context:e.context}):n),wrapperNode:r},this.triggerDataChange()}nodeReorder(e){var{nodeUids:t,parentUid:n}=e;this.data=a()(a()({},this.data),{},{edges:L(this.data,{parentUid:n,nodeUids:t})}),this.triggerDataChange(),this.eventTarget.dispatchEvent(new CustomEvent(Y.NODE_REORDER,{detail:e}))}nodeDelete(e){this.data=U(e.$$uid,this.data),this.triggerDataChange()}nodeClick(e){this.setActiveNodeUid(e.$$uid),this.eventTarget.dispatchEvent(new CustomEvent(Y.NODE_CLICK,{detail:e}))}contextMenuChange(e){this.contextMenuStatus=e,this.eventTarget.dispatchEvent(new CustomEvent(Y.CONTEXT_MENU_CHANGE))}onDataChange(e){return this.eventTarget.addEventListener(Y.DATA_CHANGE,e),()=>{this.eventTarget.removeEventListener(Y.DATA_CHANGE,e)}}onNodeAdd(e){return this.eventTarget.addEventListener(Y.NODE_ADD,e),()=>{this.eventTarget.removeEventListener(Y.NODE_ADD,e)}}onSnippetApply(e){return this.eventTarget.addEventListener(Y.SNIPPET_APPLY,e),()=>{this.eventTarget.removeEventListener(Y.SNIPPET_APPLY,e)}}onNodeReorder(e){return this.eventTarget.addEventListener(Y.NODE_REORDER,e),()=>{this.eventTarget.removeEventListener(Y.NODE_REORDER,e)}}onNodeMove(e){return this.eventTarget.addEventListener(Y.NODE_MOVE,e),()=>{this.eventTarget.removeEventListener(Y.NODE_MOVE,e)}}onWorkbenchTreeNodeMove(e){return this.eventTarget.addEventListener(Y.WORKBENCH_TREE_NODE_MOVE,e),()=>{this.eventTarget.removeEventListener(Y.WORKBENCH_TREE_NODE_MOVE,e)}}onNodeClick(e){return this.eventTarget.addEventListener(Y.NODE_CLICK,e),()=>{this.eventTarget.removeEventListener(Y.NODE_CLICK,e)}}onNodeUpdate(e){return this.eventTarget.addEventListener(Y.NODE_UPDATE,e),()=>{this.eventTarget.removeEventListener(Y.NODE_UPDATE,e)}}onContextMenuChange(e){return this.eventTarget.addEventListener(Y.CONTEXT_MENU_CHANGE,e),()=>{this.eventTarget.removeEventListener(Y.CONTEXT_MENU_CHANGE,e)}}setShowRelatedNodesBasedOnEvents(e){this.showRelatedNodesBasedOnEvents=e,this.eventTarget.dispatchEvent(new CustomEvent(Y.SHOW_RELATED_NODES_BASED_ON_EVENTS))}getShowRelatedNodesBasedOnEvents(){return this.showRelatedNodesBasedOnEvents}onShowRelatedNodesBasedOnEventsChange(e){return this.eventTarget.addEventListener(Y.SHOW_RELATED_NODES_BASED_ON_EVENTS,e),()=>{this.eventTarget.removeEventListener(Y.SHOW_RELATED_NODES_BASED_ON_EVENTS,e)}}setHoverNodeUid(e){this.hoverNodeUid!==e&&(this.hoverNodeUid=e,this.eventTarget.dispatchEvent(new CustomEvent(Y.HOVER_NODE_CHANGE)))}getHoverNodeUid(){return this.hoverNodeUid}onHoverNodeChange(e){return this.eventTarget.addEventListener(Y.HOVER_NODE_CHANGE,e),()=>{this.eventTarget.removeEventListener(Y.HOVER_NODE_CHANGE,e)}}setActiveNodeUid(e){this.activeNodeUid!==e&&(this.activeNodeUid=e,this.eventTarget.dispatchEvent(new CustomEvent(Y.ACTIVE_NODE_CHANGE)))}getActiveNodeUid(){return this.activeNodeUid}onActiveNodeChange(e){return this.eventTarget.addEventListener(Y.ACTIVE_NODE_CHANGE,e),()=>{this.eventTarget.removeEventListener(Y.ACTIVE_NODE_CHANGE,e)}}toggleOutline(e){this.outlineDisabledNodes.has(e)?this.outlineDisabledNodes.delete(e):this.outlineDisabledNodes.add(e),this.localJsonStorage.setItem("builder-outline-disabled-nodes",Array.from(this.outlineDisabledNodes)),this.eventTarget.dispatchEvent(new CustomEvent(Y.OUTLINE_DISABLED_NODES_CHANGE))}isOutlineEnabled(e){return!this.outlineDisabledNodes.has(e)}onOutlineEnabledNodesChange(e){return this.eventTarget.addEventListener(Y.OUTLINE_DISABLED_NODES_CHANGE,e),()=>{this.eventTarget.removeEventListener(Y.OUTLINE_DISABLED_NODES_CHANGE,e)}}setHighlightNodes(e){this.highlightNodes=e,this.eventTarget.dispatchEvent(new CustomEvent(Y.HIGHLIGHT_NODES_CHANGE))}getHighlightNodes(){return this.highlightNodes}onHighlightNodesChange(e){return this.eventTarget.addEventListener(Y.HIGHLIGHT_NODES_CHANGE,e),()=>{this.eventTarget.removeEventListener(Y.HIGHLIGHT_NODES_CHANGE,e)}}updateDroppingStatus(e,t,n){var o=this.droppingStatus.get(e);this.droppingStatus=new Map(Array.from(this.droppingStatus.entries()).concat([[e,new Map((o?Array.from(o):[]).concat([[t,n]]))]])),this.eventTarget.dispatchEvent(new CustomEvent(Y.DROPPING_STATUS_CHANGE)),this.hoverNodeUid&&Array.from(this.droppingStatus.values()).flatMap(e=>Array.from(e.values())).some(Boolean)&&this.setHoverNodeUid(void 0)}getDroppingStatus(){return this.droppingStatus}onDroppingStatusChange(e){return this.eventTarget.addEventListener(Y.DROPPING_STATUS_CHANGE,e),()=>{this.eventTarget.removeEventListener(Y.DROPPING_STATUS_CHANGE,e)}}}function F(e,t){var n=Object(l.sortBy)(e.filter(e=>e.parent===t&&!e.$$isTemplateExpanded),"sort"),o=new Set;for(var r of n)o.add(r.mountPoint);return{relatedEdges:n,mountPoints:Array.from(o)}}function J(e,t,n){var o;if("up"===n){if(t<=0)return;o=t-1}else{if(-1===t||t>=e.length-1)return;o=t}return[...e.slice(0,o),e[o+1],e[o],...e.slice(o+2)]}var ee=r.a.createContext({});function te(){var{manager:e}=r.a.useContext(ee);if(!e)throw new Error("Expected builder data context");return e}function ne(){var e=te(),[t,n]=Object(o.useState)(e.getData());return Object(o.useEffect)(()=>e.onDataChange(()=>{n(e.getData())}),[e]),t}function oe(e){var{nodeUid:t,isRoot:n,isWrapper:r}=e,{rootId:i,nodes:a,wrapperNode:d}=ne(),s=n?i:t;return Object(o.useMemo)(()=>r?d:a.find(e=>e.$$uid===s),[a,s,r,d])}function re(){var e=te(),[t,n]=Object(o.useState)(e.getContextMenuStatus());return Object(o.useEffect)(()=>e.onContextMenuChange(()=>{n(e.getContextMenuStatus())}),[e]),t}function ie(){var e=te(),[t,n]=Object(o.useState)(e.getShowRelatedNodesBasedOnEvents());return Object(o.useEffect)(()=>e.onShowRelatedNodesBasedOnEventsChange(()=>{n(e.getShowRelatedNodesBasedOnEvents())}),[e]),t}function ae(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var de={editorContainer:"EditorContainer--editorContainer--1j8iqnx",nodeAlias:"EditorContainer--nodeAlias--1j8iqnx",highlight:"EditorContainer--highlight--1j8iqnx",hover:"EditorContainer--hover--1j8iqnx",active:"EditorContainer--active--1j8iqnx",dropping:"EditorContainer--dropping--1j8iqnx",editorBody:"EditorContainer--editorBody--1j8iqnx",transparentContainer:"EditorContainer--transparentContainer--1j8iqnx",isUpstreamNode:"EditorContainer--isUpstreamNode--1j8iqnx",isDownstreamNode:"EditorContainer--isDownstreamNode--1j8iqnx",arrow:"EditorContainer--arrow--1j8iqnx"};function se(e,t){for(var n=e;n;){if(n===t)return!0;if(n.classList.contains(de.editorContainer)&&!n.classList.contains(de.isTemplateInternalNode))return!1;n=n.parentElement}return!1}function le(){var e=te(),[t,n]=Object(o.useState)(e.getHoverNodeUid());return Object(o.useEffect)(()=>e.onHoverNodeChange(()=>{n(e.getHoverNodeUid())}),[e]),t}function pe(){var e=te(),[t,n]=Object(o.useState)(e.getHighlightNodes());return Object(o.useEffect)(()=>e.onHighlightNodesChange(()=>{n(e.getHighlightNodes())}),[e]),t}function ue(){var e=te(),[t,n]=Object(o.useState)(e.getDroppingStatus());return Object(o.useEffect)(()=>e.onDroppingStatusChange(()=>{n(e.getDroppingStatus())}),[e]),t}function ce(e){var t,n,{nodeUid:i,type:a,isTransparentContainer:d,editorContainerStyle:s,editorBodyStyle:l,children:p}=e,u=Object(o.useRef)(),v=pe(),g=oe({nodeUid:i}),[f,h]=Object(o.useState)(!1),[E,m]=Object(o.useState)(!1),C=re(),b=le(),N=ie(),D=te(),[O,y]=Object(o.useState)(b===i),x=null!=a?a:c.DEFAULT,I=Object(o.useRef)(b),$=ue();Object(o.useEffect)(()=>{I.current=b},[b]);var T=Object(o.useCallback)(e=>{e.stopPropagation(),y(!0),I.current!==i&&D.setHoverNodeUid(i)},[i,D]),A=Object(o.useCallback)(e=>{e.stopPropagation(),y(!1),I.current===i&&D.setHoverNodeUid(void 0)},[i,D]);Object(o.useEffect)(()=>{if(!g.$$isTemplateInternalNode){var e=u.current;return e.addEventListener("mouseover",T),e.addEventListener("mouseout",A),()=>{e.removeEventListener("mouseover",T),e.removeEventListener("mouseout",A)}}},[T,A,g]),Object(o.useEffect)(()=>{if(!g.$$isTemplateInternalNode&&(y(b===i),N)){var e,t,n=D.getRelatedNodesBasedOnEventsMap(),o=null===(e=n.get(b))||void 0===e?void 0:e.upstreamNodes.has(i);h(o);var r=null===(t=n.get(b))||void 0===t?void 0:t.downstreamNodes.has(i);m(r)}},[b,g,i,N,D]);var P=Object(o.useCallback)(e=>!g.$$isTemplateInternalNode&&se(e.target,u.current),[g]),k=Object(o.useCallback)(e=>{P(e)&&D.nodeClick(g)},[P,D,g]),_=Object(o.useCallback)(e=>{P(e)&&(e.preventDefault(),D.contextMenuChange({active:!0,node:g,x:e.clientX,y:e.clientY}))},[P,D,g]);return r.a.createElement("div",{className:S(de.editorContainer,de[x],{[de.transparentContainer]:d,[de.dropping]:Array.from(null!==(t=null===(n=$.get(i))||void 0===n?void 0:n.values())&&void 0!==t?t:[]).some(Boolean),[de.hover]:O,[de.active]:C.active&&C.node.$$uid===i,[de.isDownstreamNode]:!O&&E,[de.isUpstreamNode]:!O&&f,[de.highlight]:v.has(i),[de.isTemplateInternalNode]:g.$$isTemplateInternalNode}),style:s,ref:u,onClick:k,onContextMenu:_},r.a.createElement("div",{className:de.nodeAlias},!O&&(E?r.a.createElement("span",{className:de.arrow},"↓"):f?r.a.createElement("span",{className:de.arrow},"↑"):null),g.alias||g.brick),r.a.createElement("div",{className:de.editorBody,style:l},p))}ae(".EditorContainer--editorContainer--1j8iqnx {\n position: relative;\n}\n\n.EditorContainer--nodeAlias--1j8iqnx {\n position: absolute;\n top: -25px;\n height: calc(25px + var(--editor-brick-border-radius));\n background-color: #d6d6d6;\n border: 1px solid var(--editor-brick-stroke-color);\n padding: 0 5px;\n border-radius: 2px;\n color: #737373;\n white-space: nowrap;\n visibility: hidden;\n pointer-events: none;\n}\n\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--highlight--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--hover--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--active--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--dropping--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n visibility: visible;\n}\n\n.EditorContainer--editorBody--1j8iqnx {\n position: relative;\n border-radius: var(--editor-brick-border-radius);\n background: #fff;\n}\n\n.EditorContainer--transparentContainer--1j8iqnx > .EditorContainer--editorBody--1j8iqnx {\n margin: -1px;\n}\n\n.EditorContainer--transparentContainer--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n left: -1px;\n}\n\n.EditorContainer--nodeAlias--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--hover--1j8iqnx > .EditorContainer--editorBody--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--active--1j8iqnx > .EditorContainer--editorBody--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--dropping--1j8iqnx > .EditorContainer--editorBody--1j8iqnx {\n box-shadow: 0 0 0 1px var(--editor-brick-stroke-color-active);\n}\n\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isUpstreamNode--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isDownstreamNode--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n visibility: visible;\n background-color: #f7f7f7;\n}\n\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isDownstreamNode--1j8iqnx > .EditorContainer--editorBody--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isDownstreamNode--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n box-shadow: 0 0 0 1px rgba(22, 224, 57, 0.3);\n}\n\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isUpstreamNode--1j8iqnx > .EditorContainer--editorBody--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isUpstreamNode--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n box-shadow: 0 0 0 1px rgba(224, 88, 22, 0.3);\n}\n\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--highlight--1j8iqnx > .EditorContainer--editorBody--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--highlight--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n box-shadow: 0 0 0 1px var(--theme-orange-color);\n}\n\n.EditorContainer--arrow--1j8iqnx {\n font-size: 10px;\n padding: 0 4px;\n position: relative;\n bottom: 1px;\n}\n");function ve(){return(ve=N()((function*(e,t){var n=[];if(Object(p.isRouteNode)(e))n.push("basic-bricks.any-route--editor");else{if(!Object(p.isBrickNode)(e))throw new Error("Unsupported node type: ".concat(e.type));e.brick.includes("-")&&n.push("".concat(e.brick,"--editor")),t&&n.push(t),n.push("basic-bricks.any-brick--editor")}for(var o of n){try{yield D.developHelper.loadEditorBricks([o])}catch(e){throw new Error('Load editor brick "'.concat(o,'" failed'))}if(customElements.get(o))return o}throw new Error('Editor brick "'.concat(n.join(", "),'" not found'))}))).apply(this,arguments)}var ge="EditorBrickAsComponent--slotContentLayoutBlock--1aed4lu",fe="EditorBrickAsComponent--selfLayoutBlock--1aed4lu",he="EditorBrickAsComponent--selfLayoutContainer--1aed4lu",Ee="EditorBrickAsComponent--slotContentLayoutInline--1aed4lu",me="EditorBrickAsComponent--selfLayoutInline--1aed4lu",Ce="EditorBrickAsComponent--dragging--1aed4lu",be="EditorBrickAsComponent--baseView--1aed4lu";function Ne(e){var t,{node:n,slotContentLayout:i}=e,[a,d]=r.a.useState(!1),[s,l]=r.a.useState(),[c,f]=r.a.useState(),{edges:h}=ne(),E=(t=te(),Object(o.useMemo)(()=>t.getStoryList(),[t])),m=r.a.useMemo(()=>h.some(e=>e.parent===n.$$uid),[n,h]),b=Object(o.useMemo)(()=>Object(D.getRuntime)().getFeatureFlags()["next-builder-installed-bricks"],[]),O=Object(o.useMemo)(()=>b?null:function(e,t){var n=null==t?void 0:t.find(t=>t.storyId===e.brick);return null==n?void 0:n.doc}(n,E),[b,n,E]),y=function(){var e=te(),t=Object(o.useCallback)(()=>new Map(e.getSharedEditorList().map(e=>[e.id,e])),[e]),[n,r]=Object(o.useState)(t());return Object(o.useEffect)(()=>e.onSharedEditorListChange(()=>{r(t())}),[t,e]),n}(),x=Object(o.useMemo)(()=>b&&Object(p.isBrickNode)(n)?y.get(n.brick):null,[y,b,n]);r.a.useEffect(()=>{N()((function*(){var e,t;d(!1);try{e=yield function(e,t){return ve.apply(this,arguments)}(n,b?null==x?void 0:x.editor:null==O?void 0:O.editor)}catch(e){console.error(e),t=e.message}l(e),f(t),d(!0)}))()},[O,x,b,n]);var I=r.a.useMemo(()=>({brick:s,properties:{nodeUid:n.$$uid,editorProps:b?null==x?void 0:x.editorProps:null==O?void 0:O.editorProps}}),[O,s,x,b,n.$$uid]),$=r.a.useMemo(()=>{var e,t;a&&s&&(t=customElements.get(s).selfLayout);return null!==(e=t)&&void 0!==e?e:m?v.CONTAINER:v.INLINE},[a,s,m]),[{isDragging:T},A]=Object(C.useDrag)({item:{type:u.NODE_TO_MOVE,nodeUid:n.$$uid,nodeInstanceId:n.instanceId,nodeId:n.id},options:{dropEffect:"move"},collect:e=>({isDragging:e.isDragging()})});return a?s?r.a.createElement("div",{className:S({[ge]:i===g.BLOCK,[Ee]:i===g.INLINE,[me]:$===v.INLINE,[fe]:$===v.BLOCK,[he]:$===v.CONTAINER,[Ce]:T,__isTemplateInternalNode:n.$$isTemplateInternalNode})},r.a.createElement("div",{ref:n.$$isTemplateInternalNode?void 0:A,draggable:!n.$$isTemplateInternalNode,className:S({[be]:"basic-bricks.micro-view"===n.brick||"basic-bricks.micro-app"===n.brick||"basic-bricks.easy-view"===n.brick})},r.a.createElement(D.BrickAsComponent,{useBrick:I}))):r.a.createElement("span",null,c):r.a.createElement("span",null,"Loading...")}function De(e){var{nodeUid:t,isRoot:n,doNotExpandTemplates:r,isWrapper:i}=e,{rootId:a,nodes:d,edges:s,wrapperNode:l}=ne();return Object(o.useMemo)(()=>Oe({nodes:d,edges:s,nodeUid:n?i?l.$$uid:a:t,doNotExpandTemplates:r,isWrapper:i}),[r,s,n,t,d,a,i,l])}function Oe(e){var{nodeUid:t,nodes:n,edges:o,doNotExpandTemplates:r,isWrapper:i}=e,a=new Map,d=Object(l.sortBy)(o.filter(e=>e.parent===t&&(r?!e.$$isTemplateInternal:!e.$$isTemplateDelegated)),[e=>e.sort]),s=function(e){var t=n.find(t=>t.$$uid===e.child);a.has(e.mountPoint)?a.get(e.mountPoint).push(t):a.set(e.mountPoint,[t])};for(var p of d)s(p);return Array.from(a.entries()).map(e=>{var[t,n]=e;return{mountPoint:i?"bricks":t,childNodes:n}})}function ye(){var{edges:e}=ne();return Object(o.useCallback)((t,n)=>{var o=t=>t!==n&&!e.some(e=>e.parent===t&&!o(e.child));return o(t)},[e])}ae(".EditorBrickAsComponent--slotContentLayoutBlock--1aed4lu.EditorBrickAsComponent--selfLayoutBlock--1aed4lu,\n.EditorBrickAsComponent--slotContentLayoutBlock--1aed4lu.EditorBrickAsComponent--selfLayoutContainer--1aed4lu {\n grid-column: 1 / -1;\n}\n\n.EditorBrickAsComponent--slotContentLayoutInline--1aed4lu {\n margin: 0 var(--editor-brick-gap-half);\n}\n\n.EditorBrickAsComponent--slotContentLayoutInline--1aed4lu.EditorBrickAsComponent--selfLayoutInline--1aed4lu,\n.EditorBrickAsComponent--slotContentLayoutInline--1aed4lu.EditorBrickAsComponent--selfLayoutBlock--1aed4lu {\n width: 150px;\n}\n\n.EditorBrickAsComponent--slotContentLayoutInline--1aed4lu.EditorBrickAsComponent--selfLayoutContainer--1aed4lu {\n width: 100%;\n}\n\n.EditorBrickAsComponent--dragging--1aed4lu {\n opacity: 0.3;\n}\n\n.EditorBrickAsComponent--baseView--1aed4lu {\n height: 100%;\n min-height: 100%;\n}\n");function xe(e,t,n,o){var r=function(e,t){var n=e.getBoundingClientRect(),o=[],r=Array.from(t.children).filter(e=>!e.classList.contains("__isTemplateInternalNode"));if(r.length>0){var i={cells:[]},d=[i];r.forEach((e,t)=>{var n,o,r=e.getBoundingClientRect(),a={index:t,top:r.top,bottom:r.bottom,left:r.left,right:r.right},s=i.cells.length>0&&i.cells[i.cells.length-1];!s||Ie(r.left,s.right)>0&&Ie(r.top,s.bottom)<0?(i.cells.push(a),i.top=Math.min(null!==(n=i.top)&&void 0!==n?n:1/0,r.top),i.bottom=Math.max(null!==(o=i.bottom)&&void 0!==o?o:-1/0,r.bottom)):(i={cells:[a],top:r.top,bottom:r.bottom},d.push(i))});var s=n.top,l=n.top;d.forEach((e,t)=>{if(1===e.cells.length){var r=e.cells[0],i=(r.top+r.bottom)/2;if(o.push({rect:{top:s,bottom:i,left:n.left,right:n.right},cursor:{index:r.index,y:(l+r.top)/2-n.top}}),s=i,l=r.bottom,t===d.length-1)o.push({rect:{top:s,bottom:n.bottom,left:n.left,right:n.right},cursor:{index:r.index+1,y:Math.min(r.bottom+6,(r.bottom+n.bottom)/2)-n.top}});else if(d[t+1].cells.length>1){var p=d[t+1],u=(r.bottom+p.top)/2;o.push({rect:{top:s,bottom:u,left:n.left,right:n.right},cursor:{index:r.index+1,y:u-n.top}}),s=u}}else{var c=n.left,v=n.left,g=t<d.length-1?(d[t+1].top+e.bottom)/2:n.bottom,f={isVertical:!0,y:e.top-n.top,height:e.bottom-e.top};e.cells.forEach((r,i)=>{var l=(r.left+r.right)/2;o.push({rect:{top:s,bottom:g,left:c,right:l},cursor:a()(a()({},f),{},{index:r.index,x:(v+r.left)/2-n.left})}),c=l,v=r.right,i===e.cells.length-1&&(t===d.length-1?o.push({rect:{top:s,bottom:n.bottom,left:c,right:n.right},cursor:a()(a()({},f),{},{index:r.index+1,x:Math.min(v+6,n.right)-n.left})}):o.push({rect:{top:s,bottom:g,left:c,right:n.right},cursor:a()(a()({},f),{},{index:r.index+1,x:Math.min(v+6,n.right)-n.left})}))}),s=g,l=e.bottom}})}return o}(n,o);for(var{rect:i,cursor:d}of r)if(e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom)return d;return{index:0,y:5}}function Ie(e,t){var n=e-t;return Math.abs(n)<1?0:n}function $e(e){var{draggingNodeUid:t,draggingNodeId:n,draggingIndex:o,droppingMountPoint:r,droppingSiblingGroups:i,droppingIndex:a}=e,d=Array.isArray(t)?t:[t],s=i.flatMap(e=>e.childNodes),l=i.flatMap(e=>{var t=e.childNodes.map(e=>e.$$uid).filter(e=>!d.includes(e));return e.mountPoint===r&&t.splice((null!=o?o:-1)>=0&&a>o?a-1:a,0,...d),t}),p=l.map(e=>d.includes(e)?n:s.find(t=>t.$$uid===e).id);return{nodeUids:l,nodeIds:p}}function Te(e){return Object(o.useMemo)(()=>{var t=[],n=[];for(var o of e)o.portal?n.push([o]):t.push(o);return[t,...n,[]]},[e])}var Se={dropZone:"DropZone--dropZone--189f8p9",isSlot:"DropZone--isSlot--189f8p9",dropping:"DropZone--dropping--189f8p9",showOutlineIfEmpty:"DropZone--showOutlineIfEmpty--189f8p9",isRoot:"DropZone--isRoot--189f8p9",dropZoneBody:"DropZone--dropZoneBody--189f8p9",active:"DropZone--active--189f8p9",isPortalCanvas:"DropZone--isPortalCanvas--189f8p9",fullscreen:"DropZone--fullscreen--189f8p9",hasTabs:"DropZone--hasTabs--189f8p9",slotContentLayoutBlock:"DropZone--slotContentLayoutBlock--189f8p9",slotContentLayoutInline:"DropZone--slotContentLayoutInline--189f8p9",slotContentLayoutGrid:"DropZone--slotContentLayoutGrid--189f8p9","mode-dialog":"DropZone--mode-dialog--189f8p9","mode-large":"DropZone--mode-large--189f8p9","mode-small":"DropZone--mode-small--189f8p9","mode-drawer":"DropZone--mode-drawer--189f8p9",dropCursor:"DropZone--dropCursor--189f8p9",dropCursorHorizontal:"DropZone--dropCursorHorizontal--189f8p9",dropCursorVertical:"DropZone--dropCursorVertical--189f8p9"};ae('.DropZone--dropZone--189f8p9 {\n position: relative;\n min-height: calc(var(--editor-brick-base-height) + 2px);\n border-radius: var(--editor-brick-border-radius);\n\n --drop-zone-padding: 20px;\n}\n\n.DropZone--isSlot--189f8p9 {\n border: 1px dashed transparent;\n}\n\n.DropZone--isSlot--189f8p9.DropZone--dropping--189f8p9 {\n background: var(--editor-brick-slot-bg);\n border-color: var(--editor-brick-slot-stroke-color);\n}\n\n.DropZone--showOutlineIfEmpty--189f8p9:not(.DropZone--dropping--189f8p9) {\n background: var(--editor-brick-skeleton-bg-light);\n}\n\n.DropZone--isRoot--189f8p9 > .DropZone--dropZoneBody--189f8p9 {\n padding: calc(var(--drop-zone-padding) + 7px) var(--drop-zone-padding)\n var(--drop-zone-padding);\n}\n\n.DropZone--isRoot--189f8p9.DropZone--active--189f8p9,\n.DropZone--isRoot--189f8p9.DropZone--dropping--189f8p9 {\n box-shadow: 0 0 0 1px var(--editor-brick-stroke-color-active);\n}\n\n.DropZone--isPortalCanvas--189f8p9,\n.DropZone--isRoot--189f8p9:not(.DropZone--isPortalCanvas--189f8p9) > .DropZone--dropZoneBody--189f8p9 {\n height: calc(\n 100vh - 148px - var(--editor-brick-toolbar-height) - var(--page-card-gap)\n );\n overflow-y: auto;\n}\n\n.DropZone--fullscreen--189f8p9.DropZone--isPortalCanvas--189f8p9,\n.DropZone--fullscreen--189f8p9:not(.DropZone--isPortalCanvas--189f8p9) > .DropZone--dropZoneBody--189f8p9 {\n height: calc(\n 100vh - var(--editor-brick-overlay-padding) * 2 - var(--page-card-gap) * 2 -\n var(--editor-brick-toolbar-height)\n );\n}\n\n.DropZone--hasTabs--189f8p9.DropZone--isPortalCanvas--189f8p9,\n.DropZone--hasTabs--189f8p9.DropZone--isRoot--189f8p9:not(.DropZone--isPortalCanvas--189f8p9) > .DropZone--dropZoneBody--189f8p9 {\n height: calc(\n 100vh - 158px - var(--editor-brick-toolbar-height) - var(--page-card-gap)\n );\n overflow-y: auto;\n}\n\n.DropZone--hasTabs--189f8p9.DropZone--fullscreen--189f8p9.DropZone--isPortalCanvas--189f8p9,\n.DropZone--hasTabs--189f8p9.DropZone--fullscreen--189f8p9:not(.DropZone--isPortalCanvas--189f8p9) > .DropZone--dropZoneBody--189f8p9 {\n height: calc(\n 100vh - var(--editor-brick-overlay-padding) * 2 - var(--page-card-gap) * 2 -\n 10px - var(--editor-brick-toolbar-height)\n );\n}\n\n.DropZone--slotContentLayoutBlock--189f8p9 > .DropZone--dropZoneBody--189f8p9 {\n display: grid;\n grid-gap: var(--editor-brick-gap);\n grid-template-columns: repeat(\n auto-fill,\n minmax(var(--editor-brick-inline-width), 1fr)\n );\n}\n\n.DropZone--slotContentLayoutInline--189f8p9 > .DropZone--dropZoneBody--189f8p9 {\n display: flex;\n flex-wrap: wrap;\n margin: 0 calc(var(--editor-brick-gap-half) * -1);\n}\n\n.DropZone--slotContentLayoutGrid--189f8p9 > .DropZone--dropZoneBody--189f8p9 {\n display: grid;\n grid-gap: var(--editor-brick-gap);\n grid-template-columns: repeat(\n auto-fill,\n minmax(var(--editor-brick-grid-width), 1fr)\n );\n height: 100%;\n}\n\n.DropZone--mode-dialog--189f8p9 > .DropZone--dropZoneBody--189f8p9 {\n margin: 0 auto;\n max-width: calc(600px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--mode-dialog--189f8p9.DropZone--mode-large--189f8p9 > .DropZone--dropZoneBody--189f8p9 {\n max-width: calc(800px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--mode-dialog--189f8p9.DropZone--mode-small--189f8p9 > .DropZone--dropZoneBody--189f8p9 {\n max-width: calc(400px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--mode-drawer--189f8p9 > .DropZone--dropZoneBody--189f8p9 {\n margin: 0 auto;\n max-width: calc(900px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--mode-drawer--189f8p9.DropZone--mode-large--189f8p9 > .DropZone--dropZoneBody--189f8p9 {\n max-width: calc(1200px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--mode-drawer--189f8p9.DropZone--mode-small--189f8p9 > .DropZone--dropZoneBody--189f8p9 {\n max-width: calc(600px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--dropCursor--189f8p9 {\n position: absolute;\n background: #bb79bb;\n display: none;\n pointer-events: none;\n}\n\n.DropZone--dropping--189f8p9 > .DropZone--dropCursor--189f8p9 {\n display: block;\n}\n\n.DropZone--dropCursorHorizontal--189f8p9 {\n height: 2px;\n left: 10px;\n right: 10px;\n margin-top: -1px;\n}\n\n.DropZone--dropCursorVertical--189f8p9 {\n width: 2px;\n margin-left: -1px;\n}\n\n.DropZone--dropCursor--189f8p9::before,\n.DropZone--dropCursor--189f8p9::after {\n position: absolute;\n content: "";\n background: #bb79bb;\n}\n\n.DropZone--dropCursorHorizontal--189f8p9::before,\n.DropZone--dropCursorHorizontal--189f8p9::after {\n top: -4px;\n height: 10px;\n width: 2px;\n}\n\n.DropZone--dropCursorHorizontal--189f8p9::before {\n left: 0;\n}\n\n.DropZone--dropCursorHorizontal--189f8p9::after {\n right: 0;\n}\n\n.DropZone--dropCursorVertical--189f8p9::before,\n.DropZone--dropCursorVertical--189f8p9::after {\n left: -4px;\n width: 10px;\n height: 2px;\n}\n\n.DropZone--dropCursorVertical--189f8p9::before {\n top: 0;\n}\n\n.DropZone--dropCursorVertical--189f8p9::after {\n bottom: 0;\n}\n');var Ae=["type"];function Pe(e){var{nodeUid:t,isRoot:n,separateCanvas:o,isPortalCanvas:i,independentPortalCanvas:d,canvasIndex:s,mountPoint:p,fullscreen:c,delegatedContext:v,dropZoneStyle:f,dropZoneBodyStyle:h,slotContentLayout:E,showOutlineIfEmpty:b,hiddenWrapper:N=!0,emptyClassName:D}=e,O=r.a.useRef(),[y,x]=r.a.useState(null),I=r.a.useRef(),$=re(),T=te(),{nodes:A,edges:P,wrapperNode:k}=ne(),w=N&&n&&!Object(l.isEmpty)(k),L=oe({nodeUid:t,isRoot:n,isWrapper:w}),U=De({nodeUid:t,isRoot:n,doNotExpandTemplates:w,isWrapper:w}),j=d?s>0:i,B=o||d,R=ye(),Z=null!=E?E:g.BLOCK,M=r.a.useMemo(()=>{var e,t;return null!==(e=null===(t=U.find(e=>e.mountPoint===p))||void 0===t?void 0:t.childNodes)&&void 0!==e?e:[]},[U,p]),H=Te(M),q=r.a.useMemo(()=>o?M.filter(e=>Boolean(Number(Boolean(i))^Number(!e.portal))):d?H[Object(l.clamp)(null!=s?s:0,0,H.length-1)]:M,[s,d,i,M,H,o]),G=r.a.useMemo(()=>{var e;return null===(e=q[0])||void 0===e?void 0:e.$$parsedProperties._canvas_},[q]),V=r.a.useCallback(e=>{if(!B)return e;if(q.length>0){var t=q[0===e?0:e-1];return M.findIndex(e=>e===t)+(0===e?0:1)}return j?M.length:0},[B,q,j,M]),z=r.a.useCallback(()=>{if(v){var e,t,n=Oe({nodeUid:v.templateUid,nodes:A,edges:P,doNotExpandTemplates:!0});return{droppingParentUid:v.templateUid,droppingParentInstanceId:A.find(e=>e.$$uid===v.templateUid).instanceId,droppingMountPoint:v.templateMountPoint,droppingChildNodes:null!==(e=null===(t=n.find(e=>e.mountPoint===v.templateMountPoint))||void 0===t?void 0:t.childNodes)&&void 0!==e?e:[],droppingSiblingGroups:n}}return{droppingParentUid:L.$$uid,droppingParentInstanceId:w?k.instanceId:L.instanceId,droppingMountPoint:p,droppingChildNodes:M,droppingSiblingGroups:U}},[v,P,U,p,L,A,M,w,k]),[{isDraggingOverCurrent:W},Y]=Object(C.useDrop)({accept:[u.NODE_TO_ADD,u.NODE_TO_MOVE,u.SNIPPET_TO_APPLY],canDrop:e=>d&&j?0===q.length:e.type===u.NODE_TO_ADD||e.type===u.SNIPPET_TO_APPLY||n||R(e.nodeUid,t),collect:e=>({isDraggingOverCurrent:e.isOver({shallow:!0})&&e.canDrop()}),hover:(e,t)=>{if(t.isOver({shallow:!0})&&t.canDrop()){var{x:n,y:o}=t.getClientOffset();I.current=xe(n,o,O.current.parentElement,O.current),x(I.current)}},drop:(e,t)=>{if(!t.didDrop()){var{type:n}=e,o=m()(e,Ae);!function(e){var{manager:t,type:n,data:o,droppingIndex:r,droppingParentUid:i,droppingParentInstanceId:d,droppingMountPoint:s,droppingChildNodes:l,droppingSiblingGroups:p,isPortalCanvas:c}=e;if(n===u.NODE_TO_ADD){var{brickType:v="brick",brick:g}=o,f=_();t.nodeAdd(a()(a()({},$e({draggingNodeUid:f,draggingNodeId:null,droppingIndex:r,droppingMountPoint:s,droppingSiblingGroups:p})),{},{nodeUid:f,parentUid:i,nodeData:{parent:d,type:v,brick:g,mountPoint:s,bg:!c&&"provider"===v||void 0,portal:c}}))}else if(n===u.SNIPPET_TO_APPLY){var{bricks:h}=o,E=[...new Array(h.length)].map(()=>_());t.snippetApply(a()(a()({},$e({draggingNodeUid:E,draggingNodeId:null,droppingIndex:r,droppingMountPoint:s,droppingSiblingGroups:p})),{},{parentUid:i,nodeDetails:h.map((e,t)=>X({parent:d,parentUid:i,mountPoint:s,nodeUid:E[t],brickConf:e,isPortalCanvas:c}))}))}else if(n===u.NODE_TO_MOVE){var{nodeUid:m,nodeId:C,nodeInstanceId:b}=o,N=l.findIndex(e=>e.$$uid===m);N>=0?r!==N&&r!==N+1&&t.nodeReorder(a()(a()({},$e({draggingNodeUid:m,draggingNodeId:C,draggingIndex:N,droppingIndex:r,droppingMountPoint:s,droppingSiblingGroups:p})),{},{parentUid:i})):t.nodeMove(a()(a()({},$e({draggingNodeUid:m,draggingNodeId:C,droppingIndex:r,droppingMountPoint:s,droppingSiblingGroups:p})),{},{nodeUid:m,parentUid:i,nodeInstanceId:b,nodeData:{parent:d,mountPoint:s}}))}}(a()({type:n,data:o,droppingIndex:V(I.current.index),isPortalCanvas:j,manager:T},z()))}}});r.a.useEffect(()=>{T.updateDroppingStatus(v?v.templateUid:L.$$uid,v?v.templateMountPoint:p,W)},[W,p,T,v,L]);var K=!!v||w||!(L.$$isExpandableTemplate||L.$$isTemplateInternalNode),Q=r.a.useRef(),F=r.a.useCallback(e=>{Q.current=e,K&&Y(e)},[Y,K]),J=r.a.useCallback(e=>{!j&&se(e.target,Q.current)&&(e.preventDefault(),T.contextMenuChange({active:!0,node:L,x:e.clientX,y:e.clientY}))},[j,T,L]);return r.a.createElement("div",{ref:F,className:S(Se.dropZone,n?S(Se.isRoot,(null==G?void 0:G.mode)&&String(G.mode).split(/\s+/g).map(e=>Se["mode-".concat(e)]),{[Se.fullscreen]:c,[Se.hasTabs]:B}):Se.isSlot,{[Se.isPortalCanvas]:j,[Se.dropping]:W,[Se.active]:n&&$.active&&$.node.$$uid===L.$$uid,[Se.showOutlineIfEmpty]:!n&&b&&0===M.length,[Se.slotContentLayoutBlock]:Z===g.BLOCK,[Se.slotContentLayoutInline]:Z===g.INLINE,[Se.slotContentLayoutGrid]:Z===g.GRID}),style:f,onContextMenu:n?J:null},r.a.createElement("div",{ref:O,className:S(Se.dropZoneBody,0===q.length&&D),"data-slot-id":p,style:h},q.map(e=>r.a.createElement(Ne,{key:e.$$uid,node:e,slotContentLayout:Z}))),r.a.createElement("div",{className:S(Se.dropCursor,null!=y&&y.isVertical?Se.dropCursorVertical:Se.dropCursorHorizontal),style:{top:null==y?void 0:y.y,left:null==y?void 0:y.x,height:null==y?void 0:y.height}}))}var ke="SlotContainer--slotContainer--ya4ml4",_e="SlotContainer--slotName--ya4ml4",we="SlotContainer--dropping--ya4ml4";function Le(e){var t,{nodeUid:n,slotName:i,slotContainerStyle:a,dropZoneStyle:d,dropZoneBodyStyle:s,slotContentLayout:l,showOutlineIfEmpty:p,emptyClassName:u}=e,c=oe({nodeUid:n}),v=ue(),g=Object(o.useMemo)(()=>{var e,t=null===(e=c.$$delegatedSlots)||void 0===e?void 0:e.get(i);return 1===(null==t?void 0:t.length)?t[0]:null},[c,i]);return r.a.createElement("div",{className:S(ke,{[we]:null===(t=v.get(g?g.templateUid:n))||void 0===t?void 0:t.get(g?g.templateMountPoint:i)}),style:a},r.a.createElement("div",{className:_e},g?g.templateMountPoint:i),r.a.createElement(Pe,{nodeUid:n,mountPoint:i,delegatedContext:g,dropZoneStyle:d,dropZoneBodyStyle:s,slotContentLayout:l,showOutlineIfEmpty:p,emptyClassName:u}))}ae(".SlotContainer--slotContainer--ya4ml4 {\n position: relative;\n}\n\n.SlotContainer--slotName--ya4ml4 {\n position: absolute;\n top: -23px;\n height: calc(23px + var(--editor-brick-border-radius));\n line-height: 20px;\n color: var(--text-color-secondary);\n padding: 0 5px;\n border-radius: 2px;\n color: #737373;\n white-space: nowrap;\n visibility: hidden;\n pointer-events: none;\n border: 1px dashed var(--editor-brick-slot-stroke-color);\n background: var(--editor-brick-slot-bg);\n}\n\n.SlotContainer--slotContainer--ya4ml4.SlotContainer--dropping--ya4ml4 > .SlotContainer--slotName--ya4ml4 {\n visibility: visible;\n}\n");var Ue=r.a.memo(Ze),je=Symbol.for("__BRICK_NEXT_BUILDER_CONTEXT_INSTANCE__");function Be(){var e=window;return e[je]||(e[je]={manager:new Q}),e[je]}var Re=0;function Ze(e){var{children:t}=e,n=Be();return r.a.useEffect(()=>(Re++,()=>{0===--Re&&(window[je]=null)}),[]),r.a.createElement(ee.Provider,{value:n},t)}function Me(e,t){return y()(null,(function(n,o){return{F:class extends o{constructor(){super(...arguments),n(this)}},d:[{kind:"get",static:!0,key:"selfLayout",value:function(){return null==t?void 0:t.selfLayout}},{kind:"field",decorators:[Object(D.property)({type:Number})],key:"nodeUid",value:void 0},{kind:"field",decorators:[Object(D.property)({attribute:!1})],key:"editorProps",value:void 0},{kind:"method",key:"connectedCallback",value:function(){if(this.style.display||(this.style.display="block"),null!=t&&t.brickStyle)for(var[e,n]of Object.entries(t.brickStyle))this.style[e]=n;this._render()}},{kind:"method",key:"disconnectedCallback",value:function(){I.a.unmountComponentAtNode(this)}},{kind:"method",key:"_render",value:function(){this.isConnected&&this.nodeUid&&I.a.render(r.a.createElement(D.BrickWrapper,null,r.a.createElement(Ue,null,r.a.createElement(C.DndProvider,{backend:$.HTML5Backend},r.a.createElement(e,{nodeUid:this.nodeUid,editorProps:this.editorProps})))),this)}}]}}),D.UpdatingElement)}var He=Object(o.createContext)({});function qe(e){var{nodeUid:t,isRoot:n,doNotExpandTemplates:r}=e,{rootId:i,edges:a}=ne(),d=n?i:t;return Object(o.useMemo)(()=>{var e=new Set,t=Object(l.sortBy)(a.filter(e=>e.parent===d&&(r?!e.$$isTemplateInternal:!e.$$isTemplateDelegated)),[e=>e.sort]);for(var n of t)e.add(n.mountPoint);return Array.from(e)},[d,a,r])}function Ge(e){var{nodes:t,edges:n}=ne();return Object(o.useMemo)(()=>{var o=n.find(t=>t.child===e&&!t.$$isTemplateExpanded).parent;return t.find(e=>e.$$uid===o)},[n,e,t])}function Ve(){var e=te(),[t,n]=Object(o.useState)(e.getRouteList());return Object(o.useEffect)(()=>e.onRouteListChange(()=>{n(e.getRouteList())}),[e]),t}function ze(){var e=te(),[t,n]=Object(o.useState)(e.getActiveNodeUid());return Object(o.useEffect)(()=>e.onActiveNodeChange(()=>{n(e.getActiveNodeUid())}),[e]),t}function We(e,t){var n=te(),[r,i]=Object(o.useState)(!t&&n.isOutlineEnabled(e));return Object(o.useEffect)(()=>{if(!t)return n.onOutlineEnabledNodesChange(()=>{i(n.isOutlineEnabled(e))})},[t,n,e]),r}},XuQu:function(e,t){e.exports=dll},ZR4k:function(e,t,n){e.exports=n("XuQu")("ZR4k")},i8i4:function(e,t,n){e.exports=n("XuQu")("i8i4")},lSNA:function(e,t,n){e.exports=n("XuQu")("lSNA")},q1tI:function(e,t,n){e.exports=n("/8r5")("q1tI")},qJlv:function(e,t,n){e.exports=n("/8r5")("qJlv")},tYg3:function(e,t,n){e.exports=n("XuQu")("tYg3")},yXPU:function(e,t,n){e.exports=n("XuQu")("yXPU")}});
8
- //# sourceMappingURL=dll-of-editor-bricks-helper.c7439882.js.map