| | |
| | | return str.charAt(0).toUpperCase() + str.slice(1); |
| | | }); |
| | | const toHandlerKey = cacheStringFunction((str) => { |
| | | const s = str ? `on${capitalize(str)}` : ``; |
| | | return s; |
| | | const s2 = str ? `on${capitalize(str)}` : ``; |
| | | return s2; |
| | | }); |
| | | const hasChanged = (value, oldValue) => !Object.is(value, oldValue); |
| | | const invokeArrayFns$1 = (fns, arg) => { |
| | |
| | | }); |
| | | }; |
| | | const looseToNumber = (val) => { |
| | | const n = parseFloat(val); |
| | | return isNaN(n) ? val : n; |
| | | const n2 = parseFloat(val); |
| | | return isNaN(n2) ? val : n2; |
| | | }; |
| | | let _globalThis; |
| | | const getGlobalThis = () => { |
| | | return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); |
| | | }; |
| | | function normalizeStyle(value) { |
| | | if (isArray(value)) { |
| | | const res = {}; |
| | | for (let i = 0; i < value.length; i++) { |
| | | const item = value[i]; |
| | | const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); |
| | | if (normalized) { |
| | | for (const key in normalized) { |
| | | res[key] = normalized[key]; |
| | | } |
| | | } |
| | | } |
| | | return res; |
| | | } else if (isString(value) || isObject(value)) { |
| | | return value; |
| | | } |
| | | } |
| | | const listDelimiterRE = /;(?![^(]*\))/g; |
| | | const propertyDelimiterRE = /:([^]+)/; |
| | | const styleCommentRE = /\/\*[^]*?\*\//g; |
| | | function parseStringStyle(cssText) { |
| | | const ret = {}; |
| | | cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { |
| | | if (item) { |
| | | const tmp = item.split(propertyDelimiterRE); |
| | | tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); |
| | | } |
| | | }); |
| | | return ret; |
| | | } |
| | | function normalizeClass(value) { |
| | | let res = ""; |
| | | if (isString(value)) { |
| | | res = value; |
| | | } else if (isArray(value)) { |
| | | for (let i = 0; i < value.length; i++) { |
| | | const normalized = normalizeClass(value[i]); |
| | | if (normalized) { |
| | | res += normalized + " "; |
| | | } |
| | | } |
| | | } else if (isObject(value)) { |
| | | for (const name in value) { |
| | | if (value[name]) { |
| | | res += name + " "; |
| | | } |
| | | } |
| | | } |
| | | return res.trim(); |
| | | } |
| | | const toDisplayString = (val) => { |
| | | return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); |
| | | }; |
| | |
| | | } |
| | | if (!isArray(name)) |
| | | name = [name]; |
| | | name.forEach((n) => emitter.off(n, callback)); |
| | | name.forEach((n2) => emitter.off(n2, callback)); |
| | | }, OffProtocol); |
| | | const $emit = defineSyncApi(API_EMIT, (name, ...args) => { |
| | | emitter.emit(name, ...args); |
| | |
| | | appVersion: "1.0.0", |
| | | appVersionCode: "100", |
| | | appLanguage: getAppLanguage(hostLanguage), |
| | | uniCompileVersion: "4.24", |
| | | uniRuntimeVersion: "4.24", |
| | | uniCompileVersion: "4.28", |
| | | uniRuntimeVersion: "4.28", |
| | | uniPlatform: "mp-weixin", |
| | | deviceBrand, |
| | | deviceModel: model, |
| | |
| | | warn$1(`inject() can only be used inside setup() or functional components.`); |
| | | } |
| | | } |
| | | /*! #__NO_SIDE_EFFECTS__ */ |
| | | // @__NO_SIDE_EFFECTS__ |
| | | function defineComponent(options, extraOptions) { |
| | | return isFunction(options) ? ( |
| | | // #8326: extend call and options.name access are considered side-effects |
| | | // by Rollup, so we have to wrap it in a pure-annotated IIFE. |
| | | /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() |
| | | ) : options; |
| | | } |
| | | const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; |
| | | function onActivated(hook, target) { |
| | | registerKeepAliveHook(hook, "a", target); |
| | |
| | | } |
| | | return ret; |
| | | } |
| | | function stringifyStyle(value) { |
| | | if (isString(value)) { |
| | | return value; |
| | | } |
| | | return stringify(normalizeStyle(value)); |
| | | } |
| | | function stringify(styles) { |
| | | let ret = ""; |
| | | if (!styles || isString(styles)) { |
| | | return ret; |
| | | } |
| | | for (const key in styles) { |
| | | ret += `${key.startsWith(`--`) ? key : hyphenate(key)}:${styles[key]};`; |
| | | } |
| | | return ret; |
| | | } |
| | | function setRef(ref2, id, opts = {}) { |
| | | const { $templateRefs } = getCurrentInstance(); |
| | | $templateRefs.push({ i: id, r: ref2, k: opts.k, f: opts.f }); |
| | | } |
| | | const o = (value, key) => vOn(value, key); |
| | | const f = (source, renderItem) => vFor(source, renderItem); |
| | | const s = (value) => stringifyStyle(value); |
| | | const e = (target, ...sources) => extend(target, ...sources); |
| | | const n = (value) => normalizeClass(value); |
| | | const t = (val) => toDisplayString(val); |
| | | const p = (props) => renderProps(props); |
| | | const sr = (ref2, id, opts) => setRef(ref2, id, opts); |
| | | function createApp$1(rootComponent, rootProps = null) { |
| | | rootComponent && (rootComponent.mpType = "app"); |
| | | return createVueApp(rootComponent, rootProps).use(plugin); |
| | |
| | | const onShow = /* @__PURE__ */ createHook(ON_SHOW); |
| | | const onHide = /* @__PURE__ */ createHook(ON_HIDE); |
| | | const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH); |
| | | const onLoad = /* @__PURE__ */ createHook(ON_LOAD); |
| | | exports._export_sfc = _export_sfc; |
| | | exports.computed = computed; |
| | | exports.createSSRApp = createSSRApp; |
| | | exports.defineComponent = defineComponent; |
| | | exports.e = e; |
| | | exports.f = f; |
| | | exports.getCurrentInstance = getCurrentInstance; |
| | | exports.index = index; |
| | | exports.n = n; |
| | | exports.o = o; |
| | | exports.onHide = onHide; |
| | | exports.onLaunch = onLaunch; |
| | | exports.onLoad = onLoad; |
| | | exports.onMounted = onMounted; |
| | | exports.onShow = onShow; |
| | | exports.onUnmounted = onUnmounted; |
| | | exports.p = p; |
| | | exports.ref = ref; |
| | | exports.resolveComponent = resolveComponent; |
| | | exports.s = s; |
| | | exports.sr = sr; |
| | | exports.t = t; |
| | | exports.unref = unref; |
| | | exports.watch = watch; |
| | | exports.wx$1 = wx$1; |