Files
mini-yu/unpackage/dist/build/web/assets/button.BC3KjxGU.js

2 lines
19 KiB
JavaScript
Raw Normal View History

2026-02-10 08:05:03 +08:00
import{J as e,K as t,L as a,M as s,N as n,O as o,P as i,o as r,c as l,w as c,n as u,l as d,e as p,m as h,a as f,x as y,i as m,F as g,p as v,r as b,t as x,u as _,d as S,b as C,Q as $}from"./index-CJxdOECQ.js";function P(e){return!(e=>void 0===e)(e)&&!(e=>null===e)(e)}function k(e){return!Number.isNaN(Number(e))}function z(e){return"boolean"==typeof e}function A(e){const t=typeof e;return null!==e&&("object"===t||"function"===t)}const w=(e,t)=>new Promise((a=>{n(e,{nativeMode:!0}).relativeToViewport().observe(t,(e=>{a(e)}))})),I=()=>e&&e()||t();function j(e,t){e=e.split("."),t=t.split(".");const a=Math.max(e.length,t.length);for(;e.length<a;)e.push("0");for(;t.length<a;)t.push("0");for(let s=0;s<a;s+=1){const a=parseInt(e[s],10),n=parseInt(t[s],10);if(a>n)return 1;if(a<n)return-1}return 0}function N(){let e=!1;return e=!0,true}const B="t",O=I(),T=a&&a()||t(),F=s&&s()||t();function L(...e){for(let t=0;t<e.length;t+=1)if(null!==e[t]&&void 0!==e[t])return e[t];return e[e.length-1]}const M=function(...e){const t={}.hasOwnProperty,a=[];return e.forEach((e=>{if(!e)return;const s=typeof e;if("string"===s||"number"===s)a.push(e);else if(Array.isArray(e)&&e.length){const t=M(...e);t&&a.push(t)}else if("object"===s)for(const n in e)t.call(e,n)&&e[n]&&a.push(n)})),a.join(" ")},E=function(e,t,a=!1,s=!1){var n;let i;return s&&(i=null==(n=document[a?"querySelectorAll":"querySelector"](t))?void 0:n.getBoundingClientRect()),i||new Promise(((s,n)=>{o().in(e)[a?"selectAll":"select"](t).boundingClientRect((e=>{e?s(e):n(e)})).exec()}))};null==F||F.environment,["mac","windows"].includes(null==F?void 0:F.platform);const U=function(e){if(P(e))return k(e=String(e))?`${e}px`:e},R=(e,t,a)=>{const s=String(L(t,""));if(0===s.length)return{length:0,characters:""};if("maxcharacter"===e){let e=0;for(let t=0;t<s.length;t+=1){let n=0;if(n=s.charCodeAt(t)>127||94===s.charCodeAt(t)?2:1,e+n>a)return{length:e,characters:s.slice(0,t)};e+=n}return{length:e,characters:s}}if("maxlength"===e){const e=s.length>a?a:s.length;return{length:e,characters:s.slice(0,e)}}return{length:s.length,characters:s}},D=e=>"string"==typeof e?e.includes("rpx")?parseInt(e,10)*L(null==O?void 0:O.screenWidth,750)/750:parseInt(e,10):L(e,0),G=(e,t,a)=>t?"string"==typeof t?{[`${e}Name`]:t,[`${e}Data`]:{}}:"object"==typeof t?{[`${e}Name`]:"",[`${e}Data`]:t}:{[`${e}Name`]:a,[`${e}Data`]:{}}:{[`${e}Name`]:"",[`${e}Data`]:{}},q=e=>e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()));const H=function(){const e=i();return e[e.length-1]},Z=e=>{let t=0;return()=>{const a=`t_${e}_${t}`;return t+=1,a}},J=(e,t)=>e&&(z(e)&&t||"string"==typeof e)?{name:z(e)?t:e}:A(e)?e:null,V=()=>new Promise((e=>{setTimeout((()=>{e()}),33)})),Q=e=>`data${e.replace(/^(\w)/,((e,t)=>t.toUpperCase()))}`,W=e=>`default${e.replace(/^(\w)/,((e,t)=>t.toUpperCase()))}`,K=[{key:"ariaHidden",type:Boolean},{key:"ariaRole",type:String},{key:"ariaLabel",type:String},{key:"ariaLabelledby",type:String},{key:"ariaDescribedby",type:String},{key:"ariaBusy",type:Boolean}],X=(e,t=!1)=>!(e===Boolean&&!t)&&(e===String?"":void 0),Y={...K.reduce(((e,t)=>({...e,[t.key]:{type:t.type,default:X(t.type)}})),{}),customStyle:{type:[String,Object],default:""}},ee=function(e){!e.properties&&e.props&&(e.properties=e.props),e.properties&&Object.keys(e.properties).forEach((t=>{let a=e.properties[t];var s;(null===(s=a)||"object"!=typeof s||"[object Object]"!==Object.prototype.toString.call(s))&&(a={type:a}),e.properties[t]=a})),e.methods||(e.methods={}),e.lifetimes||(e.lifetimes={});const t=e.created,{controlledProps:a=[]}=e;return e.created=function(...e){t&&t.apply(this,e),a.forEach((({key:e})=>{const t=W(e),a=Q(e);this[a]=this[e],null==this[e]&&(this._selfControlled=!0),null==this[e]&&null!=this[t]&&(this[a]=this[t])}))},e.methods._trigger=function(e,t,s){const n=a.find((t=>t.event===e));if(n){const{key:e}=n;if(this._selfControlled){this[Q(e)]=t[e]}this.$emit(`update:${e}`,t[e],s)}this.$emit(e,t,s)},e};const te=function(e){const{newProps:t,emits:a}=function(e,t){const a={},s=[],n=/^on[A-Z][a-z]/,o=Object.values(t).map((e=>e.key)),i=o.map((e=>W(e)));return Objec