@next-core/brick-container 2.95.8 → 2.96.0

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,gGAE7BC,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.a6060482ce67ae662908.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,E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AA2B,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.f55c93c8b78126c986eb.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.af3356b91578130626ac.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.63980206.js"></script><script src="polyfill.5f60d909121d6c84d42d.js"></script><script src="preview.a6060482ce67ae662908.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.af3356b91578130626ac.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.205b1489.js"></script><script src="polyfill.5f60d909121d6c84d42d.js"></script><script src="preview.f55c93c8b78126c986eb.js"></script></body></html>
@@ -0,0 +1,2 @@
1
+ (window.webpackJsonp_name_=window.webpackJsonp_name_||[]).push([[35],{PuFu:function(t,e,r){(function(t){(()=>{"use strict";function e(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}var r,n,o;!function(t){t.AJAX_ERROR="ajax",t.RESOURCE_ERROR="resource",t.VUE_ERROR="vue",t.PROMISE_ERROR="promise",t.JS_ERROR="js",t.UNKNOWN_ERROR="unknown"}(r||(r={})),function(t){t.INFO="Info",t.WARNING="Warning",t.ERROR="Error"}(n||(n={})),function(t){t.ERROR="/browser/errorLog",t.ERRORS="/browser/errorLogs",t.PERF="/browser/perfData",t.SEGMENT="/v3/segment",t.SEGMENTS="/v3/segments"}(o||(o={}));var i,a="Http",s="Exit";!function(t){t[t.OPENED=1]="OPENED",t[t.DONE=4]="DONE"}(i||(i={}));var c=10001;const u=function(){function t(t,e){this.url="","ERROR"===t?this.url=e+o.ERROR:"ERRORS"===t?this.url=e+o.ERRORS:"SEGMENT"===t?this.url=e+o.SEGMENT:"SEGMENTS"===t?this.url=e+o.SEGMENTS:"PERF"===t&&(this.url=e+o.PERF)}return t.prototype.sendByFetch=function(t){if(delete t.collector,this.url){var e=new Request(this.url,{method:"POST",body:JSON.stringify(t)});fetch(e).then((function(t){if(t.status>=400||0===t.status)throw new Error("Something went wrong on api server!")})).catch((function(t){console.error(t)}))}},t.prototype.sendByXhr=function(t){if(this.url){var e=new XMLHttpRequest;e.open("post",this.url,!0),e.setRequestHeader("Content-Type","application/json"),e.onreadystatechange=function(){4===e.readyState&&e.status<400&&console.log("Report successfully")},e.send(JSON.stringify(t))}},t.prototype.sendByBeacon=function(t){this.url&&("function"!=typeof navigator.sendBeacon?this.sendByXhr(t):navigator.sendBeacon(this.url,new Blob([JSON.stringify(t)],{type:"application/json"})))},t}(),l=new(function(){function t(){this.queues=[],this.collector=""}return t.prototype.addTask=function(t,e){this.queues.push(t),this.collector=e},t.prototype.fireTasks=function(){this.queues&&this.queues.length&&(new u("ERRORS",this.collector).sendByXhr(this.queues),this.queues=[])},t.prototype.finallyFireTasks=function(){var t=this;window.addEventListener("beforeunload",(function(){t.queues.length&&new u("ERRORS",t.collector).sendByBeacon(t.queues)}))},t}());var p,f={};const h=function(){function t(){this.logInfo={uniqueId:"",service:"",serviceVersion:"",pagePath:"",category:r.UNKNOWN_ERROR,grade:n.INFO,errorUrl:"",line:0,col:0,message:"",firstReportedError:!1,collector:""}}return t.prototype.traceInfo=function(t){var e;this.logInfo=t||this.logInfo;var n=[r.AJAX_ERROR,r.RESOURCE_ERROR,r.UNKNOWN_ERROR];f[location.href]||n.includes(this.logInfo.category)||((e={})[location.href]=!0,f=e,this.logInfo.firstReportedError=!0);var o=this.logInfo.collector;delete this.logInfo.collector,l.addTask(this.logInfo,o),l.finallyFireTasks(),p||(p=setInterval((function(){l.fireTasks()}),6e4))},t}();var g,d=(g=function(t,e){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),v=function(){return(v=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};const y=new(function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.infoOpt={service:"",pagePath:"",serviceVersion:""},e}return d(o,t),o.prototype.handleErrors=function(t){var o=this;this.infoOpt=t,window.onerror=function(i,a,s,c,u){o.logInfo=v(v({},o.infoOpt),{uniqueId:e(),category:r.JS_ERROR,grade:n.ERROR,errorUrl:a,line:s,col:c,message:i,collector:t.collector,stack:u?u.stack:""}),o.traceInfo()}},o.prototype.setOptions=function(t){this.infoOpt=t},o}(h));var m=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),O=function(){return(O=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};const w=new(function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.infoOpt={service:"",pagePath:"",serviceVersion:""},e}return m(o,t),o.prototype.handleErrors=function(t){var o=this;this.infoOpt=t,window.addEventListener("unhandledrejection",(function(i){try{var a="";if(!i||!i.reason)return;i.reason.config&&i.reason.config.url&&(a=i.reason.config.url),o.logInfo=O(O({},o.infoOpt),{uniqueId:e(),category:r.PROMISE_ERROR,grade:n.ERROR,errorUrl:a||location.href,message:i.reason.message,stack:i.reason.stack,collector:t.collector}),o.traceInfo()}catch(t){console.log(t)}}))},o.prototype.setOptions=function(t){this.infoOpt=t},o}(h));var E=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),R=function(){return(R=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};const S=new(function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.infoOpt={service:"",pagePath:"",serviceVersion:""},e}return E(i,t),i.prototype.handleError=function(t){var i=this;window.XMLHttpRequest&&(this.infoOpt=t,window.addEventListener("xhrReadyStateChange",(function(a){var s=a.detail;4===s.readyState&&s.getRequestConfig[1]!==t.collector+o.ERRORS&&(0!==s.status&&s.status<400||(i.logInfo=R(R({},i.infoOpt),{uniqueId:e(),category:r.AJAX_ERROR,grade:n.ERROR,errorUrl:s.getRequestConfig[1],message:"status: ".concat(s.status,"; statusText: ").concat(s.statusText,";"),collector:t.collector,stack:s.responseText}),i.traceInfo()))})))},i.prototype.setOptions=function(t){this.infoOpt=t},i}(h));var b=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),T=function(){return(T=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};const I=new(function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.infoOpt={service:"",pagePath:"",serviceVersion:""},e}return b(o,t),o.prototype.handleErrors=function(t){var o=this;this.infoOpt=t,window.addEventListener("error",(function(i){try{if(!i)return;var a=i.target;if(!(a instanceof HTMLScriptElement||a instanceof HTMLLinkElement||a instanceof HTMLImageElement))return;o.logInfo=T(T({},o.infoOpt),{uniqueId:e(),category:r.RESOURCE_ERROR,grade:"IMG"===a.tagName?n.WARNING:n.ERROR,errorUrl:a.src||a.href||location.href,message:"load ".concat(a.tagName," resource error"),collector:t.collector,stack:"load ".concat(a.tagName," resource error")}),o.traceInfo()}catch(t){throw t}}))},o.prototype.setOptions=function(t){this.infoOpt=t},o}(h));var P=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_=function(){return(_=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};const x=new(function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.infoOpt={service:"",pagePath:"",serviceVersion:""},e}return P(o,t),o.prototype.handleErrors=function(t,o){var i=this;this.infoOpt=t,o&&o.config&&(o.config.errorHandler=function(o,a,s){try{i.logInfo=_(_({},i.infoOpt),{uniqueId:e(),category:r.VUE_ERROR,grade:n.ERROR,errorUrl:location.href,message:s,collector:t.collector,stack:o.stack}),i.traceInfo()}catch(o){throw o}})},o.prototype.setOptions=function(t){this.infoOpt=t},o}(h));var C=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),A=function(){return(A=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};const N=new(function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.infoOpt={service:"",pagePath:"",serviceVersion:""},e}return C(o,t),o.prototype.handleErrors=function(t,o){this.infoOpt=t,this.logInfo=A(A({},this.infoOpt),{uniqueId:e(),category:r.JS_ERROR,grade:n.ERROR,errorUrl:o.name||location.href,message:o.message,collector:t.collector||location.origin,stack:o.stack}),this.traceInfo()},o}(h)),j=function(){function t(){}return t.prototype.getPerfTiming=function(){try{var t=window.performance.timing;if("function"==typeof window.PerformanceNavigationTiming){var e=performance.getEntriesByType("navigation")[0];e&&(t=e)}return{redirectTime:void 0!==t.navigationStart?parseInt(String(t.fetchStart-t.navigationStart),10):void 0!==t.redirectEnd?parseInt(String(t.redirectEnd-t.redirectStart),10):0,dnsTime:parseInt(String(t.domainLookupEnd-t.domainLookupStart),10),ttfbTime:parseInt(String(t.responseStart-t.requestStart),10),tcpTime:parseInt(String(t.connectEnd-t.connectStart),10),transTime:parseInt(String(t.responseEnd-t.responseStart),10),domAnalysisTime:parseInt(String(t.domInteractive-t.responseEnd),10),fptTime:parseInt(String(t.responseEnd-t.fetchStart),10),domReadyTime:parseInt(String(t.domContentLoadedEventEnd-t.fetchStart),10),loadPageTime:parseInt(String(t.loadEventStart-t.fetchStart),10),resTime:parseInt(String(t.loadEventStart-t.domContentLoadedEventEnd),10),sslTime:"https:"===location.protocol&&t.secureConnectionStart>0?parseInt(String(t.connectEnd-t.secureConnectionStart),10):void 0,ttlTime:parseInt(String(t.domInteractive-t.fetchStart),10),firstPackTime:parseInt(String(t.responseStart-t.domainLookupStart),10),fmpTime:0}}catch(t){throw t}},t}();var k,M=function(t,e){return window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.currentStyle[e]};!function(t){t[t.SVG=2]="SVG",t[t.IMG=2]="IMG",t[t.CANVAS=4]="CANVAS",t[t.OBJECT=4]="OBJECT",t[t.EMBED=4]="EMBED",t[t.VIDEO=4]="VIDEO"}(k||(k={}));var L=performance.now(),V=["SCRIPT","STYLE","META","HEAD","LINK"],F=window.innerWidth,D=window.innerHeight;const q=function(){function t(){this.fmpTime=0,this.statusCollector=[],this.flag=!0,this.observer=null,this.callbackCount=0,this.entries={},performance&&performance.getEntries?this.initObserver():console.log("your browser do not support performance.getEntries")}return t.prototype.getFirstSnapShot=function(){var t=performance.now(),e=document.body;e&&this.setTag(e,this.callbackCount),this.statusCollector.push({time:t})},t.prototype.initObserver=function(){var t=this;this.getFirstSnapShot(),this.observer=new MutationObserver((function(){t.callbackCount+=1;var e=performance.now(),r=document.body;r&&t.setTag(r,t.callbackCount),t.statusCollector.push({time:e})})),this.observer.observe(document,{childList:!0,subtree:!0}),this.calculateFinalScore()},t.prototype.calculateFinalScore=function(){var t=this;if(this.flag&&MutationObserver)if(this.checkNeedCancel(L)){this.observer.disconnect(),this.flag=!1;for(var e=null,r=0,n=this.getTreeScore(document.body).dpss;r<n.length;r++){var o=n[r];e&&e.st?e.st<o.st&&(e=o):e=o}if(performance.getEntries().forEach((function(e){t.entries[e.name]=e.responseEnd})),!e)return!1;var i=this.filterResult(e.els),a=this.getFmpTime(i);this.fmpTime=a}else setTimeout((function(){t.calculateFinalScore()}),2e3)},t.prototype.getFmpTime=function(t){for(var e=0,r=0,n=t;r<n.length;r++){var o=n[r],i=0;if(1===o.weight){var a=parseInt(o.ele.getAttribute("fmp_c"),10);i=this.statusCollector[a]&&this.statusCollector[a].time}else if(2===o.weight)if("IMG"===o.ele.tagName)i=this.entries[o.ele.src];else if("SVG"===o.ele.tagName)a=parseInt(o.ele.getAttribute("fmp_c"),10),i=this.statusCollector[a]&&this.statusCollector[a].time;else{var s=M(o.ele,"background-image").match(/url\(\"(.*?)\"\)/),c="";s&&s[1]&&((c=s[1]).includes("http")||(c=location.protocol+s[1])),i=this.entries[c]}else 4===o.weight&&("CANVAS"===o.ele.tagName?(a=parseInt(o.ele.getAttribute("fmp_c"),10),i=this.statusCollector[a]&&this.statusCollector[a].time):"VIDEO"===o.ele.tagName&&((i=this.entries[o.ele.src])||(i=this.entries[o.ele.poster])));"number"!=typeof i&&(i=0),e<i&&(e=i)}return e},t.prototype.filterResult=function(t){if(1===t.length)return t;var e=0;t.forEach((function(t){e+=t.st}));var r=e/t.length;return t.filter((function(t){return t.st>r}))},t.prototype.checkNeedCancel=function(t){var e=performance.now()-t,r=this.statusCollector.length>0?this.statusCollector[this.statusCollector.length-1].time:0;return e>3e3||e-r>1e3},t.prototype.getTreeScore=function(t){if(!t)return{};for(var e=[],r=0,n=t.children;r<n.length;r++){var o=n[r];if(o.getAttribute("fmp_c")){var i=this.getTreeScore(o);i.st&&e.push(i)}}return this.calcaulteGrades(t,e)},t.prototype.calcaulteGrades=function(t,e){var r=t.getBoundingClientRect(),n=r.width,o=r.height,i=r.left,a=r.top,s=!0;(D<a||F<i)&&(s=!1);var c=0;e.forEach((function(t){c+=t.st}));var u=Number(k[t.tagName])||1;1===u&&M(t,"background-image")&&"initial"!==M(t,"background-image")&&"none"!==M(t,"background-image")&&(u=k.IMG);var l=s?n*o*u:0,p=[{ele:t,st:l,weight:u}],f=t,h=this.calculateAreaParent(t);if(c>l*h||0===h){l=c,p=[];for(var g=0,d=e;g<d.length;g++){var v=d[g];p=p.concat(v.els)}}return{dpss:e,st:l,els:p,root:f}},t.prototype.calculateAreaParent=function(t){var e=t.getBoundingClientRect(),r=e.left,n=e.right,o=e.top,i=e.bottom,a=e.width,s=e.height,c=F,u=D,l=n-r+(c-0)-(Math.max(n,c)-Math.min(r,0)),p=i-o+(u-0)-(Math.max(i,u)-Math.min(o,0));return l<=0||p<=0?0:l*p/(a*s)},t.prototype.setTag=function(t,e){var r=t.tagName;if(-1===V.indexOf(r)){var n=t.children;if(n&&n.length>0)for(var o=n.length-1;o>=0;o--){var i=n[o];if(null===i.getAttribute("fmp_c")){var a=i.getBoundingClientRect(),s=a.left,c=a.top,u=a.width,l=a.height;if(D<c||F<s||0===u||0===l)continue;i.setAttribute("fmp_c","".concat(e))}this.setTag(i,e)}}},t}();var U=function(){return(U=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};const B=new(function(){function t(){this.perfConfig={perfDetail:{}}}return t.prototype.getPerf=function(t){var e=this;this.recordPerf(t),t.enableSPA&&window.addEventListener("hashchange",(function(){e.recordPerf(t)}),!1)},t.prototype.recordPerf=function(t){return e=this,void 0,n=function(){var e,r=this;return function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,(function(n){switch(n.label){case 0:return e={fmpTime:void 0},t.autoTracePerf&&t.useFmp?[4,new q]:[3,2];case 1:e=n.sent(),n.label=2;case 2:return setTimeout((function(){t.autoTracePerf&&(r.perfConfig.perfDetail=(new j).getPerfTiming());var n=t.autoTracePerf?U(U({},r.perfConfig.perfDetail),{fmpTime:t.useFmp?parseInt(String(e.fmpTime),10):void 0}):void 0,o=U(U({},n),{pagePath:t.pagePath,serviceVersion:t.serviceVersion,service:t.service});new u("PERF",t.collector).sendByXhr(o),r.clearPerf()}),6e3),[2]}}))},new((r=void 0)||(r=Promise))((function(t,o){function i(t){try{s(n.next(t))}catch(t){o(t)}}function a(t){try{s(n.throw(t))}catch(t){o(t)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(t){t(n)}))).then(i,a)}s((n=n.apply(e,[])).next())}));var e,r,n},t.prototype.clearPerf=function(){window.performance&&window.performance.clearResourceTimings&&(window.performance.clearResourceTimings(),this.perfConfig={perfDetail:{}})},t}()),G="function"==typeof btoa,H="function"==typeof t,X=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder?new TextEncoder:void 0),J=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),W=((t=>{let e={};t.forEach((t,r)=>e[t]=r)})(J),String.fromCharCode.bind(String)),K=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),t=>t.replace(/=/g,"").replace(/[+\/]/g,t=>"+"==t?"-":"_")),Y=G?t=>btoa(t):H?e=>t.from(e,"binary").toString("base64"):t=>{let e,r,n,o,i="";const a=t.length%3;for(let a=0;a<t.length;){if((r=t.charCodeAt(a++))>255||(n=t.charCodeAt(a++))>255||(o=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|o,i+=J[e>>18&63]+J[e>>12&63]+J[e>>6&63]+J[63&e]}return a?i.slice(0,a-3)+"===".substring(a):i},z=H?e=>t.from(e).toString("base64"):t=>{let e=[];for(let r=0,n=t.length;r<n;r+=4096)e.push(W.apply(null,t.subarray(r,r+4096)));return Y(e.join(""))},Q=t=>{if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?W(192|e>>>6)+W(128|63&e):W(224|e>>>12&15)+W(128|e>>>6&63)+W(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return W(240|e>>>18&7)+W(128|e>>>12&63)+W(128|e>>>6&63)+W(128|63&e)},Z=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,$=H?e=>t.from(e,"utf8").toString("base64"):X?t=>z(X.encode(t)):t=>Y(t.replace(Z,Q)),tt=(t,e=!1)=>e?K($(t)):$(t);var et=function(){return(et=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},rt=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},nt={};function ot(t,r){it(t);var n=window.XMLHttpRequest,u=XMLHttpRequest.prototype.send,l=XMLHttpRequest.prototype.open;if(u&&l){n.getRequestConfig=[],window.XMLHttpRequest=function(){var t=new n;return t.addEventListener("readystatechange",(function(){f.call(this,"xhrReadyStateChange")}),!1),t.open=function(t,e,r,n,o){return this.getRequestConfig=arguments,l.apply(this,arguments)},t.send=function(t){return u.apply(this,arguments)},t};var p=[];window.addEventListener("xhrReadyStateChange",(function(t){var n={traceId:"",service:nt.service,spans:[],serviceInstance:nt.serviceVersion,traceSegmentId:""},u=t.detail.readyState,l=t.detail.getRequestConfig,f={};if(l[1].startsWith("http://")||l[1].startsWith("https://")?f=new URL(l[1]):l[1].startsWith("//")?f=new URL("".concat(window.location.protocol).concat(l[1])):(f=new URL(window.location.href)).pathname=l[1],!nt.noTraceOrigins.some((function(t){if("string"==typeof t){if(t===f.origin)return!0}else if(t instanceof RegExp&&t.test(f.origin))return!0}))){var h=new URL(nt.collector),g="/"===h.pathname?f.pathname:f.pathname.replace(new RegExp("^".concat(h.pathname)),"");if(![o.ERROR,o.ERRORS,o.PERF,o.SEGMENTS].includes(g)||nt.traceSDKInternal){if(u===i.OPENED){var d=e(),v=e();p.push({event:t.detail,startTime:(new Date).getTime(),traceId:d,traceSegmentId:v});var y=String(tt(d)),m=String(tt(v)),O=String(tt(n.service)),w=String(tt(n.serviceInstance)),E=String(tt(nt.pagePath)),R=String(tt(f.host)),S=n.spans.length,b="".concat(1,"-").concat(y,"-").concat(m,"-").concat(S,"-").concat(O,"-").concat(w,"-").concat(E,"-").concat(R);t.detail.setRequestHeader("sw8",b)}if(u===i.DONE){for(var T=(new Date).getTime(),I=0;I<p.length;I++)if(p[I].event.readyState===i.DONE){var P={};p[I].event.status&&(P=new URL(p[I].event.responseURL));var _=[{key:"http.method",value:l[0]},{key:"url",value:p[I].event.responseURL||"".concat(f.protocol,"//").concat(f.host).concat(f.pathname)}],x={operationName:nt.pagePath,startTime:p[I].startTime,endTime:T,spanId:n.spans.length,spanLayer:a,spanType:s,isError:0===t.detail.status||t.detail.status>=400,parentSpanId:n.spans.length-1,componentId:c,peer:P.host,tags:nt.detailMode?nt.customTags?rt(rt([],_,!0),nt.customTags,!0):_:void 0};(n=et(et({},n),{traceId:p[I].traceId,traceSegmentId:p[I].traceSegmentId})).spans.push(x),p.splice(I,1)}r.push(n)}}}}))}else console.error("Tracing is not supported");function f(t){var e=new CustomEvent(t,{detail:this});window.dispatchEvent(e)}}function it(t){nt=et(et({},nt),t)}var at=function(){return(at=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},st=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function s(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}c((n=n.apply(t,e||[])).next())}))},ct=function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},ut=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},lt={};function pt(t){lt=at(at({},lt),t)}function ft(t){it(t),pt(t)}var ht=function(){return(ht=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};const gt={customOptions:{collector:location.origin,jsErrors:!0,apiErrors:!0,resourceErrors:!0,autoTracePerf:!0,useFmp:!1,enableSPA:!1,traceSDKInternal:!1,detailMode:!0,noTraceOrigins:[],traceTimeInterval:6e4},register:function(t){var i,l;this.customOptions=ht(ht({},this.customOptions),t),this.validateOptions(),this.catchErrors(this.customOptions),this.customOptions.enableSPA||this.performance(this.customOptions),ot(i=this.customOptions,l=[]),function(t,i){var u=this,l=window.fetch;pt(t),window.fetch=function(){for(var t=[],p=0;p<arguments.length;p++)t[p]=arguments[p];return st(u,void 0,void 0,(function(){var u,p,f,g,d,v,y,m,O,w,E,R,S,b,T,I,P,_,x,C,A,N,j,k;return ct(this,(function(M){switch(M.label){case 0:return u=(new Date).getTime(),p=e(),f=e(),g={traceId:"",service:lt.service,spans:[],serviceInstance:lt.serviceVersion,traceSegmentId:""},d={},"[object Request]"===Object.prototype.toString.call(t[0])?d=new URL(t[0].url):t[0].startsWith("http://")||t[0].startsWith("https://")?d=new URL(t[0]):t[0].startsWith("//")?d=new URL("".concat(window.location.protocol).concat(t[0])):(d=new URL(window.location.href)).pathname=t[0],v=lt.noTraceOrigins.some((function(t){if("string"==typeof t){if(t===d.origin)return!0}else if(t instanceof RegExp&&t.test(d.origin))return!0})),y=new URL(lt.collector),m="/"===y.pathname?d.pathname:d.pathname.replace(new RegExp("^".concat(y.pathname)),""),O=[o.ERROR,o.ERRORS,o.PERF,o.SEGMENTS],w=O.includes(m),(E=!v||w&&lt.traceSDKInternal)&&(R=String(tt(p)),S=String(tt(f)),b=String(tt(g.service)),T=String(tt(g.serviceInstance)),I=String(tt(lt.pagePath)),P=String(tt(d.host)),_=g.spans.length,x="".concat(1,"-").concat(R,"-").concat(S,"-").concat(_,"-").concat(b,"-").concat(T,"-").concat(I,"-").concat(P),t[1]||(t[1]={}),t[1].headers||(t[1].headers={}),t[1].headers.sw8=x),[4,l.apply(void 0,t)];case 1:C=M.sent();try{C&&(0===C.status||C.status>=400)&&(A={uniqueId:e(),service:lt.service,serviceVersion:lt.serviceVersion,pagePath:lt.pagePath,category:r.AJAX_ERROR,grade:n.ERROR,errorUrl:C&&C.url||"".concat(d.protocol,"//").concat(d.host).concat(d.pathname),message:"status: ".concat(C?C.status:0,"; statusText: ").concat(C&&C.statusText,";"),collector:lt.collector,stack:C.statusText},(new h).traceInfo(A)),E&&(N=[{key:"http.method",value:t[1].method||"GET"},{key:"url",value:C&&C.url||"".concat(d.protocol,"//").concat(d.host).concat(d.pathname)}],j=(new Date).getTime(),k={operationName:lt.pagePath,startTime:u,endTime:j,spanId:g.spans.length,spanLayer:a,spanType:s,isError:C&&(0===C.status||C.status>=400),parentSpanId:g.spans.length-1,componentId:c,peer:d.host,tags:lt.detailMode?lt.customTags?ut(ut([],N,!0),lt.customTags,!0):N:void 0},(g=at(at({},g),{traceId:p,traceSegmentId:f})).spans.push(k),i.push(g))}catch(t){throw t}return[2,C.clone()]}}))}))}}(i,l),window.addEventListener("beforeunload",(function(){l.length&&new u("SEGMENTS",i.collector).sendByBeacon(l)})),setInterval((function(){l.length&&(new u("SEGMENTS",i.collector).sendByXhr(l),l.splice(0,l.length))}),i.traceTimeInterval)},performance:function(t){"complete"===document.readyState?B.getPerf(t):window.addEventListener("load",(function(){B.getPerf(t)}),!1)},catchErrors:function(t){var e=t.service,r=t.pagePath,n=t.serviceVersion,o=t.collector;t.jsErrors&&(y.handleErrors({service:e,pagePath:r,serviceVersion:n,collector:o}),w.handleErrors({service:e,pagePath:r,serviceVersion:n,collector:o}),t.vue&&x.handleErrors({service:e,pagePath:r,serviceVersion:n,collector:o},t.vue)),t.apiErrors&&S.handleError({service:e,pagePath:r,serviceVersion:n,collector:o}),t.resourceErrors&&I.handleErrors({service:e,pagePath:r,serviceVersion:n,collector:o})},setPerformance:function(t){this.customOptions=ht(ht(ht({},this.customOptions),t),{useFmp:!1}),this.validateOptions(),this.performance(this.customOptions);var e=this.customOptions,r=e.service,n=e.pagePath,o=e.serviceVersion,i=e.collector;this.customOptions.jsErrors&&(y.setOptions({service:r,pagePath:n,serviceVersion:o,collector:i}),w.setOptions({service:r,pagePath:n,serviceVersion:o,collector:i}),this.customOptions.vue&&x.setOptions({service:r,pagePath:n,serviceVersion:o,collector:i})),this.customOptions.apiErrors&&S.setOptions({service:r,pagePath:n,serviceVersion:o,collector:i}),this.customOptions.resourceErrors&&I.setOptions({service:r,pagePath:n,serviceVersion:o,collector:i}),ft(this.customOptions)},reportFrameErrors:function(t,e){N.handleErrors(t,e)},validateTags:function(t){if(!t)return!1;if(!Array.isArray(t))return this.customOptions.customTags=void 0,console.error("customTags error"),!1;for(var e=!0,r=0,n=t;r<n.length;r++){var o=n[r];o&&o.key&&o.value||(e=!1)}return!!e||(this.customOptions.customTags=void 0,console.error("customTags error"),!1)},validateOptions:function(){var t=this.customOptions,e=t.collector,r=t.service,n=t.pagePath,o=t.serviceVersion,i=t.jsErrors,a=t.apiErrors,s=t.resourceErrors,c=t.autoTracePerf,u=t.useFmp,l=t.enableSPA,p=t.traceSDKInternal,f=t.detailMode,h=t.noTraceOrigins,g=t.traceTimeInterval,d=t.customTags,v=t.vue;this.validateTags(d),"string"!=typeof e&&(this.customOptions.collector=location.origin),"string"!=typeof r&&(this.customOptions.service=""),"string"!=typeof n&&(this.customOptions.pagePath=""),"string"!=typeof o&&(this.customOptions.serviceVersion=""),"boolean"!=typeof i&&(this.customOptions.jsErrors=!0),"boolean"!=typeof a&&(this.customOptions.apiErrors=!0),"boolean"!=typeof s&&(this.customOptions.resourceErrors=!0),"boolean"!=typeof c&&(this.customOptions.autoTracePerf=!0),"boolean"!=typeof u&&(this.customOptions.useFmp=!1),"boolean"!=typeof l&&(this.customOptions.enableSPA=!1),"boolean"!=typeof p&&(this.customOptions.traceSDKInternal=!1),"boolean"!=typeof f&&(this.customOptions.detailMode=!0),"boolean"!=typeof f&&(this.customOptions.detailMode=!0),Array.isArray(h)||(this.customOptions.noTraceOrigins=[]),"number"!=typeof g&&(this.customOptions.traceTimeInterval=6e4),"function"!=typeof v&&(this.customOptions.vue=void 0)},setCustomTags:function(t){var e=ht(ht({},this.customOptions),{customTags:t});this.validateTags(t)&&ft(e)}};window.ClientMonitor=gt})()}).call(this,r("tjlA").Buffer)},"nE+1":function(t,e,r){"use strict";r.r(e);r("PuFu");e.default=ClientMonitor}}]);
2
+ //# sourceMappingURL=skywalking-client-js.52d81193.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack://[name]/skywalking-client-js/src/services/uuid.ts","webpack://[name]/skywalking-client-js/src/services/constant.ts","webpack://[name]/skywalking-client-js/src/services/report.ts","webpack://[name]/skywalking-client-js/src/services/task.ts","webpack://[name]/skywalking-client-js/src/services/base.ts","webpack://[name]/skywalking-client-js/src/errors/js.ts","webpack://[name]/skywalking-client-js/src/errors/promise.ts","webpack://[name]/skywalking-client-js/src/errors/ajax.ts","webpack://[name]/skywalking-client-js/src/errors/resource.ts","webpack://[name]/skywalking-client-js/src/errors/vue.ts","webpack://[name]/skywalking-client-js/src/errors/frames.ts","webpack://[name]/skywalking-client-js/src/performance/perf.ts","webpack://[name]/skywalking-client-js/src/performance/fmp.ts","webpack://[name]/skywalking-client-js/src/performance/index.ts","webpack://[name]/skywalking-client-js/node_modules/js-base64/base64.mjs","webpack://[name]/skywalking-client-js/src/trace/interceptors/xhr.ts","webpack://[name]/skywalking-client-js/src/trace/interceptors/fetch.ts","webpack://[name]/skywalking-client-js/src/trace/segment.ts","webpack://[name]/skywalking-client-js/src/monitor.ts","webpack://[name]/skywalking-client-js/src/index.ts","webpack://[name]/./node_modules/skywalking-client-js/index.js"],"names":["uuid","replace","c","r","Math","random","toString","ErrorsCategory","GradeTypeEnum","ReportTypes","AJAX_ERROR","RESOURCE_ERROR","VUE_ERROR","PROMISE_ERROR","JS_ERROR","UNKNOWN_ERROR","INFO","WARNING","ERROR","ERRORS","PERF","SEGMENT","SEGMENTS","ReadyStatus","SpanLayer","SpanType","OPENED","DONE","ComponentId","type","collector","url","this","sendByFetch","data","sendRequest","Request","method","body","JSON","stringify","fetch","then","response","status","Error","catch","error","console","sendByXhr","xhr","XMLHttpRequest","open","setRequestHeader","onreadystatechange","readyState","log","send","sendByBeacon","navigator","sendBeacon","Blob","queues","addTask","push","fireTasks","length","finallyFireTasks","window","addEventListener","t","interval","pageHasjsError","logInfo","uniqueId","service","serviceVersion","pagePath","category","grade","errorUrl","line","col","message","firstReportedError","traceInfo","ExcludeErrorTypes","location","href","includes","setInterval","infoOpt","handleErrors","options","onerror","stack","setOptions","opt","event","reason","config","handleError","detail","getRequestConfig","statusText","responseText","target","HTMLScriptElement","HTMLLinkElement","HTMLImageElement","tagName","src","Vue","errorHandler","vm","info","name","origin","getPerfTiming","timing","performance","PerformanceNavigationTiming","nt2Timing","getEntriesByType","redirectTime","navigationStart","parseInt","String","fetchStart","redirectEnd","redirectStart","dnsTime","domainLookupEnd","domainLookupStart","ttfbTime","responseStart","requestStart","tcpTime","connectEnd","connectStart","transTime","responseEnd","domAnalysisTime","domInteractive","fptTime","domReadyTime","domContentLoadedEventEnd","loadPageTime","loadEventStart","resTime","sslTime","protocol","secureConnectionStart","ttlTime","firstPackTime","fmpTime","e","ELE_WEIGHT","getStyle","element","attr","getComputedStyle","currentStyle","SVG","IMG","CANVAS","OBJECT","EMBED","VIDEO","START_TIME","now","IGNORE_TAG_SET","WW","innerWidth","WH","innerHeight","statusCollector","flag","observer","callbackCount","entries","getEntries","initObserver","getFirstSnapShot","time","$body","document","setTag","MutationObserver","observe","childList","subtree","calculateFinalScore","checkNeedCancel","disconnect","tp","getTreeScore","dpss","item","st","forEach","resultEls","filterResult","els","fmpTiming","getFmpTime","setTimeout","rt","weight","index","ele","getAttribute","match","poster","sum","avg","filter","start","lastCalTime","node","children","child","s","calcaulteGrades","getBoundingClientRect","width","height","left","top","isInViewPort","sdp","Number","root","areaPercent","calculateAreaParent","d","concat","right","bottom","winRight","winBottom","overlapX","max","min","overlapY","indexOf","$children","i","$child","setAttribute","perfConfig","perfDetail","getPerf","recordPerf","enableSPA","fmp","autoTracePerf","useFmp","F","undefined","perfInfo","clearPerf","clearResourceTimings","_hasbtoa","btoa","_hasBuffer","Buffer","_TE","TextDecoder","TextEncoder","b64chs","Array","prototype","slice","call","_fromCC","a","tab","fromCharCode","bind","_mkUriSafe","Uint8Array","from","m0","_btoa","bin","u32","c0","c1","c2","asc","pad","charCodeAt","TypeError","substring","_fromUint8Array","u8a","strs","l","apply","subarray","join","cb_utob","cc","re_utob","_encode","encode","urlsafe","customConfig","xhrInterceptor","segments","originalXHR","xhrSend","xhrOpen","liveXHR","ajaxEventTrigger","async","username","password","arguments","segCollector","segment","traceId","spans","serviceInstance","traceSegmentId","xhrState","startsWith","URL","pathname","noTraceOrigins","some","rule","RegExp","test","cURL","traceSDKInternal","startTime","Date","getTime","traceIdStr","segmentId","instance","endpoint","peer","host","values","endTime","responseURL","tags","key","value","exitSpan","operationName","spanId","spanLayer","spanType","isError","parentSpanId","componentId","detailMode","customTags","splice","ajaxEvent","CustomEvent","dispatchEvent","setFetchOptions","setConfig","customOptions","jsErrors","apiErrors","resourceErrors","traceTimeInterval","register","configs","validateOptions","catchErrors","originFetch","Object","args","internals","isSDKInternal","hasTrace","headers","clone","vue","setPerformance","reportFrameErrors","validateTags","isArray","isTags","setCustomTags","ClientMonitor"],"mappings":"2HAiBe,SAASA,IACtB,MAAO,uCAAuCC,QAAQ,SAAQ,SAAEC,GAE9D,IAAMC,EAAqB,GAAhBC,KAAKC,SAAiB,EAIjC,OAFgB,MAANH,EAAYC,EAAS,EAAJA,EAAW,GAE7BG,SAAS,OCNtB,IAAYC,EAQAC,EAKAC,GAbZ,SAAYF,GACV,EAAAG,WAAA,OACA,EAAAC,eAAA,WACA,EAAAC,UAAA,MACA,EAAAC,cAAA,UACA,EAAAC,SAAA,KACA,EAAAC,cAAA,UANF,CAAYR,MAAc,KAQ1B,SAAYC,GACV,EAAAQ,KAAA,OACA,EAAAC,QAAA,UACA,EAAAC,MAAA,QAHF,CAAYV,MAAa,KAKzB,SAAYC,GACV,EAAAS,MAAA,oBACA,EAAAC,OAAA,qBACA,EAAAC,KAAA,oBACA,EAAAC,QAAA,cACA,EAAAC,SAAA,eALF,CAAYb,MAAW,KAQhB,IAGKc,EAHCC,EAAY,OACZC,EAAW,QAExB,SAAYF,GACV,I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,EAAG,MAELjW,KAAKoW,aAAa3B,GACO,iBAAd3U,IACTE,KAAKgV,cAAclV,UAAYyD,SAAS8B,QAEnB,iBAAZ1C,IACT3C,KAAKgV,cAAcrS,QAAU,IAEP,iBAAbE,IACT7C,KAAKgV,cAAcnS,SAAW,IAEF,iBAAnBD,IACT5C,KAAKgV,cAAcpS,eAAiB,IAEd,kBAAbqS,IACTjV,KAAKgV,cAAcC,aAEI,kBAAdC,IACTlV,KAAKgV,cAAcE,cAES,kBAAnBC,IACTnV,KAAKgV,cAAcG,mBAEQ,kBAAlBnH,IACThO,KAAKgV,cAAchH,kBAEC,kBAAXC,IACTjO,KAAKgV,cAAc/G,WAEI,kBAAdH,IACT9N,KAAKgV,cAAclH,cAEW,kBAArBkF,IACThT,KAAKgV,cAAchC,qBAEK,kBAAfwB,IACTxU,KAAKgV,cAAcR,eAEK,kBAAfA,IACTxU,KAAKgV,cAAcR,eAEhBzF,MAAMsH,QAAQ3D,KACjB1S,KAAKgV,cAActC,eAAiB,IAEL,iBAAtB0C,IACTpV,KAAKgV,cAAcI,kBAAoB,KAEtB,mBAARa,IACTjW,KAAKgV,cAAciB,aAGvBM,cAAa,SAAC1C,GACZ,IAAM5P,EAAM,SAAKjE,KAAKgV,eAAa,CAAEP,WAAYZ,IAC7C7T,KAAKoW,aAAavC,IACpBkB,GAAU9Q,KCzLf7B,OAAeoU,cAAgB,I,sECnBhC,iBAmBe","file":"skywalking-client-js.52d81193.js","sourcesContent":["/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport default function uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n /* tslint:disable */\n const r = (Math.random() * 16) | 0;\n /* tslint:disable */\n const v = c === 'x' ? r : (r & 0x3) | 0x8;\n\n return v.toString(16);\n });\n}\n","import Report from './report';\n\n/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum ErrorsCategory {\n AJAX_ERROR = 'ajax',\n RESOURCE_ERROR = 'resource',\n VUE_ERROR = 'vue',\n PROMISE_ERROR = 'promise',\n JS_ERROR = 'js',\n UNKNOWN_ERROR = 'unknown',\n}\nexport enum GradeTypeEnum {\n INFO = 'Info',\n WARNING = 'Warning',\n ERROR = 'Error',\n}\nexport enum ReportTypes {\n ERROR = '/browser/errorLog',\n ERRORS = '/browser/errorLogs',\n PERF = '/browser/perfData',\n SEGMENT = '/v3/segment',\n SEGMENTS = '/v3/segments',\n}\n\nexport const SpanLayer = 'Http';\nexport const SpanType = 'Exit';\n\nexport enum ReadyStatus {\n OPENED = 1,\n DONE = 4,\n}\nexport const ComponentId = 10001; // ajax\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ReportTypes } from './constant';\nclass Report {\n private url: string = '';\n\n constructor(type: string, collector: string) {\n if (type === 'ERROR') {\n this.url = collector + ReportTypes.ERROR;\n } else if (type === 'ERRORS') {\n this.url = collector + ReportTypes.ERRORS;\n } else if (type === 'SEGMENT') {\n this.url = collector + ReportTypes.SEGMENT;\n } else if (type === 'SEGMENTS') {\n this.url = collector + ReportTypes.SEGMENTS;\n } else if (type === 'PERF') {\n this.url = collector + ReportTypes.PERF;\n }\n }\n\n public sendByFetch(data: any) {\n delete data.collector;\n if (!this.url) {\n return;\n }\n const sendRequest = new Request(this.url, { method: 'POST', body: JSON.stringify(data) });\n\n fetch(sendRequest)\n .then((response) => {\n if (response.status >= 400 || response.status === 0) {\n throw new Error('Something went wrong on api server!');\n }\n })\n .catch((error) => {\n console.error(error);\n });\n }\n\n public sendByXhr(data: any) {\n if (!this.url) {\n return;\n }\n const xhr = new XMLHttpRequest();\n\n xhr.open('post', this.url, true);\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4 && xhr.status < 400) {\n console.log('Report successfully');\n }\n };\n xhr.send(JSON.stringify(data));\n }\n\n public sendByBeacon(data: any) {\n if (!this.url) {\n return;\n }\n if (typeof navigator.sendBeacon === 'function') {\n navigator.sendBeacon(\n this.url,\n new Blob([JSON.stringify(data)], {\n type: 'application/json'\n })\n );\n return;\n }\n\n this.sendByXhr(data);\n }\n}\nexport default Report;\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ErrorInfoFields, ReportFields } from './types';\nimport Report from './report';\n\nclass TaskQueue {\n private queues: ((ErrorInfoFields & ReportFields) | undefined)[] = [];\n private collector: string = '';\n\n public addTask(data: ErrorInfoFields & ReportFields, collector: string) {\n this.queues.push(data);\n this.collector = collector;\n }\n\n public fireTasks() {\n if (!(this.queues && this.queues.length)) {\n return;\n }\n\n new Report('ERRORS', this.collector).sendByXhr(this.queues);\n this.queues = [];\n }\n\n public finallyFireTasks() {\n window.addEventListener('beforeunload', () => {\n if (!this.queues.length) {\n return;\n }\n new Report('ERRORS', this.collector).sendByBeacon(this.queues);\n });\n }\n}\n\nexport default new TaskQueue();\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Task from './task';\nimport { ErrorsCategory, GradeTypeEnum } from './constant';\nimport { ErrorInfoFields, ReportFields } from './types';\n\nlet pageHasjsError: { [key: string]: boolean } = {};\nlet interval: NodeJS.Timeout;\nexport default class Base {\n public logInfo: ErrorInfoFields & ReportFields & { collector: string } = {\n uniqueId: '',\n service: '',\n serviceVersion: '',\n pagePath: '',\n category: ErrorsCategory.UNKNOWN_ERROR,\n grade: GradeTypeEnum.INFO,\n errorUrl: '',\n line: 0,\n col: 0,\n message: '',\n firstReportedError: false,\n collector: '',\n };\n\n public traceInfo(logInfo?: ErrorInfoFields & ReportFields & { collector: string }) {\n this.logInfo = logInfo || this.logInfo;\n const ExcludeErrorTypes: string[] = [\n ErrorsCategory.AJAX_ERROR,\n ErrorsCategory.RESOURCE_ERROR,\n ErrorsCategory.UNKNOWN_ERROR,\n ];\n // mark js error pv\n if (!pageHasjsError[location.href] && !ExcludeErrorTypes.includes(this.logInfo.category)) {\n pageHasjsError = {\n [location.href]: true,\n };\n this.logInfo.firstReportedError = true;\n }\n const collector = this.logInfo.collector;\n\n delete this.logInfo.collector;\n Task.addTask(this.logInfo, collector);\n Task.finallyFireTasks();\n if (interval) {\n return;\n }\n // report errors within 1min\n interval = setInterval(() => {\n Task.fireTasks();\n }, 60000);\n }\n}\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport uuid from '../services/uuid';\nimport Base from '../services/base';\nimport { GradeTypeEnum, ErrorsCategory } from '../services/constant';\nimport { CustomReportOptions } from '../types';\nclass JSErrors extends Base {\n private infoOpt: CustomReportOptions = {\n service: '',\n pagePath: '',\n serviceVersion: '',\n };\n public handleErrors(options: CustomReportOptions) {\n this.infoOpt = options;\n window.onerror = (message, url, line, col, error) => {\n this.logInfo = {\n ...this.infoOpt,\n uniqueId: uuid(),\n category: ErrorsCategory.JS_ERROR,\n grade: GradeTypeEnum.ERROR,\n errorUrl: url,\n line,\n col,\n message,\n collector: options.collector,\n stack: error ? error.stack : '',\n };\n this.traceInfo();\n };\n }\n setOptions(opt: CustomReportOptions) {\n this.infoOpt = opt;\n }\n}\nexport default new JSErrors();\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport uuid from '../services/uuid';\nimport Base from '../services/base';\nimport { GradeTypeEnum, ErrorsCategory } from '../services/constant';\nimport { CustomReportOptions } from '../types';\n\nclass PromiseErrors extends Base {\n private infoOpt: CustomReportOptions = {\n service: '',\n pagePath: '',\n serviceVersion: '',\n };\n public handleErrors(options: CustomReportOptions) {\n this.infoOpt = options;\n window.addEventListener('unhandledrejection', (event) => {\n try {\n let url = '';\n if (!event || !event.reason) {\n return;\n }\n if (event.reason.config && event.reason.config.url) {\n url = event.reason.config.url;\n }\n this.logInfo = {\n ...this.infoOpt,\n uniqueId: uuid(),\n category: ErrorsCategory.PROMISE_ERROR,\n grade: GradeTypeEnum.ERROR,\n errorUrl: url || location.href,\n message: event.reason.message,\n stack: event.reason.stack,\n collector: options.collector,\n };\n\n this.traceInfo();\n } catch (error) {\n console.log(error);\n }\n });\n }\n setOptions(opt: CustomReportOptions) {\n this.infoOpt = opt;\n }\n}\nexport default new PromiseErrors();\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport uuid from '../services/uuid';\nimport Base from '../services/base';\nimport { GradeTypeEnum, ErrorsCategory, ReportTypes } from '../services/constant';\nimport { CustomReportOptions } from '../types';\n\nclass AjaxErrors extends Base {\n private infoOpt: CustomReportOptions = {\n service: '',\n pagePath: '',\n serviceVersion: '',\n };\n // get http error info\n public handleError(options: CustomReportOptions) {\n // XMLHttpRequest Object\n if (!window.XMLHttpRequest) {\n return;\n }\n this.infoOpt = options;\n window.addEventListener(\n 'xhrReadyStateChange',\n (event: CustomEvent<XMLHttpRequest & { getRequestConfig: any[] }>) => {\n const detail = event.detail;\n\n if (detail.readyState !== 4) {\n return;\n }\n if (detail.getRequestConfig[1] === options.collector + ReportTypes.ERRORS) {\n return;\n }\n if (detail.status !== 0 && detail.status < 400) {\n return;\n }\n\n this.logInfo = {\n ...this.infoOpt,\n uniqueId: uuid(),\n category: ErrorsCategory.AJAX_ERROR,\n grade: GradeTypeEnum.ERROR,\n errorUrl: detail.getRequestConfig[1],\n message: `status: ${detail.status}; statusText: ${detail.statusText};`,\n collector: options.collector,\n stack: detail.responseText,\n };\n this.traceInfo();\n },\n );\n }\n setOptions(opt: CustomReportOptions) {\n this.infoOpt = opt;\n }\n}\n\nexport default new AjaxErrors();\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport uuid from '../services/uuid';\nimport Base from '../services/base';\nimport { GradeTypeEnum, ErrorsCategory } from '../services/constant';\nimport { CustomReportOptions } from '../types';\n\nclass ResourceErrors extends Base {\n private infoOpt: CustomReportOptions = {\n service: '',\n pagePath: '',\n serviceVersion: '',\n };\n public handleErrors(options: CustomReportOptions) {\n this.infoOpt = options;\n window.addEventListener('error', (event) => {\n try {\n if (!event) {\n return;\n }\n const target: any = event.target;\n const isElementTarget =\n target instanceof HTMLScriptElement ||\n target instanceof HTMLLinkElement ||\n target instanceof HTMLImageElement;\n\n if (!isElementTarget) {\n // return js error\n return;\n }\n this.logInfo = {\n ...this.infoOpt,\n uniqueId: uuid(),\n category: ErrorsCategory.RESOURCE_ERROR,\n grade: target.tagName === 'IMG' ? GradeTypeEnum.WARNING : GradeTypeEnum.ERROR,\n errorUrl: (target as HTMLScriptElement).src || (target as HTMLLinkElement).href || location.href,\n message: `load ${target.tagName} resource error`,\n collector: options.collector,\n stack: `load ${target.tagName} resource error`,\n };\n this.traceInfo();\n } catch (error) {\n throw error;\n }\n });\n }\n setOptions(opt: CustomReportOptions) {\n this.infoOpt = opt;\n }\n}\nexport default new ResourceErrors();\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport uuid from '../services/uuid';\nimport Base from '../services/base';\nimport { GradeTypeEnum, ErrorsCategory } from '../services/constant';\nimport { CustomReportOptions } from '../types';\n\nclass VueErrors extends Base {\n private infoOpt: CustomReportOptions = {\n service: '',\n pagePath: '',\n serviceVersion: '',\n };\n public handleErrors(options: CustomReportOptions, Vue: any) {\n this.infoOpt = options;\n if (!(Vue && Vue.config)) {\n return;\n }\n Vue.config.errorHandler = (error: Error, vm: any, info: string) => {\n try {\n this.logInfo = {\n ...this.infoOpt,\n uniqueId: uuid(),\n category: ErrorsCategory.VUE_ERROR,\n grade: GradeTypeEnum.ERROR,\n errorUrl: location.href,\n message: info,\n collector: options.collector,\n stack: error.stack,\n };\n this.traceInfo();\n } catch (error) {\n throw error;\n }\n };\n }\n setOptions(opt: CustomReportOptions) {\n this.infoOpt = opt;\n }\n}\n\nexport default new VueErrors();\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport uuid from '../services/uuid';\nimport Base from '../services/base';\nimport { GradeTypeEnum, ErrorsCategory } from '../services/constant';\nimport { CustomReportOptions } from '../types';\n\nclass FrameErrors extends Base {\n private infoOpt: CustomReportOptions = {\n service: '',\n pagePath: '',\n serviceVersion: '',\n };\n public handleErrors(options: CustomReportOptions, error: Error) {\n this.infoOpt = options;\n this.logInfo = {\n ...this.infoOpt,\n uniqueId: uuid(),\n category: ErrorsCategory.JS_ERROR,\n grade: GradeTypeEnum.ERROR,\n errorUrl: error.name || location.href,\n message: error.message,\n collector: options.collector || location.origin,\n stack: error.stack,\n };\n this.traceInfo();\n }\n}\nexport default new FrameErrors();\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IPerfDetail } from './type';\nclass PagePerf {\n public getPerfTiming(): IPerfDetail {\n try {\n let { timing } = window.performance as PerformanceNavigationTiming | any; // PerformanceTiming\n if (typeof window.PerformanceNavigationTiming === 'function') {\n const nt2Timing = performance.getEntriesByType('navigation')[0];\n\n if (nt2Timing) {\n timing = nt2Timing;\n }\n }\n let redirectTime = 0;\n\n if (timing.navigationStart !== undefined) {\n redirectTime = parseInt(String(timing.fetchStart - timing.navigationStart), 10);\n } else if (timing.redirectEnd !== undefined) {\n redirectTime = parseInt(String(timing.redirectEnd - timing.redirectStart), 10);\n } else {\n redirectTime = 0;\n }\n\n return {\n redirectTime,\n dnsTime: parseInt(String(timing.domainLookupEnd - timing.domainLookupStart), 10),\n ttfbTime: parseInt(String(timing.responseStart - timing.requestStart), 10), // Time to First Byte\n tcpTime: parseInt(String(timing.connectEnd - timing.connectStart), 10),\n transTime: parseInt(String(timing.responseEnd - timing.responseStart), 10),\n domAnalysisTime: parseInt(String(timing.domInteractive - timing.responseEnd), 10),\n fptTime: parseInt(String(timing.responseEnd - timing.fetchStart), 10), // First Paint Time or Blank Screen Time\n domReadyTime: parseInt(String(timing.domContentLoadedEventEnd - timing.fetchStart), 10),\n loadPageTime: parseInt(String(timing.loadEventStart - timing.fetchStart), 10), // Page full load time\n // Synchronous load resources in the page\n resTime: parseInt(String(timing.loadEventStart - timing.domContentLoadedEventEnd), 10),\n // Only valid for HTTPS\n sslTime:\n location.protocol === 'https:' && timing.secureConnectionStart > 0\n ? parseInt(String(timing.connectEnd - timing.secureConnectionStart), 10)\n : undefined,\n ttlTime: parseInt(String(timing.domInteractive - timing.fetchStart), 10), // time to interact\n firstPackTime: parseInt(String(timing.responseStart - timing.domainLookupStart), 10), // first pack time\n fmpTime: 0, // First Meaningful Paint\n };\n } catch (e) {\n throw e;\n }\n }\n}\n\nexport default PagePerf;\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ICalScore, ElementList } from './type';\n\nconst getStyle = (element: Element | any, attr: any) => {\n if (window.getComputedStyle) {\n return window.getComputedStyle(element, null)[attr];\n } else {\n return element.currentStyle[attr];\n }\n};\n// element weight for calculate score\nenum ELE_WEIGHT {\n SVG = 2,\n IMG = 2,\n CANVAS = 4,\n OBJECT = 4,\n EMBED = 4,\n VIDEO = 4,\n}\n\nconst START_TIME: number = performance.now();\nconst IGNORE_TAG_SET: string[] = ['SCRIPT', 'STYLE', 'META', 'HEAD', 'LINK'];\nconst LIMIT: number = 3000;\nconst WW: number = window.innerWidth;\nconst WH: number = window.innerHeight;\nconst DELAY: number = 2000; // fmp retry interval\n\nclass FMPTiming {\n public fmpTime: number = 0;\n private statusCollector: Array<{ time: number }> = []; // nodes change time\n private flag: boolean = true;\n private observer: MutationObserver = null;\n private callbackCount: number = 0;\n private entries: any = {};\n\n constructor() {\n if (!performance || !performance.getEntries) {\n console.log('your browser do not support performance.getEntries');\n return;\n }\n this.initObserver();\n }\n private getFirstSnapShot() {\n const time: number = performance.now();\n const $body: HTMLElement = document.body;\n if ($body) {\n this.setTag($body, this.callbackCount);\n }\n this.statusCollector.push({\n time,\n });\n }\n private initObserver() {\n this.getFirstSnapShot();\n this.observer = new MutationObserver(() => {\n this.callbackCount += 1;\n const time = performance.now();\n const $body: HTMLElement = document.body;\n if ($body) {\n this.setTag($body, this.callbackCount);\n }\n this.statusCollector.push({\n time,\n });\n });\n // observe all child nodes\n this.observer.observe(document, {\n childList: true,\n subtree: true,\n });\n this.calculateFinalScore();\n }\n private calculateFinalScore() {\n if (!this.flag) {\n return;\n }\n if (!MutationObserver) {\n return;\n }\n if (this.checkNeedCancel(START_TIME)) {\n // cancel observer for dom change\n this.observer.disconnect();\n this.flag = false;\n const res = this.getTreeScore(document.body);\n let tp: ICalScore = null;\n for (const item of res.dpss) {\n if (tp && tp.st) {\n if (tp.st < item.st) {\n tp = item;\n }\n } else {\n tp = item;\n }\n }\n // Get all of soures load time\n performance.getEntries().forEach((item: PerformanceResourceTiming) => {\n this.entries[item.name] = item.responseEnd;\n });\n if (!tp) {\n return false;\n }\n const resultEls: ElementList = this.filterResult(tp.els);\n const fmpTiming: number = this.getFmpTime(resultEls);\n this.fmpTime = fmpTiming;\n } else {\n setTimeout(() => {\n this.calculateFinalScore();\n }, DELAY);\n }\n }\n private getFmpTime(resultEls: ElementList): number {\n let rt = 0;\n for (const item of resultEls) {\n let time: number = 0;\n if (item.weight === 1) {\n const index: number = parseInt(item.ele.getAttribute('fmp_c'), 10);\n time = this.statusCollector[index] && this.statusCollector[index].time;\n } else if (item.weight === 2) {\n if (item.ele.tagName === 'IMG') {\n time = this.entries[(item.ele as HTMLImageElement).src];\n } else if (item.ele.tagName === 'SVG') {\n const index: number = parseInt(item.ele.getAttribute('fmp_c'), 10);\n time = this.statusCollector[index] && this.statusCollector[index].time;\n } else {\n const match = getStyle(item.ele, 'background-image').match(/url\\(\\\"(.*?)\\\"\\)/);\n let url: string = '';\n if (match && match[1]) {\n url = match[1];\n if (!url.includes('http')) {\n url = location.protocol + match[1];\n }\n }\n time = this.entries[url];\n }\n } else if (item.weight === 4) {\n if (item.ele.tagName === 'CANVAS') {\n const index: number = parseInt(item.ele.getAttribute('fmp_c'), 10);\n time = this.statusCollector[index] && this.statusCollector[index].time;\n } else if (item.ele.tagName === 'VIDEO') {\n time = this.entries[(item.ele as HTMLVideoElement).src];\n if (!time) {\n time = this.entries[(item.ele as HTMLVideoElement).poster];\n }\n }\n }\n if (typeof time !== 'number') {\n time = 0;\n }\n if (rt < time) {\n rt = time;\n }\n }\n return rt;\n }\n /**\n * The nodes with the highest score in the visible area are collected and the average value is taken,\n * and the low score ones are eliminated\n */\n private filterResult(els: ElementList): ElementList {\n if (els.length === 1) {\n return els;\n }\n let sum: number = 0;\n els.forEach((item: any) => {\n sum += item.st;\n });\n const avg: number = sum / els.length;\n return els.filter((item: any) => {\n return item.st > avg;\n });\n }\n private checkNeedCancel(start: number): boolean {\n const time: number = performance.now() - start;\n const lastCalTime: number =\n this.statusCollector.length > 0 ? this.statusCollector[this.statusCollector.length - 1].time : 0;\n return time > LIMIT || time - lastCalTime > 1000;\n }\n private getTreeScore(node: Element): ICalScore | any {\n if (!node) {\n return {};\n }\n const dpss = [];\n const children: any = node.children;\n for (const child of children) {\n // Only calculate marked elements\n if (!child.getAttribute('fmp_c')) {\n continue;\n }\n const s = this.getTreeScore(child);\n if (s.st) {\n dpss.push(s);\n }\n }\n\n return this.calcaulteGrades(node, dpss);\n }\n private calcaulteGrades(ele: Element, dpss: ICalScore[]): ICalScore {\n const { width, height, left, top } = ele.getBoundingClientRect();\n let isInViewPort: boolean = true;\n if (WH < top || WW < left) {\n isInViewPort = false;\n }\n let sdp: number = 0;\n dpss.forEach((item: any) => {\n sdp += item.st;\n });\n let weight: number = Number(ELE_WEIGHT[ele.tagName as any]) || 1;\n // If there is a common element of the background image, it is calculated according to the picture\n if (\n weight === 1 &&\n getStyle(ele, 'background-image') &&\n getStyle(ele, 'background-image') !== 'initial' &&\n getStyle(ele, 'background-image') !== 'none'\n ) {\n weight = ELE_WEIGHT.IMG;\n }\n // score = the area of element\n let st: number = isInViewPort ? width * height * weight : 0;\n let els = [{ ele, st, weight }];\n const root = ele;\n // The percentage of the current element in the viewport\n const areaPercent = this.calculateAreaParent(ele);\n // If the sum of the child's weights is greater than the parent's true weight\n if (sdp > st * areaPercent || areaPercent === 0) {\n st = sdp;\n els = [];\n for (const item of dpss) {\n els = els.concat(item.els);\n }\n }\n return {\n dpss,\n st,\n els,\n root,\n };\n }\n private calculateAreaParent(ele: Element): number {\n const { left, right, top, bottom, width, height } = ele.getBoundingClientRect();\n const winLeft: number = 0;\n const winTop: number = 0;\n const winRight: number = WW;\n const winBottom: number = WH;\n const overlapX = right - left + (winRight - winLeft) - (Math.max(right, winRight) - Math.min(left, winLeft));\n const overlapY = bottom - top + (winBottom - winTop) - (Math.max(bottom, winBottom) - Math.min(top, winTop));\n\n if (overlapX <= 0 || overlapY <= 0) {\n return 0;\n }\n return (overlapX * overlapY) / (width * height);\n }\n // Depth first traversal to mark nodes\n private setTag(target: Element, callbackCount: number): void {\n const tagName: string = target.tagName;\n if (IGNORE_TAG_SET.indexOf(tagName) === -1) {\n const $children: HTMLCollection = target.children;\n if ($children && $children.length > 0) {\n for (let i = $children.length - 1; i >= 0; i--) {\n const $child: Element = $children[i];\n const hasSetTag = $child.getAttribute('fmp_c') !== null;\n // If it is not marked, whether the marking condition is met is detected\n if (!hasSetTag) {\n const { left, top, width, height } = $child.getBoundingClientRect();\n if (WH < top || WW < left || width === 0 || height === 0) {\n continue;\n }\n $child.setAttribute('fmp_c', `${callbackCount}`);\n }\n this.setTag($child, callbackCount);\n }\n }\n }\n }\n}\n\nexport default FMPTiming;\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CustomOptionsType } from '../types';\nimport Report from '../services/report';\nimport pagePerf from './perf';\nimport FMP from './fmp';\nimport { IPerfDetail } from './type';\n\nclass TracePerf {\n private perfConfig = {\n perfDetail: {},\n } as { perfDetail: IPerfDetail };\n\n public getPerf(options: CustomOptionsType) {\n this.recordPerf(options);\n if (options.enableSPA) {\n // hash router\n window.addEventListener(\n 'hashchange',\n () => {\n this.recordPerf(options);\n },\n false,\n );\n }\n }\n\n public async recordPerf(options: CustomOptionsType) {\n let fmp: { fmpTime: number | undefined } = { fmpTime: undefined };\n if (options.autoTracePerf && options.useFmp) {\n fmp = await new FMP();\n }\n // auto report pv and perf data\n setTimeout(() => {\n if (options.autoTracePerf) {\n this.perfConfig.perfDetail = new pagePerf().getPerfTiming();\n }\n const perfDetail = options.autoTracePerf\n ? {\n ...this.perfConfig.perfDetail,\n fmpTime: options.useFmp ? parseInt(String(fmp.fmpTime), 10) : undefined,\n }\n : undefined;\n const perfInfo = {\n ...perfDetail,\n pagePath: options.pagePath,\n serviceVersion: options.serviceVersion,\n service: options.service,\n };\n new Report('PERF', options.collector).sendByXhr(perfInfo);\n // clear perf data\n this.clearPerf();\n }, 6000);\n }\n\n private clearPerf() {\n if (!(window.performance && window.performance.clearResourceTimings)) {\n return;\n }\n window.performance.clearResourceTimings();\n this.perfConfig = {\n perfDetail: {},\n } as { perfDetail: IPerfDetail };\n }\n}\n\nexport default new TracePerf();\n","/**\n * base64.ts\n *\n * Licensed under the BSD 3-Clause License.\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * References:\n * http://en.wikipedia.org/wiki/Base64\n *\n * @author Dan Kogai (https://github.com/dankogai)\n */\nconst version = '3.7.5';\n/**\n * @deprecated use lowercase `version`.\n */\nconst VERSION = version;\nconst _hasatob = typeof atob === 'function';\nconst _hasbtoa = typeof btoa === 'function';\nconst _hasBuffer = typeof Buffer === 'function';\nconst _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\nconst _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\nconst b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nconst b64chs = Array.prototype.slice.call(b64ch);\nconst b64tab = ((a) => {\n let tab = {};\n a.forEach((c, i) => tab[c] = i);\n return tab;\n})(b64chs);\nconst b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\nconst _fromCC = String.fromCharCode.bind(String);\nconst _U8Afrom = typeof Uint8Array.from === 'function'\n ? Uint8Array.from.bind(Uint8Array)\n : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));\nconst _mkUriSafe = (src) => src\n .replace(/=/g, '').replace(/[+\\/]/g, (m0) => m0 == '+' ? '-' : '_');\nconst _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\\+\\/]/g, '');\n/**\n * polyfill version of `btoa`\n */\nconst btoaPolyfill = (bin) => {\n // console.log('polyfilled');\n let u32, c0, c1, c2, asc = '';\n const pad = bin.length % 3;\n for (let i = 0; i < bin.length;) {\n if ((c0 = bin.charCodeAt(i++)) > 255 ||\n (c1 = bin.charCodeAt(i++)) > 255 ||\n (c2 = bin.charCodeAt(i++)) > 255)\n throw new TypeError('invalid character found');\n u32 = (c0 << 16) | (c1 << 8) | c2;\n asc += b64chs[u32 >> 18 & 63]\n + b64chs[u32 >> 12 & 63]\n + b64chs[u32 >> 6 & 63]\n + b64chs[u32 & 63];\n }\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\n};\n/**\n * does what `window.btoa` of web browsers do.\n * @param {String} bin binary string\n * @returns {string} Base64-encoded string\n */\nconst _btoa = _hasbtoa ? (bin) => btoa(bin)\n : _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')\n : btoaPolyfill;\nconst _fromUint8Array = _hasBuffer\n ? (u8a) => Buffer.from(u8a).toString('base64')\n : (u8a) => {\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\n const maxargs = 0x1000;\n let strs = [];\n for (let i = 0, l = u8a.length; i < l; i += maxargs) {\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\n }\n return _btoa(strs.join(''));\n };\n/**\n * converts a Uint8Array to a Base64 string.\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\n * @returns {string} Base64 string\n */\nconst fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const utob = (src: string) => unescape(encodeURIComponent(src));\n// reverting good old fationed regexp\nconst cb_utob = (c) => {\n if (c.length < 2) {\n var cc = c.charCodeAt(0);\n return cc < 0x80 ? c\n : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))\n + _fromCC(0x80 | (cc & 0x3f)))\n : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n else {\n var cc = 0x10000\n + (c.charCodeAt(0) - 0xD800) * 0x400\n + (c.charCodeAt(1) - 0xDC00);\n return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))\n + _fromCC(0x80 | ((cc >>> 12) & 0x3f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n};\nconst re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-8 string\n * @returns {string} UTF-16 string\n */\nconst utob = (u) => u.replace(re_utob, cb_utob);\n//\nconst _encode = _hasBuffer\n ? (s) => Buffer.from(s, 'utf8').toString('base64')\n : _TE\n ? (s) => _fromUint8Array(_TE.encode(s))\n : (s) => _btoa(utob(s));\n/**\n * converts a UTF-8-encoded string to a Base64 string.\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\n * @returns {string} Base64 string\n */\nconst encode = (src, urlsafe = false) => urlsafe\n ? _mkUriSafe(_encode(src))\n : _encode(src);\n/**\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\n * @returns {string} Base64 string\n */\nconst encodeURI = (src) => encode(src, true);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const btou = (src: string) => decodeURIComponent(escape(src));\n// reverting good old fationed regexp\nconst re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\nconst cb_btou = (cccc) => {\n switch (cccc.length) {\n case 4:\n var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;\n return (_fromCC((offset >>> 10) + 0xD800)\n + _fromCC((offset & 0x3FF) + 0xDC00));\n case 3:\n return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2)));\n default:\n return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1)));\n }\n};\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-16 string\n * @returns {string} UTF-8 string\n */\nconst btou = (b) => b.replace(re_btou, cb_btou);\n/**\n * polyfill version of `atob`\n */\nconst atobPolyfill = (asc) => {\n // console.log('polyfilled');\n asc = asc.replace(/\\s+/g, '');\n if (!b64re.test(asc))\n throw new TypeError('malformed base64.');\n asc += '=='.slice(2 - (asc.length & 3));\n let u24, bin = '', r1, r2;\n for (let i = 0; i < asc.length;) {\n u24 = b64tab[asc.charAt(i++)] << 18\n | b64tab[asc.charAt(i++)] << 12\n | (r1 = b64tab[asc.charAt(i++)]) << 6\n | (r2 = b64tab[asc.charAt(i++)]);\n bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)\n : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)\n : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);\n }\n return bin;\n};\n/**\n * does what `window.atob` of web browsers do.\n * @param {String} asc Base64-encoded string\n * @returns {string} binary string\n */\nconst _atob = _hasatob ? (asc) => atob(_tidyB64(asc))\n : _hasBuffer ? (asc) => Buffer.from(asc, 'base64').toString('binary')\n : atobPolyfill;\n//\nconst _toUint8Array = _hasBuffer\n ? (a) => _U8Afrom(Buffer.from(a, 'base64'))\n : (a) => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));\n/**\n * converts a Base64 string to a Uint8Array.\n */\nconst toUint8Array = (a) => _toUint8Array(_unURI(a));\n//\nconst _decode = _hasBuffer\n ? (a) => Buffer.from(a, 'base64').toString('utf8')\n : _TD\n ? (a) => _TD.decode(_toUint8Array(a))\n : (a) => btou(_atob(a));\nconst _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == '-' ? '+' : '/'));\n/**\n * converts a Base64 string to a UTF-8 string.\n * @param {String} src Base64 string. Both normal and URL-safe are supported\n * @returns {string} UTF-8 string\n */\nconst decode = (src) => _decode(_unURI(src));\n/**\n * check if a value is a valid Base64 string\n * @param {String} src a value to check\n */\nconst isValid = (src) => {\n if (typeof src !== 'string')\n return false;\n const s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n};\n//\nconst _noEnum = (v) => {\n return {\n value: v, enumerable: false, writable: true, configurable: true\n };\n};\n/**\n * extend String.prototype with relevant methods\n */\nconst extendString = function () {\n const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));\n _add('fromBase64', function () { return decode(this); });\n _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });\n _add('toBase64URI', function () { return encode(this, true); });\n _add('toBase64URL', function () { return encode(this, true); });\n _add('toUint8Array', function () { return toUint8Array(this); });\n};\n/**\n * extend Uint8Array.prototype with relevant methods\n */\nconst extendUint8Array = function () {\n const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));\n _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });\n _add('toBase64URI', function () { return fromUint8Array(this, true); });\n _add('toBase64URL', function () { return fromUint8Array(this, true); });\n};\n/**\n * extend Builtin prototypes with relevant methods\n */\nconst extendBuiltins = () => {\n extendString();\n extendUint8Array();\n};\nconst gBase64 = {\n version: version,\n VERSION: VERSION,\n atob: _atob,\n atobPolyfill: atobPolyfill,\n btoa: _btoa,\n btoaPolyfill: btoaPolyfill,\n fromBase64: decode,\n toBase64: encode,\n encode: encode,\n encodeURI: encodeURI,\n encodeURL: encodeURI,\n utob: utob,\n btou: btou,\n decode: decode,\n isValid: isValid,\n fromUint8Array: fromUint8Array,\n toUint8Array: toUint8Array,\n extendString: extendString,\n extendUint8Array: extendUint8Array,\n extendBuiltins: extendBuiltins,\n};\n// makecjs:CUT //\nexport { version };\nexport { VERSION };\nexport { _atob as atob };\nexport { atobPolyfill };\nexport { _btoa as btoa };\nexport { btoaPolyfill };\nexport { decode as fromBase64 };\nexport { encode as toBase64 };\nexport { utob };\nexport { encode };\nexport { encodeURI };\nexport { encodeURI as encodeURL };\nexport { btou };\nexport { decode };\nexport { isValid };\nexport { fromUint8Array };\nexport { toUint8Array };\nexport { extendString };\nexport { extendUint8Array };\nexport { extendBuiltins };\n// and finally,\nexport { gBase64 as Base64 };\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ComponentId, ReadyStatus, ReportTypes, SpanLayer, SpanType } from '../../services/constant';\nimport uuid from '../../services/uuid';\nimport { encode } from 'js-base64';\nimport { CustomOptionsType } from '../../types';\nimport { SegmentFields, SpanFields } from '../type';\n\nlet customConfig: CustomOptionsType | any = {};\nexport default function xhrInterceptor(options: CustomOptionsType, segments: SegmentFields[]) {\n setOptions(options);\n const originalXHR = window.XMLHttpRequest as any;\n const xhrSend = XMLHttpRequest.prototype.send;\n const xhrOpen = XMLHttpRequest.prototype.open;\n\n if (!(xhrSend && xhrOpen)) {\n console.error('Tracing is not supported');\n return;\n }\n originalXHR.getRequestConfig = [];\n\n function ajaxEventTrigger(event: string) {\n const ajaxEvent = new CustomEvent(event, { detail: this });\n\n window.dispatchEvent(ajaxEvent);\n }\n\n function customizedXHR() {\n const liveXHR = new originalXHR();\n\n liveXHR.addEventListener(\n 'readystatechange',\n function () {\n ajaxEventTrigger.call(this, 'xhrReadyStateChange');\n },\n false,\n );\n\n liveXHR.open = function (\n method: string,\n url: string,\n async: boolean,\n username?: string | null,\n password?: string | null,\n ) {\n this.getRequestConfig = arguments;\n\n return xhrOpen.apply(this, arguments);\n };\n liveXHR.send = function (body?: Document | BodyInit | null) {\n return xhrSend.apply(this, arguments);\n };\n\n return liveXHR;\n }\n\n (window as any).XMLHttpRequest = customizedXHR;\n\n const segCollector: { event: XMLHttpRequest; startTime: number; traceId: string; traceSegmentId: string }[] = [];\n\n window.addEventListener('xhrReadyStateChange', (event: CustomEvent<XMLHttpRequest & { getRequestConfig: any[] }>) => {\n let segment = {\n traceId: '',\n service: customConfig.service,\n spans: [],\n serviceInstance: customConfig.serviceVersion,\n traceSegmentId: '',\n } as SegmentFields;\n const xhrState = event.detail.readyState;\n const config = event.detail.getRequestConfig;\n let url = {} as URL;\n if (config[1].startsWith('http://') || config[1].startsWith('https://')) {\n url = new URL(config[1]);\n } else if (config[1].startsWith('//')) {\n url = new URL(`${window.location.protocol}${config[1]}`);\n } else {\n url = new URL(window.location.href);\n url.pathname = config[1];\n }\n\n const noTraceOrigins = customConfig.noTraceOrigins.some((rule: string | RegExp) => {\n if (typeof rule === 'string') {\n if (rule === url.origin) {\n return true;\n }\n } else if (rule instanceof RegExp) {\n if (rule.test(url.origin)) {\n return true;\n }\n }\n });\n if (noTraceOrigins) {\n return;\n }\n\n const cURL = new URL(customConfig.collector);\n const pathname = cURL.pathname === '/' ? url.pathname : url.pathname.replace(new RegExp(`^${cURL.pathname}`), '');\n const internals = [ReportTypes.ERROR, ReportTypes.ERRORS, ReportTypes.PERF, ReportTypes.SEGMENTS] as string[];\n const isSDKInternal = internals.includes(pathname);\n\n if (isSDKInternal && !customConfig.traceSDKInternal) {\n return;\n }\n\n // The values of xhrState are from https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState\n if (xhrState === ReadyStatus.OPENED) {\n const traceId = uuid();\n const traceSegmentId = uuid();\n\n segCollector.push({\n event: event.detail,\n startTime: new Date().getTime(),\n traceId,\n traceSegmentId,\n });\n\n const traceIdStr = String(encode(traceId));\n const segmentId = String(encode(traceSegmentId));\n const service = String(encode(segment.service));\n const instance = String(encode(segment.serviceInstance));\n const endpoint = String(encode(customConfig.pagePath));\n const peer = String(encode(url.host));\n const index = segment.spans.length;\n const values = `${1}-${traceIdStr}-${segmentId}-${index}-${service}-${instance}-${endpoint}-${peer}`;\n\n event.detail.setRequestHeader('sw8', values);\n }\n\n if (xhrState === ReadyStatus.DONE) {\n const endTime = new Date().getTime();\n for (let i = 0; i < segCollector.length; i++) {\n if (segCollector[i].event.readyState === ReadyStatus.DONE) {\n let responseURL = {} as URL;\n if (segCollector[i].event.status) {\n responseURL = new URL(segCollector[i].event.responseURL);\n }\n const tags = [\n {\n key: 'http.method',\n value: config[0],\n },\n {\n key: 'url',\n value: segCollector[i].event.responseURL || `${url.protocol}//${url.host}${url.pathname}`,\n },\n ];\n const exitSpan: SpanFields = {\n operationName: customConfig.pagePath,\n startTime: segCollector[i].startTime,\n endTime,\n spanId: segment.spans.length,\n spanLayer: SpanLayer,\n spanType: SpanType,\n isError: event.detail.status === 0 || event.detail.status >= 400, // when requests failed, the status is 0\n parentSpanId: segment.spans.length - 1,\n componentId: ComponentId,\n peer: responseURL.host,\n tags: customConfig.detailMode\n ? customConfig.customTags\n ? [...tags, ...customConfig.customTags]\n : tags\n : undefined,\n };\n segment = {\n ...segment,\n traceId: segCollector[i].traceId,\n traceSegmentId: segCollector[i].traceSegmentId,\n };\n segment.spans.push(exitSpan);\n segCollector.splice(i, 1);\n }\n }\n segments.push(segment);\n }\n });\n}\nexport function setOptions(opt: CustomOptionsType) {\n customConfig = { ...customConfig, ...opt };\n}\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { encode } from 'js-base64';\nimport uuid from '../../services/uuid';\nimport { SegmentFields, SpanFields } from '../type';\nimport { CustomOptionsType } from '../../types';\nimport Base from '../../services/base';\nimport { ComponentId, ReportTypes, SpanLayer, SpanType, ErrorsCategory, GradeTypeEnum } from '../../services/constant';\nlet customConfig: any = {};\nexport default function windowFetch(options: CustomOptionsType, segments: SegmentFields[]) {\n const originFetch: any = window.fetch;\n setFetchOptions(options);\n\n window.fetch = async (...args: any) => {\n const startTime = new Date().getTime();\n const traceId = uuid();\n const traceSegmentId = uuid();\n let segment = {\n traceId: '',\n service: customConfig.service,\n spans: [],\n serviceInstance: customConfig.serviceVersion,\n traceSegmentId: '',\n } as SegmentFields;\n let url = {} as URL;\n // for args[0] is Request object see: https://developer.mozilla.org/zh-CN/docs/Web/API/fetch\n if (Object.prototype.toString.call(args[0]) === '[object Request]') {\n url = new URL(args[0].url);\n } else {\n if (args[0].startsWith('http://') || args[0].startsWith('https://')) {\n url = new URL(args[0]);\n } else if (args[0].startsWith('//')) {\n url = new URL(`${window.location.protocol}${args[0]}`);\n } else {\n url = new URL(window.location.href);\n url.pathname = args[0];\n }\n } \n\n\n const noTraceOrigins = customConfig.noTraceOrigins.some((rule: string | RegExp) => {\n if (typeof rule === 'string') {\n if (rule === url.origin) {\n return true;\n }\n } else if (rule instanceof RegExp) {\n if (rule.test(url.origin)) {\n return true;\n }\n }\n });\n const cURL = new URL(customConfig.collector);\n const pathname = cURL.pathname === '/' ? url.pathname : url.pathname.replace(new RegExp(`^${cURL.pathname}`), '');\n const internals = [ReportTypes.ERROR, ReportTypes.ERRORS, ReportTypes.PERF, ReportTypes.SEGMENTS] as string[];\n const isSDKInternal = internals.includes(pathname);\n const hasTrace = !noTraceOrigins || (isSDKInternal && customConfig.traceSDKInternal);\n\n if (hasTrace) {\n const traceIdStr = String(encode(traceId));\n const segmentId = String(encode(traceSegmentId));\n const service = String(encode(segment.service));\n const instance = String(encode(segment.serviceInstance));\n const endpoint = String(encode(customConfig.pagePath));\n const peer = String(encode(url.host));\n const index = segment.spans.length;\n const values = `${1}-${traceIdStr}-${segmentId}-${index}-${service}-${instance}-${endpoint}-${peer}`;\n\n if (!args[1]) {\n args[1] = {};\n }\n if (!args[1].headers) {\n args[1].headers = {};\n }\n args[1].headers['sw8'] = values;\n }\n\n const response = await originFetch(...args);\n\n try {\n if (response && (response.status === 0 || response.status >= 400)) {\n const logInfo = {\n uniqueId: uuid(),\n service: customConfig.service,\n serviceVersion: customConfig.serviceVersion,\n pagePath: customConfig.pagePath,\n category: ErrorsCategory.AJAX_ERROR,\n grade: GradeTypeEnum.ERROR,\n errorUrl: (response && response.url) || `${url.protocol}//${url.host}${url.pathname}`,\n message: `status: ${response ? response.status : 0}; statusText: ${response && response.statusText};`,\n collector: customConfig.collector,\n stack: 'Fetch: ' + response && response.statusText,\n };\n new Base().traceInfo(logInfo);\n }\n if (hasTrace) {\n const tags = [\n {\n key: 'http.method',\n value: args[1].method || 'GET',\n },\n {\n key: 'url',\n value: (response && response.url) || `${url.protocol}//${url.host}${url.pathname}`,\n },\n ];\n const endTime = new Date().getTime();\n const exitSpan: SpanFields = {\n operationName: customConfig.pagePath,\n startTime: startTime,\n endTime,\n spanId: segment.spans.length,\n spanLayer: SpanLayer,\n spanType: SpanType,\n isError: response && (response.status === 0 || response.status >= 400), // when requests failed, the status is 0\n parentSpanId: segment.spans.length - 1,\n componentId: ComponentId,\n peer: url.host,\n tags: customConfig.detailMode\n ? customConfig.customTags\n ? [...tags, ...customConfig.customTags]\n : tags\n : undefined,\n };\n segment = {\n ...segment,\n traceId: traceId,\n traceSegmentId: traceSegmentId,\n };\n segment.spans.push(exitSpan);\n segments.push(segment);\n }\n } catch (e) {\n throw e;\n }\n return response.clone();\n };\n}\nexport function setFetchOptions(opt: CustomOptionsType) {\n customConfig = { ...customConfig, ...opt };\n}\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport xhrInterceptor, { setOptions } from './interceptors/xhr';\nimport windowFetch, { setFetchOptions } from './interceptors/fetch';\nimport Report from '../services/report';\nimport { SegmentFields } from './type';\nimport { CustomOptionsType } from '../types';\n\nexport default function traceSegment(options: CustomOptionsType) {\n const segments = [] as SegmentFields[];\n // inject interceptor\n xhrInterceptor(options, segments);\n windowFetch(options, segments);\n window.addEventListener('beforeunload', () => {\n if (!segments.length) {\n return;\n }\n new Report('SEGMENTS', options.collector).sendByBeacon(segments);\n });\n //report per options.traceTimeInterval min\n setInterval(() => {\n if (!segments.length) {\n return;\n }\n new Report('SEGMENTS', options.collector).sendByXhr(segments);\n segments.splice(0, segments.length);\n }, options.traceTimeInterval);\n}\n\nexport function setConfig(opt: CustomOptionsType) {\n setOptions(opt);\n setFetchOptions(opt);\n}\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CustomOptionsType, CustomReportOptions, TagOption } from './types';\nimport { JSErrors, PromiseErrors, AjaxErrors, ResourceErrors, VueErrors, FrameErrors } from './errors/index';\nimport tracePerf from './performance/index';\nimport traceSegment, { setConfig } from './trace/segment';\n\nconst ClientMonitor = {\n customOptions: {\n collector: location.origin, // report serve\n jsErrors: true, // vue, js and promise errors\n apiErrors: true,\n resourceErrors: true,\n autoTracePerf: true, // trace performance detail\n useFmp: false, // use first meaningful paint\n enableSPA: false,\n traceSDKInternal: false,\n detailMode: true,\n noTraceOrigins: [],\n traceTimeInterval: 60000, // 1min\n } as CustomOptionsType,\n\n register(configs: CustomOptionsType) {\n this.customOptions = {\n ...this.customOptions,\n ...configs,\n };\n this.validateOptions();\n this.catchErrors(this.customOptions);\n if (!this.customOptions.enableSPA) {\n this.performance(this.customOptions);\n }\n\n traceSegment(this.customOptions);\n },\n performance(configs: any) {\n // trace and report perf data and pv to serve when page loaded\n if (document.readyState === 'complete') {\n tracePerf.getPerf(configs);\n } else {\n window.addEventListener(\n 'load',\n () => {\n tracePerf.getPerf(configs);\n },\n false,\n );\n }\n },\n\n catchErrors(options: CustomOptionsType) {\n const { service, pagePath, serviceVersion, collector } = options;\n\n if (options.jsErrors) {\n JSErrors.handleErrors({ service, pagePath, serviceVersion, collector });\n PromiseErrors.handleErrors({ service, pagePath, serviceVersion, collector });\n if (options.vue) {\n VueErrors.handleErrors({ service, pagePath, serviceVersion, collector }, options.vue);\n }\n }\n if (options.apiErrors) {\n AjaxErrors.handleError({ service, pagePath, serviceVersion, collector });\n }\n if (options.resourceErrors) {\n ResourceErrors.handleErrors({ service, pagePath, serviceVersion, collector });\n }\n },\n setPerformance(configs: CustomReportOptions) {\n // history router\n this.customOptions = {\n ...this.customOptions,\n ...configs,\n useFmp: false,\n };\n this.validateOptions();\n this.performance(this.customOptions);\n const { service, pagePath, serviceVersion, collector } = this.customOptions;\n if (this.customOptions.jsErrors) {\n JSErrors.setOptions({ service, pagePath, serviceVersion, collector });\n PromiseErrors.setOptions({ service, pagePath, serviceVersion, collector });\n if (this.customOptions.vue) {\n VueErrors.setOptions({ service, pagePath, serviceVersion, collector });\n }\n }\n if (this.customOptions.apiErrors) {\n AjaxErrors.setOptions({ service, pagePath, serviceVersion, collector });\n }\n if (this.customOptions.resourceErrors) {\n ResourceErrors.setOptions({ service, pagePath, serviceVersion, collector });\n }\n setConfig(this.customOptions);\n },\n reportFrameErrors(configs: CustomReportOptions, error: Error) {\n FrameErrors.handleErrors(configs, error);\n },\n validateTags(customTags?: TagOption[]) {\n if (!customTags) {\n return false;\n }\n if (!Array.isArray(customTags)) {\n this.customOptions.customTags = undefined;\n console.error('customTags error');\n return false;\n }\n let isTags = true;\n for (const ele of customTags) {\n if (!(ele && ele.key && ele.value)) {\n isTags = false;\n }\n }\n if (!isTags) {\n this.customOptions.customTags = undefined;\n console.error('customTags error');\n return false;\n }\n return true;\n },\n validateOptions() {\n const {\n collector,\n service,\n pagePath,\n serviceVersion,\n jsErrors,\n apiErrors,\n resourceErrors,\n autoTracePerf,\n useFmp,\n enableSPA,\n traceSDKInternal,\n detailMode,\n noTraceOrigins,\n traceTimeInterval,\n customTags,\n vue,\n } = this.customOptions;\n this.validateTags(customTags);\n if (typeof collector !== 'string') {\n this.customOptions.collector = location.origin;\n }\n if (typeof service !== 'string') {\n this.customOptions.service = '';\n }\n if (typeof pagePath !== 'string') {\n this.customOptions.pagePath = '';\n }\n if (typeof serviceVersion !== 'string') {\n this.customOptions.serviceVersion = '';\n }\n if (typeof jsErrors !== 'boolean') {\n this.customOptions.jsErrors = true;\n }\n if (typeof apiErrors !== 'boolean') {\n this.customOptions.apiErrors = true;\n }\n if (typeof resourceErrors !== 'boolean') {\n this.customOptions.resourceErrors = true;\n }\n if (typeof autoTracePerf !== 'boolean') {\n this.customOptions.autoTracePerf = true;\n }\n if (typeof useFmp !== 'boolean') {\n this.customOptions.useFmp = false;\n }\n if (typeof enableSPA !== 'boolean') {\n this.customOptions.enableSPA = false;\n }\n if (typeof traceSDKInternal !== 'boolean') {\n this.customOptions.traceSDKInternal = false;\n }\n if (typeof detailMode !== 'boolean') {\n this.customOptions.detailMode = true;\n }\n if (typeof detailMode !== 'boolean') {\n this.customOptions.detailMode = true;\n }\n if (!Array.isArray(noTraceOrigins)) {\n this.customOptions.noTraceOrigins = [];\n }\n if (typeof traceTimeInterval !== 'number') {\n this.customOptions.traceTimeInterval = 60000;\n }\n if (typeof vue !== 'function') {\n this.customOptions.vue = undefined;\n }\n },\n setCustomTags(tags: TagOption[]) {\n const opt = { ...this.customOptions, customTags: tags };\n if (this.validateTags(tags)) {\n setConfig(opt);\n }\n },\n};\n\nexport default ClientMonitor;\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport ClientMonitor from './monitor';\n\n(window as any).ClientMonitor = ClientMonitor;\n\nexport default ClientMonitor;\n","/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport './lib/index';\n\nexport default ClientMonitor;\n"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/brick-container",
3
- "version": "2.95.8",
3
+ "version": "2.96.0",
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",
@@ -41,18 +41,18 @@
41
41
  "ws": "^8.11.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@next-core/brick-dll": "^2.46.27",
44
+ "@next-core/brick-dll": "^2.47.0",
45
45
  "@next-core/brick-icons": "^2.33.42",
46
46
  "@next-core/custom-antd-styles": "^1.26.2",
47
47
  "@next-core/illustrations": "^0.11.31",
48
48
  "@next-core/less-plugin-css-variables": "^0.2.8",
49
49
  "@next-core/theme": "^1.5.0",
50
50
  "@next-core/webpack-config-factory": "^2.23.0",
51
- "@next-dll/ace": "^2.0.750",
51
+ "@next-dll/ace": "^2.0.751",
52
52
  "@next-dll/d3": "^2.0.80",
53
53
  "@next-dll/echarts": "^2.0.81",
54
- "@next-dll/editor-bricks-helper": "^0.38.95",
55
- "@next-dll/react-dnd": "^0.1.688",
54
+ "@next-dll/editor-bricks-helper": "^0.38.96",
55
+ "@next-dll/react-dnd": "^0.1.689",
56
56
  "babel-loader": "^8.3.0",
57
57
  "clean-webpack-plugin": "^4.0.0",
58
58
  "copy-webpack-plugin": "^6.4.1",
@@ -73,5 +73,5 @@
73
73
  "webpack-dev-server": "^4.11.1",
74
74
  "webpack-merge": "^5.8.0"
75
75
  },
76
- "gitHead": "0731668a59b70d2af2ea048d8cd7b9f5b985f349"
76
+ "gitHead": "d1b08fbee6bc17a041215f683ce8b94a82239982"
77
77
  }