2 lines
44 KiB
JavaScript
2 lines
44 KiB
JavaScript
/*! For license information please see 616.204d2139.js.LICENSE.txt */
|
|
"use strict";(self.webpackJsonp=self.webpackJsonp||[]).push([[616],{"5279":function(e,t,i){i.d(t,{"JO":function(){return I},"II":function(){return P},"cW":function(){return L},"pf":function(){return H},"rs":function(){return O},"xv":function(){return R},"gx":function(){return Y},"G7":function(){return N}});var o=i(7294);const helper_manipulatePropsFunction=(e,t={})=>{const{"dangerouslySetInnerHTML":i,"style":o}=e;return"string"!=typeof o&&(t.style=o),Object.assign(Object.assign({},t),{"dangerouslySetInnerHTML":i})};var n=i(7210),s=i(7109);const r=(0,n.GH)(class extends n.mv{"constructor"(){super(),this.__registerHost(),this.type=void 0,this.size="23",this.color=void 0}"render"(){const{"type":e,"size":t,"color":i}=this,o=null==e?void 0:e.replace(/_/g,"-"),r=(0,s.c)({[`weui-icon-${o}`]:!0}),a={"font-size":`${t}px`,"color":i};return(0,n.h)(n.AA,{"class":r,"style":a})}static get"style"(){return'.weui-icon-circle:before{content:""}.weui-icon-download:before{content:""}.weui-icon-info:before{content:""}.weui-icon-safe-success:before{content:""}.weui-icon-safe-warn:before{content:""}.weui-icon-success:before{content:""}.weui-icon-success-circle:before{content:""}.weui-icon-success-no-circle:before{content:""}.weui-icon-waiting:before{content:""}.weui-icon-waiting-circle:before{content:""}.weui-icon-warn:before{content:""}.weui-icon-info-circle:before{content:""}.weui-icon-cancel:before{content:""}.weui-icon-search:before{content:""}.weui-icon-clear:before{content:""}.weui-icon-back:before{content:""}.weui-icon-delete:before{content:""}.weui-icon-success{color:#09bb07;font-size:23px}.weui-icon-waiting{color:#10aeff;font-size:23px}.weui-icon-warn{color:#f43530;font-size:23px}.weui-icon-info{color:#10aeff;font-size:23px}.weui-icon-success-circle,.weui-icon-success-no-circle{color:#09bb07;font-size:23px}.weui-icon-waiting-circle{color:#10aeff;font-size:23px}.weui-icon-circle{color:#c9c9c9;font-size:23px}.weui-icon-download,.weui-icon-info-circle{color:#09bb07;font-size:23px}.weui-icon-safe-success{color:#09bb07}.weui-icon-safe-warn{color:#ffbe00}.weui-icon-cancel{color:#f43530;font-size:22px}.weui-icon-search,.weui-icon-clear{color:#b2b2b2;font-size:14px}.weui-icon-delete.weui-icon_gallery-delete{color:#fff;font-size:22px}.weui-icon_msg{font-size:93px}.weui-icon_msg.weui-icon-warn{color:#f76260}.weui-icon_msg-primary{font-size:93px}.weui-icon_msg-primary.weui-icon-warn{color:#ffbe00}'}},[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]);const a=function defineCustomElement$1(){if("undefined"==typeof customElements)return;["taro-icon-core"].forEach(e=>{if("taro-icon-core"===e)customElements.get(e)||customElements.define(e,r)})};function getTrueType(e,t,i){if("search"===t&&(e="search"),i&&(e="password"),void 0===e)return"text";if(!e)throw new Error("unexpected type");return"digit"===e&&(e="number"),e}function fixControlledValue(e){return null!=e?e:""}const l=(0,n.GH)(class extends n.mv{"constructor"(){super(),this.__registerHost(),this.onInput=(0,n.yM)(this,"input",7),this.onPaste=(0,n.yM)(this,"paste",7),this.onFocus=(0,n.yM)(this,"focus",7),this.onBlur=(0,n.yM)(this,"blur",7),this.onConfirm=(0,n.yM)(this,"confirm",7),this.onChange=(0,n.yM)(this,"change",7),this.onKeyDown=(0,n.yM)(this,"keydown",7),this.isOnComposition=!1,this.isOnPaste=!1,this.onInputExcuted=!1,this.handleInput=e=>{e.stopPropagation();const{"type":t,"maxlength":i,"confirmType":o,"password":n}=this;if(!this.isOnComposition&&!this.onInputExcuted){let s=e.target.value;const r=getTrueType(t,o,n);this.onInputExcuted=!0,"number"===r&&s&&i>-1&&i<=s.length&&(s=s.substring(0,i),e.target.value=s),this.value=s,this.onInput.emit({"value":s,"cursor":s.length}),this.onInputExcuted=!1}},this.handlePaste=e=>{e.stopPropagation(),this.isOnPaste=!0,this.onPaste.emit({"value":e.target.value})},this.handleFocus=e=>{e.stopPropagation(),this.onInputExcuted=!1,this.onFocus.emit({"value":e.target.value})},this.handleBlur=e=>{e.stopPropagation(),this.onBlur.emit({"value":e.target.value})},this.handleChange=e=>{e.stopPropagation(),this.onChange.emit({"value":e.target.value}),this.isOnPaste&&(this.isOnPaste=!1,this.value=e.target.value,this.onInput.emit({"value":e.target.value,"cursor":e.target.value.length}))},this.handleKeyDown=e=>{e.stopPropagation();const{"value":t}=e.target,i=e.keyCode||e.code;this.onInputExcuted=!1,this.onKeyDown.emit({"value":t,"cursor":t.length,"keyCode":i}),13===i&&this.onConfirm.emit({"value":t})},this.handleComposition=e=>{e.stopPropagation(),e.target instanceof HTMLInputElement&&("compositionend"===e.type?(this.isOnComposition=!1,this.value=e.target.value,this.onInput.emit({"value":e.target.value,"cursor":e.target.value.length})):this.isOnComposition=!0)},this.handleBeforeInput=e=>{if(!e.data)return;const t=e.data&&/[0-9]/.test(e.data);"number"!==this.type||t||e.preventDefault(),"digit"!==this.type||t||("."!==e.data||"."===e.data&&e.target.value.indexOf(".")>-1)&&e.preventDefault()},this.value="",this.type=void 0,this.password=!1,this.placeholder=void 0,this.disabled=!1,this.maxlength=140,this.autoFocus=!1,this.confirmType="done",this.name=void 0,this.nativeProps={}}async"focus"(){this.inputRef.focus()}"watchAutoFocus"(e,t){var i;!t&&e&&(null===(i=this.inputRef)||void 0===i||i.focus())}"watchValue"(e){const t=fixControlledValue(e);this.inputRef.value!==t&&(this.inputRef.value=t)}"componentDidLoad"(){var e,t,i,o,n;"file"===this.type?(this.fileListener=()=>{this.onInput.emit()},null===(e=this.inputRef)||void 0===e||e.addEventListener("change",this.fileListener)):(null===(t=this.inputRef)||void 0===t||t.addEventListener("compositionstart",this.handleComposition),null===(i=this.inputRef)||void 0===i||i.addEventListener("compositionend",this.handleComposition),null===(o=this.inputRef)||void 0===o||o.addEventListener("beforeinput",this.handleBeforeInput),null===(n=this.inputRef)||void 0===n||n.addEventListener("textInput",this.handleBeforeInput))}"disconnectedCallback"(){var e,t,i,o,n;"file"===this.type?null===(e=this.inputRef)||void 0===e||e.removeEventListener("change",this.fileListener):(null===(t=this.inputRef)||void 0===t||t.removeEventListener("compositionstart",this.handleComposition),null===(i=this.inputRef)||void 0===i||i.removeEventListener("compositionend",this.handleComposition),null===(o=this.inputRef)||void 0===o||o.removeEventListener("beforeinput",this.handleBeforeInput),null===(n=this.inputRef)||void 0===n||n.removeEventListener("textInput",this.handleBeforeInput))}"render"(){const{"value":e,"type":t,"password":i,"placeholder":o,"autoFocus":s,"disabled":r,"maxlength":a,"confirmType":l,"name":c,"nativeProps":h}=this;return(0,n.h)("input",Object.assign({"ref":e=>{this.inputRef=e,s&&e&&e.focus()},"class":"weui-input","type":getTrueType(t,l,i),"placeholder":o,"autoFocus":s,"disabled":r,"maxlength":a,"name":c,"onInput":this.handleInput,"onFocus":this.handleFocus,"onBlur":this.handleBlur,"onChange":this.handleChange,"onKeyDown":this.handleKeyDown,"onPaste":this.handlePaste,"onCompositionStart":this.handleComposition,"onCompositionEnd":this.handleComposition},h,{"value":fixControlledValue(e)}))}get"el"(){return this}static get"watchers"(){return{"autoFocus":["watchAutoFocus"],"value":["watchValue"]}}static get"style"(){return".weui-input{-webkit-appearance:none;font-size:inherit;color:inherit;background-color:transparent;border:0;outline:0;width:100%;height:1.47059em;line-height:1.47059}.weui-input::-webkit-outer-spin-button,.weui-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}taro-input-core{display:block}input{text-overflow:clip;text-align:inherit;white-space:nowrap;height:1.4rem;display:block;overflow:hidden}"}},[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]);const c=function taro_input_core_defineCustomElement$1(){if("undefined"==typeof customElements)return;["taro-input-core"].forEach(e=>{if("taro-input-core"===e)customElements.get(e)||customElements.define(e,l)})},h=102,u=34,d=(0,n.GH)(class extends n.mv{"constructor"(){super(),this.__registerHost(),this.onColumnChange=(0,n.yM)(this,"columnChange",7),this.mode=void 0,this.range=[],this.rangeKey=void 0,this.height=void 0,this.columnId=void 0,this.updateHeight=void 0,this.updateDay=void 0,this.startY=void 0,this.preY=void 0,this.hadMove=void 0,this.touchEnd=void 0,this.isMove=void 0}"getPosition"(){const e=this.touchEnd?.3:0,t=`translate3d(0, ${this.height}px, 0)`,i=`transform ${e}s`;return{"transform":t,"-webkit-transform":t,"transition":i,"-webkit-transition":i}}"formulaUnlimitedScroll"(e,t,i){const{"height":o,"updateHeight":n,"columnId":s}=this,r="up"===i?1:-1;this.touchEnd=!1,n(-e*r*u+o,s),requestAnimationFrame(()=>{this.touchEnd=!0;const i=Math.round(t/-34)+e*r;n(h-u*i,s,!0)})}async"handleMoveStart"(e){this.startY=e,this.preY=e,this.hadMove=!1}async"handleMoving"(e){const t=e,i=t-this.preY;this.preY=t,this.touchEnd=!1,Math.abs(t-this.startY)>10&&(this.hadMove=!0);let o=this.height+i;"time"===this.mode&&("0"===this.columnId?(o>0&&(o=-816+i),o<-850&&(o=-34+i)):"1"===this.columnId&&(o>0&&(o=-2040+i),o<-2074&&(o=-34+i))),this.updateHeight(o,this.columnId)}async"handleMoveEnd"(e){const{"mode":t,"range":i,"height":o,"updateHeight":n,"columnId":s}=this,r=-34*(i.length-1),a=e;let l;if(this.touchEnd=!0,this.hadMove)l=o-h;else{const e=window.innerHeight;if(l=o-h-(a-(e-119)),"time"===t)if("0"===s){if(l>-85)return this.formulaUnlimitedScroll(24,l,"up");if(l<-969)return this.formulaUnlimitedScroll(24,l,"down")}else if("1"===s){if(l>-85)return this.formulaUnlimitedScroll(60,l,"up");if(l<-2193)return this.formulaUnlimitedScroll(60,l,"down")}}l>0&&(l=0),l<r&&(l=r);const c=Math.round(l/-34),d=h-u*c;"date"===this.mode&&"function"==typeof this.updateDay&&("0"===this.columnId&&this.updateDay(+this.range[c].replace(/[^0-9]/gi,""),0),"1"===this.columnId&&this.updateDay(+this.range[c].replace(/[^0-9]/gi,""),1),"2"===this.columnId&&this.updateDay(+this.range[c].replace(/[^0-9]/gi,""),2)),n(d,s,"time"===t),this.onColumnChange.emit({"columnId":s,"height":d})}"onMouseDown"(e){this.isMove=!0,this.handleMoveStart(e.clientY)}"onMouseMove"(e){this.isMove&&this.handleMoving(e.clientY)}"onMouseMoveEnd"(e){this.isMove&&(this.isMove=!1,this.handleMoveEnd(e.clientY))}"onTouchStart"(e){this.handleMoveStart(e.changedTouches[0].clientY)}"onTouchMove"(e){this.handleMoving(e.changedTouches[0].clientY)}"onTouchEnd"(e){this.handleMoveEnd(e.changedTouches[0].clientY)}"render"(){const{"range":e,"rangeKey":t}=this,i=e.map(e=>{const i=t?e[t]:e;return(0,n.h)("div",{"class":"weui-picker__item"},i)});return(0,n.h)(n.AA,{"class":"weui-picker__group"},(0,n.h)("div",{"class":"weui-picker__mask"}),(0,n.h)("div",{"class":"weui-picker__indicator"}),(0,n.h)("div",{"class":"weui-picker__content","style":this.getPosition()},i))}},[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[3,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[3,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]);function getTimeRange(e,t){const i=[];for(let o=e;o<=t;o++)i.push(`${o<10?"0":""}${o}`);return i}const p=["20","21","22","23",...getTimeRange(0,23),"00","01","02","03"],f=["56","57","58","59",...getTimeRange(0,59),"00","01","02","03"];function verifyValue(e,t){return!isNaN(+e)&&e>=0&&e<t.length}function verifyTime(e){if(!/^\d{1,2}:\d{1,2}$/.test(e))return!1;const t=e.split(":").map(e=>+e);return!(t[0]<0||t[0]>23)&&!(t[1]<0||t[1]>59)}function compareTime(e,t){const i=e.split(":").map(e=>+e),o=t.split(":").map(e=>+e);return i[0]<o[0]||i[0]===o[0]&&i[1]<=o[1]}function verifyDate(e){if(!e)return!1;const t=new Date(e.replace(/-/g,"/"));return!isNaN(t.getMonth())&&t}function formatValue(e){let t;return t=Array.isArray(e)?e.map(e=>String(e)):e,t}function getDateRange(e,t){const i=[];for(let o=e;o<=t;o++)i.push(o);return i}function getYearRange(e,t){return getDateRange(e,t)}function getMonthRange(e,t,i){let o=1,n=12;return e.getFullYear()===i&&(o=e.getMonth()+1),t.getFullYear()===i&&(n=t.getMonth()+1),getDateRange(o,n)}function getDayRange(e,t,i,o){let n=1,s=function getMaxDay(e,t){return 4===t||6===t||9===t||11===t?30:2===t?e%4==0&&e%100!=0||e%400==0?29:28:31}(i,o);return e.getFullYear()===i&&e.getMonth()+1===o&&(n=e.getDate()),t.getFullYear()===i&&t.getMonth()+1===o&&(s=t.getDate()),getDateRange(n,s)}const m=(0,n.GH)(class extends n.mv{"constructor"(){super(),this.__registerHost(),this.onChange=(0,n.yM)(this,"change",7),this.onColumnChange=(0,n.yM)(this,"columnchange",7),this.onCancel=(0,n.yM)(this,"cancel",7),this.index=[],this.showPicker=()=>{this.disabled||(this.height=this.getHeightByIndex(),this.hidden=!1)},this.getHeightByIndex=()=>this.index.map(e=>{let t=0;return"time"===this.mode&&(t=136),h-u*e-t}),this.hidePicker=()=>{this.fadeOut=!0,setTimeout(()=>{this.hidden=!0,this.fadeOut=!1},350)},this.handleChange=()=>{this.hidePicker(),this.index=this.height.map(e=>(h-e)/u);let e=this.index.length&&"selector"!==this.mode?this.index:this.index[0];if("time"===this.mode){const t=[p.slice(),f.slice()],i=this.index.map((e,i)=>t[i][e]);this.index=i.map(e=>parseInt(e)),e=i.join(":")}if("date"===this.mode){const{"_start":t,"_end":i,"_updateValue":o}=this.pickerDate,n=o[0],s=o[1],r=getYearRange(t.getFullYear(),i.getFullYear()),a=getMonthRange(t,i,n),l=getDayRange(t,i,n,s),c=r[this.index[0]],h=a[this.index[1]],u=l[this.index[2]];e="year"===this.fields?[c]:"month"===this.fields?[c,h]:[c,h,u],e=e.map(e=>e<10?`0${e}`:e).join("-")}this.value=e,this.pickerValue=this.value,this.onChange.emit({"value":e})},this.handleColumnChange=e=>{const{"columnId":t,"height":i}=e.detail;this.onColumnChange.emit({"column":Number(t),"value":(h-i)/u})},this.handleCancel=()=>{this.hidePicker(),this.onCancel.emit()},this.updateHeight=(e,t,i=!1)=>{const o=[...this.height];if(o[t]=e,this.height=o,i){let{"start":e,"end":t}=this;if(verifyTime(e)||(e="00:00"),verifyTime(t)||(t="23:59"),!compareTime(e,t))return;const i=[p.slice(),f.slice()],o=this.height.map(e=>(h-e)/u).map((e,t)=>i[t][e]).join(":");if(compareTime(e,o)){if(!compareTime(o,t)){const e=t.split(":").map(e=>h-u*(+e+4));requestAnimationFrame(()=>this.height=e)}}else{const t=e.split(":").map(e=>h-u*(+e+4));requestAnimationFrame(()=>this.height=t)}}},this.updateDay=(e,t)=>{const{"_start":i,"_end":o,"_updateValue":n}=this.pickerDate;n[t]=e;const s=n[0],r=n[1],a=n[2];if(0===t){const e=getMonthRange(i,o,s),t=e[e.length-1],a=e[0];r>t&&(n[1]=t),r<a&&(n[1]=a);const l=e.indexOf(n[1]),c=h-u*l;this.updateDay(n[1],1),this.updateHeight(c,"1")}else if(1===t){const e=getDayRange(i,o,s,r),t=e[e.length-1],l=e[0];a>t&&(n[2]=t),a<l&&(n[2]=l);const c=e.indexOf(n[2]),d=h-u*c;this.updateDay(n[2],2),this.updateHeight(d,"2")}},this.getSelector=()=>(0,n.h)("taro-picker-group",{"range":this.range,"rangeKey":this.rangeKey,"height":this.height[0],"updateHeight":this.updateHeight,"columnId":"0"}),this.getMultiSelector=()=>this.range.map((e,t)=>(0,n.h)("taro-picker-group",{"range":e,"rangeKey":this.rangeKey,"height":this.height[t],"updateHeight":this.updateHeight,"onColumnChange":this.handleColumnChange,"columnId":String(t)})),this.getTimeSelector=()=>{const e=p.slice(),t=f.slice();return[(0,n.h)("taro-picker-group",{"mode":"time","range":e,"height":this.height[0],"updateHeight":this.updateHeight,"columnId":"0"}),(0,n.h)("taro-picker-group",{"mode":"time","range":t,"height":this.height[1],"updateHeight":this.updateHeight,"columnId":"1"})]},this.getDateSelector=()=>{const{"fields":e,"height":t}=this,{"_start":i,"_end":o,"_updateValue":s}=this.pickerDate,r=s[0],a=s[1],l=getYearRange(i.getFullYear(),o.getFullYear()).map(e=>`${e}年`),c=getMonthRange(i,o,r).map(e=>`${e<10?`0${e}`:e}月`),h=getDayRange(i,o,r,a).map(e=>`${e<10?`0${e}`:e}日`),u=[(0,n.h)("taro-picker-group",{"mode":"date","range":l,"height":t[0],"updateDay":this.updateDay,"updateHeight":this.updateHeight,"columnId":"0"})];return"month"!==e&&"day"!==e||u.push((0,n.h)("taro-picker-group",{"mode":"date","range":c,"height":t[1],"updateDay":this.updateDay,"updateHeight":this.updateHeight,"columnId":"1"})),"day"===e&&u.push((0,n.h)("taro-picker-group",{"mode":"date","range":h,"height":t[2],"updateDay":this.updateDay,"updateHeight":this.updateHeight,"columnId":"2"})),u},this.mode="selector",this.disabled=!1,this.range=[],this.rangeKey=void 0,this.value=void 0,this.start="",this.end="",this.fields="day",this.name="",this.textProps={},this.pickerValue=[],this.height=[],this.hidden=!0,this.fadeOut=!1,this.isWillLoadCalled=!1}"componentWillLoad"(){this.isWillLoadCalled=!0,this.handleProps()}"componentDidLoad"(){this.overlay&&document.body.appendChild(this.overlay)}"disconnectedCallback"(){var e;this.overlay&&(null===(e=this.overlay.parentNode)||void 0===e||e.removeChild(this.overlay))}"onPropsChange"(){this.isWillLoadCalled&&this.handleProps()}"handleProps"(){const{"mode":e,"start":t,"end":i}=this;if("selector"===e){const e=this.value;this.index=[verifyValue(e,this.range)?Math.floor(e):0]}else if("multiSelector"===e){const e=this.value;this.index=[],this.range.forEach((t,i)=>{const o=null==e?void 0:e[i],n=verifyValue(o,t)?Math.floor(o):0;this.index.push(n)})}else if("time"===e){let e=this.value;verifyTime(e)||(console.warn("time picker value illegal"),e="0:0");const t=e.split(":").map(e=>+e);this.index=t}else{if("date"!==e)throw new Error(`Picker not support "${e}" mode.`);{let e=verifyDate(this.value)||new Date((new Date).setHours(0,0,0,0));const o=verifyDate(t)||new Date("1970/01/01"),n=verifyDate(i)||new Date("2999/01/01");if(!(o<=n))throw new Error("Picker start time must be less than end time.");e>=o&&e<=n||(e=o);const s=e.getFullYear(),r=e.getMonth()+1,a=e.getDate(),l=getYearRange(o.getFullYear(),n.getFullYear()),c=getMonthRange(o,n,s),h=getDayRange(o,n,s,r);this.index=[l.indexOf(s),c.indexOf(r),h.indexOf(a)],this.pickerDate&&this.pickerDate._value.getTime()===e.getTime()&&this.pickerDate._start.getTime()===o.getTime()&&this.pickerDate._end.getTime()===n.getTime()||(this.pickerDate={"_value":e,"_start":o,"_end":n,"_updateValue":[s,r,a]})}}if(this.height=this.getHeightByIndex(),this.pickerValue=this.value,"date"===e){const e=this.pickerValue;"month"===this.fields?this.pickerValue=e.split("-").slice(0,2).join("-"):"year"===this.fields&&(this.pickerValue=e.split("-")[0])}}"render"(){var e,t;const{"name":i,"mode":o,"fadeOut":r,"hidden":a}=this;let l;switch(o){case"multiSelector":l=this.getMultiSelector();break;case"time":l=this.getTimeSelector();break;case"date":l=this.getDateSelector();break;default:l=this.getSelector()}const c=(0,s.c)("weui-mask","weui-animate-fade-in",{"weui-animate-fade-out":r}),h=(0,s.c)("weui-picker","weui-animate-slide-up",{"weui-animate-slide-down":r}),u=a?{"display":"none"}:{};return(0,n.h)(n.AA,null,(0,n.h)("div",{"onClick":this.showPicker},(0,n.h)("slot",null),(0,n.h)("input",{"type":"hidden","name":i,"value":formatValue(this.pickerValue)})),(0,n.h)("div",{"class":"weui-picker__overlay","style":u,"ref":e=>{this.overlay=e}},(0,n.h)("div",{"class":c,"onClick":this.handleCancel}),(0,n.h)("div",{"class":h},(0,n.h)("div",{"class":"weui-picker__hd"},(0,n.h)("div",{"class":"weui-picker__action","onClick":this.handleCancel},null!==(e=this.textProps.cancelText)&&void 0!==e?e:"取消"),(0,n.h)("div",{"class":"weui-picker__action","onClick":this.handleChange},null!==(t=this.textProps.okText)&&void 0!==t?t:"确定")),(0,n.h)("div",{"class":"weui-picker__bd"},l),(0,n.h)("input",{"type":"hidden","name":i,"value":formatValue(this.pickerValue)}))))}get"el"(){return this}static get"watchers"(){return{"mode":["onPropsChange"],"value":["onPropsChange"],"range":["onPropsChange"],"start":["onPropsChange"],"end":["onPropsChange"]}}static get"style"(){return'.weui-mask{z-index:1000;background:rgba(0,0,0,.6);position:fixed;inset:0}.weui-mask_transparent{z-index:1000;position:fixed;inset:0}@-webkit-keyframes weuiSlideUp{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translate(0,0);transform:translate(0,0)}}@keyframes weuiSlideUp{0%{-webkit-transform:translateY(100%);transform:translateY(100%)}to{-webkit-transform:translate(0,0);transform:translate(0,0)}}.weui-animate-slide-up{-webkit-animation:.3s forwards weuiSlideUp;animation:.3s forwards weuiSlideUp}@-webkit-keyframes weuiSlideDown{0%{-webkit-transform:translate(0,0);transform:translate(0,0)}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes weuiSlideDown{0%{-webkit-transform:translate(0,0);transform:translate(0,0)}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.weui-animate-slide-down{-webkit-animation:.3s forwards weuiSlideDown;animation:.3s forwards weuiSlideDown}@-webkit-keyframes weuiFadeIn{0%{opacity:0}to{opacity:1}}@keyframes weuiFadeIn{0%{opacity:0}to{opacity:1}}.weui-animate-fade-in{-webkit-animation:.3s forwards weuiFadeIn;animation:.3s forwards weuiFadeIn}@-webkit-keyframes weuiFadeOut{0%{opacity:1}to{opacity:0}}@keyframes weuiFadeOut{0%{opacity:1}to{opacity:0}}.weui-animate-fade-out{-webkit-animation:.3s forwards weuiFadeOut;animation:.3s forwards weuiFadeOut}.weui-picker{-webkit-box-sizing:border-box;box-sizing:border-box;z-index:5000;background-color:var(--weui-BG-2);padding-left:0;padding-left:constant(safe-area-inset-left);padding-left:env(safe-area-inset-left);padding-right:0;padding-right:constant(safe-area-inset-right);padding-right:env(safe-area-inset-right);-webkit-backface-visibility:hidden;backface-visibility:hidden;width:100%;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s, -webkit-transform .3s;position:fixed;bottom:0;left:0;-webkit-transform:translateY(100%);transform:translateY(100%)}.weui-picker__hd{text-align:center;background-color:#fff;padding:9px 15px;font-size:17px;display:-ms-flexbox;display:flex;position:relative}.weui-picker__hd:after{content:" ";color:#e5e5e5;-webkit-transform-origin:0 100%;transform-origin:0 100%;border-bottom:1px solid #e5e5e5;height:1px;position:absolute;bottom:0;left:0;right:0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.weui-picker__action{color:#1aad19;-ms-flex:1;flex:1;display:block}.weui-picker__action:first-child{text-align:left;color:#888}.weui-picker__action:last-child{text-align:right}.weui-picker__bd{background-color:#fff;height:238px;display:-ms-flexbox;display:flex;position:relative;overflow:hidden}.weui-picker__group{-ms-flex:1;flex:1;height:100%;position:relative}.weui-picker__mask{z-index:3;background-color:transparent;background-image:-webkit-gradient(linear,left top, left bottom,from(rgba(255,255,255,.95)),to(rgba(255,255,255,.6))),-webkit-gradient(linear,left top, left bottom,from(rgba(255,255,255,.6)),to(rgba(255,255,255,.95)));background-image:linear-gradient(rgba(255,255,255,.95),rgba(255,255,255,.6)),linear-gradient(rgba(255,255,255,.6),rgba(255,255,255,.95));background-position:top,bottom;background-repeat:no-repeat;background-size:100% 102px;background-attachment:scroll,scroll;background-origin:padding-box,padding-box;background-clip:border-box,border-box;width:100%;height:100%;margin:0 auto;position:absolute;top:0;left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}.weui-picker__indicator{z-index:3;width:100%;height:34px;position:absolute;top:102px;left:0}.weui-picker__indicator:before{content:" ";color:#e5e5e5;-webkit-transform-origin:0 0;transform-origin:0 0;border-top:1px solid #e5e5e5;height:1px;position:absolute;top:0;left:0;right:0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.weui-picker__indicator:after{content:" ";color:#e5e5e5;-webkit-transform-origin:0 100%;transform-origin:0 100%;border-bottom:1px solid #e5e5e5;height:1px;position:absolute;bottom:0;left:0;right:0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.weui-picker__content{width:100%;position:absolute;top:0;left:0}.weui-picker__item{text-align:center;color:#000;text-overflow:ellipsis;white-space:nowrap;height:34px;padding:0;line-height:34px;overflow:hidden}.weui-picker__item_disabled{color:#999}.weui-picker,.weui-picker__hd{font-size:12px}'}},[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"textProps":[16],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}]);const g=function taro_picker_core_defineCustomElement$1(){if("undefined"==typeof customElements)return;["taro-picker-core","taro-picker-group"].forEach(e=>{switch(e){case"taro-picker-core":customElements.get(e)||customElements.define(e,m);break;case"taro-picker-group":customElements.get(e)||function picker_group_defineCustomElement(){if("undefined"==typeof customElements)return;["taro-picker-group"].forEach(e=>{"taro-picker-group"===e&&(customElements.get(e)||customElements.define(e,d))})}()}})};var w=i(6585);function handleStencilNodes(e){var t;null===(t=null==e?void 0:e.childNodes)||void 0===t||t.forEach(e=>{e.nodeType===document.COMMENT_NODE&&e["s-cn"]&&(e["s-cn"]=!1),e.nodeType!==document.COMMENT_NODE&&e["s-sr"]&&(e["s-sr"]=!1)})}function easeOutScroll(e,t,i=500,o){if(e===t||"number"!=typeof e)return;const n=t-e,s=Date.now(),r=t>=e;!function step(){e=function linear(e,t,i,o){return i*e/o+t}(Date.now()-s,e,n,i),r&&e>=t||!r&&t>=e?o(t):(o(e),requestAnimationFrame(step))}()}const v=(0,n.GH)(class extends n.mv{"constructor"(){super(),this.__registerHost(),this.onScroll=(0,n.yM)(this,"scroll",3),this.onScrollToUpper=(0,n.yM)(this,"scrolltoupper",3),this.onScrollToLower=(0,n.yM)(this,"scrolltolower",3),this._scrollLeft=0,this._scrollTop=0,this.upperAndLower=(0,w.d)(()=>{const{"offsetWidth":e,"offsetHeight":t,"scrollLeft":i,"scrollTop":o,"scrollHeight":n,"scrollWidth":s}=this.el,r=Number(this.lowerThreshold),a=Number(this.upperThreshold);!isNaN(r)&&(this.scrollY&&t+o+r>=n||this.scrollX&&e+i+r>=s)&&this.onScrollToLower.emit({"direction":this.scrollX?"right":this.scrollY?"bottom":""}),!isNaN(a)&&(this.scrollY&&o<=a||this.scrollX&&i<=a)&&this.onScrollToUpper.emit({"direction":this.scrollX?"left":this.scrollY?"top":""})},200),this.scrollX=!1,this.scrollY=!1,this.upperThreshold=50,this.lowerThreshold=50,this.mpScrollTop=void 0,this.mpScrollLeft=void 0,this.mpScrollIntoView=void 0,this.mpScrollIntoViewAlignment=void 0,this.animated=!1}"watchScrollLeft"(e){const t=Number(e),{"animated":i}=this;this.mpScrollToMethod({"left":t,"animated":i})}"watchScrollTop"(e){const t=Number(e),{"animated":i}=this;this.mpScrollToMethod({"top":t,"animated":i})}"watchScrollIntoView"(e){this.mpScrollIntoViewMethod(e)}"handleScroll"(e){var t;if(e instanceof CustomEvent)return;e.stopPropagation(),null===(t=e.stopImmediatePropagation)||void 0===t||t.call(e);const{"scrollLeft":i,"scrollTop":o,"scrollHeight":n,"scrollWidth":s}=this.el;this._scrollLeft=i,this._scrollTop=o,this.upperAndLower(),this.onScroll.emit({"scrollLeft":i,"scrollTop":o,"scrollHeight":n,"scrollWidth":s})}"handleTouchMove"(e){e instanceof CustomEvent||e.stopPropagation()}async"mpScrollToMethod"(e){let{"top":t,"left":i,"duration":o,"animated":n=!1}=e;this.scrollY&&"number"==typeof t&&!isNaN(t)&&t!==this._scrollTop&&(n?easeOutScroll(this._scrollTop,t,o,e=>this.el.scrollTop=e):this.el.scrollTop=t,this._scrollTop=t),this.scrollX&&"number"==typeof i&&!isNaN(i)&&i!==this._scrollLeft&&(n?easeOutScroll(this._scrollLeft,i,o,e=>this.el.scrollLeft=e):this.el.scrollLeft=i,this._scrollLeft=i)}async"mpScrollIntoViewMethod"(e){var t;"string"==typeof e&&e&&(null===(t=document.querySelector(`#${e}`))||void 0===t||t.scrollIntoView({"behavior":this.animated?"smooth":"auto","block":this.scrollY&&this.mpScrollIntoViewAlignment||"center","inline":this.scrollX&&this.mpScrollIntoViewAlignment||"start"}))}"componentDidLoad"(){const e=Number(this.mpScrollTop),t=Number(this.mpScrollLeft),{"animated":i}=this;this.mpScrollToMethod({"top":e,"left":t,"animated":i})}"componentDidRender"(){handleStencilNodes(this.el)}"render"(){const{"scrollX":e,"scrollY":t}=this,i=(0,s.c)({"taro-scroll-view__scroll-x":e,"taro-scroll-view__scroll-y":t});return(0,n.h)(n.AA,{"class":i},(0,n.h)("slot",null))}get"el"(){return this}static get"watchers"(){return{"mpScrollLeft":["watchScrollLeft"],"mpScrollTop":["watchScrollTop"],"mpScrollIntoView":["watchScrollIntoView"]}}static get"style"(){return"taro-scroll-view-core{-webkit-overflow-scrolling:auto;width:100%;display:block}taro-scroll-view-core::-webkit-scrollbar{display:none}.taro-scroll-view__scroll-x{overflow:scroll hidden}.taro-scroll-view__scroll-y{overflow:hidden scroll}"}},[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"mpScrollIntoViewAlignment":[1,"scroll-into-view-alignment"],"animated":[4,"scroll-with-animation"],"mpScrollToMethod":[64],"mpScrollIntoViewMethod":[64]},[[1,"scroll","handleScroll"],[1,"touchmove","handleTouchMove"]]]);const b=function taro_scroll_view_core_defineCustomElement$1(){if("undefined"==typeof customElements)return;["taro-scroll-view-core"].forEach(e=>{if("taro-scroll-view-core"===e)customElements.get(e)||customElements.define(e,v)})},y=(0,n.GH)(class extends n.mv{"constructor"(){super(),this.__registerHost(),this.onChange=(0,n.yM)(this,"change",7),this.switchChange=e=>{e.stopPropagation();const t=e.target.checked;this.checked=t,this.onChange.emit({"value":t})},this.type="switch",this.checked=!1,this.color="#04BE02",this.name=void 0,this.disabled=!1,this.nativeProps={},this.isWillLoadCalled=!1}"function"(e){this.isWillLoadCalled&&this.inputRef.checked!==e&&(this.inputRef.checked=e)}"componentWillLoad"(){this.isWillLoadCalled=!0}"componentDidLoad"(){Object.defineProperty(this.el,"value",{"get":()=>this.checked,"configurable":!0})}"render"(){const{"type":e,"color":t,"checked":i,"name":o,"disabled":s,"nativeProps":r}=this,a=i?{"borderColor":t||"04BE02","backgroundColor":t||"04BE02"}:{};return(0,n.h)("input",Object.assign({"ref":e=>{this.inputRef=e},"type":"checkbox","class":`weui-${e}`,"style":a,"checked":i,"name":o,"disabled":s,"onChange":this.switchChange},r))}get"el"(){return this}static get"watchers"(){return{"checked":["function"]}}static get"style"(){return'.weui-cell_switch{padding-top:6.5px;padding-bottom:6.5px}.weui-switch{-webkit-appearance:none;-moz-appearance:none;appearance:none}.weui-switch,.weui-switch-cp__box{-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#dfdfdf;border:1px solid #dfdfdf;border-radius:16px;outline:0;width:52px;height:32px;-webkit-transition:background-color .1s,border .1s;transition:background-color .1s,border .1s;position:relative}.weui-switch:before,.weui-switch-cp__box:before{content:" ";background-color:#fdfdfd;border-radius:15px;width:50px;height:30px;-webkit-transition:-webkit-transform .35s cubic-bezier(.45,1,.4,1);transition:-webkit-transform .35s cubic-bezier(.45,1,.4,1);transition:transform .35s cubic-bezier(.45,1,.4,1);transition:transform .35s cubic-bezier(.45,1,.4,1), -webkit-transform .35s cubic-bezier(.45,1,.4,1);position:absolute;top:0;left:0}.weui-switch:after,.weui-switch-cp__box:after{content:" ";background-color:#fff;border-radius:15px;width:30px;height:30px;-webkit-transition:-webkit-transform .35s cubic-bezier(.4,.4,.25,1.35);transition:-webkit-transform .35s cubic-bezier(.4,.4,.25,1.35);transition:transform .35s cubic-bezier(.4,.4,.25,1.35);transition:transform .35s cubic-bezier(.4,.4,.25,1.35), -webkit-transform .35s cubic-bezier(.4,.4,.25,1.35);position:absolute;top:0;left:0;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.4);box-shadow:0 1px 3px rgba(0,0,0,.4)}.weui-switch:checked,.weui-switch-cp__input:checked~.weui-switch-cp__box{background-color:#04be02;border-color:#04be02}.weui-switch:checked:before,.weui-switch-cp__input:checked~.weui-switch-cp__box:before{-webkit-transform:scale(0);transform:scale(0)}.weui-switch:checked:after,.weui-switch-cp__input:checked~.weui-switch-cp__box:after{-webkit-transform:translate(20px);transform:translate(20px)}.weui-switch-cp__input{position:absolute;left:-9999px}.weui-switch-cp__box{display:block}taro-switch-core{width:52px;height:32px;display:inline-block}taro-switch-core .weui-switch{width:100%;height:100%;display:block}'}},[0,"taro-switch-core",{"type":[1],"checked":[1028],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}]);const k=function taro_switch_core_defineCustomElement$1(){if("undefined"==typeof customElements)return;["taro-switch-core"].forEach(e=>{if("taro-switch-core"===e)customElements.get(e)||customElements.define(e,y)})},x=(0,n.GH)(class extends n.mv{"constructor"(){super(),this.__registerHost(),this.selectable=!1,this.userSelect=!1,this.space=void 0,this.numberOfLines=void 0}"render"(){const e={};return"number"==typeof this.numberOfLines&&(e["--line-clamp"]=this.numberOfLines),(0,n.h)(n.AA,{"style":e},(0,n.h)("slot",null))}static get"style"(){return"taro-text-core{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline}taro-text-core[selectable=true],taro-text-core[user-select=true]{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;display:inline-block}taro-text-core[space]{white-space:pre-wrap}taro-text-core[space=ensp]{word-spacing:.5em}taro-text-core[space=nbsp]{word-spacing:1em}taro-text-core[number-of-lines]{--line-clamp:2;word-wrap:break-word;text-overflow:ellipsis;-webkit-line-clamp:var(--line-clamp);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}"}},[4,"taro-text-core",{"selectable":[1028],"userSelect":[1028,"user-select"],"space":[1025],"numberOfLines":[2,"number-of-lines"]}]);const _=function taro_text_core_defineCustomElement$1(){if("undefined"==typeof customElements)return;["taro-text-core"].forEach(e=>{if("taro-text-core"===e)customElements.get(e)||customElements.define(e,x)})};function taro_textarea_core_fixControlledValue(e){return null!=e?e:""}const C=(0,n.GH)(class extends n.mv{"constructor"(){super(),this.__registerHost(),this.onInput=(0,n.yM)(this,"input",7),this.onFocus=(0,n.yM)(this,"focus",7),this.onBlur=(0,n.yM)(this,"blur",7),this.onConfirm=(0,n.yM)(this,"confirm",7),this.onChange=(0,n.yM)(this,"change",7),this.onLineChange=(0,n.yM)(this,"linechange",7),this.onKeyDown=(0,n.yM)(this,"keydown",7),this.handleInput=e=>{e.stopPropagation(),this.handleLineChange();const t=e.target.value||"";this.value=t,this.onInput.emit({"value":t,"cursor":t.length})},this.handleFocus=e=>{e.stopPropagation(),this.onFocus.emit({"value":e.target.value})},this.handleBlur=e=>{e.stopPropagation(),this.onBlur.emit({"value":e.target.value})},this.handleChange=e=>{e.stopPropagation(),this.onChange.emit({"value":e.target.value})},this.handleLineChange=()=>{const e=this.getNumberOfLines();e!==this.line&&(this.line=e,this.onLineChange.emit({"height":this.textareaRef.clientHeight,"lineCount":this.line}))},this.handleKeyDown=e=>{e.stopPropagation();const{"value":t}=e.target,i=e.keyCode||e.code;this.onKeyDown.emit({"value":t,"cursor":t.length,"keyCode":i}),13===i&&this.onConfirm.emit({"value":t})},this.calculateContentHeight=(e,t)=>{let i=e.style.height,o=e.offsetHeight,n=e.scrollHeight,s=e.style.overflow,r=e.style.minHeight||null;if(!(o>=n))return n;if(e.style.minHeight=0,e.style.height=o+t+"px",e.style.overflow="hidden",n<e.scrollHeight){for(;e.offsetHeight>=e.scrollHeight;)e.style.height=(o-=t)+"px";for(;e.offsetHeight<e.scrollHeight;)e.style.height=o+++"px";return e.style.height=i,e.style.overflow=s,e.style.minHeight=r,o}},this.getNumberOfLines=()=>{const e=this.textareaRef,t=window.getComputedStyle?window.getComputedStyle(e):e.style,i=parseInt(t.lineHeight,10),o=this.calculateContentHeight(e,i);return Math.floor(o/i)},this.value="",this.placeholder=void 0,this.disabled=!1,this.maxlength=140,this.autoFocus=!1,this.autoHeight=!1,this.name=void 0,this.nativeProps={},this.line=1}"watchAutoFocus"(e,t){var i;!t&&e&&(null===(i=this.textareaRef)||void 0===i||i.focus())}"watchValue"(e){const t=taro_textarea_core_fixControlledValue(e);this.textareaRef.value!==t&&(this.textareaRef.value=t)}async"focus"(){this.textareaRef.focus()}"render"(){const{"value":e,"placeholder":t,"disabled":i,"maxlength":o,"autoFocus":s,"autoHeight":r,"name":a,"nativeProps":l,"handleInput":c,"handleFocus":h,"handleBlur":u,"handleChange":d}=this,p={};return r&&(p.rows=this.line),(0,n.h)("textarea",Object.assign({"ref":e=>{e&&(this.textareaRef=e,s&&e&&e.focus())},"class":"taro-textarea "+(r?"auto-height":""),"value":taro_textarea_core_fixControlledValue(e),"placeholder":t,"name":a,"disabled":i,"maxlength":o,"autofocus":s,"onInput":c,"onFocus":h,"onBlur":u,"onChange":d,"onKeyDown":this.handleKeyDown},l,p))}get"el"(){return this}static get"watchers"(){return{"autoFocus":["watchAutoFocus"],"value":["watchValue"]}}static get"style"(){return"taro-textarea-core{width:300px;display:block}taro-textarea-core .auto-height{height:auto}.taro-textarea{height:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:auto;border:0;width:100%;line-height:1.5;display:block;position:relative}.taro-textarea:focus{outline:none}"}},[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]);const E=function taro_textarea_core_defineCustomElement$1(){if("undefined"==typeof customElements)return;["taro-textarea-core"].forEach(e=>{if("taro-textarea-core"===e)customElements.get(e)||customElements.define(e,C)})},T=(0,n.GH)(class extends n.mv{"constructor"(){super(),this.__registerHost(),this.onLongPress=(0,n.yM)(this,"longpress",7),this.startTime=0,this.animation=void 0,this.hoverClass=void 0,this.hoverStartTime=50,this.hoverStayTime=400,this.hover=!1,this.touch=!1}"onTouchStart"(){this.hoverClass&&(this.touch=!0,setTimeout(()=>{this.touch&&(this.hover=!0)},this.hoverStartTime)),this.timeoutEvent=setTimeout(()=>{this.onLongPress.emit()},350),this.startTime=Date.now()}"onTouchMove"(){clearTimeout(this.timeoutEvent)}"onTouchEnd"(){Date.now()-this.startTime<350&&clearTimeout(this.timeoutEvent),this.hoverClass&&(this.touch=!1,setTimeout(()=>{this.touch||(this.hover=!1)},this.hoverStayTime))}"componentDidRender"(){handleStencilNodes(this.el)}"render"(){const e=(0,s.c)({[`${this.hoverClass}`]:this.hover});let t={};return this.animation&&(t.animation=this.animation,t["data-animation"]=this.animation),(0,n.h)(n.AA,Object.assign({"class":e},t),(0,n.h)("slot",null))}get"el"(){return this}static get"style"(){return"body,html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}taro-view-core{display:block}"}},[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]);const M=function taro_view_core_defineCustomElement$1(){if("undefined"==typeof customElements)return;["taro-view-core"].forEach(e=>{if("taro-view-core"===e)customElements.get(e)||customElements.define(e,T)})};var S=i(7582);const mergeRefs=(...e)=>t=>{e.forEach(e=>{((e,t)=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})(e,t)})},camelToDashCase=e=>e.replace(/([A-Z])/g,e=>`-${e[0].toLowerCase()}`);var D=i(3935);const arrayToMap=e=>{const t=new Map;return e.forEach(e=>t.set(e,e)),t};function getComponentName(e){return e.tagName.replace(/^TARO-/,"").replace(/-CORE$/,"")}function getControlledValue(e){const t=getComponentName(e);return["INPUT","TEXTAREA","SLIDER","PICKER"].includes(t)?"value":"SWITCH"===t?"checked":null}function finishedEventHandler(e){const t=getControlledValue(e);if(!t)return;(0,D.flushSync)(()=>{});const i=function getPropsAfterReactUpdate(e){const t=Object.keys(e).find(e=>e.includes("__reactProps"));return t?e[t]:null}(e);(null==i?void 0:i.hasOwnProperty(t))&&i[t]!==e[t]&&(e[t]=i[t],e.setAttribute(t,i[t]))}const syncEvent=(e,t,i)=>{const o=e.__events||(e.__events={}),n=o[t];if(i){if(n){if(n.fn===i)return;e.removeEventListener(t,n)}const s=o[t]=function(t){(0,D.unstable_batchedUpdates)(()=>i.call(this,t)),finishedEventHandler(e)};s.fn=i,e.addEventListener(t,s)}else n&&e.removeEventListener(t,n)},attachProps=(e,t,i={})=>{if(e instanceof Element){Object.keys(i).forEach(i=>{if(!["style","children","ref","class","className","forwardedRef"].includes(i)&&!t.hasOwnProperty(i))if(/^on([A-Z].*)/.test(i)){const t=i.substring(2).toLowerCase();syncEvent(e,t)}else e[i]=null,e.removeAttribute(camelToDashCase(i))}),e.className=((e,t,i)=>{const o=t.className||t.class,n=i.className||i.class,s=arrayToMap(e),r=arrayToMap(o?o.split(" "):[]),a=arrayToMap(n?n.split(" "):[]),l=[];return s.forEach(e=>{r.has(e)?(l.push(e),r.delete(e)):a.has(e)||l.push(e)}),r.forEach(e=>l.push(e)),l.join(" ")})(e.classList,t,i),Object.keys(t).forEach(i=>{if(!("style"===i&&"string"!=typeof t[i]||["children","ref","class","className","forwardedRef"].includes(i)))if(/^on([A-Z].*)/.test(i)){const o=i.substring(2).toLowerCase();syncEvent(e,o,t[i])}else{e[i]=t[i];"string"===typeof t[i]&&e.setAttribute(camelToDashCase(i),t[i])}});const o=getControlledValue(e);if(o&&t.hasOwnProperty(o)){const t=["INPUT","TEXTAREA"].includes(getComponentName(e))?"input":"change";e.__events||(e.__events={}),e.__events.hasOwnProperty(t)||syncEvent(e,t,function(){})}}};const createComponent_createReactComponent=(e,t,i,n)=>{void 0!==n&&n();const s=e.toLowerCase().split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("");const r=class extends o.Component{"constructor"(e){super(e),this.setComponentElRef=e=>{this.componentEl=e}}"componentDidMount"(){!function applyUnControlledDefaultValue(e,t){const i=getControlledValue(e);if(!i)return;const o="default"+i.charAt(0).toUpperCase()+i.slice(1);!t.hasOwnProperty(i)&&t.hasOwnProperty(o)&&(e[i]=t[o],e.setAttribute(i,t[o]))}(this.componentEl,this.props),this.componentDidUpdate(this.props)}"componentDidUpdate"(e){attachProps(this.componentEl,this.props,e)}"render"(){const t=this.props,{"children":n,"forwardedRef":s,"className":r,"ref":a,"style":l}=t,c=(0,S._T)(t,["children","forwardedRef","className","ref","style"]);let h=Object.keys(c).reduce((e,t)=>{const i=c[t];if(0===t.indexOf("on")&&t[2]===t[2].toUpperCase()){t.substring(2).toLowerCase();0}else{["string","boolean","number"].includes(typeof i)&&(e[camelToDashCase(t)]=i)}return e},{});i&&(h=i(this.props,h));const u=Object.assign(Object.assign({},h),{"ref":mergeRefs(s,this.setComponentElRef)});return(0,o.createElement)(e,u,n)}static get"displayName"(){return s}};return t&&(r.contextType=t),((e,t)=>{const forwardRef=(t,i)=>o.createElement(e,Object.assign({},t,{"forwardedRef":i}));return forwardRef.displayName=t,o.forwardRef(forwardRef)})(r,s)},I=createComponent_createReactComponent("taro-icon-core",void 0,helper_manipulatePropsFunction,a),P=createComponent_createReactComponent("taro-input-core",void 0,helper_manipulatePropsFunction,c),L=createComponent_createReactComponent("taro-picker-core",void 0,helper_manipulatePropsFunction,g),H=createComponent_createReactComponent("taro-scroll-view-core",void 0,helper_manipulatePropsFunction,b),O=createComponent_createReactComponent("taro-switch-core",void 0,helper_manipulatePropsFunction,k),R=createComponent_createReactComponent("taro-text-core",void 0,helper_manipulatePropsFunction,_),Y=createComponent_createReactComponent("taro-textarea-core",void 0,helper_manipulatePropsFunction,E),N=createComponent_createReactComponent("taro-view-core",void 0,helper_manipulatePropsFunction,M)},"7616":function(e,t,i){i.r(t),i.d(t,{"default":function(){return PageStub}});var o=i(5279),n=i(5893);function PageStub(){return(0,n.jsxs)(o.G7,{"className":"page-stub","children":[(0,n.jsx)(o.xv,{"children":"This page is auto-generated from mini program conversion."}),(0,n.jsx)(o.xv,{"children":"Please migrate page logic manually."})]})}},"5251":function(e,t,i){var o=i(7294),n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={"key":!0,"ref":!0,"__self":!0,"__source":!0};function q(e,t,i){var o,s={},c=null,h=null;for(o in void 0!==i&&(c=""+i),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(h=t.ref),t)r.call(t,o)&&!l.hasOwnProperty(o)&&(s[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===s[o]&&(s[o]=t[o]);return{"$$typeof":n,"type":e,"key":c,"ref":h,"props":s,"_owner":a.current}}t.jsx=q,t.jsxs=q},"5893":function(e,t,i){e.exports=i(5251)}}]); |