bmw-form-render 0.0.314-beta.4 → 0.0.314

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.
Files changed (90) hide show
  1. package/dist/{AntiCheating-C9nRRNhm.cjs → AntiCheating-BG3DPuXi.cjs} +1 -1
  2. package/dist/{AppointConfig-BdvU_gpx.cjs → AppointConfig-CKcO1IVh.cjs} +1 -1
  3. package/dist/{BasicInputSetting-CK8v7aeJ.cjs → BasicInputSetting-BRAjmsUA.cjs} +1 -1
  4. package/dist/{BasicSelectSetting-CYCfGfWP.cjs → BasicSelectSetting-CoW-dsal.cjs} +1 -1
  5. package/dist/{Button-CS5A13cl.cjs → Button-BXatkcP-.cjs} +1 -1
  6. package/dist/{ButtonConfig-BQ9yJWEV.cjs → ButtonConfig-wRXMLPL9.cjs} +1 -1
  7. package/dist/{CacheIcon-Rc-dHOrU.cjs → CacheIcon-CulV9_p4.cjs} +1 -1
  8. package/dist/{Carousel-OBHfMkCa.cjs → Carousel-ClxI06AJ.cjs} +1 -1
  9. package/dist/{CarouselSetting-G4uB-TPB.cjs → CarouselSetting-Cem0Ny1T.cjs} +1 -1
  10. package/dist/{CheckEntrySetting-roeKsGLN.cjs → CheckEntrySetting-GB-59aSP.cjs} +1 -1
  11. package/dist/{CheckboxRange.vue_vue_type_script_setup_true_lang-DdvhzO8V.cjs → CheckboxRange.vue_vue_type_script_setup_true_lang-DHRGTR9W.cjs} +1 -1
  12. package/dist/{CheckboxSetting-BcsZPOey.cjs → CheckboxSetting-Dv4WpFP6.cjs} +1 -1
  13. package/dist/{Choice-BpDTbXtG.cjs → Choice-qy-hijdN.cjs} +1 -1
  14. package/dist/{ChooseInput-CYE1i3QQ.cjs → ChooseInput-BborBkGw.cjs} +1 -1
  15. package/dist/{Column.vue_vue_type_script_setup_true_lang-Dt8DElS5.cjs → Column.vue_vue_type_script_setup_true_lang-DWSPshNX.cjs} +1 -1
  16. package/dist/{ColumnNumOption.vue_vue_type_script_setup_true_lang-Cqe4uz2Z.cjs → ColumnNumOption.vue_vue_type_script_setup_true_lang-DgteJy0w.cjs} +1 -1
  17. package/dist/{CommonRadioSetting-Dr11-JvL.cjs → CommonRadioSetting-BLYrXSfl.cjs} +1 -1
  18. package/dist/{ConfirmCode-Cefa7UQX.cjs → ConfirmCode-BSFlxBxU.cjs} +1 -1
  19. package/dist/{ContactUs-D9JVf9UL.cjs → ContactUs-B3NnHlzg.cjs} +1 -1
  20. package/dist/{ContactUs-BKQca1-e.cjs → ContactUs-CPT64Dp2.cjs} +1 -1
  21. package/dist/{ContactUsSetting-DlNifs0N.cjs → ContactUsSetting-B9RYXVC5.cjs} +1 -1
  22. package/dist/{CrowdManagement-0tLO6hT8.cjs → CrowdManagement-woRi_nfn.cjs} +1 -1
  23. package/dist/{DataCollectPanel-o7hw0WLy.cjs → DataCollectPanel-Cf6f8sRi.cjs} +1 -1
  24. package/dist/{DataSubmitPanel-BH9zFOl2.cjs → DataSubmitPanel-Bdr6U5sW.cjs} +1 -1
  25. package/dist/{DateSetting-DVeDjru7.cjs → DateSetting-Cu0IrTIB.cjs} +1 -1
  26. package/dist/{DynamicTableSetting-BJQtemlL.cjs → DynamicTableSetting-DkOCPwWJ.cjs} +1 -1
  27. package/dist/{EduCheckboxSetting-ClfZeguC.cjs → EduCheckboxSetting-tpFK-1WZ.cjs} +1 -1
  28. package/dist/{EmailInputSetting-DWTstpON.cjs → EmailInputSetting-D7WKKgAF.cjs} +1 -1
  29. package/dist/{ExamBar-Db61wdIk.cjs → ExamBar-KYCi9o4B.cjs} +1 -1
  30. package/dist/{FileSetting-CMRGK11d.cjs → FileSetting-BaWh6BUP.cjs} +1 -1
  31. package/dist/{FillBlank-DEAZb9OG.cjs → FillBlank-BhJ3Hn4L.cjs} +1 -1
  32. package/dist/{FormProgress-Dd1vNCsb.cjs → FormProgress-B7LTCaIV.cjs} +1 -1
  33. package/dist/{GainConfig-DObNLHiS.cjs → GainConfig-CWNaVT7B.cjs} +1 -1
  34. package/dist/{Geolocation-C4xm2vzZ.cjs → Geolocation-Cvp-gUlJ.cjs} +1 -1
  35. package/dist/{IdCardInputSetting-D_dc5LZJ.cjs → IdCardInputSetting-CrKZz3W2.cjs} +1 -1
  36. package/dist/{ImgCard-CsVvXbxm.cjs → ImgCard-UYYypqrq.cjs} +1 -1
  37. package/dist/{ImgCheckboxSetting-Bn-ExOSb.cjs → ImgCheckboxSetting-Ceeu8BKW.cjs} +1 -1
  38. package/dist/{ImgRadioSetting-aZTs9fwS.cjs → ImgRadioSetting-ULCTtWu6.cjs} +1 -1
  39. package/dist/{ImportantOption.vue_vue_type_script_setup_true_lang-B3uNVcdd.cjs → ImportantOption.vue_vue_type_script_setup_true_lang-B3W_qkQT.cjs} +1 -1
  40. package/dist/{Input-88uO_LNs.cjs → Input-eVq8sK-T.cjs} +1 -1
  41. package/dist/{InputTimer-BVczi-cG.cjs → InputTimer-DxIYmKfP.cjs} +1 -1
  42. package/dist/{LengthRangeOption.vue_vue_type_script_setup_true_lang-CCx-jbsU.cjs → LengthRangeOption.vue_vue_type_script_setup_true_lang-BzMis-T8.cjs} +1 -1
  43. package/dist/{LocationSetting-Ce4Ys1X5.cjs → LocationSetting-BZWA-bMt.cjs} +1 -1
  44. package/dist/{MapNavSetting-BLMAtH_o.cjs → MapNavSetting-BLY1rUQA.cjs} +1 -1
  45. package/dist/{MapNavigation-Bi9QBjbD.cjs → MapNavigation-CuNBFeii.cjs} +1 -1
  46. package/dist/{MessagePush-VZjHLq8E.cjs → MessagePush-CFLUolP-.cjs} +1 -1
  47. package/dist/{MultiSelectSetting-DJEW6uLl.cjs → MultiSelectSetting-Clz_yswU.cjs} +1 -1
  48. package/dist/{NumRange-C9ecSw56.cjs → NumRange-BxMmnSH2.cjs} +1 -1
  49. package/dist/{NumberFillBlank-oRuQenIR.cjs → NumberFillBlank-CH1MhBym.cjs} +1 -1
  50. package/dist/{NumberInputSetting-xpZg9oYV.cjs → NumberInputSetting-DbmHngqr.cjs} +1 -1
  51. package/dist/{OcrSetting-C9__ciJC.cjs → OcrSetting-BY_DOe-Z.cjs} +1 -1
  52. package/dist/{OcrWidget-Ch2_0k8s.cjs → OcrWidget-CLs8LU6u.cjs} +1 -1
  53. package/dist/{OptionRandom.vue_vue_type_script_setup_true_lang-Bx1MmOPo.cjs → OptionRandom.vue_vue_type_script_setup_true_lang-C5PcEMr_.cjs} +1 -1
  54. package/dist/{PageHeader-1U9LDmfs.cjs → PageHeader-D7VBZZxL.cjs} +1 -1
  55. package/dist/{PageHeaderSetting-CoVwY-x-.cjs → PageHeaderSetting-_JfMhCf6.cjs} +1 -1
  56. package/dist/{Pagination-Bss8MgCh.cjs → Pagination-Dz3Zsq6F.cjs} +1 -1
  57. package/dist/{PayConfig-B764Gun6.cjs → PayConfig-DlHXPLoi.cjs} +1 -1
  58. package/dist/{PayMethod-BfpAcMin.cjs → PayMethod-CbgDRkHw.cjs} +1 -1
  59. package/dist/{PhoneInputSetting-tGV7YKtJ.cjs → PhoneInputSetting-D-glIKHT.cjs} +1 -1
  60. package/dist/{PlaceholderOption.vue_vue_type_script_setup_true_lang-DvUylwd6.cjs → PlaceholderOption.vue_vue_type_script_setup_true_lang-CozWuR2z.cjs} +1 -1
  61. package/dist/{PreparePlaceholderOption.vue_vue_type_script_setup_true_lang-D3WPB49J.cjs → PreparePlaceholderOption.vue_vue_type_script_setup_true_lang-DKQXGYeE.cjs} +1 -1
  62. package/dist/{PreparerNameSetting-D4dgL9E4.cjs → PreparerNameSetting-C73wSLz0.cjs} +1 -1
  63. package/dist/{PreparerPhoneInputSetting-Cn27saLu.cjs → PreparerPhoneInputSetting-Cbr5kvLZ.cjs} +1 -1
  64. package/dist/{PreparerSetting-BJkaYgFb.cjs → PreparerSetting-CGm42u80.cjs} +1 -1
  65. package/dist/RadioSetting-CZiI4jcL.cjs +1 -0
  66. package/dist/{RatingSetting-DVyijrOt.cjs → RatingSetting-6d-wIj9i.cjs} +1 -1
  67. package/dist/{SearchAndShare-6hIjN4Rf.cjs → SearchAndShare-DQWRJzgK.cjs} +1 -1
  68. package/dist/{SetpayModal-DT0FL5Hg.cjs → SetpayModal-DAgNUS-3.cjs} +1 -1
  69. package/dist/{ShareQRCode-DTkYJBQi.cjs → ShareQRCode-CX1gOZI2.cjs} +1 -1
  70. package/dist/{TableSetting-BiAi_gjr.cjs → TableSetting-BkcDzi56.cjs} +1 -1
  71. package/dist/{TestSettingPanel-Cf3uyZG0.cjs → TestSettingPanel-BDa2WUGK.cjs} +1 -1
  72. package/dist/{ViewVoteRate-7Bhutqwg.cjs → ViewVoteRate-Dj-OcZ_M.cjs} +1 -1
  73. package/dist/{WatermarkSetting-BzrslCxA.cjs → WatermarkSetting-B0aSo5Ty.cjs} +1 -1
  74. package/dist/bmw-form-render.cjs +1 -1
  75. package/dist/{index-DpRNjwWQ.cjs → index-CRPPGSlX.cjs} +1 -1
  76. package/dist/{index-C34Ree1i.cjs → index-CT99e2GX.cjs} +1 -1
  77. package/dist/index-CftE72_b.cjs +1 -0
  78. package/dist/{index-DypIwy0F.cjs → index-DFH3S9RG.cjs} +1 -1
  79. package/dist/{index-CHpG34g7.cjs → index-DI8gv4f0.cjs} +1 -1
  80. package/dist/{index-B_TK71cG.cjs → index-DTLmySAQ.cjs} +1 -1
  81. package/dist/{index-BbLA5kEh.cjs → index-Do19pptM.cjs} +1 -1
  82. package/dist/{index-CUw0zSx5.cjs → index-r7Ww1Z_Z.cjs} +1 -1
  83. package/dist/{main-DgJ4fKLn.cjs → main-DX3b4SJ1.cjs} +9 -9
  84. package/dist/{style-DBzDPQSq.cjs → style-Bdir8YVP.cjs} +1 -1
  85. package/dist/style.css +1 -1
  86. package/dist/{useVipDialog-CPunT0S0.cjs → useVipDialog-C4TlkxFm.cjs} +1 -1
  87. package/dist/{vue-quill.esm-bundler-DStpiAl0.cjs → vue-quill.esm-bundler-BQgFSpLK.cjs} +1 -1
  88. package/package.json +1 -1
  89. package/dist/RadioSetting-CJkZKLYh.cjs +0 -1
  90. package/dist/index-DDUh0DJT.cjs +0 -1
@@ -84,9 +84,9 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:o,curr
84
84
  * Released under MIT license <https://lodash.com/license>
85
85
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
86
86
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
87
- */Im.exports;(function(e,t){(function(){var n,o="4.17.21",a=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",i="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",p=1,h=2,m=4,b=1,g=2,y=1,_=2,I=4,k=8,E=16,T=32,x=64,S=128,D=256,N=512,L=30,F="...",z=800,j=16,X=1,U=2,W=3,Q=1/0,q=9007199254740991,V=17976931348623157e292,Y=NaN,Z=4294967295,ce=Z-1,re=Z>>>1,ye=[["ary",S],["bind",y],["bindKey",_],["curry",k],["curryRight",E],["flip",N],["partial",T],["partialRight",x],["rearg",D]],he="[object Arguments]",le="[object Array]",ue="[object AsyncFunction]",J="[object Boolean]",oe="[object Date]",_e="[object DOMException]",ge="[object Error]",Me="[object Function]",ee="[object GeneratorFunction]",ne="[object Map]",fe="[object Number]",ke="[object Null]",$e="[object Object]",Pe="[object Promise]",ze="[object Proxy]",Re="[object RegExp]",je="[object Set]",Ve="[object String]",tt="[object Symbol]",Qe="[object Undefined]",Te="[object WeakMap]",rt="[object WeakSet]",bt="[object ArrayBuffer]",Ct="[object DataView]",Ut="[object Float32Array]",In="[object Float64Array]",Fn="[object Int8Array]",be="[object Int16Array]",Ue="[object Int32Array]",Ie="[object Uint8Array]",We="[object Uint8ClampedArray]",Be="[object Uint16Array]",xt="[object Uint32Array]",$n=/\b__p \+= '';/g,we=/\b(__p \+=) '' \+/g,pt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,zt=/&(?:amp|lt|gt|quot|#39);/g,an=/[&<>"']/g,ho=RegExp(zt.source),Cn=RegExp(an.source),pa=/<%-([\s\S]+?)%>/g,Yp=/<%([\s\S]+?)%>/g,Gp=/<%=([\s\S]+?)%>/g,cd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Eb=/^\w*$/,kb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dd=/[\\^$.*+?()[\]{}|]/g,Qp=RegExp(dd.source),fd=/^\s+/,Ib=/\s/,Tb=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,xb=/\{\n\/\* \[wrapped with (.+)\] \*/,Ne=/,? & /,ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,en=/[()=,{}\[\]\/\s]/,Rn=/\\(\\)?/g,as=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Is=/\w*$/,_u=/^[-+]0x[0-9a-f]+$/i,Ts=/^0b[01]+$/i,Ja=/^\[object .+?Constructor\]$/,Jp=/^0o[0-7]+$/i,H6=/^(?:0|[1-9]\d*)$/,q6=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xp=/($^)/,K6=/['\n\r\u2028\u2029\\]/g,Zp="\\ud800-\\udfff",Y6="\\u0300-\\u036f",G6="\\ufe20-\\ufe2f",Q6="\\u20d0-\\u20ff",yS=Y6+G6+Q6,_S="\\u2700-\\u27bf",wS="a-z\\xdf-\\xf6\\xf8-\\xff",J6="\\xac\\xb1\\xd7\\xf7",X6="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Z6="\\u2000-\\u206f",eR=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$S="A-Z\\xc0-\\xd6\\xd8-\\xde",CS="\\ufe0e\\ufe0f",SS=J6+X6+Z6+eR,Ab="['’]",tR="["+Zp+"]",ES="["+SS+"]",ev="["+yS+"]",kS="\\d+",nR="["+_S+"]",IS="["+wS+"]",TS="[^"+Zp+SS+kS+_S+wS+$S+"]",Ob="\\ud83c[\\udffb-\\udfff]",oR="(?:"+ev+"|"+Ob+")",xS="[^"+Zp+"]",Db="(?:\\ud83c[\\udde6-\\uddff]){2}",Pb="[\\ud800-\\udbff][\\udc00-\\udfff]",wu="["+$S+"]",AS="\\u200d",OS="(?:"+IS+"|"+TS+")",aR="(?:"+wu+"|"+TS+")",DS="(?:"+Ab+"(?:d|ll|m|re|s|t|ve))?",PS="(?:"+Ab+"(?:D|LL|M|RE|S|T|VE))?",MS=oR+"?",NS="["+CS+"]?",rR="(?:"+AS+"(?:"+[xS,Db,Pb].join("|")+")"+NS+MS+")*",sR="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",iR="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",RS=NS+MS+rR,lR="(?:"+[nR,Db,Pb].join("|")+")"+RS,uR="(?:"+[xS+ev+"?",ev,Db,Pb,tR].join("|")+")",cR=RegExp(Ab,"g"),dR=RegExp(ev,"g"),Mb=RegExp(Ob+"(?="+Ob+")|"+uR+RS,"g"),fR=RegExp([wu+"?"+IS+"+"+DS+"(?="+[ES,wu,"$"].join("|")+")",aR+"+"+PS+"(?="+[ES,wu+OS,"$"].join("|")+")",wu+"?"+OS+"+"+DS,wu+"+"+PS,iR,sR,kS,lR].join("|"),"g"),pR=RegExp("["+AS+Zp+yS+CS+"]"),vR=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hR=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mR=-1,Yn={};Yn[Ut]=Yn[In]=Yn[Fn]=Yn[be]=Yn[Ue]=Yn[Ie]=Yn[We]=Yn[Be]=Yn[xt]=!0,Yn[he]=Yn[le]=Yn[bt]=Yn[J]=Yn[Ct]=Yn[oe]=Yn[ge]=Yn[Me]=Yn[ne]=Yn[fe]=Yn[$e]=Yn[Re]=Yn[je]=Yn[Ve]=Yn[Te]=!1;var zn={};zn[he]=zn[le]=zn[bt]=zn[Ct]=zn[J]=zn[oe]=zn[Ut]=zn[In]=zn[Fn]=zn[be]=zn[Ue]=zn[ne]=zn[fe]=zn[$e]=zn[Re]=zn[je]=zn[Ve]=zn[tt]=zn[Ie]=zn[We]=zn[Be]=zn[xt]=!0,zn[ge]=zn[Me]=zn[Te]=!1;var gR={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},bR={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yR={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},_R={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wR=parseFloat,$R=parseInt,LS=typeof io=="object"&&io&&io.Object===Object&&io,CR=typeof self=="object"&&self&&self.Object===Object&&self,Bo=LS||CR||Function("return this")(),Nb=t&&!t.nodeType&&t,ml=Nb&&!0&&e&&!e.nodeType&&e,FS=ml&&ml.exports===Nb,Rb=FS&&LS.process,Xa=function(){try{var Ce=ml&&ml.require&&ml.require("util").types;return Ce||Rb&&Rb.binding&&Rb.binding("util")}catch{}}(),BS=Xa&&Xa.isArrayBuffer,VS=Xa&&Xa.isDate,zS=Xa&&Xa.isMap,jS=Xa&&Xa.isRegExp,US=Xa&&Xa.isSet,WS=Xa&&Xa.isTypedArray;function Aa(Ce,Le,Oe){switch(Oe.length){case 0:return Ce.call(Le);case 1:return Ce.call(Le,Oe[0]);case 2:return Ce.call(Le,Oe[0],Oe[1]);case 3:return Ce.call(Le,Oe[0],Oe[1],Oe[2])}return Ce.apply(Le,Oe)}function SR(Ce,Le,Oe,yt){for(var Ht=-1,Sn=Ce==null?0:Ce.length;++Ht<Sn;){var xo=Ce[Ht];Le(yt,xo,Oe(xo),Ce)}return yt}function Za(Ce,Le){for(var Oe=-1,yt=Ce==null?0:Ce.length;++Oe<yt&&Le(Ce[Oe],Oe,Ce)!==!1;);return Ce}function ER(Ce,Le){for(var Oe=Ce==null?0:Ce.length;Oe--&&Le(Ce[Oe],Oe,Ce)!==!1;);return Ce}function HS(Ce,Le){for(var Oe=-1,yt=Ce==null?0:Ce.length;++Oe<yt;)if(!Le(Ce[Oe],Oe,Ce))return!1;return!0}function fi(Ce,Le){for(var Oe=-1,yt=Ce==null?0:Ce.length,Ht=0,Sn=[];++Oe<yt;){var xo=Ce[Oe];Le(xo,Oe,Ce)&&(Sn[Ht++]=xo)}return Sn}function tv(Ce,Le){var Oe=Ce==null?0:Ce.length;return!!Oe&&$u(Ce,Le,0)>-1}function Lb(Ce,Le,Oe){for(var yt=-1,Ht=Ce==null?0:Ce.length;++yt<Ht;)if(Oe(Le,Ce[yt]))return!0;return!1}function to(Ce,Le){for(var Oe=-1,yt=Ce==null?0:Ce.length,Ht=Array(yt);++Oe<yt;)Ht[Oe]=Le(Ce[Oe],Oe,Ce);return Ht}function pi(Ce,Le){for(var Oe=-1,yt=Le.length,Ht=Ce.length;++Oe<yt;)Ce[Ht+Oe]=Le[Oe];return Ce}function Fb(Ce,Le,Oe,yt){var Ht=-1,Sn=Ce==null?0:Ce.length;for(yt&&Sn&&(Oe=Ce[++Ht]);++Ht<Sn;)Oe=Le(Oe,Ce[Ht],Ht,Ce);return Oe}function kR(Ce,Le,Oe,yt){var Ht=Ce==null?0:Ce.length;for(yt&&Ht&&(Oe=Ce[--Ht]);Ht--;)Oe=Le(Oe,Ce[Ht],Ht,Ce);return Oe}function Bb(Ce,Le){for(var Oe=-1,yt=Ce==null?0:Ce.length;++Oe<yt;)if(Le(Ce[Oe],Oe,Ce))return!0;return!1}var IR=Vb("length");function TR(Ce){return Ce.split("")}function xR(Ce){return Ce.match(ft)||[]}function qS(Ce,Le,Oe){var yt;return Oe(Ce,function(Ht,Sn,xo){if(Le(Ht,Sn,xo))return yt=Sn,!1}),yt}function nv(Ce,Le,Oe,yt){for(var Ht=Ce.length,Sn=Oe+(yt?1:-1);yt?Sn--:++Sn<Ht;)if(Le(Ce[Sn],Sn,Ce))return Sn;return-1}function $u(Ce,Le,Oe){return Le===Le?zR(Ce,Le,Oe):nv(Ce,KS,Oe)}function AR(Ce,Le,Oe,yt){for(var Ht=Oe-1,Sn=Ce.length;++Ht<Sn;)if(yt(Ce[Ht],Le))return Ht;return-1}function KS(Ce){return Ce!==Ce}function YS(Ce,Le){var Oe=Ce==null?0:Ce.length;return Oe?jb(Ce,Le)/Oe:Y}function Vb(Ce){return function(Le){return Le==null?n:Le[Ce]}}function zb(Ce){return function(Le){return Ce==null?n:Ce[Le]}}function GS(Ce,Le,Oe,yt,Ht){return Ht(Ce,function(Sn,xo,Bn){Oe=yt?(yt=!1,Sn):Le(Oe,Sn,xo,Bn)}),Oe}function OR(Ce,Le){var Oe=Ce.length;for(Ce.sort(Le);Oe--;)Ce[Oe]=Ce[Oe].value;return Ce}function jb(Ce,Le){for(var Oe,yt=-1,Ht=Ce.length;++yt<Ht;){var Sn=Le(Ce[yt]);Sn!==n&&(Oe=Oe===n?Sn:Oe+Sn)}return Oe}function Ub(Ce,Le){for(var Oe=-1,yt=Array(Ce);++Oe<Ce;)yt[Oe]=Le(Oe);return yt}function DR(Ce,Le){return to(Le,function(Oe){return[Oe,Ce[Oe]]})}function QS(Ce){return Ce&&Ce.slice(0,e2(Ce)+1).replace(fd,"")}function Oa(Ce){return function(Le){return Ce(Le)}}function Wb(Ce,Le){return to(Le,function(Oe){return Ce[Oe]})}function pd(Ce,Le){return Ce.has(Le)}function JS(Ce,Le){for(var Oe=-1,yt=Ce.length;++Oe<yt&&$u(Le,Ce[Oe],0)>-1;);return Oe}function XS(Ce,Le){for(var Oe=Ce.length;Oe--&&$u(Le,Ce[Oe],0)>-1;);return Oe}function PR(Ce,Le){for(var Oe=Ce.length,yt=0;Oe--;)Ce[Oe]===Le&&++yt;return yt}var MR=zb(gR),NR=zb(bR);function RR(Ce){return"\\"+_R[Ce]}function LR(Ce,Le){return Ce==null?n:Ce[Le]}function Cu(Ce){return pR.test(Ce)}function FR(Ce){return vR.test(Ce)}function BR(Ce){for(var Le,Oe=[];!(Le=Ce.next()).done;)Oe.push(Le.value);return Oe}function Hb(Ce){var Le=-1,Oe=Array(Ce.size);return Ce.forEach(function(yt,Ht){Oe[++Le]=[Ht,yt]}),Oe}function ZS(Ce,Le){return function(Oe){return Ce(Le(Oe))}}function vi(Ce,Le){for(var Oe=-1,yt=Ce.length,Ht=0,Sn=[];++Oe<yt;){var xo=Ce[Oe];(xo===Le||xo===f)&&(Ce[Oe]=f,Sn[Ht++]=Oe)}return Sn}function ov(Ce){var Le=-1,Oe=Array(Ce.size);return Ce.forEach(function(yt){Oe[++Le]=yt}),Oe}function VR(Ce){var Le=-1,Oe=Array(Ce.size);return Ce.forEach(function(yt){Oe[++Le]=[yt,yt]}),Oe}function zR(Ce,Le,Oe){for(var yt=Oe-1,Ht=Ce.length;++yt<Ht;)if(Ce[yt]===Le)return yt;return-1}function jR(Ce,Le,Oe){for(var yt=Oe+1;yt--;)if(Ce[yt]===Le)return yt;return yt}function Su(Ce){return Cu(Ce)?WR(Ce):IR(Ce)}function xr(Ce){return Cu(Ce)?HR(Ce):TR(Ce)}function e2(Ce){for(var Le=Ce.length;Le--&&Ib.test(Ce.charAt(Le)););return Le}var UR=zb(yR);function WR(Ce){for(var Le=Mb.lastIndex=0;Mb.test(Ce);)++Le;return Le}function HR(Ce){return Ce.match(Mb)||[]}function qR(Ce){return Ce.match(fR)||[]}var KR=function Ce(Le){Le=Le==null?Bo:Eu.defaults(Bo.Object(),Le,Eu.pick(Bo,hR));var Oe=Le.Array,yt=Le.Date,Ht=Le.Error,Sn=Le.Function,xo=Le.Math,Bn=Le.Object,qb=Le.RegExp,YR=Le.String,er=Le.TypeError,av=Oe.prototype,GR=Sn.prototype,ku=Bn.prototype,rv=Le["__core-js_shared__"],sv=GR.toString,Dn=ku.hasOwnProperty,QR=0,t2=function(){var u=/[^.]+$/.exec(rv&&rv.keys&&rv.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),iv=ku.toString,JR=sv.call(Bn),XR=Bo._,ZR=qb("^"+sv.call(Dn).replace(dd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lv=FS?Le.Buffer:n,hi=Le.Symbol,uv=Le.Uint8Array,n2=lv?lv.allocUnsafe:n,cv=ZS(Bn.getPrototypeOf,Bn),o2=Bn.create,a2=ku.propertyIsEnumerable,dv=av.splice,r2=hi?hi.isConcatSpreadable:n,vd=hi?hi.iterator:n,gl=hi?hi.toStringTag:n,fv=function(){try{var u=$l(Bn,"defineProperty");return u({},"",{}),u}catch{}}(),eL=Le.clearTimeout!==Bo.clearTimeout&&Le.clearTimeout,tL=yt&&yt.now!==Bo.Date.now&&yt.now,nL=Le.setTimeout!==Bo.setTimeout&&Le.setTimeout,pv=xo.ceil,vv=xo.floor,Kb=Bn.getOwnPropertySymbols,oL=lv?lv.isBuffer:n,s2=Le.isFinite,aL=av.join,rL=ZS(Bn.keys,Bn),Ao=xo.max,qo=xo.min,sL=yt.now,iL=Le.parseInt,i2=xo.random,lL=av.reverse,Yb=$l(Le,"DataView"),hd=$l(Le,"Map"),Gb=$l(Le,"Promise"),Iu=$l(Le,"Set"),md=$l(Le,"WeakMap"),gd=$l(Bn,"create"),hv=md&&new md,Tu={},uL=Cl(Yb),cL=Cl(hd),dL=Cl(Gb),fL=Cl(Iu),pL=Cl(md),mv=hi?hi.prototype:n,bd=mv?mv.valueOf:n,l2=mv?mv.toString:n;function te(u){if(uo(u)&&!qt(u)&&!(u instanceof ln)){if(u instanceof tr)return u;if(Dn.call(u,"__wrapped__"))return uE(u)}return new tr(u)}var xu=function(){function u(){}return function(v){if(!ro(v))return{};if(o2)return o2(v);u.prototype=v;var $=new u;return u.prototype=n,$}}();function gv(){}function tr(u,v){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=n}te.templateSettings={escape:pa,evaluate:Yp,interpolate:Gp,variable:"",imports:{_:te}},te.prototype=gv.prototype,te.prototype.constructor=te,tr.prototype=xu(gv.prototype),tr.prototype.constructor=tr;function ln(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Z,this.__views__=[]}function vL(){var u=new ln(this.__wrapped__);return u.__actions__=va(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=va(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=va(this.__views__),u}function hL(){if(this.__filtered__){var u=new ln(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function mL(){var u=this.__wrapped__.value(),v=this.__dir__,$=qt(u),R=v<0,K=$?u.length:0,ae=TF(0,K,this.__views__),pe=ae.start,me=ae.end,Ee=me-pe,He=R?me:pe-1,qe=this.__iteratees__,Ge=qe.length,vt=0,St=qo(Ee,this.__takeCount__);if(!$||!R&&K==Ee&&St==Ee)return D2(u,this.__actions__);var Lt=[];e:for(;Ee--&&vt<St;){He+=v;for(var Zt=-1,Ft=u[He];++Zt<Ge;){var rn=qe[Zt],cn=rn.iteratee,Ma=rn.type,aa=cn(Ft);if(Ma==U)Ft=aa;else if(!aa){if(Ma==X)continue e;break e}}Lt[vt++]=Ft}return Lt}ln.prototype=xu(gv.prototype),ln.prototype.constructor=ln;function bl(u){var v=-1,$=u==null?0:u.length;for(this.clear();++v<$;){var R=u[v];this.set(R[0],R[1])}}function gL(){this.__data__=gd?gd(null):{},this.size=0}function bL(u){var v=this.has(u)&&delete this.__data__[u];return this.size-=v?1:0,v}function yL(u){var v=this.__data__;if(gd){var $=v[u];return $===l?n:$}return Dn.call(v,u)?v[u]:n}function _L(u){var v=this.__data__;return gd?v[u]!==n:Dn.call(v,u)}function wL(u,v){var $=this.__data__;return this.size+=this.has(u)?0:1,$[u]=gd&&v===n?l:v,this}bl.prototype.clear=gL,bl.prototype.delete=bL,bl.prototype.get=yL,bl.prototype.has=_L,bl.prototype.set=wL;function xs(u){var v=-1,$=u==null?0:u.length;for(this.clear();++v<$;){var R=u[v];this.set(R[0],R[1])}}function $L(){this.__data__=[],this.size=0}function CL(u){var v=this.__data__,$=bv(v,u);if($<0)return!1;var R=v.length-1;return $==R?v.pop():dv.call(v,$,1),--this.size,!0}function SL(u){var v=this.__data__,$=bv(v,u);return $<0?n:v[$][1]}function EL(u){return bv(this.__data__,u)>-1}function kL(u,v){var $=this.__data__,R=bv($,u);return R<0?(++this.size,$.push([u,v])):$[R][1]=v,this}xs.prototype.clear=$L,xs.prototype.delete=CL,xs.prototype.get=SL,xs.prototype.has=EL,xs.prototype.set=kL;function As(u){var v=-1,$=u==null?0:u.length;for(this.clear();++v<$;){var R=u[v];this.set(R[0],R[1])}}function IL(){this.size=0,this.__data__={hash:new bl,map:new(hd||xs),string:new bl}}function TL(u){var v=Av(this,u).delete(u);return this.size-=v?1:0,v}function xL(u){return Av(this,u).get(u)}function AL(u){return Av(this,u).has(u)}function OL(u,v){var $=Av(this,u),R=$.size;return $.set(u,v),this.size+=$.size==R?0:1,this}As.prototype.clear=IL,As.prototype.delete=TL,As.prototype.get=xL,As.prototype.has=AL,As.prototype.set=OL;function yl(u){var v=-1,$=u==null?0:u.length;for(this.__data__=new As;++v<$;)this.add(u[v])}function DL(u){return this.__data__.set(u,l),this}function PL(u){return this.__data__.has(u)}yl.prototype.add=yl.prototype.push=DL,yl.prototype.has=PL;function Ar(u){var v=this.__data__=new xs(u);this.size=v.size}function ML(){this.__data__=new xs,this.size=0}function NL(u){var v=this.__data__,$=v.delete(u);return this.size=v.size,$}function RL(u){return this.__data__.get(u)}function LL(u){return this.__data__.has(u)}function FL(u,v){var $=this.__data__;if($ instanceof xs){var R=$.__data__;if(!hd||R.length<a-1)return R.push([u,v]),this.size=++$.size,this;$=this.__data__=new As(R)}return $.set(u,v),this.size=$.size,this}Ar.prototype.clear=ML,Ar.prototype.delete=NL,Ar.prototype.get=RL,Ar.prototype.has=LL,Ar.prototype.set=FL;function u2(u,v){var $=qt(u),R=!$&&Sl(u),K=!$&&!R&&_i(u),ae=!$&&!R&&!K&&Pu(u),pe=$||R||K||ae,me=pe?Ub(u.length,YR):[],Ee=me.length;for(var He in u)(v||Dn.call(u,He))&&!(pe&&(He=="length"||K&&(He=="offset"||He=="parent")||ae&&(He=="buffer"||He=="byteLength"||He=="byteOffset")||Ms(He,Ee)))&&me.push(He);return me}function c2(u){var v=u.length;return v?u[sy(0,v-1)]:n}function BL(u,v){return Ov(va(u),_l(v,0,u.length))}function VL(u){return Ov(va(u))}function Qb(u,v,$){($!==n&&!Or(u[v],$)||$===n&&!(v in u))&&Os(u,v,$)}function yd(u,v,$){var R=u[v];(!(Dn.call(u,v)&&Or(R,$))||$===n&&!(v in u))&&Os(u,v,$)}function bv(u,v){for(var $=u.length;$--;)if(Or(u[$][0],v))return $;return-1}function zL(u,v,$,R){return mi(u,function(K,ae,pe){v(R,K,$(K),pe)}),R}function d2(u,v){return u&&ss(v,Lo(v),u)}function jL(u,v){return u&&ss(v,ma(v),u)}function Os(u,v,$){v=="__proto__"&&fv?fv(u,v,{configurable:!0,enumerable:!0,value:$,writable:!0}):u[v]=$}function Jb(u,v){for(var $=-1,R=v.length,K=Oe(R),ae=u==null;++$<R;)K[$]=ae?n:Oy(u,v[$]);return K}function _l(u,v,$){return u===u&&($!==n&&(u=u<=$?u:$),v!==n&&(u=u>=v?u:v)),u}function nr(u,v,$,R,K,ae){var pe,me=v&p,Ee=v&h,He=v&m;if($&&(pe=K?$(u,R,K,ae):$(u)),pe!==n)return pe;if(!ro(u))return u;var qe=qt(u);if(qe){if(pe=AF(u),!me)return va(u,pe)}else{var Ge=Ko(u),vt=Ge==Me||Ge==ee;if(_i(u))return N2(u,me);if(Ge==$e||Ge==he||vt&&!K){if(pe=Ee||vt?{}:eE(u),!me)return Ee?yF(u,jL(pe,u)):bF(u,d2(pe,u))}else{if(!zn[Ge])return K?u:{};pe=OF(u,Ge,me)}}ae||(ae=new Ar);var St=ae.get(u);if(St)return St;ae.set(u,pe),xE(u)?u.forEach(function(Ft){pe.add(nr(Ft,v,$,Ft,u,ae))}):IE(u)&&u.forEach(function(Ft,rn){pe.set(rn,nr(Ft,v,$,rn,u,ae))});var Lt=He?Ee?gy:my:Ee?ma:Lo,Zt=qe?n:Lt(u);return Za(Zt||u,function(Ft,rn){Zt&&(rn=Ft,Ft=u[rn]),yd(pe,rn,nr(Ft,v,$,rn,u,ae))}),pe}function UL(u){var v=Lo(u);return function($){return f2($,u,v)}}function f2(u,v,$){var R=$.length;if(u==null)return!R;for(u=Bn(u);R--;){var K=$[R],ae=v[K],pe=u[K];if(pe===n&&!(K in u)||!ae(pe))return!1}return!0}function p2(u,v,$){if(typeof u!="function")throw new er(s);return kd(function(){u.apply(n,$)},v)}function _d(u,v,$,R){var K=-1,ae=tv,pe=!0,me=u.length,Ee=[],He=v.length;if(!me)return Ee;$&&(v=to(v,Oa($))),R?(ae=Lb,pe=!1):v.length>=a&&(ae=pd,pe=!1,v=new yl(v));e:for(;++K<me;){var qe=u[K],Ge=$==null?qe:$(qe);if(qe=R||qe!==0?qe:0,pe&&Ge===Ge){for(var vt=He;vt--;)if(v[vt]===Ge)continue e;Ee.push(qe)}else ae(v,Ge,R)||Ee.push(qe)}return Ee}var mi=V2(rs),v2=V2(Zb,!0);function WL(u,v){var $=!0;return mi(u,function(R,K,ae){return $=!!v(R,K,ae),$}),$}function yv(u,v,$){for(var R=-1,K=u.length;++R<K;){var ae=u[R],pe=v(ae);if(pe!=null&&(me===n?pe===pe&&!Pa(pe):$(pe,me)))var me=pe,Ee=ae}return Ee}function HL(u,v,$,R){var K=u.length;for($=Jt($),$<0&&($=-$>K?0:K+$),R=R===n||R>K?K:Jt(R),R<0&&(R+=K),R=$>R?0:OE(R);$<R;)u[$++]=v;return u}function h2(u,v){var $=[];return mi(u,function(R,K,ae){v(R,K,ae)&&$.push(R)}),$}function Vo(u,v,$,R,K){var ae=-1,pe=u.length;for($||($=PF),K||(K=[]);++ae<pe;){var me=u[ae];v>0&&$(me)?v>1?Vo(me,v-1,$,R,K):pi(K,me):R||(K[K.length]=me)}return K}var Xb=z2(),m2=z2(!0);function rs(u,v){return u&&Xb(u,v,Lo)}function Zb(u,v){return u&&m2(u,v,Lo)}function _v(u,v){return fi(v,function($){return Ns(u[$])})}function wl(u,v){v=bi(v,u);for(var $=0,R=v.length;u!=null&&$<R;)u=u[is(v[$++])];return $&&$==R?u:n}function g2(u,v,$){var R=v(u);return qt(u)?R:pi(R,$(u))}function na(u){return u==null?u===n?Qe:ke:gl&&gl in Bn(u)?IF(u):VF(u)}function ey(u,v){return u>v}function qL(u,v){return u!=null&&Dn.call(u,v)}function KL(u,v){return u!=null&&v in Bn(u)}function YL(u,v,$){return u>=qo(v,$)&&u<Ao(v,$)}function ty(u,v,$){for(var R=$?Lb:tv,K=u[0].length,ae=u.length,pe=ae,me=Oe(ae),Ee=1/0,He=[];pe--;){var qe=u[pe];pe&&v&&(qe=to(qe,Oa(v))),Ee=qo(qe.length,Ee),me[pe]=!$&&(v||K>=120&&qe.length>=120)?new yl(pe&&qe):n}qe=u[0];var Ge=-1,vt=me[0];e:for(;++Ge<K&&He.length<Ee;){var St=qe[Ge],Lt=v?v(St):St;if(St=$||St!==0?St:0,!(vt?pd(vt,Lt):R(He,Lt,$))){for(pe=ae;--pe;){var Zt=me[pe];if(!(Zt?pd(Zt,Lt):R(u[pe],Lt,$)))continue e}vt&&vt.push(Lt),He.push(St)}}return He}function GL(u,v,$,R){return rs(u,function(K,ae,pe){v(R,$(K),ae,pe)}),R}function wd(u,v,$){v=bi(v,u),u=aE(u,v);var R=u==null?u:u[is(ar(v))];return R==null?n:Aa(R,u,$)}function b2(u){return uo(u)&&na(u)==he}function QL(u){return uo(u)&&na(u)==bt}function JL(u){return uo(u)&&na(u)==oe}function $d(u,v,$,R,K){return u===v?!0:u==null||v==null||!uo(u)&&!uo(v)?u!==u&&v!==v:XL(u,v,$,R,$d,K)}function XL(u,v,$,R,K,ae){var pe=qt(u),me=qt(v),Ee=pe?le:Ko(u),He=me?le:Ko(v);Ee=Ee==he?$e:Ee,He=He==he?$e:He;var qe=Ee==$e,Ge=He==$e,vt=Ee==He;if(vt&&_i(u)){if(!_i(v))return!1;pe=!0,qe=!1}if(vt&&!qe)return ae||(ae=new Ar),pe||Pu(u)?J2(u,v,$,R,K,ae):EF(u,v,Ee,$,R,K,ae);if(!($&b)){var St=qe&&Dn.call(u,"__wrapped__"),Lt=Ge&&Dn.call(v,"__wrapped__");if(St||Lt){var Zt=St?u.value():u,Ft=Lt?v.value():v;return ae||(ae=new Ar),K(Zt,Ft,$,R,ae)}}return vt?(ae||(ae=new Ar),kF(u,v,$,R,K,ae)):!1}function ZL(u){return uo(u)&&Ko(u)==ne}function ny(u,v,$,R){var K=$.length,ae=K,pe=!R;if(u==null)return!ae;for(u=Bn(u);K--;){var me=$[K];if(pe&&me[2]?me[1]!==u[me[0]]:!(me[0]in u))return!1}for(;++K<ae;){me=$[K];var Ee=me[0],He=u[Ee],qe=me[1];if(pe&&me[2]){if(He===n&&!(Ee in u))return!1}else{var Ge=new Ar;if(R)var vt=R(He,qe,Ee,u,v,Ge);if(!(vt===n?$d(qe,He,b|g,R,Ge):vt))return!1}}return!0}function y2(u){if(!ro(u)||NF(u))return!1;var v=Ns(u)?ZR:Ja;return v.test(Cl(u))}function eF(u){return uo(u)&&na(u)==Re}function tF(u){return uo(u)&&Ko(u)==je}function nF(u){return uo(u)&&Lv(u.length)&&!!Yn[na(u)]}function _2(u){return typeof u=="function"?u:u==null?ga:typeof u=="object"?qt(u)?C2(u[0],u[1]):$2(u):jE(u)}function oy(u){if(!Ed(u))return rL(u);var v=[];for(var $ in Bn(u))Dn.call(u,$)&&$!="constructor"&&v.push($);return v}function oF(u){if(!ro(u))return BF(u);var v=Ed(u),$=[];for(var R in u)R=="constructor"&&(v||!Dn.call(u,R))||$.push(R);return $}function ay(u,v){return u<v}function w2(u,v){var $=-1,R=ha(u)?Oe(u.length):[];return mi(u,function(K,ae,pe){R[++$]=v(K,ae,pe)}),R}function $2(u){var v=yy(u);return v.length==1&&v[0][2]?nE(v[0][0],v[0][1]):function($){return $===u||ny($,u,v)}}function C2(u,v){return wy(u)&&tE(v)?nE(is(u),v):function($){var R=Oy($,u);return R===n&&R===v?Dy($,u):$d(v,R,b|g)}}function wv(u,v,$,R,K){u!==v&&Xb(v,function(ae,pe){if(K||(K=new Ar),ro(ae))aF(u,v,pe,$,wv,R,K);else{var me=R?R(Cy(u,pe),ae,pe+"",u,v,K):n;me===n&&(me=ae),Qb(u,pe,me)}},ma)}function aF(u,v,$,R,K,ae,pe){var me=Cy(u,$),Ee=Cy(v,$),He=pe.get(Ee);if(He){Qb(u,$,He);return}var qe=ae?ae(me,Ee,$+"",u,v,pe):n,Ge=qe===n;if(Ge){var vt=qt(Ee),St=!vt&&_i(Ee),Lt=!vt&&!St&&Pu(Ee);qe=Ee,vt||St||Lt?qt(me)?qe=me:mo(me)?qe=va(me):St?(Ge=!1,qe=N2(Ee,!0)):Lt?(Ge=!1,qe=R2(Ee,!0)):qe=[]:Id(Ee)||Sl(Ee)?(qe=me,Sl(me)?qe=DE(me):(!ro(me)||Ns(me))&&(qe=eE(Ee))):Ge=!1}Ge&&(pe.set(Ee,qe),K(qe,Ee,R,ae,pe),pe.delete(Ee)),Qb(u,$,qe)}function S2(u,v){var $=u.length;if($)return v+=v<0?$:0,Ms(v,$)?u[v]:n}function E2(u,v,$){v.length?v=to(v,function(ae){return qt(ae)?function(pe){return wl(pe,ae.length===1?ae[0]:ae)}:ae}):v=[ga];var R=-1;v=to(v,Oa(Rt()));var K=w2(u,function(ae,pe,me){var Ee=to(v,function(He){return He(ae)});return{criteria:Ee,index:++R,value:ae}});return OR(K,function(ae,pe){return gF(ae,pe,$)})}function rF(u,v){return k2(u,v,function($,R){return Dy(u,R)})}function k2(u,v,$){for(var R=-1,K=v.length,ae={};++R<K;){var pe=v[R],me=wl(u,pe);$(me,pe)&&Cd(ae,bi(pe,u),me)}return ae}function sF(u){return function(v){return wl(v,u)}}function ry(u,v,$,R){var K=R?AR:$u,ae=-1,pe=v.length,me=u;for(u===v&&(v=va(v)),$&&(me=to(u,Oa($)));++ae<pe;)for(var Ee=0,He=v[ae],qe=$?$(He):He;(Ee=K(me,qe,Ee,R))>-1;)me!==u&&dv.call(me,Ee,1),dv.call(u,Ee,1);return u}function I2(u,v){for(var $=u?v.length:0,R=$-1;$--;){var K=v[$];if($==R||K!==ae){var ae=K;Ms(K)?dv.call(u,K,1):uy(u,K)}}return u}function sy(u,v){return u+vv(i2()*(v-u+1))}function iF(u,v,$,R){for(var K=-1,ae=Ao(pv((v-u)/($||1)),0),pe=Oe(ae);ae--;)pe[R?ae:++K]=u,u+=$;return pe}function iy(u,v){var $="";if(!u||v<1||v>q)return $;do v%2&&($+=u),v=vv(v/2),v&&(u+=u);while(v);return $}function tn(u,v){return Sy(oE(u,v,ga),u+"")}function lF(u){return c2(Mu(u))}function uF(u,v){var $=Mu(u);return Ov($,_l(v,0,$.length))}function Cd(u,v,$,R){if(!ro(u))return u;v=bi(v,u);for(var K=-1,ae=v.length,pe=ae-1,me=u;me!=null&&++K<ae;){var Ee=is(v[K]),He=$;if(Ee==="__proto__"||Ee==="constructor"||Ee==="prototype")return u;if(K!=pe){var qe=me[Ee];He=R?R(qe,Ee,me):n,He===n&&(He=ro(qe)?qe:Ms(v[K+1])?[]:{})}yd(me,Ee,He),me=me[Ee]}return u}var T2=hv?function(u,v){return hv.set(u,v),u}:ga,cF=fv?function(u,v){return fv(u,"toString",{configurable:!0,enumerable:!1,value:My(v),writable:!0})}:ga;function dF(u){return Ov(Mu(u))}function or(u,v,$){var R=-1,K=u.length;v<0&&(v=-v>K?0:K+v),$=$>K?K:$,$<0&&($+=K),K=v>$?0:$-v>>>0,v>>>=0;for(var ae=Oe(K);++R<K;)ae[R]=u[R+v];return ae}function fF(u,v){var $;return mi(u,function(R,K,ae){return $=v(R,K,ae),!$}),!!$}function $v(u,v,$){var R=0,K=u==null?R:u.length;if(typeof v=="number"&&v===v&&K<=re){for(;R<K;){var ae=R+K>>>1,pe=u[ae];pe!==null&&!Pa(pe)&&($?pe<=v:pe<v)?R=ae+1:K=ae}return K}return ly(u,v,ga,$)}function ly(u,v,$,R){var K=0,ae=u==null?0:u.length;if(ae===0)return 0;v=$(v);for(var pe=v!==v,me=v===null,Ee=Pa(v),He=v===n;K<ae;){var qe=vv((K+ae)/2),Ge=$(u[qe]),vt=Ge!==n,St=Ge===null,Lt=Ge===Ge,Zt=Pa(Ge);if(pe)var Ft=R||Lt;else He?Ft=Lt&&(R||vt):me?Ft=Lt&&vt&&(R||!St):Ee?Ft=Lt&&vt&&!St&&(R||!Zt):St||Zt?Ft=!1:Ft=R?Ge<=v:Ge<v;Ft?K=qe+1:ae=qe}return qo(ae,ce)}function x2(u,v){for(var $=-1,R=u.length,K=0,ae=[];++$<R;){var pe=u[$],me=v?v(pe):pe;if(!$||!Or(me,Ee)){var Ee=me;ae[K++]=pe===0?0:pe}}return ae}function A2(u){return typeof u=="number"?u:Pa(u)?Y:+u}function Da(u){if(typeof u=="string")return u;if(qt(u))return to(u,Da)+"";if(Pa(u))return l2?l2.call(u):"";var v=u+"";return v=="0"&&1/u==-Q?"-0":v}function gi(u,v,$){var R=-1,K=tv,ae=u.length,pe=!0,me=[],Ee=me;if($)pe=!1,K=Lb;else if(ae>=a){var He=v?null:CF(u);if(He)return ov(He);pe=!1,K=pd,Ee=new yl}else Ee=v?[]:me;e:for(;++R<ae;){var qe=u[R],Ge=v?v(qe):qe;if(qe=$||qe!==0?qe:0,pe&&Ge===Ge){for(var vt=Ee.length;vt--;)if(Ee[vt]===Ge)continue e;v&&Ee.push(Ge),me.push(qe)}else K(Ee,Ge,$)||(Ee!==me&&Ee.push(Ge),me.push(qe))}return me}function uy(u,v){return v=bi(v,u),u=aE(u,v),u==null||delete u[is(ar(v))]}function O2(u,v,$,R){return Cd(u,v,$(wl(u,v)),R)}function Cv(u,v,$,R){for(var K=u.length,ae=R?K:-1;(R?ae--:++ae<K)&&v(u[ae],ae,u););return $?or(u,R?0:ae,R?ae+1:K):or(u,R?ae+1:0,R?K:ae)}function D2(u,v){var $=u;return $ instanceof ln&&($=$.value()),Fb(v,function(R,K){return K.func.apply(K.thisArg,pi([R],K.args))},$)}function cy(u,v,$){var R=u.length;if(R<2)return R?gi(u[0]):[];for(var K=-1,ae=Oe(R);++K<R;)for(var pe=u[K],me=-1;++me<R;)me!=K&&(ae[K]=_d(ae[K]||pe,u[me],v,$));return gi(Vo(ae,1),v,$)}function P2(u,v,$){for(var R=-1,K=u.length,ae=v.length,pe={};++R<K;){var me=R<ae?v[R]:n;$(pe,u[R],me)}return pe}function dy(u){return mo(u)?u:[]}function fy(u){return typeof u=="function"?u:ga}function bi(u,v){return qt(u)?u:wy(u,v)?[u]:lE(Tn(u))}var pF=tn;function yi(u,v,$){var R=u.length;return $=$===n?R:$,!v&&$>=R?u:or(u,v,$)}var M2=eL||function(u){return Bo.clearTimeout(u)};function N2(u,v){if(v)return u.slice();var $=u.length,R=n2?n2($):new u.constructor($);return u.copy(R),R}function py(u){var v=new u.constructor(u.byteLength);return new uv(v).set(new uv(u)),v}function vF(u,v){var $=v?py(u.buffer):u.buffer;return new u.constructor($,u.byteOffset,u.byteLength)}function hF(u){var v=new u.constructor(u.source,Is.exec(u));return v.lastIndex=u.lastIndex,v}function mF(u){return bd?Bn(bd.call(u)):{}}function R2(u,v){var $=v?py(u.buffer):u.buffer;return new u.constructor($,u.byteOffset,u.length)}function L2(u,v){if(u!==v){var $=u!==n,R=u===null,K=u===u,ae=Pa(u),pe=v!==n,me=v===null,Ee=v===v,He=Pa(v);if(!me&&!He&&!ae&&u>v||ae&&pe&&Ee&&!me&&!He||R&&pe&&Ee||!$&&Ee||!K)return 1;if(!R&&!ae&&!He&&u<v||He&&$&&K&&!R&&!ae||me&&$&&K||!pe&&K||!Ee)return-1}return 0}function gF(u,v,$){for(var R=-1,K=u.criteria,ae=v.criteria,pe=K.length,me=$.length;++R<pe;){var Ee=L2(K[R],ae[R]);if(Ee){if(R>=me)return Ee;var He=$[R];return Ee*(He=="desc"?-1:1)}}return u.index-v.index}function F2(u,v,$,R){for(var K=-1,ae=u.length,pe=$.length,me=-1,Ee=v.length,He=Ao(ae-pe,0),qe=Oe(Ee+He),Ge=!R;++me<Ee;)qe[me]=v[me];for(;++K<pe;)(Ge||K<ae)&&(qe[$[K]]=u[K]);for(;He--;)qe[me++]=u[K++];return qe}function B2(u,v,$,R){for(var K=-1,ae=u.length,pe=-1,me=$.length,Ee=-1,He=v.length,qe=Ao(ae-me,0),Ge=Oe(qe+He),vt=!R;++K<qe;)Ge[K]=u[K];for(var St=K;++Ee<He;)Ge[St+Ee]=v[Ee];for(;++pe<me;)(vt||K<ae)&&(Ge[St+$[pe]]=u[K++]);return Ge}function va(u,v){var $=-1,R=u.length;for(v||(v=Oe(R));++$<R;)v[$]=u[$];return v}function ss(u,v,$,R){var K=!$;$||($={});for(var ae=-1,pe=v.length;++ae<pe;){var me=v[ae],Ee=R?R($[me],u[me],me,$,u):n;Ee===n&&(Ee=u[me]),K?Os($,me,Ee):yd($,me,Ee)}return $}function bF(u,v){return ss(u,_y(u),v)}function yF(u,v){return ss(u,X2(u),v)}function Sv(u,v){return function($,R){var K=qt($)?SR:zL,ae=v?v():{};return K($,u,Rt(R,2),ae)}}function Au(u){return tn(function(v,$){var R=-1,K=$.length,ae=K>1?$[K-1]:n,pe=K>2?$[2]:n;for(ae=u.length>3&&typeof ae=="function"?(K--,ae):n,pe&&oa($[0],$[1],pe)&&(ae=K<3?n:ae,K=1),v=Bn(v);++R<K;){var me=$[R];me&&u(v,me,R,ae)}return v})}function V2(u,v){return function($,R){if($==null)return $;if(!ha($))return u($,R);for(var K=$.length,ae=v?K:-1,pe=Bn($);(v?ae--:++ae<K)&&R(pe[ae],ae,pe)!==!1;);return $}}function z2(u){return function(v,$,R){for(var K=-1,ae=Bn(v),pe=R(v),me=pe.length;me--;){var Ee=pe[u?me:++K];if($(ae[Ee],Ee,ae)===!1)break}return v}}function _F(u,v,$){var R=v&y,K=Sd(u);function ae(){var pe=this&&this!==Bo&&this instanceof ae?K:u;return pe.apply(R?$:this,arguments)}return ae}function j2(u){return function(v){v=Tn(v);var $=Cu(v)?xr(v):n,R=$?$[0]:v.charAt(0),K=$?yi($,1).join(""):v.slice(1);return R[u]()+K}}function Ou(u){return function(v){return Fb(VE(BE(v).replace(cR,"")),u,"")}}function Sd(u){return function(){var v=arguments;switch(v.length){case 0:return new u;case 1:return new u(v[0]);case 2:return new u(v[0],v[1]);case 3:return new u(v[0],v[1],v[2]);case 4:return new u(v[0],v[1],v[2],v[3]);case 5:return new u(v[0],v[1],v[2],v[3],v[4]);case 6:return new u(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new u(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var $=xu(u.prototype),R=u.apply($,v);return ro(R)?R:$}}function wF(u,v,$){var R=Sd(u);function K(){for(var ae=arguments.length,pe=Oe(ae),me=ae,Ee=Du(K);me--;)pe[me]=arguments[me];var He=ae<3&&pe[0]!==Ee&&pe[ae-1]!==Ee?[]:vi(pe,Ee);if(ae-=He.length,ae<$)return K2(u,v,Ev,K.placeholder,n,pe,He,n,n,$-ae);var qe=this&&this!==Bo&&this instanceof K?R:u;return Aa(qe,this,pe)}return K}function U2(u){return function(v,$,R){var K=Bn(v);if(!ha(v)){var ae=Rt($,3);v=Lo(v),$=function(me){return ae(K[me],me,K)}}var pe=u(v,$,R);return pe>-1?K[ae?v[pe]:pe]:n}}function W2(u){return Ps(function(v){var $=v.length,R=$,K=tr.prototype.thru;for(u&&v.reverse();R--;){var ae=v[R];if(typeof ae!="function")throw new er(s);if(K&&!pe&&xv(ae)=="wrapper")var pe=new tr([],!0)}for(R=pe?R:$;++R<$;){ae=v[R];var me=xv(ae),Ee=me=="wrapper"?by(ae):n;Ee&&$y(Ee[0])&&Ee[1]==(S|k|T|D)&&!Ee[4].length&&Ee[9]==1?pe=pe[xv(Ee[0])].apply(pe,Ee[3]):pe=ae.length==1&&$y(ae)?pe[me]():pe.thru(ae)}return function(){var He=arguments,qe=He[0];if(pe&&He.length==1&&qt(qe))return pe.plant(qe).value();for(var Ge=0,vt=$?v[Ge].apply(this,He):qe;++Ge<$;)vt=v[Ge].call(this,vt);return vt}})}function Ev(u,v,$,R,K,ae,pe,me,Ee,He){var qe=v&S,Ge=v&y,vt=v&_,St=v&(k|E),Lt=v&N,Zt=vt?n:Sd(u);function Ft(){for(var rn=arguments.length,cn=Oe(rn),Ma=rn;Ma--;)cn[Ma]=arguments[Ma];if(St)var aa=Du(Ft),Na=PR(cn,aa);if(R&&(cn=F2(cn,R,K,St)),ae&&(cn=B2(cn,ae,pe,St)),rn-=Na,St&&rn<He){var go=vi(cn,aa);return K2(u,v,Ev,Ft.placeholder,$,cn,go,me,Ee,He-rn)}var Dr=Ge?$:this,Ls=vt?Dr[u]:u;return rn=cn.length,me?cn=zF(cn,me):Lt&&rn>1&&cn.reverse(),qe&&Ee<rn&&(cn.length=Ee),this&&this!==Bo&&this instanceof Ft&&(Ls=Zt||Sd(Ls)),Ls.apply(Dr,cn)}return Ft}function H2(u,v){return function($,R){return GL($,u,v(R),{})}}function kv(u,v){return function($,R){var K;if($===n&&R===n)return v;if($!==n&&(K=$),R!==n){if(K===n)return R;typeof $=="string"||typeof R=="string"?($=Da($),R=Da(R)):($=A2($),R=A2(R)),K=u($,R)}return K}}function vy(u){return Ps(function(v){return v=to(v,Oa(Rt())),tn(function($){var R=this;return u(v,function(K){return Aa(K,R,$)})})})}function Iv(u,v){v=v===n?" ":Da(v);var $=v.length;if($<2)return $?iy(v,u):v;var R=iy(v,pv(u/Su(v)));return Cu(v)?yi(xr(R),0,u).join(""):R.slice(0,u)}function $F(u,v,$,R){var K=v&y,ae=Sd(u);function pe(){for(var me=-1,Ee=arguments.length,He=-1,qe=R.length,Ge=Oe(qe+Ee),vt=this&&this!==Bo&&this instanceof pe?ae:u;++He<qe;)Ge[He]=R[He];for(;Ee--;)Ge[He++]=arguments[++me];return Aa(vt,K?$:this,Ge)}return pe}function q2(u){return function(v,$,R){return R&&typeof R!="number"&&oa(v,$,R)&&($=R=n),v=Rs(v),$===n?($=v,v=0):$=Rs($),R=R===n?v<$?1:-1:Rs(R),iF(v,$,R,u)}}function Tv(u){return function(v,$){return typeof v=="string"&&typeof $=="string"||(v=rr(v),$=rr($)),u(v,$)}}function K2(u,v,$,R,K,ae,pe,me,Ee,He){var qe=v&k,Ge=qe?pe:n,vt=qe?n:pe,St=qe?ae:n,Lt=qe?n:ae;v|=qe?T:x,v&=~(qe?x:T),v&I||(v&=-4);var Zt=[u,v,K,St,Ge,Lt,vt,me,Ee,He],Ft=$.apply(n,Zt);return $y(u)&&rE(Ft,Zt),Ft.placeholder=R,sE(Ft,u,v)}function hy(u){var v=xo[u];return function($,R){if($=rr($),R=R==null?0:qo(Jt(R),292),R&&s2($)){var K=(Tn($)+"e").split("e"),ae=v(K[0]+"e"+(+K[1]+R));return K=(Tn(ae)+"e").split("e"),+(K[0]+"e"+(+K[1]-R))}return v($)}}var CF=Iu&&1/ov(new Iu([,-0]))[1]==Q?function(u){return new Iu(u)}:Ly;function Y2(u){return function(v){var $=Ko(v);return $==ne?Hb(v):$==je?VR(v):DR(v,u(v))}}function Ds(u,v,$,R,K,ae,pe,me){var Ee=v&_;if(!Ee&&typeof u!="function")throw new er(s);var He=R?R.length:0;if(He||(v&=-97,R=K=n),pe=pe===n?pe:Ao(Jt(pe),0),me=me===n?me:Jt(me),He-=K?K.length:0,v&x){var qe=R,Ge=K;R=K=n}var vt=Ee?n:by(u),St=[u,v,$,R,K,qe,Ge,ae,pe,me];if(vt&&FF(St,vt),u=St[0],v=St[1],$=St[2],R=St[3],K=St[4],me=St[9]=St[9]===n?Ee?0:u.length:Ao(St[9]-He,0),!me&&v&(k|E)&&(v&=-25),!v||v==y)var Lt=_F(u,v,$);else v==k||v==E?Lt=wF(u,v,me):(v==T||v==(y|T))&&!K.length?Lt=$F(u,v,$,R):Lt=Ev.apply(n,St);var Zt=vt?T2:rE;return sE(Zt(Lt,St),u,v)}function G2(u,v,$,R){return u===n||Or(u,ku[$])&&!Dn.call(R,$)?v:u}function Q2(u,v,$,R,K,ae){return ro(u)&&ro(v)&&(ae.set(v,u),wv(u,v,n,Q2,ae),ae.delete(v)),u}function SF(u){return Id(u)?n:u}function J2(u,v,$,R,K,ae){var pe=$&b,me=u.length,Ee=v.length;if(me!=Ee&&!(pe&&Ee>me))return!1;var He=ae.get(u),qe=ae.get(v);if(He&&qe)return He==v&&qe==u;var Ge=-1,vt=!0,St=$&g?new yl:n;for(ae.set(u,v),ae.set(v,u);++Ge<me;){var Lt=u[Ge],Zt=v[Ge];if(R)var Ft=pe?R(Zt,Lt,Ge,v,u,ae):R(Lt,Zt,Ge,u,v,ae);if(Ft!==n){if(Ft)continue;vt=!1;break}if(St){if(!Bb(v,function(rn,cn){if(!pd(St,cn)&&(Lt===rn||K(Lt,rn,$,R,ae)))return St.push(cn)})){vt=!1;break}}else if(!(Lt===Zt||K(Lt,Zt,$,R,ae))){vt=!1;break}}return ae.delete(u),ae.delete(v),vt}function EF(u,v,$,R,K,ae,pe){switch($){case Ct:if(u.byteLength!=v.byteLength||u.byteOffset!=v.byteOffset)return!1;u=u.buffer,v=v.buffer;case bt:return!(u.byteLength!=v.byteLength||!ae(new uv(u),new uv(v)));case J:case oe:case fe:return Or(+u,+v);case ge:return u.name==v.name&&u.message==v.message;case Re:case Ve:return u==v+"";case ne:var me=Hb;case je:var Ee=R&b;if(me||(me=ov),u.size!=v.size&&!Ee)return!1;var He=pe.get(u);if(He)return He==v;R|=g,pe.set(u,v);var qe=J2(me(u),me(v),R,K,ae,pe);return pe.delete(u),qe;case tt:if(bd)return bd.call(u)==bd.call(v)}return!1}function kF(u,v,$,R,K,ae){var pe=$&b,me=my(u),Ee=me.length,He=my(v),qe=He.length;if(Ee!=qe&&!pe)return!1;for(var Ge=Ee;Ge--;){var vt=me[Ge];if(!(pe?vt in v:Dn.call(v,vt)))return!1}var St=ae.get(u),Lt=ae.get(v);if(St&&Lt)return St==v&&Lt==u;var Zt=!0;ae.set(u,v),ae.set(v,u);for(var Ft=pe;++Ge<Ee;){vt=me[Ge];var rn=u[vt],cn=v[vt];if(R)var Ma=pe?R(cn,rn,vt,v,u,ae):R(rn,cn,vt,u,v,ae);if(!(Ma===n?rn===cn||K(rn,cn,$,R,ae):Ma)){Zt=!1;break}Ft||(Ft=vt=="constructor")}if(Zt&&!Ft){var aa=u.constructor,Na=v.constructor;aa!=Na&&"constructor"in u&&"constructor"in v&&!(typeof aa=="function"&&aa instanceof aa&&typeof Na=="function"&&Na instanceof Na)&&(Zt=!1)}return ae.delete(u),ae.delete(v),Zt}function Ps(u){return Sy(oE(u,n,fE),u+"")}function my(u){return g2(u,Lo,_y)}function gy(u){return g2(u,ma,X2)}var by=hv?function(u){return hv.get(u)}:Ly;function xv(u){for(var v=u.name+"",$=Tu[v],R=Dn.call(Tu,v)?$.length:0;R--;){var K=$[R],ae=K.func;if(ae==null||ae==u)return K.name}return v}function Du(u){var v=Dn.call(te,"placeholder")?te:u;return v.placeholder}function Rt(){var u=te.iteratee||Ny;return u=u===Ny?_2:u,arguments.length?u(arguments[0],arguments[1]):u}function Av(u,v){var $=u.__data__;return MF(v)?$[typeof v=="string"?"string":"hash"]:$.map}function yy(u){for(var v=Lo(u),$=v.length;$--;){var R=v[$],K=u[R];v[$]=[R,K,tE(K)]}return v}function $l(u,v){var $=LR(u,v);return y2($)?$:n}function IF(u){var v=Dn.call(u,gl),$=u[gl];try{u[gl]=n;var R=!0}catch{}var K=iv.call(u);return R&&(v?u[gl]=$:delete u[gl]),K}var _y=Kb?function(u){return u==null?[]:(u=Bn(u),fi(Kb(u),function(v){return a2.call(u,v)}))}:Fy,X2=Kb?function(u){for(var v=[];u;)pi(v,_y(u)),u=cv(u);return v}:Fy,Ko=na;(Yb&&Ko(new Yb(new ArrayBuffer(1)))!=Ct||hd&&Ko(new hd)!=ne||Gb&&Ko(Gb.resolve())!=Pe||Iu&&Ko(new Iu)!=je||md&&Ko(new md)!=Te)&&(Ko=function(u){var v=na(u),$=v==$e?u.constructor:n,R=$?Cl($):"";if(R)switch(R){case uL:return Ct;case cL:return ne;case dL:return Pe;case fL:return je;case pL:return Te}return v});function TF(u,v,$){for(var R=-1,K=$.length;++R<K;){var ae=$[R],pe=ae.size;switch(ae.type){case"drop":u+=pe;break;case"dropRight":v-=pe;break;case"take":v=qo(v,u+pe);break;case"takeRight":u=Ao(u,v-pe);break}}return{start:u,end:v}}function xF(u){var v=u.match(xb);return v?v[1].split(Ne):[]}function Z2(u,v,$){v=bi(v,u);for(var R=-1,K=v.length,ae=!1;++R<K;){var pe=is(v[R]);if(!(ae=u!=null&&$(u,pe)))break;u=u[pe]}return ae||++R!=K?ae:(K=u==null?0:u.length,!!K&&Lv(K)&&Ms(pe,K)&&(qt(u)||Sl(u)))}function AF(u){var v=u.length,$=new u.constructor(v);return v&&typeof u[0]=="string"&&Dn.call(u,"index")&&($.index=u.index,$.input=u.input),$}function eE(u){return typeof u.constructor=="function"&&!Ed(u)?xu(cv(u)):{}}function OF(u,v,$){var R=u.constructor;switch(v){case bt:return py(u);case J:case oe:return new R(+u);case Ct:return vF(u,$);case Ut:case In:case Fn:case be:case Ue:case Ie:case We:case Be:case xt:return R2(u,$);case ne:return new R;case fe:case Ve:return new R(u);case Re:return hF(u);case je:return new R;case tt:return mF(u)}}function DF(u,v){var $=v.length;if(!$)return u;var R=$-1;return v[R]=($>1?"& ":"")+v[R],v=v.join($>2?", ":" "),u.replace(Tb,`{
87
+ */Im.exports;(function(e,t){(function(){var n,o="4.17.21",a=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",i="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",p=1,h=2,m=4,b=1,g=2,y=1,_=2,I=4,k=8,E=16,T=32,x=64,S=128,D=256,N=512,L=30,F="...",z=800,j=16,X=1,U=2,W=3,Q=1/0,q=9007199254740991,V=17976931348623157e292,Y=NaN,Z=4294967295,ce=Z-1,re=Z>>>1,ye=[["ary",S],["bind",y],["bindKey",_],["curry",k],["curryRight",E],["flip",N],["partial",T],["partialRight",x],["rearg",D]],he="[object Arguments]",le="[object Array]",ue="[object AsyncFunction]",J="[object Boolean]",oe="[object Date]",_e="[object DOMException]",ge="[object Error]",Me="[object Function]",ee="[object GeneratorFunction]",ne="[object Map]",fe="[object Number]",ke="[object Null]",$e="[object Object]",Pe="[object Promise]",ze="[object Proxy]",Re="[object RegExp]",je="[object Set]",Ve="[object String]",tt="[object Symbol]",Qe="[object Undefined]",Te="[object WeakMap]",rt="[object WeakSet]",bt="[object ArrayBuffer]",Ct="[object DataView]",Ut="[object Float32Array]",In="[object Float64Array]",Fn="[object Int8Array]",be="[object Int16Array]",Ue="[object Int32Array]",Ie="[object Uint8Array]",We="[object Uint8ClampedArray]",Be="[object Uint16Array]",xt="[object Uint32Array]",$n=/\b__p \+= '';/g,we=/\b(__p \+=) '' \+/g,pt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,zt=/&(?:amp|lt|gt|quot|#39);/g,an=/[&<>"']/g,ho=RegExp(zt.source),Cn=RegExp(an.source),pa=/<%-([\s\S]+?)%>/g,Yp=/<%([\s\S]+?)%>/g,Gp=/<%=([\s\S]+?)%>/g,cd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Eb=/^\w*$/,kb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dd=/[\\^$.*+?()[\]{}|]/g,Qp=RegExp(dd.source),fd=/^\s+/,Ib=/\s/,Tb=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,xb=/\{\n\/\* \[wrapped with (.+)\] \*/,Ne=/,? & /,ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,en=/[()=,{}\[\]\/\s]/,Rn=/\\(\\)?/g,as=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Is=/\w*$/,_u=/^[-+]0x[0-9a-f]+$/i,Ts=/^0b[01]+$/i,Ja=/^\[object .+?Constructor\]$/,Jp=/^0o[0-7]+$/i,H6=/^(?:0|[1-9]\d*)$/,q6=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xp=/($^)/,K6=/['\n\r\u2028\u2029\\]/g,Zp="\\ud800-\\udfff",Y6="\\u0300-\\u036f",G6="\\ufe20-\\ufe2f",Q6="\\u20d0-\\u20ff",yS=Y6+G6+Q6,_S="\\u2700-\\u27bf",wS="a-z\\xdf-\\xf6\\xf8-\\xff",J6="\\xac\\xb1\\xd7\\xf7",X6="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Z6="\\u2000-\\u206f",eR=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$S="A-Z\\xc0-\\xd6\\xd8-\\xde",CS="\\ufe0e\\ufe0f",SS=J6+X6+Z6+eR,Ab="['’]",tR="["+Zp+"]",ES="["+SS+"]",ev="["+yS+"]",kS="\\d+",nR="["+_S+"]",IS="["+wS+"]",TS="[^"+Zp+SS+kS+_S+wS+$S+"]",Ob="\\ud83c[\\udffb-\\udfff]",oR="(?:"+ev+"|"+Ob+")",xS="[^"+Zp+"]",Db="(?:\\ud83c[\\udde6-\\uddff]){2}",Pb="[\\ud800-\\udbff][\\udc00-\\udfff]",wu="["+$S+"]",AS="\\u200d",OS="(?:"+IS+"|"+TS+")",aR="(?:"+wu+"|"+TS+")",DS="(?:"+Ab+"(?:d|ll|m|re|s|t|ve))?",PS="(?:"+Ab+"(?:D|LL|M|RE|S|T|VE))?",MS=oR+"?",NS="["+CS+"]?",rR="(?:"+AS+"(?:"+[xS,Db,Pb].join("|")+")"+NS+MS+")*",sR="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",iR="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",RS=NS+MS+rR,lR="(?:"+[nR,Db,Pb].join("|")+")"+RS,uR="(?:"+[xS+ev+"?",ev,Db,Pb,tR].join("|")+")",cR=RegExp(Ab,"g"),dR=RegExp(ev,"g"),Mb=RegExp(Ob+"(?="+Ob+")|"+uR+RS,"g"),fR=RegExp([wu+"?"+IS+"+"+DS+"(?="+[ES,wu,"$"].join("|")+")",aR+"+"+PS+"(?="+[ES,wu+OS,"$"].join("|")+")",wu+"?"+OS+"+"+DS,wu+"+"+PS,iR,sR,kS,lR].join("|"),"g"),pR=RegExp("["+AS+Zp+yS+CS+"]"),vR=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hR=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mR=-1,Yn={};Yn[Ut]=Yn[In]=Yn[Fn]=Yn[be]=Yn[Ue]=Yn[Ie]=Yn[We]=Yn[Be]=Yn[xt]=!0,Yn[he]=Yn[le]=Yn[bt]=Yn[J]=Yn[Ct]=Yn[oe]=Yn[ge]=Yn[Me]=Yn[ne]=Yn[fe]=Yn[$e]=Yn[Re]=Yn[je]=Yn[Ve]=Yn[Te]=!1;var zn={};zn[he]=zn[le]=zn[bt]=zn[Ct]=zn[J]=zn[oe]=zn[Ut]=zn[In]=zn[Fn]=zn[be]=zn[Ue]=zn[ne]=zn[fe]=zn[$e]=zn[Re]=zn[je]=zn[Ve]=zn[tt]=zn[Ie]=zn[We]=zn[Be]=zn[xt]=!0,zn[ge]=zn[Me]=zn[Te]=!1;var gR={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},bR={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yR={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},_R={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wR=parseFloat,$R=parseInt,LS=typeof io=="object"&&io&&io.Object===Object&&io,CR=typeof self=="object"&&self&&self.Object===Object&&self,Bo=LS||CR||Function("return this")(),Nb=t&&!t.nodeType&&t,ml=Nb&&!0&&e&&!e.nodeType&&e,FS=ml&&ml.exports===Nb,Rb=FS&&LS.process,Xa=function(){try{var Ce=ml&&ml.require&&ml.require("util").types;return Ce||Rb&&Rb.binding&&Rb.binding("util")}catch{}}(),BS=Xa&&Xa.isArrayBuffer,VS=Xa&&Xa.isDate,zS=Xa&&Xa.isMap,jS=Xa&&Xa.isRegExp,US=Xa&&Xa.isSet,WS=Xa&&Xa.isTypedArray;function Aa(Ce,Le,Oe){switch(Oe.length){case 0:return Ce.call(Le);case 1:return Ce.call(Le,Oe[0]);case 2:return Ce.call(Le,Oe[0],Oe[1]);case 3:return Ce.call(Le,Oe[0],Oe[1],Oe[2])}return Ce.apply(Le,Oe)}function SR(Ce,Le,Oe,yt){for(var Ht=-1,Sn=Ce==null?0:Ce.length;++Ht<Sn;){var xo=Ce[Ht];Le(yt,xo,Oe(xo),Ce)}return yt}function Za(Ce,Le){for(var Oe=-1,yt=Ce==null?0:Ce.length;++Oe<yt&&Le(Ce[Oe],Oe,Ce)!==!1;);return Ce}function ER(Ce,Le){for(var Oe=Ce==null?0:Ce.length;Oe--&&Le(Ce[Oe],Oe,Ce)!==!1;);return Ce}function HS(Ce,Le){for(var Oe=-1,yt=Ce==null?0:Ce.length;++Oe<yt;)if(!Le(Ce[Oe],Oe,Ce))return!1;return!0}function fi(Ce,Le){for(var Oe=-1,yt=Ce==null?0:Ce.length,Ht=0,Sn=[];++Oe<yt;){var xo=Ce[Oe];Le(xo,Oe,Ce)&&(Sn[Ht++]=xo)}return Sn}function tv(Ce,Le){var Oe=Ce==null?0:Ce.length;return!!Oe&&$u(Ce,Le,0)>-1}function Lb(Ce,Le,Oe){for(var yt=-1,Ht=Ce==null?0:Ce.length;++yt<Ht;)if(Oe(Le,Ce[yt]))return!0;return!1}function to(Ce,Le){for(var Oe=-1,yt=Ce==null?0:Ce.length,Ht=Array(yt);++Oe<yt;)Ht[Oe]=Le(Ce[Oe],Oe,Ce);return Ht}function pi(Ce,Le){for(var Oe=-1,yt=Le.length,Ht=Ce.length;++Oe<yt;)Ce[Ht+Oe]=Le[Oe];return Ce}function Fb(Ce,Le,Oe,yt){var Ht=-1,Sn=Ce==null?0:Ce.length;for(yt&&Sn&&(Oe=Ce[++Ht]);++Ht<Sn;)Oe=Le(Oe,Ce[Ht],Ht,Ce);return Oe}function kR(Ce,Le,Oe,yt){var Ht=Ce==null?0:Ce.length;for(yt&&Ht&&(Oe=Ce[--Ht]);Ht--;)Oe=Le(Oe,Ce[Ht],Ht,Ce);return Oe}function Bb(Ce,Le){for(var Oe=-1,yt=Ce==null?0:Ce.length;++Oe<yt;)if(Le(Ce[Oe],Oe,Ce))return!0;return!1}var IR=Vb("length");function TR(Ce){return Ce.split("")}function xR(Ce){return Ce.match(ft)||[]}function qS(Ce,Le,Oe){var yt;return Oe(Ce,function(Ht,Sn,xo){if(Le(Ht,Sn,xo))return yt=Sn,!1}),yt}function nv(Ce,Le,Oe,yt){for(var Ht=Ce.length,Sn=Oe+(yt?1:-1);yt?Sn--:++Sn<Ht;)if(Le(Ce[Sn],Sn,Ce))return Sn;return-1}function $u(Ce,Le,Oe){return Le===Le?zR(Ce,Le,Oe):nv(Ce,KS,Oe)}function AR(Ce,Le,Oe,yt){for(var Ht=Oe-1,Sn=Ce.length;++Ht<Sn;)if(yt(Ce[Ht],Le))return Ht;return-1}function KS(Ce){return Ce!==Ce}function YS(Ce,Le){var Oe=Ce==null?0:Ce.length;return Oe?jb(Ce,Le)/Oe:Y}function Vb(Ce){return function(Le){return Le==null?n:Le[Ce]}}function zb(Ce){return function(Le){return Ce==null?n:Ce[Le]}}function GS(Ce,Le,Oe,yt,Ht){return Ht(Ce,function(Sn,xo,Bn){Oe=yt?(yt=!1,Sn):Le(Oe,Sn,xo,Bn)}),Oe}function OR(Ce,Le){var Oe=Ce.length;for(Ce.sort(Le);Oe--;)Ce[Oe]=Ce[Oe].value;return Ce}function jb(Ce,Le){for(var Oe,yt=-1,Ht=Ce.length;++yt<Ht;){var Sn=Le(Ce[yt]);Sn!==n&&(Oe=Oe===n?Sn:Oe+Sn)}return Oe}function Ub(Ce,Le){for(var Oe=-1,yt=Array(Ce);++Oe<Ce;)yt[Oe]=Le(Oe);return yt}function DR(Ce,Le){return to(Le,function(Oe){return[Oe,Ce[Oe]]})}function QS(Ce){return Ce&&Ce.slice(0,e2(Ce)+1).replace(fd,"")}function Oa(Ce){return function(Le){return Ce(Le)}}function Wb(Ce,Le){return to(Le,function(Oe){return Ce[Oe]})}function pd(Ce,Le){return Ce.has(Le)}function JS(Ce,Le){for(var Oe=-1,yt=Ce.length;++Oe<yt&&$u(Le,Ce[Oe],0)>-1;);return Oe}function XS(Ce,Le){for(var Oe=Ce.length;Oe--&&$u(Le,Ce[Oe],0)>-1;);return Oe}function PR(Ce,Le){for(var Oe=Ce.length,yt=0;Oe--;)Ce[Oe]===Le&&++yt;return yt}var MR=zb(gR),NR=zb(bR);function RR(Ce){return"\\"+_R[Ce]}function LR(Ce,Le){return Ce==null?n:Ce[Le]}function Cu(Ce){return pR.test(Ce)}function FR(Ce){return vR.test(Ce)}function BR(Ce){for(var Le,Oe=[];!(Le=Ce.next()).done;)Oe.push(Le.value);return Oe}function Hb(Ce){var Le=-1,Oe=Array(Ce.size);return Ce.forEach(function(yt,Ht){Oe[++Le]=[Ht,yt]}),Oe}function ZS(Ce,Le){return function(Oe){return Ce(Le(Oe))}}function vi(Ce,Le){for(var Oe=-1,yt=Ce.length,Ht=0,Sn=[];++Oe<yt;){var xo=Ce[Oe];(xo===Le||xo===f)&&(Ce[Oe]=f,Sn[Ht++]=Oe)}return Sn}function ov(Ce){var Le=-1,Oe=Array(Ce.size);return Ce.forEach(function(yt){Oe[++Le]=yt}),Oe}function VR(Ce){var Le=-1,Oe=Array(Ce.size);return Ce.forEach(function(yt){Oe[++Le]=[yt,yt]}),Oe}function zR(Ce,Le,Oe){for(var yt=Oe-1,Ht=Ce.length;++yt<Ht;)if(Ce[yt]===Le)return yt;return-1}function jR(Ce,Le,Oe){for(var yt=Oe+1;yt--;)if(Ce[yt]===Le)return yt;return yt}function Su(Ce){return Cu(Ce)?WR(Ce):IR(Ce)}function xr(Ce){return Cu(Ce)?HR(Ce):TR(Ce)}function e2(Ce){for(var Le=Ce.length;Le--&&Ib.test(Ce.charAt(Le)););return Le}var UR=zb(yR);function WR(Ce){for(var Le=Mb.lastIndex=0;Mb.test(Ce);)++Le;return Le}function HR(Ce){return Ce.match(Mb)||[]}function qR(Ce){return Ce.match(fR)||[]}var KR=function Ce(Le){Le=Le==null?Bo:Eu.defaults(Bo.Object(),Le,Eu.pick(Bo,hR));var Oe=Le.Array,yt=Le.Date,Ht=Le.Error,Sn=Le.Function,xo=Le.Math,Bn=Le.Object,qb=Le.RegExp,YR=Le.String,er=Le.TypeError,av=Oe.prototype,GR=Sn.prototype,ku=Bn.prototype,rv=Le["__core-js_shared__"],sv=GR.toString,Dn=ku.hasOwnProperty,QR=0,t2=function(){var u=/[^.]+$/.exec(rv&&rv.keys&&rv.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),iv=ku.toString,JR=sv.call(Bn),XR=Bo._,ZR=qb("^"+sv.call(Dn).replace(dd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lv=FS?Le.Buffer:n,hi=Le.Symbol,uv=Le.Uint8Array,n2=lv?lv.allocUnsafe:n,cv=ZS(Bn.getPrototypeOf,Bn),o2=Bn.create,a2=ku.propertyIsEnumerable,dv=av.splice,r2=hi?hi.isConcatSpreadable:n,vd=hi?hi.iterator:n,gl=hi?hi.toStringTag:n,fv=function(){try{var u=$l(Bn,"defineProperty");return u({},"",{}),u}catch{}}(),eL=Le.clearTimeout!==Bo.clearTimeout&&Le.clearTimeout,tL=yt&&yt.now!==Bo.Date.now&&yt.now,nL=Le.setTimeout!==Bo.setTimeout&&Le.setTimeout,pv=xo.ceil,vv=xo.floor,Kb=Bn.getOwnPropertySymbols,oL=lv?lv.isBuffer:n,s2=Le.isFinite,aL=av.join,rL=ZS(Bn.keys,Bn),Ao=xo.max,qo=xo.min,sL=yt.now,iL=Le.parseInt,i2=xo.random,lL=av.reverse,Yb=$l(Le,"DataView"),hd=$l(Le,"Map"),Gb=$l(Le,"Promise"),Iu=$l(Le,"Set"),md=$l(Le,"WeakMap"),gd=$l(Bn,"create"),hv=md&&new md,Tu={},uL=Cl(Yb),cL=Cl(hd),dL=Cl(Gb),fL=Cl(Iu),pL=Cl(md),mv=hi?hi.prototype:n,bd=mv?mv.valueOf:n,l2=mv?mv.toString:n;function te(u){if(uo(u)&&!qt(u)&&!(u instanceof ln)){if(u instanceof tr)return u;if(Dn.call(u,"__wrapped__"))return uE(u)}return new tr(u)}var xu=function(){function u(){}return function(v){if(!ro(v))return{};if(o2)return o2(v);u.prototype=v;var $=new u;return u.prototype=n,$}}();function gv(){}function tr(u,v){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=n}te.templateSettings={escape:pa,evaluate:Yp,interpolate:Gp,variable:"",imports:{_:te}},te.prototype=gv.prototype,te.prototype.constructor=te,tr.prototype=xu(gv.prototype),tr.prototype.constructor=tr;function ln(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Z,this.__views__=[]}function vL(){var u=new ln(this.__wrapped__);return u.__actions__=va(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=va(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=va(this.__views__),u}function hL(){if(this.__filtered__){var u=new ln(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function mL(){var u=this.__wrapped__.value(),v=this.__dir__,$=qt(u),R=v<0,K=$?u.length:0,ae=T5(0,K,this.__views__),pe=ae.start,me=ae.end,Ee=me-pe,He=R?me:pe-1,qe=this.__iteratees__,Ge=qe.length,vt=0,St=qo(Ee,this.__takeCount__);if(!$||!R&&K==Ee&&St==Ee)return D2(u,this.__actions__);var Lt=[];e:for(;Ee--&&vt<St;){He+=v;for(var Zt=-1,Ft=u[He];++Zt<Ge;){var rn=qe[Zt],cn=rn.iteratee,Ma=rn.type,aa=cn(Ft);if(Ma==U)Ft=aa;else if(!aa){if(Ma==X)continue e;break e}}Lt[vt++]=Ft}return Lt}ln.prototype=xu(gv.prototype),ln.prototype.constructor=ln;function bl(u){var v=-1,$=u==null?0:u.length;for(this.clear();++v<$;){var R=u[v];this.set(R[0],R[1])}}function gL(){this.__data__=gd?gd(null):{},this.size=0}function bL(u){var v=this.has(u)&&delete this.__data__[u];return this.size-=v?1:0,v}function yL(u){var v=this.__data__;if(gd){var $=v[u];return $===l?n:$}return Dn.call(v,u)?v[u]:n}function _L(u){var v=this.__data__;return gd?v[u]!==n:Dn.call(v,u)}function wL(u,v){var $=this.__data__;return this.size+=this.has(u)?0:1,$[u]=gd&&v===n?l:v,this}bl.prototype.clear=gL,bl.prototype.delete=bL,bl.prototype.get=yL,bl.prototype.has=_L,bl.prototype.set=wL;function xs(u){var v=-1,$=u==null?0:u.length;for(this.clear();++v<$;){var R=u[v];this.set(R[0],R[1])}}function $L(){this.__data__=[],this.size=0}function CL(u){var v=this.__data__,$=bv(v,u);if($<0)return!1;var R=v.length-1;return $==R?v.pop():dv.call(v,$,1),--this.size,!0}function SL(u){var v=this.__data__,$=bv(v,u);return $<0?n:v[$][1]}function EL(u){return bv(this.__data__,u)>-1}function kL(u,v){var $=this.__data__,R=bv($,u);return R<0?(++this.size,$.push([u,v])):$[R][1]=v,this}xs.prototype.clear=$L,xs.prototype.delete=CL,xs.prototype.get=SL,xs.prototype.has=EL,xs.prototype.set=kL;function As(u){var v=-1,$=u==null?0:u.length;for(this.clear();++v<$;){var R=u[v];this.set(R[0],R[1])}}function IL(){this.size=0,this.__data__={hash:new bl,map:new(hd||xs),string:new bl}}function TL(u){var v=Av(this,u).delete(u);return this.size-=v?1:0,v}function xL(u){return Av(this,u).get(u)}function AL(u){return Av(this,u).has(u)}function OL(u,v){var $=Av(this,u),R=$.size;return $.set(u,v),this.size+=$.size==R?0:1,this}As.prototype.clear=IL,As.prototype.delete=TL,As.prototype.get=xL,As.prototype.has=AL,As.prototype.set=OL;function yl(u){var v=-1,$=u==null?0:u.length;for(this.__data__=new As;++v<$;)this.add(u[v])}function DL(u){return this.__data__.set(u,l),this}function PL(u){return this.__data__.has(u)}yl.prototype.add=yl.prototype.push=DL,yl.prototype.has=PL;function Ar(u){var v=this.__data__=new xs(u);this.size=v.size}function ML(){this.__data__=new xs,this.size=0}function NL(u){var v=this.__data__,$=v.delete(u);return this.size=v.size,$}function RL(u){return this.__data__.get(u)}function LL(u){return this.__data__.has(u)}function FL(u,v){var $=this.__data__;if($ instanceof xs){var R=$.__data__;if(!hd||R.length<a-1)return R.push([u,v]),this.size=++$.size,this;$=this.__data__=new As(R)}return $.set(u,v),this.size=$.size,this}Ar.prototype.clear=ML,Ar.prototype.delete=NL,Ar.prototype.get=RL,Ar.prototype.has=LL,Ar.prototype.set=FL;function u2(u,v){var $=qt(u),R=!$&&Sl(u),K=!$&&!R&&_i(u),ae=!$&&!R&&!K&&Pu(u),pe=$||R||K||ae,me=pe?Ub(u.length,YR):[],Ee=me.length;for(var He in u)(v||Dn.call(u,He))&&!(pe&&(He=="length"||K&&(He=="offset"||He=="parent")||ae&&(He=="buffer"||He=="byteLength"||He=="byteOffset")||Ms(He,Ee)))&&me.push(He);return me}function c2(u){var v=u.length;return v?u[sy(0,v-1)]:n}function BL(u,v){return Ov(va(u),_l(v,0,u.length))}function VL(u){return Ov(va(u))}function Qb(u,v,$){($!==n&&!Or(u[v],$)||$===n&&!(v in u))&&Os(u,v,$)}function yd(u,v,$){var R=u[v];(!(Dn.call(u,v)&&Or(R,$))||$===n&&!(v in u))&&Os(u,v,$)}function bv(u,v){for(var $=u.length;$--;)if(Or(u[$][0],v))return $;return-1}function zL(u,v,$,R){return mi(u,function(K,ae,pe){v(R,K,$(K),pe)}),R}function d2(u,v){return u&&ss(v,Lo(v),u)}function jL(u,v){return u&&ss(v,ma(v),u)}function Os(u,v,$){v=="__proto__"&&fv?fv(u,v,{configurable:!0,enumerable:!0,value:$,writable:!0}):u[v]=$}function Jb(u,v){for(var $=-1,R=v.length,K=Oe(R),ae=u==null;++$<R;)K[$]=ae?n:Oy(u,v[$]);return K}function _l(u,v,$){return u===u&&($!==n&&(u=u<=$?u:$),v!==n&&(u=u>=v?u:v)),u}function nr(u,v,$,R,K,ae){var pe,me=v&p,Ee=v&h,He=v&m;if($&&(pe=K?$(u,R,K,ae):$(u)),pe!==n)return pe;if(!ro(u))return u;var qe=qt(u);if(qe){if(pe=A5(u),!me)return va(u,pe)}else{var Ge=Ko(u),vt=Ge==Me||Ge==ee;if(_i(u))return N2(u,me);if(Ge==$e||Ge==he||vt&&!K){if(pe=Ee||vt?{}:eE(u),!me)return Ee?y5(u,jL(pe,u)):b5(u,d2(pe,u))}else{if(!zn[Ge])return K?u:{};pe=O5(u,Ge,me)}}ae||(ae=new Ar);var St=ae.get(u);if(St)return St;ae.set(u,pe),xE(u)?u.forEach(function(Ft){pe.add(nr(Ft,v,$,Ft,u,ae))}):IE(u)&&u.forEach(function(Ft,rn){pe.set(rn,nr(Ft,v,$,rn,u,ae))});var Lt=He?Ee?gy:my:Ee?ma:Lo,Zt=qe?n:Lt(u);return Za(Zt||u,function(Ft,rn){Zt&&(rn=Ft,Ft=u[rn]),yd(pe,rn,nr(Ft,v,$,rn,u,ae))}),pe}function UL(u){var v=Lo(u);return function($){return f2($,u,v)}}function f2(u,v,$){var R=$.length;if(u==null)return!R;for(u=Bn(u);R--;){var K=$[R],ae=v[K],pe=u[K];if(pe===n&&!(K in u)||!ae(pe))return!1}return!0}function p2(u,v,$){if(typeof u!="function")throw new er(s);return kd(function(){u.apply(n,$)},v)}function _d(u,v,$,R){var K=-1,ae=tv,pe=!0,me=u.length,Ee=[],He=v.length;if(!me)return Ee;$&&(v=to(v,Oa($))),R?(ae=Lb,pe=!1):v.length>=a&&(ae=pd,pe=!1,v=new yl(v));e:for(;++K<me;){var qe=u[K],Ge=$==null?qe:$(qe);if(qe=R||qe!==0?qe:0,pe&&Ge===Ge){for(var vt=He;vt--;)if(v[vt]===Ge)continue e;Ee.push(qe)}else ae(v,Ge,R)||Ee.push(qe)}return Ee}var mi=V2(rs),v2=V2(Zb,!0);function WL(u,v){var $=!0;return mi(u,function(R,K,ae){return $=!!v(R,K,ae),$}),$}function yv(u,v,$){for(var R=-1,K=u.length;++R<K;){var ae=u[R],pe=v(ae);if(pe!=null&&(me===n?pe===pe&&!Pa(pe):$(pe,me)))var me=pe,Ee=ae}return Ee}function HL(u,v,$,R){var K=u.length;for($=Jt($),$<0&&($=-$>K?0:K+$),R=R===n||R>K?K:Jt(R),R<0&&(R+=K),R=$>R?0:OE(R);$<R;)u[$++]=v;return u}function h2(u,v){var $=[];return mi(u,function(R,K,ae){v(R,K,ae)&&$.push(R)}),$}function Vo(u,v,$,R,K){var ae=-1,pe=u.length;for($||($=P5),K||(K=[]);++ae<pe;){var me=u[ae];v>0&&$(me)?v>1?Vo(me,v-1,$,R,K):pi(K,me):R||(K[K.length]=me)}return K}var Xb=z2(),m2=z2(!0);function rs(u,v){return u&&Xb(u,v,Lo)}function Zb(u,v){return u&&m2(u,v,Lo)}function _v(u,v){return fi(v,function($){return Ns(u[$])})}function wl(u,v){v=bi(v,u);for(var $=0,R=v.length;u!=null&&$<R;)u=u[is(v[$++])];return $&&$==R?u:n}function g2(u,v,$){var R=v(u);return qt(u)?R:pi(R,$(u))}function na(u){return u==null?u===n?Qe:ke:gl&&gl in Bn(u)?I5(u):V5(u)}function ey(u,v){return u>v}function qL(u,v){return u!=null&&Dn.call(u,v)}function KL(u,v){return u!=null&&v in Bn(u)}function YL(u,v,$){return u>=qo(v,$)&&u<Ao(v,$)}function ty(u,v,$){for(var R=$?Lb:tv,K=u[0].length,ae=u.length,pe=ae,me=Oe(ae),Ee=1/0,He=[];pe--;){var qe=u[pe];pe&&v&&(qe=to(qe,Oa(v))),Ee=qo(qe.length,Ee),me[pe]=!$&&(v||K>=120&&qe.length>=120)?new yl(pe&&qe):n}qe=u[0];var Ge=-1,vt=me[0];e:for(;++Ge<K&&He.length<Ee;){var St=qe[Ge],Lt=v?v(St):St;if(St=$||St!==0?St:0,!(vt?pd(vt,Lt):R(He,Lt,$))){for(pe=ae;--pe;){var Zt=me[pe];if(!(Zt?pd(Zt,Lt):R(u[pe],Lt,$)))continue e}vt&&vt.push(Lt),He.push(St)}}return He}function GL(u,v,$,R){return rs(u,function(K,ae,pe){v(R,$(K),ae,pe)}),R}function wd(u,v,$){v=bi(v,u),u=aE(u,v);var R=u==null?u:u[is(ar(v))];return R==null?n:Aa(R,u,$)}function b2(u){return uo(u)&&na(u)==he}function QL(u){return uo(u)&&na(u)==bt}function JL(u){return uo(u)&&na(u)==oe}function $d(u,v,$,R,K){return u===v?!0:u==null||v==null||!uo(u)&&!uo(v)?u!==u&&v!==v:XL(u,v,$,R,$d,K)}function XL(u,v,$,R,K,ae){var pe=qt(u),me=qt(v),Ee=pe?le:Ko(u),He=me?le:Ko(v);Ee=Ee==he?$e:Ee,He=He==he?$e:He;var qe=Ee==$e,Ge=He==$e,vt=Ee==He;if(vt&&_i(u)){if(!_i(v))return!1;pe=!0,qe=!1}if(vt&&!qe)return ae||(ae=new Ar),pe||Pu(u)?J2(u,v,$,R,K,ae):E5(u,v,Ee,$,R,K,ae);if(!($&b)){var St=qe&&Dn.call(u,"__wrapped__"),Lt=Ge&&Dn.call(v,"__wrapped__");if(St||Lt){var Zt=St?u.value():u,Ft=Lt?v.value():v;return ae||(ae=new Ar),K(Zt,Ft,$,R,ae)}}return vt?(ae||(ae=new Ar),k5(u,v,$,R,K,ae)):!1}function ZL(u){return uo(u)&&Ko(u)==ne}function ny(u,v,$,R){var K=$.length,ae=K,pe=!R;if(u==null)return!ae;for(u=Bn(u);K--;){var me=$[K];if(pe&&me[2]?me[1]!==u[me[0]]:!(me[0]in u))return!1}for(;++K<ae;){me=$[K];var Ee=me[0],He=u[Ee],qe=me[1];if(pe&&me[2]){if(He===n&&!(Ee in u))return!1}else{var Ge=new Ar;if(R)var vt=R(He,qe,Ee,u,v,Ge);if(!(vt===n?$d(qe,He,b|g,R,Ge):vt))return!1}}return!0}function y2(u){if(!ro(u)||N5(u))return!1;var v=Ns(u)?ZR:Ja;return v.test(Cl(u))}function e5(u){return uo(u)&&na(u)==Re}function t5(u){return uo(u)&&Ko(u)==je}function n5(u){return uo(u)&&Lv(u.length)&&!!Yn[na(u)]}function _2(u){return typeof u=="function"?u:u==null?ga:typeof u=="object"?qt(u)?C2(u[0],u[1]):$2(u):jE(u)}function oy(u){if(!Ed(u))return rL(u);var v=[];for(var $ in Bn(u))Dn.call(u,$)&&$!="constructor"&&v.push($);return v}function o5(u){if(!ro(u))return B5(u);var v=Ed(u),$=[];for(var R in u)R=="constructor"&&(v||!Dn.call(u,R))||$.push(R);return $}function ay(u,v){return u<v}function w2(u,v){var $=-1,R=ha(u)?Oe(u.length):[];return mi(u,function(K,ae,pe){R[++$]=v(K,ae,pe)}),R}function $2(u){var v=yy(u);return v.length==1&&v[0][2]?nE(v[0][0],v[0][1]):function($){return $===u||ny($,u,v)}}function C2(u,v){return wy(u)&&tE(v)?nE(is(u),v):function($){var R=Oy($,u);return R===n&&R===v?Dy($,u):$d(v,R,b|g)}}function wv(u,v,$,R,K){u!==v&&Xb(v,function(ae,pe){if(K||(K=new Ar),ro(ae))a5(u,v,pe,$,wv,R,K);else{var me=R?R(Cy(u,pe),ae,pe+"",u,v,K):n;me===n&&(me=ae),Qb(u,pe,me)}},ma)}function a5(u,v,$,R,K,ae,pe){var me=Cy(u,$),Ee=Cy(v,$),He=pe.get(Ee);if(He){Qb(u,$,He);return}var qe=ae?ae(me,Ee,$+"",u,v,pe):n,Ge=qe===n;if(Ge){var vt=qt(Ee),St=!vt&&_i(Ee),Lt=!vt&&!St&&Pu(Ee);qe=Ee,vt||St||Lt?qt(me)?qe=me:mo(me)?qe=va(me):St?(Ge=!1,qe=N2(Ee,!0)):Lt?(Ge=!1,qe=R2(Ee,!0)):qe=[]:Id(Ee)||Sl(Ee)?(qe=me,Sl(me)?qe=DE(me):(!ro(me)||Ns(me))&&(qe=eE(Ee))):Ge=!1}Ge&&(pe.set(Ee,qe),K(qe,Ee,R,ae,pe),pe.delete(Ee)),Qb(u,$,qe)}function S2(u,v){var $=u.length;if($)return v+=v<0?$:0,Ms(v,$)?u[v]:n}function E2(u,v,$){v.length?v=to(v,function(ae){return qt(ae)?function(pe){return wl(pe,ae.length===1?ae[0]:ae)}:ae}):v=[ga];var R=-1;v=to(v,Oa(Rt()));var K=w2(u,function(ae,pe,me){var Ee=to(v,function(He){return He(ae)});return{criteria:Ee,index:++R,value:ae}});return OR(K,function(ae,pe){return g5(ae,pe,$)})}function r5(u,v){return k2(u,v,function($,R){return Dy(u,R)})}function k2(u,v,$){for(var R=-1,K=v.length,ae={};++R<K;){var pe=v[R],me=wl(u,pe);$(me,pe)&&Cd(ae,bi(pe,u),me)}return ae}function s5(u){return function(v){return wl(v,u)}}function ry(u,v,$,R){var K=R?AR:$u,ae=-1,pe=v.length,me=u;for(u===v&&(v=va(v)),$&&(me=to(u,Oa($)));++ae<pe;)for(var Ee=0,He=v[ae],qe=$?$(He):He;(Ee=K(me,qe,Ee,R))>-1;)me!==u&&dv.call(me,Ee,1),dv.call(u,Ee,1);return u}function I2(u,v){for(var $=u?v.length:0,R=$-1;$--;){var K=v[$];if($==R||K!==ae){var ae=K;Ms(K)?dv.call(u,K,1):uy(u,K)}}return u}function sy(u,v){return u+vv(i2()*(v-u+1))}function i5(u,v,$,R){for(var K=-1,ae=Ao(pv((v-u)/($||1)),0),pe=Oe(ae);ae--;)pe[R?ae:++K]=u,u+=$;return pe}function iy(u,v){var $="";if(!u||v<1||v>q)return $;do v%2&&($+=u),v=vv(v/2),v&&(u+=u);while(v);return $}function tn(u,v){return Sy(oE(u,v,ga),u+"")}function l5(u){return c2(Mu(u))}function u5(u,v){var $=Mu(u);return Ov($,_l(v,0,$.length))}function Cd(u,v,$,R){if(!ro(u))return u;v=bi(v,u);for(var K=-1,ae=v.length,pe=ae-1,me=u;me!=null&&++K<ae;){var Ee=is(v[K]),He=$;if(Ee==="__proto__"||Ee==="constructor"||Ee==="prototype")return u;if(K!=pe){var qe=me[Ee];He=R?R(qe,Ee,me):n,He===n&&(He=ro(qe)?qe:Ms(v[K+1])?[]:{})}yd(me,Ee,He),me=me[Ee]}return u}var T2=hv?function(u,v){return hv.set(u,v),u}:ga,c5=fv?function(u,v){return fv(u,"toString",{configurable:!0,enumerable:!1,value:My(v),writable:!0})}:ga;function d5(u){return Ov(Mu(u))}function or(u,v,$){var R=-1,K=u.length;v<0&&(v=-v>K?0:K+v),$=$>K?K:$,$<0&&($+=K),K=v>$?0:$-v>>>0,v>>>=0;for(var ae=Oe(K);++R<K;)ae[R]=u[R+v];return ae}function f5(u,v){var $;return mi(u,function(R,K,ae){return $=v(R,K,ae),!$}),!!$}function $v(u,v,$){var R=0,K=u==null?R:u.length;if(typeof v=="number"&&v===v&&K<=re){for(;R<K;){var ae=R+K>>>1,pe=u[ae];pe!==null&&!Pa(pe)&&($?pe<=v:pe<v)?R=ae+1:K=ae}return K}return ly(u,v,ga,$)}function ly(u,v,$,R){var K=0,ae=u==null?0:u.length;if(ae===0)return 0;v=$(v);for(var pe=v!==v,me=v===null,Ee=Pa(v),He=v===n;K<ae;){var qe=vv((K+ae)/2),Ge=$(u[qe]),vt=Ge!==n,St=Ge===null,Lt=Ge===Ge,Zt=Pa(Ge);if(pe)var Ft=R||Lt;else He?Ft=Lt&&(R||vt):me?Ft=Lt&&vt&&(R||!St):Ee?Ft=Lt&&vt&&!St&&(R||!Zt):St||Zt?Ft=!1:Ft=R?Ge<=v:Ge<v;Ft?K=qe+1:ae=qe}return qo(ae,ce)}function x2(u,v){for(var $=-1,R=u.length,K=0,ae=[];++$<R;){var pe=u[$],me=v?v(pe):pe;if(!$||!Or(me,Ee)){var Ee=me;ae[K++]=pe===0?0:pe}}return ae}function A2(u){return typeof u=="number"?u:Pa(u)?Y:+u}function Da(u){if(typeof u=="string")return u;if(qt(u))return to(u,Da)+"";if(Pa(u))return l2?l2.call(u):"";var v=u+"";return v=="0"&&1/u==-Q?"-0":v}function gi(u,v,$){var R=-1,K=tv,ae=u.length,pe=!0,me=[],Ee=me;if($)pe=!1,K=Lb;else if(ae>=a){var He=v?null:C5(u);if(He)return ov(He);pe=!1,K=pd,Ee=new yl}else Ee=v?[]:me;e:for(;++R<ae;){var qe=u[R],Ge=v?v(qe):qe;if(qe=$||qe!==0?qe:0,pe&&Ge===Ge){for(var vt=Ee.length;vt--;)if(Ee[vt]===Ge)continue e;v&&Ee.push(Ge),me.push(qe)}else K(Ee,Ge,$)||(Ee!==me&&Ee.push(Ge),me.push(qe))}return me}function uy(u,v){return v=bi(v,u),u=aE(u,v),u==null||delete u[is(ar(v))]}function O2(u,v,$,R){return Cd(u,v,$(wl(u,v)),R)}function Cv(u,v,$,R){for(var K=u.length,ae=R?K:-1;(R?ae--:++ae<K)&&v(u[ae],ae,u););return $?or(u,R?0:ae,R?ae+1:K):or(u,R?ae+1:0,R?K:ae)}function D2(u,v){var $=u;return $ instanceof ln&&($=$.value()),Fb(v,function(R,K){return K.func.apply(K.thisArg,pi([R],K.args))},$)}function cy(u,v,$){var R=u.length;if(R<2)return R?gi(u[0]):[];for(var K=-1,ae=Oe(R);++K<R;)for(var pe=u[K],me=-1;++me<R;)me!=K&&(ae[K]=_d(ae[K]||pe,u[me],v,$));return gi(Vo(ae,1),v,$)}function P2(u,v,$){for(var R=-1,K=u.length,ae=v.length,pe={};++R<K;){var me=R<ae?v[R]:n;$(pe,u[R],me)}return pe}function dy(u){return mo(u)?u:[]}function fy(u){return typeof u=="function"?u:ga}function bi(u,v){return qt(u)?u:wy(u,v)?[u]:lE(Tn(u))}var p5=tn;function yi(u,v,$){var R=u.length;return $=$===n?R:$,!v&&$>=R?u:or(u,v,$)}var M2=eL||function(u){return Bo.clearTimeout(u)};function N2(u,v){if(v)return u.slice();var $=u.length,R=n2?n2($):new u.constructor($);return u.copy(R),R}function py(u){var v=new u.constructor(u.byteLength);return new uv(v).set(new uv(u)),v}function v5(u,v){var $=v?py(u.buffer):u.buffer;return new u.constructor($,u.byteOffset,u.byteLength)}function h5(u){var v=new u.constructor(u.source,Is.exec(u));return v.lastIndex=u.lastIndex,v}function m5(u){return bd?Bn(bd.call(u)):{}}function R2(u,v){var $=v?py(u.buffer):u.buffer;return new u.constructor($,u.byteOffset,u.length)}function L2(u,v){if(u!==v){var $=u!==n,R=u===null,K=u===u,ae=Pa(u),pe=v!==n,me=v===null,Ee=v===v,He=Pa(v);if(!me&&!He&&!ae&&u>v||ae&&pe&&Ee&&!me&&!He||R&&pe&&Ee||!$&&Ee||!K)return 1;if(!R&&!ae&&!He&&u<v||He&&$&&K&&!R&&!ae||me&&$&&K||!pe&&K||!Ee)return-1}return 0}function g5(u,v,$){for(var R=-1,K=u.criteria,ae=v.criteria,pe=K.length,me=$.length;++R<pe;){var Ee=L2(K[R],ae[R]);if(Ee){if(R>=me)return Ee;var He=$[R];return Ee*(He=="desc"?-1:1)}}return u.index-v.index}function F2(u,v,$,R){for(var K=-1,ae=u.length,pe=$.length,me=-1,Ee=v.length,He=Ao(ae-pe,0),qe=Oe(Ee+He),Ge=!R;++me<Ee;)qe[me]=v[me];for(;++K<pe;)(Ge||K<ae)&&(qe[$[K]]=u[K]);for(;He--;)qe[me++]=u[K++];return qe}function B2(u,v,$,R){for(var K=-1,ae=u.length,pe=-1,me=$.length,Ee=-1,He=v.length,qe=Ao(ae-me,0),Ge=Oe(qe+He),vt=!R;++K<qe;)Ge[K]=u[K];for(var St=K;++Ee<He;)Ge[St+Ee]=v[Ee];for(;++pe<me;)(vt||K<ae)&&(Ge[St+$[pe]]=u[K++]);return Ge}function va(u,v){var $=-1,R=u.length;for(v||(v=Oe(R));++$<R;)v[$]=u[$];return v}function ss(u,v,$,R){var K=!$;$||($={});for(var ae=-1,pe=v.length;++ae<pe;){var me=v[ae],Ee=R?R($[me],u[me],me,$,u):n;Ee===n&&(Ee=u[me]),K?Os($,me,Ee):yd($,me,Ee)}return $}function b5(u,v){return ss(u,_y(u),v)}function y5(u,v){return ss(u,X2(u),v)}function Sv(u,v){return function($,R){var K=qt($)?SR:zL,ae=v?v():{};return K($,u,Rt(R,2),ae)}}function Au(u){return tn(function(v,$){var R=-1,K=$.length,ae=K>1?$[K-1]:n,pe=K>2?$[2]:n;for(ae=u.length>3&&typeof ae=="function"?(K--,ae):n,pe&&oa($[0],$[1],pe)&&(ae=K<3?n:ae,K=1),v=Bn(v);++R<K;){var me=$[R];me&&u(v,me,R,ae)}return v})}function V2(u,v){return function($,R){if($==null)return $;if(!ha($))return u($,R);for(var K=$.length,ae=v?K:-1,pe=Bn($);(v?ae--:++ae<K)&&R(pe[ae],ae,pe)!==!1;);return $}}function z2(u){return function(v,$,R){for(var K=-1,ae=Bn(v),pe=R(v),me=pe.length;me--;){var Ee=pe[u?me:++K];if($(ae[Ee],Ee,ae)===!1)break}return v}}function _5(u,v,$){var R=v&y,K=Sd(u);function ae(){var pe=this&&this!==Bo&&this instanceof ae?K:u;return pe.apply(R?$:this,arguments)}return ae}function j2(u){return function(v){v=Tn(v);var $=Cu(v)?xr(v):n,R=$?$[0]:v.charAt(0),K=$?yi($,1).join(""):v.slice(1);return R[u]()+K}}function Ou(u){return function(v){return Fb(VE(BE(v).replace(cR,"")),u,"")}}function Sd(u){return function(){var v=arguments;switch(v.length){case 0:return new u;case 1:return new u(v[0]);case 2:return new u(v[0],v[1]);case 3:return new u(v[0],v[1],v[2]);case 4:return new u(v[0],v[1],v[2],v[3]);case 5:return new u(v[0],v[1],v[2],v[3],v[4]);case 6:return new u(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new u(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var $=xu(u.prototype),R=u.apply($,v);return ro(R)?R:$}}function w5(u,v,$){var R=Sd(u);function K(){for(var ae=arguments.length,pe=Oe(ae),me=ae,Ee=Du(K);me--;)pe[me]=arguments[me];var He=ae<3&&pe[0]!==Ee&&pe[ae-1]!==Ee?[]:vi(pe,Ee);if(ae-=He.length,ae<$)return K2(u,v,Ev,K.placeholder,n,pe,He,n,n,$-ae);var qe=this&&this!==Bo&&this instanceof K?R:u;return Aa(qe,this,pe)}return K}function U2(u){return function(v,$,R){var K=Bn(v);if(!ha(v)){var ae=Rt($,3);v=Lo(v),$=function(me){return ae(K[me],me,K)}}var pe=u(v,$,R);return pe>-1?K[ae?v[pe]:pe]:n}}function W2(u){return Ps(function(v){var $=v.length,R=$,K=tr.prototype.thru;for(u&&v.reverse();R--;){var ae=v[R];if(typeof ae!="function")throw new er(s);if(K&&!pe&&xv(ae)=="wrapper")var pe=new tr([],!0)}for(R=pe?R:$;++R<$;){ae=v[R];var me=xv(ae),Ee=me=="wrapper"?by(ae):n;Ee&&$y(Ee[0])&&Ee[1]==(S|k|T|D)&&!Ee[4].length&&Ee[9]==1?pe=pe[xv(Ee[0])].apply(pe,Ee[3]):pe=ae.length==1&&$y(ae)?pe[me]():pe.thru(ae)}return function(){var He=arguments,qe=He[0];if(pe&&He.length==1&&qt(qe))return pe.plant(qe).value();for(var Ge=0,vt=$?v[Ge].apply(this,He):qe;++Ge<$;)vt=v[Ge].call(this,vt);return vt}})}function Ev(u,v,$,R,K,ae,pe,me,Ee,He){var qe=v&S,Ge=v&y,vt=v&_,St=v&(k|E),Lt=v&N,Zt=vt?n:Sd(u);function Ft(){for(var rn=arguments.length,cn=Oe(rn),Ma=rn;Ma--;)cn[Ma]=arguments[Ma];if(St)var aa=Du(Ft),Na=PR(cn,aa);if(R&&(cn=F2(cn,R,K,St)),ae&&(cn=B2(cn,ae,pe,St)),rn-=Na,St&&rn<He){var go=vi(cn,aa);return K2(u,v,Ev,Ft.placeholder,$,cn,go,me,Ee,He-rn)}var Dr=Ge?$:this,Ls=vt?Dr[u]:u;return rn=cn.length,me?cn=z5(cn,me):Lt&&rn>1&&cn.reverse(),qe&&Ee<rn&&(cn.length=Ee),this&&this!==Bo&&this instanceof Ft&&(Ls=Zt||Sd(Ls)),Ls.apply(Dr,cn)}return Ft}function H2(u,v){return function($,R){return GL($,u,v(R),{})}}function kv(u,v){return function($,R){var K;if($===n&&R===n)return v;if($!==n&&(K=$),R!==n){if(K===n)return R;typeof $=="string"||typeof R=="string"?($=Da($),R=Da(R)):($=A2($),R=A2(R)),K=u($,R)}return K}}function vy(u){return Ps(function(v){return v=to(v,Oa(Rt())),tn(function($){var R=this;return u(v,function(K){return Aa(K,R,$)})})})}function Iv(u,v){v=v===n?" ":Da(v);var $=v.length;if($<2)return $?iy(v,u):v;var R=iy(v,pv(u/Su(v)));return Cu(v)?yi(xr(R),0,u).join(""):R.slice(0,u)}function $5(u,v,$,R){var K=v&y,ae=Sd(u);function pe(){for(var me=-1,Ee=arguments.length,He=-1,qe=R.length,Ge=Oe(qe+Ee),vt=this&&this!==Bo&&this instanceof pe?ae:u;++He<qe;)Ge[He]=R[He];for(;Ee--;)Ge[He++]=arguments[++me];return Aa(vt,K?$:this,Ge)}return pe}function q2(u){return function(v,$,R){return R&&typeof R!="number"&&oa(v,$,R)&&($=R=n),v=Rs(v),$===n?($=v,v=0):$=Rs($),R=R===n?v<$?1:-1:Rs(R),i5(v,$,R,u)}}function Tv(u){return function(v,$){return typeof v=="string"&&typeof $=="string"||(v=rr(v),$=rr($)),u(v,$)}}function K2(u,v,$,R,K,ae,pe,me,Ee,He){var qe=v&k,Ge=qe?pe:n,vt=qe?n:pe,St=qe?ae:n,Lt=qe?n:ae;v|=qe?T:x,v&=~(qe?x:T),v&I||(v&=-4);var Zt=[u,v,K,St,Ge,Lt,vt,me,Ee,He],Ft=$.apply(n,Zt);return $y(u)&&rE(Ft,Zt),Ft.placeholder=R,sE(Ft,u,v)}function hy(u){var v=xo[u];return function($,R){if($=rr($),R=R==null?0:qo(Jt(R),292),R&&s2($)){var K=(Tn($)+"e").split("e"),ae=v(K[0]+"e"+(+K[1]+R));return K=(Tn(ae)+"e").split("e"),+(K[0]+"e"+(+K[1]-R))}return v($)}}var C5=Iu&&1/ov(new Iu([,-0]))[1]==Q?function(u){return new Iu(u)}:Ly;function Y2(u){return function(v){var $=Ko(v);return $==ne?Hb(v):$==je?VR(v):DR(v,u(v))}}function Ds(u,v,$,R,K,ae,pe,me){var Ee=v&_;if(!Ee&&typeof u!="function")throw new er(s);var He=R?R.length:0;if(He||(v&=-97,R=K=n),pe=pe===n?pe:Ao(Jt(pe),0),me=me===n?me:Jt(me),He-=K?K.length:0,v&x){var qe=R,Ge=K;R=K=n}var vt=Ee?n:by(u),St=[u,v,$,R,K,qe,Ge,ae,pe,me];if(vt&&F5(St,vt),u=St[0],v=St[1],$=St[2],R=St[3],K=St[4],me=St[9]=St[9]===n?Ee?0:u.length:Ao(St[9]-He,0),!me&&v&(k|E)&&(v&=-25),!v||v==y)var Lt=_5(u,v,$);else v==k||v==E?Lt=w5(u,v,me):(v==T||v==(y|T))&&!K.length?Lt=$5(u,v,$,R):Lt=Ev.apply(n,St);var Zt=vt?T2:rE;return sE(Zt(Lt,St),u,v)}function G2(u,v,$,R){return u===n||Or(u,ku[$])&&!Dn.call(R,$)?v:u}function Q2(u,v,$,R,K,ae){return ro(u)&&ro(v)&&(ae.set(v,u),wv(u,v,n,Q2,ae),ae.delete(v)),u}function S5(u){return Id(u)?n:u}function J2(u,v,$,R,K,ae){var pe=$&b,me=u.length,Ee=v.length;if(me!=Ee&&!(pe&&Ee>me))return!1;var He=ae.get(u),qe=ae.get(v);if(He&&qe)return He==v&&qe==u;var Ge=-1,vt=!0,St=$&g?new yl:n;for(ae.set(u,v),ae.set(v,u);++Ge<me;){var Lt=u[Ge],Zt=v[Ge];if(R)var Ft=pe?R(Zt,Lt,Ge,v,u,ae):R(Lt,Zt,Ge,u,v,ae);if(Ft!==n){if(Ft)continue;vt=!1;break}if(St){if(!Bb(v,function(rn,cn){if(!pd(St,cn)&&(Lt===rn||K(Lt,rn,$,R,ae)))return St.push(cn)})){vt=!1;break}}else if(!(Lt===Zt||K(Lt,Zt,$,R,ae))){vt=!1;break}}return ae.delete(u),ae.delete(v),vt}function E5(u,v,$,R,K,ae,pe){switch($){case Ct:if(u.byteLength!=v.byteLength||u.byteOffset!=v.byteOffset)return!1;u=u.buffer,v=v.buffer;case bt:return!(u.byteLength!=v.byteLength||!ae(new uv(u),new uv(v)));case J:case oe:case fe:return Or(+u,+v);case ge:return u.name==v.name&&u.message==v.message;case Re:case Ve:return u==v+"";case ne:var me=Hb;case je:var Ee=R&b;if(me||(me=ov),u.size!=v.size&&!Ee)return!1;var He=pe.get(u);if(He)return He==v;R|=g,pe.set(u,v);var qe=J2(me(u),me(v),R,K,ae,pe);return pe.delete(u),qe;case tt:if(bd)return bd.call(u)==bd.call(v)}return!1}function k5(u,v,$,R,K,ae){var pe=$&b,me=my(u),Ee=me.length,He=my(v),qe=He.length;if(Ee!=qe&&!pe)return!1;for(var Ge=Ee;Ge--;){var vt=me[Ge];if(!(pe?vt in v:Dn.call(v,vt)))return!1}var St=ae.get(u),Lt=ae.get(v);if(St&&Lt)return St==v&&Lt==u;var Zt=!0;ae.set(u,v),ae.set(v,u);for(var Ft=pe;++Ge<Ee;){vt=me[Ge];var rn=u[vt],cn=v[vt];if(R)var Ma=pe?R(cn,rn,vt,v,u,ae):R(rn,cn,vt,u,v,ae);if(!(Ma===n?rn===cn||K(rn,cn,$,R,ae):Ma)){Zt=!1;break}Ft||(Ft=vt=="constructor")}if(Zt&&!Ft){var aa=u.constructor,Na=v.constructor;aa!=Na&&"constructor"in u&&"constructor"in v&&!(typeof aa=="function"&&aa instanceof aa&&typeof Na=="function"&&Na instanceof Na)&&(Zt=!1)}return ae.delete(u),ae.delete(v),Zt}function Ps(u){return Sy(oE(u,n,fE),u+"")}function my(u){return g2(u,Lo,_y)}function gy(u){return g2(u,ma,X2)}var by=hv?function(u){return hv.get(u)}:Ly;function xv(u){for(var v=u.name+"",$=Tu[v],R=Dn.call(Tu,v)?$.length:0;R--;){var K=$[R],ae=K.func;if(ae==null||ae==u)return K.name}return v}function Du(u){var v=Dn.call(te,"placeholder")?te:u;return v.placeholder}function Rt(){var u=te.iteratee||Ny;return u=u===Ny?_2:u,arguments.length?u(arguments[0],arguments[1]):u}function Av(u,v){var $=u.__data__;return M5(v)?$[typeof v=="string"?"string":"hash"]:$.map}function yy(u){for(var v=Lo(u),$=v.length;$--;){var R=v[$],K=u[R];v[$]=[R,K,tE(K)]}return v}function $l(u,v){var $=LR(u,v);return y2($)?$:n}function I5(u){var v=Dn.call(u,gl),$=u[gl];try{u[gl]=n;var R=!0}catch{}var K=iv.call(u);return R&&(v?u[gl]=$:delete u[gl]),K}var _y=Kb?function(u){return u==null?[]:(u=Bn(u),fi(Kb(u),function(v){return a2.call(u,v)}))}:Fy,X2=Kb?function(u){for(var v=[];u;)pi(v,_y(u)),u=cv(u);return v}:Fy,Ko=na;(Yb&&Ko(new Yb(new ArrayBuffer(1)))!=Ct||hd&&Ko(new hd)!=ne||Gb&&Ko(Gb.resolve())!=Pe||Iu&&Ko(new Iu)!=je||md&&Ko(new md)!=Te)&&(Ko=function(u){var v=na(u),$=v==$e?u.constructor:n,R=$?Cl($):"";if(R)switch(R){case uL:return Ct;case cL:return ne;case dL:return Pe;case fL:return je;case pL:return Te}return v});function T5(u,v,$){for(var R=-1,K=$.length;++R<K;){var ae=$[R],pe=ae.size;switch(ae.type){case"drop":u+=pe;break;case"dropRight":v-=pe;break;case"take":v=qo(v,u+pe);break;case"takeRight":u=Ao(u,v-pe);break}}return{start:u,end:v}}function x5(u){var v=u.match(xb);return v?v[1].split(Ne):[]}function Z2(u,v,$){v=bi(v,u);for(var R=-1,K=v.length,ae=!1;++R<K;){var pe=is(v[R]);if(!(ae=u!=null&&$(u,pe)))break;u=u[pe]}return ae||++R!=K?ae:(K=u==null?0:u.length,!!K&&Lv(K)&&Ms(pe,K)&&(qt(u)||Sl(u)))}function A5(u){var v=u.length,$=new u.constructor(v);return v&&typeof u[0]=="string"&&Dn.call(u,"index")&&($.index=u.index,$.input=u.input),$}function eE(u){return typeof u.constructor=="function"&&!Ed(u)?xu(cv(u)):{}}function O5(u,v,$){var R=u.constructor;switch(v){case bt:return py(u);case J:case oe:return new R(+u);case Ct:return v5(u,$);case Ut:case In:case Fn:case be:case Ue:case Ie:case We:case Be:case xt:return R2(u,$);case ne:return new R;case fe:case Ve:return new R(u);case Re:return h5(u);case je:return new R;case tt:return m5(u)}}function D5(u,v){var $=v.length;if(!$)return u;var R=$-1;return v[R]=($>1?"& ":"")+v[R],v=v.join($>2?", ":" "),u.replace(Tb,`{
88
88
  /* [wrapped with `+v+`] */
89
- `)}function PF(u){return qt(u)||Sl(u)||!!(r2&&u&&u[r2])}function Ms(u,v){var $=typeof u;return v=v??q,!!v&&($=="number"||$!="symbol"&&H6.test(u))&&u>-1&&u%1==0&&u<v}function oa(u,v,$){if(!ro($))return!1;var R=typeof v;return(R=="number"?ha($)&&Ms(v,$.length):R=="string"&&v in $)?Or($[v],u):!1}function wy(u,v){if(qt(u))return!1;var $=typeof u;return $=="number"||$=="symbol"||$=="boolean"||u==null||Pa(u)?!0:Eb.test(u)||!cd.test(u)||v!=null&&u in Bn(v)}function MF(u){var v=typeof u;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?u!=="__proto__":u===null}function $y(u){var v=xv(u),$=te[v];if(typeof $!="function"||!(v in ln.prototype))return!1;if(u===$)return!0;var R=by($);return!!R&&u===R[0]}function NF(u){return!!t2&&t2 in u}var RF=rv?Ns:By;function Ed(u){var v=u&&u.constructor,$=typeof v=="function"&&v.prototype||ku;return u===$}function tE(u){return u===u&&!ro(u)}function nE(u,v){return function($){return $==null?!1:$[u]===v&&(v!==n||u in Bn($))}}function LF(u){var v=Nv(u,function(R){return $.size===d&&$.clear(),R}),$=v.cache;return v}function FF(u,v){var $=u[1],R=v[1],K=$|R,ae=K<(y|_|S),pe=R==S&&$==k||R==S&&$==D&&u[7].length<=v[8]||R==(S|D)&&v[7].length<=v[8]&&$==k;if(!(ae||pe))return u;R&y&&(u[2]=v[2],K|=$&y?0:I);var me=v[3];if(me){var Ee=u[3];u[3]=Ee?F2(Ee,me,v[4]):me,u[4]=Ee?vi(u[3],f):v[4]}return me=v[5],me&&(Ee=u[5],u[5]=Ee?B2(Ee,me,v[6]):me,u[6]=Ee?vi(u[5],f):v[6]),me=v[7],me&&(u[7]=me),R&S&&(u[8]=u[8]==null?v[8]:qo(u[8],v[8])),u[9]==null&&(u[9]=v[9]),u[0]=v[0],u[1]=K,u}function BF(u){var v=[];if(u!=null)for(var $ in Bn(u))v.push($);return v}function VF(u){return iv.call(u)}function oE(u,v,$){return v=Ao(v===n?u.length-1:v,0),function(){for(var R=arguments,K=-1,ae=Ao(R.length-v,0),pe=Oe(ae);++K<ae;)pe[K]=R[v+K];K=-1;for(var me=Oe(v+1);++K<v;)me[K]=R[K];return me[v]=$(pe),Aa(u,this,me)}}function aE(u,v){return v.length<2?u:wl(u,or(v,0,-1))}function zF(u,v){for(var $=u.length,R=qo(v.length,$),K=va(u);R--;){var ae=v[R];u[R]=Ms(ae,$)?K[ae]:n}return u}function Cy(u,v){if(!(v==="constructor"&&typeof u[v]=="function")&&v!="__proto__")return u[v]}var rE=iE(T2),kd=nL||function(u,v){return Bo.setTimeout(u,v)},Sy=iE(cF);function sE(u,v,$){var R=v+"";return Sy(u,DF(R,jF(xF(R),$)))}function iE(u){var v=0,$=0;return function(){var R=sL(),K=j-(R-$);if($=R,K>0){if(++v>=z)return arguments[0]}else v=0;return u.apply(n,arguments)}}function Ov(u,v){var $=-1,R=u.length,K=R-1;for(v=v===n?R:v;++$<v;){var ae=sy($,K),pe=u[ae];u[ae]=u[$],u[$]=pe}return u.length=v,u}var lE=LF(function(u){var v=[];return u.charCodeAt(0)===46&&v.push(""),u.replace(kb,function($,R,K,ae){v.push(K?ae.replace(Rn,"$1"):R||$)}),v});function is(u){if(typeof u=="string"||Pa(u))return u;var v=u+"";return v=="0"&&1/u==-Q?"-0":v}function Cl(u){if(u!=null){try{return sv.call(u)}catch{}try{return u+""}catch{}}return""}function jF(u,v){return Za(ye,function($){var R="_."+$[0];v&$[1]&&!tv(u,R)&&u.push(R)}),u.sort()}function uE(u){if(u instanceof ln)return u.clone();var v=new tr(u.__wrapped__,u.__chain__);return v.__actions__=va(u.__actions__),v.__index__=u.__index__,v.__values__=u.__values__,v}function UF(u,v,$){($?oa(u,v,$):v===n)?v=1:v=Ao(Jt(v),0);var R=u==null?0:u.length;if(!R||v<1)return[];for(var K=0,ae=0,pe=Oe(pv(R/v));K<R;)pe[ae++]=or(u,K,K+=v);return pe}function WF(u){for(var v=-1,$=u==null?0:u.length,R=0,K=[];++v<$;){var ae=u[v];ae&&(K[R++]=ae)}return K}function HF(){var u=arguments.length;if(!u)return[];for(var v=Oe(u-1),$=arguments[0],R=u;R--;)v[R-1]=arguments[R];return pi(qt($)?va($):[$],Vo(v,1))}var qF=tn(function(u,v){return mo(u)?_d(u,Vo(v,1,mo,!0)):[]}),KF=tn(function(u,v){var $=ar(v);return mo($)&&($=n),mo(u)?_d(u,Vo(v,1,mo,!0),Rt($,2)):[]}),YF=tn(function(u,v){var $=ar(v);return mo($)&&($=n),mo(u)?_d(u,Vo(v,1,mo,!0),n,$):[]});function GF(u,v,$){var R=u==null?0:u.length;return R?(v=$||v===n?1:Jt(v),or(u,v<0?0:v,R)):[]}function QF(u,v,$){var R=u==null?0:u.length;return R?(v=$||v===n?1:Jt(v),v=R-v,or(u,0,v<0?0:v)):[]}function JF(u,v){return u&&u.length?Cv(u,Rt(v,3),!0,!0):[]}function XF(u,v){return u&&u.length?Cv(u,Rt(v,3),!0):[]}function ZF(u,v,$,R){var K=u==null?0:u.length;return K?($&&typeof $!="number"&&oa(u,v,$)&&($=0,R=K),HL(u,v,$,R)):[]}function cE(u,v,$){var R=u==null?0:u.length;if(!R)return-1;var K=$==null?0:Jt($);return K<0&&(K=Ao(R+K,0)),nv(u,Rt(v,3),K)}function dE(u,v,$){var R=u==null?0:u.length;if(!R)return-1;var K=R-1;return $!==n&&(K=Jt($),K=$<0?Ao(R+K,0):qo(K,R-1)),nv(u,Rt(v,3),K,!0)}function fE(u){var v=u==null?0:u.length;return v?Vo(u,1):[]}function e5(u){var v=u==null?0:u.length;return v?Vo(u,Q):[]}function t5(u,v){var $=u==null?0:u.length;return $?(v=v===n?1:Jt(v),Vo(u,v)):[]}function n5(u){for(var v=-1,$=u==null?0:u.length,R={};++v<$;){var K=u[v];R[K[0]]=K[1]}return R}function pE(u){return u&&u.length?u[0]:n}function o5(u,v,$){var R=u==null?0:u.length;if(!R)return-1;var K=$==null?0:Jt($);return K<0&&(K=Ao(R+K,0)),$u(u,v,K)}function a5(u){var v=u==null?0:u.length;return v?or(u,0,-1):[]}var r5=tn(function(u){var v=to(u,dy);return v.length&&v[0]===u[0]?ty(v):[]}),s5=tn(function(u){var v=ar(u),$=to(u,dy);return v===ar($)?v=n:$.pop(),$.length&&$[0]===u[0]?ty($,Rt(v,2)):[]}),i5=tn(function(u){var v=ar(u),$=to(u,dy);return v=typeof v=="function"?v:n,v&&$.pop(),$.length&&$[0]===u[0]?ty($,n,v):[]});function l5(u,v){return u==null?"":aL.call(u,v)}function ar(u){var v=u==null?0:u.length;return v?u[v-1]:n}function u5(u,v,$){var R=u==null?0:u.length;if(!R)return-1;var K=R;return $!==n&&(K=Jt($),K=K<0?Ao(R+K,0):qo(K,R-1)),v===v?jR(u,v,K):nv(u,KS,K,!0)}function c5(u,v){return u&&u.length?S2(u,Jt(v)):n}var d5=tn(vE);function vE(u,v){return u&&u.length&&v&&v.length?ry(u,v):u}function f5(u,v,$){return u&&u.length&&v&&v.length?ry(u,v,Rt($,2)):u}function p5(u,v,$){return u&&u.length&&v&&v.length?ry(u,v,n,$):u}var v5=Ps(function(u,v){var $=u==null?0:u.length,R=Jb(u,v);return I2(u,to(v,function(K){return Ms(K,$)?+K:K}).sort(L2)),R});function h5(u,v){var $=[];if(!(u&&u.length))return $;var R=-1,K=[],ae=u.length;for(v=Rt(v,3);++R<ae;){var pe=u[R];v(pe,R,u)&&($.push(pe),K.push(R))}return I2(u,K),$}function Ey(u){return u==null?u:lL.call(u)}function m5(u,v,$){var R=u==null?0:u.length;return R?($&&typeof $!="number"&&oa(u,v,$)?(v=0,$=R):(v=v==null?0:Jt(v),$=$===n?R:Jt($)),or(u,v,$)):[]}function g5(u,v){return $v(u,v)}function b5(u,v,$){return ly(u,v,Rt($,2))}function y5(u,v){var $=u==null?0:u.length;if($){var R=$v(u,v);if(R<$&&Or(u[R],v))return R}return-1}function _5(u,v){return $v(u,v,!0)}function w5(u,v,$){return ly(u,v,Rt($,2),!0)}function $5(u,v){var $=u==null?0:u.length;if($){var R=$v(u,v,!0)-1;if(Or(u[R],v))return R}return-1}function C5(u){return u&&u.length?x2(u):[]}function S5(u,v){return u&&u.length?x2(u,Rt(v,2)):[]}function E5(u){var v=u==null?0:u.length;return v?or(u,1,v):[]}function k5(u,v,$){return u&&u.length?(v=$||v===n?1:Jt(v),or(u,0,v<0?0:v)):[]}function I5(u,v,$){var R=u==null?0:u.length;return R?(v=$||v===n?1:Jt(v),v=R-v,or(u,v<0?0:v,R)):[]}function T5(u,v){return u&&u.length?Cv(u,Rt(v,3),!1,!0):[]}function x5(u,v){return u&&u.length?Cv(u,Rt(v,3)):[]}var A5=tn(function(u){return gi(Vo(u,1,mo,!0))}),O5=tn(function(u){var v=ar(u);return mo(v)&&(v=n),gi(Vo(u,1,mo,!0),Rt(v,2))}),D5=tn(function(u){var v=ar(u);return v=typeof v=="function"?v:n,gi(Vo(u,1,mo,!0),n,v)});function P5(u){return u&&u.length?gi(u):[]}function M5(u,v){return u&&u.length?gi(u,Rt(v,2)):[]}function N5(u,v){return v=typeof v=="function"?v:n,u&&u.length?gi(u,n,v):[]}function ky(u){if(!(u&&u.length))return[];var v=0;return u=fi(u,function($){if(mo($))return v=Ao($.length,v),!0}),Ub(v,function($){return to(u,Vb($))})}function hE(u,v){if(!(u&&u.length))return[];var $=ky(u);return v==null?$:to($,function(R){return Aa(v,n,R)})}var R5=tn(function(u,v){return mo(u)?_d(u,v):[]}),L5=tn(function(u){return cy(fi(u,mo))}),F5=tn(function(u){var v=ar(u);return mo(v)&&(v=n),cy(fi(u,mo),Rt(v,2))}),B5=tn(function(u){var v=ar(u);return v=typeof v=="function"?v:n,cy(fi(u,mo),n,v)}),V5=tn(ky);function z5(u,v){return P2(u||[],v||[],yd)}function j5(u,v){return P2(u||[],v||[],Cd)}var U5=tn(function(u){var v=u.length,$=v>1?u[v-1]:n;return $=typeof $=="function"?(u.pop(),$):n,hE(u,$)});function mE(u){var v=te(u);return v.__chain__=!0,v}function W5(u,v){return v(u),u}function Dv(u,v){return v(u)}var H5=Ps(function(u){var v=u.length,$=v?u[0]:0,R=this.__wrapped__,K=function(ae){return Jb(ae,u)};return v>1||this.__actions__.length||!(R instanceof ln)||!Ms($)?this.thru(K):(R=R.slice($,+$+(v?1:0)),R.__actions__.push({func:Dv,args:[K],thisArg:n}),new tr(R,this.__chain__).thru(function(ae){return v&&!ae.length&&ae.push(n),ae}))});function q5(){return mE(this)}function K5(){return new tr(this.value(),this.__chain__)}function Y5(){this.__values__===n&&(this.__values__=AE(this.value()));var u=this.__index__>=this.__values__.length,v=u?n:this.__values__[this.__index__++];return{done:u,value:v}}function G5(){return this}function Q5(u){for(var v,$=this;$ instanceof gv;){var R=uE($);R.__index__=0,R.__values__=n,v?K.__wrapped__=R:v=R;var K=R;$=$.__wrapped__}return K.__wrapped__=u,v}function J5(){var u=this.__wrapped__;if(u instanceof ln){var v=u;return this.__actions__.length&&(v=new ln(this)),v=v.reverse(),v.__actions__.push({func:Dv,args:[Ey],thisArg:n}),new tr(v,this.__chain__)}return this.thru(Ey)}function X5(){return D2(this.__wrapped__,this.__actions__)}var Z5=Sv(function(u,v,$){Dn.call(u,$)?++u[$]:Os(u,$,1)});function eB(u,v,$){var R=qt(u)?HS:WL;return $&&oa(u,v,$)&&(v=n),R(u,Rt(v,3))}function tB(u,v){var $=qt(u)?fi:h2;return $(u,Rt(v,3))}var nB=U2(cE),oB=U2(dE);function aB(u,v){return Vo(Pv(u,v),1)}function rB(u,v){return Vo(Pv(u,v),Q)}function sB(u,v,$){return $=$===n?1:Jt($),Vo(Pv(u,v),$)}function gE(u,v){var $=qt(u)?Za:mi;return $(u,Rt(v,3))}function bE(u,v){var $=qt(u)?ER:v2;return $(u,Rt(v,3))}var iB=Sv(function(u,v,$){Dn.call(u,$)?u[$].push(v):Os(u,$,[v])});function lB(u,v,$,R){u=ha(u)?u:Mu(u),$=$&&!R?Jt($):0;var K=u.length;return $<0&&($=Ao(K+$,0)),Fv(u)?$<=K&&u.indexOf(v,$)>-1:!!K&&$u(u,v,$)>-1}var uB=tn(function(u,v,$){var R=-1,K=typeof v=="function",ae=ha(u)?Oe(u.length):[];return mi(u,function(pe){ae[++R]=K?Aa(v,pe,$):wd(pe,v,$)}),ae}),cB=Sv(function(u,v,$){Os(u,$,v)});function Pv(u,v){var $=qt(u)?to:w2;return $(u,Rt(v,3))}function dB(u,v,$,R){return u==null?[]:(qt(v)||(v=v==null?[]:[v]),$=R?n:$,qt($)||($=$==null?[]:[$]),E2(u,v,$))}var fB=Sv(function(u,v,$){u[$?0:1].push(v)},function(){return[[],[]]});function pB(u,v,$){var R=qt(u)?Fb:GS,K=arguments.length<3;return R(u,Rt(v,4),$,K,mi)}function vB(u,v,$){var R=qt(u)?kR:GS,K=arguments.length<3;return R(u,Rt(v,4),$,K,v2)}function hB(u,v){var $=qt(u)?fi:h2;return $(u,Rv(Rt(v,3)))}function mB(u){var v=qt(u)?c2:lF;return v(u)}function gB(u,v,$){($?oa(u,v,$):v===n)?v=1:v=Jt(v);var R=qt(u)?BL:uF;return R(u,v)}function bB(u){var v=qt(u)?VL:dF;return v(u)}function yB(u){if(u==null)return 0;if(ha(u))return Fv(u)?Su(u):u.length;var v=Ko(u);return v==ne||v==je?u.size:oy(u).length}function _B(u,v,$){var R=qt(u)?Bb:fF;return $&&oa(u,v,$)&&(v=n),R(u,Rt(v,3))}var wB=tn(function(u,v){if(u==null)return[];var $=v.length;return $>1&&oa(u,v[0],v[1])?v=[]:$>2&&oa(v[0],v[1],v[2])&&(v=[v[0]]),E2(u,Vo(v,1),[])}),Mv=tL||function(){return Bo.Date.now()};function $B(u,v){if(typeof v!="function")throw new er(s);return u=Jt(u),function(){if(--u<1)return v.apply(this,arguments)}}function yE(u,v,$){return v=$?n:v,v=u&&v==null?u.length:v,Ds(u,S,n,n,n,n,v)}function _E(u,v){var $;if(typeof v!="function")throw new er(s);return u=Jt(u),function(){return--u>0&&($=v.apply(this,arguments)),u<=1&&(v=n),$}}var Iy=tn(function(u,v,$){var R=y;if($.length){var K=vi($,Du(Iy));R|=T}return Ds(u,R,v,$,K)}),wE=tn(function(u,v,$){var R=y|_;if($.length){var K=vi($,Du(wE));R|=T}return Ds(v,R,u,$,K)});function $E(u,v,$){v=$?n:v;var R=Ds(u,k,n,n,n,n,n,v);return R.placeholder=$E.placeholder,R}function CE(u,v,$){v=$?n:v;var R=Ds(u,E,n,n,n,n,n,v);return R.placeholder=CE.placeholder,R}function SE(u,v,$){var R,K,ae,pe,me,Ee,He=0,qe=!1,Ge=!1,vt=!0;if(typeof u!="function")throw new er(s);v=rr(v)||0,ro($)&&(qe=!!$.leading,Ge="maxWait"in $,ae=Ge?Ao(rr($.maxWait)||0,v):ae,vt="trailing"in $?!!$.trailing:vt);function St(go){var Dr=R,Ls=K;return R=K=n,He=go,pe=u.apply(Ls,Dr),pe}function Lt(go){return He=go,me=kd(rn,v),qe?St(go):pe}function Zt(go){var Dr=go-Ee,Ls=go-He,UE=v-Dr;return Ge?qo(UE,ae-Ls):UE}function Ft(go){var Dr=go-Ee,Ls=go-He;return Ee===n||Dr>=v||Dr<0||Ge&&Ls>=ae}function rn(){var go=Mv();if(Ft(go))return cn(go);me=kd(rn,Zt(go))}function cn(go){return me=n,vt&&R?St(go):(R=K=n,pe)}function Ma(){me!==n&&M2(me),He=0,R=Ee=K=me=n}function aa(){return me===n?pe:cn(Mv())}function Na(){var go=Mv(),Dr=Ft(go);if(R=arguments,K=this,Ee=go,Dr){if(me===n)return Lt(Ee);if(Ge)return M2(me),me=kd(rn,v),St(Ee)}return me===n&&(me=kd(rn,v)),pe}return Na.cancel=Ma,Na.flush=aa,Na}var CB=tn(function(u,v){return p2(u,1,v)}),SB=tn(function(u,v,$){return p2(u,rr(v)||0,$)});function EB(u){return Ds(u,N)}function Nv(u,v){if(typeof u!="function"||v!=null&&typeof v!="function")throw new er(s);var $=function(){var R=arguments,K=v?v.apply(this,R):R[0],ae=$.cache;if(ae.has(K))return ae.get(K);var pe=u.apply(this,R);return $.cache=ae.set(K,pe)||ae,pe};return $.cache=new(Nv.Cache||As),$}Nv.Cache=As;function Rv(u){if(typeof u!="function")throw new er(s);return function(){var v=arguments;switch(v.length){case 0:return!u.call(this);case 1:return!u.call(this,v[0]);case 2:return!u.call(this,v[0],v[1]);case 3:return!u.call(this,v[0],v[1],v[2])}return!u.apply(this,v)}}function kB(u){return _E(2,u)}var IB=pF(function(u,v){v=v.length==1&&qt(v[0])?to(v[0],Oa(Rt())):to(Vo(v,1),Oa(Rt()));var $=v.length;return tn(function(R){for(var K=-1,ae=qo(R.length,$);++K<ae;)R[K]=v[K].call(this,R[K]);return Aa(u,this,R)})}),Ty=tn(function(u,v){var $=vi(v,Du(Ty));return Ds(u,T,n,v,$)}),EE=tn(function(u,v){var $=vi(v,Du(EE));return Ds(u,x,n,v,$)}),TB=Ps(function(u,v){return Ds(u,D,n,n,n,v)});function xB(u,v){if(typeof u!="function")throw new er(s);return v=v===n?v:Jt(v),tn(u,v)}function AB(u,v){if(typeof u!="function")throw new er(s);return v=v==null?0:Ao(Jt(v),0),tn(function($){var R=$[v],K=yi($,0,v);return R&&pi(K,R),Aa(u,this,K)})}function OB(u,v,$){var R=!0,K=!0;if(typeof u!="function")throw new er(s);return ro($)&&(R="leading"in $?!!$.leading:R,K="trailing"in $?!!$.trailing:K),SE(u,v,{leading:R,maxWait:v,trailing:K})}function DB(u){return yE(u,1)}function PB(u,v){return Ty(fy(v),u)}function MB(){if(!arguments.length)return[];var u=arguments[0];return qt(u)?u:[u]}function NB(u){return nr(u,m)}function RB(u,v){return v=typeof v=="function"?v:n,nr(u,m,v)}function LB(u){return nr(u,p|m)}function FB(u,v){return v=typeof v=="function"?v:n,nr(u,p|m,v)}function BB(u,v){return v==null||f2(u,v,Lo(v))}function Or(u,v){return u===v||u!==u&&v!==v}var VB=Tv(ey),zB=Tv(function(u,v){return u>=v}),Sl=b2(function(){return arguments}())?b2:function(u){return uo(u)&&Dn.call(u,"callee")&&!a2.call(u,"callee")},qt=Oe.isArray,jB=BS?Oa(BS):QL;function ha(u){return u!=null&&Lv(u.length)&&!Ns(u)}function mo(u){return uo(u)&&ha(u)}function UB(u){return u===!0||u===!1||uo(u)&&na(u)==J}var _i=oL||By,WB=VS?Oa(VS):JL;function HB(u){return uo(u)&&u.nodeType===1&&!Id(u)}function qB(u){if(u==null)return!0;if(ha(u)&&(qt(u)||typeof u=="string"||typeof u.splice=="function"||_i(u)||Pu(u)||Sl(u)))return!u.length;var v=Ko(u);if(v==ne||v==je)return!u.size;if(Ed(u))return!oy(u).length;for(var $ in u)if(Dn.call(u,$))return!1;return!0}function KB(u,v){return $d(u,v)}function YB(u,v,$){$=typeof $=="function"?$:n;var R=$?$(u,v):n;return R===n?$d(u,v,n,$):!!R}function xy(u){if(!uo(u))return!1;var v=na(u);return v==ge||v==_e||typeof u.message=="string"&&typeof u.name=="string"&&!Id(u)}function GB(u){return typeof u=="number"&&s2(u)}function Ns(u){if(!ro(u))return!1;var v=na(u);return v==Me||v==ee||v==ue||v==ze}function kE(u){return typeof u=="number"&&u==Jt(u)}function Lv(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=q}function ro(u){var v=typeof u;return u!=null&&(v=="object"||v=="function")}function uo(u){return u!=null&&typeof u=="object"}var IE=zS?Oa(zS):ZL;function QB(u,v){return u===v||ny(u,v,yy(v))}function JB(u,v,$){return $=typeof $=="function"?$:n,ny(u,v,yy(v),$)}function XB(u){return TE(u)&&u!=+u}function ZB(u){if(RF(u))throw new Ht(r);return y2(u)}function eV(u){return u===null}function tV(u){return u==null}function TE(u){return typeof u=="number"||uo(u)&&na(u)==fe}function Id(u){if(!uo(u)||na(u)!=$e)return!1;var v=cv(u);if(v===null)return!0;var $=Dn.call(v,"constructor")&&v.constructor;return typeof $=="function"&&$ instanceof $&&sv.call($)==JR}var Ay=jS?Oa(jS):eF;function nV(u){return kE(u)&&u>=-q&&u<=q}var xE=US?Oa(US):tF;function Fv(u){return typeof u=="string"||!qt(u)&&uo(u)&&na(u)==Ve}function Pa(u){return typeof u=="symbol"||uo(u)&&na(u)==tt}var Pu=WS?Oa(WS):nF;function oV(u){return u===n}function aV(u){return uo(u)&&Ko(u)==Te}function rV(u){return uo(u)&&na(u)==rt}var sV=Tv(ay),iV=Tv(function(u,v){return u<=v});function AE(u){if(!u)return[];if(ha(u))return Fv(u)?xr(u):va(u);if(vd&&u[vd])return BR(u[vd]());var v=Ko(u),$=v==ne?Hb:v==je?ov:Mu;return $(u)}function Rs(u){if(!u)return u===0?u:0;if(u=rr(u),u===Q||u===-Q){var v=u<0?-1:1;return v*V}return u===u?u:0}function Jt(u){var v=Rs(u),$=v%1;return v===v?$?v-$:v:0}function OE(u){return u?_l(Jt(u),0,Z):0}function rr(u){if(typeof u=="number")return u;if(Pa(u))return Y;if(ro(u)){var v=typeof u.valueOf=="function"?u.valueOf():u;u=ro(v)?v+"":v}if(typeof u!="string")return u===0?u:+u;u=QS(u);var $=Ts.test(u);return $||Jp.test(u)?$R(u.slice(2),$?2:8):_u.test(u)?Y:+u}function DE(u){return ss(u,ma(u))}function lV(u){return u?_l(Jt(u),-q,q):u===0?u:0}function Tn(u){return u==null?"":Da(u)}var uV=Au(function(u,v){if(Ed(v)||ha(v)){ss(v,Lo(v),u);return}for(var $ in v)Dn.call(v,$)&&yd(u,$,v[$])}),PE=Au(function(u,v){ss(v,ma(v),u)}),Bv=Au(function(u,v,$,R){ss(v,ma(v),u,R)}),cV=Au(function(u,v,$,R){ss(v,Lo(v),u,R)}),dV=Ps(Jb);function fV(u,v){var $=xu(u);return v==null?$:d2($,v)}var pV=tn(function(u,v){u=Bn(u);var $=-1,R=v.length,K=R>2?v[2]:n;for(K&&oa(v[0],v[1],K)&&(R=1);++$<R;)for(var ae=v[$],pe=ma(ae),me=-1,Ee=pe.length;++me<Ee;){var He=pe[me],qe=u[He];(qe===n||Or(qe,ku[He])&&!Dn.call(u,He))&&(u[He]=ae[He])}return u}),vV=tn(function(u){return u.push(n,Q2),Aa(ME,n,u)});function hV(u,v){return qS(u,Rt(v,3),rs)}function mV(u,v){return qS(u,Rt(v,3),Zb)}function gV(u,v){return u==null?u:Xb(u,Rt(v,3),ma)}function bV(u,v){return u==null?u:m2(u,Rt(v,3),ma)}function yV(u,v){return u&&rs(u,Rt(v,3))}function _V(u,v){return u&&Zb(u,Rt(v,3))}function wV(u){return u==null?[]:_v(u,Lo(u))}function $V(u){return u==null?[]:_v(u,ma(u))}function Oy(u,v,$){var R=u==null?n:wl(u,v);return R===n?$:R}function CV(u,v){return u!=null&&Z2(u,v,qL)}function Dy(u,v){return u!=null&&Z2(u,v,KL)}var SV=H2(function(u,v,$){v!=null&&typeof v.toString!="function"&&(v=iv.call(v)),u[v]=$},My(ga)),EV=H2(function(u,v,$){v!=null&&typeof v.toString!="function"&&(v=iv.call(v)),Dn.call(u,v)?u[v].push($):u[v]=[$]},Rt),kV=tn(wd);function Lo(u){return ha(u)?u2(u):oy(u)}function ma(u){return ha(u)?u2(u,!0):oF(u)}function IV(u,v){var $={};return v=Rt(v,3),rs(u,function(R,K,ae){Os($,v(R,K,ae),R)}),$}function TV(u,v){var $={};return v=Rt(v,3),rs(u,function(R,K,ae){Os($,K,v(R,K,ae))}),$}var xV=Au(function(u,v,$){wv(u,v,$)}),ME=Au(function(u,v,$,R){wv(u,v,$,R)}),AV=Ps(function(u,v){var $={};if(u==null)return $;var R=!1;v=to(v,function(ae){return ae=bi(ae,u),R||(R=ae.length>1),ae}),ss(u,gy(u),$),R&&($=nr($,p|h|m,SF));for(var K=v.length;K--;)uy($,v[K]);return $});function OV(u,v){return NE(u,Rv(Rt(v)))}var DV=Ps(function(u,v){return u==null?{}:rF(u,v)});function NE(u,v){if(u==null)return{};var $=to(gy(u),function(R){return[R]});return v=Rt(v),k2(u,$,function(R,K){return v(R,K[0])})}function PV(u,v,$){v=bi(v,u);var R=-1,K=v.length;for(K||(K=1,u=n);++R<K;){var ae=u==null?n:u[is(v[R])];ae===n&&(R=K,ae=$),u=Ns(ae)?ae.call(u):ae}return u}function MV(u,v,$){return u==null?u:Cd(u,v,$)}function NV(u,v,$,R){return R=typeof R=="function"?R:n,u==null?u:Cd(u,v,$,R)}var RE=Y2(Lo),LE=Y2(ma);function RV(u,v,$){var R=qt(u),K=R||_i(u)||Pu(u);if(v=Rt(v,4),$==null){var ae=u&&u.constructor;K?$=R?new ae:[]:ro(u)?$=Ns(ae)?xu(cv(u)):{}:$={}}return(K?Za:rs)(u,function(pe,me,Ee){return v($,pe,me,Ee)}),$}function LV(u,v){return u==null?!0:uy(u,v)}function FV(u,v,$){return u==null?u:O2(u,v,fy($))}function BV(u,v,$,R){return R=typeof R=="function"?R:n,u==null?u:O2(u,v,fy($),R)}function Mu(u){return u==null?[]:Wb(u,Lo(u))}function VV(u){return u==null?[]:Wb(u,ma(u))}function zV(u,v,$){return $===n&&($=v,v=n),$!==n&&($=rr($),$=$===$?$:0),v!==n&&(v=rr(v),v=v===v?v:0),_l(rr(u),v,$)}function jV(u,v,$){return v=Rs(v),$===n?($=v,v=0):$=Rs($),u=rr(u),YL(u,v,$)}function UV(u,v,$){if($&&typeof $!="boolean"&&oa(u,v,$)&&(v=$=n),$===n&&(typeof v=="boolean"?($=v,v=n):typeof u=="boolean"&&($=u,u=n)),u===n&&v===n?(u=0,v=1):(u=Rs(u),v===n?(v=u,u=0):v=Rs(v)),u>v){var R=u;u=v,v=R}if($||u%1||v%1){var K=i2();return qo(u+K*(v-u+wR("1e-"+((K+"").length-1))),v)}return sy(u,v)}var WV=Ou(function(u,v,$){return v=v.toLowerCase(),u+($?FE(v):v)});function FE(u){return Py(Tn(u).toLowerCase())}function BE(u){return u=Tn(u),u&&u.replace(q6,MR).replace(dR,"")}function HV(u,v,$){u=Tn(u),v=Da(v);var R=u.length;$=$===n?R:_l(Jt($),0,R);var K=$;return $-=v.length,$>=0&&u.slice($,K)==v}function qV(u){return u=Tn(u),u&&Cn.test(u)?u.replace(an,NR):u}function KV(u){return u=Tn(u),u&&Qp.test(u)?u.replace(dd,"\\$&"):u}var YV=Ou(function(u,v,$){return u+($?"-":"")+v.toLowerCase()}),GV=Ou(function(u,v,$){return u+($?" ":"")+v.toLowerCase()}),QV=j2("toLowerCase");function JV(u,v,$){u=Tn(u),v=Jt(v);var R=v?Su(u):0;if(!v||R>=v)return u;var K=(v-R)/2;return Iv(vv(K),$)+u+Iv(pv(K),$)}function XV(u,v,$){u=Tn(u),v=Jt(v);var R=v?Su(u):0;return v&&R<v?u+Iv(v-R,$):u}function ZV(u,v,$){u=Tn(u),v=Jt(v);var R=v?Su(u):0;return v&&R<v?Iv(v-R,$)+u:u}function e9(u,v,$){return $||v==null?v=0:v&&(v=+v),iL(Tn(u).replace(fd,""),v||0)}function t9(u,v,$){return($?oa(u,v,$):v===n)?v=1:v=Jt(v),iy(Tn(u),v)}function n9(){var u=arguments,v=Tn(u[0]);return u.length<3?v:v.replace(u[1],u[2])}var o9=Ou(function(u,v,$){return u+($?"_":"")+v.toLowerCase()});function a9(u,v,$){return $&&typeof $!="number"&&oa(u,v,$)&&(v=$=n),$=$===n?Z:$>>>0,$?(u=Tn(u),u&&(typeof v=="string"||v!=null&&!Ay(v))&&(v=Da(v),!v&&Cu(u))?yi(xr(u),0,$):u.split(v,$)):[]}var r9=Ou(function(u,v,$){return u+($?" ":"")+Py(v)});function s9(u,v,$){return u=Tn(u),$=$==null?0:_l(Jt($),0,u.length),v=Da(v),u.slice($,$+v.length)==v}function i9(u,v,$){var R=te.templateSettings;$&&oa(u,v,$)&&(v=n),u=Tn(u),v=Bv({},v,R,G2);var K=Bv({},v.imports,R.imports,G2),ae=Lo(K),pe=Wb(K,ae),me,Ee,He=0,qe=v.interpolate||Xp,Ge="__p += '",vt=qb((v.escape||Xp).source+"|"+qe.source+"|"+(qe===Gp?as:Xp).source+"|"+(v.evaluate||Xp).source+"|$","g"),St="//# sourceURL="+(Dn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mR+"]")+`
89
+ `)}function P5(u){return qt(u)||Sl(u)||!!(r2&&u&&u[r2])}function Ms(u,v){var $=typeof u;return v=v??q,!!v&&($=="number"||$!="symbol"&&H6.test(u))&&u>-1&&u%1==0&&u<v}function oa(u,v,$){if(!ro($))return!1;var R=typeof v;return(R=="number"?ha($)&&Ms(v,$.length):R=="string"&&v in $)?Or($[v],u):!1}function wy(u,v){if(qt(u))return!1;var $=typeof u;return $=="number"||$=="symbol"||$=="boolean"||u==null||Pa(u)?!0:Eb.test(u)||!cd.test(u)||v!=null&&u in Bn(v)}function M5(u){var v=typeof u;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?u!=="__proto__":u===null}function $y(u){var v=xv(u),$=te[v];if(typeof $!="function"||!(v in ln.prototype))return!1;if(u===$)return!0;var R=by($);return!!R&&u===R[0]}function N5(u){return!!t2&&t2 in u}var R5=rv?Ns:By;function Ed(u){var v=u&&u.constructor,$=typeof v=="function"&&v.prototype||ku;return u===$}function tE(u){return u===u&&!ro(u)}function nE(u,v){return function($){return $==null?!1:$[u]===v&&(v!==n||u in Bn($))}}function L5(u){var v=Nv(u,function(R){return $.size===d&&$.clear(),R}),$=v.cache;return v}function F5(u,v){var $=u[1],R=v[1],K=$|R,ae=K<(y|_|S),pe=R==S&&$==k||R==S&&$==D&&u[7].length<=v[8]||R==(S|D)&&v[7].length<=v[8]&&$==k;if(!(ae||pe))return u;R&y&&(u[2]=v[2],K|=$&y?0:I);var me=v[3];if(me){var Ee=u[3];u[3]=Ee?F2(Ee,me,v[4]):me,u[4]=Ee?vi(u[3],f):v[4]}return me=v[5],me&&(Ee=u[5],u[5]=Ee?B2(Ee,me,v[6]):me,u[6]=Ee?vi(u[5],f):v[6]),me=v[7],me&&(u[7]=me),R&S&&(u[8]=u[8]==null?v[8]:qo(u[8],v[8])),u[9]==null&&(u[9]=v[9]),u[0]=v[0],u[1]=K,u}function B5(u){var v=[];if(u!=null)for(var $ in Bn(u))v.push($);return v}function V5(u){return iv.call(u)}function oE(u,v,$){return v=Ao(v===n?u.length-1:v,0),function(){for(var R=arguments,K=-1,ae=Ao(R.length-v,0),pe=Oe(ae);++K<ae;)pe[K]=R[v+K];K=-1;for(var me=Oe(v+1);++K<v;)me[K]=R[K];return me[v]=$(pe),Aa(u,this,me)}}function aE(u,v){return v.length<2?u:wl(u,or(v,0,-1))}function z5(u,v){for(var $=u.length,R=qo(v.length,$),K=va(u);R--;){var ae=v[R];u[R]=Ms(ae,$)?K[ae]:n}return u}function Cy(u,v){if(!(v==="constructor"&&typeof u[v]=="function")&&v!="__proto__")return u[v]}var rE=iE(T2),kd=nL||function(u,v){return Bo.setTimeout(u,v)},Sy=iE(c5);function sE(u,v,$){var R=v+"";return Sy(u,D5(R,j5(x5(R),$)))}function iE(u){var v=0,$=0;return function(){var R=sL(),K=j-(R-$);if($=R,K>0){if(++v>=z)return arguments[0]}else v=0;return u.apply(n,arguments)}}function Ov(u,v){var $=-1,R=u.length,K=R-1;for(v=v===n?R:v;++$<v;){var ae=sy($,K),pe=u[ae];u[ae]=u[$],u[$]=pe}return u.length=v,u}var lE=L5(function(u){var v=[];return u.charCodeAt(0)===46&&v.push(""),u.replace(kb,function($,R,K,ae){v.push(K?ae.replace(Rn,"$1"):R||$)}),v});function is(u){if(typeof u=="string"||Pa(u))return u;var v=u+"";return v=="0"&&1/u==-Q?"-0":v}function Cl(u){if(u!=null){try{return sv.call(u)}catch{}try{return u+""}catch{}}return""}function j5(u,v){return Za(ye,function($){var R="_."+$[0];v&$[1]&&!tv(u,R)&&u.push(R)}),u.sort()}function uE(u){if(u instanceof ln)return u.clone();var v=new tr(u.__wrapped__,u.__chain__);return v.__actions__=va(u.__actions__),v.__index__=u.__index__,v.__values__=u.__values__,v}function U5(u,v,$){($?oa(u,v,$):v===n)?v=1:v=Ao(Jt(v),0);var R=u==null?0:u.length;if(!R||v<1)return[];for(var K=0,ae=0,pe=Oe(pv(R/v));K<R;)pe[ae++]=or(u,K,K+=v);return pe}function W5(u){for(var v=-1,$=u==null?0:u.length,R=0,K=[];++v<$;){var ae=u[v];ae&&(K[R++]=ae)}return K}function H5(){var u=arguments.length;if(!u)return[];for(var v=Oe(u-1),$=arguments[0],R=u;R--;)v[R-1]=arguments[R];return pi(qt($)?va($):[$],Vo(v,1))}var q5=tn(function(u,v){return mo(u)?_d(u,Vo(v,1,mo,!0)):[]}),K5=tn(function(u,v){var $=ar(v);return mo($)&&($=n),mo(u)?_d(u,Vo(v,1,mo,!0),Rt($,2)):[]}),Y5=tn(function(u,v){var $=ar(v);return mo($)&&($=n),mo(u)?_d(u,Vo(v,1,mo,!0),n,$):[]});function G5(u,v,$){var R=u==null?0:u.length;return R?(v=$||v===n?1:Jt(v),or(u,v<0?0:v,R)):[]}function Q5(u,v,$){var R=u==null?0:u.length;return R?(v=$||v===n?1:Jt(v),v=R-v,or(u,0,v<0?0:v)):[]}function J5(u,v){return u&&u.length?Cv(u,Rt(v,3),!0,!0):[]}function X5(u,v){return u&&u.length?Cv(u,Rt(v,3),!0):[]}function Z5(u,v,$,R){var K=u==null?0:u.length;return K?($&&typeof $!="number"&&oa(u,v,$)&&($=0,R=K),HL(u,v,$,R)):[]}function cE(u,v,$){var R=u==null?0:u.length;if(!R)return-1;var K=$==null?0:Jt($);return K<0&&(K=Ao(R+K,0)),nv(u,Rt(v,3),K)}function dE(u,v,$){var R=u==null?0:u.length;if(!R)return-1;var K=R-1;return $!==n&&(K=Jt($),K=$<0?Ao(R+K,0):qo(K,R-1)),nv(u,Rt(v,3),K,!0)}function fE(u){var v=u==null?0:u.length;return v?Vo(u,1):[]}function eF(u){var v=u==null?0:u.length;return v?Vo(u,Q):[]}function tF(u,v){var $=u==null?0:u.length;return $?(v=v===n?1:Jt(v),Vo(u,v)):[]}function nF(u){for(var v=-1,$=u==null?0:u.length,R={};++v<$;){var K=u[v];R[K[0]]=K[1]}return R}function pE(u){return u&&u.length?u[0]:n}function oF(u,v,$){var R=u==null?0:u.length;if(!R)return-1;var K=$==null?0:Jt($);return K<0&&(K=Ao(R+K,0)),$u(u,v,K)}function aF(u){var v=u==null?0:u.length;return v?or(u,0,-1):[]}var rF=tn(function(u){var v=to(u,dy);return v.length&&v[0]===u[0]?ty(v):[]}),sF=tn(function(u){var v=ar(u),$=to(u,dy);return v===ar($)?v=n:$.pop(),$.length&&$[0]===u[0]?ty($,Rt(v,2)):[]}),iF=tn(function(u){var v=ar(u),$=to(u,dy);return v=typeof v=="function"?v:n,v&&$.pop(),$.length&&$[0]===u[0]?ty($,n,v):[]});function lF(u,v){return u==null?"":aL.call(u,v)}function ar(u){var v=u==null?0:u.length;return v?u[v-1]:n}function uF(u,v,$){var R=u==null?0:u.length;if(!R)return-1;var K=R;return $!==n&&(K=Jt($),K=K<0?Ao(R+K,0):qo(K,R-1)),v===v?jR(u,v,K):nv(u,KS,K,!0)}function cF(u,v){return u&&u.length?S2(u,Jt(v)):n}var dF=tn(vE);function vE(u,v){return u&&u.length&&v&&v.length?ry(u,v):u}function fF(u,v,$){return u&&u.length&&v&&v.length?ry(u,v,Rt($,2)):u}function pF(u,v,$){return u&&u.length&&v&&v.length?ry(u,v,n,$):u}var vF=Ps(function(u,v){var $=u==null?0:u.length,R=Jb(u,v);return I2(u,to(v,function(K){return Ms(K,$)?+K:K}).sort(L2)),R});function hF(u,v){var $=[];if(!(u&&u.length))return $;var R=-1,K=[],ae=u.length;for(v=Rt(v,3);++R<ae;){var pe=u[R];v(pe,R,u)&&($.push(pe),K.push(R))}return I2(u,K),$}function Ey(u){return u==null?u:lL.call(u)}function mF(u,v,$){var R=u==null?0:u.length;return R?($&&typeof $!="number"&&oa(u,v,$)?(v=0,$=R):(v=v==null?0:Jt(v),$=$===n?R:Jt($)),or(u,v,$)):[]}function gF(u,v){return $v(u,v)}function bF(u,v,$){return ly(u,v,Rt($,2))}function yF(u,v){var $=u==null?0:u.length;if($){var R=$v(u,v);if(R<$&&Or(u[R],v))return R}return-1}function _F(u,v){return $v(u,v,!0)}function wF(u,v,$){return ly(u,v,Rt($,2),!0)}function $F(u,v){var $=u==null?0:u.length;if($){var R=$v(u,v,!0)-1;if(Or(u[R],v))return R}return-1}function CF(u){return u&&u.length?x2(u):[]}function SF(u,v){return u&&u.length?x2(u,Rt(v,2)):[]}function EF(u){var v=u==null?0:u.length;return v?or(u,1,v):[]}function kF(u,v,$){return u&&u.length?(v=$||v===n?1:Jt(v),or(u,0,v<0?0:v)):[]}function IF(u,v,$){var R=u==null?0:u.length;return R?(v=$||v===n?1:Jt(v),v=R-v,or(u,v<0?0:v,R)):[]}function TF(u,v){return u&&u.length?Cv(u,Rt(v,3),!1,!0):[]}function xF(u,v){return u&&u.length?Cv(u,Rt(v,3)):[]}var AF=tn(function(u){return gi(Vo(u,1,mo,!0))}),OF=tn(function(u){var v=ar(u);return mo(v)&&(v=n),gi(Vo(u,1,mo,!0),Rt(v,2))}),DF=tn(function(u){var v=ar(u);return v=typeof v=="function"?v:n,gi(Vo(u,1,mo,!0),n,v)});function PF(u){return u&&u.length?gi(u):[]}function MF(u,v){return u&&u.length?gi(u,Rt(v,2)):[]}function NF(u,v){return v=typeof v=="function"?v:n,u&&u.length?gi(u,n,v):[]}function ky(u){if(!(u&&u.length))return[];var v=0;return u=fi(u,function($){if(mo($))return v=Ao($.length,v),!0}),Ub(v,function($){return to(u,Vb($))})}function hE(u,v){if(!(u&&u.length))return[];var $=ky(u);return v==null?$:to($,function(R){return Aa(v,n,R)})}var RF=tn(function(u,v){return mo(u)?_d(u,v):[]}),LF=tn(function(u){return cy(fi(u,mo))}),FF=tn(function(u){var v=ar(u);return mo(v)&&(v=n),cy(fi(u,mo),Rt(v,2))}),BF=tn(function(u){var v=ar(u);return v=typeof v=="function"?v:n,cy(fi(u,mo),n,v)}),VF=tn(ky);function zF(u,v){return P2(u||[],v||[],yd)}function jF(u,v){return P2(u||[],v||[],Cd)}var UF=tn(function(u){var v=u.length,$=v>1?u[v-1]:n;return $=typeof $=="function"?(u.pop(),$):n,hE(u,$)});function mE(u){var v=te(u);return v.__chain__=!0,v}function WF(u,v){return v(u),u}function Dv(u,v){return v(u)}var HF=Ps(function(u){var v=u.length,$=v?u[0]:0,R=this.__wrapped__,K=function(ae){return Jb(ae,u)};return v>1||this.__actions__.length||!(R instanceof ln)||!Ms($)?this.thru(K):(R=R.slice($,+$+(v?1:0)),R.__actions__.push({func:Dv,args:[K],thisArg:n}),new tr(R,this.__chain__).thru(function(ae){return v&&!ae.length&&ae.push(n),ae}))});function qF(){return mE(this)}function KF(){return new tr(this.value(),this.__chain__)}function YF(){this.__values__===n&&(this.__values__=AE(this.value()));var u=this.__index__>=this.__values__.length,v=u?n:this.__values__[this.__index__++];return{done:u,value:v}}function GF(){return this}function QF(u){for(var v,$=this;$ instanceof gv;){var R=uE($);R.__index__=0,R.__values__=n,v?K.__wrapped__=R:v=R;var K=R;$=$.__wrapped__}return K.__wrapped__=u,v}function JF(){var u=this.__wrapped__;if(u instanceof ln){var v=u;return this.__actions__.length&&(v=new ln(this)),v=v.reverse(),v.__actions__.push({func:Dv,args:[Ey],thisArg:n}),new tr(v,this.__chain__)}return this.thru(Ey)}function XF(){return D2(this.__wrapped__,this.__actions__)}var ZF=Sv(function(u,v,$){Dn.call(u,$)?++u[$]:Os(u,$,1)});function eB(u,v,$){var R=qt(u)?HS:WL;return $&&oa(u,v,$)&&(v=n),R(u,Rt(v,3))}function tB(u,v){var $=qt(u)?fi:h2;return $(u,Rt(v,3))}var nB=U2(cE),oB=U2(dE);function aB(u,v){return Vo(Pv(u,v),1)}function rB(u,v){return Vo(Pv(u,v),Q)}function sB(u,v,$){return $=$===n?1:Jt($),Vo(Pv(u,v),$)}function gE(u,v){var $=qt(u)?Za:mi;return $(u,Rt(v,3))}function bE(u,v){var $=qt(u)?ER:v2;return $(u,Rt(v,3))}var iB=Sv(function(u,v,$){Dn.call(u,$)?u[$].push(v):Os(u,$,[v])});function lB(u,v,$,R){u=ha(u)?u:Mu(u),$=$&&!R?Jt($):0;var K=u.length;return $<0&&($=Ao(K+$,0)),Fv(u)?$<=K&&u.indexOf(v,$)>-1:!!K&&$u(u,v,$)>-1}var uB=tn(function(u,v,$){var R=-1,K=typeof v=="function",ae=ha(u)?Oe(u.length):[];return mi(u,function(pe){ae[++R]=K?Aa(v,pe,$):wd(pe,v,$)}),ae}),cB=Sv(function(u,v,$){Os(u,$,v)});function Pv(u,v){var $=qt(u)?to:w2;return $(u,Rt(v,3))}function dB(u,v,$,R){return u==null?[]:(qt(v)||(v=v==null?[]:[v]),$=R?n:$,qt($)||($=$==null?[]:[$]),E2(u,v,$))}var fB=Sv(function(u,v,$){u[$?0:1].push(v)},function(){return[[],[]]});function pB(u,v,$){var R=qt(u)?Fb:GS,K=arguments.length<3;return R(u,Rt(v,4),$,K,mi)}function vB(u,v,$){var R=qt(u)?kR:GS,K=arguments.length<3;return R(u,Rt(v,4),$,K,v2)}function hB(u,v){var $=qt(u)?fi:h2;return $(u,Rv(Rt(v,3)))}function mB(u){var v=qt(u)?c2:l5;return v(u)}function gB(u,v,$){($?oa(u,v,$):v===n)?v=1:v=Jt(v);var R=qt(u)?BL:u5;return R(u,v)}function bB(u){var v=qt(u)?VL:d5;return v(u)}function yB(u){if(u==null)return 0;if(ha(u))return Fv(u)?Su(u):u.length;var v=Ko(u);return v==ne||v==je?u.size:oy(u).length}function _B(u,v,$){var R=qt(u)?Bb:f5;return $&&oa(u,v,$)&&(v=n),R(u,Rt(v,3))}var wB=tn(function(u,v){if(u==null)return[];var $=v.length;return $>1&&oa(u,v[0],v[1])?v=[]:$>2&&oa(v[0],v[1],v[2])&&(v=[v[0]]),E2(u,Vo(v,1),[])}),Mv=tL||function(){return Bo.Date.now()};function $B(u,v){if(typeof v!="function")throw new er(s);return u=Jt(u),function(){if(--u<1)return v.apply(this,arguments)}}function yE(u,v,$){return v=$?n:v,v=u&&v==null?u.length:v,Ds(u,S,n,n,n,n,v)}function _E(u,v){var $;if(typeof v!="function")throw new er(s);return u=Jt(u),function(){return--u>0&&($=v.apply(this,arguments)),u<=1&&(v=n),$}}var Iy=tn(function(u,v,$){var R=y;if($.length){var K=vi($,Du(Iy));R|=T}return Ds(u,R,v,$,K)}),wE=tn(function(u,v,$){var R=y|_;if($.length){var K=vi($,Du(wE));R|=T}return Ds(v,R,u,$,K)});function $E(u,v,$){v=$?n:v;var R=Ds(u,k,n,n,n,n,n,v);return R.placeholder=$E.placeholder,R}function CE(u,v,$){v=$?n:v;var R=Ds(u,E,n,n,n,n,n,v);return R.placeholder=CE.placeholder,R}function SE(u,v,$){var R,K,ae,pe,me,Ee,He=0,qe=!1,Ge=!1,vt=!0;if(typeof u!="function")throw new er(s);v=rr(v)||0,ro($)&&(qe=!!$.leading,Ge="maxWait"in $,ae=Ge?Ao(rr($.maxWait)||0,v):ae,vt="trailing"in $?!!$.trailing:vt);function St(go){var Dr=R,Ls=K;return R=K=n,He=go,pe=u.apply(Ls,Dr),pe}function Lt(go){return He=go,me=kd(rn,v),qe?St(go):pe}function Zt(go){var Dr=go-Ee,Ls=go-He,UE=v-Dr;return Ge?qo(UE,ae-Ls):UE}function Ft(go){var Dr=go-Ee,Ls=go-He;return Ee===n||Dr>=v||Dr<0||Ge&&Ls>=ae}function rn(){var go=Mv();if(Ft(go))return cn(go);me=kd(rn,Zt(go))}function cn(go){return me=n,vt&&R?St(go):(R=K=n,pe)}function Ma(){me!==n&&M2(me),He=0,R=Ee=K=me=n}function aa(){return me===n?pe:cn(Mv())}function Na(){var go=Mv(),Dr=Ft(go);if(R=arguments,K=this,Ee=go,Dr){if(me===n)return Lt(Ee);if(Ge)return M2(me),me=kd(rn,v),St(Ee)}return me===n&&(me=kd(rn,v)),pe}return Na.cancel=Ma,Na.flush=aa,Na}var CB=tn(function(u,v){return p2(u,1,v)}),SB=tn(function(u,v,$){return p2(u,rr(v)||0,$)});function EB(u){return Ds(u,N)}function Nv(u,v){if(typeof u!="function"||v!=null&&typeof v!="function")throw new er(s);var $=function(){var R=arguments,K=v?v.apply(this,R):R[0],ae=$.cache;if(ae.has(K))return ae.get(K);var pe=u.apply(this,R);return $.cache=ae.set(K,pe)||ae,pe};return $.cache=new(Nv.Cache||As),$}Nv.Cache=As;function Rv(u){if(typeof u!="function")throw new er(s);return function(){var v=arguments;switch(v.length){case 0:return!u.call(this);case 1:return!u.call(this,v[0]);case 2:return!u.call(this,v[0],v[1]);case 3:return!u.call(this,v[0],v[1],v[2])}return!u.apply(this,v)}}function kB(u){return _E(2,u)}var IB=p5(function(u,v){v=v.length==1&&qt(v[0])?to(v[0],Oa(Rt())):to(Vo(v,1),Oa(Rt()));var $=v.length;return tn(function(R){for(var K=-1,ae=qo(R.length,$);++K<ae;)R[K]=v[K].call(this,R[K]);return Aa(u,this,R)})}),Ty=tn(function(u,v){var $=vi(v,Du(Ty));return Ds(u,T,n,v,$)}),EE=tn(function(u,v){var $=vi(v,Du(EE));return Ds(u,x,n,v,$)}),TB=Ps(function(u,v){return Ds(u,D,n,n,n,v)});function xB(u,v){if(typeof u!="function")throw new er(s);return v=v===n?v:Jt(v),tn(u,v)}function AB(u,v){if(typeof u!="function")throw new er(s);return v=v==null?0:Ao(Jt(v),0),tn(function($){var R=$[v],K=yi($,0,v);return R&&pi(K,R),Aa(u,this,K)})}function OB(u,v,$){var R=!0,K=!0;if(typeof u!="function")throw new er(s);return ro($)&&(R="leading"in $?!!$.leading:R,K="trailing"in $?!!$.trailing:K),SE(u,v,{leading:R,maxWait:v,trailing:K})}function DB(u){return yE(u,1)}function PB(u,v){return Ty(fy(v),u)}function MB(){if(!arguments.length)return[];var u=arguments[0];return qt(u)?u:[u]}function NB(u){return nr(u,m)}function RB(u,v){return v=typeof v=="function"?v:n,nr(u,m,v)}function LB(u){return nr(u,p|m)}function FB(u,v){return v=typeof v=="function"?v:n,nr(u,p|m,v)}function BB(u,v){return v==null||f2(u,v,Lo(v))}function Or(u,v){return u===v||u!==u&&v!==v}var VB=Tv(ey),zB=Tv(function(u,v){return u>=v}),Sl=b2(function(){return arguments}())?b2:function(u){return uo(u)&&Dn.call(u,"callee")&&!a2.call(u,"callee")},qt=Oe.isArray,jB=BS?Oa(BS):QL;function ha(u){return u!=null&&Lv(u.length)&&!Ns(u)}function mo(u){return uo(u)&&ha(u)}function UB(u){return u===!0||u===!1||uo(u)&&na(u)==J}var _i=oL||By,WB=VS?Oa(VS):JL;function HB(u){return uo(u)&&u.nodeType===1&&!Id(u)}function qB(u){if(u==null)return!0;if(ha(u)&&(qt(u)||typeof u=="string"||typeof u.splice=="function"||_i(u)||Pu(u)||Sl(u)))return!u.length;var v=Ko(u);if(v==ne||v==je)return!u.size;if(Ed(u))return!oy(u).length;for(var $ in u)if(Dn.call(u,$))return!1;return!0}function KB(u,v){return $d(u,v)}function YB(u,v,$){$=typeof $=="function"?$:n;var R=$?$(u,v):n;return R===n?$d(u,v,n,$):!!R}function xy(u){if(!uo(u))return!1;var v=na(u);return v==ge||v==_e||typeof u.message=="string"&&typeof u.name=="string"&&!Id(u)}function GB(u){return typeof u=="number"&&s2(u)}function Ns(u){if(!ro(u))return!1;var v=na(u);return v==Me||v==ee||v==ue||v==ze}function kE(u){return typeof u=="number"&&u==Jt(u)}function Lv(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=q}function ro(u){var v=typeof u;return u!=null&&(v=="object"||v=="function")}function uo(u){return u!=null&&typeof u=="object"}var IE=zS?Oa(zS):ZL;function QB(u,v){return u===v||ny(u,v,yy(v))}function JB(u,v,$){return $=typeof $=="function"?$:n,ny(u,v,yy(v),$)}function XB(u){return TE(u)&&u!=+u}function ZB(u){if(R5(u))throw new Ht(r);return y2(u)}function eV(u){return u===null}function tV(u){return u==null}function TE(u){return typeof u=="number"||uo(u)&&na(u)==fe}function Id(u){if(!uo(u)||na(u)!=$e)return!1;var v=cv(u);if(v===null)return!0;var $=Dn.call(v,"constructor")&&v.constructor;return typeof $=="function"&&$ instanceof $&&sv.call($)==JR}var Ay=jS?Oa(jS):e5;function nV(u){return kE(u)&&u>=-q&&u<=q}var xE=US?Oa(US):t5;function Fv(u){return typeof u=="string"||!qt(u)&&uo(u)&&na(u)==Ve}function Pa(u){return typeof u=="symbol"||uo(u)&&na(u)==tt}var Pu=WS?Oa(WS):n5;function oV(u){return u===n}function aV(u){return uo(u)&&Ko(u)==Te}function rV(u){return uo(u)&&na(u)==rt}var sV=Tv(ay),iV=Tv(function(u,v){return u<=v});function AE(u){if(!u)return[];if(ha(u))return Fv(u)?xr(u):va(u);if(vd&&u[vd])return BR(u[vd]());var v=Ko(u),$=v==ne?Hb:v==je?ov:Mu;return $(u)}function Rs(u){if(!u)return u===0?u:0;if(u=rr(u),u===Q||u===-Q){var v=u<0?-1:1;return v*V}return u===u?u:0}function Jt(u){var v=Rs(u),$=v%1;return v===v?$?v-$:v:0}function OE(u){return u?_l(Jt(u),0,Z):0}function rr(u){if(typeof u=="number")return u;if(Pa(u))return Y;if(ro(u)){var v=typeof u.valueOf=="function"?u.valueOf():u;u=ro(v)?v+"":v}if(typeof u!="string")return u===0?u:+u;u=QS(u);var $=Ts.test(u);return $||Jp.test(u)?$R(u.slice(2),$?2:8):_u.test(u)?Y:+u}function DE(u){return ss(u,ma(u))}function lV(u){return u?_l(Jt(u),-q,q):u===0?u:0}function Tn(u){return u==null?"":Da(u)}var uV=Au(function(u,v){if(Ed(v)||ha(v)){ss(v,Lo(v),u);return}for(var $ in v)Dn.call(v,$)&&yd(u,$,v[$])}),PE=Au(function(u,v){ss(v,ma(v),u)}),Bv=Au(function(u,v,$,R){ss(v,ma(v),u,R)}),cV=Au(function(u,v,$,R){ss(v,Lo(v),u,R)}),dV=Ps(Jb);function fV(u,v){var $=xu(u);return v==null?$:d2($,v)}var pV=tn(function(u,v){u=Bn(u);var $=-1,R=v.length,K=R>2?v[2]:n;for(K&&oa(v[0],v[1],K)&&(R=1);++$<R;)for(var ae=v[$],pe=ma(ae),me=-1,Ee=pe.length;++me<Ee;){var He=pe[me],qe=u[He];(qe===n||Or(qe,ku[He])&&!Dn.call(u,He))&&(u[He]=ae[He])}return u}),vV=tn(function(u){return u.push(n,Q2),Aa(ME,n,u)});function hV(u,v){return qS(u,Rt(v,3),rs)}function mV(u,v){return qS(u,Rt(v,3),Zb)}function gV(u,v){return u==null?u:Xb(u,Rt(v,3),ma)}function bV(u,v){return u==null?u:m2(u,Rt(v,3),ma)}function yV(u,v){return u&&rs(u,Rt(v,3))}function _V(u,v){return u&&Zb(u,Rt(v,3))}function wV(u){return u==null?[]:_v(u,Lo(u))}function $V(u){return u==null?[]:_v(u,ma(u))}function Oy(u,v,$){var R=u==null?n:wl(u,v);return R===n?$:R}function CV(u,v){return u!=null&&Z2(u,v,qL)}function Dy(u,v){return u!=null&&Z2(u,v,KL)}var SV=H2(function(u,v,$){v!=null&&typeof v.toString!="function"&&(v=iv.call(v)),u[v]=$},My(ga)),EV=H2(function(u,v,$){v!=null&&typeof v.toString!="function"&&(v=iv.call(v)),Dn.call(u,v)?u[v].push($):u[v]=[$]},Rt),kV=tn(wd);function Lo(u){return ha(u)?u2(u):oy(u)}function ma(u){return ha(u)?u2(u,!0):o5(u)}function IV(u,v){var $={};return v=Rt(v,3),rs(u,function(R,K,ae){Os($,v(R,K,ae),R)}),$}function TV(u,v){var $={};return v=Rt(v,3),rs(u,function(R,K,ae){Os($,K,v(R,K,ae))}),$}var xV=Au(function(u,v,$){wv(u,v,$)}),ME=Au(function(u,v,$,R){wv(u,v,$,R)}),AV=Ps(function(u,v){var $={};if(u==null)return $;var R=!1;v=to(v,function(ae){return ae=bi(ae,u),R||(R=ae.length>1),ae}),ss(u,gy(u),$),R&&($=nr($,p|h|m,S5));for(var K=v.length;K--;)uy($,v[K]);return $});function OV(u,v){return NE(u,Rv(Rt(v)))}var DV=Ps(function(u,v){return u==null?{}:r5(u,v)});function NE(u,v){if(u==null)return{};var $=to(gy(u),function(R){return[R]});return v=Rt(v),k2(u,$,function(R,K){return v(R,K[0])})}function PV(u,v,$){v=bi(v,u);var R=-1,K=v.length;for(K||(K=1,u=n);++R<K;){var ae=u==null?n:u[is(v[R])];ae===n&&(R=K,ae=$),u=Ns(ae)?ae.call(u):ae}return u}function MV(u,v,$){return u==null?u:Cd(u,v,$)}function NV(u,v,$,R){return R=typeof R=="function"?R:n,u==null?u:Cd(u,v,$,R)}var RE=Y2(Lo),LE=Y2(ma);function RV(u,v,$){var R=qt(u),K=R||_i(u)||Pu(u);if(v=Rt(v,4),$==null){var ae=u&&u.constructor;K?$=R?new ae:[]:ro(u)?$=Ns(ae)?xu(cv(u)):{}:$={}}return(K?Za:rs)(u,function(pe,me,Ee){return v($,pe,me,Ee)}),$}function LV(u,v){return u==null?!0:uy(u,v)}function FV(u,v,$){return u==null?u:O2(u,v,fy($))}function BV(u,v,$,R){return R=typeof R=="function"?R:n,u==null?u:O2(u,v,fy($),R)}function Mu(u){return u==null?[]:Wb(u,Lo(u))}function VV(u){return u==null?[]:Wb(u,ma(u))}function zV(u,v,$){return $===n&&($=v,v=n),$!==n&&($=rr($),$=$===$?$:0),v!==n&&(v=rr(v),v=v===v?v:0),_l(rr(u),v,$)}function jV(u,v,$){return v=Rs(v),$===n?($=v,v=0):$=Rs($),u=rr(u),YL(u,v,$)}function UV(u,v,$){if($&&typeof $!="boolean"&&oa(u,v,$)&&(v=$=n),$===n&&(typeof v=="boolean"?($=v,v=n):typeof u=="boolean"&&($=u,u=n)),u===n&&v===n?(u=0,v=1):(u=Rs(u),v===n?(v=u,u=0):v=Rs(v)),u>v){var R=u;u=v,v=R}if($||u%1||v%1){var K=i2();return qo(u+K*(v-u+wR("1e-"+((K+"").length-1))),v)}return sy(u,v)}var WV=Ou(function(u,v,$){return v=v.toLowerCase(),u+($?FE(v):v)});function FE(u){return Py(Tn(u).toLowerCase())}function BE(u){return u=Tn(u),u&&u.replace(q6,MR).replace(dR,"")}function HV(u,v,$){u=Tn(u),v=Da(v);var R=u.length;$=$===n?R:_l(Jt($),0,R);var K=$;return $-=v.length,$>=0&&u.slice($,K)==v}function qV(u){return u=Tn(u),u&&Cn.test(u)?u.replace(an,NR):u}function KV(u){return u=Tn(u),u&&Qp.test(u)?u.replace(dd,"\\$&"):u}var YV=Ou(function(u,v,$){return u+($?"-":"")+v.toLowerCase()}),GV=Ou(function(u,v,$){return u+($?" ":"")+v.toLowerCase()}),QV=j2("toLowerCase");function JV(u,v,$){u=Tn(u),v=Jt(v);var R=v?Su(u):0;if(!v||R>=v)return u;var K=(v-R)/2;return Iv(vv(K),$)+u+Iv(pv(K),$)}function XV(u,v,$){u=Tn(u),v=Jt(v);var R=v?Su(u):0;return v&&R<v?u+Iv(v-R,$):u}function ZV(u,v,$){u=Tn(u),v=Jt(v);var R=v?Su(u):0;return v&&R<v?Iv(v-R,$)+u:u}function e9(u,v,$){return $||v==null?v=0:v&&(v=+v),iL(Tn(u).replace(fd,""),v||0)}function t9(u,v,$){return($?oa(u,v,$):v===n)?v=1:v=Jt(v),iy(Tn(u),v)}function n9(){var u=arguments,v=Tn(u[0]);return u.length<3?v:v.replace(u[1],u[2])}var o9=Ou(function(u,v,$){return u+($?"_":"")+v.toLowerCase()});function a9(u,v,$){return $&&typeof $!="number"&&oa(u,v,$)&&(v=$=n),$=$===n?Z:$>>>0,$?(u=Tn(u),u&&(typeof v=="string"||v!=null&&!Ay(v))&&(v=Da(v),!v&&Cu(u))?yi(xr(u),0,$):u.split(v,$)):[]}var r9=Ou(function(u,v,$){return u+($?" ":"")+Py(v)});function s9(u,v,$){return u=Tn(u),$=$==null?0:_l(Jt($),0,u.length),v=Da(v),u.slice($,$+v.length)==v}function i9(u,v,$){var R=te.templateSettings;$&&oa(u,v,$)&&(v=n),u=Tn(u),v=Bv({},v,R,G2);var K=Bv({},v.imports,R.imports,G2),ae=Lo(K),pe=Wb(K,ae),me,Ee,He=0,qe=v.interpolate||Xp,Ge="__p += '",vt=qb((v.escape||Xp).source+"|"+qe.source+"|"+(qe===Gp?as:Xp).source+"|"+(v.evaluate||Xp).source+"|$","g"),St="//# sourceURL="+(Dn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++mR+"]")+`
90
90
  `;u.replace(vt,function(Ft,rn,cn,Ma,aa,Na){return cn||(cn=Ma),Ge+=u.slice(He,Na).replace(K6,RR),rn&&(me=!0,Ge+=`' +
91
91
  __e(`+rn+`) +
92
92
  '`),aa&&(Ee=!0,Ge+=`';
@@ -103,7 +103,7 @@ __p += '`),cn&&(Ge+=`' +
103
103
  function print() { __p += __j.call(arguments, '') }
104
104
  `:`;
105
105
  `)+Ge+`return __p
106
- }`;var Zt=zE(function(){return Sn(ae,St+"return "+Ge).apply(n,pe)});if(Zt.source=Ge,xy(Zt))throw Zt;return Zt}function l9(u){return Tn(u).toLowerCase()}function u9(u){return Tn(u).toUpperCase()}function c9(u,v,$){if(u=Tn(u),u&&($||v===n))return QS(u);if(!u||!(v=Da(v)))return u;var R=xr(u),K=xr(v),ae=JS(R,K),pe=XS(R,K)+1;return yi(R,ae,pe).join("")}function d9(u,v,$){if(u=Tn(u),u&&($||v===n))return u.slice(0,e2(u)+1);if(!u||!(v=Da(v)))return u;var R=xr(u),K=XS(R,xr(v))+1;return yi(R,0,K).join("")}function f9(u,v,$){if(u=Tn(u),u&&($||v===n))return u.replace(fd,"");if(!u||!(v=Da(v)))return u;var R=xr(u),K=JS(R,xr(v));return yi(R,K).join("")}function p9(u,v){var $=L,R=F;if(ro(v)){var K="separator"in v?v.separator:K;$="length"in v?Jt(v.length):$,R="omission"in v?Da(v.omission):R}u=Tn(u);var ae=u.length;if(Cu(u)){var pe=xr(u);ae=pe.length}if($>=ae)return u;var me=$-Su(R);if(me<1)return R;var Ee=pe?yi(pe,0,me).join(""):u.slice(0,me);if(K===n)return Ee+R;if(pe&&(me+=Ee.length-me),Ay(K)){if(u.slice(me).search(K)){var He,qe=Ee;for(K.global||(K=qb(K.source,Tn(Is.exec(K))+"g")),K.lastIndex=0;He=K.exec(qe);)var Ge=He.index;Ee=Ee.slice(0,Ge===n?me:Ge)}}else if(u.indexOf(Da(K),me)!=me){var vt=Ee.lastIndexOf(K);vt>-1&&(Ee=Ee.slice(0,vt))}return Ee+R}function v9(u){return u=Tn(u),u&&ho.test(u)?u.replace(zt,UR):u}var h9=Ou(function(u,v,$){return u+($?" ":"")+v.toUpperCase()}),Py=j2("toUpperCase");function VE(u,v,$){return u=Tn(u),v=$?n:v,v===n?FR(u)?qR(u):xR(u):u.match(v)||[]}var zE=tn(function(u,v){try{return Aa(u,n,v)}catch($){return xy($)?$:new Ht($)}}),m9=Ps(function(u,v){return Za(v,function($){$=is($),Os(u,$,Iy(u[$],u))}),u});function g9(u){var v=u==null?0:u.length,$=Rt();return u=v?to(u,function(R){if(typeof R[1]!="function")throw new er(s);return[$(R[0]),R[1]]}):[],tn(function(R){for(var K=-1;++K<v;){var ae=u[K];if(Aa(ae[0],this,R))return Aa(ae[1],this,R)}})}function b9(u){return UL(nr(u,p))}function My(u){return function(){return u}}function y9(u,v){return u==null||u!==u?v:u}var _9=W2(),w9=W2(!0);function ga(u){return u}function Ny(u){return _2(typeof u=="function"?u:nr(u,p))}function $9(u){return $2(nr(u,p))}function C9(u,v){return C2(u,nr(v,p))}var S9=tn(function(u,v){return function($){return wd($,u,v)}}),E9=tn(function(u,v){return function($){return wd(u,$,v)}});function Ry(u,v,$){var R=Lo(v),K=_v(v,R);$==null&&!(ro(v)&&(K.length||!R.length))&&($=v,v=u,u=this,K=_v(v,Lo(v)));var ae=!(ro($)&&"chain"in $)||!!$.chain,pe=Ns(u);return Za(K,function(me){var Ee=v[me];u[me]=Ee,pe&&(u.prototype[me]=function(){var He=this.__chain__;if(ae||He){var qe=u(this.__wrapped__),Ge=qe.__actions__=va(this.__actions__);return Ge.push({func:Ee,args:arguments,thisArg:u}),qe.__chain__=He,qe}return Ee.apply(u,pi([this.value()],arguments))})}),u}function k9(){return Bo._===this&&(Bo._=XR),this}function Ly(){}function I9(u){return u=Jt(u),tn(function(v){return S2(v,u)})}var T9=vy(to),x9=vy(HS),A9=vy(Bb);function jE(u){return wy(u)?Vb(is(u)):sF(u)}function O9(u){return function(v){return u==null?n:wl(u,v)}}var D9=q2(),P9=q2(!0);function Fy(){return[]}function By(){return!1}function M9(){return{}}function N9(){return""}function R9(){return!0}function L9(u,v){if(u=Jt(u),u<1||u>q)return[];var $=Z,R=qo(u,Z);v=Rt(v),u-=Z;for(var K=Ub(R,v);++$<u;)v($);return K}function F9(u){return qt(u)?to(u,is):Pa(u)?[u]:va(lE(Tn(u)))}function B9(u){var v=++QR;return Tn(u)+v}var V9=kv(function(u,v){return u+v},0),z9=hy("ceil"),j9=kv(function(u,v){return u/v},1),U9=hy("floor");function W9(u){return u&&u.length?yv(u,ga,ey):n}function H9(u,v){return u&&u.length?yv(u,Rt(v,2),ey):n}function q9(u){return YS(u,ga)}function K9(u,v){return YS(u,Rt(v,2))}function Y9(u){return u&&u.length?yv(u,ga,ay):n}function G9(u,v){return u&&u.length?yv(u,Rt(v,2),ay):n}var Q9=kv(function(u,v){return u*v},1),J9=hy("round"),X9=kv(function(u,v){return u-v},0);function Z9(u){return u&&u.length?jb(u,ga):0}function e7(u,v){return u&&u.length?jb(u,Rt(v,2)):0}return te.after=$B,te.ary=yE,te.assign=uV,te.assignIn=PE,te.assignInWith=Bv,te.assignWith=cV,te.at=dV,te.before=_E,te.bind=Iy,te.bindAll=m9,te.bindKey=wE,te.castArray=MB,te.chain=mE,te.chunk=UF,te.compact=WF,te.concat=HF,te.cond=g9,te.conforms=b9,te.constant=My,te.countBy=Z5,te.create=fV,te.curry=$E,te.curryRight=CE,te.debounce=SE,te.defaults=pV,te.defaultsDeep=vV,te.defer=CB,te.delay=SB,te.difference=qF,te.differenceBy=KF,te.differenceWith=YF,te.drop=GF,te.dropRight=QF,te.dropRightWhile=JF,te.dropWhile=XF,te.fill=ZF,te.filter=tB,te.flatMap=aB,te.flatMapDeep=rB,te.flatMapDepth=sB,te.flatten=fE,te.flattenDeep=e5,te.flattenDepth=t5,te.flip=EB,te.flow=_9,te.flowRight=w9,te.fromPairs=n5,te.functions=wV,te.functionsIn=$V,te.groupBy=iB,te.initial=a5,te.intersection=r5,te.intersectionBy=s5,te.intersectionWith=i5,te.invert=SV,te.invertBy=EV,te.invokeMap=uB,te.iteratee=Ny,te.keyBy=cB,te.keys=Lo,te.keysIn=ma,te.map=Pv,te.mapKeys=IV,te.mapValues=TV,te.matches=$9,te.matchesProperty=C9,te.memoize=Nv,te.merge=xV,te.mergeWith=ME,te.method=S9,te.methodOf=E9,te.mixin=Ry,te.negate=Rv,te.nthArg=I9,te.omit=AV,te.omitBy=OV,te.once=kB,te.orderBy=dB,te.over=T9,te.overArgs=IB,te.overEvery=x9,te.overSome=A9,te.partial=Ty,te.partialRight=EE,te.partition=fB,te.pick=DV,te.pickBy=NE,te.property=jE,te.propertyOf=O9,te.pull=d5,te.pullAll=vE,te.pullAllBy=f5,te.pullAllWith=p5,te.pullAt=v5,te.range=D9,te.rangeRight=P9,te.rearg=TB,te.reject=hB,te.remove=h5,te.rest=xB,te.reverse=Ey,te.sampleSize=gB,te.set=MV,te.setWith=NV,te.shuffle=bB,te.slice=m5,te.sortBy=wB,te.sortedUniq=C5,te.sortedUniqBy=S5,te.split=a9,te.spread=AB,te.tail=E5,te.take=k5,te.takeRight=I5,te.takeRightWhile=T5,te.takeWhile=x5,te.tap=W5,te.throttle=OB,te.thru=Dv,te.toArray=AE,te.toPairs=RE,te.toPairsIn=LE,te.toPath=F9,te.toPlainObject=DE,te.transform=RV,te.unary=DB,te.union=A5,te.unionBy=O5,te.unionWith=D5,te.uniq=P5,te.uniqBy=M5,te.uniqWith=N5,te.unset=LV,te.unzip=ky,te.unzipWith=hE,te.update=FV,te.updateWith=BV,te.values=Mu,te.valuesIn=VV,te.without=R5,te.words=VE,te.wrap=PB,te.xor=L5,te.xorBy=F5,te.xorWith=B5,te.zip=V5,te.zipObject=z5,te.zipObjectDeep=j5,te.zipWith=U5,te.entries=RE,te.entriesIn=LE,te.extend=PE,te.extendWith=Bv,Ry(te,te),te.add=V9,te.attempt=zE,te.camelCase=WV,te.capitalize=FE,te.ceil=z9,te.clamp=zV,te.clone=NB,te.cloneDeep=LB,te.cloneDeepWith=FB,te.cloneWith=RB,te.conformsTo=BB,te.deburr=BE,te.defaultTo=y9,te.divide=j9,te.endsWith=HV,te.eq=Or,te.escape=qV,te.escapeRegExp=KV,te.every=eB,te.find=nB,te.findIndex=cE,te.findKey=hV,te.findLast=oB,te.findLastIndex=dE,te.findLastKey=mV,te.floor=U9,te.forEach=gE,te.forEachRight=bE,te.forIn=gV,te.forInRight=bV,te.forOwn=yV,te.forOwnRight=_V,te.get=Oy,te.gt=VB,te.gte=zB,te.has=CV,te.hasIn=Dy,te.head=pE,te.identity=ga,te.includes=lB,te.indexOf=o5,te.inRange=jV,te.invoke=kV,te.isArguments=Sl,te.isArray=qt,te.isArrayBuffer=jB,te.isArrayLike=ha,te.isArrayLikeObject=mo,te.isBoolean=UB,te.isBuffer=_i,te.isDate=WB,te.isElement=HB,te.isEmpty=qB,te.isEqual=KB,te.isEqualWith=YB,te.isError=xy,te.isFinite=GB,te.isFunction=Ns,te.isInteger=kE,te.isLength=Lv,te.isMap=IE,te.isMatch=QB,te.isMatchWith=JB,te.isNaN=XB,te.isNative=ZB,te.isNil=tV,te.isNull=eV,te.isNumber=TE,te.isObject=ro,te.isObjectLike=uo,te.isPlainObject=Id,te.isRegExp=Ay,te.isSafeInteger=nV,te.isSet=xE,te.isString=Fv,te.isSymbol=Pa,te.isTypedArray=Pu,te.isUndefined=oV,te.isWeakMap=aV,te.isWeakSet=rV,te.join=l5,te.kebabCase=YV,te.last=ar,te.lastIndexOf=u5,te.lowerCase=GV,te.lowerFirst=QV,te.lt=sV,te.lte=iV,te.max=W9,te.maxBy=H9,te.mean=q9,te.meanBy=K9,te.min=Y9,te.minBy=G9,te.stubArray=Fy,te.stubFalse=By,te.stubObject=M9,te.stubString=N9,te.stubTrue=R9,te.multiply=Q9,te.nth=c5,te.noConflict=k9,te.noop=Ly,te.now=Mv,te.pad=JV,te.padEnd=XV,te.padStart=ZV,te.parseInt=e9,te.random=UV,te.reduce=pB,te.reduceRight=vB,te.repeat=t9,te.replace=n9,te.result=PV,te.round=J9,te.runInContext=Ce,te.sample=mB,te.size=yB,te.snakeCase=o9,te.some=_B,te.sortedIndex=g5,te.sortedIndexBy=b5,te.sortedIndexOf=y5,te.sortedLastIndex=_5,te.sortedLastIndexBy=w5,te.sortedLastIndexOf=$5,te.startCase=r9,te.startsWith=s9,te.subtract=X9,te.sum=Z9,te.sumBy=e7,te.template=i9,te.times=L9,te.toFinite=Rs,te.toInteger=Jt,te.toLength=OE,te.toLower=l9,te.toNumber=rr,te.toSafeInteger=lV,te.toString=Tn,te.toUpper=u9,te.trim=c9,te.trimEnd=d9,te.trimStart=f9,te.truncate=p9,te.unescape=v9,te.uniqueId=B9,te.upperCase=h9,te.upperFirst=Py,te.each=gE,te.eachRight=bE,te.first=pE,Ry(te,function(){var u={};return rs(te,function(v,$){Dn.call(te.prototype,$)||(u[$]=v)}),u}(),{chain:!1}),te.VERSION=o,Za(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){te[u].placeholder=te}),Za(["drop","take"],function(u,v){ln.prototype[u]=function($){$=$===n?1:Ao(Jt($),0);var R=this.__filtered__&&!v?new ln(this):this.clone();return R.__filtered__?R.__takeCount__=qo($,R.__takeCount__):R.__views__.push({size:qo($,Z),type:u+(R.__dir__<0?"Right":"")}),R},ln.prototype[u+"Right"]=function($){return this.reverse()[u]($).reverse()}}),Za(["filter","map","takeWhile"],function(u,v){var $=v+1,R=$==X||$==W;ln.prototype[u]=function(K){var ae=this.clone();return ae.__iteratees__.push({iteratee:Rt(K,3),type:$}),ae.__filtered__=ae.__filtered__||R,ae}}),Za(["head","last"],function(u,v){var $="take"+(v?"Right":"");ln.prototype[u]=function(){return this[$](1).value()[0]}}),Za(["initial","tail"],function(u,v){var $="drop"+(v?"":"Right");ln.prototype[u]=function(){return this.__filtered__?new ln(this):this[$](1)}}),ln.prototype.compact=function(){return this.filter(ga)},ln.prototype.find=function(u){return this.filter(u).head()},ln.prototype.findLast=function(u){return this.reverse().find(u)},ln.prototype.invokeMap=tn(function(u,v){return typeof u=="function"?new ln(this):this.map(function($){return wd($,u,v)})}),ln.prototype.reject=function(u){return this.filter(Rv(Rt(u)))},ln.prototype.slice=function(u,v){u=Jt(u);var $=this;return $.__filtered__&&(u>0||v<0)?new ln($):(u<0?$=$.takeRight(-u):u&&($=$.drop(u)),v!==n&&(v=Jt(v),$=v<0?$.dropRight(-v):$.take(v-u)),$)},ln.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},ln.prototype.toArray=function(){return this.take(Z)},rs(ln.prototype,function(u,v){var $=/^(?:filter|find|map|reject)|While$/.test(v),R=/^(?:head|last)$/.test(v),K=te[R?"take"+(v=="last"?"Right":""):v],ae=R||/^find/.test(v);K&&(te.prototype[v]=function(){var pe=this.__wrapped__,me=R?[1]:arguments,Ee=pe instanceof ln,He=me[0],qe=Ee||qt(pe),Ge=function(rn){var cn=K.apply(te,pi([rn],me));return R&&vt?cn[0]:cn};qe&&$&&typeof He=="function"&&He.length!=1&&(Ee=qe=!1);var vt=this.__chain__,St=!!this.__actions__.length,Lt=ae&&!vt,Zt=Ee&&!St;if(!ae&&qe){pe=Zt?pe:new ln(this);var Ft=u.apply(pe,me);return Ft.__actions__.push({func:Dv,args:[Ge],thisArg:n}),new tr(Ft,vt)}return Lt&&Zt?u.apply(this,me):(Ft=this.thru(Ge),Lt?R?Ft.value()[0]:Ft.value():Ft)})}),Za(["pop","push","shift","sort","splice","unshift"],function(u){var v=av[u],$=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",R=/^(?:pop|shift)$/.test(u);te.prototype[u]=function(){var K=arguments;if(R&&!this.__chain__){var ae=this.value();return v.apply(qt(ae)?ae:[],K)}return this[$](function(pe){return v.apply(qt(pe)?pe:[],K)})}}),rs(ln.prototype,function(u,v){var $=te[v];if($){var R=$.name+"";Dn.call(Tu,R)||(Tu[R]=[]),Tu[R].push({name:v,func:$})}}),Tu[Ev(n,_).name]=[{name:"wrapper",func:n}],ln.prototype.clone=vL,ln.prototype.reverse=hL,ln.prototype.value=mL,te.prototype.at=H5,te.prototype.chain=q5,te.prototype.commit=K5,te.prototype.next=Y5,te.prototype.plant=Q5,te.prototype.reverse=J5,te.prototype.toJSON=te.prototype.valueOf=te.prototype.value=X5,te.prototype.first=te.prototype.head,vd&&(te.prototype[vd]=G5),te},Eu=KR();ml?((ml.exports=Eu)._=Eu,Nb._=Eu):Bo._=Eu}).call(io)})(Im,Im.exports);var Xl=Im.exports;const awe=["eduRadio","eduJudgement","eduImgRadio","eduSelect"],rwe=["eduCheckbox","eduImgCheckbox"],swe=e=>e.attrs.score??0,iwe=(e,t)=>{if(!t)return 0;if(t instanceof Array)switch(e.attrs.scoreType){case"single":return Xl.isEqual(Xl.sortBy(e.attrs.standard.map(a=>a.id)),Xl.sortBy(t.map(a=>a.id||a)))?e.attrs.score:0;case"cumulative":let n=0;for(const a of t){console.log("item: ",a);let r=e.attrs.standard.find(s=>s.id===((a==null?void 0:a.id)||a));if(r)n+=r.mark;else return 0}return n;case"multiple":let o=0;return t.map(a=>{let r=e.attrs.standard.find(s=>s.id===(a.id||a));r&&(o+=r.mark)}),o;default:return 0}else{switch(e.attrs.scoreType){case"single":return(t.id||t)===e.attrs.standard[0].id?e.attrs.score:0;case"multiple":let n=e.attrs.standard.find(o=>o.id===(t.id||t));return n?n.mark:0}return 0}},lwe=(e,t)=>{if(!t||typeof e.attrs.score!="number")return 0;const n=gu.find(o=>o.value===e.attrs.scoreType);return n?n.compare(t,e.attrs.standard)?e.attrs.score:0:(console.warn("getInputScore",`scoreType ${e.attrs.scoreType} not found`),0)},uwe=(e,t)=>{if(!t||typeof e.attrs.score!="number")return 0;const n=Mp.find(o=>o.value===e.attrs.scoreType);return n?n.compare(t,e.attrs.standard)?e.attrs.score:0:(console.warn("getNumberScore",`scoreType ${e.attrs.scoreType} not found`),0)},ti=e=>{if(e.attrs.standard=e.attrs.standard.filter(t=>(e.attrs.list||e.attrs.options).some(n=>n.value===t.id)),awe.includes(e.type))switch(e.attrs.scoreType){case"single":e.attrs.standard.length?e.attrs.score=e.attrs.standard[0].mark:e.attrs.score=0;return;case"multiple":let t=Xl.maxBy(e.attrs.standard,"mark");t&&(e.attrs.score=t==null?void 0:t.mark);return}if(rwe.includes(e.type))switch(e.attrs.scoreType){case"cumulative":e.attrs.score=Xl.reduce(e.attrs.standard,function(t,n){return t+n.mark},0),console.log("widget.attrs.score: ",e.attrs.score);return;case"single":e.attrs.standard.length||(e.attrs.score=0);return;case"multiple":e.attrs.score=Xl.reduce(e.attrs.standard,function(t,n){return t+n.mark},0);return}},p8=(e,t)=>{switch(e.type){case"eduRadio":case"eduCheckbox":case"eduJudgement":case"eduImgRadio":case"eduImgCheckbox":case"eduSelect":return iwe(e,t);case"fillBlank2":case"shortAnswer2":return lwe(e,t);case"numberFillBlank":return uwe(e,t);default:return 0}},kn=P(null),zg=M(()=>kn.value&&ZC().find(t=>t.id===kn.value)||null),cwe=M(()=>{const e=nt.value.findIndex(t=>t.id===kn.value);return e===-1?null:e}),o1=M(()=>{var e;return(e=zg.value)==null?void 0:e.type}),v8=M(()=>{var e;return(e=zg.value)==null?void 0:e.attrs}),dwe=M(()=>o1.value?JC[o1.value]:null),Vf=e=>{kn.value!==e&&(kn.value=e)},zf=async e=>{if(!e){console.warn("scrollToWidget","widgetId not found!");return}const t=document.querySelectorAll(`[data-widget-id="${e}"]`);if(!t.length){console.warn("scrollToWidget","elements not found!");return}t.forEach(n=>{n.scrollIntoView({behavior:"smooth",block:"start",inline:"start"})})},fwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.minLength=e,nt.value[t].attrs.hasOwnProperty("required")&&(e===0?nt.value[t].attrs.required&&(nt.value[t].attrs.required=!1):e&&e>0&&(nt.value[t].attrs.required||(nt.value[t].attrs.required=!0)))},pwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.maxLength=e},vwe=(e,t)=>{Io.value.attrs[e]=t},Xt=({id:e=kn.value,attr:t,value:n})=>{const o=nt.value.find(a=>a.id===e);if(!o){console.warn("widget not found!");return}o.attrs[t]===void 0&&console.warn("attr not found! add new attr: ",t),o.attrs[t]=n},a1=(e,t)=>{const n=nt.value.findIndex(o=>o.id===kn.value);if(n===-1){console.warn("widget not found!");return}nt.value[n].attrs[e]=t},hwe=(e,t)=>{const n=nt.value.findIndex(o=>o.id===kn.value);if(n===-1){console.warn("widget not found!");return}nt.value[n].attrs[e]=t},ou=(e,t)=>{const n=nt.value.findIndex(o=>o.id===e);if(n===-1){console.warn("widget not found!");return}nt.value[n].attrs.list=[...nt.value[n].attrs.list,...t]},B$=(e,t)=>{const n=nt.value.find(o=>o.id===e);if(!n){console.warn("widget not found!");return}n.attrs.list=n.attrs.list.filter(o=>o.value!==t),n.attrs.standard&&ti(n)},mwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.placeholder=e},V$=(e,t)=>{const n=nt.value.findIndex(a=>a.id===kn.value);if(n===-1)return;const o=nt.value[n].attrs.list.findIndex(a=>a.value===e);if(o===-1){console.warn("option not found!");return}nt.value[n].attrs.list[o].label=t},gwe=(e,t)=>{const n=nt.value.findIndex(a=>a.id===kn.value);if(n===-1)return;const o=nt.value[n].attrs.list.findIndex(a=>a.value===e);if(o===-1){console.warn("option not found!");return}nt.value[n].attrs.list[o].input=t},bwe=(e,t)=>{const n=nt.value.findIndex(a=>a.id===kn.value);if(n===-1)return;const o=nt.value[n].attrs.list.findIndex(a=>a.value===e);if(o===-1){console.warn("option not found!");return}nt.value[n].attrs.list[o].supplyInput=t},ywe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.min=e},_we=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.max=e},h8=(e,t=kn.value)=>{const n=nt.value.findIndex(o=>o.id===t);if(n===-1){console.warn("widget not found!");return}if(nt.value[n].attrs.required=e,nt.value[n].attrs.hasOwnProperty("minLength")){const o=nt.value[n].attrs.minLength;e?o||(nt.value[n].attrs.minLength=1):o&&(nt.value[n].attrs.minLength=0)}},wwe=e=>{nt.value.forEach(t=>{Object.hasOwnProperty.call(t.attrs,"required")&&h8(e,t.id)})},$we=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.optionRandom=e},Cwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);t!==-1&&(nt.value[t].attrs.rows=e)},Swe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);t!==-1&&(nt.value[t].attrs={...nt.value[t].attrs,...e})},Ewe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.multiplyAppoint=e},kwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.multiplyQuota=e},Iwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.multiplyAvail=e},Ep=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.viewVoteRate=e},Twe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.prefixStock=e},xwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.suffixStock=e},jf=se({__name:"index",props:{type:{}},setup(e){return(t,n)=>(C(),A("i",{class:B(`iconfont icon-form-${t.type}`)},null,2))}}),Awe={class:"confirm-basic-body"},Owe=["innerHTML"],Dwe=se({__name:"index",props:Yi({type:{default:"info"},isNew:{type:Boolean},title:{default:"提示"},content:{default:""},cancelText:{default:"取消"},confirmText:{default:"确认"},confirmColor:{default:"info"},confirmDisabled:{type:Boolean,default:!1},showCancel:{type:Boolean,default:!0},width:{default:460},transform:{default:"translateY(-50%)"}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:Yi(["confirm","cancel","closed"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,a=Gr(e,"modelValue"),r=M(()=>n.confirmColor==="error"?"#EA0000":n.confirmColor==="warn"?"#FFA940":"#2278FF"),s=()=>{o("confirm"),a.value=!1},i=()=>{o("cancel"),a.value=!1};return(l,d)=>(C(),ve(c(Ga),{class:"confirm-basic",style:Ze({transform:l.transform}),modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),width:l.width,"close-on-click-modal":!1,"close-on-press-escape":!1,"align-center":!0,"show-close":l.showCancel,onClosed:d[1]||(d[1]=f=>o("closed"))},{default:H(()=>[w("div",Awe,[w("div",{class:B({"confirm-title":!0,"confirm-title-new":l.isNew})},[l.type==="warn"?(C(),ve(jf,{key:0,type:"circle-notice",class:"warn-icon"})):G("",!0),l.type==="error"?(C(),ve(jf,{key:1,type:"triangle-notice",class:"error-icon"})):G("",!0),Fe(" "+ie(l.title),1)],2),l.content?(C(),A("div",{key:0,class:B({"confirm-content":!0,"confirm-content-new":l.isNew,error:l.type==="error"}),innerHTML:l.content},null,10,Owe)):G("",!0)])]),footer:H(()=>[l.$slots.footer?xe(l.$slots,"footer",{key:0},void 0,!0):(C(),A("div",{key:1,class:B({"confirm-basic-footer":!l.isNew,"confirm-basic-footer-new":l.isNew})},[l.showCancel?(C(),ve(c(Wt),{key:0,class:"button",plain:!0,onClick:i},{default:H(()=>[Fe(ie(l.cancelText),1)]),_:1})):G("",!0),O(c(Wt),{class:"button",type:"primary",disabled:l.confirmDisabled,color:r.value,onClick:s},{default:H(()=>[Fe(ie(l.confirmText),1)]),_:1},8,["disabled","color"])],2))]),_:3},8,["style","modelValue","width","show-close"]))}}),m8=Ye(Dwe,[["__scopeId","data-v-bef5583d"]]),ul=()=>({showConfirm:t=>{const n=document.createElement("div"),o=P(!0),a=i=>o.value=i,r=()=>{Ha(null,n),n.remove()},s=_t(Cs,{namespace:"bmwfr"},()=>_t(m8,{modelValue:o.value,"update:modelValue":a,onClosed:r,...t}));document.body.appendChild(n),Ha(s,n)}}),Pwe=e=>(At("data-v-4ebb80c3"),e=e(),Ot(),e),Mwe={class:"widget-action-bar"},Nwe={class:"lf-bar"},Rwe=["onClick"],Lwe={key:0,class:"icon"},Fwe={class:"label"},Bwe=Pwe(()=>w("div",{class:"label"},"答案与分值",-1)),Vwe=[Bwe],zwe={class:"rt-bar"},jwe={class:"checkbox-action"},Uwe=se({__name:"WidgetActionBar",props:{customs:{}},setup(e){const{showConfirm:t}=ul(),n=de("widgetStore"),o=M(()=>n.attrs.required!==void 0),a=M({get:()=>n.attrs.required?1:0,set:p=>{h8(!!p)}}),r=_t(Q_,{direction:"vertical"}),s=()=>{b9e(kn.value)},i=M(()=>n.type==="pagination"?n.index!==0:!0),l=()=>{R$.value>0?t({type:"error",content:"若此字段已经有用户提交了数据,删除字段将导致对应的数据被清除,并且无法恢复,是否确认删除?",confirmColor:"error",isNew:!0,onConfirm:()=>{twe(()=>w1(kn.value),100)}}):w1(kn.value)},d=M(()=>n.attrs.standard!==void 0),f=()=>{n.updateIsSettingAnswer(!0)};return(p,h)=>{const m=Bt("icon");return C(),A("div",Mwe,[w("div",Nwe,[O(c(gme),{size:0,spacer:c(r)},{default:H(()=>[(C(!0),A(Ae,null,et(p.customs,b=>(C(),A("div",{class:"item",key:b.key,onClick:g=>{var y;return(y=b.callback)==null?void 0:y.call(b)}},[b.icon?(C(),A("div",Lwe,[O(m,{type:b.icon},null,8,["type"])])):G("",!0),w("div",Fwe,ie(b.label),1)],8,Rwe))),128)),d.value?(C(),A("div",{key:0,class:"item",onClick:f},Vwe)):G("",!0)]),_:1},8,["spacer"])]),w("div",zwe,[o.value?(C(),A(Ae,{key:0},[w("div",jwe,[O(c(Xo),{modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=b=>a.value=b),label:"必填","true-value":1,"false-value":0},null,8,["modelValue"])]),O(c(Q_),{direction:"vertical"})],64)):G("",!0),O(c(_o),{placement:"top",content:"复制","hide-after":0},{default:H(()=>[w("div",{class:"icon-action",onClick:s},[O(m,{type:"copy"})])]),_:1}),i.value?(C(),ve(c(_o),{key:1,placement:"top",content:"删除","hide-after":0},{default:H(()=>[w("div",{class:"icon-action",onClick:l},[O(m,{type:"delete"})])]),_:1})):G("",!0)])])}}}),Wwe=Ye(Uwe,[["__scopeId","data-v-4ebb80c3"]]),jg=e=>(At("data-v-2f2117c8"),e=e(),Ot(),e),Hwe={class:"widget-answer-bar"},qwe={class:"row"},Kwe={class:"lf"},Ywe=jg(()=>w("span",{class:"txt"},"答案解析",-1)),Gwe={class:"rt"},Qwe={class:"dropdown-main"},Jwe=jg(()=>w("i",{class:"iconfont icon-form-down"},null,-1)),Xwe={key:0,class:"score-container"},Zwe=jg(()=>w("span",{class:"txt"},"分",-1)),e$e=jg(()=>w("div",{class:"line"},null,-1)),t$e={class:"btn"},Vx=1e4,zx=-1e4,n$e=se({__name:"WidgetAnswerBar",setup(e){const t=de("formStore"),n=de("widgetStore"),o=M(()=>!!n.errorAttrs.score),a=M({get:()=>n.attrs.score??null,set:g=>{typeof g!="number"?g=null:g>Vx?g=Vx:g<zx&&(g=zx),n.updateAttr("score",g)}}),r=P(),s=M({get:()=>n.attrs.showAnalysis??!1,set:g=>{var y;n.updateAttr("showAnalysis",g),g&&((y=r.value)==null||y.focus())}}),i=M({get:()=>n.attrs.analysis??"",set:g=>{n.updateAttr("analysis",g)}}),l=M(()=>l8(n.type)),d=M(()=>{var g;return n.attrs.scoreType??((g=l.value[0])==null?void 0:g.value)??""}),f=M(()=>{var g;return(g=l.value.find(y=>y.value===d.value))==null?void 0:g.label}),p=g=>{n.updateAttr("scoreType",g.value),g.callback&&g.callback(n)},h=()=>{n.updateErrorAttrs()},m=async()=>{n.updateErrorAttrs(),await ot();const g=Object.values(n.errorAttrs)[0];g?ht.error(g):n.updateIsSettingAnswer(!1)},b=()=>{document.dispatchEvent(new Event("form-render:batchset"))};return po(()=>{n.updateIsSettingAnswer(!1)}),(g,y)=>(C(),A("div",Hwe,[w("div",qwe,[w("div",Kwe,[O(c(Jl),{modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=_=>s.value=_),size:"small"},null,8,["modelValue"]),Ywe]),w("div",Gwe,[O(c(cM),{trigger:"click",placement:"bottom-end"},{dropdown:H(()=>[O(c(dM),null,{default:H(()=>[(C(!0),A(Ae,null,et(l.value,_=>(C(),ve(c(Yve),{key:_.value,onClick:I=>p(_)},{default:H(()=>[Fe(ie(_.label),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:H(()=>[w("div",Qwe,[w("span",null,ie(f.value),1),Jwe])]),_:1}),c(u8)(d.value)?G("",!0):(C(),A("div",Xwe,[O(c(Pt),{class:B(["score",{error:o.value}]),type:"number",modelValue:a.value,"onUpdate:modelValue":y[1]||(y[1]=_=>a.value=_),modelModifiers:{number:!0},placeholder:"10","input-style":{fontSize:"14px",height:"24px",color:"#1a1a1a",textAlign:"center"},onBlur:h},null,8,["class","modelValue"]),Zwe]))])]),Et(O(c(Pt),{ref_key:"analysisInput",ref:r,class:"analysis-input",type:"textarea",autosize:{minRows:2,maxRows:999},placeholder:"请输入答案解析",resize:"none",modelValue:i.value,"onUpdate:modelValue":y[2]||(y[2]=_=>i.value=_),"input-style":{padding:"10px"}},null,8,["modelValue"]),[[nn,s.value]]),c(t).isBatchSettingAnswer?G("",!0):(C(),A(Ae,{key:0},[e$e,w("div",t$e,[w("div",{class:"batch-btn",onClick:b}," 批量设置 "),O(c(Wt),{onClick:m},{default:H(()=>[Fe("完成")]),_:1})])],64))]))}}),o$e=Ye(n$e,[["__scopeId","data-v-2f2117c8"]]),ao=se({__name:"WidgetFooter",props:{customs:{}},setup(e){const t=de("formStore"),n=de("widgetStore");return(o,a)=>(C(),A(Ae,null,[c(n).isActive&&!c(n).isSettingAnswer?(C(),ve(Wwe,{key:0,customs:o.customs},null,8,["customs"])):G("",!0),c(n).isActive&&c(n).isSettingAnswer||c(t).isBatchSettingAnswer?(C(),ve(o$e,{key:1})):G("",!0)],64))}}),a$e=e=>(At("data-v-96ae038b"),e=e(),Ot(),e),r$e={key:0,class:"choosen-view"},s$e=a$e(()=>w("i",{class:"iconfont icon-form-dragging"},null,-1)),i$e=[s$e],l$e=se({__name:"ChoosenView",setup(e){const t=de("widgetStore");return(n,o)=>(C(),A(Ae,null,[c(t).isChoosen?(C(),A("div",r$e,i$e)):G("",!0),Et(w("div",null,[xe(n.$slots,"default",{},void 0,!0)],512),[[nn,!c(t).isChoosen]])],64))}}),lo=Ye(l$e,[["__scopeId","data-v-96ae038b"]]),u$e={key:0,class:"verify-tip"},c$e=se({__name:"VerifyTip",setup(e){const t=de("widgetStore");return(n,o)=>{var a;return(a=c(t).valueVer)!=null&&a.message?(C(),A("div",u$e,ie(c(t).valueVer.message),1)):G("",!0)}}}),To=Ye(c$e,[["__scopeId","data-v-9f8896a1"]]),d$e={class:"basic-input"},f$e=se({__name:"BasicInput",props:{attrs:{}},setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=M(()=>({nameInput:Np.info.icon,emailInput:Rp.info.icon,idCardInput:Lp.info.icon})[o.type]),r=de("formMode"),s=M(()=>({idCardInput:h=>h.replace(/[^0-9a-zA-Z]/g,"")})[o.type]),i=M(()=>{var p;return((p=o.valueVer)==null?void 0:p.status)===0||!!o.errorAttrs.standard&&o.isSettingAnswer}),l=M({get:()=>o.isSettingAnswer?o.attrs.standard:o.value,set:p=>{s.value&&(p=s.value(p)),o.isSettingAnswer?o.updateAttr("standard",p):o.updateValue(p)}}),d=M(()=>{var p;return o.isSettingAnswer?(p=gu.find(h=>h.value===o.attrs.scoreType))==null?void 0:p.placeholder:o.attrs.placeholder}),f=()=>{o.isSettingAnswer?o.updateErrorAttrs():o.updateValueVer()};return(p,h)=>(C(),A("div",d$e,[O(Kn),O(lo,null,{default:H(()=>[O(eo),O(c(Pt),{class:B(["input-box",{error:i.value,disabled:c(r)==="answer-preview"}]),modelValue:l.value,"onUpdate:modelValue":h[0]||(h[0]=m=>l.value=m),placeholder:d.value,disabled:c(t)&&!c(o).isSettingAnswer||c(o).attrs.disabled,style:Ze({marginTop:c(n)?"10px":"15px"}),"input-style":{color:"#1a1a1a",...c(n)?{fontSize:"16px",lineHeight:"24px",height:"54px"}:{fontSize:"14px",lineHeight:"20px",height:"40px"}},onBlur:f},Ia({_:2},[a.value?{name:"prefix",fn:H(()=>[w("i",{class:B(["iconfont",`icon-form-${a.value}`])},null,2)]),key:"0"}:void 0]),1032,["class","modelValue","placeholder","disabled","style","input-style"]),O(To),O(ao)]),_:1})]))}}),cl=Ye(f$e,[["__scopeId","data-v-401e9bcb"]]),p$e={class:"basic-input"},v$e=se({__name:"Textarea",props:{attrs:{}},setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=de("formMode"),r=M(()=>{var d;return((d=o.valueVer)==null?void 0:d.status)===0||!!o.errorAttrs.standard&&o.isSettingAnswer}),s=M({get:()=>o.isSettingAnswer?o.attrs.standard:o.value,set:d=>{if(o.isSettingAnswer){o.updateAttr("standard",d);return}o.updateValue(d)}}),i=M(()=>{var d;return o.isSettingAnswer?(d=gu.find(f=>f.value===o.attrs.scoreType))==null?void 0:d.placeholder:o.attrs.placeholder}),l=()=>{o.isSettingAnswer?o.updateErrorAttrs():o.updateValueVer()};return(d,f)=>(C(),A("div",p$e,[O(Kn),O(lo,null,{default:H(()=>[O(eo),O(c(Pt),{class:B(["input-box",{error:r.value,disabled:c(a)==="answer-preview"}]),modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=p=>s.value=p),type:"textarea",autosize:{minRows:2,maxRows:999},placeholder:i.value,disabled:c(t)&&!c(o).isSettingAnswer,resize:"none",style:Ze({marginTop:c(n)?"10px":"15px"}),"input-style":{color:"#1a1a1a",background:"#ffffff",...c(n)?{fontSize:"16px",lineHeight:"24px",padding:"15px 10px"}:{fontSize:"14px",lineHeight:"20px",padding:"10px 10px"}},onBlur:l},null,8,["class","modelValue","placeholder","disabled","style","input-style"]),O(To),O(ao)]),_:1})]))}}),g8=Ye(v$e,[["__scopeId","data-v-3ccb64df"]]),h$e={class:"number-input"},m$e=se({__name:"NumberInput",props:{attrs:{}},setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=de("formMode"),r=M(()=>({numberInput:"icon-form-number",numberFillBlank:"icon-form-number",phoneInput:"icon-form-phone"})[o.type]),s=M(()=>{var f;return((f=o.valueVer)==null?void 0:f.status)===0||!!o.errorAttrs.standard&&o.isSettingAnswer}),i=M({get:()=>o.isSettingAnswer?o.attrs.standard:o.value,set:f=>{if(typeof f!="number"&&(f=null),o.isSettingAnswer){o.updateAttr("standard",f);return}o.updateValue(f)}}),l=M(()=>{var f;return o.isSettingAnswer?(f=Mp.find(p=>p.value===o.attrs.scoreType))==null?void 0:f.placeholder:o.attrs.placeholder}),d=()=>{o.isSettingAnswer?o.updateErrorAttrs():o.updateValueVer()};return(f,p)=>(C(),A("div",h$e,[O(Kn),O(lo,null,{default:H(()=>[O(eo),O(c(Pt),{class:B(["input-box",{error:s.value,disabled:c(a)==="answer-preview"}]),type:"number",modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=h=>i.value=h),modelModifiers:{number:!0},placeholder:l.value,disabled:c(t)&&!c(o).isSettingAnswer||c(a)==="answer-preview",style:Ze({marginTop:c(n)?"10px":"15px"}),"input-style":{color:"#1a1a1a",...c(n)?{fontSize:"16px",lineHeight:"24px",height:"54px"}:{fontSize:"14px",lineHeight:"20px",height:"40px"}},onBlur:d},Ia({_:2},[r.value?{name:"prefix",fn:H(()=>[w("i",{class:B(["iconfont",r.value])},null,2)]),key:"0"}:void 0]),1032,["class","modelValue","placeholder","disabled","style","input-style"]),O(To),O(ao)]),_:1})]))}}),Ug=Ye(m$e,[["__scopeId","data-v-d45080cf"]]),kp=e=>(At("data-v-ce4334cc"),e=e(),Ot(),e),g$e={class:"input-container"},b$e={class:"flex-col"},y$e=kp(()=>w("p",{class:"text-tip"},"输入项目的详情描述,以便填表人更快的理解项目",-1)),_$e={class:"w-154 h-20"},w$e={class:"flex-col"},$$e=kp(()=>w("p",{class:"text-tip"},"建议尺寸为640像素*640像素,大小不超过5MB",-1)),C$e={class:"flex items-center gap-4"},S$e={key:0,class:"img-container"},E$e=["src"],k$e=kp(()=>w("div",{class:"edit-btn"},"编辑",-1)),I$e=["onClick"],T$e=kp(()=>w("i",{class:"el-icon-close"},null,-1)),x$e=[T$e],A$e={key:1,class:"customer-qrcode-uploader"},O$e=kp(()=>w("i",{class:"el-icon-plus"},null,-1)),D$e=[O$e],P$e="https://upload-cn-east-2.qiniup.com",M$e=se({__name:"basicInfo",props:{basicInfo:{}},emits:["editBasicInfo","loading","loadover"],setup(e,{emit:t}){const n=t,o=P([]),a=P(),r=e,s=P({...r.basicInfo});P(0);const i=P({key:"",token:""}),l=async(_,I)=>{try{return n("loading"),o.value[I]=!0,await d(_),!0}catch{return!1}},d=async _=>{const I=parseInt(Date.now()/1e3).toString(),k=f(),T=p()+I+"_"+k+"_"+_.name,x=exports.globalInject.getToken(),S=await exports.globalInject.$axios.get(`/v1/getQiniuToken?eacb=${x}`);i.value={key:T,token:S.data.result.token}},f=()=>{let _="";for(let I=0;I<6;I++){const k=parseInt(Math.random()*10);_+=k}return _},p=()=>"mqrcode/"+exports.globalInject.getUserInfo().uid+"/",h=(_,I)=>{if(I.length=1,I[0]=_,_.status==="ready"){const k=_;k.url=URL.createObjectURL(_.raw)}},m=(_,I,k,E)=>{if(console.debug(I,k,"ssssaa"),!_)return;const T=encodeURI(_.key);k.indexOf(I),I.uid,s.value.img[E]?s.value.img[E]="https://hs1.bmwas.cn/"+T:s.value.img.length==0?s.value.img[0]="https://hs1.bmwas.cn/"+T:(s.value.img[s.value.img.length-1]="https://hs1.bmwas.cn/"+T,s.value.img.push("")),o.value[E]=!1,console.debug({...r.basicInfo,img:s.value.img},"ssss"),n("editBasicInfo",{...r.basicInfo,img:s.value.img}),n("loadover")},b=_=>{_&&n("editBasicInfo",{...r.basicInfo,name:_})},g=_=>{n("editBasicInfo",{...r.basicInfo,desc:_})},y=_=>{s.value.img.splice(_,1)};return(_,I)=>{const k=rl("loading");return C(),ve(c(KD),{"label-position":"top",class:"basic-info"},{default:H(()=>[O(c(js),{label:"项目名称"},{default:H(()=>[w("div",g$e,[O(c(Pt),{class:"name-input",onInput:b,maxlength:"20",modelValue:s.value.name,"onUpdate:modelValue":I[0]||(I[0]=E=>s.value.name=E)},null,8,["modelValue"])])]),_:1}),O(c(js),{label:"项目描述"},{default:H(()=>[w("div",b$e,[y$e,w("div",_$e,[O(c(Pt),{placeholder:"请输入",class:"editable-desc",type:"textarea",resize:"none","input-style":{padding:"10px",fontSize:"14px",scrollbarWidth:"none"},onInput:g,modelValue:s.value.desc,"onUpdate:modelValue":I[1]||(I[1]=E=>s.value.desc=E)},null,8,["modelValue"])])])]),_:1}),O(c(js),{label:"项目图片(仅显示已上传的第一张图片)"},{default:H(()=>[w("div",w$e,[$$e,w("div",C$e,[(C(!0),A(Ae,null,et(s.value.img,(E,T)=>(C(),ve(c(Gc),{key:T,class:B({"has-image":!!E}),ref_for:!0,ref_key:"upload",ref:a,action:P$e,"list-type":"picture-card",data:i.value,"show-file-list":!1,accept:"image/png, image/jpeg","on-success":(x,S,D)=>m(x,S,D,T),"on-change":h,"before-upload":x=>l(x,T)},{default:H(()=>[E?(C(),A("div",S$e,[w("img",{src:E,class:"uploader-img"},null,8,E$e),k$e,w("div",{onClick:mt(x=>y(T),["stop"]),class:"close-icon-container"},x$e,8,I$e),w("div",{onClick:I[2]||(I[2]=mt(()=>{},["stop"])),class:"mask"})])):Et((C(),A("div",A$e,D$e)),[[k,o.value[T]]])]),_:2},1032,["class","data","on-success","before-upload"]))),128))])])]),_:1})]),_:1})}}}),N$e=Ye(M$e,[["__scopeId","data-v-ce4334cc"]]),Zc=e=>(At("data-v-59d80126"),e=e(),Ot(),e),R$e={class:"dialog-body"},L$e=Zc(()=>w("div",null,"每日起止时间",-1)),F$e=Zc(()=>w("div",{class:"dialog-body-text"},[w("span",{class:"span-text"},"每时段持续时间"),w("span",{class:"span-text"},"每时段间隔时间"),w("span",{class:"span-text"},"每时段名额")],-1)),B$e={class:"dialog-body-input"},V$e={class:"input-row"},z$e={class:"input-container"},j$e=Zc(()=>w("span",{class:"span-text"},"分钟",-1)),U$e={class:"input-row"},W$e={class:"input-container"},H$e=Zc(()=>w("span",{class:"span-text"},"分钟",-1)),q$e={class:"input-container"},K$e={key:0,class:"flex items-center",style:{gap:"8px","margin-top":"8px","margin-bottom":"16px"}},Y$e=Zc(()=>w("div",null,"单价(CNY)",-1)),G$e={style:{width:"100px"}},Q$e=Zc(()=>w("span",null,"¥",-1)),J$e={key:0,class:"footer-text"},X$e={key:1,class:"footer-text"},Z$e={slot:"footer",class:"dialog-footer"},eCe=se({__name:"quickAddModal",props:{visible:{type:Boolean},isPaid:{type:Boolean}},emits:["close","quickAdd"],setup(e,{emit:t}){const n=e,o=t,a=P(),r=P({range:[],lastingTime:null,gapTime:0,quota:null,price:null,isPaid:n.isPaid}),s=m=>{const b=new Date(m[0]),g=new Date(m[1]);r.value.range=[b.getTime(),g.getTime()]},i=M({get:()=>r.value.price/100,set:m=>d(m)}),l=()=>{console.debug(i.value,"dis"),r.value.price=parseFloat(i.value)*100},d=m=>{m=m.slice(0,8);let b=parseFloat(m).toFixed(2);r.value.price=parseFloat(b)*100},f=()=>{if(r.value.lastingTime!=null){const m=r.value.range,b=m[1]-m[0],g=parseInt(r.value.lastingTime)+parseInt(r.value.gapTime);let y=Math.floor(b/6e4/g);return b-y*g*60*1e3>r.value.lastingTime&&y++,y}else return 1},p=m=>{m.length>8&&(m=m.slice(0,8)),m===""||!/^[1-9]\d{0,7}$/.test(m)?r.value.quota=parseInt(r.value.quota):r.value.quota=parseInt(m)},h=()=>{if(r.value.range.length==0){ht({message:"时段是必填的",type:"error"});return}r.value.lastingTime==0&&(r.value.lastingTime=null),r.value.gapTime||(r.value.gapTime=0),r.value.quota||(r.value.quota=-1),r.value.price||(r.value.price=0),o("quickAdd",r.value),o("close")};return(m,b)=>(C(),A("div",null,[O(c(Ga),{"model-value":m.visible,title:"快捷添加",width:"400px",onClose:b[7]||(b[7]=g=>m.$emit("close"))},{default:H(()=>[w("div",R$e,[L$e,O(c(Pg),{modelValue:a.value,"onUpdate:modelValue":b[0]||(b[0]=g=>a.value=g),onChange:s,format:"HH:mm","is-range":""},null,8,["modelValue"]),F$e,w("div",B$e,[w("div",V$e,[w("div",z$e,[O(c(Pt),{modelValue:r.value.lastingTime,"onUpdate:modelValue":b[1]||(b[1]=g=>r.value.lastingTime=g),placeholder:"请输入"},null,8,["modelValue"])]),j$e]),w("div",U$e,[w("div",W$e,[O(c(Pt),{modelValue:r.value.gapTime,"onUpdate:modelValue":b[2]||(b[2]=g=>r.value.gapTime=g),placeholder:"请输入"},null,8,["modelValue"])]),H$e]),w("div",null,[w("div",q$e,[O(c(Pt),{type:"number",maxlength:"8",onInput:p,modelValue:r.value.quota,"onUpdate:modelValue":b[3]||(b[3]=g=>r.value.quota=g),placeholder:"充足"},null,8,["modelValue"])])])]),w("div",null,[r.value.isPaid?(C(),A("div",K$e,[Y$e,w("div",G$e,[O(c(Pt),{style:{width:"100px",height:"32px"},type:"number",step:"0.01",modelValue:i.value,"onUpdate:modelValue":b[4]||(b[4]=g=>i.value=g),onBlur:l,onInput:b[5]||(b[5]=g=>d(g))},{prefix:H(()=>[Q$e]),_:1},8,["modelValue"])])])):G("",!0)]),a.value?(C(),A("div",J$e," 添加后会自动生成 "+ie(f())+" 个时段,生成后可以调整。 ",1)):(C(),A("div",X$e," 配置后会自动生成时段,生成后可以调整 "))]),w("div",Z$e,[O(c(Wt),{onClick:b[6]||(b[6]=g=>m.$emit("close")),class:"button"},{default:H(()=>[Fe("取消")]),_:1}),O(c(Wt),{class:"button",type:"primary",onClick:h},{default:H(()=>[Fe("保存")]),_:1})])]),_:1},8,["model-value"])]))}}),tCe=Ye(eCe,[["__scopeId","data-v-59d80126"]]),pu=e=>(At("data-v-496e6bb2"),e=e(),Ot(),e),nCe={class:"dialog-body"},oCe=pu(()=>w("div",{class:"text-normal-c3d"},"时段表名称",-1)),aCe=pu(()=>w("div",{class:"text-normal-c3d mt-2"},"每日起止时间",-1)),rCe={class:"time-picker"},sCe=pu(()=>w("div",{class:"dialog-body-text mt-2"},[w("span",{class:"span-text"},"每时段持续时间"),w("span",{class:"span-text"},"每时段间隔时间"),w("span",{class:"span-text"},"每时段名额")],-1)),iCe={class:"dialog-body-input"},lCe={class:"input-row"},uCe={class:"input-container"},cCe=pu(()=>w("span",{class:"span-text"},"分钟",-1)),dCe={class:"input-row"},fCe={class:"input-container"},pCe=pu(()=>w("span",{class:"span-text"},"分钟",-1)),vCe={class:"input-container"},hCe={key:0,class:"flex items-center",style:{gap:"8px"}},mCe=pu(()=>w("div",null,"单价(CNY)",-1)),gCe={style:{width:"100px"}},bCe=pu(()=>w("span",null,"¥",-1)),yCe={key:0,class:"footer-text mt-5"},_Ce={key:1,class:"footer-text mt-5"},wCe={slot:"footer",class:"dialog-footer"},$Ce=se({__name:"addDateForm",props:{visible:{type:Boolean}},emits:["close","addForm"],setup(e,{emit:t}){const n=t,o=P({name:"",everyDayRange:[],lastingTime:null,gapTime:0,quota:null,price:null,isPaid:!1}),a=P(),r=m=>{const b=new Date(m[0]),g=new Date(m[1]);o.value.everyDayRange=[b.getTime(),g.getTime()]},s=M({get:()=>o.value.price/100,set:m=>l(m)}),i=()=>{console.debug(s,"dis"),o.value.price=parseFloat(s.value)*100},l=m=>{m=m.slice(0,8);let b=parseFloat(m).toFixed(2);o.value.price=parseFloat(b)*100},d=()=>{if(o.value.lastingTime){const m=o.value.everyDayRange,b=m[1]-m[0],g=parseInt(o.value.lastingTime)+parseInt(o.value.gapTime);let y=Math.floor(b/6e4/g);return b-y*g*60*1e3>o.value.lastingTime&&y++,y}else return 1},f=m=>{exports.globalInject.getVipInfo().level<54&&m?(ht.warning("付费预约功能为企业版会员专享功能,升级到企业版会员即可使用"),exports.globalInject.showBuyVipDialog({level:54}),o.value.isPaid=!1):o.value.isPaid=m},p=m=>{m.length>8&&(m=m.slice(0,8)),m===""||!/^[1-9]\d{0,7}$/.test(m)?o.value.quota=parseInt(o.value.quota):o.value.quota=parseInt(m)},h=()=>{if(!o.value.lastingTime){const m=o.value.everyDayRange[0],b=o.value.everyDayRange[1];o.value.lastingTime=(b-m)/1e3/60}if(!o.value.name){ht({message:"时段表名称是必填的",type:"error"});return}if(o.value.everyDayRange.length==0){ht({message:"时段是必填的",type:"error"});return}o.value.lastingTime==0&&(o.value.lastingTime=null),o.value.gapTime||(o.value.gapTime=0),o.value.quota||(o.value.quota=-1),o.value.price||(o.value.price=0),n("addForm",o.value),n("close"),o.value={name:"",everyDayRange:[],lastingTime:null,gapTime:0,quota:null,isPaid:!1}};return(m,b)=>(C(),A("div",null,[O(c(Ga),{"model-value":m.visible,title:"添加时段表",width:"400px",onClose:b[9]||(b[9]=g=>m.$emit("close"))},{default:H(()=>[w("div",nCe,[oCe,O(c(Pt),{class:"input",modelValue:o.value.name,"onUpdate:modelValue":b[0]||(b[0]=g=>o.value.name=g),placeholder:"请输入"},null,8,["modelValue"]),aCe,w("div",rCe,[O(c(Pg),{modelValue:a.value,"onUpdate:modelValue":b[1]||(b[1]=g=>a.value=g),onChange:r,format:"HH:mm","is-range":""},null,8,["modelValue"])]),sCe,w("div",iCe,[w("div",lCe,[w("div",uCe,[O(c(Pt),{modelValue:o.value.lastingTime,"onUpdate:modelValue":b[2]||(b[2]=g=>o.value.lastingTime=g),placeholder:"请输入",type:"number"},null,8,["modelValue"])]),cCe]),w("div",dCe,[w("div",fCe,[O(c(Pt),{modelValue:o.value.gapTime,"onUpdate:modelValue":b[3]||(b[3]=g=>o.value.gapTime=g),placeholder:"请输入",type:"number"},null,8,["modelValue"])]),pCe]),w("div",null,[w("div",vCe,[O(c(Pt),{type:"number",modelValue:o.value.quota,"onUpdate:modelValue":b[4]||(b[4]=g=>o.value.quota=g),onInput:p,placeholder:"充足"},null,8,["modelValue"])])])]),w("div",null,[O(c(Xo),{modelValue:o.value.isPaid,"onUpdate:modelValue":b[5]||(b[5]=g=>o.value.isPaid=g),label:"付费预约",onChange:f},null,8,["modelValue"]),o.value.isPaid?(C(),A("div",hCe,[mCe,w("div",gCe,[O(c(Pt),{style:{width:"100px"},type:"number",step:"0.01",modelValue:s.value,"onUpdate:modelValue":b[6]||(b[6]=g=>s.value=g),onBlur:i,onInput:b[7]||(b[7]=g=>l(g))},{prefix:H(()=>[bCe]),_:1},8,["modelValue"])])])):G("",!0)]),a.value?(C(),A("div",yCe," 添加后会自动生成 "+ie(d())+" 个时段,生成后可以调整。 ",1)):(C(),A("div",_Ce," 配置后会自动生成时段,生成后可以调整 "))]),w("div",wCe,[O(c(Wt),{onClick:b[8]||(b[8]=g=>m.$emit("close")),class:"button"},{default:H(()=>[Fe("取消")]),_:1}),O(c(Wt),{onClick:h,class:"button",type:"primary"},{default:H(()=>[Fe("保存")]),_:1})])]),_:1},8,["model-value"])]))}}),CCe=Ye($Ce,[["__scopeId","data-v-496e6bb2"]]),SCe=e=>(At("data-v-5d254a13"),e=e(),Ot(),e),ECe={class:"dialog-body"},kCe=SCe(()=>w("div",null,"时段表名称",-1)),ICe={slot:"footer",class:"dialog-footer"},TCe=se({__name:"editDateForm",props:{visible:{type:Boolean},name:{}},emits:["close","editName"],setup(e,{emit:t}){const n=e;Se(()=>n,i=>{o.value=i.name},{deep:!0});const o=P(n.name),a=t,r=()=>{a("close")},s=()=>{a("editName",o.value),a("close")};return(i,l)=>(C(),A("div",null,[O(c(Ga),{"model-value":i.visible,title:"编辑时段表名称",width:"400px",onClose:l[1]||(l[1]=d=>i.$emit("close"))},{default:H(()=>[w("div",ECe,[kCe,O(c(Pt),{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=d=>o.value=d)},null,8,["modelValue"])]),w("div",ICe,[O(c(Wt),{onClick:r,class:"button"},{default:H(()=>[Fe("取消")]),_:1}),O(c(Wt),{onClick:s,class:"button",type:"primary"},{default:H(()=>[Fe("保存")]),_:1})])]),_:1},8,["model-value"])]))}}),xCe=Ye(TCe,[["__scopeId","data-v-5d254a13"]]),dl=e=>(At("data-v-0e5ae47d"),e=e(),Ot(),e),ACe={class:"select-container"},OCe={class:"flex flex-row items-center",style:{gap:"8px"}},DCe={key:0,class:"select-label-paid"},PCe=["src"],MCe=dl(()=>w("span",null,"付费预约",-1)),NCe={class:"option-list"},RCe={class:"options"},LCe={class:"options-content"},FCe={class:"flex gap-1.5 items-center"},BCe={class:"title-text"},VCe={key:0,class:"select-label-paid"},zCe=["src"],jCe=dl(()=>w("span",null,"付费预约",-1)),UCe={class:"buttons-group"},WCe=["onClick"],HCe=["onClick"],qCe={class:"footer-text"},KCe={class:"footer-text"},YCe=["src"],GCe={class:"date-container"},QCe={class:"container"},JCe=dl(()=>w("div",null,"付费预约",-1)),XCe={class:"title-row"},ZCe=dl(()=>w("span",{class:"grey-text",style:{"margin-right":"170px"}},"时段",-1)),eSe=dl(()=>w("span",{class:"grey-text"},"名额",-1)),tSe={key:0,class:"grey-text",style:{"margin-left":"52px"}},nSe={class:"time-picker"},oSe={key:0,class:"input-number-price"},aSe=dl(()=>w("span",null,"¥",-1)),rSe=["onClick"],sSe=dl(()=>w("i",{class:"el-icon-close"},null,-1)),iSe=[sSe],lSe={class:"buttons-group"},uSe=["src"],cSe=dl(()=>w("span",{class:"quick-add-text"},"快捷添加",-1)),dSe={key:0,class:"time-detail-info"},fSe=se({__name:"dateSelect",props:{formId:{},formList:{},appointment:{},widget_id:{},selectedIndex:{},days:{}},emits:["editFormId","getFormList","editAvailableTime"],setup(e,{emit:t}){const n=t,o=new Date,a=["星期一","星期二","星期三","星期四","星期五","星期六","星期日"],r=P({year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()}),s=e,i=P(),l=P(),d=P(s.formId),f=P(!1),p=P(),h=P(s.formList.find(ue=>ue.id==s.formId)),m=P([]),b=P(!1),g=P(!1),y=P([]),_=P([]),I=P(!1),k=_n(s.formList.find(ue=>ue.id==s.formId).isPaid),E=ue=>s.formList.find(J=>J.id==ue.value).isPaid,T=M({get:()=>h.value.dailyTimeRangeQuotas.map(ue=>ue.price/100),set:ue=>{ue.forEach((J,oe)=>{S(J,h.value.dailyTimeRangeQuotas[oe])})}}),x=(ue,J)=>{ue.price=parseFloat(T.value[J])*100,console.debug(ue.price,"a")},S=(ue,J)=>{ue=ue.slice(0,8);let oe=parseFloat(ue).toFixed(2);J.price=parseFloat(oe)*100},D=()=>{let ue=[];h.value.dailyTimeRangeQuotas.map(J=>{ue.push(X(J))}),m.value=ue};st(()=>{N()});const N=()=>{let ue=[];s.days.map(J=>{ue.indexOf(J.formId)==-1&&ue.push(J.formId)}),y.value=ue},L=ue=>{console.debug(ue,"value11");const J=exports.globalInject.getVipInfo(),oe=s.formList.find(_e=>_e.id==s.formId);if(J.level<54&&ue){ht.warning("付费预约功能为企业版会员专享功能,升级到企业版会员即可使用"),exports.globalInject.showBuyVipDialog({level:54}),k.value=!1,oe.isPaid=!1;return}k.value=ue,oe.isPaid=ue,console.debug(oe,"form"),n("editAvailableTime",s.formList),console.debug(s.formList,"formList")};Se(d,ue=>{h.value=U(ue),D(),k.value=h.value.isPaid}),Se(()=>s.selectedIndex,()=>{I.value=!0,setTimeout(()=>{I.value=!1},300)},{deep:!0}),Se(()=>s,()=>{d.value=s.formId,D(),Y(),N()},{deep:!0});const F=ue=>{d.value=ue,n("editFormId",d.value)},z=(ue,J)=>(ue.stopPropagation(),p.value.blur(),new Promise(oe=>{const{showConfirm:_e}=ul();_e({type:"warn",content:`你确定要删除 ${J.label} ?删除后,应用该时段表的日期将不能再正常预约,请谨慎操作。`,confirmColor:"info",title:"删除时段表",isNew:!0,onConfirm:()=>{n("editAvailableTime",s.formList.filter(ge=>ge.id!=J.value))}})})),j=ue=>{const J=s.formList.find(oe=>oe.name==i.value);J.name=ue,n("editAvailableTime",s.formList)},X=ue=>[new Date(r.value.year,r.value.month,r.value.day,ue.startTime.hour,ue.startTime.minute),new Date(r.value.year,r.value.month,r.value.day,ue.endTime.hour,ue.endTime.minute)];st(()=>{D(),Y()});const U=ue=>s.formList.find(J=>J.id===ue),W=(ue,J)=>{q(),h.value.dailyTimeRangeQuotas[J]={...h.value.dailyTimeRangeQuotas[J],startTime:{hour:ue[0].getHours(),minute:ue[0].getMinutes()},endTime:{hour:ue[1].getHours(),minute:ue[1].getMinutes()}}},Q=(ue,J)=>{J.length>8&&(J=J.slice(0,8)),J===""||!/^[1-9]\d{0,7}$/.test(J)?ue.quota=parseInt(ue.quota):ue.quota=parseInt(J),q()},q=()=>{_.value.indexOf(h.value.id)==-1&&_.value.push(h.value.id)},V=ue=>{let J=[];return s.days.map((oe,_e)=>{oe.formId==ue&&J.push(a[_e])}),J.map(oe=>oe).join(",")},Y=()=>{let ue=s.formList.map(J=>({value:J.id,label:J.name,isPaid:J.isPaid}));l.value=ue},Z=(ue,J,oe,_e,ge)=>{let ee=[];const ne=ue[0],fe=ue[1];let ke=ne;if(J==null)ee.push({startTime:{hour:new Date(ne).getHours().toString().padStart(2,"0"),minute:new Date(ne).getMinutes().toString().padStart(2,"0")},endTime:{hour:new Date(fe).getHours().toString().padStart(2,"0"),minute:new Date(fe).getMinutes().toString().padStart(2,"0")},quota:_e,price:ge});else for(;ke<fe;){const $e=new Date(ke+J*6e4);if($e>fe)break;ee.push({startTime:{hour:new Date(ke).getHours().toString().padStart(2,"0"),minute:new Date(ke).getMinutes().toString().padStart(2,"0")},endTime:{hour:$e.getHours().toString().padStart(2,"0"),minute:$e.getMinutes().toString().padStart(2,"0")},quota:_e,price:ge}),ke=$e.getTime()+oe*6e4}return ee},ce=ue=>{const{name:J,everyDayRange:oe,lastingTime:_e,gapTime:ge,quota:Me,price:ee,isPaid:ne}=ue,fe={name:J,id:s.formList.length,lasting_time:_e,gap_time:ge,quota:Me,price:ee,isPaid:ne,dailyTimeRangeQuotas:Z(oe,_e,ge,Me,ee)};n("editAvailableTime",[...s.formList,fe])},re=ue=>{const{range:J,lastingTime:oe,gapTime:_e,quota:ge,price:Me,isPaid:ee}=ue,ne=Z(J,oe,_e,ge,Me);L(ee);const fe=h.value.dailyTimeRangeQuotas.concat(ne);h.value.dailyTimeRangeQuotas=fe},ye=()=>{const ue=h.value.dailyTimeRangeQuotas[h.value.dailyTimeRangeQuotas.length-1],J=Math.floor(parseInt(ue.endTime.hour)+h.value.gap_time/60),oe=Math.floor(parseInt(ue.endTime.minute)+h.value.gap_time%60);h.value.dailyTimeRangeQuotas.push({startTime:{hour:J,minute:oe},endTime:{hour:Math.floor(J+h.value.lasting_time/60),minute:Math.floor(oe+h.value.lasting_time%60)},quota:h.value.quota,price:h.value.price}),q()},he=ue=>{q(),h.value.dailyTimeRangeQuotas.splice(ue,1)},le=ue=>{const J=ue.dailyTimeRangeQuotas,oe=J[0].startTime.hour.toString().padStart(2,"0")+":"+J[0].startTime.minute.toString().padStart(2,"0"),_e=J[J.length-1].endTime.hour.toString().padStart(2,"0")+":"+J[J.length-1].endTime.minute.toString().padStart(2,"0");return`${oe} - ${_e},${J.length}个时段`};return(ue,J)=>(C(),A("div",{class:B({"date-select-container":!0,"date-select-preview":I.value})},[w("div",ACe,[O(c(Hs),{class:"select",modelValue:d.value,"onUpdate:modelValue":J[1]||(J[1]=oe=>d.value=oe),ref_key:"elSelectRef",ref:p,onChange:F},{label:H(({label:oe,value:_e})=>[w("div",OCe,[w("span",null,ie(oe),1),k.value?(C(),A("div",DCe,[w("img",{style:{width:"14px",height:"14px"},src:c(Ke)("images/widget/paid-appoint-icon.png")},null,8,PCe),MCe])):G("",!0)])]),default:H(()=>[w("div",NCe,[(C(!0),A(Ae,null,et(l.value,oe=>(C(),ve(c(qs),{key:oe.value,label:oe.label,value:oe.value,class:B({"option-container":!0,"option-selected":d.value==oe.value})},{default:H(()=>[w("div",RCe,[w("div",LCe,[w("div",FCe,[w("span",BCe,ie(oe.label),1),E(oe)?(C(),A("div",VCe,[w("img",{style:{width:"14px",height:"14px"},src:c(Ke)("images/widget/paid-appoint-icon.png")},null,8,zCe),jCe])):G("",!0)]),w("div",UCe,[w("div",{onClick:_e=>{_e.stopPropagation(),p.value.blur(),g.value=!0,i.value=oe.label},class:"edit-text"}," 重命名 ",8,WCe),y.value.indexOf(oe.value)==-1?(C(),A("div",{key:0,onClick:_e=>z(_e,oe),class:"delete-text"}," 删除 ",8,HCe)):G("",!0)])]),w("span",qCe,"已应用到:"+ie(V(oe.value)),1),w("span",KCe,"时段设置:"+ie(le(ue.formList.find(_e=>_e.id==oe.value))),1)]),d.value==oe.value?(C(),A("img",{key:0,class:"selected-img",src:c(Ke)("images/widget/appoint-timeFormSelected.png")},null,8,YCe)):G("",!0)]),_:2},1032,["label","value","class"]))),128)),w("div",{onClick:J[0]||(J[0]=()=>{b.value=!0,p.value.blur()}),class:"option-button"}," + 添加时段表 ")])]),_:1},8,["modelValue"])]),w("div",GCe,[w("div",QCe,[w("div",{class:"pay-appoint",style:Ze(k.value?"background: rgba(34,120,255,0.1);":"background: #F0F0F0;")},[O(c(Jl),{"active-color":"#2278FF","inactive-color":"#EEEEEE",onChange:L,modelValue:k.value,"onUpdate:modelValue":J[2]||(J[2]=oe=>k.value=oe)},null,8,["modelValue"]),JCe],4),w("div",XCe,[ZCe,eSe,k.value?(C(),A("span",tSe,"单价(CNY)")):G("",!0)]),(C(!0),A(Ae,null,et(h.value.dailyTimeRangeQuotas,(oe,_e)=>(C(),A("div",{class:"picker-row",key:_e},[w("div",nSe,[O(c(Pg),{"is-range":"","range-separator":"-",modelValue:m.value[_e],"onUpdate:modelValue":ge=>m.value[_e]=ge,format:"HH:mm",clearable:!1,onChange:ge=>W(ge,_e)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),w("div",{class:"h-8",style:Ze(k.value?"width:72px":"width:140px")},[O(c(Pt),{type:"number",modelValue:oe.quota,"onUpdate:modelValue":ge=>oe.quota=ge,modelModifiers:{number:!0},min:0,max:99999999,formatter:ge=>ge==-1?null:ge,onInput:ge=>Q(oe,ge)},null,8,["modelValue","onUpdate:modelValue","formatter","onInput"])],4),k.value?(C(),A("div",oSe,[O(c(Pt),{type:"number",step:"0.01",modelValue:T.value[_e],"onUpdate:modelValue":ge=>T.value[_e]=ge,onBlur:ge=>x(oe,_e),onInput:ge=>S(ge,oe)},{prefix:H(()=>[aSe]),_:2},1032,["modelValue","onUpdate:modelValue","onBlur","onInput"])])):G("",!0),h.value.dailyTimeRangeQuotas.length>1?(C(),A("div",{key:1,class:"close-icon",onClick:ge=>he(_e)},iSe,8,rSe)):G("",!0)]))),128)),w("div",lSe,[w("div",{onClick:ye,class:"add-date-button"}," + 添加时段 "),w("div",{class:"quick-add-button",onClick:J[3]||(J[3]=oe=>f.value=!0)},[w("img",{class:"quick-add-img",src:c(Ke)("images/widget/appoint-quickAdd.png")},null,8,uSe),cSe])]),_.value.indexOf(h.value.id)!=-1?(C(),A("div",dSe," 已经修改了"+ie(h.value.name)+",会影响引用该时段表的日期:"+ie(V(h.value.id)),1)):G("",!0)]),f.value?(C(),ve(tCe,{key:0,isPaid:k.value,onQuickAdd:re,onClose:J[4]||(J[4]=oe=>f.value=!1),visible:f.value},null,8,["isPaid","visible"])):G("",!0),b.value?(C(),ve(CCe,{key:1,onAddForm:ce,onClose:J[5]||(J[5]=oe=>b.value=!1),visible:b.value},null,8,["visible"])):G("",!0),g.value?(C(),ve(xCe,{key:2,onClose:J[6]||(J[6]=oe=>g.value=!1),visible:g.value,onEditName:j,name:i.value},null,8,["visible","name"])):G("",!0)])],2))}}),pSe=Ye(fSe,[["__scopeId","data-v-0e5ae47d"]]),vu=e=>(At("data-v-c2ce3419"),e=e(),Ot(),e),vSe={class:"container"},hSe={key:0,class:"flex flex-row gap-4"},mSe={class:"dateSelect-left"},gSe=vu(()=>w("span",{class:"top-text"},"设置每周可约时间",-1)),bSe=vu(()=>w("div",{class:"flex flex-row"},[w("span",{class:"grey-text",style:{"margin-right":"120px"}}," 星期 "),w("span",{class:"grey-text"},"时段表")],-1)),ySe={class:"date-list"},_Se=["onClick"],wSe={class:"date-text day-container mr-6 flex-shrink-0"},$Se={key:0,class:"date-text flex flex-row justify-between"},CSe={class:"flex flex-row"},SSe={class:"pr-1 flex items-center justify-center"},ESe={class:"el-icon-arrow-right"},kSe={key:1,class:"date-text"},ISe={key:1},TSe=vu(()=>w("span",null,"设置每周可约时间",-1)),xSe={class:"flex items-center",style:{gap:"8px"}},ASe=vu(()=>w("div",null,"付费预约",-1)),OSe={class:"flex flex-row relative my-2"},DSe=vu(()=>w("span",{class:"grey-text",style:{"margin-right":"120px"}}," 星期 ",-1)),PSe=vu(()=>w("span",{class:"grey-text"},"名额",-1)),MSe={key:0,style:{"margin-left":"100px"},class:"grey-text"},NSe={class:"date-list"},RSe={class:"date2-container"},LSe={class:"date-text day-container",style:{"margin-right":"44px"}},FSe={key:0,class:"flex gap-6"},BSe={class:"w-25 h-8"},VSe={key:0,class:"w-25 h-8"},zSe=vu(()=>w("span",null,"¥",-1)),jSe={key:1,class:"date-text"},USe=se({__name:"availableTime",props:{availableTime:{},widgetId:{},appointmentItem:{}},emits:["editAvailableTime"],setup(e,{emit:t}){const n=t,o=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],a=P(null),r=P([]),s={monday:"星期一",tuesday:"星期二",wednesday:"星期三",thursday:"星期四",friday:"星期五",saturday:"星期六",sunday:"星期日"},i=e,l=P(i.availableTime.type=="time"),d=P([...i.availableTime.days]),f=P(),p=P(i.availableTime.dailyTimeRanges),h=P(0),m=_n(i.availableTime.isPaid);Se(()=>i.availableTime,()=>{p.value=i.availableTime.dailyTimeRanges},{deep:!0}),Se(l,L=>{let F=L?"time":"date";n("editAvailableTime",{...i.availableTime,type:F})}),Se(m,L=>{n("editAvailableTime",{...i.availableTime,isPaid:L})}),Se(a,(L,F)=>{if(L!=null){let z=d.value[L].formId;f.value=p.value.find(j=>j.id==z)}}),Se(i,L=>{if(L.availableTime.type=="time"&&a.value!=null){let F=d.value[a.value].formId;f.value=p.value.find(z=>z.id==F)}_()}),st(()=>{console.debug(i.availableTime,"availableTime"),_()});const b=M({get:()=>d.value.map(L=>L.price/100),set:L=>{L.forEach((F,z)=>{y(F,d.value[z])})}}),g=(L,F)=>{L.price=parseFloat(b.value[F])*100},y=(L,F)=>{L=L.slice(0,8);let z=parseFloat(L).toFixed(2);F.price=parseFloat(z)*100},_=()=>{let L=0;d.value.map(F=>{F.open&&L++}),h.value=L},I=L=>{const F=exports.globalInject.getVipInfo();console.debug(F,"vipInfo"),F.level<54&&L&&(ht.warning("付费预约功能为企业版会员专享功能,升级到企业版会员即可使用"),exports.globalInject.showBuyVipDialog({level:54}),m.value=!1)},k=(L,F)=>{L.length>8&&(L=L.slice(0,8)),L===""||!/^[1-9]\d{0,7}$/.test(L)?F.quota=parseInt(F.quota):F.quota=parseInt(L)},E=L=>{n("editAvailableTime",{...i.availableTime,dailyTimeRanges:L})},T=()=>{n("editAvailableTime",{...i.availableTime,days:d.value})},x=L=>{L.stopPropagation()},S=L=>{a.value==L?a.value=null:a.value=L},D=L=>{a.value!==null&&(d.value[a.value].formId=L,T())},N=L=>{const F=L.dailyTimeRangeQuotas;if(a.value!=null)return`(${F.length})`;{const z=F[0].startTime.hour.toString().padStart(2,"0")+":"+F[0].startTime.minute.toString().padStart(2,"0"),j=F[F.length-1].endTime.hour.toString().padStart(2,"0")+":"+F[F.length-1].endTime.minute.toString().padStart(2,"0");return`(${z} - ${j},${F.length}个时段)`}};return(L,F)=>(C(),A("div",vSe,[O(c(Pf),{class:"mb-6",modelValue:l.value,"onUpdate:modelValue":F[0]||(F[0]=z=>l.value=z)},{default:H(()=>[O(c(U_),{label:!0},{default:H(()=>[Fe("按时段预约")]),_:1}),O(c(U_),{label:!1},{default:H(()=>[Fe("按日期预约")]),_:1})]),_:1},8,["modelValue"]),l.value?(C(),A("div",hSe,[w("div",mSe,[gSe,bSe,w("div",ySe,[(C(!0),A(Ae,null,et(d.value,(z,j)=>{var X;return C(),A("div",{class:"date-container",onClick:U=>S(j)},[O(c(Jl),{onChange:T,onClick:mt(x,["stop"]),modelValue:z.open,"onUpdate:modelValue":U=>z.open=U,"active-color":"#2278FF","inactive-color":"#EEEEEE",disabled:h.value<=1&&z.open},null,8,["modelValue","onUpdate:modelValue","disabled"]),w("div",wSe,ie(s[o[j]]),1),z.open?(C(),A("div",$Se,[w("div",CSe,[w("div",{class:B({"text-overflow":!0,"date-text-selected":a.value!=null})},ie((X=L.availableTime.dailyTimeRanges.find(U=>U.id==z.formId))==null?void 0:X.name),3),w("div",{class:B({"text-overflow":a.value!=null})},ie(N(L.availableTime.dailyTimeRanges.find(U=>U.id==z.formId))),3)]),w("div",SSe,[Et(w("i",ESe,null,512),[[nn,a.value==null||a.value==j]])])])):(C(),A("span",kSe,"不可约"))],8,_Se)}),256))])]),a.value!=null?(C(),ve(pSe,{key:0,widget_id:L.widgetId,onEditFormId:D,onEditAvailableTime:E,hasUsedFormId:r.value,formId:f.value.id??1,selectedIndex:a.value,formList:p.value,days:L.availableTime.days,appointment:L.appointmentItem},null,8,["widget_id","hasUsedFormId","formId","selectedIndex","formList","days","appointment"])):G("",!0)])):(C(),A("div",ISe,[TSe,w("div",xSe,[O(c(Jl),{"active-color":"#2278FF","inactive-color":"#EEEEEE",modelValue:m.value,"onUpdate:modelValue":F[1]||(F[1]=z=>m.value=z),onChange:I},null,8,["modelValue"]),ASe]),w("div",OSe,[DSe,PSe,m.value?(C(),A("span",MSe,"单价(CNY)")):G("",!0)]),w("div",NSe,[(C(!0),A(Ae,null,et(d.value,(z,j)=>(C(),A("div",RSe,[O(c(Jl),{"inactive-color":"#EEEEEE",modelValue:z.open,"onUpdate:modelValue":X=>z.open=X,onChange:T,disabled:h.value<=1&&z.open},null,8,["modelValue","onUpdate:modelValue","disabled"]),w("div",LSe,ie(s[o[j]]),1),z.open?(C(),A("div",FSe,[w("div",BSe,[O(c(Pt),{onChange:T,onInput:X=>k(X,z),modelValue:z.quota,"onUpdate:modelValue":X=>z.quota=X,placeholder:"充足",type:"number"},null,8,["onInput","modelValue","onUpdate:modelValue"])]),m.value?(C(),A("div",VSe,[O(c(Pt),{type:"number",step:"0.01",modelValue:b.value[j],"onUpdate:modelValue":X=>b.value[j]=X,onBlur:X=>g(z,j),onInput:X=>y(X,z),style:{width:"100px"}},{prefix:H(()=>[zSe]),_:2},1032,["modelValue","onUpdate:modelValue","onBlur","onInput"])])):G("",!0)])):(C(),A("span",jSe,"不可约"))]))),256))])]))]))}}),WSe=Ye(USe,[["__scopeId","data-v-c2ce3419"]]),ed=e=>(At("data-v-f170f2b0"),e=e(),Ot(),e),HSe={class:"container"},qSe=ed(()=>w("span",{class:"title-text"},"设置可约日期范围",-1)),KSe={key:0,style:{"margin-bottom":"8px"}},YSe=ed(()=>w("div",{class:"divide"},null,-1)),GSe={class:"flex flex-col"},QSe=ed(()=>w("span",{class:"title-text"},"设置不可约、休假日期",-1)),JSe={key:0,class:"flex flex-col gap-4 mt-2"},XSe={class:"flex flex-row gap-4 items-center picker-container"},ZSe=["onClick"],e2e=ed(()=>w("i",{class:"el-icon-close"},null,-1)),t2e=[e2e],n2e=ed(()=>w("i",{class:"el-icon-plus"},null,-1)),o2e=ed(()=>w("span",{class:"ml-1"},"添加日期范围",-1)),a2e=[n2e,o2e],r2e=se({__name:"availableDate",props:{availableDate:{}},emits:["editAvailableDate"],setup(e,{emit:t}){const n=t,o=e,a=P([new Date(o.availableDate.canAppointRange.dateRange[0]*1e3),new Date(o.availableDate.canAppointRange.dateRange[1]*1e3)]),r=P(o.availableDate.canAppointRange.isTimeLimit),s=[new Date(2e3,1,1,0,0,0),new Date(2e3,2,1,23,59,59)],i=P(o.availableDate.unUseDates.map(m=>[new Date(m[0]*1e3),new Date(m[1]*1e3)])),l=m=>{n("editAvailableDate",{...o.availableDate,canAppointRange:{...o.availableDate.canAppointRange,isTimeLimit:m}})},d=m=>{const b=new Date(m[0]),g=new Date(m[1]);n("editAvailableDate",{...o.availableDate,canAppointRange:{...o.availableDate.canAppointRange,dateRange:[b.getTime()/1e3,g.getTime()/1e3]}})};Se(i,m=>{const b=[];m.map(g=>{if(g.length>0){const y=new Date(g[0]),_=new Date(g[1]);b.push([y.getTime()/1e3,_.getTime()/1e3])}}),n("editAvailableDate",{...o.availableDate,unUseDates:b})},{deep:!0});const f=(m,b)=>{i.value[b]=m},p=m=>{i.value.splice(m,1)},h=()=>{i.value.push("")};return(m,b)=>(C(),A("div",HSe,[qSe,O(c(Pf),{modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=g=>r.value=g),onChange:l,class:"flex flex-row gap-6"},{default:H(()=>[O(c(Df),{value:!1,class:"radio-text"},{default:H(()=>[Fe("永久可约")]),_:1}),O(c(Df),{value:!0,class:"radio-text"},{default:H(()=>[Fe("限时可约")]),_:1})]),_:1},8,["modelValue"]),r.value?(C(),A("div",KSe,[O(c(wm),{type:"daterange",modelValue:a.value,"onUpdate:modelValue":b[1]||(b[1]=g=>a.value=g),"range-separator":"-",onChange:d,"start-placeholder":"开始时间","end-placeholder":"结束时间"},null,8,["modelValue"])])):G("",!0),YSe,w("div",GSe,[QSe,i.value.length!==0?(C(),A("div",JSe,[(C(!0),A(Ae,null,et(i.value,(g,y)=>(C(),A("div",XSe,[(C(),ve(c(wm),{type:"datetimerange",key:y,onChange:_=>{f(_,y)},modelValue:i.value[y],"onUpdate:modelValue":_=>i.value[y]=_,"range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间","default-time":s},null,8,["onChange","modelValue","onUpdate:modelValue"])),w("div",{class:"close-icon",onClick:_=>p(y)},t2e,8,ZSe)]))),256))])):G("",!0),w("div",{onClick:h,class:"set-date-button title-text"},a2e)])]))}}),s2e=Ye(r2e,[["__scopeId","data-v-f170f2b0"]]),hu=e=>(At("data-v-9d217116"),e=e(),Ot(),e),i2e={class:"container"},l2e={class:"top-container"},u2e=hu(()=>w("span",null,"时间限制",-1)),c2e={key:0,class:"select-row"},d2e=hu(()=>w("span",null,"预约人需提前",-1)),f2e={class:"select-container"},p2e={class:"select-container"},v2e=hu(()=>w("span",null,"预约",-1)),h2e={key:1,class:"select-row"},m2e=hu(()=>w("span",null,"预约人可预约未来",-1)),g2e={class:"select-container"},b2e={class:"select-container"},y2e=hu(()=>w("span",null,"内的项目",-1)),_2e=hu(()=>w("div",{class:"divide"},null,-1)),w2e={class:"bottom-container"},$2e=hu(()=>w("span",null,"更多设置",-1)),C2e=se({__name:"settings",props:{settings:{limitPre:{isLimit:!1,advanceTime:1,advanceUnit:"天"},limitFut:{isLimit:!1,futureTime:30,futureUnit:"天"},displayRemaining:!1,autoRestore:!1}},emits:["editSettings"],setup(e,{emit:t}){const n=t,o=e,a=P([o.settings.displayRemaining?"1":null,o.settings.autoRestore?"2":null]),r=P(o.settings.limitPre.isLimit),s=P(o.settings.limitFut.isLimit),i=P({advanceTime:o.settings.limitPre.advanceTime??1,advanceUnit:o.settings.limitPre.advanceUnit??"天",futureTime:o.settings.limitFut.futureTime??30,futureUnit:o.settings.limitFut.futureUnit??"天"}),l=["天","小时"],d=Array.from({length:60},(p,h)=>h+1);Se(r,p=>{n("editSettings",{...o.settings,limitPre:{...o.settings.limitPre,isLimit:p}})}),Se(s,p=>{n("editSettings",{...o.settings,limitFut:{...o.settings.limitFut,isLimit:p}})}),Se(a,p=>{let h=p.includes("1"),m=p.includes("2");n("editSettings",{...o.settings,displayRemaining:h,autoRestore:m})});const f=()=>{n("editSettings",{...o.settings,limitPre:{...o.settings.limitPre,advanceTime:i.value.advanceTime,advanceUnit:i.value.advanceUnit},limitFut:{...o.settings.limitFut,futureTime:i.value.futureTime,futureUnit:i.value.futureUnit}})};return(p,h)=>(C(),A("div",i2e,[w("div",l2e,[u2e,O(c(Xo),{modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=m=>r.value=m)},{default:H(()=>[Fe("限制提前预约时间")]),_:1},8,["modelValue"]),e.settings.limitPre.isLimit?(C(),A("div",c2e,[d2e,w("div",f2e,[O(c(Hs),{onChange:f,modelValue:i.value.advanceTime,"onUpdate:modelValue":h[1]||(h[1]=m=>i.value.advanceTime=m)},{default:H(()=>[(C(!0),A(Ae,null,et(c(d),m=>(C(),ve(c(qs),{key:m,label:m,value:m},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),w("div",p2e,[O(c(Hs),{onChange:f,modelValue:i.value.advanceUnit,"onUpdate:modelValue":h[2]||(h[2]=m=>i.value.advanceUnit=m)},{default:H(()=>[(C(),A(Ae,null,et(l,m=>O(c(qs),{key:m,label:m,value:m},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),v2e])):G("",!0),O(c(Xo),{modelValue:s.value,"onUpdate:modelValue":h[3]||(h[3]=m=>s.value=m)},{default:H(()=>[Fe("限制未来可约时间")]),_:1},8,["modelValue"]),e.settings.limitFut.isLimit?(C(),A("div",h2e,[m2e,w("div",g2e,[O(c(Hs),{onChange:f,modelValue:i.value.futureTime,"onUpdate:modelValue":h[4]||(h[4]=m=>i.value.futureTime=m)},{default:H(()=>[(C(!0),A(Ae,null,et(c(d),m=>(C(),ve(c(qs),{key:m,label:m,value:m},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),w("div",b2e,[O(c(Hs),{onChange:f,modelValue:i.value.futureUnit,"onUpdate:modelValue":h[5]||(h[5]=m=>i.value.futureUnit=m)},{default:H(()=>[(C(),A(Ae,null,et(l,m=>O(c(qs),{key:m,label:m,value:m},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),y2e])):G("",!0)]),_2e,w("div",w2e,[$2e,O(c(Pfe),{modelValue:a.value,"onUpdate:modelValue":h[6]||(h[6]=m=>a.value=m),class:"flex flex-col gap-4"},{default:H(()=>[O(c(Xo),{label:"1"},{default:H(()=>[Fe("向预约人显示剩余名额")]),_:1}),O(c(Xo),{label:"2"},{default:H(()=>[Fe("删除数据后,名额自动恢复")]),_:1})]),_:1},8,["modelValue"])])]))}}),S2e=Ye(C2e,[["__scopeId","data-v-9d217116"]]),E2e={class:"icon-container"},k2e=["src"],I2e={class:"title-container"},T2e={class:"title"},x2e={class:"tip"},A2e=se({__name:"elTabPaneTemplate",props:{img:{},title:{},desc:{},isSelectedLabel:{}},setup(e){return(t,n)=>(C(),A("div",{class:B({"pane-container":!0,isSelected:t.isSelectedLabel==t.title})},[w("div",E2e,[w("img",{class:"img",src:t.img},null,8,k2e)]),w("div",I2e,[w("span",T2e,ie(t.title),1),w("span",x2e,ie(t.desc),1)])],2))}}),lh=Ye(A2e,[["__scopeId","data-v-9405ced5"]]);function O2e(){this.__data__=[],this.size=0}var D2e=O2e;function P2e(e,t){return e===t||e!==e&&t!==t}var b8=P2e,M2e=b8;function N2e(e,t){for(var n=e.length;n--;)if(M2e(e[n][0],t))return n;return-1}var Wg=N2e,R2e=Wg,L2e=Array.prototype,F2e=L2e.splice;function B2e(e){var t=this.__data__,n=R2e(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():F2e.call(t,n,1),--this.size,!0}var V2e=B2e,z2e=Wg;function j2e(e){var t=this.__data__,n=z2e(t,e);return n<0?void 0:t[n][1]}var U2e=j2e,W2e=Wg;function H2e(e){return W2e(this.__data__,e)>-1}var q2e=H2e,K2e=Wg;function Y2e(e,t){var n=this.__data__,o=K2e(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var G2e=Y2e,Q2e=D2e,J2e=V2e,X2e=U2e,Z2e=q2e,eEe=G2e;function td(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}td.prototype.clear=Q2e;td.prototype.delete=J2e;td.prototype.get=X2e;td.prototype.has=Z2e;td.prototype.set=eEe;var Hg=td,tEe=Hg;function nEe(){this.__data__=new tEe,this.size=0}var oEe=nEe;function aEe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var rEe=aEe;function sEe(e){return this.__data__.get(e)}var iEe=sEe;function lEe(e){return this.__data__.has(e)}var uEe=lEe,cEe=typeof io=="object"&&io&&io.Object===Object&&io,y8=cEe,dEe=y8,fEe=typeof self=="object"&&self&&self.Object===Object&&self,pEe=dEe||fEe||Function("return this")(),Es=pEe,vEe=Es,hEe=vEe.Symbol,z$=hEe,jx=z$,_8=Object.prototype,mEe=_8.hasOwnProperty,gEe=_8.toString,Md=jx?jx.toStringTag:void 0;function bEe(e){var t=mEe.call(e,Md),n=e[Md];try{e[Md]=void 0;var o=!0}catch{}var a=gEe.call(e);return o&&(t?e[Md]=n:delete e[Md]),a}var yEe=bEe,_Ee=Object.prototype,wEe=_Ee.toString;function $Ee(e){return wEe.call(e)}var CEe=$Ee,Ux=z$,SEe=yEe,EEe=CEe,kEe="[object Null]",IEe="[object Undefined]",Wx=Ux?Ux.toStringTag:void 0;function TEe(e){return e==null?e===void 0?IEe:kEe:Wx&&Wx in Object(e)?SEe(e):EEe(e)}var qg=TEe;function xEe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ip=xEe,AEe=qg,OEe=Ip,DEe="[object AsyncFunction]",PEe="[object Function]",MEe="[object GeneratorFunction]",NEe="[object Proxy]";function REe(e){if(!OEe(e))return!1;var t=AEe(e);return t==PEe||t==MEe||t==DEe||t==NEe}var w8=REe,LEe=Es,FEe=LEe["__core-js_shared__"],BEe=FEe,_0=BEe,Hx=function(){var e=/[^.]+$/.exec(_0&&_0.keys&&_0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function VEe(e){return!!Hx&&Hx in e}var zEe=VEe,jEe=Function.prototype,UEe=jEe.toString;function WEe(e){if(e!=null){try{return UEe.call(e)}catch{}try{return e+""}catch{}}return""}var $8=WEe,HEe=w8,qEe=zEe,KEe=Ip,YEe=$8,GEe=/[\\^$.*+?()[\]{}|]/g,QEe=/^\[object .+?Constructor\]$/,JEe=Function.prototype,XEe=Object.prototype,ZEe=JEe.toString,eke=XEe.hasOwnProperty,tke=RegExp("^"+ZEe.call(eke).replace(GEe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nke(e){if(!KEe(e)||qEe(e))return!1;var t=HEe(e)?tke:QEe;return t.test(YEe(e))}var oke=nke;function ake(e,t){return e==null?void 0:e[t]}var rke=ake,ske=oke,ike=rke;function lke(e,t){var n=ike(e,t);return ske(n)?n:void 0}var mu=lke,uke=mu,cke=Es,dke=uke(cke,"Map"),j$=dke,fke=mu,pke=fke(Object,"create"),Kg=pke,qx=Kg;function vke(){this.__data__=qx?qx(null):{},this.size=0}var hke=vke;function mke(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gke=mke,bke=Kg,yke="__lodash_hash_undefined__",_ke=Object.prototype,wke=_ke.hasOwnProperty;function $ke(e){var t=this.__data__;if(bke){var n=t[e];return n===yke?void 0:n}return wke.call(t,e)?t[e]:void 0}var Cke=$ke,Ske=Kg,Eke=Object.prototype,kke=Eke.hasOwnProperty;function Ike(e){var t=this.__data__;return Ske?t[e]!==void 0:kke.call(t,e)}var Tke=Ike,xke=Kg,Ake="__lodash_hash_undefined__";function Oke(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=xke&&t===void 0?Ake:t,this}var Dke=Oke,Pke=hke,Mke=gke,Nke=Cke,Rke=Tke,Lke=Dke;function nd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}nd.prototype.clear=Pke;nd.prototype.delete=Mke;nd.prototype.get=Nke;nd.prototype.has=Rke;nd.prototype.set=Lke;var Fke=nd,Kx=Fke,Bke=Hg,Vke=j$;function zke(){this.size=0,this.__data__={hash:new Kx,map:new(Vke||Bke),string:new Kx}}var jke=zke;function Uke(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Wke=Uke,Hke=Wke;function qke(e,t){var n=e.__data__;return Hke(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Yg=qke,Kke=Yg;function Yke(e){var t=Kke(this,e).delete(e);return this.size-=t?1:0,t}var Gke=Yke,Qke=Yg;function Jke(e){return Qke(this,e).get(e)}var Xke=Jke,Zke=Yg;function eIe(e){return Zke(this,e).has(e)}var tIe=eIe,nIe=Yg;function oIe(e,t){var n=nIe(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var aIe=oIe,rIe=jke,sIe=Gke,iIe=Xke,lIe=tIe,uIe=aIe;function od(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}od.prototype.clear=rIe;od.prototype.delete=sIe;od.prototype.get=iIe;od.prototype.has=lIe;od.prototype.set=uIe;var cIe=od,dIe=Hg,fIe=j$,pIe=cIe,vIe=200;function hIe(e,t){var n=this.__data__;if(n instanceof dIe){var o=n.__data__;if(!fIe||o.length<vIe-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new pIe(o)}return n.set(e,t),this.size=n.size,this}var mIe=hIe,gIe=Hg,bIe=oEe,yIe=rEe,_Ie=iEe,wIe=uEe,$Ie=mIe;function ad(e){var t=this.__data__=new gIe(e);this.size=t.size}ad.prototype.clear=bIe;ad.prototype.delete=yIe;ad.prototype.get=_Ie;ad.prototype.has=wIe;ad.prototype.set=$Ie;var CIe=ad;function SIe(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e}var EIe=SIe,kIe=mu,IIe=function(){try{var e=kIe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),TIe=IIe,Yx=TIe;function xIe(e,t,n){t=="__proto__"&&Yx?Yx(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var C8=xIe,AIe=C8,OIe=b8,DIe=Object.prototype,PIe=DIe.hasOwnProperty;function MIe(e,t,n){var o=e[t];(!(PIe.call(e,t)&&OIe(o,n))||n===void 0&&!(t in e))&&AIe(e,t,n)}var S8=MIe,NIe=S8,RIe=C8;function LIe(e,t,n,o){var a=!n;n||(n={});for(var r=-1,s=t.length;++r<s;){var i=t[r],l=o?o(n[i],e[i],i,n,e):void 0;l===void 0&&(l=e[i]),a?RIe(n,i,l):NIe(n,i,l)}return n}var Gg=LIe;function FIe(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var BIe=FIe;function VIe(e){return e!=null&&typeof e=="object"}var Tp=VIe,zIe=qg,jIe=Tp,UIe="[object Arguments]";function WIe(e){return jIe(e)&&zIe(e)==UIe}var HIe=WIe,Gx=HIe,qIe=Tp,E8=Object.prototype,KIe=E8.hasOwnProperty,YIe=E8.propertyIsEnumerable,GIe=Gx(function(){return arguments}())?Gx:function(e){return qIe(e)&&KIe.call(e,"callee")&&!YIe.call(e,"callee")},QIe=GIe,JIe=Array.isArray,U$=JIe,Tm={exports:{}};function XIe(){return!1}var ZIe=XIe;Tm.exports;(function(e,t){var n=Es,o=ZIe,a=t&&!t.nodeType&&t,r=a&&!0&&e&&!e.nodeType&&e,s=r&&r.exports===a,i=s?n.Buffer:void 0,l=i?i.isBuffer:void 0,d=l||o;e.exports=d})(Tm,Tm.exports);var k8=Tm.exports,eTe=9007199254740991,tTe=/^(?:0|[1-9]\d*)$/;function nTe(e,t){var n=typeof e;return t=t??eTe,!!t&&(n=="number"||n!="symbol"&&tTe.test(e))&&e>-1&&e%1==0&&e<t}var oTe=nTe,aTe=9007199254740991;function rTe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=aTe}var I8=rTe,sTe=qg,iTe=I8,lTe=Tp,uTe="[object Arguments]",cTe="[object Array]",dTe="[object Boolean]",fTe="[object Date]",pTe="[object Error]",vTe="[object Function]",hTe="[object Map]",mTe="[object Number]",gTe="[object Object]",bTe="[object RegExp]",yTe="[object Set]",_Te="[object String]",wTe="[object WeakMap]",$Te="[object ArrayBuffer]",CTe="[object DataView]",STe="[object Float32Array]",ETe="[object Float64Array]",kTe="[object Int8Array]",ITe="[object Int16Array]",TTe="[object Int32Array]",xTe="[object Uint8Array]",ATe="[object Uint8ClampedArray]",OTe="[object Uint16Array]",DTe="[object Uint32Array]",Jn={};Jn[STe]=Jn[ETe]=Jn[kTe]=Jn[ITe]=Jn[TTe]=Jn[xTe]=Jn[ATe]=Jn[OTe]=Jn[DTe]=!0;Jn[uTe]=Jn[cTe]=Jn[$Te]=Jn[dTe]=Jn[CTe]=Jn[fTe]=Jn[pTe]=Jn[vTe]=Jn[hTe]=Jn[mTe]=Jn[gTe]=Jn[bTe]=Jn[yTe]=Jn[_Te]=Jn[wTe]=!1;function PTe(e){return lTe(e)&&iTe(e.length)&&!!Jn[sTe(e)]}var MTe=PTe;function NTe(e){return function(t){return e(t)}}var W$=NTe,xm={exports:{}};xm.exports;(function(e,t){var n=y8,o=t&&!t.nodeType&&t,a=o&&!0&&e&&!e.nodeType&&e,r=a&&a.exports===o,s=r&&n.process,i=function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=i})(xm,xm.exports);var H$=xm.exports,RTe=MTe,LTe=W$,Qx=H$,Jx=Qx&&Qx.isTypedArray,FTe=Jx?LTe(Jx):RTe,BTe=FTe,VTe=BIe,zTe=QIe,jTe=U$,UTe=k8,WTe=oTe,HTe=BTe,qTe=Object.prototype,KTe=qTe.hasOwnProperty;function YTe(e,t){var n=jTe(e),o=!n&&zTe(e),a=!n&&!o&&UTe(e),r=!n&&!o&&!a&&HTe(e),s=n||o||a||r,i=s?VTe(e.length,String):[],l=i.length;for(var d in e)(t||KTe.call(e,d))&&!(s&&(d=="length"||a&&(d=="offset"||d=="parent")||r&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||WTe(d,l)))&&i.push(d);return i}var T8=YTe,GTe=Object.prototype;function QTe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||GTe;return e===n}var q$=QTe;function JTe(e,t){return function(n){return e(t(n))}}var x8=JTe,XTe=x8,ZTe=XTe(Object.keys,Object),exe=ZTe,txe=q$,nxe=exe,oxe=Object.prototype,axe=oxe.hasOwnProperty;function rxe(e){if(!txe(e))return nxe(e);var t=[];for(var n in Object(e))axe.call(e,n)&&n!="constructor"&&t.push(n);return t}var sxe=rxe,ixe=w8,lxe=I8;function uxe(e){return e!=null&&lxe(e.length)&&!ixe(e)}var A8=uxe,cxe=T8,dxe=sxe,fxe=A8;function pxe(e){return fxe(e)?cxe(e):dxe(e)}var K$=pxe,vxe=Gg,hxe=K$;function mxe(e,t){return e&&vxe(t,hxe(t),e)}var gxe=mxe;function bxe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var yxe=bxe,_xe=Ip,wxe=q$,$xe=yxe,Cxe=Object.prototype,Sxe=Cxe.hasOwnProperty;function Exe(e){if(!_xe(e))return $xe(e);var t=wxe(e),n=[];for(var o in e)o=="constructor"&&(t||!Sxe.call(e,o))||n.push(o);return n}var kxe=Exe,Ixe=T8,Txe=kxe,xxe=A8;function Axe(e){return xxe(e)?Ixe(e,!0):Txe(e)}var O8=Axe,Oxe=Gg,Dxe=O8;function Pxe(e,t){return e&&Oxe(t,Dxe(t),e)}var Mxe=Pxe,Am={exports:{}};Am.exports;(function(e,t){var n=Es,o=t&&!t.nodeType&&t,a=o&&!0&&e&&!e.nodeType&&e,r=a&&a.exports===o,s=r?n.Buffer:void 0,i=s?s.allocUnsafe:void 0;function l(d,f){if(f)return d.slice();var p=d.length,h=i?i(p):new d.constructor(p);return d.copy(h),h}e.exports=l})(Am,Am.exports);var Nxe=Am.exports;function Rxe(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var Lxe=Rxe;function Fxe(e,t){for(var n=-1,o=e==null?0:e.length,a=0,r=[];++n<o;){var s=e[n];t(s,n,e)&&(r[a++]=s)}return r}var Bxe=Fxe;function Vxe(){return[]}var D8=Vxe,zxe=Bxe,jxe=D8,Uxe=Object.prototype,Wxe=Uxe.propertyIsEnumerable,Xx=Object.getOwnPropertySymbols,Hxe=Xx?function(e){return e==null?[]:(e=Object(e),zxe(Xx(e),function(t){return Wxe.call(e,t)}))}:jxe,Y$=Hxe,qxe=Gg,Kxe=Y$;function Yxe(e,t){return qxe(e,Kxe(e),t)}var Gxe=Yxe;function Qxe(e,t){for(var n=-1,o=t.length,a=e.length;++n<o;)e[a+n]=t[n];return e}var P8=Qxe,Jxe=x8,Xxe=Jxe(Object.getPrototypeOf,Object),M8=Xxe,Zxe=P8,eAe=M8,tAe=Y$,nAe=D8,oAe=Object.getOwnPropertySymbols,aAe=oAe?function(e){for(var t=[];e;)Zxe(t,tAe(e)),e=eAe(e);return t}:nAe,N8=aAe,rAe=Gg,sAe=N8;function iAe(e,t){return rAe(e,sAe(e),t)}var lAe=iAe,uAe=P8,cAe=U$;function dAe(e,t,n){var o=t(e);return cAe(e)?o:uAe(o,n(e))}var R8=dAe,fAe=R8,pAe=Y$,vAe=K$;function hAe(e){return fAe(e,vAe,pAe)}var mAe=hAe,gAe=R8,bAe=N8,yAe=O8;function _Ae(e){return gAe(e,yAe,bAe)}var wAe=_Ae,$Ae=mu,CAe=Es,SAe=$Ae(CAe,"DataView"),EAe=SAe,kAe=mu,IAe=Es,TAe=kAe(IAe,"Promise"),xAe=TAe,AAe=mu,OAe=Es,DAe=AAe(OAe,"Set"),PAe=DAe,MAe=mu,NAe=Es,RAe=MAe(NAe,"WeakMap"),LAe=RAe,r1=EAe,s1=j$,i1=xAe,l1=PAe,u1=LAe,L8=qg,rd=$8,Zx="[object Map]",FAe="[object Object]",eA="[object Promise]",tA="[object Set]",nA="[object WeakMap]",oA="[object DataView]",BAe=rd(r1),VAe=rd(s1),zAe=rd(i1),jAe=rd(l1),UAe=rd(u1),Pl=L8;(r1&&Pl(new r1(new ArrayBuffer(1)))!=oA||s1&&Pl(new s1)!=Zx||i1&&Pl(i1.resolve())!=eA||l1&&Pl(new l1)!=tA||u1&&Pl(new u1)!=nA)&&(Pl=function(e){var t=L8(e),n=t==FAe?e.constructor:void 0,o=n?rd(n):"";if(o)switch(o){case BAe:return oA;case VAe:return Zx;case zAe:return eA;case jAe:return tA;case UAe:return nA}return t});var G$=Pl,WAe=Object.prototype,HAe=WAe.hasOwnProperty;function qAe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&HAe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var KAe=qAe,YAe=Es,GAe=YAe.Uint8Array,QAe=GAe,aA=QAe;function JAe(e){var t=new e.constructor(e.byteLength);return new aA(t).set(new aA(e)),t}var Q$=JAe,XAe=Q$;function ZAe(e,t){var n=t?XAe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var eOe=ZAe,tOe=/\w*$/;function nOe(e){var t=new e.constructor(e.source,tOe.exec(e));return t.lastIndex=e.lastIndex,t}var oOe=nOe,rA=z$,sA=rA?rA.prototype:void 0,iA=sA?sA.valueOf:void 0;function aOe(e){return iA?Object(iA.call(e)):{}}var rOe=aOe,sOe=Q$;function iOe(e,t){var n=t?sOe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var lOe=iOe,uOe=Q$,cOe=eOe,dOe=oOe,fOe=rOe,pOe=lOe,vOe="[object Boolean]",hOe="[object Date]",mOe="[object Map]",gOe="[object Number]",bOe="[object RegExp]",yOe="[object Set]",_Oe="[object String]",wOe="[object Symbol]",$Oe="[object ArrayBuffer]",COe="[object DataView]",SOe="[object Float32Array]",EOe="[object Float64Array]",kOe="[object Int8Array]",IOe="[object Int16Array]",TOe="[object Int32Array]",xOe="[object Uint8Array]",AOe="[object Uint8ClampedArray]",OOe="[object Uint16Array]",DOe="[object Uint32Array]";function POe(e,t,n){var o=e.constructor;switch(t){case $Oe:return uOe(e);case vOe:case hOe:return new o(+e);case COe:return cOe(e,n);case SOe:case EOe:case kOe:case IOe:case TOe:case xOe:case AOe:case OOe:case DOe:return pOe(e,n);case mOe:return new o;case gOe:case _Oe:return new o(e);case bOe:return dOe(e);case yOe:return new o;case wOe:return fOe(e)}}var MOe=POe,NOe=Ip,lA=Object.create,ROe=function(){function e(){}return function(t){if(!NOe(t))return{};if(lA)return lA(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),LOe=ROe,FOe=LOe,BOe=M8,VOe=q$;function zOe(e){return typeof e.constructor=="function"&&!VOe(e)?FOe(BOe(e)):{}}var jOe=zOe,UOe=G$,WOe=Tp,HOe="[object Map]";function qOe(e){return WOe(e)&&UOe(e)==HOe}var KOe=qOe,YOe=KOe,GOe=W$,uA=H$,cA=uA&&uA.isMap,QOe=cA?GOe(cA):YOe,JOe=QOe,XOe=G$,ZOe=Tp,e4e="[object Set]";function t4e(e){return ZOe(e)&&XOe(e)==e4e}var n4e=t4e,o4e=n4e,a4e=W$,dA=H$,fA=dA&&dA.isSet,r4e=fA?a4e(fA):o4e,s4e=r4e,i4e=CIe,l4e=EIe,u4e=S8,c4e=gxe,d4e=Mxe,f4e=Nxe,p4e=Lxe,v4e=Gxe,h4e=lAe,m4e=mAe,g4e=wAe,b4e=G$,y4e=KAe,_4e=MOe,w4e=jOe,$4e=U$,C4e=k8,S4e=JOe,E4e=Ip,k4e=s4e,I4e=K$,T4e=1,x4e=2,A4e=4,F8="[object Arguments]",O4e="[object Array]",D4e="[object Boolean]",P4e="[object Date]",M4e="[object Error]",B8="[object Function]",N4e="[object GeneratorFunction]",R4e="[object Map]",L4e="[object Number]",V8="[object Object]",F4e="[object RegExp]",B4e="[object Set]",V4e="[object String]",z4e="[object Symbol]",j4e="[object WeakMap]",U4e="[object ArrayBuffer]",W4e="[object DataView]",H4e="[object Float32Array]",q4e="[object Float64Array]",K4e="[object Int8Array]",Y4e="[object Int16Array]",G4e="[object Int32Array]",Q4e="[object Uint8Array]",J4e="[object Uint8ClampedArray]",X4e="[object Uint16Array]",Z4e="[object Uint32Array]",Wn={};Wn[F8]=Wn[O4e]=Wn[U4e]=Wn[W4e]=Wn[D4e]=Wn[P4e]=Wn[H4e]=Wn[q4e]=Wn[K4e]=Wn[Y4e]=Wn[G4e]=Wn[R4e]=Wn[L4e]=Wn[V8]=Wn[F4e]=Wn[B4e]=Wn[V4e]=Wn[z4e]=Wn[Q4e]=Wn[J4e]=Wn[X4e]=Wn[Z4e]=!0;Wn[M4e]=Wn[B8]=Wn[j4e]=!1;function Rh(e,t,n,o,a,r){var s,i=t&T4e,l=t&x4e,d=t&A4e;if(n&&(s=a?n(e,o,a,r):n(e)),s!==void 0)return s;if(!E4e(e))return e;var f=$4e(e);if(f){if(s=y4e(e),!i)return p4e(e,s)}else{var p=b4e(e),h=p==B8||p==N4e;if(C4e(e))return f4e(e,i);if(p==V8||p==F8||h&&!a){if(s=l||h?{}:w4e(e),!i)return l?h4e(e,d4e(s,e)):v4e(e,c4e(s,e))}else{if(!Wn[p])return a?e:{};s=_4e(e,p,i)}}r||(r=new i4e);var m=r.get(e);if(m)return m;if(r.set(e,s),k4e(e))return e.forEach(function(y){s.add(Rh(y,t,n,y,e,r))}),s;if(S4e(e))return e.forEach(function(y,_){s.set(_,Rh(y,t,n,_,e,r))}),s;var b=d?l?g4e:m4e:l?keysIn:I4e,g=f?void 0:b(e);return l4e(g||e,function(y,_){g&&(_=y,y=e[_]),u4e(s,_,Rh(y,t,n,_,e,r))}),s}var e3e=Rh,t3e=e3e,n3e=1,o3e=4;function a3e(e){return t3e(e,n3e|o3e)}var r3e=a3e;const xp=vo(r3e),z8=e=>(At("data-v-63b74f90"),e=e(),Ot(),e),s3e=z8(()=>w("div",{class:"divide"},null,-1)),i3e=z8(()=>w("div",{class:"divide"},null,-1)),l3e={slot:"footer",class:"dialog-footer"},u3e=se({__name:"index",props:{visible:{type:Boolean},widgetId:{},appointmentItem:{}},emits:["save","updatePreview","close"],setup(e,{emit:t}){const n=e,o=P("基础信息"),a=t,r=P(xp(n.appointmentItem)),s=P(!1),i=()=>{r.value.availableConfig.availableTime.dailyTimeRanges.forEach(y=>{const _=[],I=[];y.dailyTimeRangeQuotas.map(k=>{let E=k.startTime.hour.toString().padStart(2,"0")+k.startTime.minute.toString().padStart(2,"0")+k.endTime.hour.toString().padStart(2,"0")+k.endTime.minute.toString().padStart(2,"0");I.indexOf(E)==-1&&(I.push(E),_.push(k))}),y.dailyTimeRangeQuotas=_}),a("save",r.value),console.debug(r.value,"reservationItem"),a("updatePreview")},l=()=>{a("close")},d=y=>{o.value=y.props.label},f=y=>{r.value.basicInfo=y,console.debug(y,"aaaa")},p=y=>{r.value.availableConfig.availableDate=y},h=y=>{r.value.availableConfig.availableTime=y},m=y=>{r.value.settings=y},b=()=>{s.value=!0},g=()=>{s.value=!1};return(y,_)=>(C(),A("div",null,[O(c(Ga),{"model-value":y.visible,title:"设置预约项目",width:"900px",onClose:l,class:"point-setting-dialog"},{default:H(()=>[s3e,w("div",null,[O(c(Fg),{style:{height:"514px"},"tab-position":"left",onTabClick:d},{default:H(()=>[O(c(zr),{label:"基础信息"},{label:H(()=>[O(lh,{title:"基础信息",desc:"项目名称/图片/描述",img:c(Ke)("images/widget/appoint-basicInfo.png"),isSelectedLabel:o.value},null,8,["img","isSelectedLabel"])]),default:H(()=>[O(N$e,{onEditBasicInfo:f,basicInfo:r.value.basicInfo,onLoading:b,onLoadover:g},null,8,["basicInfo"])]),_:1}),O(c(zr),{label:"可用时段"},{label:H(()=>[O(lh,{title:"可用时段",desc:"预约时段/名额/付费",img:c(Ke)("images/widget/appoint-availableTime.png"),isSelectedLabel:o.value},null,8,["img","isSelectedLabel"])]),default:H(()=>[O(WSe,{appointmentItem:y.appointmentItem,widgetId:y.widgetId,onEditAvailableTime:h,availableTime:r.value.availableConfig.availableTime},null,8,["appointmentItem","widgetId","availableTime"])]),_:1}),O(c(zr),{label:"可用日期"},{label:H(()=>[O(lh,{title:"可用日期",desc:"可约/不可约日期范围",img:c(Ke)("images/widget/appoint-availableDate.png"),isSelectedLabel:o.value},null,8,["img","isSelectedLabel"])]),default:H(()=>[O(s2e,{onEditAvailableDate:p,availableDate:r.value.availableConfig.availableDate},null,8,["availableDate"])]),_:1}),O(c(zr),{label:"高级设置"},{label:H(()=>[O(lh,{title:"高级设置",desc:"预约限制/恢复名额等",img:c(Ke)("images/widget/appoint-settings.png"),isSelectedLabel:o.value},null,8,["img","isSelectedLabel"])]),default:H(()=>[O(S2e,{onEditSettings:m,settings:r.value.settings},null,8,["settings"])]),_:1})]),_:1})]),i3e,w("div",l3e,[O(c(Wt),{onClick:l,class:"button"},{default:H(()=>[Fe("取消")]),_:1}),O(c(Wt),{disabled:s.value,class:"button",type:"primary",onClick:i},{default:H(()=>[Fe("保存设置")]),_:1},8,["disabled"])])]),_:1},8,["model-value"])]))}}),c3e=Ye(u3e,[["__scopeId","data-v-63b74f90"]]),J$=e=>(At("data-v-279903a2"),e=e(),Ot(),e),d3e={class:"drawer-container"},f3e={key:0,class:"img-container"},p3e=["src"],v3e={class:"date-row"},h3e=["onClick"],m3e=["src"],g3e=J$(()=>w("div",{class:"divide"},null,-1)),b3e={class:"choose-container"},y3e=["onClick"],_3e={class:"text"},w3e={key:0,style:{color:"#e34152"},class:"text"},$3e={class:"text"},C3e={key:1,class:"answers-col"},S3e=J$(()=>w("div",{class:"answers-title"},"已选日期/时间段",-1)),E3e={class:B({"appoint-container":!0})},k3e={class:"flex flex-col"},I3e={key:0,style:{color:"#e34152"}},T3e={key:0,class:"quota-container"},x3e={class:"calendar-header"},A3e=["src"],O3e=["src"],D3e=["onClick"],P3e={key:1,class:"text remainder-text"},M3e={key:0,class:"answers-col",style:{"margin-top":"24px"}},N3e=J$(()=>w("div",{class:"answers-title"},"已选日期/时间段",-1)),R3e={class:B({"appoint-container":!0})},L3e={class:"flex flex-col"},F3e={key:0,style:{color:"#e34152"}},B3e={key:0,class:"quota-container"},V3e=["onClick"],z3e=["src"],j3e={key:1},U3e=se({__name:"appointDateMobile",props:{visible:!1,appoint:{},appointIndex:null,appointConfig:{},answer:[],widgetId:"",formMode:"",isMobileSize:!1,widgetStore:{}},emits:["saveAnswers","editConfig","close","editConfigChooseTimes"],setup(e,{emit:t}){const n=e,o=t,a=P(n.visible),r=["周一","周二","周三","周四","周五","周六","周日"],s=P([]),i=P(On(wt(n.answer))),l=P(!1),d=M(()=>a.value&&!l.value),f=M(()=>a.value&&l.value),p=P(On(n.appointConfig.selectedDate)),h=P([]),m=P(!1),b=new Date,g=P();Se(()=>a,Z=>{Z?document.body.style.overflow="hidden":document.body.style.overflow="auto"}),Se(()=>n,()=>{a.value=n.visible},{deep:!0}),st(()=>{n.appoint.availableConfig.availableTime.type!="time"&&(l.value=!0),s.value=L(p.value),Y()}),Se(p,(Z,ce)=>{Z.getMonth()!=ce.getMonth()?m.value=!0:m.value=!1,l.value&&n.appoint.availableConfig.availableTime.type=="time"&&(s.value=L(Z),Y(Z)),o("editConfig",{...n.appointConfig,selectedDate:Z})},{deep:!0});const y=()=>{o("editConfig",{...n.appointConfig,calendarVisible:!1})},_=Z=>{if(n.appoint.availableConfig.availableTime.type=="date")return i.value.findIndex(ce=>ce.appointment_date==Z.day)!=-1;if(n.appoint.availableConfig.availableTime.type=="time"){const ce=n.appointConfig.monthChooseItems.filter(re=>re.datetime.split("-")[1]==Z.date.getMonth()+1&&re.datetime.split("-")[2]==Z.date.getDate())[0];if(ce)return Z.date.getTime()==new Date(n.appointConfig.selectedDate).getTime()&&ce.canAppoint}},I=Z=>{i.value.splice(Z,1),o("saveAnswers",i.value,n.appointIndex)},k=Z=>{const ce=new Date(p.value),re=Z-x(ce.getDay()),ye=new Date(ce.getFullYear(),ce.getMonth(),ce.getDate()+re);p.value=ye},E=Z=>{if(n.formMode=="input"&&n.appoint.availableConfig.availableTime.type=="date"){if(["unable","able-to-unable","pre"].includes(V(Z.date)))return;T(Z)}},T=Z=>{const ce=Z.day.split("-").join("")+"00002400",re=n.appointConfig.monthChooseItems.find(le=>le.datetime==Z.day),ye={appointment_id:n.appoint.basicInfo.id,appointment_date:Z.day,appointment_time:ce,widget_id:n.widgetId,quota:1,isPaid:re.isPaid,price:re.price,remainingQuota:re.remainingQuota,type:n.appoint.availableConfig.availableTime.type},he=i.value.findIndex(le=>le.appointment_time===ye.appointment_time);he==-1?n.widgetStore.attrs.multiplyAvail?(i.value.push(ye),h.value.push(re.remainingQuota)):(i.value=[ye],h.value=[re.remainingQuota]):(h.value.splice(he,1),i.value.splice(he,1))},x=Z=>Z-1<0?6:Z-1,S=Z=>{const ce=Z.toDateString()===new Date().toDateString(),re=n.appointConfig.monthChooseItems.filter(ye=>ye.datetime.split("-")[1]==Z.getMonth()+1&&ye.datetime.split("-")[2]==Z.getDate())[0];return re?!re.canAppoint||re.overtime?void 0:re.overtime&&ce?"过期":n.appoint.settings.displayRemaining?n.appoint.availableConfig.availableTime.type=="date"?D(re.remainingQuota):D(re.timeRangeRemainingQuotas):void 0:""},D=Z=>Z<=99?Z===0?"约满":Z==-1||Z==null?"充足":`余${Z}`:"充足",N=Z=>{if(Z.type=="time"){const ce=Z.appointment_date.replace(/-/g,"/"),re=Z.appointment_time.slice(8,10)+":"+Z.appointment_time.slice(10,12),ye=Z.appointment_time.slice(12,14)+":"+Z.appointment_time.slice(14,16),he=`${re} - ${ye}`;return`${ce} ${he}`}else{const ce=Z.appointment_date.replace(/-/g,"/"),re=Z.appointment_date,ye=new Date(re);return`${ce},${r[x(ye.getDay())]}`}};function L(Z){const ce=Z.getDay(),re=new Date(Z);re.setDate(Z.getDate()-x(ce));const ye=[];for(let he=0;he<7;he++)ye.push(new Date(re.getTime()+he*24*60*60*1e3));return ye}const F=()=>{l.value=!l.value},z=Z=>{Z.getFullYear();const ce=String(Z.getMonth()+1).padStart(2,"0"),re=String(Z.getDate()).padStart(2,"0");return`${ce}.${re}`},j=Z=>(parseFloat(Z)/100).toFixed(2),X=Z=>{if(n.appoint.settings.displayRemaining)return Z.overtime?"过期":Z.limitFutOver||Z.limitPreOver?"超时":Z.remainingQuota<=99?Z.remainingQuota==0?"约满":Z.remainingQuota==-1||Z.remainingQuota==null?"充足":`余${Z.remainingQuota}`:"充足"},U=Z=>{if(Z.limitFutOver||Z.limitPreOver||Z.remainingQuota==0||Z.overtime)return;const ce=Z._start_time.split(" ")[0],re=Z._start_time.split(" ")[1].split(":"),ye=Z._end_time.split(" ")[1].split(":");let he="";he+=ce.split("-").join(""),re.map((J,oe)=>{oe!=2&&(he=he+J)}),ye.map((J,oe)=>{oe!=2&&(he=he+J)});const le={appointment_id:n.appoint.basicInfo.id,appointment_date:ce,appointment_time:he,widget_id:n.widgetId,quota:1,isPaid:Z.isPaid,price:Z.price,remainingQuota:Z.remainingQuota,type:n.appoint.availableConfig.availableTime.type},ue=i.value.findIndex(J=>J.appointment_time===le.appointment_time);ue==-1?(Z.isSelected=!0,n.widgetStore.attrs.multiplyAvail?(i.value.push(le),h.value.push(Z.remainingQuota)):(i.value=[le],h.value=[Z.remainingQuota])):(Z.isSelected=!1,i.value.splice(ue,1),h.value.splice(ue,1))},W=()=>{o("close"),o("saveAnswers",i.value,n.appointIndex)},Q=Z=>{const ce=p.value,re=Z=="pre"?ce.getMonth()-1:ce.getMonth()+1,ye=new Date(ce.getFullYear(),re,ce.getDate());Y(ye).then(()=>{p.value=ye})},q=Z=>{const ce=Z._start_time.split(" ")[0],re=Z._start_time.split(" ")[1].split(":"),ye=Z._end_time.split(" ")[1].split(":");let he="";return he+=ce.split("-").join(""),re.map((le,ue)=>{ue!=2&&(he=he+le)}),ye.map((le,ue)=>{ue!=2&&(he=he+le)}),i.value.findIndex(le=>le.appointment_time===he)!=-1},V=Z=>{const ce=Z.toDateString()===b.toDateString();if(Z.getTime()<b.getTime()&&!ce)return"pre";if(n.appointConfig.monthChooseItems){let re=n.appointConfig.monthChooseItems.filter(ye=>ye.datetime.split("-")[1]==Z.getMonth()+1&&ye.datetime.split("-")[2]==Z.getDate())[0];return re?re.overtime||re.remainingQuota==0||re.limitFutOver||re.limitPreOver?"able-to-unable":re.canAppoint?"able":"unable":"unable"}},Y=async Z=>{const ce=Z??p.value,re=n.appoint.availableConfig.availableTime.days.map(ue=>{const J=n.appoint.availableConfig.availableTime.dailyTimeRanges.filter(oe=>oe.id===ue.formId)[0];return{open:ue.open,quota:ue.quota,price:ue.price,isPaid:J.isPaid,dailyTimeRangeQuotas:J.dailyTimeRangeQuotas}}),ye=`${ce.getFullYear()}-${ce.getMonth()+1}`,he={appointment_id:n.appoint.basicInfo.id,time:ye,type:n.appoint.availableConfig.availableTime.type,days:re,isPaid:n.appoint.availableConfig.availableTime.isPaid,limitFut:n.appoint.settings.limitFut,limitPre:n.appoint.settings.limitPre,unUseDates:n.appoint.availableConfig.availableDate.unUseDates,canAppointDateRange:n.appoint.availableConfig.availableDate.canAppointRange.isTimeLimit?n.appoint.availableConfig.availableDate.canAppointRange.dateRange:[]},le=await exports.globalInject.$axios.post("/v2/form/getAppointmentTimeList",he);o("editConfig",{...n.appointConfig,monthChooseItems:le.data.result})};return(Z,ce)=>(C(),A(Ae,null,[O(c(J_),{direction:"btt",modelValue:d.value,"onUpdate:modelValue":ce[0]||(ce[0]=re=>d.value=re),title:e.appoint.basicInfo.name,size:"90%",onBeforeClose:y},{default:H(()=>[w("div",d3e,[e.appoint.basicInfo.img[0]!=""?(C(),A("div",f3e,[w("img",{class:"img",src:e.appoint.basicInfo.img[0]},null,8,p3e)])):G("",!0),w("div",v3e,[(C(),A(Ae,null,et(r,(re,ye)=>w("div",{onClick:he=>k(ye),class:B(["date-col",{"normal-text":!0,selected:ye==x(p.value.getDay()),"can-not-choose":["unable","able-to-unable","pre"].includes(V(s.value[ye]))}])},[w("span",null,ie(re),1),w("span",null,ie(z(s.value[ye])),1)],10,h3e)),64)),w("div",{onClick:F,class:"choose-calendar-button"},[w("img",{class:"icon",src:c(Ke)("images/widget/mobile-calendar-icon.png")},null,8,m3e)])]),g3e,w("div",b3e,[(C(!0),A(Ae,null,et(e.appointConfig.chooseTimes.timeRanges,re=>(C(),A("div",{class:B({"choose-item":!0,"item-overtime":re.limitFutOver||re.limitPreOver||re.overtime||re.remainingQuota==0,"time-range-selected":q(re)}),onClick:ye=>U(re)},[w("span",_3e,ie(re.startTime.hour)+":"+ie(re.startTime.minute)+" - "+ie(re.endTime.hour)+":"+ie(re.endTime.minute),1),re.isPaid&&re.price?(C(),A("span",w3e,"¥"+ie(j(re.price)),1)):G("",!0),w("span",$3e,ie(X(re)),1)],10,y3e))),256))]),i.value.length>0?(C(),A("div",C3e,[S3e,(C(!0),A(Ae,null,et(i.value,(re,ye)=>(C(),A("div",E3e,[w("div",k3e,[w("span",null,ie(N(re)),1),re.isPaid?(C(),A("span",I3e,"¥"+ie(j(re.price)),1)):G("",!0)]),e.widgetStore.attrs.multiplyQuota?(C(),A("div",T3e,[O(c(ka),{modelValue:re.quota,"onUpdate:modelValue":he=>re.quota=he,min:1,max:h.value[ye]=="-1"||h.value[ye]==null?1/0:h.value[ye]},null,8,["modelValue","onUpdate:modelValue","max"])])):G("",!0)]))),256))])):G("",!0),O(c(Wt),{onClick:W,class:B({"confirm-button":i.value.length>0,"confirm-button-grey":i.value.length==0})},{default:H(()=>[Fe(" 选好了 ")]),_:1},8,["class"])])]),_:1},8,["modelValue","title"]),O(c(J_),{modelValue:f.value,"onUpdate:modelValue":ce[4]||(ce[4]=re=>f.value=re),direction:"btt",title:"请选择日期",size:"70%",onBeforeClose:y},{default:H(()=>[O(c(xP),{class:"calendar",modelValue:p.value,"onUpdate:modelValue":ce[3]||(ce[3]=re=>p.value=re),ref_key:"calendarRef",ref:g},{header:H(({date:re})=>[w("div",x3e,[w("div",{onClick:ce[1]||(ce[1]=ye=>Q("pre"))},[w("img",{style:{width:"16px"},src:c(Ke)("images/widget/calendar-left-arrow.png")},null,8,A3e)]),w("span",null,ie(re),1),w("div",{onClick:ce[2]||(ce[2]=ye=>Q("next"))},[w("img",{style:{width:"16px"},src:c(Ke)("images/widget/calendar-right-arrow-icon.png")},null,8,O3e)])])]),"date-cell":H(({data:re})=>[w("div",{onClick:ye=>E(re),class:B(["calendar-date",{"calendar-day":V(re.date)=="unable","can-appoint":V(re.date)=="able","pre-day":V(re.date)=="pre","current-day-unable":V(re.date)=="able-to-unable","calendar-date-selected":_(re)}])},[w("span",{class:B({"calendar-text":!0,"calendar-text-selected":_(re)})},ie(re.day.split("-")[2]),3),_(re)?(C(),A("span",{key:0,class:B({text:!0,"text-selected":_(re)})}," 已选 ",2)):G("",!0),V(re.date)=="able"&&!_(re)?(C(),A("span",P3e,ie(S(re.date)),1)):G("",!0)],10,D3e)]),_:1},8,["modelValue"]),i.value.length>0&&e.appoint.availableConfig.availableTime.type=="date"?(C(),A("div",M3e,[N3e,(C(!0),A(Ae,null,et(i.value,(re,ye)=>(C(),A("div",R3e,[w("div",L3e,[w("span",null,ie(N(re)),1),re.isPaid?(C(),A("span",F3e,"¥"+ie(j(re.price)),1)):G("",!0)]),e.widgetStore.attrs.multiplyQuota?(C(),A("div",B3e,[O(c(ka),{modelValue:re.quota,"onUpdate:modelValue":he=>re.quota=he,min:1,max:h.value[ye]=="-1"||h.value[ye]==null?1/0:h.value[ye]},null,8,["modelValue","onUpdate:modelValue","max"])])):(C(),A("div",{key:1,onClick:he=>I(ye)},[w("img",{style:{width:"16px",height:"16px"},src:c(Ke)("images/widget/appoint-delete-icon.png")},null,8,z3e)],8,V3e))]))),256))])):G("",!0),e.appoint.availableConfig.availableTime.type=="time"?(C(),A("div",j3e,[w("div",{onClick:F,class:"select-datetime-button"}," 确定 ")])):G("",!0),e.appoint.availableConfig.availableTime.type=="date"?(C(),ve(c(Wt),{key:2,style:{"margin-top":"40px"},onClick:W,class:B({"confirm-button":i.value.length>0,"confirm-button-grey":i.value.length==0})},{default:H(()=>[Fe(" 选好了 ")]),_:1},8,["class"])):G("",!0)]),_:1},8,["modelValue"])],64))}}),W3e=Ye(U3e,[["__scopeId","data-v-279903a2"]]),Qg=e=>(At("data-v-6050ba0a"),e=e(),Ot(),e),H3e={class:"item-row"},q3e={class:"flex flex-row items-center gap-4"},K3e=["src"],Y3e={class:"title"},G3e={key:0,class:"button-group"},Q3e=["src"],J3e=Qg(()=>w("span",{class:"text"},"编辑",-1)),X3e=Qg(()=>w("span",{class:"text"},"预览",-1)),Z3e=["src"],eDe=["src"],tDe={class:"text"},nDe={key:0},oDe={class:"flex flex-col"},aDe=Qg(()=>w("span",{class:"calendar-title"},"可选日期",-1)),rDe={class:"calendar-header"},sDe={class:"calendar-header-text"},iDe=["onClick"],lDe={key:2,class:"text remainder-text"},uDe={class:"flex flex-col"},cDe=["onClick"],dDe={class:"text"},fDe={key:0,class:"text",style:{color:"#e34152"}},pDe={class:"text"},vDe={key:2,class:"flex flex-col gap-2 w-full"},hDe=Qg(()=>w("div",{class:"divide mt-2.5 mb-1"},null,-1)),mDe={class:"flex flex-row gap-3 mt-3 mb-1"},gDe=["src"],bDe={class:"text-normal-c3d text-sm"},yDe={class:"flex flex-col"},_De={class:"date-text"},wDe={key:0,class:"date-text",style:{color:"#e34152"}},$De={key:0,class:"quota-container"},CDe=["onClick"],SDe=["src"],EDe=se({__name:"appointment",props:{widgetStore:{},appointData:{},appointIndex:null,isEditor:!1,appointsLength:null,isMobileSize:!1,formMode:"",isDragging:!1,appointAnswer:[],isLast:!1},emits:["updateAttr","deleteAppointment","saveAnswers"],setup(e,{emit:t}){const n=P(!1),o=new Date,a=P([]),r=t;P([]);const s=P([]),i=P(),l=P({calendarVisible:!1,selectedDate:o,chooseTimes:[],canAppointTime:[],monthChooseItems:[]}),d=e,{widgetStore:f,appointData:p,appointIndex:h,isEditor:m}=d,b=P(d.appointData),g=le=>{if(d.appointData.availableConfig.availableTime.type=="date")return a.value.findIndex(ue=>ue.appointment_date==le.day)!=-1;if(d.appointData.availableConfig.availableTime.type=="time"){const ue=l.value.monthChooseItems.filter(J=>J.datetime.split("-")[1]==le.date.getMonth()+1&&J.datetime.split("-")[2]==le.date.getDate())[0];if(ue)return le.date.getTime()==new Date(l.value.selectedDate).getTime()&&ue.canAppoint}},y=["周日","周一","周二","周三","周四","周五","周六"],{showConfirm:_}=ul();M(()=>l.value.calendarVisible&&d.isMobileSize),M(()=>{if(!l.value.calendarVisible)return!1;if(!d.isMobileSize||d.isMobileSize&&d.appointData.availableConfig.availableTime.type=="time")return!0}),st(()=>{U()});const I=le=>{console.debug(le,"value111"),b.value=le,r("updateAttr",le,h),Z()};Se(l,le=>{let ue;le.selectedDate?ue=le.selectedDate:ue=o,le.monthChooseItems&&(le.chooseTimes=le.monthChooseItems.filter(J=>J.datetime.split("-")[1]==ue.getMonth()+1&&J.datetime.split("-")[2]==ue.getDate())[0])},{deep:!0}),Se(()=>d,le=>{b.value=d.appointData,a.value=d.appointAnswer??[]},{deep:!0});const k=le=>{if(le.type=="time"){const ue=le.appointment_date.replace(/-/g,"/"),J=le.appointment_time.slice(8,10)+":"+le.appointment_time.slice(10,12),oe=le.appointment_time.slice(12,14)+":"+le.appointment_time.slice(14,16),_e=`${J} - ${oe}`;return`${ue} ${_e}`}else{const ue=le.appointment_date.replace(/-/g,"/"),J=le.appointment_date,oe=new Date(J);return`${ue},${y[oe.getDay()]}`}},E=le=>{a.value.splice(le,1),S()},T=le=>{const ue=l.value.monthChooseItems.find(J=>J.datetime==le.day);ue.overtime||ue.remainingQuota==0||!ue.canAppoint||d.formMode=="input"&&d.appointData.availableConfig.availableTime.type=="date"&&L(le)},x=le=>{Cm({title:le.basicInfo.name,message:()=>_t("div",{style:"word-break:break-all;word-wrap:break-word"},le.basicInfo.desc),confirmButtonText:"知道了"})},S=()=>{r("saveAnswers",a.value,h)},D=le=>{a.value=le,S()},N=le=>{const ue=le._start_time.split(" ")[0],J=le._start_time.split(" ")[1].split(":"),oe=le._end_time.split(" ")[1].split(":");let _e="";return _e+=ue.split("-").join(""),J.map((ge,Me)=>{Me!=2&&(_e=_e+ge)}),oe.map((ge,Me)=>{Me!=2&&(_e=_e+ge)}),a.value.findIndex(ge=>ge.appointment_time===_e)!=-1},L=le=>{if(m)return;const ue=le.day.split("-").join("")+"00002400",J=l.value.monthChooseItems.find(ge=>ge.datetime==le.day),oe={appointment_id:b.value.basicInfo.id,appointment_date:le.day,appointment_time:ue,widget_id:f.id,quota:1,isPaid:J.isPaid,price:J.price,remainingQuota:J.remainingQuota,type:b.value.availableConfig.availableTime.type},_e=a.value.findIndex(ge=>ge.appointment_time===oe.appointment_time);_e==-1?f.attrs.multiplyAvail?(a.value.push(oe),s.value.push(J.remainingQuota)):(a.value=[oe],s.value=[J.remainingQuota]):(a.value.splice(_e,1),s.value.splice(_e,1)),S()},F=le=>{if(le.limitFutOver||le.limitPreOver||m||le.remainingQuota==0||le.overtime)return;const ue=le._start_time.split(" ")[0],J=le._start_time.split(" ")[1].split(":"),oe=le._end_time.split(" ")[1].split(":");let _e="";_e+=ue.split("-").join(""),J.map((ee,ne)=>{ne!=2&&(_e=_e+ee)}),oe.map((ee,ne)=>{ne!=2&&(_e=_e+ee)});const ge={appointment_id:b.value.basicInfo.id,appointment_date:ue,appointment_time:_e,widget_id:f.id,quota:1,price:le.price,isPaid:le.isPaid,remainingQuota:le.remainingQuota,type:b.value.availableConfig.availableTime.type},Me=a.value.findIndex(ee=>ee.appointment_time===ge.appointment_time);Me==-1?f.attrs.multiplyAvail?(a.value.push(ge),s.value.push(le.remainingQuota)):(a.value=[ge],s.value=[le.remainingQuota]):(a.value.splice(Me,1),s.value.splice(Me,1)),S()},z=le=>{l.value=le},j=le=>{const ue=le.toDateString()===o.toDateString();if(le.getTime()<o.getTime()&&!ue)return"pre";if(l.value.monthChooseItems){let J=l.value.monthChooseItems.filter(oe=>oe.datetime.split("-")[1]==le.getMonth()+1&&oe.datetime.split("-")[2]==le.getDate())[0];return J?J.overtime||J.remainingQuota==0||J.limitFutOver||J.limitPreOver?"able-to-unable":J.canAppoint?"able":"unable":"unable"}},X=le=>{if(b.value.settings.displayRemaining)return le.overtime?"过期":le.limitFutOver||le.limitPreOver?"超时":le.remainingQuota<=99?le.remainingQuota==0?"约满":le.remainingQuota==-1||le.remainingQuota==null?"充足":`余${le.remainingQuota}`:"充足"},U=async le=>{const ue=le??l.value.selectedDate,J=b.value.availableConfig.availableTime.days.map(Me=>{const ee=b.value.availableConfig.availableTime.dailyTimeRanges.filter(ne=>ne.id===Me.formId)[0];return{open:Me.open,quota:Me.quota,price:Me.price,isPaid:ee.isPaid,dailyTimeRangeQuotas:ee.dailyTimeRangeQuotas}}),oe=`${ue.getFullYear()}-${ue.getMonth()+1}`,_e={eacb:exports.globalInject.getToken(),time:oe,type:b.value.availableConfig.availableTime.type,appointment_id:b.value.basicInfo.id,days:J,isPaid:b.value.availableConfig.availableTime.isPaid,limitFut:b.value.settings.limitFut,limitPre:b.value.settings.limitPre,unUseDates:b.value.availableConfig.availableDate.unUseDates,canAppointDateRange:b.value.availableConfig.availableDate.canAppointRange.isTimeLimit?b.value.availableConfig.availableDate.canAppointRange.dateRange:[]},ge=await exports.globalInject.$axios.post("/v2/form/getAppointmentTimeList",_e);l.value.monthChooseItems=ge.data.result},W=le=>(parseFloat(le)/100).toFixed(2),Q=()=>{U()},q=()=>{l.value.calendarVisible=!l.value.calendarVisible,l.value.calendarVisible&&U()},V=(le,ue)=>{d.appointsLength!=1&&_({type:"warn",isNew:!0,title:"删除选项",content:`你确定要删除 ${le.basicInfo.name} ?删除后,应用该时段表的日期将不能再正常预约,请谨慎操作。`,cancelText:"取消",confirmText:"删除",onConfirm:()=>{r("deleteAppointment",ue)},onCancel:()=>{}})},Y=(le,ue)=>{const J=l.value.selectedDate,oe=ue=="pre"?J.getMonth()-1:J.getMonth()+1,_e=new Date(J.getFullYear(),oe,J.getDate());U(_e).then(()=>{l.value.selectedDate=_e})},Z=()=>{n.value=!1},ce=le=>{const ue=le.toDateString()===new Date().toDateString(),J=l.value.monthChooseItems.filter(oe=>oe.datetime.split("-")[1]==le.getMonth()+1&&oe.datetime.split("-")[2]==le.getDate())[0];return J?!J.canAppoint||J.overtime?void 0:J.overtime&&ue?"过期":b.value.settings.displayRemaining?b.value.availableConfig.availableTime.type=="date"?he(J.remainingQuota):he(J.timeRangeRemainingQuotas):void 0:""},re=le=>{const ue=l.value.monthChooseItems.filter(J=>J.datetime.split("-")[1]==le.getMonth()+1&&J.datetime.split("-")[2]==le.getDate())[0];if(!(!ue.canAppoint||ue.overtime)&&ue)return`¥${W(ue.price)}`},ye=le=>{if(b.value.availableConfig.availableTime.type=="time")return!1;const ue=l.value.monthChooseItems.filter(J=>J.datetime.split("-")[1]==le.getMonth()+1&&J.datetime.split("-")[2]==le.getDate())[0];if(console.debug(ue,"monthChooseItem"),ue)return ue.isPaid&&ue.price},he=le=>le<=99?le===0?"约满":le==-1||le==null?"充足":`余${le}`:"充足";return(le,ue)=>{const J=Bt("el-button");return C(),A("div",{key:b.value.basicInfo.id,style:Ze({"border-bottom":e.isLast?"":"1px solid #e0e0e0"}),class:B({"appointment-item":!0,"preview-item":!c(m),"mobile-preview-item":e.isMobileSize&&e.formMode=="preview"})},[w("div",H3e,[w("div",q3e,[b.value.basicInfo.img[0]?(C(),A("div",{key:0,class:B({"img-container":!e.isMobileSize,"img-mobile-container":e.isMobileSize,"img-moblie-preview":e.isMobileSize&&e.formMode=="preview"})},[w("img",{class:"img",src:b.value.basicInfo.img[0]},null,8,K3e)],2)):G("",!0),w("div",{class:B({"appoint-center-container":!0,"appoint-center-mobile-preview":e.isMobileSize&&e.formMode=="preview"})},[w("span",Y3e,ie(b.value.basicInfo.name),1),b.value.basicInfo.desc!=""?(C(),ve(c(PM),{key:0,"line-clamp":"2",truncated:"true",class:B({desc:!0,"mobile-preview-desc":e.isMobileSize&&e.formMode=="preview"})},{default:H(()=>[Fe(ie(b.value.basicInfo.desc),1)]),_:1},8,["class"])):G("",!0),b.value.basicInfo.desc.length>70?(C(),ve(J,{key:1,class:"view-detail-button",link:"",type:"primary",onClick:ue[0]||(ue[0]=oe=>x(b.value))},{default:H(()=>[Fe("查看详情")]),_:1})):G("",!0)],2)]),c(m)?(C(),A("div",G3e,[w("div",{onClick:ue[1]||(ue[1]=()=>{n.value=!0}),class:"button"},[w("img",{class:"img-icon",src:c(Ke)("images/widget/appointment-edit.png")},null,8,Q3e),J3e]),w("div",{onClick:ue[2]||(ue[2]=oe=>q()),class:"button"},[X3e,w("i",{class:B({icon:!0,"el-icon-arrow-up":l.value.calendarVisible,"el-icon-arrow-down":!l.value.calendarVisible})},null,2)]),w("div",{onClick:ue[3]||(ue[3]=oe=>V(b.value,c(h))),class:"button"},[w("img",{class:"img-icon",src:c(Ke)(e.appointsLength==1?"images/widget/appoint-cancelIcon.png":"images/widget/appoint-cancelIconDefault.png")},null,8,Z3e),w("span",{class:B({text:!0,"disable-text":e.appointsLength==1})},"删除",2)])])):(C(),A("div",{key:1,class:B({"selected-button":a.value.length>0,"unSelected-button":a.value.length==0,"mobile-preview-button":e.isMobileSize&&e.formMode=="preview"}),onClick:ue[4]||(ue[4]=oe=>q())},[e.isMobileSize?G("",!0):(C(),A("img",{key:0,class:"icon",src:c(Ke)(a.value.length>0?"images/widget/appoint-selected-icon.png":"images/widget/appoint-unselected-icon.png")},null,8,eDe)),w("span",tDe,ie(a.value.length>0?"已选":"预约"),1)],2))]),e.isMobileSize&&e.formMode=="input"?(C(),A("div",nDe,[O(W3e,{visible:l.value.calendarVisible,appoint:b.value,appointConfig:l.value,answer:a.value,widgetId:c(f).id,appointIndex:c(h),formMode:e.formMode,isMobileSize:e.isMobileSize,widgetStore:c(f),onSaveAnswers:D,onEditConfig:z,onClose:ue[5]||(ue[5]=oe=>l.value.calendarVisible=!1)},null,8,["visible","appoint","appointConfig","answer","widgetId","appointIndex","formMode","isMobileSize","widgetStore"])])):(C(),A("div",{key:1,class:B({"calendar-container":!0,"calendar-visible":l.value.calendarVisible,"pc-preview":l.value.calendarVisible&&!e.isMobileSize,"mobile-time-preview":l.value.calendarVisible&&e.isMobileSize&&b.value.availableConfig.availableTime.type=="time"})},[w("div",{class:B({"flex flex-row gap-5 mb-5":!e.isMobileSize,"flex flex-col":e.isMobileSize})},[w("div",oDe,[aDe,O(c(xP),{modelValue:l.value.selectedDate,"onUpdate:modelValue":ue[8]||(ue[8]=oe=>l.value.selectedDate=oe),class:"calendar",style:Ze(e.isMobileSize?"":"min-width: 284px;"),ref_key:"calendarRef",ref:i},{header:H(({date:oe})=>[w("div",rDe,[w("i",{onClick:ue[6]||(ue[6]=_e=>Y(b.value,"pre")),class:"icon el-icon-arrow-left"}),w("span",sDe,ie(oe),1),w("i",{onClick:ue[7]||(ue[7]=_e=>Y(b.value,"next")),class:"icon el-icon-arrow-right"})])]),"date-cell":H(({data:oe})=>[w("div",{onClick:_e=>T(oe),class:B(["calendar-date",{"calendar-day":j(oe.date)=="unable","can-appoint":j(oe.date)=="able","pre-day":j(oe.date)=="pre","current-day-unable":j(oe.date)=="able-to-unable","calendar-date-selected":g(oe)}])},[w("span",{class:B({"calendar-text":!0,"calendar-text-selected":g(oe)})},ie(oe.day.split("-")[2]),3),ye(oe.date)?(C(),A("span",{key:0,class:B({"calendar-text":!0,"calendar-text-selected":g(oe)}),style:Ze(g(oe)?"color:#FFF":"color:#E34152")},ie(re(oe.date)),7)):G("",!0),g(oe)?(C(),A("span",{key:1,class:B({text:!0,"calendar-selected-text":g(oe)})}," 已选 ",2)):G("",!0),g(oe)?G("",!0):(C(),A("span",lDe,ie(ce(oe.date)),1))],10,iDe)]),_:1},8,["modelValue","style"])]),Et(w("div",uDe,[w("span",{style:Ze({"margin-top":e.formMode=="preview"?"24px":""}),class:"calendar-title"},"可选时段",4),w("div",{class:"choose-container",style:Ze(e.isMobileSize?"width:auto":"width: 280px;")},[(C(!0),A(Ae,null,et(l.value.chooseTimes.timeRanges,oe=>(C(),A("div",{class:B({"choose-item":!0,"item-overtime":oe.limitFutOver||oe.limitPreOver||oe.overtime||oe.remainingQuota==0,"time-range-selected":N(oe),"preview-mobile-item":e.formMode=="preview"&&e.isMobileSize}),style:Ze(e.isMobileSize?"min-width:111px":"min-width: 136px;"),onClick:_e=>F(oe)},[w("span",dDe,ie(oe.startTime.hour)+":"+ie(oe.startTime.minute)+" - "+ie(oe.endTime.hour)+":"+ie(oe.endTime.minute),1),oe.isPaid&&oe.price?(C(),A("span",fDe,"¥"+ie(W(oe.price)),1)):G("",!0),w("span",pDe,ie(X(oe)),1)],14,cDe))),256))],4)],512),[[nn,b.value.availableConfig.availableTime.type=="time"]])],2)],2)),!c(m)&&a.value.length>0?(C(),A("div",vDe,[hDe,w("div",mDe,[e.isMobileSize?(C(),A("img",{key:0,style:{width:"20px"},src:c(Ke)("images/widget/appoint-unselected-icon.png")},null,8,gDe)):G("",!0),w("span",bDe,ie(e.isMobileSize?"预选日期":"已选日期/时间段"),1)]),(C(!0),A(Ae,null,et(a.value,(oe,_e)=>(C(),A("div",{class:B({"appoint-container":!e.isMobileSize,"appoint-container-mobile":e.isMobileSize})},[w("div",yDe,[w("span",_De,ie(k(oe)),1),oe.isPaid&&oe.price&&!e.isMobileSize?(C(),A("span",wDe,"¥"+ie(W(oe.price)),1)):G("",!0)]),!e.isMobileSize&&c(f).attrs.multiplyQuota?(C(),A("div",$De,[O(c(ka),{modelValue:oe.quota,"onUpdate:modelValue":ge=>oe.quota=ge,min:1,onChange:S,max:s.value[_e]=="-1"||s.value[_e]==null?1/0:s.value[_e]},null,8,["modelValue","onUpdate:modelValue","max"])])):G("",!0),!e.isMobileSize&&!c(f).attrs.multiplyQuota?(C(),A("div",{key:1,onClick:ge=>E(_e)},[w("img",{style:{width:"16px",height:"16px",cursor:"pointer"},src:c(Ke)("images/widget/appoint-delete-icon.png")},null,8,SDe)],8,CDe)):G("",!0)],2))),256))])):G("",!0),n.value?(C(),ve(c3e,{key:3,widgetId:c(f).id,appointmentItem:b.value,visible:n.value,onClose:Z,onSave:I,onUpdatePreview:Q},null,8,["widgetId","appointmentItem","visible"])):G("",!0)],6)}}}),kDe=Ye(EDe,[["__scopeId","data-v-6050ba0a"]]);var IDe=Object.defineProperty,Om=Object.getOwnPropertySymbols,j8=Object.prototype.hasOwnProperty,U8=Object.prototype.propertyIsEnumerable,pA=(e,t,n)=>t in e?IDe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,W8=(e,t)=>{for(var n in t||(t={}))j8.call(t,n)&&pA(e,n,t[n]);if(Om)for(var n of Om(t))U8.call(t,n)&&pA(e,n,t[n]);return e},TDe=(e,t)=>{var n={};for(var o in e)j8.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Om)for(var o of Om(e))t.indexOf(o)<0&&U8.call(e,o)&&(n[o]=e[o]);return n};const H8="[vue-draggable-plus]: ";function xDe(e){console.warn(H8+e)}function ADe(e){console.error(H8+e)}function vA(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function ODe(e,t){if(Array.isArray(e))return e.splice(t,1)}function DDe(e,t,n){if(Array.isArray(e))return e.splice(t,0,n)}function PDe(e){return typeof e>"u"}function MDe(e){return typeof e=="string"}function hA(e,t,n){const o=e.children[n];e.insertBefore(t,o)}function w0(e){e.parentNode&&e.parentNode.removeChild(e)}function NDe(e,t=document){var n;let o=null;return typeof(t==null?void 0:t.querySelector)=="function"?o=(n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,e):o=document.querySelector(e),o||xDe(`Element not found: ${e}`),o}function RDe(e,t,n=null){return function(...o){return e.apply(n,o),t.apply(n,o)}}function LDe(e,t){const n=W8({},e);return Object.keys(t).forEach(o=>{n[o]?n[o]=RDe(e[o],t[o]):n[o]=t[o]}),n}function FDe(e){return e instanceof HTMLElement}function BDe(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}/**!
106
+ }`;var Zt=zE(function(){return Sn(ae,St+"return "+Ge).apply(n,pe)});if(Zt.source=Ge,xy(Zt))throw Zt;return Zt}function l9(u){return Tn(u).toLowerCase()}function u9(u){return Tn(u).toUpperCase()}function c9(u,v,$){if(u=Tn(u),u&&($||v===n))return QS(u);if(!u||!(v=Da(v)))return u;var R=xr(u),K=xr(v),ae=JS(R,K),pe=XS(R,K)+1;return yi(R,ae,pe).join("")}function d9(u,v,$){if(u=Tn(u),u&&($||v===n))return u.slice(0,e2(u)+1);if(!u||!(v=Da(v)))return u;var R=xr(u),K=XS(R,xr(v))+1;return yi(R,0,K).join("")}function f9(u,v,$){if(u=Tn(u),u&&($||v===n))return u.replace(fd,"");if(!u||!(v=Da(v)))return u;var R=xr(u),K=JS(R,xr(v));return yi(R,K).join("")}function p9(u,v){var $=L,R=F;if(ro(v)){var K="separator"in v?v.separator:K;$="length"in v?Jt(v.length):$,R="omission"in v?Da(v.omission):R}u=Tn(u);var ae=u.length;if(Cu(u)){var pe=xr(u);ae=pe.length}if($>=ae)return u;var me=$-Su(R);if(me<1)return R;var Ee=pe?yi(pe,0,me).join(""):u.slice(0,me);if(K===n)return Ee+R;if(pe&&(me+=Ee.length-me),Ay(K)){if(u.slice(me).search(K)){var He,qe=Ee;for(K.global||(K=qb(K.source,Tn(Is.exec(K))+"g")),K.lastIndex=0;He=K.exec(qe);)var Ge=He.index;Ee=Ee.slice(0,Ge===n?me:Ge)}}else if(u.indexOf(Da(K),me)!=me){var vt=Ee.lastIndexOf(K);vt>-1&&(Ee=Ee.slice(0,vt))}return Ee+R}function v9(u){return u=Tn(u),u&&ho.test(u)?u.replace(zt,UR):u}var h9=Ou(function(u,v,$){return u+($?" ":"")+v.toUpperCase()}),Py=j2("toUpperCase");function VE(u,v,$){return u=Tn(u),v=$?n:v,v===n?FR(u)?qR(u):xR(u):u.match(v)||[]}var zE=tn(function(u,v){try{return Aa(u,n,v)}catch($){return xy($)?$:new Ht($)}}),m9=Ps(function(u,v){return Za(v,function($){$=is($),Os(u,$,Iy(u[$],u))}),u});function g9(u){var v=u==null?0:u.length,$=Rt();return u=v?to(u,function(R){if(typeof R[1]!="function")throw new er(s);return[$(R[0]),R[1]]}):[],tn(function(R){for(var K=-1;++K<v;){var ae=u[K];if(Aa(ae[0],this,R))return Aa(ae[1],this,R)}})}function b9(u){return UL(nr(u,p))}function My(u){return function(){return u}}function y9(u,v){return u==null||u!==u?v:u}var _9=W2(),w9=W2(!0);function ga(u){return u}function Ny(u){return _2(typeof u=="function"?u:nr(u,p))}function $9(u){return $2(nr(u,p))}function C9(u,v){return C2(u,nr(v,p))}var S9=tn(function(u,v){return function($){return wd($,u,v)}}),E9=tn(function(u,v){return function($){return wd(u,$,v)}});function Ry(u,v,$){var R=Lo(v),K=_v(v,R);$==null&&!(ro(v)&&(K.length||!R.length))&&($=v,v=u,u=this,K=_v(v,Lo(v)));var ae=!(ro($)&&"chain"in $)||!!$.chain,pe=Ns(u);return Za(K,function(me){var Ee=v[me];u[me]=Ee,pe&&(u.prototype[me]=function(){var He=this.__chain__;if(ae||He){var qe=u(this.__wrapped__),Ge=qe.__actions__=va(this.__actions__);return Ge.push({func:Ee,args:arguments,thisArg:u}),qe.__chain__=He,qe}return Ee.apply(u,pi([this.value()],arguments))})}),u}function k9(){return Bo._===this&&(Bo._=XR),this}function Ly(){}function I9(u){return u=Jt(u),tn(function(v){return S2(v,u)})}var T9=vy(to),x9=vy(HS),A9=vy(Bb);function jE(u){return wy(u)?Vb(is(u)):s5(u)}function O9(u){return function(v){return u==null?n:wl(u,v)}}var D9=q2(),P9=q2(!0);function Fy(){return[]}function By(){return!1}function M9(){return{}}function N9(){return""}function R9(){return!0}function L9(u,v){if(u=Jt(u),u<1||u>q)return[];var $=Z,R=qo(u,Z);v=Rt(v),u-=Z;for(var K=Ub(R,v);++$<u;)v($);return K}function F9(u){return qt(u)?to(u,is):Pa(u)?[u]:va(lE(Tn(u)))}function B9(u){var v=++QR;return Tn(u)+v}var V9=kv(function(u,v){return u+v},0),z9=hy("ceil"),j9=kv(function(u,v){return u/v},1),U9=hy("floor");function W9(u){return u&&u.length?yv(u,ga,ey):n}function H9(u,v){return u&&u.length?yv(u,Rt(v,2),ey):n}function q9(u){return YS(u,ga)}function K9(u,v){return YS(u,Rt(v,2))}function Y9(u){return u&&u.length?yv(u,ga,ay):n}function G9(u,v){return u&&u.length?yv(u,Rt(v,2),ay):n}var Q9=kv(function(u,v){return u*v},1),J9=hy("round"),X9=kv(function(u,v){return u-v},0);function Z9(u){return u&&u.length?jb(u,ga):0}function e7(u,v){return u&&u.length?jb(u,Rt(v,2)):0}return te.after=$B,te.ary=yE,te.assign=uV,te.assignIn=PE,te.assignInWith=Bv,te.assignWith=cV,te.at=dV,te.before=_E,te.bind=Iy,te.bindAll=m9,te.bindKey=wE,te.castArray=MB,te.chain=mE,te.chunk=U5,te.compact=W5,te.concat=H5,te.cond=g9,te.conforms=b9,te.constant=My,te.countBy=ZF,te.create=fV,te.curry=$E,te.curryRight=CE,te.debounce=SE,te.defaults=pV,te.defaultsDeep=vV,te.defer=CB,te.delay=SB,te.difference=q5,te.differenceBy=K5,te.differenceWith=Y5,te.drop=G5,te.dropRight=Q5,te.dropRightWhile=J5,te.dropWhile=X5,te.fill=Z5,te.filter=tB,te.flatMap=aB,te.flatMapDeep=rB,te.flatMapDepth=sB,te.flatten=fE,te.flattenDeep=eF,te.flattenDepth=tF,te.flip=EB,te.flow=_9,te.flowRight=w9,te.fromPairs=nF,te.functions=wV,te.functionsIn=$V,te.groupBy=iB,te.initial=aF,te.intersection=rF,te.intersectionBy=sF,te.intersectionWith=iF,te.invert=SV,te.invertBy=EV,te.invokeMap=uB,te.iteratee=Ny,te.keyBy=cB,te.keys=Lo,te.keysIn=ma,te.map=Pv,te.mapKeys=IV,te.mapValues=TV,te.matches=$9,te.matchesProperty=C9,te.memoize=Nv,te.merge=xV,te.mergeWith=ME,te.method=S9,te.methodOf=E9,te.mixin=Ry,te.negate=Rv,te.nthArg=I9,te.omit=AV,te.omitBy=OV,te.once=kB,te.orderBy=dB,te.over=T9,te.overArgs=IB,te.overEvery=x9,te.overSome=A9,te.partial=Ty,te.partialRight=EE,te.partition=fB,te.pick=DV,te.pickBy=NE,te.property=jE,te.propertyOf=O9,te.pull=dF,te.pullAll=vE,te.pullAllBy=fF,te.pullAllWith=pF,te.pullAt=vF,te.range=D9,te.rangeRight=P9,te.rearg=TB,te.reject=hB,te.remove=hF,te.rest=xB,te.reverse=Ey,te.sampleSize=gB,te.set=MV,te.setWith=NV,te.shuffle=bB,te.slice=mF,te.sortBy=wB,te.sortedUniq=CF,te.sortedUniqBy=SF,te.split=a9,te.spread=AB,te.tail=EF,te.take=kF,te.takeRight=IF,te.takeRightWhile=TF,te.takeWhile=xF,te.tap=WF,te.throttle=OB,te.thru=Dv,te.toArray=AE,te.toPairs=RE,te.toPairsIn=LE,te.toPath=F9,te.toPlainObject=DE,te.transform=RV,te.unary=DB,te.union=AF,te.unionBy=OF,te.unionWith=DF,te.uniq=PF,te.uniqBy=MF,te.uniqWith=NF,te.unset=LV,te.unzip=ky,te.unzipWith=hE,te.update=FV,te.updateWith=BV,te.values=Mu,te.valuesIn=VV,te.without=RF,te.words=VE,te.wrap=PB,te.xor=LF,te.xorBy=FF,te.xorWith=BF,te.zip=VF,te.zipObject=zF,te.zipObjectDeep=jF,te.zipWith=UF,te.entries=RE,te.entriesIn=LE,te.extend=PE,te.extendWith=Bv,Ry(te,te),te.add=V9,te.attempt=zE,te.camelCase=WV,te.capitalize=FE,te.ceil=z9,te.clamp=zV,te.clone=NB,te.cloneDeep=LB,te.cloneDeepWith=FB,te.cloneWith=RB,te.conformsTo=BB,te.deburr=BE,te.defaultTo=y9,te.divide=j9,te.endsWith=HV,te.eq=Or,te.escape=qV,te.escapeRegExp=KV,te.every=eB,te.find=nB,te.findIndex=cE,te.findKey=hV,te.findLast=oB,te.findLastIndex=dE,te.findLastKey=mV,te.floor=U9,te.forEach=gE,te.forEachRight=bE,te.forIn=gV,te.forInRight=bV,te.forOwn=yV,te.forOwnRight=_V,te.get=Oy,te.gt=VB,te.gte=zB,te.has=CV,te.hasIn=Dy,te.head=pE,te.identity=ga,te.includes=lB,te.indexOf=oF,te.inRange=jV,te.invoke=kV,te.isArguments=Sl,te.isArray=qt,te.isArrayBuffer=jB,te.isArrayLike=ha,te.isArrayLikeObject=mo,te.isBoolean=UB,te.isBuffer=_i,te.isDate=WB,te.isElement=HB,te.isEmpty=qB,te.isEqual=KB,te.isEqualWith=YB,te.isError=xy,te.isFinite=GB,te.isFunction=Ns,te.isInteger=kE,te.isLength=Lv,te.isMap=IE,te.isMatch=QB,te.isMatchWith=JB,te.isNaN=XB,te.isNative=ZB,te.isNil=tV,te.isNull=eV,te.isNumber=TE,te.isObject=ro,te.isObjectLike=uo,te.isPlainObject=Id,te.isRegExp=Ay,te.isSafeInteger=nV,te.isSet=xE,te.isString=Fv,te.isSymbol=Pa,te.isTypedArray=Pu,te.isUndefined=oV,te.isWeakMap=aV,te.isWeakSet=rV,te.join=lF,te.kebabCase=YV,te.last=ar,te.lastIndexOf=uF,te.lowerCase=GV,te.lowerFirst=QV,te.lt=sV,te.lte=iV,te.max=W9,te.maxBy=H9,te.mean=q9,te.meanBy=K9,te.min=Y9,te.minBy=G9,te.stubArray=Fy,te.stubFalse=By,te.stubObject=M9,te.stubString=N9,te.stubTrue=R9,te.multiply=Q9,te.nth=cF,te.noConflict=k9,te.noop=Ly,te.now=Mv,te.pad=JV,te.padEnd=XV,te.padStart=ZV,te.parseInt=e9,te.random=UV,te.reduce=pB,te.reduceRight=vB,te.repeat=t9,te.replace=n9,te.result=PV,te.round=J9,te.runInContext=Ce,te.sample=mB,te.size=yB,te.snakeCase=o9,te.some=_B,te.sortedIndex=gF,te.sortedIndexBy=bF,te.sortedIndexOf=yF,te.sortedLastIndex=_F,te.sortedLastIndexBy=wF,te.sortedLastIndexOf=$F,te.startCase=r9,te.startsWith=s9,te.subtract=X9,te.sum=Z9,te.sumBy=e7,te.template=i9,te.times=L9,te.toFinite=Rs,te.toInteger=Jt,te.toLength=OE,te.toLower=l9,te.toNumber=rr,te.toSafeInteger=lV,te.toString=Tn,te.toUpper=u9,te.trim=c9,te.trimEnd=d9,te.trimStart=f9,te.truncate=p9,te.unescape=v9,te.uniqueId=B9,te.upperCase=h9,te.upperFirst=Py,te.each=gE,te.eachRight=bE,te.first=pE,Ry(te,function(){var u={};return rs(te,function(v,$){Dn.call(te.prototype,$)||(u[$]=v)}),u}(),{chain:!1}),te.VERSION=o,Za(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){te[u].placeholder=te}),Za(["drop","take"],function(u,v){ln.prototype[u]=function($){$=$===n?1:Ao(Jt($),0);var R=this.__filtered__&&!v?new ln(this):this.clone();return R.__filtered__?R.__takeCount__=qo($,R.__takeCount__):R.__views__.push({size:qo($,Z),type:u+(R.__dir__<0?"Right":"")}),R},ln.prototype[u+"Right"]=function($){return this.reverse()[u]($).reverse()}}),Za(["filter","map","takeWhile"],function(u,v){var $=v+1,R=$==X||$==W;ln.prototype[u]=function(K){var ae=this.clone();return ae.__iteratees__.push({iteratee:Rt(K,3),type:$}),ae.__filtered__=ae.__filtered__||R,ae}}),Za(["head","last"],function(u,v){var $="take"+(v?"Right":"");ln.prototype[u]=function(){return this[$](1).value()[0]}}),Za(["initial","tail"],function(u,v){var $="drop"+(v?"":"Right");ln.prototype[u]=function(){return this.__filtered__?new ln(this):this[$](1)}}),ln.prototype.compact=function(){return this.filter(ga)},ln.prototype.find=function(u){return this.filter(u).head()},ln.prototype.findLast=function(u){return this.reverse().find(u)},ln.prototype.invokeMap=tn(function(u,v){return typeof u=="function"?new ln(this):this.map(function($){return wd($,u,v)})}),ln.prototype.reject=function(u){return this.filter(Rv(Rt(u)))},ln.prototype.slice=function(u,v){u=Jt(u);var $=this;return $.__filtered__&&(u>0||v<0)?new ln($):(u<0?$=$.takeRight(-u):u&&($=$.drop(u)),v!==n&&(v=Jt(v),$=v<0?$.dropRight(-v):$.take(v-u)),$)},ln.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},ln.prototype.toArray=function(){return this.take(Z)},rs(ln.prototype,function(u,v){var $=/^(?:filter|find|map|reject)|While$/.test(v),R=/^(?:head|last)$/.test(v),K=te[R?"take"+(v=="last"?"Right":""):v],ae=R||/^find/.test(v);K&&(te.prototype[v]=function(){var pe=this.__wrapped__,me=R?[1]:arguments,Ee=pe instanceof ln,He=me[0],qe=Ee||qt(pe),Ge=function(rn){var cn=K.apply(te,pi([rn],me));return R&&vt?cn[0]:cn};qe&&$&&typeof He=="function"&&He.length!=1&&(Ee=qe=!1);var vt=this.__chain__,St=!!this.__actions__.length,Lt=ae&&!vt,Zt=Ee&&!St;if(!ae&&qe){pe=Zt?pe:new ln(this);var Ft=u.apply(pe,me);return Ft.__actions__.push({func:Dv,args:[Ge],thisArg:n}),new tr(Ft,vt)}return Lt&&Zt?u.apply(this,me):(Ft=this.thru(Ge),Lt?R?Ft.value()[0]:Ft.value():Ft)})}),Za(["pop","push","shift","sort","splice","unshift"],function(u){var v=av[u],$=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",R=/^(?:pop|shift)$/.test(u);te.prototype[u]=function(){var K=arguments;if(R&&!this.__chain__){var ae=this.value();return v.apply(qt(ae)?ae:[],K)}return this[$](function(pe){return v.apply(qt(pe)?pe:[],K)})}}),rs(ln.prototype,function(u,v){var $=te[v];if($){var R=$.name+"";Dn.call(Tu,R)||(Tu[R]=[]),Tu[R].push({name:v,func:$})}}),Tu[Ev(n,_).name]=[{name:"wrapper",func:n}],ln.prototype.clone=vL,ln.prototype.reverse=hL,ln.prototype.value=mL,te.prototype.at=HF,te.prototype.chain=qF,te.prototype.commit=KF,te.prototype.next=YF,te.prototype.plant=QF,te.prototype.reverse=JF,te.prototype.toJSON=te.prototype.valueOf=te.prototype.value=XF,te.prototype.first=te.prototype.head,vd&&(te.prototype[vd]=GF),te},Eu=KR();ml?((ml.exports=Eu)._=Eu,Nb._=Eu):Bo._=Eu}).call(io)})(Im,Im.exports);var Xl=Im.exports;const awe=["eduRadio","eduJudgement","eduImgRadio","eduSelect"],rwe=["eduCheckbox","eduImgCheckbox"],swe=e=>e.attrs.score??0,iwe=(e,t)=>{if(!t)return 0;if(t instanceof Array)switch(e.attrs.scoreType){case"single":return Xl.isEqual(Xl.sortBy(e.attrs.standard.map(a=>a.id)),Xl.sortBy(t.map(a=>a.id||a)))?e.attrs.score:0;case"cumulative":let n=0;for(const a of t){console.log("item: ",a);let r=e.attrs.standard.find(s=>s.id===((a==null?void 0:a.id)||a));if(r)n+=r.mark;else return 0}return n;case"multiple":let o=0;return t.map(a=>{let r=e.attrs.standard.find(s=>s.id===(a.id||a));r&&(o+=r.mark)}),o;default:return 0}else{switch(e.attrs.scoreType){case"single":return(t.id||t)===e.attrs.standard[0].id?e.attrs.score:0;case"multiple":let n=e.attrs.standard.find(o=>o.id===(t.id||t));return n?n.mark:0}return 0}},lwe=(e,t)=>{if(!t||typeof e.attrs.score!="number")return 0;const n=gu.find(o=>o.value===e.attrs.scoreType);return n?n.compare(t,e.attrs.standard)?e.attrs.score:0:(console.warn("getInputScore",`scoreType ${e.attrs.scoreType} not found`),0)},uwe=(e,t)=>{if(!t||typeof e.attrs.score!="number")return 0;const n=Mp.find(o=>o.value===e.attrs.scoreType);return n?n.compare(t,e.attrs.standard)?e.attrs.score:0:(console.warn("getNumberScore",`scoreType ${e.attrs.scoreType} not found`),0)},ti=e=>{if(e.attrs.standard=e.attrs.standard.filter(t=>(e.attrs.list||e.attrs.options).some(n=>n.value===t.id)),awe.includes(e.type))switch(e.attrs.scoreType){case"single":e.attrs.standard.length?e.attrs.score=e.attrs.standard[0].mark:e.attrs.score=0;return;case"multiple":let t=Xl.maxBy(e.attrs.standard,"mark");t&&(e.attrs.score=t==null?void 0:t.mark);return}if(rwe.includes(e.type))switch(e.attrs.scoreType){case"cumulative":e.attrs.score=Xl.reduce(e.attrs.standard,function(t,n){return t+n.mark},0),console.log("widget.attrs.score: ",e.attrs.score);return;case"single":e.attrs.standard.length||(e.attrs.score=0);return;case"multiple":e.attrs.score=Xl.reduce(e.attrs.standard,function(t,n){return t+n.mark},0);return}},p8=(e,t)=>{switch(e.type){case"eduRadio":case"eduCheckbox":case"eduJudgement":case"eduImgRadio":case"eduImgCheckbox":case"eduSelect":return iwe(e,t);case"fillBlank2":case"shortAnswer2":return lwe(e,t);case"numberFillBlank":return uwe(e,t);default:return 0}},kn=P(null),zg=M(()=>kn.value&&ZC().find(t=>t.id===kn.value)||null),cwe=M(()=>{const e=nt.value.findIndex(t=>t.id===kn.value);return e===-1?null:e}),o1=M(()=>{var e;return(e=zg.value)==null?void 0:e.type}),v8=M(()=>{var e;return(e=zg.value)==null?void 0:e.attrs}),dwe=M(()=>o1.value?JC[o1.value]:null),Vf=e=>{kn.value!==e&&(kn.value=e)},zf=async e=>{if(!e){console.warn("scrollToWidget","widgetId not found!");return}const t=document.querySelectorAll(`[data-widget-id="${e}"]`);if(!t.length){console.warn("scrollToWidget","elements not found!");return}t.forEach(n=>{n.scrollIntoView({behavior:"smooth",block:"start",inline:"start"})})},fwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.minLength=e,nt.value[t].attrs.hasOwnProperty("required")&&(e===0?nt.value[t].attrs.required&&(nt.value[t].attrs.required=!1):e&&e>0&&(nt.value[t].attrs.required||(nt.value[t].attrs.required=!0)))},pwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.maxLength=e},vwe=(e,t)=>{Io.value.attrs[e]=t},Xt=({id:e=kn.value,attr:t,value:n})=>{const o=nt.value.find(a=>a.id===e);if(!o){console.warn("widget not found!");return}o.attrs[t]===void 0&&console.warn("attr not found! add new attr: ",t),o.attrs[t]=n},a1=(e,t)=>{const n=nt.value.findIndex(o=>o.id===kn.value);if(n===-1){console.warn("widget not found!");return}nt.value[n].attrs[e]=t},hwe=(e,t)=>{const n=nt.value.findIndex(o=>o.id===kn.value);if(n===-1){console.warn("widget not found!");return}nt.value[n].attrs[e]=t},ou=(e,t)=>{const n=nt.value.findIndex(o=>o.id===e);if(n===-1){console.warn("widget not found!");return}nt.value[n].attrs.list=[...nt.value[n].attrs.list,...t]},B$=(e,t)=>{const n=nt.value.find(o=>o.id===e);if(!n){console.warn("widget not found!");return}n.attrs.list=n.attrs.list.filter(o=>o.value!==t),n.attrs.standard&&ti(n)},mwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.placeholder=e},V$=(e,t)=>{const n=nt.value.findIndex(a=>a.id===kn.value);if(n===-1)return;const o=nt.value[n].attrs.list.findIndex(a=>a.value===e);if(o===-1){console.warn("option not found!");return}nt.value[n].attrs.list[o].label=t},gwe=(e,t)=>{const n=nt.value.findIndex(a=>a.id===kn.value);if(n===-1)return;const o=nt.value[n].attrs.list.findIndex(a=>a.value===e);if(o===-1){console.warn("option not found!");return}nt.value[n].attrs.list[o].input=t},bwe=(e,t)=>{const n=nt.value.findIndex(a=>a.id===kn.value);if(n===-1)return;const o=nt.value[n].attrs.list.findIndex(a=>a.value===e);if(o===-1){console.warn("option not found!");return}nt.value[n].attrs.list[o].supplyInput=t},ywe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.min=e},_we=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.max=e},h8=(e,t=kn.value)=>{const n=nt.value.findIndex(o=>o.id===t);if(n===-1){console.warn("widget not found!");return}if(nt.value[n].attrs.required=e,nt.value[n].attrs.hasOwnProperty("minLength")){const o=nt.value[n].attrs.minLength;e?o||(nt.value[n].attrs.minLength=1):o&&(nt.value[n].attrs.minLength=0)}},wwe=e=>{nt.value.forEach(t=>{Object.hasOwnProperty.call(t.attrs,"required")&&h8(e,t.id)})},$we=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.optionRandom=e},Cwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);t!==-1&&(nt.value[t].attrs.rows=e)},Swe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);t!==-1&&(nt.value[t].attrs={...nt.value[t].attrs,...e})},Ewe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.multiplyAppoint=e},kwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.multiplyQuota=e},Iwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.multiplyAvail=e},Ep=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.viewVoteRate=e},Twe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.prefixStock=e},xwe=e=>{const t=nt.value.findIndex(n=>n.id===kn.value);if(t===-1){console.warn("widget not found!");return}nt.value[t].attrs.suffixStock=e},jf=se({__name:"index",props:{type:{}},setup(e){return(t,n)=>(C(),A("i",{class:B(`iconfont icon-form-${t.type}`)},null,2))}}),Awe={class:"confirm-basic-body"},Owe=["innerHTML"],Dwe=se({__name:"index",props:Yi({type:{default:"info"},isNew:{type:Boolean},title:{default:"提示"},content:{default:""},cancelText:{default:"取消"},confirmText:{default:"确认"},confirmColor:{default:"info"},confirmDisabled:{type:Boolean,default:!1},showCancel:{type:Boolean,default:!0},width:{default:460},transform:{default:"translateY(-50%)"}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:Yi(["confirm","cancel","closed"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,a=Gr(e,"modelValue"),r=M(()=>n.confirmColor==="error"?"#EA0000":n.confirmColor==="warn"?"#FFA940":"#2278FF"),s=()=>{o("confirm"),a.value=!1},i=()=>{o("cancel"),a.value=!1};return(l,d)=>(C(),ve(c(Ga),{class:"confirm-basic",style:Ze({transform:l.transform}),modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),width:l.width,"close-on-click-modal":!1,"close-on-press-escape":!1,"align-center":!0,"show-close":l.showCancel,onClosed:d[1]||(d[1]=f=>o("closed"))},{default:H(()=>[w("div",Awe,[w("div",{class:B({"confirm-title":!0,"confirm-title-new":l.isNew})},[l.type==="warn"?(C(),ve(jf,{key:0,type:"circle-notice",class:"warn-icon"})):G("",!0),l.type==="error"?(C(),ve(jf,{key:1,type:"triangle-notice",class:"error-icon"})):G("",!0),Fe(" "+ie(l.title),1)],2),l.content?(C(),A("div",{key:0,class:B({"confirm-content":!0,"confirm-content-new":l.isNew,error:l.type==="error"}),innerHTML:l.content},null,10,Owe)):G("",!0)])]),footer:H(()=>[l.$slots.footer?xe(l.$slots,"footer",{key:0},void 0,!0):(C(),A("div",{key:1,class:B({"confirm-basic-footer":!l.isNew,"confirm-basic-footer-new":l.isNew})},[l.showCancel?(C(),ve(c(Wt),{key:0,class:"button",plain:!0,onClick:i},{default:H(()=>[Fe(ie(l.cancelText),1)]),_:1})):G("",!0),O(c(Wt),{class:"button",type:"primary",disabled:l.confirmDisabled,color:r.value,onClick:s},{default:H(()=>[Fe(ie(l.confirmText),1)]),_:1},8,["disabled","color"])],2))]),_:3},8,["style","modelValue","width","show-close"]))}}),m8=Ye(Dwe,[["__scopeId","data-v-bef5583d"]]),ul=()=>({showConfirm:t=>{const n=document.createElement("div"),o=P(!0),a=i=>o.value=i,r=()=>{Ha(null,n),n.remove()},s=_t(Cs,{namespace:"bmwfr"},()=>_t(m8,{modelValue:o.value,"update:modelValue":a,onClosed:r,...t}));document.body.appendChild(n),Ha(s,n)}}),Pwe=e=>(At("data-v-4ebb80c3"),e=e(),Ot(),e),Mwe={class:"widget-action-bar"},Nwe={class:"lf-bar"},Rwe=["onClick"],Lwe={key:0,class:"icon"},Fwe={class:"label"},Bwe=Pwe(()=>w("div",{class:"label"},"答案与分值",-1)),Vwe=[Bwe],zwe={class:"rt-bar"},jwe={class:"checkbox-action"},Uwe=se({__name:"WidgetActionBar",props:{customs:{}},setup(e){const{showConfirm:t}=ul(),n=de("widgetStore"),o=M(()=>n.attrs.required!==void 0),a=M({get:()=>n.attrs.required?1:0,set:p=>{h8(!!p)}}),r=_t(Q_,{direction:"vertical"}),s=()=>{b9e(kn.value)},i=M(()=>n.type==="pagination"?n.index!==0:!0),l=()=>{R$.value>0?t({type:"error",content:"若此字段已经有用户提交了数据,删除字段将导致对应的数据被清除,并且无法恢复,是否确认删除?",confirmColor:"error",isNew:!0,onConfirm:()=>{twe(()=>w1(kn.value),100)}}):w1(kn.value)},d=M(()=>n.attrs.standard!==void 0),f=()=>{n.updateIsSettingAnswer(!0)};return(p,h)=>{const m=Bt("icon");return C(),A("div",Mwe,[w("div",Nwe,[O(c(gme),{size:0,spacer:c(r)},{default:H(()=>[(C(!0),A(Ae,null,et(p.customs,b=>(C(),A("div",{class:"item",key:b.key,onClick:g=>{var y;return(y=b.callback)==null?void 0:y.call(b)}},[b.icon?(C(),A("div",Lwe,[O(m,{type:b.icon},null,8,["type"])])):G("",!0),w("div",Fwe,ie(b.label),1)],8,Rwe))),128)),d.value?(C(),A("div",{key:0,class:"item",onClick:f},Vwe)):G("",!0)]),_:1},8,["spacer"])]),w("div",zwe,[o.value?(C(),A(Ae,{key:0},[w("div",jwe,[O(c(Xo),{modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=b=>a.value=b),label:"必填","true-value":1,"false-value":0},null,8,["modelValue"])]),O(c(Q_),{direction:"vertical"})],64)):G("",!0),O(c(_o),{placement:"top",content:"复制","hide-after":0},{default:H(()=>[w("div",{class:"icon-action",onClick:s},[O(m,{type:"copy"})])]),_:1}),i.value?(C(),ve(c(_o),{key:1,placement:"top",content:"删除","hide-after":0},{default:H(()=>[w("div",{class:"icon-action",onClick:l},[O(m,{type:"delete"})])]),_:1})):G("",!0)])])}}}),Wwe=Ye(Uwe,[["__scopeId","data-v-4ebb80c3"]]),jg=e=>(At("data-v-2f2117c8"),e=e(),Ot(),e),Hwe={class:"widget-answer-bar"},qwe={class:"row"},Kwe={class:"lf"},Ywe=jg(()=>w("span",{class:"txt"},"答案解析",-1)),Gwe={class:"rt"},Qwe={class:"dropdown-main"},Jwe=jg(()=>w("i",{class:"iconfont icon-form-down"},null,-1)),Xwe={key:0,class:"score-container"},Zwe=jg(()=>w("span",{class:"txt"},"分",-1)),e$e=jg(()=>w("div",{class:"line"},null,-1)),t$e={class:"btn"},Vx=1e4,zx=-1e4,n$e=se({__name:"WidgetAnswerBar",setup(e){const t=de("formStore"),n=de("widgetStore"),o=M(()=>!!n.errorAttrs.score),a=M({get:()=>n.attrs.score??null,set:g=>{typeof g!="number"?g=null:g>Vx?g=Vx:g<zx&&(g=zx),n.updateAttr("score",g)}}),r=P(),s=M({get:()=>n.attrs.showAnalysis??!1,set:g=>{var y;n.updateAttr("showAnalysis",g),g&&((y=r.value)==null||y.focus())}}),i=M({get:()=>n.attrs.analysis??"",set:g=>{n.updateAttr("analysis",g)}}),l=M(()=>l8(n.type)),d=M(()=>{var g;return n.attrs.scoreType??((g=l.value[0])==null?void 0:g.value)??""}),f=M(()=>{var g;return(g=l.value.find(y=>y.value===d.value))==null?void 0:g.label}),p=g=>{n.updateAttr("scoreType",g.value),g.callback&&g.callback(n)},h=()=>{n.updateErrorAttrs()},m=async()=>{n.updateErrorAttrs(),await ot();const g=Object.values(n.errorAttrs)[0];g?ht.error(g):n.updateIsSettingAnswer(!1)},b=()=>{document.dispatchEvent(new Event("form-render:batchset"))};return po(()=>{n.updateIsSettingAnswer(!1)}),(g,y)=>(C(),A("div",Hwe,[w("div",qwe,[w("div",Kwe,[O(c(Jl),{modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=_=>s.value=_),size:"small"},null,8,["modelValue"]),Ywe]),w("div",Gwe,[O(c(cM),{trigger:"click",placement:"bottom-end"},{dropdown:H(()=>[O(c(dM),null,{default:H(()=>[(C(!0),A(Ae,null,et(l.value,_=>(C(),ve(c(Yve),{key:_.value,onClick:I=>p(_)},{default:H(()=>[Fe(ie(_.label),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:H(()=>[w("div",Qwe,[w("span",null,ie(f.value),1),Jwe])]),_:1}),c(u8)(d.value)?G("",!0):(C(),A("div",Xwe,[O(c(Pt),{class:B(["score",{error:o.value}]),type:"number",modelValue:a.value,"onUpdate:modelValue":y[1]||(y[1]=_=>a.value=_),modelModifiers:{number:!0},placeholder:"10","input-style":{fontSize:"14px",height:"24px",color:"#1a1a1a",textAlign:"center"},onBlur:h},null,8,["class","modelValue"]),Zwe]))])]),Et(O(c(Pt),{ref_key:"analysisInput",ref:r,class:"analysis-input",type:"textarea",autosize:{minRows:2,maxRows:999},placeholder:"请输入答案解析",resize:"none",modelValue:i.value,"onUpdate:modelValue":y[2]||(y[2]=_=>i.value=_),"input-style":{padding:"10px"}},null,8,["modelValue"]),[[nn,s.value]]),c(t).isBatchSettingAnswer?G("",!0):(C(),A(Ae,{key:0},[e$e,w("div",t$e,[w("div",{class:"batch-btn",onClick:b}," 批量设置 "),O(c(Wt),{onClick:m},{default:H(()=>[Fe("完成")]),_:1})])],64))]))}}),o$e=Ye(n$e,[["__scopeId","data-v-2f2117c8"]]),ao=se({__name:"WidgetFooter",props:{customs:{}},setup(e){const t=de("formStore"),n=de("widgetStore");return(o,a)=>(C(),A(Ae,null,[c(n).isActive&&!c(n).isSettingAnswer?(C(),ve(Wwe,{key:0,customs:o.customs},null,8,["customs"])):G("",!0),c(n).isActive&&c(n).isSettingAnswer||c(t).isBatchSettingAnswer?(C(),ve(o$e,{key:1})):G("",!0)],64))}}),a$e=e=>(At("data-v-96ae038b"),e=e(),Ot(),e),r$e={key:0,class:"choosen-view"},s$e=a$e(()=>w("i",{class:"iconfont icon-form-dragging"},null,-1)),i$e=[s$e],l$e=se({__name:"ChoosenView",setup(e){const t=de("widgetStore");return(n,o)=>(C(),A(Ae,null,[c(t).isChoosen?(C(),A("div",r$e,i$e)):G("",!0),Et(w("div",null,[xe(n.$slots,"default",{},void 0,!0)],512),[[nn,!c(t).isChoosen]])],64))}}),lo=Ye(l$e,[["__scopeId","data-v-96ae038b"]]),u$e={key:0,class:"verify-tip"},c$e=se({__name:"VerifyTip",setup(e){const t=de("widgetStore");return(n,o)=>{var a;return(a=c(t).valueVer)!=null&&a.message?(C(),A("div",u$e,ie(c(t).valueVer.message),1)):G("",!0)}}}),To=Ye(c$e,[["__scopeId","data-v-9f8896a1"]]),d$e={class:"basic-input"},f$e=se({__name:"BasicInput",props:{attrs:{}},setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=M(()=>({nameInput:Np.info.icon,emailInput:Rp.info.icon,idCardInput:Lp.info.icon})[o.type]),r=de("formMode"),s=M(()=>({idCardInput:h=>h.replace(/[^0-9a-zA-Z]/g,"")})[o.type]),i=M(()=>{var p;return((p=o.valueVer)==null?void 0:p.status)===0||!!o.errorAttrs.standard&&o.isSettingAnswer}),l=M({get:()=>o.isSettingAnswer?o.attrs.standard:o.value,set:p=>{s.value&&(p=s.value(p)),o.isSettingAnswer?o.updateAttr("standard",p):o.updateValue(p)}}),d=M(()=>{var p;return o.isSettingAnswer?(p=gu.find(h=>h.value===o.attrs.scoreType))==null?void 0:p.placeholder:o.attrs.placeholder}),f=()=>{o.isSettingAnswer?o.updateErrorAttrs():o.updateValueVer()};return(p,h)=>(C(),A("div",d$e,[O(Kn),O(lo,null,{default:H(()=>[O(eo),O(c(Pt),{class:B(["input-box",{error:i.value,disabled:c(r)==="answer-preview"}]),modelValue:l.value,"onUpdate:modelValue":h[0]||(h[0]=m=>l.value=m),placeholder:d.value,disabled:c(t)&&!c(o).isSettingAnswer||c(o).attrs.disabled,style:Ze({marginTop:c(n)?"10px":"15px"}),"input-style":{color:"#1a1a1a",...c(n)?{fontSize:"16px",lineHeight:"24px",height:"54px"}:{fontSize:"14px",lineHeight:"20px",height:"40px"}},onBlur:f},Ia({_:2},[a.value?{name:"prefix",fn:H(()=>[w("i",{class:B(["iconfont",`icon-form-${a.value}`])},null,2)]),key:"0"}:void 0]),1032,["class","modelValue","placeholder","disabled","style","input-style"]),O(To),O(ao)]),_:1})]))}}),cl=Ye(f$e,[["__scopeId","data-v-401e9bcb"]]),p$e={class:"basic-input"},v$e=se({__name:"Textarea",props:{attrs:{}},setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=de("formMode"),r=M(()=>{var d;return((d=o.valueVer)==null?void 0:d.status)===0||!!o.errorAttrs.standard&&o.isSettingAnswer}),s=M({get:()=>o.isSettingAnswer?o.attrs.standard:o.value,set:d=>{if(o.isSettingAnswer){o.updateAttr("standard",d);return}o.updateValue(d)}}),i=M(()=>{var d;return o.isSettingAnswer?(d=gu.find(f=>f.value===o.attrs.scoreType))==null?void 0:d.placeholder:o.attrs.placeholder}),l=()=>{o.isSettingAnswer?o.updateErrorAttrs():o.updateValueVer()};return(d,f)=>(C(),A("div",p$e,[O(Kn),O(lo,null,{default:H(()=>[O(eo),O(c(Pt),{class:B(["input-box",{error:r.value,disabled:c(a)==="answer-preview"}]),modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=p=>s.value=p),type:"textarea",autosize:{minRows:2,maxRows:999},placeholder:i.value,disabled:c(t)&&!c(o).isSettingAnswer,resize:"none",style:Ze({marginTop:c(n)?"10px":"15px"}),"input-style":{color:"#1a1a1a",background:"#ffffff",...c(n)?{fontSize:"16px",lineHeight:"24px",padding:"15px 10px"}:{fontSize:"14px",lineHeight:"20px",padding:"10px 10px"}},onBlur:l},null,8,["class","modelValue","placeholder","disabled","style","input-style"]),O(To),O(ao)]),_:1})]))}}),g8=Ye(v$e,[["__scopeId","data-v-3ccb64df"]]),h$e={class:"number-input"},m$e=se({__name:"NumberInput",props:{attrs:{}},setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=de("formMode"),r=M(()=>({numberInput:"icon-form-number",numberFillBlank:"icon-form-number",phoneInput:"icon-form-phone"})[o.type]),s=M(()=>{var f;return((f=o.valueVer)==null?void 0:f.status)===0||!!o.errorAttrs.standard&&o.isSettingAnswer}),i=M({get:()=>o.isSettingAnswer?o.attrs.standard:o.value,set:f=>{if(typeof f!="number"&&(f=null),o.isSettingAnswer){o.updateAttr("standard",f);return}o.updateValue(f)}}),l=M(()=>{var f;return o.isSettingAnswer?(f=Mp.find(p=>p.value===o.attrs.scoreType))==null?void 0:f.placeholder:o.attrs.placeholder}),d=()=>{o.isSettingAnswer?o.updateErrorAttrs():o.updateValueVer()};return(f,p)=>(C(),A("div",h$e,[O(Kn),O(lo,null,{default:H(()=>[O(eo),O(c(Pt),{class:B(["input-box",{error:s.value,disabled:c(a)==="answer-preview"}]),type:"number",modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=h=>i.value=h),modelModifiers:{number:!0},placeholder:l.value,disabled:c(t)&&!c(o).isSettingAnswer||c(a)==="answer-preview",style:Ze({marginTop:c(n)?"10px":"15px"}),"input-style":{color:"#1a1a1a",...c(n)?{fontSize:"16px",lineHeight:"24px",height:"54px"}:{fontSize:"14px",lineHeight:"20px",height:"40px"}},onBlur:d},Ia({_:2},[r.value?{name:"prefix",fn:H(()=>[w("i",{class:B(["iconfont",r.value])},null,2)]),key:"0"}:void 0]),1032,["class","modelValue","placeholder","disabled","style","input-style"]),O(To),O(ao)]),_:1})]))}}),Ug=Ye(m$e,[["__scopeId","data-v-d45080cf"]]),kp=e=>(At("data-v-ce4334cc"),e=e(),Ot(),e),g$e={class:"input-container"},b$e={class:"flex-col"},y$e=kp(()=>w("p",{class:"text-tip"},"输入项目的详情描述,以便填表人更快的理解项目",-1)),_$e={class:"w-154 h-20"},w$e={class:"flex-col"},$$e=kp(()=>w("p",{class:"text-tip"},"建议尺寸为640像素*640像素,大小不超过5MB",-1)),C$e={class:"flex items-center gap-4"},S$e={key:0,class:"img-container"},E$e=["src"],k$e=kp(()=>w("div",{class:"edit-btn"},"编辑",-1)),I$e=["onClick"],T$e=kp(()=>w("i",{class:"el-icon-close"},null,-1)),x$e=[T$e],A$e={key:1,class:"customer-qrcode-uploader"},O$e=kp(()=>w("i",{class:"el-icon-plus"},null,-1)),D$e=[O$e],P$e="https://upload-cn-east-2.qiniup.com",M$e=se({__name:"basicInfo",props:{basicInfo:{}},emits:["editBasicInfo","loading","loadover"],setup(e,{emit:t}){const n=t,o=P([]),a=P(),r=e,s=P({...r.basicInfo});P(0);const i=P({key:"",token:""}),l=async(_,I)=>{try{return n("loading"),o.value[I]=!0,await d(_),!0}catch{return!1}},d=async _=>{const I=parseInt(Date.now()/1e3).toString(),k=f(),T=p()+I+"_"+k+"_"+_.name,x=exports.globalInject.getToken(),S=await exports.globalInject.$axios.get(`/v1/getQiniuToken?eacb=${x}`);i.value={key:T,token:S.data.result.token}},f=()=>{let _="";for(let I=0;I<6;I++){const k=parseInt(Math.random()*10);_+=k}return _},p=()=>"mqrcode/"+exports.globalInject.getUserInfo().uid+"/",h=(_,I)=>{if(I.length=1,I[0]=_,_.status==="ready"){const k=_;k.url=URL.createObjectURL(_.raw)}},m=(_,I,k,E)=>{if(console.debug(I,k,"ssssaa"),!_)return;const T=encodeURI(_.key);k.indexOf(I),I.uid,s.value.img[E]?s.value.img[E]="https://hs1.bmwas.cn/"+T:s.value.img.length==0?s.value.img[0]="https://hs1.bmwas.cn/"+T:(s.value.img[s.value.img.length-1]="https://hs1.bmwas.cn/"+T,s.value.img.push("")),o.value[E]=!1,console.debug({...r.basicInfo,img:s.value.img},"ssss"),n("editBasicInfo",{...r.basicInfo,img:s.value.img}),n("loadover")},b=_=>{_&&n("editBasicInfo",{...r.basicInfo,name:_})},g=_=>{n("editBasicInfo",{...r.basicInfo,desc:_})},y=_=>{s.value.img.splice(_,1)};return(_,I)=>{const k=rl("loading");return C(),ve(c(KD),{"label-position":"top",class:"basic-info"},{default:H(()=>[O(c(js),{label:"项目名称"},{default:H(()=>[w("div",g$e,[O(c(Pt),{class:"name-input",onInput:b,maxlength:"20",modelValue:s.value.name,"onUpdate:modelValue":I[0]||(I[0]=E=>s.value.name=E)},null,8,["modelValue"])])]),_:1}),O(c(js),{label:"项目描述"},{default:H(()=>[w("div",b$e,[y$e,w("div",_$e,[O(c(Pt),{placeholder:"请输入",class:"editable-desc",type:"textarea",resize:"none","input-style":{padding:"10px",fontSize:"14px",scrollbarWidth:"none"},onInput:g,modelValue:s.value.desc,"onUpdate:modelValue":I[1]||(I[1]=E=>s.value.desc=E)},null,8,["modelValue"])])])]),_:1}),O(c(js),{label:"项目图片(仅显示已上传的第一张图片)"},{default:H(()=>[w("div",w$e,[$$e,w("div",C$e,[(C(!0),A(Ae,null,et(s.value.img,(E,T)=>(C(),ve(c(Gc),{key:T,class:B({"has-image":!!E}),ref_for:!0,ref_key:"upload",ref:a,action:P$e,"list-type":"picture-card",data:i.value,"show-file-list":!1,accept:"image/png, image/jpeg","on-success":(x,S,D)=>m(x,S,D,T),"on-change":h,"before-upload":x=>l(x,T)},{default:H(()=>[E?(C(),A("div",S$e,[w("img",{src:E,class:"uploader-img"},null,8,E$e),k$e,w("div",{onClick:mt(x=>y(T),["stop"]),class:"close-icon-container"},x$e,8,I$e),w("div",{onClick:I[2]||(I[2]=mt(()=>{},["stop"])),class:"mask"})])):Et((C(),A("div",A$e,D$e)),[[k,o.value[T]]])]),_:2},1032,["class","data","on-success","before-upload"]))),128))])])]),_:1})]),_:1})}}}),N$e=Ye(M$e,[["__scopeId","data-v-ce4334cc"]]),Zc=e=>(At("data-v-59d80126"),e=e(),Ot(),e),R$e={class:"dialog-body"},L$e=Zc(()=>w("div",null,"每日起止时间",-1)),F$e=Zc(()=>w("div",{class:"dialog-body-text"},[w("span",{class:"span-text"},"每时段持续时间"),w("span",{class:"span-text"},"每时段间隔时间"),w("span",{class:"span-text"},"每时段名额")],-1)),B$e={class:"dialog-body-input"},V$e={class:"input-row"},z$e={class:"input-container"},j$e=Zc(()=>w("span",{class:"span-text"},"分钟",-1)),U$e={class:"input-row"},W$e={class:"input-container"},H$e=Zc(()=>w("span",{class:"span-text"},"分钟",-1)),q$e={class:"input-container"},K$e={key:0,class:"flex items-center",style:{gap:"8px","margin-top":"8px","margin-bottom":"16px"}},Y$e=Zc(()=>w("div",null,"单价(CNY)",-1)),G$e={style:{width:"100px"}},Q$e=Zc(()=>w("span",null,"¥",-1)),J$e={key:0,class:"footer-text"},X$e={key:1,class:"footer-text"},Z$e={slot:"footer",class:"dialog-footer"},eCe=se({__name:"quickAddModal",props:{visible:{type:Boolean},isPaid:{type:Boolean}},emits:["close","quickAdd"],setup(e,{emit:t}){const n=e,o=t,a=P(),r=P({range:[],lastingTime:null,gapTime:0,quota:null,price:null,isPaid:n.isPaid}),s=m=>{const b=new Date(m[0]),g=new Date(m[1]);r.value.range=[b.getTime(),g.getTime()]},i=M({get:()=>r.value.price/100,set:m=>d(m)}),l=()=>{console.debug(i.value,"dis"),r.value.price=parseFloat(i.value)*100},d=m=>{m=m.slice(0,8);let b=parseFloat(m).toFixed(2);r.value.price=parseFloat(b)*100},f=()=>{if(r.value.lastingTime!=null){const m=r.value.range,b=m[1]-m[0],g=parseInt(r.value.lastingTime)+parseInt(r.value.gapTime);let y=Math.floor(b/6e4/g);return b-y*g*60*1e3>r.value.lastingTime&&y++,y}else return 1},p=m=>{m.length>8&&(m=m.slice(0,8)),m===""||!/^[1-9]\d{0,7}$/.test(m)?r.value.quota=parseInt(r.value.quota):r.value.quota=parseInt(m)},h=()=>{if(r.value.range.length==0){ht({message:"时段是必填的",type:"error"});return}r.value.lastingTime==0&&(r.value.lastingTime=null),r.value.gapTime||(r.value.gapTime=0),r.value.quota||(r.value.quota=-1),r.value.price||(r.value.price=0),o("quickAdd",r.value),o("close")};return(m,b)=>(C(),A("div",null,[O(c(Ga),{"model-value":m.visible,title:"快捷添加",width:"400px",onClose:b[7]||(b[7]=g=>m.$emit("close"))},{default:H(()=>[w("div",R$e,[L$e,O(c(Pg),{modelValue:a.value,"onUpdate:modelValue":b[0]||(b[0]=g=>a.value=g),onChange:s,format:"HH:mm","is-range":""},null,8,["modelValue"]),F$e,w("div",B$e,[w("div",V$e,[w("div",z$e,[O(c(Pt),{modelValue:r.value.lastingTime,"onUpdate:modelValue":b[1]||(b[1]=g=>r.value.lastingTime=g),placeholder:"请输入"},null,8,["modelValue"])]),j$e]),w("div",U$e,[w("div",W$e,[O(c(Pt),{modelValue:r.value.gapTime,"onUpdate:modelValue":b[2]||(b[2]=g=>r.value.gapTime=g),placeholder:"请输入"},null,8,["modelValue"])]),H$e]),w("div",null,[w("div",q$e,[O(c(Pt),{type:"number",maxlength:"8",onInput:p,modelValue:r.value.quota,"onUpdate:modelValue":b[3]||(b[3]=g=>r.value.quota=g),placeholder:"充足"},null,8,["modelValue"])])])]),w("div",null,[r.value.isPaid?(C(),A("div",K$e,[Y$e,w("div",G$e,[O(c(Pt),{style:{width:"100px",height:"32px"},type:"number",step:"0.01",modelValue:i.value,"onUpdate:modelValue":b[4]||(b[4]=g=>i.value=g),onBlur:l,onInput:b[5]||(b[5]=g=>d(g))},{prefix:H(()=>[Q$e]),_:1},8,["modelValue"])])])):G("",!0)]),a.value?(C(),A("div",J$e," 添加后会自动生成 "+ie(f())+" 个时段,生成后可以调整。 ",1)):(C(),A("div",X$e," 配置后会自动生成时段,生成后可以调整 "))]),w("div",Z$e,[O(c(Wt),{onClick:b[6]||(b[6]=g=>m.$emit("close")),class:"button"},{default:H(()=>[Fe("取消")]),_:1}),O(c(Wt),{class:"button",type:"primary",onClick:h},{default:H(()=>[Fe("保存")]),_:1})])]),_:1},8,["model-value"])]))}}),tCe=Ye(eCe,[["__scopeId","data-v-59d80126"]]),pu=e=>(At("data-v-496e6bb2"),e=e(),Ot(),e),nCe={class:"dialog-body"},oCe=pu(()=>w("div",{class:"text-normal-c3d"},"时段表名称",-1)),aCe=pu(()=>w("div",{class:"text-normal-c3d mt-2"},"每日起止时间",-1)),rCe={class:"time-picker"},sCe=pu(()=>w("div",{class:"dialog-body-text mt-2"},[w("span",{class:"span-text"},"每时段持续时间"),w("span",{class:"span-text"},"每时段间隔时间"),w("span",{class:"span-text"},"每时段名额")],-1)),iCe={class:"dialog-body-input"},lCe={class:"input-row"},uCe={class:"input-container"},cCe=pu(()=>w("span",{class:"span-text"},"分钟",-1)),dCe={class:"input-row"},fCe={class:"input-container"},pCe=pu(()=>w("span",{class:"span-text"},"分钟",-1)),vCe={class:"input-container"},hCe={key:0,class:"flex items-center",style:{gap:"8px"}},mCe=pu(()=>w("div",null,"单价(CNY)",-1)),gCe={style:{width:"100px"}},bCe=pu(()=>w("span",null,"¥",-1)),yCe={key:0,class:"footer-text mt-5"},_Ce={key:1,class:"footer-text mt-5"},wCe={slot:"footer",class:"dialog-footer"},$Ce=se({__name:"addDateForm",props:{visible:{type:Boolean}},emits:["close","addForm"],setup(e,{emit:t}){const n=t,o=P({name:"",everyDayRange:[],lastingTime:null,gapTime:0,quota:null,price:null,isPaid:!1}),a=P(),r=m=>{const b=new Date(m[0]),g=new Date(m[1]);o.value.everyDayRange=[b.getTime(),g.getTime()]},s=M({get:()=>o.value.price/100,set:m=>l(m)}),i=()=>{console.debug(s,"dis"),o.value.price=parseFloat(s.value)*100},l=m=>{m=m.slice(0,8);let b=parseFloat(m).toFixed(2);o.value.price=parseFloat(b)*100},d=()=>{if(o.value.lastingTime){const m=o.value.everyDayRange,b=m[1]-m[0],g=parseInt(o.value.lastingTime)+parseInt(o.value.gapTime);let y=Math.floor(b/6e4/g);return b-y*g*60*1e3>o.value.lastingTime&&y++,y}else return 1},f=m=>{exports.globalInject.getVipInfo().level<54&&m?(ht.warning("付费预约功能为企业版会员专享功能,升级到企业版会员即可使用"),exports.globalInject.showBuyVipDialog({level:54}),o.value.isPaid=!1):o.value.isPaid=m},p=m=>{m.length>8&&(m=m.slice(0,8)),m===""||!/^[1-9]\d{0,7}$/.test(m)?o.value.quota=parseInt(o.value.quota):o.value.quota=parseInt(m)},h=()=>{if(!o.value.lastingTime){const m=o.value.everyDayRange[0],b=o.value.everyDayRange[1];o.value.lastingTime=(b-m)/1e3/60}if(!o.value.name){ht({message:"时段表名称是必填的",type:"error"});return}if(o.value.everyDayRange.length==0){ht({message:"时段是必填的",type:"error"});return}o.value.lastingTime==0&&(o.value.lastingTime=null),o.value.gapTime||(o.value.gapTime=0),o.value.quota||(o.value.quota=-1),o.value.price||(o.value.price=0),n("addForm",o.value),n("close"),o.value={name:"",everyDayRange:[],lastingTime:null,gapTime:0,quota:null,isPaid:!1}};return(m,b)=>(C(),A("div",null,[O(c(Ga),{"model-value":m.visible,title:"添加时段表",width:"400px",onClose:b[9]||(b[9]=g=>m.$emit("close"))},{default:H(()=>[w("div",nCe,[oCe,O(c(Pt),{class:"input",modelValue:o.value.name,"onUpdate:modelValue":b[0]||(b[0]=g=>o.value.name=g),placeholder:"请输入"},null,8,["modelValue"]),aCe,w("div",rCe,[O(c(Pg),{modelValue:a.value,"onUpdate:modelValue":b[1]||(b[1]=g=>a.value=g),onChange:r,format:"HH:mm","is-range":""},null,8,["modelValue"])]),sCe,w("div",iCe,[w("div",lCe,[w("div",uCe,[O(c(Pt),{modelValue:o.value.lastingTime,"onUpdate:modelValue":b[2]||(b[2]=g=>o.value.lastingTime=g),placeholder:"请输入",type:"number"},null,8,["modelValue"])]),cCe]),w("div",dCe,[w("div",fCe,[O(c(Pt),{modelValue:o.value.gapTime,"onUpdate:modelValue":b[3]||(b[3]=g=>o.value.gapTime=g),placeholder:"请输入",type:"number"},null,8,["modelValue"])]),pCe]),w("div",null,[w("div",vCe,[O(c(Pt),{type:"number",modelValue:o.value.quota,"onUpdate:modelValue":b[4]||(b[4]=g=>o.value.quota=g),onInput:p,placeholder:"充足"},null,8,["modelValue"])])])]),w("div",null,[O(c(Xo),{modelValue:o.value.isPaid,"onUpdate:modelValue":b[5]||(b[5]=g=>o.value.isPaid=g),label:"付费预约",onChange:f},null,8,["modelValue"]),o.value.isPaid?(C(),A("div",hCe,[mCe,w("div",gCe,[O(c(Pt),{style:{width:"100px"},type:"number",step:"0.01",modelValue:s.value,"onUpdate:modelValue":b[6]||(b[6]=g=>s.value=g),onBlur:i,onInput:b[7]||(b[7]=g=>l(g))},{prefix:H(()=>[bCe]),_:1},8,["modelValue"])])])):G("",!0)]),a.value?(C(),A("div",yCe," 添加后会自动生成 "+ie(d())+" 个时段,生成后可以调整。 ",1)):(C(),A("div",_Ce," 配置后会自动生成时段,生成后可以调整 "))]),w("div",wCe,[O(c(Wt),{onClick:b[8]||(b[8]=g=>m.$emit("close")),class:"button"},{default:H(()=>[Fe("取消")]),_:1}),O(c(Wt),{onClick:h,class:"button",type:"primary"},{default:H(()=>[Fe("保存")]),_:1})])]),_:1},8,["model-value"])]))}}),CCe=Ye($Ce,[["__scopeId","data-v-496e6bb2"]]),SCe=e=>(At("data-v-5d254a13"),e=e(),Ot(),e),ECe={class:"dialog-body"},kCe=SCe(()=>w("div",null,"时段表名称",-1)),ICe={slot:"footer",class:"dialog-footer"},TCe=se({__name:"editDateForm",props:{visible:{type:Boolean},name:{}},emits:["close","editName"],setup(e,{emit:t}){const n=e;Se(()=>n,i=>{o.value=i.name},{deep:!0});const o=P(n.name),a=t,r=()=>{a("close")},s=()=>{a("editName",o.value),a("close")};return(i,l)=>(C(),A("div",null,[O(c(Ga),{"model-value":i.visible,title:"编辑时段表名称",width:"400px",onClose:l[1]||(l[1]=d=>i.$emit("close"))},{default:H(()=>[w("div",ECe,[kCe,O(c(Pt),{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=d=>o.value=d)},null,8,["modelValue"])]),w("div",ICe,[O(c(Wt),{onClick:r,class:"button"},{default:H(()=>[Fe("取消")]),_:1}),O(c(Wt),{onClick:s,class:"button",type:"primary"},{default:H(()=>[Fe("保存")]),_:1})])]),_:1},8,["model-value"])]))}}),xCe=Ye(TCe,[["__scopeId","data-v-5d254a13"]]),dl=e=>(At("data-v-0e5ae47d"),e=e(),Ot(),e),ACe={class:"select-container"},OCe={class:"flex flex-row items-center",style:{gap:"8px"}},DCe={key:0,class:"select-label-paid"},PCe=["src"],MCe=dl(()=>w("span",null,"付费预约",-1)),NCe={class:"option-list"},RCe={class:"options"},LCe={class:"options-content"},FCe={class:"flex gap-1.5 items-center"},BCe={class:"title-text"},VCe={key:0,class:"select-label-paid"},zCe=["src"],jCe=dl(()=>w("span",null,"付费预约",-1)),UCe={class:"buttons-group"},WCe=["onClick"],HCe=["onClick"],qCe={class:"footer-text"},KCe={class:"footer-text"},YCe=["src"],GCe={class:"date-container"},QCe={class:"container"},JCe=dl(()=>w("div",null,"付费预约",-1)),XCe={class:"title-row"},ZCe=dl(()=>w("span",{class:"grey-text",style:{"margin-right":"170px"}},"时段",-1)),eSe=dl(()=>w("span",{class:"grey-text"},"名额",-1)),tSe={key:0,class:"grey-text",style:{"margin-left":"52px"}},nSe={class:"time-picker"},oSe={key:0,class:"input-number-price"},aSe=dl(()=>w("span",null,"¥",-1)),rSe=["onClick"],sSe=dl(()=>w("i",{class:"el-icon-close"},null,-1)),iSe=[sSe],lSe={class:"buttons-group"},uSe=["src"],cSe=dl(()=>w("span",{class:"quick-add-text"},"快捷添加",-1)),dSe={key:0,class:"time-detail-info"},fSe=se({__name:"dateSelect",props:{formId:{},formList:{},appointment:{},widget_id:{},selectedIndex:{},days:{}},emits:["editFormId","getFormList","editAvailableTime"],setup(e,{emit:t}){const n=t,o=new Date,a=["星期一","星期二","星期三","星期四","星期五","星期六","星期日"],r=P({year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()}),s=e,i=P(),l=P(),d=P(s.formId),f=P(!1),p=P(),h=P(s.formList.find(ue=>ue.id==s.formId)),m=P([]),b=P(!1),g=P(!1),y=P([]),_=P([]),I=P(!1),k=_n(s.formList.find(ue=>ue.id==s.formId).isPaid),E=ue=>s.formList.find(J=>J.id==ue.value).isPaid,T=M({get:()=>h.value.dailyTimeRangeQuotas.map(ue=>ue.price/100),set:ue=>{ue.forEach((J,oe)=>{S(J,h.value.dailyTimeRangeQuotas[oe])})}}),x=(ue,J)=>{ue.price=parseFloat(T.value[J])*100,console.debug(ue.price,"a")},S=(ue,J)=>{ue=ue.slice(0,8);let oe=parseFloat(ue).toFixed(2);J.price=parseFloat(oe)*100},D=()=>{let ue=[];h.value.dailyTimeRangeQuotas.map(J=>{ue.push(X(J))}),m.value=ue};st(()=>{N()});const N=()=>{let ue=[];s.days.map(J=>{ue.indexOf(J.formId)==-1&&ue.push(J.formId)}),y.value=ue},L=ue=>{console.debug(ue,"value11");const J=exports.globalInject.getVipInfo(),oe=s.formList.find(_e=>_e.id==s.formId);if(J.level<54&&ue){ht.warning("付费预约功能为企业版会员专享功能,升级到企业版会员即可使用"),exports.globalInject.showBuyVipDialog({level:54}),k.value=!1,oe.isPaid=!1;return}k.value=ue,oe.isPaid=ue,console.debug(oe,"form"),n("editAvailableTime",s.formList),console.debug(s.formList,"formList")};Se(d,ue=>{h.value=U(ue),D(),k.value=h.value.isPaid}),Se(()=>s.selectedIndex,()=>{I.value=!0,setTimeout(()=>{I.value=!1},300)},{deep:!0}),Se(()=>s,()=>{d.value=s.formId,D(),Y(),N()},{deep:!0});const F=ue=>{d.value=ue,n("editFormId",d.value)},z=(ue,J)=>(ue.stopPropagation(),p.value.blur(),new Promise(oe=>{const{showConfirm:_e}=ul();_e({type:"warn",content:`你确定要删除 ${J.label} ?删除后,应用该时段表的日期将不能再正常预约,请谨慎操作。`,confirmColor:"info",title:"删除时段表",isNew:!0,onConfirm:()=>{n("editAvailableTime",s.formList.filter(ge=>ge.id!=J.value))}})})),j=ue=>{const J=s.formList.find(oe=>oe.name==i.value);J.name=ue,n("editAvailableTime",s.formList)},X=ue=>[new Date(r.value.year,r.value.month,r.value.day,ue.startTime.hour,ue.startTime.minute),new Date(r.value.year,r.value.month,r.value.day,ue.endTime.hour,ue.endTime.minute)];st(()=>{D(),Y()});const U=ue=>s.formList.find(J=>J.id===ue),W=(ue,J)=>{q(),h.value.dailyTimeRangeQuotas[J]={...h.value.dailyTimeRangeQuotas[J],startTime:{hour:ue[0].getHours(),minute:ue[0].getMinutes()},endTime:{hour:ue[1].getHours(),minute:ue[1].getMinutes()}}},Q=(ue,J)=>{J.length>8&&(J=J.slice(0,8)),J===""||!/^[1-9]\d{0,7}$/.test(J)?ue.quota=parseInt(ue.quota):ue.quota=parseInt(J),q()},q=()=>{_.value.indexOf(h.value.id)==-1&&_.value.push(h.value.id)},V=ue=>{let J=[];return s.days.map((oe,_e)=>{oe.formId==ue&&J.push(a[_e])}),J.map(oe=>oe).join(",")},Y=()=>{let ue=s.formList.map(J=>({value:J.id,label:J.name,isPaid:J.isPaid}));l.value=ue},Z=(ue,J,oe,_e,ge)=>{let ee=[];const ne=ue[0],fe=ue[1];let ke=ne;if(J==null)ee.push({startTime:{hour:new Date(ne).getHours().toString().padStart(2,"0"),minute:new Date(ne).getMinutes().toString().padStart(2,"0")},endTime:{hour:new Date(fe).getHours().toString().padStart(2,"0"),minute:new Date(fe).getMinutes().toString().padStart(2,"0")},quota:_e,price:ge});else for(;ke<fe;){const $e=new Date(ke+J*6e4);if($e>fe)break;ee.push({startTime:{hour:new Date(ke).getHours().toString().padStart(2,"0"),minute:new Date(ke).getMinutes().toString().padStart(2,"0")},endTime:{hour:$e.getHours().toString().padStart(2,"0"),minute:$e.getMinutes().toString().padStart(2,"0")},quota:_e,price:ge}),ke=$e.getTime()+oe*6e4}return ee},ce=ue=>{const{name:J,everyDayRange:oe,lastingTime:_e,gapTime:ge,quota:Me,price:ee,isPaid:ne}=ue,fe={name:J,id:s.formList.length,lasting_time:_e,gap_time:ge,quota:Me,price:ee,isPaid:ne,dailyTimeRangeQuotas:Z(oe,_e,ge,Me,ee)};n("editAvailableTime",[...s.formList,fe])},re=ue=>{const{range:J,lastingTime:oe,gapTime:_e,quota:ge,price:Me,isPaid:ee}=ue,ne=Z(J,oe,_e,ge,Me);L(ee);const fe=h.value.dailyTimeRangeQuotas.concat(ne);h.value.dailyTimeRangeQuotas=fe},ye=()=>{const ue=h.value.dailyTimeRangeQuotas[h.value.dailyTimeRangeQuotas.length-1],J=Math.floor(parseInt(ue.endTime.hour)+h.value.gap_time/60),oe=Math.floor(parseInt(ue.endTime.minute)+h.value.gap_time%60);h.value.dailyTimeRangeQuotas.push({startTime:{hour:J,minute:oe},endTime:{hour:Math.floor(J+h.value.lasting_time/60),minute:Math.floor(oe+h.value.lasting_time%60)},quota:h.value.quota,price:h.value.price}),q()},he=ue=>{q(),h.value.dailyTimeRangeQuotas.splice(ue,1)},le=ue=>{const J=ue.dailyTimeRangeQuotas,oe=J[0].startTime.hour.toString().padStart(2,"0")+":"+J[0].startTime.minute.toString().padStart(2,"0"),_e=J[J.length-1].endTime.hour.toString().padStart(2,"0")+":"+J[J.length-1].endTime.minute.toString().padStart(2,"0");return`${oe} - ${_e},${J.length}个时段`};return(ue,J)=>(C(),A("div",{class:B({"date-select-container":!0,"date-select-preview":I.value})},[w("div",ACe,[O(c(Hs),{class:"select",modelValue:d.value,"onUpdate:modelValue":J[1]||(J[1]=oe=>d.value=oe),ref_key:"elSelectRef",ref:p,onChange:F},{label:H(({label:oe,value:_e})=>[w("div",OCe,[w("span",null,ie(oe),1),k.value?(C(),A("div",DCe,[w("img",{style:{width:"14px",height:"14px"},src:c(Ke)("images/widget/paid-appoint-icon.png")},null,8,PCe),MCe])):G("",!0)])]),default:H(()=>[w("div",NCe,[(C(!0),A(Ae,null,et(l.value,oe=>(C(),ve(c(qs),{key:oe.value,label:oe.label,value:oe.value,class:B({"option-container":!0,"option-selected":d.value==oe.value})},{default:H(()=>[w("div",RCe,[w("div",LCe,[w("div",FCe,[w("span",BCe,ie(oe.label),1),E(oe)?(C(),A("div",VCe,[w("img",{style:{width:"14px",height:"14px"},src:c(Ke)("images/widget/paid-appoint-icon.png")},null,8,zCe),jCe])):G("",!0)]),w("div",UCe,[w("div",{onClick:_e=>{_e.stopPropagation(),p.value.blur(),g.value=!0,i.value=oe.label},class:"edit-text"}," 重命名 ",8,WCe),y.value.indexOf(oe.value)==-1?(C(),A("div",{key:0,onClick:_e=>z(_e,oe),class:"delete-text"}," 删除 ",8,HCe)):G("",!0)])]),w("span",qCe,"已应用到:"+ie(V(oe.value)),1),w("span",KCe,"时段设置:"+ie(le(ue.formList.find(_e=>_e.id==oe.value))),1)]),d.value==oe.value?(C(),A("img",{key:0,class:"selected-img",src:c(Ke)("images/widget/appoint-timeFormSelected.png")},null,8,YCe)):G("",!0)]),_:2},1032,["label","value","class"]))),128)),w("div",{onClick:J[0]||(J[0]=()=>{b.value=!0,p.value.blur()}),class:"option-button"}," + 添加时段表 ")])]),_:1},8,["modelValue"])]),w("div",GCe,[w("div",QCe,[w("div",{class:"pay-appoint",style:Ze(k.value?"background: rgba(34,120,255,0.1);":"background: #F0F0F0;")},[O(c(Jl),{"active-color":"#2278FF","inactive-color":"#EEEEEE",onChange:L,modelValue:k.value,"onUpdate:modelValue":J[2]||(J[2]=oe=>k.value=oe)},null,8,["modelValue"]),JCe],4),w("div",XCe,[ZCe,eSe,k.value?(C(),A("span",tSe,"单价(CNY)")):G("",!0)]),(C(!0),A(Ae,null,et(h.value.dailyTimeRangeQuotas,(oe,_e)=>(C(),A("div",{class:"picker-row",key:_e},[w("div",nSe,[O(c(Pg),{"is-range":"","range-separator":"-",modelValue:m.value[_e],"onUpdate:modelValue":ge=>m.value[_e]=ge,format:"HH:mm",clearable:!1,onChange:ge=>W(ge,_e)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),w("div",{class:"h-8",style:Ze(k.value?"width:72px":"width:140px")},[O(c(Pt),{type:"number",modelValue:oe.quota,"onUpdate:modelValue":ge=>oe.quota=ge,modelModifiers:{number:!0},min:0,max:99999999,formatter:ge=>ge==-1?null:ge,onInput:ge=>Q(oe,ge)},null,8,["modelValue","onUpdate:modelValue","formatter","onInput"])],4),k.value?(C(),A("div",oSe,[O(c(Pt),{type:"number",step:"0.01",modelValue:T.value[_e],"onUpdate:modelValue":ge=>T.value[_e]=ge,onBlur:ge=>x(oe,_e),onInput:ge=>S(ge,oe)},{prefix:H(()=>[aSe]),_:2},1032,["modelValue","onUpdate:modelValue","onBlur","onInput"])])):G("",!0),h.value.dailyTimeRangeQuotas.length>1?(C(),A("div",{key:1,class:"close-icon",onClick:ge=>he(_e)},iSe,8,rSe)):G("",!0)]))),128)),w("div",lSe,[w("div",{onClick:ye,class:"add-date-button"}," + 添加时段 "),w("div",{class:"quick-add-button",onClick:J[3]||(J[3]=oe=>f.value=!0)},[w("img",{class:"quick-add-img",src:c(Ke)("images/widget/appoint-quickAdd.png")},null,8,uSe),cSe])]),_.value.indexOf(h.value.id)!=-1?(C(),A("div",dSe," 已经修改了"+ie(h.value.name)+",会影响引用该时段表的日期:"+ie(V(h.value.id)),1)):G("",!0)]),f.value?(C(),ve(tCe,{key:0,isPaid:k.value,onQuickAdd:re,onClose:J[4]||(J[4]=oe=>f.value=!1),visible:f.value},null,8,["isPaid","visible"])):G("",!0),b.value?(C(),ve(CCe,{key:1,onAddForm:ce,onClose:J[5]||(J[5]=oe=>b.value=!1),visible:b.value},null,8,["visible"])):G("",!0),g.value?(C(),ve(xCe,{key:2,onClose:J[6]||(J[6]=oe=>g.value=!1),visible:g.value,onEditName:j,name:i.value},null,8,["visible","name"])):G("",!0)])],2))}}),pSe=Ye(fSe,[["__scopeId","data-v-0e5ae47d"]]),vu=e=>(At("data-v-c2ce3419"),e=e(),Ot(),e),vSe={class:"container"},hSe={key:0,class:"flex flex-row gap-4"},mSe={class:"dateSelect-left"},gSe=vu(()=>w("span",{class:"top-text"},"设置每周可约时间",-1)),bSe=vu(()=>w("div",{class:"flex flex-row"},[w("span",{class:"grey-text",style:{"margin-right":"120px"}}," 星期 "),w("span",{class:"grey-text"},"时段表")],-1)),ySe={class:"date-list"},_Se=["onClick"],wSe={class:"date-text day-container mr-6 flex-shrink-0"},$Se={key:0,class:"date-text flex flex-row justify-between"},CSe={class:"flex flex-row"},SSe={class:"pr-1 flex items-center justify-center"},ESe={class:"el-icon-arrow-right"},kSe={key:1,class:"date-text"},ISe={key:1},TSe=vu(()=>w("span",null,"设置每周可约时间",-1)),xSe={class:"flex items-center",style:{gap:"8px"}},ASe=vu(()=>w("div",null,"付费预约",-1)),OSe={class:"flex flex-row relative my-2"},DSe=vu(()=>w("span",{class:"grey-text",style:{"margin-right":"120px"}}," 星期 ",-1)),PSe=vu(()=>w("span",{class:"grey-text"},"名额",-1)),MSe={key:0,style:{"margin-left":"100px"},class:"grey-text"},NSe={class:"date-list"},RSe={class:"date2-container"},LSe={class:"date-text day-container",style:{"margin-right":"44px"}},FSe={key:0,class:"flex gap-6"},BSe={class:"w-25 h-8"},VSe={key:0,class:"w-25 h-8"},zSe=vu(()=>w("span",null,"¥",-1)),jSe={key:1,class:"date-text"},USe=se({__name:"availableTime",props:{availableTime:{},widgetId:{},appointmentItem:{}},emits:["editAvailableTime"],setup(e,{emit:t}){const n=t,o=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],a=P(null),r=P([]),s={monday:"星期一",tuesday:"星期二",wednesday:"星期三",thursday:"星期四",friday:"星期五",saturday:"星期六",sunday:"星期日"},i=e,l=P(i.availableTime.type=="time"),d=P([...i.availableTime.days]),f=P(),p=P(i.availableTime.dailyTimeRanges),h=P(0),m=_n(i.availableTime.isPaid);Se(()=>i.availableTime,()=>{p.value=i.availableTime.dailyTimeRanges},{deep:!0}),Se(l,L=>{let F=L?"time":"date";n("editAvailableTime",{...i.availableTime,type:F})}),Se(m,L=>{n("editAvailableTime",{...i.availableTime,isPaid:L})}),Se(a,(L,F)=>{if(L!=null){let z=d.value[L].formId;f.value=p.value.find(j=>j.id==z)}}),Se(i,L=>{if(L.availableTime.type=="time"&&a.value!=null){let F=d.value[a.value].formId;f.value=p.value.find(z=>z.id==F)}_()}),st(()=>{console.debug(i.availableTime,"availableTime"),_()});const b=M({get:()=>d.value.map(L=>L.price/100),set:L=>{L.forEach((F,z)=>{y(F,d.value[z])})}}),g=(L,F)=>{L.price=parseFloat(b.value[F])*100},y=(L,F)=>{L=L.slice(0,8);let z=parseFloat(L).toFixed(2);F.price=parseFloat(z)*100},_=()=>{let L=0;d.value.map(F=>{F.open&&L++}),h.value=L},I=L=>{const F=exports.globalInject.getVipInfo();console.debug(F,"vipInfo"),F.level<54&&L&&(ht.warning("付费预约功能为企业版会员专享功能,升级到企业版会员即可使用"),exports.globalInject.showBuyVipDialog({level:54}),m.value=!1)},k=(L,F)=>{L.length>8&&(L=L.slice(0,8)),L===""||!/^[1-9]\d{0,7}$/.test(L)?F.quota=parseInt(F.quota):F.quota=parseInt(L)},E=L=>{n("editAvailableTime",{...i.availableTime,dailyTimeRanges:L})},T=()=>{n("editAvailableTime",{...i.availableTime,days:d.value})},x=L=>{L.stopPropagation()},S=L=>{a.value==L?a.value=null:a.value=L},D=L=>{a.value!==null&&(d.value[a.value].formId=L,T())},N=L=>{const F=L.dailyTimeRangeQuotas;if(a.value!=null)return`(${F.length})`;{const z=F[0].startTime.hour.toString().padStart(2,"0")+":"+F[0].startTime.minute.toString().padStart(2,"0"),j=F[F.length-1].endTime.hour.toString().padStart(2,"0")+":"+F[F.length-1].endTime.minute.toString().padStart(2,"0");return`(${z} - ${j},${F.length}个时段)`}};return(L,F)=>(C(),A("div",vSe,[O(c(Pf),{class:"mb-6",modelValue:l.value,"onUpdate:modelValue":F[0]||(F[0]=z=>l.value=z)},{default:H(()=>[O(c(U_),{label:!0},{default:H(()=>[Fe("按时段预约")]),_:1}),O(c(U_),{label:!1},{default:H(()=>[Fe("按日期预约")]),_:1})]),_:1},8,["modelValue"]),l.value?(C(),A("div",hSe,[w("div",mSe,[gSe,bSe,w("div",ySe,[(C(!0),A(Ae,null,et(d.value,(z,j)=>{var X;return C(),A("div",{class:"date-container",onClick:U=>S(j)},[O(c(Jl),{onChange:T,onClick:mt(x,["stop"]),modelValue:z.open,"onUpdate:modelValue":U=>z.open=U,"active-color":"#2278FF","inactive-color":"#EEEEEE",disabled:h.value<=1&&z.open},null,8,["modelValue","onUpdate:modelValue","disabled"]),w("div",wSe,ie(s[o[j]]),1),z.open?(C(),A("div",$Se,[w("div",CSe,[w("div",{class:B({"text-overflow":!0,"date-text-selected":a.value!=null})},ie((X=L.availableTime.dailyTimeRanges.find(U=>U.id==z.formId))==null?void 0:X.name),3),w("div",{class:B({"text-overflow":a.value!=null})},ie(N(L.availableTime.dailyTimeRanges.find(U=>U.id==z.formId))),3)]),w("div",SSe,[Et(w("i",ESe,null,512),[[nn,a.value==null||a.value==j]])])])):(C(),A("span",kSe,"不可约"))],8,_Se)}),256))])]),a.value!=null?(C(),ve(pSe,{key:0,widget_id:L.widgetId,onEditFormId:D,onEditAvailableTime:E,hasUsedFormId:r.value,formId:f.value.id??1,selectedIndex:a.value,formList:p.value,days:L.availableTime.days,appointment:L.appointmentItem},null,8,["widget_id","hasUsedFormId","formId","selectedIndex","formList","days","appointment"])):G("",!0)])):(C(),A("div",ISe,[TSe,w("div",xSe,[O(c(Jl),{"active-color":"#2278FF","inactive-color":"#EEEEEE",modelValue:m.value,"onUpdate:modelValue":F[1]||(F[1]=z=>m.value=z),onChange:I},null,8,["modelValue"]),ASe]),w("div",OSe,[DSe,PSe,m.value?(C(),A("span",MSe,"单价(CNY)")):G("",!0)]),w("div",NSe,[(C(!0),A(Ae,null,et(d.value,(z,j)=>(C(),A("div",RSe,[O(c(Jl),{"inactive-color":"#EEEEEE",modelValue:z.open,"onUpdate:modelValue":X=>z.open=X,onChange:T,disabled:h.value<=1&&z.open},null,8,["modelValue","onUpdate:modelValue","disabled"]),w("div",LSe,ie(s[o[j]]),1),z.open?(C(),A("div",FSe,[w("div",BSe,[O(c(Pt),{onChange:T,onInput:X=>k(X,z),modelValue:z.quota,"onUpdate:modelValue":X=>z.quota=X,placeholder:"充足",type:"number"},null,8,["onInput","modelValue","onUpdate:modelValue"])]),m.value?(C(),A("div",VSe,[O(c(Pt),{type:"number",step:"0.01",modelValue:b.value[j],"onUpdate:modelValue":X=>b.value[j]=X,onBlur:X=>g(z,j),onInput:X=>y(X,z),style:{width:"100px"}},{prefix:H(()=>[zSe]),_:2},1032,["modelValue","onUpdate:modelValue","onBlur","onInput"])])):G("",!0)])):(C(),A("span",jSe,"不可约"))]))),256))])]))]))}}),WSe=Ye(USe,[["__scopeId","data-v-c2ce3419"]]),ed=e=>(At("data-v-f170f2b0"),e=e(),Ot(),e),HSe={class:"container"},qSe=ed(()=>w("span",{class:"title-text"},"设置可约日期范围",-1)),KSe={key:0,style:{"margin-bottom":"8px"}},YSe=ed(()=>w("div",{class:"divide"},null,-1)),GSe={class:"flex flex-col"},QSe=ed(()=>w("span",{class:"title-text"},"设置不可约、休假日期",-1)),JSe={key:0,class:"flex flex-col gap-4 mt-2"},XSe={class:"flex flex-row gap-4 items-center picker-container"},ZSe=["onClick"],e2e=ed(()=>w("i",{class:"el-icon-close"},null,-1)),t2e=[e2e],n2e=ed(()=>w("i",{class:"el-icon-plus"},null,-1)),o2e=ed(()=>w("span",{class:"ml-1"},"添加日期范围",-1)),a2e=[n2e,o2e],r2e=se({__name:"availableDate",props:{availableDate:{}},emits:["editAvailableDate"],setup(e,{emit:t}){const n=t,o=e,a=P([new Date(o.availableDate.canAppointRange.dateRange[0]*1e3),new Date(o.availableDate.canAppointRange.dateRange[1]*1e3)]),r=P(o.availableDate.canAppointRange.isTimeLimit),s=[new Date(2e3,1,1,0,0,0),new Date(2e3,2,1,23,59,59)],i=P(o.availableDate.unUseDates.map(m=>[new Date(m[0]*1e3),new Date(m[1]*1e3)])),l=m=>{n("editAvailableDate",{...o.availableDate,canAppointRange:{...o.availableDate.canAppointRange,isTimeLimit:m}})},d=m=>{const b=new Date(m[0]),g=new Date(m[1]);n("editAvailableDate",{...o.availableDate,canAppointRange:{...o.availableDate.canAppointRange,dateRange:[b.getTime()/1e3,g.getTime()/1e3]}})};Se(i,m=>{const b=[];m.map(g=>{if(g.length>0){const y=new Date(g[0]),_=new Date(g[1]);b.push([y.getTime()/1e3,_.getTime()/1e3])}}),n("editAvailableDate",{...o.availableDate,unUseDates:b})},{deep:!0});const f=(m,b)=>{i.value[b]=m},p=m=>{i.value.splice(m,1)},h=()=>{i.value.push("")};return(m,b)=>(C(),A("div",HSe,[qSe,O(c(Pf),{modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=g=>r.value=g),onChange:l,class:"flex flex-row gap-6"},{default:H(()=>[O(c(Df),{value:!1,class:"radio-text"},{default:H(()=>[Fe("永久可约")]),_:1}),O(c(Df),{value:!0,class:"radio-text"},{default:H(()=>[Fe("限时可约")]),_:1})]),_:1},8,["modelValue"]),r.value?(C(),A("div",KSe,[O(c(wm),{type:"daterange",modelValue:a.value,"onUpdate:modelValue":b[1]||(b[1]=g=>a.value=g),"range-separator":"-",onChange:d,"start-placeholder":"开始时间","end-placeholder":"结束时间"},null,8,["modelValue"])])):G("",!0),YSe,w("div",GSe,[QSe,i.value.length!==0?(C(),A("div",JSe,[(C(!0),A(Ae,null,et(i.value,(g,y)=>(C(),A("div",XSe,[(C(),ve(c(wm),{type:"datetimerange",key:y,onChange:_=>{f(_,y)},modelValue:i.value[y],"onUpdate:modelValue":_=>i.value[y]=_,"range-separator":"-","start-placeholder":"开始时间","end-placeholder":"结束时间","default-time":s},null,8,["onChange","modelValue","onUpdate:modelValue"])),w("div",{class:"close-icon",onClick:_=>p(y)},t2e,8,ZSe)]))),256))])):G("",!0),w("div",{onClick:h,class:"set-date-button title-text"},a2e)])]))}}),s2e=Ye(r2e,[["__scopeId","data-v-f170f2b0"]]),hu=e=>(At("data-v-9d217116"),e=e(),Ot(),e),i2e={class:"container"},l2e={class:"top-container"},u2e=hu(()=>w("span",null,"时间限制",-1)),c2e={key:0,class:"select-row"},d2e=hu(()=>w("span",null,"预约人需提前",-1)),f2e={class:"select-container"},p2e={class:"select-container"},v2e=hu(()=>w("span",null,"预约",-1)),h2e={key:1,class:"select-row"},m2e=hu(()=>w("span",null,"预约人可预约未来",-1)),g2e={class:"select-container"},b2e={class:"select-container"},y2e=hu(()=>w("span",null,"内的项目",-1)),_2e=hu(()=>w("div",{class:"divide"},null,-1)),w2e={class:"bottom-container"},$2e=hu(()=>w("span",null,"更多设置",-1)),C2e=se({__name:"settings",props:{settings:{limitPre:{isLimit:!1,advanceTime:1,advanceUnit:"天"},limitFut:{isLimit:!1,futureTime:30,futureUnit:"天"},displayRemaining:!1,autoRestore:!1}},emits:["editSettings"],setup(e,{emit:t}){const n=t,o=e,a=P([o.settings.displayRemaining?"1":null,o.settings.autoRestore?"2":null]),r=P(o.settings.limitPre.isLimit),s=P(o.settings.limitFut.isLimit),i=P({advanceTime:o.settings.limitPre.advanceTime??1,advanceUnit:o.settings.limitPre.advanceUnit??"天",futureTime:o.settings.limitFut.futureTime??30,futureUnit:o.settings.limitFut.futureUnit??"天"}),l=["天","小时"],d=Array.from({length:60},(p,h)=>h+1);Se(r,p=>{n("editSettings",{...o.settings,limitPre:{...o.settings.limitPre,isLimit:p}})}),Se(s,p=>{n("editSettings",{...o.settings,limitFut:{...o.settings.limitFut,isLimit:p}})}),Se(a,p=>{let h=p.includes("1"),m=p.includes("2");n("editSettings",{...o.settings,displayRemaining:h,autoRestore:m})});const f=()=>{n("editSettings",{...o.settings,limitPre:{...o.settings.limitPre,advanceTime:i.value.advanceTime,advanceUnit:i.value.advanceUnit},limitFut:{...o.settings.limitFut,futureTime:i.value.futureTime,futureUnit:i.value.futureUnit}})};return(p,h)=>(C(),A("div",i2e,[w("div",l2e,[u2e,O(c(Xo),{modelValue:r.value,"onUpdate:modelValue":h[0]||(h[0]=m=>r.value=m)},{default:H(()=>[Fe("限制提前预约时间")]),_:1},8,["modelValue"]),e.settings.limitPre.isLimit?(C(),A("div",c2e,[d2e,w("div",f2e,[O(c(Hs),{onChange:f,modelValue:i.value.advanceTime,"onUpdate:modelValue":h[1]||(h[1]=m=>i.value.advanceTime=m)},{default:H(()=>[(C(!0),A(Ae,null,et(c(d),m=>(C(),ve(c(qs),{key:m,label:m,value:m},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),w("div",p2e,[O(c(Hs),{onChange:f,modelValue:i.value.advanceUnit,"onUpdate:modelValue":h[2]||(h[2]=m=>i.value.advanceUnit=m)},{default:H(()=>[(C(),A(Ae,null,et(l,m=>O(c(qs),{key:m,label:m,value:m},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),v2e])):G("",!0),O(c(Xo),{modelValue:s.value,"onUpdate:modelValue":h[3]||(h[3]=m=>s.value=m)},{default:H(()=>[Fe("限制未来可约时间")]),_:1},8,["modelValue"]),e.settings.limitFut.isLimit?(C(),A("div",h2e,[m2e,w("div",g2e,[O(c(Hs),{onChange:f,modelValue:i.value.futureTime,"onUpdate:modelValue":h[4]||(h[4]=m=>i.value.futureTime=m)},{default:H(()=>[(C(!0),A(Ae,null,et(c(d),m=>(C(),ve(c(qs),{key:m,label:m,value:m},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),w("div",b2e,[O(c(Hs),{onChange:f,modelValue:i.value.futureUnit,"onUpdate:modelValue":h[5]||(h[5]=m=>i.value.futureUnit=m)},{default:H(()=>[(C(),A(Ae,null,et(l,m=>O(c(qs),{key:m,label:m,value:m},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),y2e])):G("",!0)]),_2e,w("div",w2e,[$2e,O(c(Pfe),{modelValue:a.value,"onUpdate:modelValue":h[6]||(h[6]=m=>a.value=m),class:"flex flex-col gap-4"},{default:H(()=>[O(c(Xo),{label:"1"},{default:H(()=>[Fe("向预约人显示剩余名额")]),_:1}),O(c(Xo),{label:"2"},{default:H(()=>[Fe("删除数据后,名额自动恢复")]),_:1})]),_:1},8,["modelValue"])])]))}}),S2e=Ye(C2e,[["__scopeId","data-v-9d217116"]]),E2e={class:"icon-container"},k2e=["src"],I2e={class:"title-container"},T2e={class:"title"},x2e={class:"tip"},A2e=se({__name:"elTabPaneTemplate",props:{img:{},title:{},desc:{},isSelectedLabel:{}},setup(e){return(t,n)=>(C(),A("div",{class:B({"pane-container":!0,isSelected:t.isSelectedLabel==t.title})},[w("div",E2e,[w("img",{class:"img",src:t.img},null,8,k2e)]),w("div",I2e,[w("span",T2e,ie(t.title),1),w("span",x2e,ie(t.desc),1)])],2))}}),lh=Ye(A2e,[["__scopeId","data-v-9405ced5"]]);function O2e(){this.__data__=[],this.size=0}var D2e=O2e;function P2e(e,t){return e===t||e!==e&&t!==t}var b8=P2e,M2e=b8;function N2e(e,t){for(var n=e.length;n--;)if(M2e(e[n][0],t))return n;return-1}var Wg=N2e,R2e=Wg,L2e=Array.prototype,F2e=L2e.splice;function B2e(e){var t=this.__data__,n=R2e(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():F2e.call(t,n,1),--this.size,!0}var V2e=B2e,z2e=Wg;function j2e(e){var t=this.__data__,n=z2e(t,e);return n<0?void 0:t[n][1]}var U2e=j2e,W2e=Wg;function H2e(e){return W2e(this.__data__,e)>-1}var q2e=H2e,K2e=Wg;function Y2e(e,t){var n=this.__data__,o=K2e(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var G2e=Y2e,Q2e=D2e,J2e=V2e,X2e=U2e,Z2e=q2e,eEe=G2e;function td(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}td.prototype.clear=Q2e;td.prototype.delete=J2e;td.prototype.get=X2e;td.prototype.has=Z2e;td.prototype.set=eEe;var Hg=td,tEe=Hg;function nEe(){this.__data__=new tEe,this.size=0}var oEe=nEe;function aEe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var rEe=aEe;function sEe(e){return this.__data__.get(e)}var iEe=sEe;function lEe(e){return this.__data__.has(e)}var uEe=lEe,cEe=typeof io=="object"&&io&&io.Object===Object&&io,y8=cEe,dEe=y8,fEe=typeof self=="object"&&self&&self.Object===Object&&self,pEe=dEe||fEe||Function("return this")(),Es=pEe,vEe=Es,hEe=vEe.Symbol,z$=hEe,jx=z$,_8=Object.prototype,mEe=_8.hasOwnProperty,gEe=_8.toString,Md=jx?jx.toStringTag:void 0;function bEe(e){var t=mEe.call(e,Md),n=e[Md];try{e[Md]=void 0;var o=!0}catch{}var a=gEe.call(e);return o&&(t?e[Md]=n:delete e[Md]),a}var yEe=bEe,_Ee=Object.prototype,wEe=_Ee.toString;function $Ee(e){return wEe.call(e)}var CEe=$Ee,Ux=z$,SEe=yEe,EEe=CEe,kEe="[object Null]",IEe="[object Undefined]",Wx=Ux?Ux.toStringTag:void 0;function TEe(e){return e==null?e===void 0?IEe:kEe:Wx&&Wx in Object(e)?SEe(e):EEe(e)}var qg=TEe;function xEe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ip=xEe,AEe=qg,OEe=Ip,DEe="[object AsyncFunction]",PEe="[object Function]",MEe="[object GeneratorFunction]",NEe="[object Proxy]";function REe(e){if(!OEe(e))return!1;var t=AEe(e);return t==PEe||t==MEe||t==DEe||t==NEe}var w8=REe,LEe=Es,FEe=LEe["__core-js_shared__"],BEe=FEe,_0=BEe,Hx=function(){var e=/[^.]+$/.exec(_0&&_0.keys&&_0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function VEe(e){return!!Hx&&Hx in e}var zEe=VEe,jEe=Function.prototype,UEe=jEe.toString;function WEe(e){if(e!=null){try{return UEe.call(e)}catch{}try{return e+""}catch{}}return""}var $8=WEe,HEe=w8,qEe=zEe,KEe=Ip,YEe=$8,GEe=/[\\^$.*+?()[\]{}|]/g,QEe=/^\[object .+?Constructor\]$/,JEe=Function.prototype,XEe=Object.prototype,ZEe=JEe.toString,eke=XEe.hasOwnProperty,tke=RegExp("^"+ZEe.call(eke).replace(GEe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nke(e){if(!KEe(e)||qEe(e))return!1;var t=HEe(e)?tke:QEe;return t.test(YEe(e))}var oke=nke;function ake(e,t){return e==null?void 0:e[t]}var rke=ake,ske=oke,ike=rke;function lke(e,t){var n=ike(e,t);return ske(n)?n:void 0}var mu=lke,uke=mu,cke=Es,dke=uke(cke,"Map"),j$=dke,fke=mu,pke=fke(Object,"create"),Kg=pke,qx=Kg;function vke(){this.__data__=qx?qx(null):{},this.size=0}var hke=vke;function mke(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gke=mke,bke=Kg,yke="__lodash_hash_undefined__",_ke=Object.prototype,wke=_ke.hasOwnProperty;function $ke(e){var t=this.__data__;if(bke){var n=t[e];return n===yke?void 0:n}return wke.call(t,e)?t[e]:void 0}var Cke=$ke,Ske=Kg,Eke=Object.prototype,kke=Eke.hasOwnProperty;function Ike(e){var t=this.__data__;return Ske?t[e]!==void 0:kke.call(t,e)}var Tke=Ike,xke=Kg,Ake="__lodash_hash_undefined__";function Oke(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=xke&&t===void 0?Ake:t,this}var Dke=Oke,Pke=hke,Mke=gke,Nke=Cke,Rke=Tke,Lke=Dke;function nd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}nd.prototype.clear=Pke;nd.prototype.delete=Mke;nd.prototype.get=Nke;nd.prototype.has=Rke;nd.prototype.set=Lke;var Fke=nd,Kx=Fke,Bke=Hg,Vke=j$;function zke(){this.size=0,this.__data__={hash:new Kx,map:new(Vke||Bke),string:new Kx}}var jke=zke;function Uke(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Wke=Uke,Hke=Wke;function qke(e,t){var n=e.__data__;return Hke(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Yg=qke,Kke=Yg;function Yke(e){var t=Kke(this,e).delete(e);return this.size-=t?1:0,t}var Gke=Yke,Qke=Yg;function Jke(e){return Qke(this,e).get(e)}var Xke=Jke,Zke=Yg;function eIe(e){return Zke(this,e).has(e)}var tIe=eIe,nIe=Yg;function oIe(e,t){var n=nIe(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var aIe=oIe,rIe=jke,sIe=Gke,iIe=Xke,lIe=tIe,uIe=aIe;function od(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}od.prototype.clear=rIe;od.prototype.delete=sIe;od.prototype.get=iIe;od.prototype.has=lIe;od.prototype.set=uIe;var cIe=od,dIe=Hg,fIe=j$,pIe=cIe,vIe=200;function hIe(e,t){var n=this.__data__;if(n instanceof dIe){var o=n.__data__;if(!fIe||o.length<vIe-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new pIe(o)}return n.set(e,t),this.size=n.size,this}var mIe=hIe,gIe=Hg,bIe=oEe,yIe=rEe,_Ie=iEe,wIe=uEe,$Ie=mIe;function ad(e){var t=this.__data__=new gIe(e);this.size=t.size}ad.prototype.clear=bIe;ad.prototype.delete=yIe;ad.prototype.get=_Ie;ad.prototype.has=wIe;ad.prototype.set=$Ie;var CIe=ad;function SIe(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e}var EIe=SIe,kIe=mu,IIe=function(){try{var e=kIe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),TIe=IIe,Yx=TIe;function xIe(e,t,n){t=="__proto__"&&Yx?Yx(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var C8=xIe,AIe=C8,OIe=b8,DIe=Object.prototype,PIe=DIe.hasOwnProperty;function MIe(e,t,n){var o=e[t];(!(PIe.call(e,t)&&OIe(o,n))||n===void 0&&!(t in e))&&AIe(e,t,n)}var S8=MIe,NIe=S8,RIe=C8;function LIe(e,t,n,o){var a=!n;n||(n={});for(var r=-1,s=t.length;++r<s;){var i=t[r],l=o?o(n[i],e[i],i,n,e):void 0;l===void 0&&(l=e[i]),a?RIe(n,i,l):NIe(n,i,l)}return n}var Gg=LIe;function FIe(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var BIe=FIe;function VIe(e){return e!=null&&typeof e=="object"}var Tp=VIe,zIe=qg,jIe=Tp,UIe="[object Arguments]";function WIe(e){return jIe(e)&&zIe(e)==UIe}var HIe=WIe,Gx=HIe,qIe=Tp,E8=Object.prototype,KIe=E8.hasOwnProperty,YIe=E8.propertyIsEnumerable,GIe=Gx(function(){return arguments}())?Gx:function(e){return qIe(e)&&KIe.call(e,"callee")&&!YIe.call(e,"callee")},QIe=GIe,JIe=Array.isArray,U$=JIe,Tm={exports:{}};function XIe(){return!1}var ZIe=XIe;Tm.exports;(function(e,t){var n=Es,o=ZIe,a=t&&!t.nodeType&&t,r=a&&!0&&e&&!e.nodeType&&e,s=r&&r.exports===a,i=s?n.Buffer:void 0,l=i?i.isBuffer:void 0,d=l||o;e.exports=d})(Tm,Tm.exports);var k8=Tm.exports,eTe=9007199254740991,tTe=/^(?:0|[1-9]\d*)$/;function nTe(e,t){var n=typeof e;return t=t??eTe,!!t&&(n=="number"||n!="symbol"&&tTe.test(e))&&e>-1&&e%1==0&&e<t}var oTe=nTe,aTe=9007199254740991;function rTe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=aTe}var I8=rTe,sTe=qg,iTe=I8,lTe=Tp,uTe="[object Arguments]",cTe="[object Array]",dTe="[object Boolean]",fTe="[object Date]",pTe="[object Error]",vTe="[object Function]",hTe="[object Map]",mTe="[object Number]",gTe="[object Object]",bTe="[object RegExp]",yTe="[object Set]",_Te="[object String]",wTe="[object WeakMap]",$Te="[object ArrayBuffer]",CTe="[object DataView]",STe="[object Float32Array]",ETe="[object Float64Array]",kTe="[object Int8Array]",ITe="[object Int16Array]",TTe="[object Int32Array]",xTe="[object Uint8Array]",ATe="[object Uint8ClampedArray]",OTe="[object Uint16Array]",DTe="[object Uint32Array]",Jn={};Jn[STe]=Jn[ETe]=Jn[kTe]=Jn[ITe]=Jn[TTe]=Jn[xTe]=Jn[ATe]=Jn[OTe]=Jn[DTe]=!0;Jn[uTe]=Jn[cTe]=Jn[$Te]=Jn[dTe]=Jn[CTe]=Jn[fTe]=Jn[pTe]=Jn[vTe]=Jn[hTe]=Jn[mTe]=Jn[gTe]=Jn[bTe]=Jn[yTe]=Jn[_Te]=Jn[wTe]=!1;function PTe(e){return lTe(e)&&iTe(e.length)&&!!Jn[sTe(e)]}var MTe=PTe;function NTe(e){return function(t){return e(t)}}var W$=NTe,xm={exports:{}};xm.exports;(function(e,t){var n=y8,o=t&&!t.nodeType&&t,a=o&&!0&&e&&!e.nodeType&&e,r=a&&a.exports===o,s=r&&n.process,i=function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=i})(xm,xm.exports);var H$=xm.exports,RTe=MTe,LTe=W$,Qx=H$,Jx=Qx&&Qx.isTypedArray,FTe=Jx?LTe(Jx):RTe,BTe=FTe,VTe=BIe,zTe=QIe,jTe=U$,UTe=k8,WTe=oTe,HTe=BTe,qTe=Object.prototype,KTe=qTe.hasOwnProperty;function YTe(e,t){var n=jTe(e),o=!n&&zTe(e),a=!n&&!o&&UTe(e),r=!n&&!o&&!a&&HTe(e),s=n||o||a||r,i=s?VTe(e.length,String):[],l=i.length;for(var d in e)(t||KTe.call(e,d))&&!(s&&(d=="length"||a&&(d=="offset"||d=="parent")||r&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||WTe(d,l)))&&i.push(d);return i}var T8=YTe,GTe=Object.prototype;function QTe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||GTe;return e===n}var q$=QTe;function JTe(e,t){return function(n){return e(t(n))}}var x8=JTe,XTe=x8,ZTe=XTe(Object.keys,Object),exe=ZTe,txe=q$,nxe=exe,oxe=Object.prototype,axe=oxe.hasOwnProperty;function rxe(e){if(!txe(e))return nxe(e);var t=[];for(var n in Object(e))axe.call(e,n)&&n!="constructor"&&t.push(n);return t}var sxe=rxe,ixe=w8,lxe=I8;function uxe(e){return e!=null&&lxe(e.length)&&!ixe(e)}var A8=uxe,cxe=T8,dxe=sxe,fxe=A8;function pxe(e){return fxe(e)?cxe(e):dxe(e)}var K$=pxe,vxe=Gg,hxe=K$;function mxe(e,t){return e&&vxe(t,hxe(t),e)}var gxe=mxe;function bxe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var yxe=bxe,_xe=Ip,wxe=q$,$xe=yxe,Cxe=Object.prototype,Sxe=Cxe.hasOwnProperty;function Exe(e){if(!_xe(e))return $xe(e);var t=wxe(e),n=[];for(var o in e)o=="constructor"&&(t||!Sxe.call(e,o))||n.push(o);return n}var kxe=Exe,Ixe=T8,Txe=kxe,xxe=A8;function Axe(e){return xxe(e)?Ixe(e,!0):Txe(e)}var O8=Axe,Oxe=Gg,Dxe=O8;function Pxe(e,t){return e&&Oxe(t,Dxe(t),e)}var Mxe=Pxe,Am={exports:{}};Am.exports;(function(e,t){var n=Es,o=t&&!t.nodeType&&t,a=o&&!0&&e&&!e.nodeType&&e,r=a&&a.exports===o,s=r?n.Buffer:void 0,i=s?s.allocUnsafe:void 0;function l(d,f){if(f)return d.slice();var p=d.length,h=i?i(p):new d.constructor(p);return d.copy(h),h}e.exports=l})(Am,Am.exports);var Nxe=Am.exports;function Rxe(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var Lxe=Rxe;function Fxe(e,t){for(var n=-1,o=e==null?0:e.length,a=0,r=[];++n<o;){var s=e[n];t(s,n,e)&&(r[a++]=s)}return r}var Bxe=Fxe;function Vxe(){return[]}var D8=Vxe,zxe=Bxe,jxe=D8,Uxe=Object.prototype,Wxe=Uxe.propertyIsEnumerable,Xx=Object.getOwnPropertySymbols,Hxe=Xx?function(e){return e==null?[]:(e=Object(e),zxe(Xx(e),function(t){return Wxe.call(e,t)}))}:jxe,Y$=Hxe,qxe=Gg,Kxe=Y$;function Yxe(e,t){return qxe(e,Kxe(e),t)}var Gxe=Yxe;function Qxe(e,t){for(var n=-1,o=t.length,a=e.length;++n<o;)e[a+n]=t[n];return e}var P8=Qxe,Jxe=x8,Xxe=Jxe(Object.getPrototypeOf,Object),M8=Xxe,Zxe=P8,eAe=M8,tAe=Y$,nAe=D8,oAe=Object.getOwnPropertySymbols,aAe=oAe?function(e){for(var t=[];e;)Zxe(t,tAe(e)),e=eAe(e);return t}:nAe,N8=aAe,rAe=Gg,sAe=N8;function iAe(e,t){return rAe(e,sAe(e),t)}var lAe=iAe,uAe=P8,cAe=U$;function dAe(e,t,n){var o=t(e);return cAe(e)?o:uAe(o,n(e))}var R8=dAe,fAe=R8,pAe=Y$,vAe=K$;function hAe(e){return fAe(e,vAe,pAe)}var mAe=hAe,gAe=R8,bAe=N8,yAe=O8;function _Ae(e){return gAe(e,yAe,bAe)}var wAe=_Ae,$Ae=mu,CAe=Es,SAe=$Ae(CAe,"DataView"),EAe=SAe,kAe=mu,IAe=Es,TAe=kAe(IAe,"Promise"),xAe=TAe,AAe=mu,OAe=Es,DAe=AAe(OAe,"Set"),PAe=DAe,MAe=mu,NAe=Es,RAe=MAe(NAe,"WeakMap"),LAe=RAe,r1=EAe,s1=j$,i1=xAe,l1=PAe,u1=LAe,L8=qg,rd=$8,Zx="[object Map]",FAe="[object Object]",eA="[object Promise]",tA="[object Set]",nA="[object WeakMap]",oA="[object DataView]",BAe=rd(r1),VAe=rd(s1),zAe=rd(i1),jAe=rd(l1),UAe=rd(u1),Pl=L8;(r1&&Pl(new r1(new ArrayBuffer(1)))!=oA||s1&&Pl(new s1)!=Zx||i1&&Pl(i1.resolve())!=eA||l1&&Pl(new l1)!=tA||u1&&Pl(new u1)!=nA)&&(Pl=function(e){var t=L8(e),n=t==FAe?e.constructor:void 0,o=n?rd(n):"";if(o)switch(o){case BAe:return oA;case VAe:return Zx;case zAe:return eA;case jAe:return tA;case UAe:return nA}return t});var G$=Pl,WAe=Object.prototype,HAe=WAe.hasOwnProperty;function qAe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&HAe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var KAe=qAe,YAe=Es,GAe=YAe.Uint8Array,QAe=GAe,aA=QAe;function JAe(e){var t=new e.constructor(e.byteLength);return new aA(t).set(new aA(e)),t}var Q$=JAe,XAe=Q$;function ZAe(e,t){var n=t?XAe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var eOe=ZAe,tOe=/\w*$/;function nOe(e){var t=new e.constructor(e.source,tOe.exec(e));return t.lastIndex=e.lastIndex,t}var oOe=nOe,rA=z$,sA=rA?rA.prototype:void 0,iA=sA?sA.valueOf:void 0;function aOe(e){return iA?Object(iA.call(e)):{}}var rOe=aOe,sOe=Q$;function iOe(e,t){var n=t?sOe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var lOe=iOe,uOe=Q$,cOe=eOe,dOe=oOe,fOe=rOe,pOe=lOe,vOe="[object Boolean]",hOe="[object Date]",mOe="[object Map]",gOe="[object Number]",bOe="[object RegExp]",yOe="[object Set]",_Oe="[object String]",wOe="[object Symbol]",$Oe="[object ArrayBuffer]",COe="[object DataView]",SOe="[object Float32Array]",EOe="[object Float64Array]",kOe="[object Int8Array]",IOe="[object Int16Array]",TOe="[object Int32Array]",xOe="[object Uint8Array]",AOe="[object Uint8ClampedArray]",OOe="[object Uint16Array]",DOe="[object Uint32Array]";function POe(e,t,n){var o=e.constructor;switch(t){case $Oe:return uOe(e);case vOe:case hOe:return new o(+e);case COe:return cOe(e,n);case SOe:case EOe:case kOe:case IOe:case TOe:case xOe:case AOe:case OOe:case DOe:return pOe(e,n);case mOe:return new o;case gOe:case _Oe:return new o(e);case bOe:return dOe(e);case yOe:return new o;case wOe:return fOe(e)}}var MOe=POe,NOe=Ip,lA=Object.create,ROe=function(){function e(){}return function(t){if(!NOe(t))return{};if(lA)return lA(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),LOe=ROe,FOe=LOe,BOe=M8,VOe=q$;function zOe(e){return typeof e.constructor=="function"&&!VOe(e)?FOe(BOe(e)):{}}var jOe=zOe,UOe=G$,WOe=Tp,HOe="[object Map]";function qOe(e){return WOe(e)&&UOe(e)==HOe}var KOe=qOe,YOe=KOe,GOe=W$,uA=H$,cA=uA&&uA.isMap,QOe=cA?GOe(cA):YOe,JOe=QOe,XOe=G$,ZOe=Tp,e4e="[object Set]";function t4e(e){return ZOe(e)&&XOe(e)==e4e}var n4e=t4e,o4e=n4e,a4e=W$,dA=H$,fA=dA&&dA.isSet,r4e=fA?a4e(fA):o4e,s4e=r4e,i4e=CIe,l4e=EIe,u4e=S8,c4e=gxe,d4e=Mxe,f4e=Nxe,p4e=Lxe,v4e=Gxe,h4e=lAe,m4e=mAe,g4e=wAe,b4e=G$,y4e=KAe,_4e=MOe,w4e=jOe,$4e=U$,C4e=k8,S4e=JOe,E4e=Ip,k4e=s4e,I4e=K$,T4e=1,x4e=2,A4e=4,F8="[object Arguments]",O4e="[object Array]",D4e="[object Boolean]",P4e="[object Date]",M4e="[object Error]",B8="[object Function]",N4e="[object GeneratorFunction]",R4e="[object Map]",L4e="[object Number]",V8="[object Object]",F4e="[object RegExp]",B4e="[object Set]",V4e="[object String]",z4e="[object Symbol]",j4e="[object WeakMap]",U4e="[object ArrayBuffer]",W4e="[object DataView]",H4e="[object Float32Array]",q4e="[object Float64Array]",K4e="[object Int8Array]",Y4e="[object Int16Array]",G4e="[object Int32Array]",Q4e="[object Uint8Array]",J4e="[object Uint8ClampedArray]",X4e="[object Uint16Array]",Z4e="[object Uint32Array]",Wn={};Wn[F8]=Wn[O4e]=Wn[U4e]=Wn[W4e]=Wn[D4e]=Wn[P4e]=Wn[H4e]=Wn[q4e]=Wn[K4e]=Wn[Y4e]=Wn[G4e]=Wn[R4e]=Wn[L4e]=Wn[V8]=Wn[F4e]=Wn[B4e]=Wn[V4e]=Wn[z4e]=Wn[Q4e]=Wn[J4e]=Wn[X4e]=Wn[Z4e]=!0;Wn[M4e]=Wn[B8]=Wn[j4e]=!1;function Rh(e,t,n,o,a,r){var s,i=t&T4e,l=t&x4e,d=t&A4e;if(n&&(s=a?n(e,o,a,r):n(e)),s!==void 0)return s;if(!E4e(e))return e;var f=$4e(e);if(f){if(s=y4e(e),!i)return p4e(e,s)}else{var p=b4e(e),h=p==B8||p==N4e;if(C4e(e))return f4e(e,i);if(p==V8||p==F8||h&&!a){if(s=l||h?{}:w4e(e),!i)return l?h4e(e,d4e(s,e)):v4e(e,c4e(s,e))}else{if(!Wn[p])return a?e:{};s=_4e(e,p,i)}}r||(r=new i4e);var m=r.get(e);if(m)return m;if(r.set(e,s),k4e(e))return e.forEach(function(y){s.add(Rh(y,t,n,y,e,r))}),s;if(S4e(e))return e.forEach(function(y,_){s.set(_,Rh(y,t,n,_,e,r))}),s;var b=d?l?g4e:m4e:l?keysIn:I4e,g=f?void 0:b(e);return l4e(g||e,function(y,_){g&&(_=y,y=e[_]),u4e(s,_,Rh(y,t,n,_,e,r))}),s}var e3e=Rh,t3e=e3e,n3e=1,o3e=4;function a3e(e){return t3e(e,n3e|o3e)}var r3e=a3e;const xp=vo(r3e),z8=e=>(At("data-v-63b74f90"),e=e(),Ot(),e),s3e=z8(()=>w("div",{class:"divide"},null,-1)),i3e=z8(()=>w("div",{class:"divide"},null,-1)),l3e={slot:"footer",class:"dialog-footer"},u3e=se({__name:"index",props:{visible:{type:Boolean},widgetId:{},appointmentItem:{}},emits:["save","updatePreview","close"],setup(e,{emit:t}){const n=e,o=P("基础信息"),a=t,r=P(xp(n.appointmentItem)),s=P(!1),i=()=>{r.value.availableConfig.availableTime.dailyTimeRanges.forEach(y=>{const _=[],I=[];y.dailyTimeRangeQuotas.map(k=>{let E=k.startTime.hour.toString().padStart(2,"0")+k.startTime.minute.toString().padStart(2,"0")+k.endTime.hour.toString().padStart(2,"0")+k.endTime.minute.toString().padStart(2,"0");I.indexOf(E)==-1&&(I.push(E),_.push(k))}),y.dailyTimeRangeQuotas=_}),a("save",r.value),console.debug(r.value,"reservationItem"),a("updatePreview")},l=()=>{a("close")},d=y=>{o.value=y.props.label},f=y=>{r.value.basicInfo=y,console.debug(y,"aaaa")},p=y=>{r.value.availableConfig.availableDate=y},h=y=>{r.value.availableConfig.availableTime=y},m=y=>{r.value.settings=y},b=()=>{s.value=!0},g=()=>{s.value=!1};return(y,_)=>(C(),A("div",null,[O(c(Ga),{"model-value":y.visible,title:"设置预约项目",width:"900px",onClose:l,class:"point-setting-dialog"},{default:H(()=>[s3e,w("div",null,[O(c(Fg),{style:{height:"514px"},"tab-position":"left",onTabClick:d},{default:H(()=>[O(c(zr),{label:"基础信息"},{label:H(()=>[O(lh,{title:"基础信息",desc:"项目名称/图片/描述",img:c(Ke)("images/widget/appoint-basicInfo.png"),isSelectedLabel:o.value},null,8,["img","isSelectedLabel"])]),default:H(()=>[O(N$e,{onEditBasicInfo:f,basicInfo:r.value.basicInfo,onLoading:b,onLoadover:g},null,8,["basicInfo"])]),_:1}),O(c(zr),{label:"可用时段"},{label:H(()=>[O(lh,{title:"可用时段",desc:"预约时段/名额/付费",img:c(Ke)("images/widget/appoint-availableTime.png"),isSelectedLabel:o.value},null,8,["img","isSelectedLabel"])]),default:H(()=>[O(WSe,{appointmentItem:y.appointmentItem,widgetId:y.widgetId,onEditAvailableTime:h,availableTime:r.value.availableConfig.availableTime},null,8,["appointmentItem","widgetId","availableTime"])]),_:1}),O(c(zr),{label:"可用日期"},{label:H(()=>[O(lh,{title:"可用日期",desc:"可约/不可约日期范围",img:c(Ke)("images/widget/appoint-availableDate.png"),isSelectedLabel:o.value},null,8,["img","isSelectedLabel"])]),default:H(()=>[O(s2e,{onEditAvailableDate:p,availableDate:r.value.availableConfig.availableDate},null,8,["availableDate"])]),_:1}),O(c(zr),{label:"高级设置"},{label:H(()=>[O(lh,{title:"高级设置",desc:"预约限制/恢复名额等",img:c(Ke)("images/widget/appoint-settings.png"),isSelectedLabel:o.value},null,8,["img","isSelectedLabel"])]),default:H(()=>[O(S2e,{onEditSettings:m,settings:r.value.settings},null,8,["settings"])]),_:1})]),_:1})]),i3e,w("div",l3e,[O(c(Wt),{onClick:l,class:"button"},{default:H(()=>[Fe("取消")]),_:1}),O(c(Wt),{disabled:s.value,class:"button",type:"primary",onClick:i},{default:H(()=>[Fe("保存设置")]),_:1},8,["disabled"])])]),_:1},8,["model-value"])]))}}),c3e=Ye(u3e,[["__scopeId","data-v-63b74f90"]]),J$=e=>(At("data-v-279903a2"),e=e(),Ot(),e),d3e={class:"drawer-container"},f3e={key:0,class:"img-container"},p3e=["src"],v3e={class:"date-row"},h3e=["onClick"],m3e=["src"],g3e=J$(()=>w("div",{class:"divide"},null,-1)),b3e={class:"choose-container"},y3e=["onClick"],_3e={class:"text"},w3e={key:0,style:{color:"#e34152"},class:"text"},$3e={class:"text"},C3e={key:1,class:"answers-col"},S3e=J$(()=>w("div",{class:"answers-title"},"已选日期/时间段",-1)),E3e={class:B({"appoint-container":!0})},k3e={class:"flex flex-col"},I3e={key:0,style:{color:"#e34152"}},T3e={key:0,class:"quota-container"},x3e={class:"calendar-header"},A3e=["src"],O3e=["src"],D3e=["onClick"],P3e={key:1,class:"text remainder-text"},M3e={key:0,class:"answers-col",style:{"margin-top":"24px"}},N3e=J$(()=>w("div",{class:"answers-title"},"已选日期/时间段",-1)),R3e={class:B({"appoint-container":!0})},L3e={class:"flex flex-col"},F3e={key:0,style:{color:"#e34152"}},B3e={key:0,class:"quota-container"},V3e=["onClick"],z3e=["src"],j3e={key:1},U3e=se({__name:"appointDateMobile",props:{visible:!1,appoint:{},appointIndex:null,appointConfig:{},answer:[],widgetId:"",formMode:"",isMobileSize:!1,widgetStore:{}},emits:["saveAnswers","editConfig","close","editConfigChooseTimes"],setup(e,{emit:t}){const n=e,o=t,a=P(n.visible),r=["周一","周二","周三","周四","周五","周六","周日"],s=P([]),i=P(On(wt(n.answer))),l=P(!1),d=M(()=>a.value&&!l.value),f=M(()=>a.value&&l.value),p=P(On(n.appointConfig.selectedDate)),h=P([]),m=P(!1),b=new Date,g=P();Se(()=>a,Z=>{Z?document.body.style.overflow="hidden":document.body.style.overflow="auto"}),Se(()=>n,()=>{a.value=n.visible},{deep:!0}),st(()=>{n.appoint.availableConfig.availableTime.type!="time"&&(l.value=!0),s.value=L(p.value),Y()}),Se(p,(Z,ce)=>{Z.getMonth()!=ce.getMonth()?m.value=!0:m.value=!1,l.value&&n.appoint.availableConfig.availableTime.type=="time"&&(s.value=L(Z),Y(Z)),o("editConfig",{...n.appointConfig,selectedDate:Z})},{deep:!0});const y=()=>{o("editConfig",{...n.appointConfig,calendarVisible:!1})},_=Z=>{if(n.appoint.availableConfig.availableTime.type=="date")return i.value.findIndex(ce=>ce.appointment_date==Z.day)!=-1;if(n.appoint.availableConfig.availableTime.type=="time"){const ce=n.appointConfig.monthChooseItems.filter(re=>re.datetime.split("-")[1]==Z.date.getMonth()+1&&re.datetime.split("-")[2]==Z.date.getDate())[0];if(ce)return Z.date.getTime()==new Date(n.appointConfig.selectedDate).getTime()&&ce.canAppoint}},I=Z=>{i.value.splice(Z,1),o("saveAnswers",i.value,n.appointIndex)},k=Z=>{const ce=new Date(p.value),re=Z-x(ce.getDay()),ye=new Date(ce.getFullYear(),ce.getMonth(),ce.getDate()+re);p.value=ye},E=Z=>{if(n.formMode=="input"&&n.appoint.availableConfig.availableTime.type=="date"){if(["unable","able-to-unable","pre"].includes(V(Z.date)))return;T(Z)}},T=Z=>{const ce=Z.day.split("-").join("")+"00002400",re=n.appointConfig.monthChooseItems.find(le=>le.datetime==Z.day),ye={appointment_id:n.appoint.basicInfo.id,appointment_date:Z.day,appointment_time:ce,widget_id:n.widgetId,quota:1,isPaid:re.isPaid,price:re.price,remainingQuota:re.remainingQuota,type:n.appoint.availableConfig.availableTime.type},he=i.value.findIndex(le=>le.appointment_time===ye.appointment_time);he==-1?n.widgetStore.attrs.multiplyAvail?(i.value.push(ye),h.value.push(re.remainingQuota)):(i.value=[ye],h.value=[re.remainingQuota]):(h.value.splice(he,1),i.value.splice(he,1))},x=Z=>Z-1<0?6:Z-1,S=Z=>{const ce=Z.toDateString()===new Date().toDateString(),re=n.appointConfig.monthChooseItems.filter(ye=>ye.datetime.split("-")[1]==Z.getMonth()+1&&ye.datetime.split("-")[2]==Z.getDate())[0];return re?!re.canAppoint||re.overtime?void 0:re.overtime&&ce?"过期":n.appoint.settings.displayRemaining?n.appoint.availableConfig.availableTime.type=="date"?D(re.remainingQuota):D(re.timeRangeRemainingQuotas):void 0:""},D=Z=>Z<=99?Z===0?"约满":Z==-1||Z==null?"充足":`余${Z}`:"充足",N=Z=>{if(Z.type=="time"){const ce=Z.appointment_date.replace(/-/g,"/"),re=Z.appointment_time.slice(8,10)+":"+Z.appointment_time.slice(10,12),ye=Z.appointment_time.slice(12,14)+":"+Z.appointment_time.slice(14,16),he=`${re} - ${ye}`;return`${ce} ${he}`}else{const ce=Z.appointment_date.replace(/-/g,"/"),re=Z.appointment_date,ye=new Date(re);return`${ce},${r[x(ye.getDay())]}`}};function L(Z){const ce=Z.getDay(),re=new Date(Z);re.setDate(Z.getDate()-x(ce));const ye=[];for(let he=0;he<7;he++)ye.push(new Date(re.getTime()+he*24*60*60*1e3));return ye}const F=()=>{l.value=!l.value},z=Z=>{Z.getFullYear();const ce=String(Z.getMonth()+1).padStart(2,"0"),re=String(Z.getDate()).padStart(2,"0");return`${ce}.${re}`},j=Z=>(parseFloat(Z)/100).toFixed(2),X=Z=>{if(n.appoint.settings.displayRemaining)return Z.overtime?"过期":Z.limitFutOver||Z.limitPreOver?"超时":Z.remainingQuota<=99?Z.remainingQuota==0?"约满":Z.remainingQuota==-1||Z.remainingQuota==null?"充足":`余${Z.remainingQuota}`:"充足"},U=Z=>{if(Z.limitFutOver||Z.limitPreOver||Z.remainingQuota==0||Z.overtime)return;const ce=Z._start_time.split(" ")[0],re=Z._start_time.split(" ")[1].split(":"),ye=Z._end_time.split(" ")[1].split(":");let he="";he+=ce.split("-").join(""),re.map((J,oe)=>{oe!=2&&(he=he+J)}),ye.map((J,oe)=>{oe!=2&&(he=he+J)});const le={appointment_id:n.appoint.basicInfo.id,appointment_date:ce,appointment_time:he,widget_id:n.widgetId,quota:1,isPaid:Z.isPaid,price:Z.price,remainingQuota:Z.remainingQuota,type:n.appoint.availableConfig.availableTime.type},ue=i.value.findIndex(J=>J.appointment_time===le.appointment_time);ue==-1?(Z.isSelected=!0,n.widgetStore.attrs.multiplyAvail?(i.value.push(le),h.value.push(Z.remainingQuota)):(i.value=[le],h.value=[Z.remainingQuota])):(Z.isSelected=!1,i.value.splice(ue,1),h.value.splice(ue,1))},W=()=>{o("close"),o("saveAnswers",i.value,n.appointIndex)},Q=Z=>{const ce=p.value,re=Z=="pre"?ce.getMonth()-1:ce.getMonth()+1,ye=new Date(ce.getFullYear(),re,ce.getDate());Y(ye).then(()=>{p.value=ye})},q=Z=>{const ce=Z._start_time.split(" ")[0],re=Z._start_time.split(" ")[1].split(":"),ye=Z._end_time.split(" ")[1].split(":");let he="";return he+=ce.split("-").join(""),re.map((le,ue)=>{ue!=2&&(he=he+le)}),ye.map((le,ue)=>{ue!=2&&(he=he+le)}),i.value.findIndex(le=>le.appointment_time===he)!=-1},V=Z=>{const ce=Z.toDateString()===b.toDateString();if(Z.getTime()<b.getTime()&&!ce)return"pre";if(n.appointConfig.monthChooseItems){let re=n.appointConfig.monthChooseItems.filter(ye=>ye.datetime.split("-")[1]==Z.getMonth()+1&&ye.datetime.split("-")[2]==Z.getDate())[0];return re?re.overtime||re.remainingQuota==0||re.limitFutOver||re.limitPreOver?"able-to-unable":re.canAppoint?"able":"unable":"unable"}},Y=async Z=>{const ce=Z??p.value,re=n.appoint.availableConfig.availableTime.days.map(ue=>{const J=n.appoint.availableConfig.availableTime.dailyTimeRanges.filter(oe=>oe.id===ue.formId)[0];return{open:ue.open,quota:ue.quota,price:ue.price,isPaid:J.isPaid,dailyTimeRangeQuotas:J.dailyTimeRangeQuotas}}),ye=`${ce.getFullYear()}-${ce.getMonth()+1}`,he={appointment_id:n.appoint.basicInfo.id,time:ye,type:n.appoint.availableConfig.availableTime.type,days:re,isPaid:n.appoint.availableConfig.availableTime.isPaid,limitFut:n.appoint.settings.limitFut,limitPre:n.appoint.settings.limitPre,unUseDates:n.appoint.availableConfig.availableDate.unUseDates,canAppointDateRange:n.appoint.availableConfig.availableDate.canAppointRange.isTimeLimit?n.appoint.availableConfig.availableDate.canAppointRange.dateRange:[]},le=await exports.globalInject.$axios.post("/v2/form/getAppointmentTimeList",he);o("editConfig",{...n.appointConfig,monthChooseItems:le.data.result})};return(Z,ce)=>(C(),A(Ae,null,[O(c(J_),{direction:"btt",modelValue:d.value,"onUpdate:modelValue":ce[0]||(ce[0]=re=>d.value=re),title:e.appoint.basicInfo.name,size:"90%",onBeforeClose:y},{default:H(()=>[w("div",d3e,[e.appoint.basicInfo.img[0]!=""?(C(),A("div",f3e,[w("img",{class:"img",src:e.appoint.basicInfo.img[0]},null,8,p3e)])):G("",!0),w("div",v3e,[(C(),A(Ae,null,et(r,(re,ye)=>w("div",{onClick:he=>k(ye),class:B(["date-col",{"normal-text":!0,selected:ye==x(p.value.getDay()),"can-not-choose":["unable","able-to-unable","pre"].includes(V(s.value[ye]))}])},[w("span",null,ie(re),1),w("span",null,ie(z(s.value[ye])),1)],10,h3e)),64)),w("div",{onClick:F,class:"choose-calendar-button"},[w("img",{class:"icon",src:c(Ke)("images/widget/mobile-calendar-icon.png")},null,8,m3e)])]),g3e,w("div",b3e,[(C(!0),A(Ae,null,et(e.appointConfig.chooseTimes.timeRanges,re=>(C(),A("div",{class:B({"choose-item":!0,"item-overtime":re.limitFutOver||re.limitPreOver||re.overtime||re.remainingQuota==0,"time-range-selected":q(re)}),onClick:ye=>U(re)},[w("span",_3e,ie(re.startTime.hour)+":"+ie(re.startTime.minute)+" - "+ie(re.endTime.hour)+":"+ie(re.endTime.minute),1),re.isPaid&&re.price?(C(),A("span",w3e,"¥"+ie(j(re.price)),1)):G("",!0),w("span",$3e,ie(X(re)),1)],10,y3e))),256))]),i.value.length>0?(C(),A("div",C3e,[S3e,(C(!0),A(Ae,null,et(i.value,(re,ye)=>(C(),A("div",E3e,[w("div",k3e,[w("span",null,ie(N(re)),1),re.isPaid?(C(),A("span",I3e,"¥"+ie(j(re.price)),1)):G("",!0)]),e.widgetStore.attrs.multiplyQuota?(C(),A("div",T3e,[O(c(ka),{modelValue:re.quota,"onUpdate:modelValue":he=>re.quota=he,min:1,max:h.value[ye]=="-1"||h.value[ye]==null?1/0:h.value[ye]},null,8,["modelValue","onUpdate:modelValue","max"])])):G("",!0)]))),256))])):G("",!0),O(c(Wt),{onClick:W,class:B({"confirm-button":i.value.length>0,"confirm-button-grey":i.value.length==0})},{default:H(()=>[Fe(" 选好了 ")]),_:1},8,["class"])])]),_:1},8,["modelValue","title"]),O(c(J_),{modelValue:f.value,"onUpdate:modelValue":ce[4]||(ce[4]=re=>f.value=re),direction:"btt",title:"请选择日期",size:"70%",onBeforeClose:y},{default:H(()=>[O(c(xP),{class:"calendar",modelValue:p.value,"onUpdate:modelValue":ce[3]||(ce[3]=re=>p.value=re),ref_key:"calendarRef",ref:g},{header:H(({date:re})=>[w("div",x3e,[w("div",{onClick:ce[1]||(ce[1]=ye=>Q("pre"))},[w("img",{style:{width:"16px"},src:c(Ke)("images/widget/calendar-left-arrow.png")},null,8,A3e)]),w("span",null,ie(re),1),w("div",{onClick:ce[2]||(ce[2]=ye=>Q("next"))},[w("img",{style:{width:"16px"},src:c(Ke)("images/widget/calendar-right-arrow-icon.png")},null,8,O3e)])])]),"date-cell":H(({data:re})=>[w("div",{onClick:ye=>E(re),class:B(["calendar-date",{"calendar-day":V(re.date)=="unable","can-appoint":V(re.date)=="able","pre-day":V(re.date)=="pre","current-day-unable":V(re.date)=="able-to-unable","calendar-date-selected":_(re)}])},[w("span",{class:B({"calendar-text":!0,"calendar-text-selected":_(re)})},ie(re.day.split("-")[2]),3),_(re)?(C(),A("span",{key:0,class:B({text:!0,"text-selected":_(re)})}," 已选 ",2)):G("",!0),V(re.date)=="able"&&!_(re)?(C(),A("span",P3e,ie(S(re.date)),1)):G("",!0)],10,D3e)]),_:1},8,["modelValue"]),i.value.length>0&&e.appoint.availableConfig.availableTime.type=="date"?(C(),A("div",M3e,[N3e,(C(!0),A(Ae,null,et(i.value,(re,ye)=>(C(),A("div",R3e,[w("div",L3e,[w("span",null,ie(N(re)),1),re.isPaid?(C(),A("span",F3e,"¥"+ie(j(re.price)),1)):G("",!0)]),e.widgetStore.attrs.multiplyQuota?(C(),A("div",B3e,[O(c(ka),{modelValue:re.quota,"onUpdate:modelValue":he=>re.quota=he,min:1,max:h.value[ye]=="-1"||h.value[ye]==null?1/0:h.value[ye]},null,8,["modelValue","onUpdate:modelValue","max"])])):(C(),A("div",{key:1,onClick:he=>I(ye)},[w("img",{style:{width:"16px",height:"16px"},src:c(Ke)("images/widget/appoint-delete-icon.png")},null,8,z3e)],8,V3e))]))),256))])):G("",!0),e.appoint.availableConfig.availableTime.type=="time"?(C(),A("div",j3e,[w("div",{onClick:F,class:"select-datetime-button"}," 确定 ")])):G("",!0),e.appoint.availableConfig.availableTime.type=="date"?(C(),ve(c(Wt),{key:2,style:{"margin-top":"40px"},onClick:W,class:B({"confirm-button":i.value.length>0,"confirm-button-grey":i.value.length==0})},{default:H(()=>[Fe(" 选好了 ")]),_:1},8,["class"])):G("",!0)]),_:1},8,["modelValue"])],64))}}),W3e=Ye(U3e,[["__scopeId","data-v-279903a2"]]),Qg=e=>(At("data-v-6050ba0a"),e=e(),Ot(),e),H3e={class:"item-row"},q3e={class:"flex flex-row items-center gap-4"},K3e=["src"],Y3e={class:"title"},G3e={key:0,class:"button-group"},Q3e=["src"],J3e=Qg(()=>w("span",{class:"text"},"编辑",-1)),X3e=Qg(()=>w("span",{class:"text"},"预览",-1)),Z3e=["src"],eDe=["src"],tDe={class:"text"},nDe={key:0},oDe={class:"flex flex-col"},aDe=Qg(()=>w("span",{class:"calendar-title"},"可选日期",-1)),rDe={class:"calendar-header"},sDe={class:"calendar-header-text"},iDe=["onClick"],lDe={key:2,class:"text remainder-text"},uDe={class:"flex flex-col"},cDe=["onClick"],dDe={class:"text"},fDe={key:0,class:"text",style:{color:"#e34152"}},pDe={class:"text"},vDe={key:2,class:"flex flex-col gap-2 w-full"},hDe=Qg(()=>w("div",{class:"divide mt-2.5 mb-1"},null,-1)),mDe={class:"flex flex-row gap-3 mt-3 mb-1"},gDe=["src"],bDe={class:"text-normal-c3d text-sm"},yDe={class:"flex flex-col"},_De={class:"date-text"},wDe={key:0,class:"date-text",style:{color:"#e34152"}},$De={key:0,class:"quota-container"},CDe=["onClick"],SDe=["src"],EDe=se({__name:"appointment",props:{widgetStore:{},appointData:{},appointIndex:null,isEditor:!1,appointsLength:null,isMobileSize:!1,formMode:"",isDragging:!1,appointAnswer:[],isLast:!1},emits:["updateAttr","deleteAppointment","saveAnswers"],setup(e,{emit:t}){const n=P(!1),o=new Date,a=P([]),r=t;P([]);const s=P([]),i=P(),l=P({calendarVisible:!1,selectedDate:o,chooseTimes:[],canAppointTime:[],monthChooseItems:[]}),d=e,{widgetStore:f,appointData:p,appointIndex:h,isEditor:m}=d,b=P(d.appointData),g=le=>{if(d.appointData.availableConfig.availableTime.type=="date")return a.value.findIndex(ue=>ue.appointment_date==le.day)!=-1;if(d.appointData.availableConfig.availableTime.type=="time"){const ue=l.value.monthChooseItems.filter(J=>J.datetime.split("-")[1]==le.date.getMonth()+1&&J.datetime.split("-")[2]==le.date.getDate())[0];if(ue)return le.date.getTime()==new Date(l.value.selectedDate).getTime()&&ue.canAppoint}},y=["周日","周一","周二","周三","周四","周五","周六"],{showConfirm:_}=ul();M(()=>l.value.calendarVisible&&d.isMobileSize),M(()=>{if(!l.value.calendarVisible)return!1;if(!d.isMobileSize||d.isMobileSize&&d.appointData.availableConfig.availableTime.type=="time")return!0}),st(()=>{U()});const I=le=>{console.debug(le,"value111"),b.value=le,r("updateAttr",le,h),Z()};Se(l,le=>{let ue;le.selectedDate?ue=le.selectedDate:ue=o,le.monthChooseItems&&(le.chooseTimes=le.monthChooseItems.filter(J=>J.datetime.split("-")[1]==ue.getMonth()+1&&J.datetime.split("-")[2]==ue.getDate())[0])},{deep:!0}),Se(()=>d,le=>{b.value=d.appointData,a.value=d.appointAnswer??[]},{deep:!0});const k=le=>{if(le.type=="time"){const ue=le.appointment_date.replace(/-/g,"/"),J=le.appointment_time.slice(8,10)+":"+le.appointment_time.slice(10,12),oe=le.appointment_time.slice(12,14)+":"+le.appointment_time.slice(14,16),_e=`${J} - ${oe}`;return`${ue} ${_e}`}else{const ue=le.appointment_date.replace(/-/g,"/"),J=le.appointment_date,oe=new Date(J);return`${ue},${y[oe.getDay()]}`}},E=le=>{a.value.splice(le,1),S()},T=le=>{const ue=l.value.monthChooseItems.find(J=>J.datetime==le.day);ue.overtime||ue.remainingQuota==0||!ue.canAppoint||d.formMode=="input"&&d.appointData.availableConfig.availableTime.type=="date"&&L(le)},x=le=>{Cm({title:le.basicInfo.name,message:()=>_t("div",{style:"word-break:break-all;word-wrap:break-word"},le.basicInfo.desc),confirmButtonText:"知道了"})},S=()=>{r("saveAnswers",a.value,h)},D=le=>{a.value=le,S()},N=le=>{const ue=le._start_time.split(" ")[0],J=le._start_time.split(" ")[1].split(":"),oe=le._end_time.split(" ")[1].split(":");let _e="";return _e+=ue.split("-").join(""),J.map((ge,Me)=>{Me!=2&&(_e=_e+ge)}),oe.map((ge,Me)=>{Me!=2&&(_e=_e+ge)}),a.value.findIndex(ge=>ge.appointment_time===_e)!=-1},L=le=>{if(m)return;const ue=le.day.split("-").join("")+"00002400",J=l.value.monthChooseItems.find(ge=>ge.datetime==le.day),oe={appointment_id:b.value.basicInfo.id,appointment_date:le.day,appointment_time:ue,widget_id:f.id,quota:1,isPaid:J.isPaid,price:J.price,remainingQuota:J.remainingQuota,type:b.value.availableConfig.availableTime.type},_e=a.value.findIndex(ge=>ge.appointment_time===oe.appointment_time);_e==-1?f.attrs.multiplyAvail?(a.value.push(oe),s.value.push(J.remainingQuota)):(a.value=[oe],s.value=[J.remainingQuota]):(a.value.splice(_e,1),s.value.splice(_e,1)),S()},F=le=>{if(le.limitFutOver||le.limitPreOver||m||le.remainingQuota==0||le.overtime)return;const ue=le._start_time.split(" ")[0],J=le._start_time.split(" ")[1].split(":"),oe=le._end_time.split(" ")[1].split(":");let _e="";_e+=ue.split("-").join(""),J.map((ee,ne)=>{ne!=2&&(_e=_e+ee)}),oe.map((ee,ne)=>{ne!=2&&(_e=_e+ee)});const ge={appointment_id:b.value.basicInfo.id,appointment_date:ue,appointment_time:_e,widget_id:f.id,quota:1,price:le.price,isPaid:le.isPaid,remainingQuota:le.remainingQuota,type:b.value.availableConfig.availableTime.type},Me=a.value.findIndex(ee=>ee.appointment_time===ge.appointment_time);Me==-1?f.attrs.multiplyAvail?(a.value.push(ge),s.value.push(le.remainingQuota)):(a.value=[ge],s.value=[le.remainingQuota]):(a.value.splice(Me,1),s.value.splice(Me,1)),S()},z=le=>{l.value=le},j=le=>{const ue=le.toDateString()===o.toDateString();if(le.getTime()<o.getTime()&&!ue)return"pre";if(l.value.monthChooseItems){let J=l.value.monthChooseItems.filter(oe=>oe.datetime.split("-")[1]==le.getMonth()+1&&oe.datetime.split("-")[2]==le.getDate())[0];return J?J.overtime||J.remainingQuota==0||J.limitFutOver||J.limitPreOver?"able-to-unable":J.canAppoint?"able":"unable":"unable"}},X=le=>{if(b.value.settings.displayRemaining)return le.overtime?"过期":le.limitFutOver||le.limitPreOver?"超时":le.remainingQuota<=99?le.remainingQuota==0?"约满":le.remainingQuota==-1||le.remainingQuota==null?"充足":`余${le.remainingQuota}`:"充足"},U=async le=>{const ue=le??l.value.selectedDate,J=b.value.availableConfig.availableTime.days.map(Me=>{const ee=b.value.availableConfig.availableTime.dailyTimeRanges.filter(ne=>ne.id===Me.formId)[0];return{open:Me.open,quota:Me.quota,price:Me.price,isPaid:ee.isPaid,dailyTimeRangeQuotas:ee.dailyTimeRangeQuotas}}),oe=`${ue.getFullYear()}-${ue.getMonth()+1}`,_e={eacb:exports.globalInject.getToken(),time:oe,type:b.value.availableConfig.availableTime.type,appointment_id:b.value.basicInfo.id,days:J,isPaid:b.value.availableConfig.availableTime.isPaid,limitFut:b.value.settings.limitFut,limitPre:b.value.settings.limitPre,unUseDates:b.value.availableConfig.availableDate.unUseDates,canAppointDateRange:b.value.availableConfig.availableDate.canAppointRange.isTimeLimit?b.value.availableConfig.availableDate.canAppointRange.dateRange:[]},ge=await exports.globalInject.$axios.post("/v2/form/getAppointmentTimeList",_e);l.value.monthChooseItems=ge.data.result},W=le=>(parseFloat(le)/100).toFixed(2),Q=()=>{U()},q=()=>{l.value.calendarVisible=!l.value.calendarVisible,l.value.calendarVisible&&U()},V=(le,ue)=>{d.appointsLength!=1&&_({type:"warn",isNew:!0,title:"删除选项",content:`你确定要删除 ${le.basicInfo.name} ?删除后,应用该时段表的日期将不能再正常预约,请谨慎操作。`,cancelText:"取消",confirmText:"删除",onConfirm:()=>{r("deleteAppointment",ue)},onCancel:()=>{}})},Y=(le,ue)=>{const J=l.value.selectedDate,oe=ue=="pre"?J.getMonth()-1:J.getMonth()+1,_e=new Date(J.getFullYear(),oe,J.getDate());U(_e).then(()=>{l.value.selectedDate=_e})},Z=()=>{n.value=!1},ce=le=>{const ue=le.toDateString()===new Date().toDateString(),J=l.value.monthChooseItems.filter(oe=>oe.datetime.split("-")[1]==le.getMonth()+1&&oe.datetime.split("-")[2]==le.getDate())[0];return J?!J.canAppoint||J.overtime?void 0:J.overtime&&ue?"过期":b.value.settings.displayRemaining?b.value.availableConfig.availableTime.type=="date"?he(J.remainingQuota):he(J.timeRangeRemainingQuotas):void 0:""},re=le=>{const ue=l.value.monthChooseItems.filter(J=>J.datetime.split("-")[1]==le.getMonth()+1&&J.datetime.split("-")[2]==le.getDate())[0];if(!(!ue.canAppoint||ue.overtime)&&ue)return`¥${W(ue.price)}`},ye=le=>{if(b.value.availableConfig.availableTime.type=="time")return!1;const ue=l.value.monthChooseItems.filter(J=>J.datetime.split("-")[1]==le.getMonth()+1&&J.datetime.split("-")[2]==le.getDate())[0];if(console.debug(ue,"monthChooseItem"),ue)return ue.isPaid&&ue.price},he=le=>le<=99?le===0?"约满":le==-1||le==null?"充足":`余${le}`:"充足";return(le,ue)=>{const J=Bt("el-button");return C(),A("div",{key:b.value.basicInfo.id,style:Ze({"border-bottom":e.isLast?"":"1px solid #e0e0e0"}),class:B({"appointment-item":!0,"preview-item":!c(m),"mobile-preview-item":e.isMobileSize&&e.formMode=="preview"})},[w("div",H3e,[w("div",q3e,[b.value.basicInfo.img[0]?(C(),A("div",{key:0,class:B({"img-container":!e.isMobileSize,"img-mobile-container":e.isMobileSize,"img-moblie-preview":e.isMobileSize&&e.formMode=="preview"})},[w("img",{class:"img",src:b.value.basicInfo.img[0]},null,8,K3e)],2)):G("",!0),w("div",{class:B({"appoint-center-container":!0,"appoint-center-mobile-preview":e.isMobileSize&&e.formMode=="preview"})},[w("span",Y3e,ie(b.value.basicInfo.name),1),b.value.basicInfo.desc!=""?(C(),ve(c(PM),{key:0,"line-clamp":"2",truncated:"true",class:B({desc:!0,"mobile-preview-desc":e.isMobileSize&&e.formMode=="preview"})},{default:H(()=>[Fe(ie(b.value.basicInfo.desc),1)]),_:1},8,["class"])):G("",!0),b.value.basicInfo.desc.length>70?(C(),ve(J,{key:1,class:"view-detail-button",link:"",type:"primary",onClick:ue[0]||(ue[0]=oe=>x(b.value))},{default:H(()=>[Fe("查看详情")]),_:1})):G("",!0)],2)]),c(m)?(C(),A("div",G3e,[w("div",{onClick:ue[1]||(ue[1]=()=>{n.value=!0}),class:"button"},[w("img",{class:"img-icon",src:c(Ke)("images/widget/appointment-edit.png")},null,8,Q3e),J3e]),w("div",{onClick:ue[2]||(ue[2]=oe=>q()),class:"button"},[X3e,w("i",{class:B({icon:!0,"el-icon-arrow-up":l.value.calendarVisible,"el-icon-arrow-down":!l.value.calendarVisible})},null,2)]),w("div",{onClick:ue[3]||(ue[3]=oe=>V(b.value,c(h))),class:"button"},[w("img",{class:"img-icon",src:c(Ke)(e.appointsLength==1?"images/widget/appoint-cancelIcon.png":"images/widget/appoint-cancelIconDefault.png")},null,8,Z3e),w("span",{class:B({text:!0,"disable-text":e.appointsLength==1})},"删除",2)])])):(C(),A("div",{key:1,class:B({"selected-button":a.value.length>0,"unSelected-button":a.value.length==0,"mobile-preview-button":e.isMobileSize&&e.formMode=="preview"}),onClick:ue[4]||(ue[4]=oe=>q())},[e.isMobileSize?G("",!0):(C(),A("img",{key:0,class:"icon",src:c(Ke)(a.value.length>0?"images/widget/appoint-selected-icon.png":"images/widget/appoint-unselected-icon.png")},null,8,eDe)),w("span",tDe,ie(a.value.length>0?"已选":"预约"),1)],2))]),e.isMobileSize&&e.formMode=="input"?(C(),A("div",nDe,[O(W3e,{visible:l.value.calendarVisible,appoint:b.value,appointConfig:l.value,answer:a.value,widgetId:c(f).id,appointIndex:c(h),formMode:e.formMode,isMobileSize:e.isMobileSize,widgetStore:c(f),onSaveAnswers:D,onEditConfig:z,onClose:ue[5]||(ue[5]=oe=>l.value.calendarVisible=!1)},null,8,["visible","appoint","appointConfig","answer","widgetId","appointIndex","formMode","isMobileSize","widgetStore"])])):(C(),A("div",{key:1,class:B({"calendar-container":!0,"calendar-visible":l.value.calendarVisible,"pc-preview":l.value.calendarVisible&&!e.isMobileSize,"mobile-time-preview":l.value.calendarVisible&&e.isMobileSize&&b.value.availableConfig.availableTime.type=="time"})},[w("div",{class:B({"flex flex-row gap-5 mb-5":!e.isMobileSize,"flex flex-col":e.isMobileSize})},[w("div",oDe,[aDe,O(c(xP),{modelValue:l.value.selectedDate,"onUpdate:modelValue":ue[8]||(ue[8]=oe=>l.value.selectedDate=oe),class:"calendar",style:Ze(e.isMobileSize?"":"min-width: 284px;"),ref_key:"calendarRef",ref:i},{header:H(({date:oe})=>[w("div",rDe,[w("i",{onClick:ue[6]||(ue[6]=_e=>Y(b.value,"pre")),class:"icon el-icon-arrow-left"}),w("span",sDe,ie(oe),1),w("i",{onClick:ue[7]||(ue[7]=_e=>Y(b.value,"next")),class:"icon el-icon-arrow-right"})])]),"date-cell":H(({data:oe})=>[w("div",{onClick:_e=>T(oe),class:B(["calendar-date",{"calendar-day":j(oe.date)=="unable","can-appoint":j(oe.date)=="able","pre-day":j(oe.date)=="pre","current-day-unable":j(oe.date)=="able-to-unable","calendar-date-selected":g(oe)}])},[w("span",{class:B({"calendar-text":!0,"calendar-text-selected":g(oe)})},ie(oe.day.split("-")[2]),3),ye(oe.date)?(C(),A("span",{key:0,class:B({"calendar-text":!0,"calendar-text-selected":g(oe)}),style:Ze(g(oe)?"color:#FFF":"color:#E34152")},ie(re(oe.date)),7)):G("",!0),g(oe)?(C(),A("span",{key:1,class:B({text:!0,"calendar-selected-text":g(oe)})}," 已选 ",2)):G("",!0),g(oe)?G("",!0):(C(),A("span",lDe,ie(ce(oe.date)),1))],10,iDe)]),_:1},8,["modelValue","style"])]),Et(w("div",uDe,[w("span",{style:Ze({"margin-top":e.formMode=="preview"?"24px":""}),class:"calendar-title"},"可选时段",4),w("div",{class:"choose-container",style:Ze(e.isMobileSize?"width:auto":"width: 280px;")},[(C(!0),A(Ae,null,et(l.value.chooseTimes.timeRanges,oe=>(C(),A("div",{class:B({"choose-item":!0,"item-overtime":oe.limitFutOver||oe.limitPreOver||oe.overtime||oe.remainingQuota==0,"time-range-selected":N(oe),"preview-mobile-item":e.formMode=="preview"&&e.isMobileSize}),style:Ze(e.isMobileSize?"min-width:111px":"min-width: 136px;"),onClick:_e=>F(oe)},[w("span",dDe,ie(oe.startTime.hour)+":"+ie(oe.startTime.minute)+" - "+ie(oe.endTime.hour)+":"+ie(oe.endTime.minute),1),oe.isPaid&&oe.price?(C(),A("span",fDe,"¥"+ie(W(oe.price)),1)):G("",!0),w("span",pDe,ie(X(oe)),1)],14,cDe))),256))],4)],512),[[nn,b.value.availableConfig.availableTime.type=="time"]])],2)],2)),!c(m)&&a.value.length>0?(C(),A("div",vDe,[hDe,w("div",mDe,[e.isMobileSize?(C(),A("img",{key:0,style:{width:"20px"},src:c(Ke)("images/widget/appoint-unselected-icon.png")},null,8,gDe)):G("",!0),w("span",bDe,ie(e.isMobileSize?"预选日期":"已选日期/时间段"),1)]),(C(!0),A(Ae,null,et(a.value,(oe,_e)=>(C(),A("div",{class:B({"appoint-container":!e.isMobileSize,"appoint-container-mobile":e.isMobileSize})},[w("div",yDe,[w("span",_De,ie(k(oe)),1),oe.isPaid&&oe.price&&!e.isMobileSize?(C(),A("span",wDe,"¥"+ie(W(oe.price)),1)):G("",!0)]),!e.isMobileSize&&c(f).attrs.multiplyQuota?(C(),A("div",$De,[O(c(ka),{modelValue:oe.quota,"onUpdate:modelValue":ge=>oe.quota=ge,min:1,onChange:S,max:s.value[_e]=="-1"||s.value[_e]==null?1/0:s.value[_e]},null,8,["modelValue","onUpdate:modelValue","max"])])):G("",!0),!e.isMobileSize&&!c(f).attrs.multiplyQuota?(C(),A("div",{key:1,onClick:ge=>E(_e)},[w("img",{style:{width:"16px",height:"16px",cursor:"pointer"},src:c(Ke)("images/widget/appoint-delete-icon.png")},null,8,SDe)],8,CDe)):G("",!0)],2))),256))])):G("",!0),n.value?(C(),ve(c3e,{key:3,widgetId:c(f).id,appointmentItem:b.value,visible:n.value,onClose:Z,onSave:I,onUpdatePreview:Q},null,8,["widgetId","appointmentItem","visible"])):G("",!0)],6)}}}),kDe=Ye(EDe,[["__scopeId","data-v-6050ba0a"]]);var IDe=Object.defineProperty,Om=Object.getOwnPropertySymbols,j8=Object.prototype.hasOwnProperty,U8=Object.prototype.propertyIsEnumerable,pA=(e,t,n)=>t in e?IDe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,W8=(e,t)=>{for(var n in t||(t={}))j8.call(t,n)&&pA(e,n,t[n]);if(Om)for(var n of Om(t))U8.call(t,n)&&pA(e,n,t[n]);return e},TDe=(e,t)=>{var n={};for(var o in e)j8.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Om)for(var o of Om(e))t.indexOf(o)<0&&U8.call(e,o)&&(n[o]=e[o]);return n};const H8="[vue-draggable-plus]: ";function xDe(e){console.warn(H8+e)}function ADe(e){console.error(H8+e)}function vA(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function ODe(e,t){if(Array.isArray(e))return e.splice(t,1)}function DDe(e,t,n){if(Array.isArray(e))return e.splice(t,0,n)}function PDe(e){return typeof e>"u"}function MDe(e){return typeof e=="string"}function hA(e,t,n){const o=e.children[n];e.insertBefore(t,o)}function w0(e){e.parentNode&&e.parentNode.removeChild(e)}function NDe(e,t=document){var n;let o=null;return typeof(t==null?void 0:t.querySelector)=="function"?o=(n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,e):o=document.querySelector(e),o||xDe(`Element not found: ${e}`),o}function RDe(e,t,n=null){return function(...o){return e.apply(n,o),t.apply(n,o)}}function LDe(e,t){const n=W8({},e);return Object.keys(t).forEach(o=>{n[o]?n[o]=RDe(e[o],t[o]):n[o]=t[o]}),n}function FDe(e){return e instanceof HTMLElement}function BDe(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}/**!
107
107
  * Sortable 1.15.1
108
108
  * @author RubaXa <trash@rubaxa.org>
109
109
  * @author owenm <owen23355@gmail.com>
@@ -129,18 +129,18 @@ function print() { __p += __j.call(arguments, '') }
129
129
  选项3`,modelValue:o.value,"onUpdate:modelValue":i[0]||(i[0]=l=>o.value=l),maxlength:"1000","show-word-limit":"",resize:"none"},null,8,["modelValue"])]))}}),Hf=Ye(FRe,[["__scopeId","data-v-588d96b5"]]),BRe=e=>(At("data-v-ef1d32eb"),e=e(),Ot(),e),VRe={class:"option-item-wrap"},zRe=BRe(()=>w("span",{class:"icon iconfont icon-form-handle-v"},null,-1)),jRe=[zRe],URe=se({__name:"radio",props:{attrs:{},value:{},id:{},type:{}},emits:["update:value"],setup(e,{emit:t}){const n=de("isMobileSize"),o=P(0),a=xa(),r=e,{list:s,colNum:i,optionRandom:l}=wo(r.attrs),d=P(s.value),{showDialog:f}=Bp(),p=P(!1);Se(r,q=>{d.value=q.attrs.list},{deep:!0});const h=de("editable"),m=de("widgetStore"),b=de("formMode"),g=P(!1),y=M(()=>m.isSettingAnswer),_=M(()=>m.attrs.standard),I=t,k=()=>m.attrs.standard?[{key:"addOption",label:"添加选项",icon:"fill-circle-add",callback:()=>{j()}},{key:"editOption",label:"批量编辑",callback:()=>{f({title:"编辑选项",component:Hf,params:{onUpdate:U,options:d.value}})}}]:[{key:"addOption",label:"添加选项",icon:"fill-circle-add",callback:()=>{j()}},{key:"addOption",label:"添加其他",callback:()=>{X()}},{key:"editOption",label:"批量编辑",callback:()=>{f({title:"编辑选项",component:Hf,params:{onUpdate:U,options:d.value}})}}],E=P(null),T=P(""),x=M(()=>{let q=i.value;return(n.value||!h&&o.value<720)&&i.value>=3&&(q=2),{width:`calc((100% - ${(q-1)*4}px) / ${q})`}});st(()=>{a==5&&Ep(!0),ot(()=>{E.value&&(o.value=E.value.offsetWidth)})});const S=new Map;function D(q){return l.value&&!h?(S.has(q)||S.set(q,Math.floor(Math.random()*1e3)),{order:S.get(q)}):{}}function N(q){T.value=q}Ir(E,d,{handle:".drag_handle",direction:"vertical",ghostClass:"ghost_row",dragClass:"drag_row",group:{name:"radioList",pull:!1},animation:150,forceFallback:!0,onStart(){p.value=!0},onEnd:q=>{p.value=!1,q.oldIndex!==q.newIndex&&Xt({id:r.id,attr:"list",value:d.value})}});function L(q){var V;console.log("val: ",q),I("update:value",((V=r.value)==null?void 0:V.id)===q.id?{}:q)}function F(q){I("update:value",q)}function z(q){I("update:value",q)}function j(){let q={value:at(),label:`选项${d.value.length+1}`,type:Gt.option};ou(r.id,[q]),ot(()=>{T.value=q.value})}function X(){let q={value:at(),label:"其他",type:Gt.other,input:""};ou(r.id,[q]),ot(()=>{T.value=q.value})}function U(q){Xt({id:r.id,attr:"list",value:d}),ti(m)}const W=M({get:()=>d.value.some(q=>Q(q))&&!!m.attrs.viewVoteRate});Se(W,()=>{g.value=!0});function Q(q){var V;return y.value?!!(_.value.length&&q.value===_.value[0].id):((V=r.value)==null?void 0:V.id)===q.value}return(q,V)=>(C(),A("div",{class:B(["radio-box widget-box",{"widget-active":c(m).isActive}])},[O(Kn,{disabled:y.value},null,8,["disabled"]),O(lo,null,{default:H(()=>[O(eo),w("div",{class:B(["option-list",[c(h)&&"option-list-editable",y.value&&"option-list-mask",c(b)==="answer-preview"&&"disabled"]]),ref_key:"optionList",ref:E},[(C(!0),A(Ae,null,et(d.value,Y=>(C(),A("div",{class:B(["option-item",[T.value===Y.value&&"option-item-active"]]),key:Y.value,style:Ze({...x.value,...D(Y.value)})},[w("div",VRe,[c(h)&&!y.value?(C(),A("div",{key:0,class:B(["drag_handle",{"drag_handle-h":p.value}])},jRe,2)):G("",!0),O(zN,{optionValue:Y,id:q.id,class:B({dragging_container:p.value}),checked:Q(Y),showProgress:W.value||g.value,activeId:T.value,value:q.value,isSettingAnswer:y.value,somebodyChecked:W.value,onUpdateValue:L,onUpdateInput:F,onUpdateSupplyInput:z,list:d.value,onUpdateActiveId:N,type:"single"},null,8,["optionValue","id","class","checked","showProgress","activeId","value","isSettingAnswer","somebodyChecked","list"])]),c(h)?(C(),ve(Up,{key:0,class:"pl-14",option:Y},null,8,["option"])):G("",!0)],6))),128))],2),O(To),O(ao,{customs:k()},null,8,["customs"])]),_:1})],2))}}),Ol=Ye(URe,[["__scopeId","data-v-ef1d32eb"]]),WRe={name:"单项选择",icon:"radio",summary:{title:"单项选择",brief:"在一组选项中选出一个用户认为最适合的答案。是一种最常见的问卷调研题型。应用于市场调查、线上考试、活动投票等多种场景。",image:Ke("images/widget/radio.png")}},HRe={name:"职业",icon:"occupation",summary:{title:"职业",brief:"可从一系列职业类别中选择,在各类职业相关的调查、统计中使用。",image:Ke("images/widget/profession.png")}},qRe={name:"性别",icon:"gender",summary:{title:"性别",brief:"用于用户明确自己的性别类别,它能简单直接地获取用户性别这一基本信息。",image:Ke("images/widget/gender.png")}},KRe={name:"学历",icon:"boshimao",summary:{title:"学历",brief:"供用户选择自己所取得的学历层次。",image:Ke("images/widget/degree.png")}},YRe={name:"年龄范围",icon:"card",summary:{title:"年龄范围",brief:"让用户从设定的若干个年龄区间中选择符合自己的年龄段。",image:Ke("images/widget/age-range.png")}},GRe={name:"单选题",icon:"radio",color:"#8800E7",summary:{title:"单选题",brief:"在一组选项中选出一个用户认为最适合的答案。是一种最常见的问卷调研题型。应用于市场调查、线上考试、活动投票等多种场景。",image:Ke("images/widget/radio.png")}},QRe={name:"判断题",icon:"judge",color:"#22C8FF",summary:{title:"判断题",brief:"一种以对或错来选择的题目,特点是只有两种答案。可直接设置分值与答案,交由系统判分。",image:Ke("images/widget/exam_judge.png")}},JRe=e=>(At("data-v-314c6d8b"),e=e(),Ot(),e),XRe={class:"option-item-wrap"},ZRe=JRe(()=>w("span",{class:"icon iconfont icon-form-handle-v"},null,-1)),eLe=[ZRe],tLe=se({__name:"checkbox",props:{attrs:{},id:{},value:{},type:{}},emits:["update:value"],setup(e,{emit:t}){const n=de("widgetStore"),o=xa(),a=e,{showDialog:r}=Bp(),s=de("formMode"),i=t,l=M(()=>n.isSettingAnswer),d=P(!1),f=de("editable"),p=P(null),h=P(0),m=P(""),{list:b,colNum:g,optionRandom:y}=wo(a.attrs),_=de("isMobileSize"),I=P(b.value);Se(a,q=>{I.value=q.attrs.list},{deep:!0});const k=P(!1),E=M(()=>{let q=g.value;return(_.value||!f&&h.value<720)&&g.value>=3&&(q=2),{width:`calc((100% - ${(q-1)*4}px) / ${q})`}});st(()=>{o==5&&Ep(!0),ot(()=>{p.value&&(h.value=p.value.offsetWidth)})});const T=M(()=>n.attrs.standard),x=()=>n.attrs.standard?[{key:"addOption",label:"添加选项",icon:"fill-circle-add",callback:()=>{N()}},{key:"editOption",label:"批量编辑",callback:()=>{r({title:"编辑选项",component:Hf,params:{onUpdate:W,options:I.value}})}}]:[{key:"addOption",label:"添加选项",icon:"fill-circle-add",callback:()=>{N()}},{key:"addOption",label:"添加其他",callback:()=>{z()}},{key:"editOption",label:"批量编辑",callback:()=>{r({title:"编辑选项",component:Hf,params:{onUpdate:W,options:I.value}})}}],S=new Map;function D(q){return y.value&&!f?(S.has(q)||S.set(q,Math.floor(Math.random()*1e3)),{order:S.get(q)}):{}}Ir(p,I,{handle:".drag_handle",direction:"vertical",ghostClass:"ghost_row",group:{name:"checkbox",pull:!1},dragClass:"drag_row",animation:150,forceFallback:!0,onStart(){d.value=!0},onEnd:q=>{d.value=!1,q.oldIndex!==q.newIndex&&Xt({id:a.id,attr:"list",value:I.value})}});function N(){let q={value:at(),label:`选项${I.value.length+1}`,type:"option"};ou(a.id,[q]),ot(()=>{m.value=q.value})}function L(q){return l.value?!!(T.value.length&&T.value.find(V=>V.id===q.value)):!!(Array.isArray(a.value)&&a.value.some(V=>V.id===q.value))}function F(q){m.value=q}function z(){let q={value:at(),label:"其他",type:"other",input:""};ou(a.id,[q]),ot(()=>{m.value=q.value})}function j(q){const V=a.value||[],Y=V.findIndex(Z=>Z.id===q.id);Y===-1?V.push(q):V.splice(Y,1),i("update:value",V)}function X(q){let V=a.value||[];V=V.map(Y=>(Y.id==q.id&&(Y.input=q.input),Y)),i("update:value",V)}function U(q){let V=a.value||[];V=V.map(Y=>(Y.id==q.id&&(Y.supplyInput=q.supplyInput),Y)),i("update:value",V)}function W(q){Xt({id:a.id,attr:"list",value:I}),ti(n)}const Q=M({get:()=>I.value.some(q=>L(q))&&!!n.attrs.viewVoteRate});return Se(Q,()=>{k.value=!0}),(q,V)=>(C(),A("div",{class:B(["radio-box widget-box",{"widget-active":c(n).isActive}])},[O(Kn),O(lo,null,{default:H(()=>[O(eo),w("div",{class:B(["option-list",{"option-list-editable":c(f),disabled:c(s)==="answer-preview"}]),ref_key:"optionList",ref:p},[(C(!0),A(Ae,null,et(I.value,Y=>(C(),A("div",{class:B(["option-item",{"option-item-active":m.value===Y.value}]),key:Y.value,style:Ze({...E.value,...D(Y.value)})},[w("div",XRe,[c(f)&&!l.value?(C(),A("div",{key:0,class:B(["drag_handle",{"drag_handle-h":d.value}])},eLe,2)):G("",!0),O(zN,{optionValue:Y,id:q.id,class:B({dragging_container:d.value}),onUpdateValue:j,checked:L(Y),type:"multiple",activeId:m.value,isSettingAnswer:l.value,value:q.value,onUpdateInput:X,onUpdateSupplyInput:U,onUpdateActiveId:F,showProgress:Q.value||k.value,somebodyChecked:Q.value,list:I.value},null,8,["optionValue","id","class","checked","activeId","isSettingAnswer","value","showProgress","somebodyChecked","list"])]),c(f)?(C(),ve(Up,{key:0,class:"pl-14",option:Y},null,8,["option"])):G("",!0)],6))),128))],2),O(To),O(ao,{customs:x()},null,8,["customs"])]),_:1})],2))}}),YA=Ye(tLe,[["__scopeId","data-v-314c6d8b"]]),nLe={name:"多项选择",icon:"checkbox",summary:{title:"多项选择",brief:"在一组选项中选出多个用户认为比较适合的答案。用于需要用户从多个关联的选项中进行选择的情况。",image:Ke("images/widget/checkbox.png")}},oLe={name:"多选题",icon:"checkbox",color:"#FF8533",summary:{title:"多选题",brief:"在一组选项中选出多个用户认为比较适合的答案。用于需要用户从多个关联的选项中进行选择的情况。",image:Ke("images/widget/checkbox.png")}},db=e=>(At("data-v-ca90e0ee"),e=e(),Ot(),e),aLe={class:"image-box"},rLe={key:0,class:"editor-box"},sLe=db(()=>w("div",{class:"drag_handle"},[w("span",{class:"icon iconfont icon-form-handle-v"})],-1)),iLe=db(()=>w("span",{class:"icon iconfont icon-form-close"},null,-1)),lLe=[iLe],uLe={class:"option-value-box"},cLe=["contenteditable","onKeydown"],dLe={key:0,class:"extra-content edu-text out-line"},fLe={key:1,class:"progress"},pLe={class:"vote-num-text"},vLe={key:0,class:"standard-setting-checked"},hLe=db(()=>w("span",{class:"icon iconfont icon-form-right"},null,-1)),mLe=db(()=>w("div",{class:"standard-setting-checked-bg"},null,-1)),gLe=[hLe,mLe],bLe=se({__name:"PictureCard",props:{option:{},id:{},list:{},type:{},isSettingAnswer:{type:Boolean},checked:{type:Boolean},showProgress:{type:Boolean},somebodyChecked:{type:Boolean}},emits:["updateUrl","updateValue"],setup(e,{emit:t}){const n=e,o=t,a=de("widgetStore"),r=de("editable"),{option:s,isSettingAnswer:i}=wo(n),l=P(null),d=M(()=>a.attrs.score),f=M(()=>a.attrs.standard),p=M(()=>a.attrs.scoreType),h=de("formMode"),m=de("formStore"),b=P();st(()=>{b.value=xp(m.data[n.id])});const g=M({get:()=>{var L,F;return(F=(L=f.value)==null?void 0:L.find(z=>z.id===s.value.value))==null?void 0:F.mark},set:L=>{Xt({id:n.id,attr:"standard",value:y$(f.value,{id:s.value.value,mark:L})}),ti(a)}}),y=()=>{let L=0,F=0;return h.value!="preview"&&(L=a.voteTotal??0,F=s.value.vote.num??0),n.checked&&!a.isDateModal&&F++,a.isDateModal&&h.value!="answer-preview"&&(Array.isArray(b.value)?(b.value.length==0&&(b.value=[],L++),b.value.some(z=>z==s.value.value)&&!n.checked&&F--,!b.value.some(z=>z==s.value.value)&&n.checked&&F++):b.value?(b.value==s.value.value&&!n.checked&&F--,b.value!=s.value.value&&n.checked&&F++):(n.checked&&F++,L++)),a.isDateModal||L++,n.somebodyChecked||L--,L==0?0:Math.floor((F/L).toFixed(2)*100)},_=()=>{let L=0;return h.value!="preview"&&(L=s.value.vote.num??0),n.checked&&!a.isDateModal&&L++,a.isDateModal&&h.value!="answer-preview"&&(Array.isArray(b.value)?(b.value||(b.value=[]),b.value.some(F=>F==s.value.value)&&!n.checked&&L--,!b.value.some(F=>F==s.value.value)&&n.checked&&L++):b.value?(b.value==s.value.value&&!n.checked&&L--,b.value!=s.value.value&&n.checked&&L++):n.checked&&L++),L},I=M(()=>!!a.errorAttrs.standard&&a.isSettingAnswer&&typeof g.value!="number"),k=M(()=>{var L,F,z,j,X;if(!(n.isSettingAnswer||!f.value)){if(p.value==="single"&&((L=f.value)!=null&&L.find(U=>U.id===s.value.value)))return"(正确答案)";if(p.value==="multiple"&&(F=f.value.find(U=>U.id===s.value.value))!=null&&F.mark)return`(${(z=f.value.find(U=>U.id===s.value.value))==null?void 0:z.mark}分)`;if(p.value==="cumulative"&&typeof((j=f.value.find(U=>U.id===s.value.value))==null?void 0:j.mark)=="number")return`(${(X=f.value.find(U=>U.id===s.value.value))==null?void 0:X.mark}分) (正确答案)`}}),E=M(()=>{const L=[];return r?L.push("option-box-standard"):L.push("card-container-standard"),n.checked&&L.push("card-container-active"),n.isSettingAnswer&&L.push("option-box-isSettingAnswer"),n.isSettingAnswer&&(p.value==="single"||p.value==="cumulative")&&(L.push("option-box-isSettingAnswer-single"),f.value&&f.value.find(F=>F.id===s.value.value)&&L.push("option-box-isSettingAnswer-single-checked")),n.isSettingAnswer&&p.value==="multiple"&&L.push("option-box-isSettingAnswer-multiple"),n.isSettingAnswer&&p.value==="cumulative"&&f.value&&f.value.find(F=>F.id===s.value.value)&&L.push("option-box-isSettingAnswer-single-checked"),L}),T=M(()=>{if(n.isSettingAnswer&&(p.value==="single"||p.value==="cumulative"))return f.value.find(L=>L.id===s.value.value)}),x=M(()=>n.isSettingAnswer&&(p.value==="multiple"||p.value==="cumulative"&&f.value&&f.value.find(L=>L.id===s.value.value)));function S(){r||o("updateValue",s.value.value),r&&n.isSettingAnswer&&(p.value==="single"||p.value==="cumulative")&&(n.type==="single"&&(f.value.find(L=>L.id===s.value.value)?Xt({id:n.id,attr:"standard",value:[]}):Xt({id:n.id,attr:"standard",value:[{id:s.value.value,mark:d.value}]})),n.type==="multiple"&&(f.value.find(L=>L.id===s.value.value)?Xt({id:n.id,attr:"standard",value:f.value.filter(L=>L.id!==s.value.value)}):Xt({id:n.id,attr:"standard",value:[...f.value,{id:s.value.value,mark:null}]})),ti(a),a.updateErrorAttrs())}function D(){n.list.length<=1||B$(n.id,s.value.value)}function N(){if(!r||n.isSettingAnswer)return;let L=_$(l.value,"out-line");V$(n.option.value,L);const F=window.getSelection();F==null||F.removeAllRanges()}return(L,F)=>{var z;return C(),A("div",{class:B(["card-container",E.value])},[w("div",{class:"card-content",onClick:S},[w("div",aLe,[c(r)&&!c(i)?(C(),A("div",rLe,[sLe,w("div",{class:B(["delete-icon",{"delete-icon-disabled":((z=L.list)==null?void 0:z.length)<=1}]),onClick:D},lLe,2),w("div",{class:"toggle-box",onClick:F[0]||(F[0]=j=>o("updateUrl",c(s).value))}," 替换 ")])):G("",!0),O(c(fM),{src:c(s).url,style:{width:"100%",height:"100%"},alt:"图片选项","zoom-rate":1.2,"max-scale":7,"min-scale":.2,fit:"cover"},null,8,["src"])]),w("div",uLe,[L.type==="single"?(C(),A("div",{key:0,class:B(["cycle-icon",{checked:L.checked}])},null,2)):G("",!0),L.type==="multiple"?(C(),ve(c(Xo),{key:1,class:"square-icon icon-check","model-value":L.checked,size:"large",disabled:c(r)},null,8,["model-value","disabled"])):G("",!0),w("div",{class:B(["name",[c(r)&&"text-editable "]]),contenteditable:c(r)&&!c(i),ref_key:"optionLabel",ref:l,onBlur:N,onKeydown:Ln(mt(N,["prevent"]),["enter"]),onPaste:F[1]||(F[1]=(...j)=>c(tl)&&c(tl)(...j))},[w("span",null,ie(c(s).label),1),!c(i)&&f.value&&c(r)?(C(),A("span",dLe,ie(k.value),1)):G("",!0)],42,cLe)]),O(Up,{option:c(s)},null,8,["option"]),L.showProgress&&!c(r)?(C(),A("div",{key:0,style:Ze(c(r)?"":"padding-bottom:44px")},null,4)):G("",!0),L.showProgress&&!c(r)?(C(),A("div",fLe,[O(c(Rg),{color:"#2278FE",percentage:y()},null,8,["percentage"]),w("span",pLe,ie(_())+"票",1)])):G("",!0),x.value?(C(),A("div",{key:2,class:"option-label-scope-container",onClick:F[4]||(F[4]=mt(()=>{},["stop","prevent"]))},[O(c(ka),{modelValue:g.value,"onUpdate:modelValue":F[2]||(F[2]=j=>g.value=j),class:B({error:I.value}),size:"small",max:1e4,onClick:F[3]||(F[3]=mt(()=>{},["stop","prevent"])),"controls-position":"right",style:{width:"60px",padding:"0"},controls:!0,placeholder:"10"},null,8,["modelValue","class"]),Fe(" 分 ")])):G("",!0)]),T.value?(C(),A("div",vLe,gLe)):G("",!0)],2)}}}),jN=Ye(bLe,[["__scopeId","data-v-ca90e0ee"]]),AC=e=>(At("data-v-e15fac66"),e=e(),Ot(),e),yLe={class:"option-list-box"},_Le={class:"add-button"},wLe=AC(()=>w("span",{class:"icon iconfont icon-form-add"},null,-1)),$Le=AC(()=>w("div",null,"点击上传单张图片",-1)),CLe=AC(()=>w("div",null,"最多上传10张",-1)),SLe=se({__name:"imgRadio",props:{attrs:{},id:{},value:{}},emits:["update:value"],setup(e,{emit:t}){const n=de("isMobileSize"),o=e,a=de("formMode"),r=xa(),{list:s,maxLength:i}=wo(o.attrs),l=P(s.value);Se(o,S=>{l.value=S.attrs.list},{deep:!0});const d=t,f=M(()=>h.isSettingAnswer),p=de("editable"),h=de("widgetStore"),m=P(null),b=P(null),g=P(!1),y=P(""),_=S=>o.value==S.value,I=M({get:()=>l.value.some(S=>_(S))&&!!h.attrs.viewVoteRate});Se(I,()=>{g.value=!0}),st(()=>{r==5&&Ep(!0)});function k(S){d("update:value",o.value===S?"":S)}async function E(S){var N;y.value=S,((N=m.value)==null?void 0:N.$el.querySelector("input")).click()}const T=P(!1);Ir(b,l,{handle:".drag_handle",direction:"vertical",ghostClass:"ghost_row",group:{name:"imageRadio",pull:!1},dragClass:"drag_row",animation:150,forceFallback:!0,onStart(){T.value=!0},onEnd:S=>{T.value=!1,S.oldIndex!==S.newIndex&&Xt({id:o.id,attr:"list",value:l.value})}});async function x(S){if(S.file.size>15*1024*1024){ht.error("图片大小不能超过15M");return}const D=b$(S.file.name);(await exports.globalInject.uploadFile(S.file,{name:`form-${o.id}-${at()}${D}`})).subscribe({error:L=>{ht.error(L)},complete:L=>{if(!L.key){ht.error("上传失败");return}if(y.value)l.value=l.value.map(F=>(F.value===y.value&&(F.url=exports.globalInject.imagePrefix+L.key),F)),y.value="",Xt({id:o.id,attr:"list",value:l.value});else{const F={label:`选项${l.value.length+1}`,value:at(),url:exports.globalInject.imagePrefix+L.key};ou(o.id,[F])}}})}return(S,D)=>(C(),A("div",{class:B(["radio-box widget-box",{"widget-not-active":!c(h).isActive}])},[O(Kn),O(lo,null,{default:H(()=>{var N;return[O(eo),w("div",yLe,[w("div",{class:B(["option-list",{"option-list-input":["input","preview"].includes(c(a))&&!c(n),disabled:c(a)==="answer-preview"}]),ref_key:"optionList",ref:b},[(C(!0),A(Ae,null,et(l.value,L=>(C(),A("div",{class:"option-item",key:L.value},[O(jN,{option:L,editable:!0,type:"single",class:B({dragging_container:T.value}),activeId:y.value,onUpdateUrl:E,isSettingAnswer:f.value,onUpdateValue:k,checked:o.value===L.value,id:S.id,list:l.value,"widget-value":o.value,showProgress:I.value||g.value,somebodyChecked:I.value},null,8,["option","class","activeId","isSettingAnswer","checked","id","list","widget-value","showProgress","somebodyChecked"])]))),128)),Et(w("div",_Le,[O(c(Gc),{class:"uploader",action:"",accept:"image/*",ref_key:"uploadEl",ref:m,"show-file-list":!1,"http-request":x},{default:H(()=>[wLe,$Le,CLe]),_:1},512)],512),[[nn,c(p)&&((N=l.value)==null?void 0:N.length)<c(i)&&c(h).isActive]])],2),O(To)]),O(ao)]}),_:1})],2))}}),GA=Ye(SLe,[["__scopeId","data-v-e15fac66"]]),OC=e=>(At("data-v-1ac41c8e"),e=e(),Ot(),e),ELe={class:"add-button"},kLe=OC(()=>w("span",{class:"icon iconfont icon-form-add"},null,-1)),ILe=OC(()=>w("div",null,"点击上传单张图片",-1)),TLe=OC(()=>w("div",null,"最多上传10张",-1)),xLe=se({__name:"imgChecbox",props:{attrs:{},id:{},value:{}},emits:["update:value"],setup(e,{emit:t}){const n=de("isMobileSize"),o=e,a=de("formMode"),{list:r,maxLength:s}=wo(o.attrs),i=P(r.value),l=xa();Se(o,S=>{i.value=S.attrs.list},{deep:!0});const d=t,f=M(()=>h.isSettingAnswer),p=de("editable"),h=de("widgetStore"),m=P(null),b=P(null),g=P(!1),y=P(""),_=P(!1);st(()=>{l==5&&Ep(!0)});function I(S){const D=o.value||[],N=D.indexOf(S);N===-1?D.push(S):D.splice(N,1),d("update:value",D)}async function k(S){var N;y.value=S,((N=m.value)==null?void 0:N.$el.querySelector("input")).click()}const E=S=>{var D;return((D=o.value)==null?void 0:D.includes(S.value))||!1},T=M({get:()=>i.value.some(S=>E(S))&&!!h.attrs.viewVoteRate});Se(T,()=>{g.value=!0}),Ir(b,i,{handle:".drag_handle",direction:"vertical",ghostClass:"ghost_row",group:{name:"imageRadio",pull:!1},dragClass:"drag_row",animation:150,forceFallback:!0,onStart(){_.value=!0},onEnd:S=>{_.value=!1,S.oldIndex!==S.newIndex&&Xt({id:o.id,attr:"list",value:i.value})}});async function x(S){if(S.file.size>15*1024*1024){ht.error("图片大小不能超过15M");return}const D=b$(S.file.name);(await exports.globalInject.uploadFile(S.file,{name:`form-${o.id}-${at()}${D}`})).subscribe({error:L=>{ht.error(L)},complete:L=>{if(!L.key){ht.error("上传失败");return}if(y.value)i.value=i.value.map(F=>(F.value===y.value&&(F.url=exports.globalInject.imagePrefix+L.key),F)),y.value="",Xt({id:o.id,attr:"list",value:i.value});else{const F={label:`选项${i.value.length+1}`,value:at(),url:exports.globalInject.imagePrefix+L.key};ou(o.id,[F])}}})}return(S,D)=>(C(),A("div",{class:B(["radio-box widget-box",{"widget-not-active":!c(h).isActive}])},[O(Kn),O(lo,null,{default:H(()=>{var N;return[O(eo),w("div",{class:B(["option-list-box",{disabled:c(a)==="answer-preview"}])},[w("div",{class:B(["option-list",{"option-list-input":["input","preview"].includes(c(a))&&!c(n)}]),ref_key:"optionList",ref:b},[(C(!0),A(Ae,null,et(i.value,L=>{var F;return C(),A("div",{class:"option-item",key:L.value},[O(jN,{option:L,editable:!0,activeId:y.value,type:"multiple",class:B({dragging_container:_.value}),checked:((F=o.value)==null?void 0:F.includes(L.value))||!1,onUpdateUrl:k,onUpdateValue:I,isSettingAnswer:f.value,id:S.id,list:i.value,"widget-value":o.value,showProgress:T.value||g.value,somebodyChecked:T.value},null,8,["option","activeId","class","checked","isSettingAnswer","id","list","widget-value","showProgress","somebodyChecked"])])}),128)),Et(w("div",ELe,[O(c(Gc),{class:"uploader",action:"",accept:"image/*",ref_key:"uploadEl",ref:m,"show-file-list":!1,"http-request":x},{default:H(()=>[kLe,ILe,TLe]),_:1},512)],512),[[nn,c(p)&&((N=i.value)==null?void 0:N.length)<c(s)&&c(h).isActive]])],2),O(To)],2),O(ao)]}),_:1})],2))}}),QA=Ye(xLe,[["__scopeId","data-v-1ac41c8e"]]),ALe={name:"图片单选",icon:"tupian1",summary:{title:"图片单选",brief:"从一组图片中选择一张作为唯一的答案。",image:Ke("images/widget/img-select.png")}},OLe={name:"图片多选",icon:"ic_image_upload",summary:{title:"图片多选",brief:"从一组图片中选择多张作为答案。",image:Ke("images/widget/img-multi-select.png")}},DLe={name:"图片单选",icon:"tupian1",color:"#58BC68",summary:{title:"图片单选",brief:"从一组图片中选择一张作为唯一的答案。",image:Ke("images/widget/img-select.png")}},PLe={name:"图片多选",icon:"ic_image_upload",color:"#58BC68",summary:{title:"图片多选",brief:"从一组图片中选择多张作为答案。",image:Ke("images/widget/img-multi-select.png")}},MLe={class:"option-box"},NLe={key:0,class:"sort-icon"},RLe={key:1,class:"sort-icon-answer"},LLe={key:0},FLe=["contenteditable","onKeydown"],BLe={key:0,class:"editor-box-sort operation-icon"},VLe=se({__name:"option",props:{value:{},optionValue:{},id:{},activeId:{},index:{},list:{}},emits:["updateActiveId","updateValue"],setup(e,{emit:t}){const n=e,o=t,a=de("editable"),r=de("isMobileSize"),s=P(null),i=P(!1),{id:l,value:d,optionValue:f,activeId:p,list:h}=wo(n),m=M(()=>{let E=[];return a?E.push("option-box-editable"):E.push("option-box-answer"),(d.value||[]).includes(f.value.value)&&E.push("option-box-checked"),E});function b(){a&&o("updateActiveId",f.value.value)}function g(){var E,T;if(!a){let x=[];(E=d.value)!=null&&E.includes(f.value.value)?x=d.value.filter(S=>S!==f.value.value):(x=[...d.value||[],f.value.value],n.list.length-x.length===1&&x.push((T=n.list.find(S=>!x.includes(S.value)))==null?void 0:T.value)),o("updateValue",x)}}function y(){h.value.length<=1||B$(l.value,f.value.value)}function _(){var T;i.value=!1,V$(f.value.value,((T=s.value)==null?void 0:T.innerText)||""),o("updateActiveId","");const E=window.getSelection();E==null||E.removeAllRanges()}function I(E=!1){if(!a||i.value)return;i.value=!0;const T=s.value;T.focus(),E&&ot(()=>{const x=document.createRange(),S=window.getSelection();x.selectNodeContents(T),T.selectionStart=T==null?void 0:T.innerText.length,T.selectionEnd=T==null?void 0:T.innerText.length,S==null||S.removeAllRanges(),S==null||S.addRange(x)})}function k(){i.value=!1}return Se(p,E=>{E===f.value.value?I(!0):k()}),(E,T)=>{var x,S,D;return C(),A("div",MLe,[w("div",{class:B(["option-content",m.value]),onClick:g},[c(a)?(C(),A("div",NLe)):(C(),A("div",RLe,[w("div",{class:B(["sort-icon-box",{checked:(x=c(d))==null?void 0:x.includes(c(f).value)}])},[(S=c(d))!=null&&S.includes(c(f).value)?(C(),A("span",LLe,ie(E.index+1),1)):G("",!0)],2)])),w("div",{class:B(["option-label",[i.value&&"text-editable ",!c(a)&&"option-label-answer",c(r)?"mobile":"pc"]]),tabindex:"0",ref_key:"optionLabel",ref:s,onBlur:_,onFocus:b,contenteditable:c(a),onKeydown:Ln(mt(_,["prevent"]),["enter"]),onPaste:T[0]||(T[0]=(...N)=>c(tl)&&c(tl)(...N))},[w("span",null,ie(c(f).label),1)],42,FLe)],2),c(a)?(C(),A("div",BLe,[w("div",{class:B(["delete-icon",{"icon-disabled":((D=c(h))==null?void 0:D.length)<=1}])},[O(c(_o),{class:"box-item",effect:"dark",content:"删除",placement:"top"},{default:H(()=>[w("span",{onClick:y,class:"icon iconfont icon-form-circle-remove"})]),_:1})],2)])):G("",!0)])}}}),zLe=Ye(VLe,[["__scopeId","data-v-8b8bb93c"]]),jLe=e=>(At("data-v-be82239b"),e=e(),Ot(),e),ULe=jLe(()=>w("span",{class:"icon iconfont icon-form-handle-v"},null,-1)),WLe=[ULe],HLe=se({__name:"sort",props:{attrs:{},id:{},value:{}},emits:["update:value"],setup(e,{emit:t}){const{showDialog:n}=Bp(),o=e,a=P(!1),{list:r}=wo(o.attrs),s=de("editable"),i=de("widgetStore"),l=de("formMode"),d=t,f=P(null),p=P(""),h=[{key:"addOption",label:"添加选项",icon:"fill-circle-add",callback:()=>{y()}},{key:"editOption",label:"批量编辑",callback:()=>{n({title:"编辑选项",component:Hf,params:{onUpdate:_,options:r.value}})}}],m=M(()=>{var I;if((I=o.value)!=null&&I.length&&!s){let k=o.value||[],E=r.value.filter(x=>!k.includes(x.value));return[...k.map(x=>r.value.find(S=>S.value===x)),...E]}else return r.value});Ir(f,r,{handle:".drag_handle",direction:"vertical",ghostClass:"ghost_row",dragClass:"drag_row",group:{name:"basicSortList",pull:!1},animation:150,forceFallback:!0,onStart(){a.value=!0},onEnd:I=>{a.value=!1,I.oldIndex!==I.newIndex&&Xt({id:o.id,attr:"list",value:r.value})}});function b(I){d("update:value",I)}function g(I){p.value=I}function y(){let I={value:at(),label:`选项${r.value.length+1}`};ou(o.id,[I]),ot(()=>{p.value=I.value})}function _(I){Xt({id:o.id,attr:"list",value:I})}return(I,k)=>(C(),A("div",{class:B(["radio-box widget-box",{"widget-not-active":!c(i).isActive}])},[O(Kn),O(lo,null,{default:H(()=>[O(eo),O(X1,{name:"option-list",ref_key:"optionList",ref:f,class:B([{"option-list-editable":c(s),disabled:c(l)==="answer-preview"},"option-list"]),tag:"div"},{default:H(()=>[(C(!0),A(Ae,null,et(m.value,(E,T)=>(C(),A("div",{class:B(["option-item",{"option-item-active":p.value===E.value,"option-move":!c(s)}]),key:E.value},[c(s)?(C(),A("div",{key:0,class:B(["drag_handle",{"drag_handle-h":a.value}])},WLe,2)):G("",!0),O(zLe,{optionValue:E,id:o.id,list:c(r),activeId:p.value,onUpdateActiveId:g,onUpdateValue:b,value:I.value,index:T},null,8,["optionValue","id","list","activeId","value","index"])],2))),128))]),_:1},8,["class"]),O(To),O(ao,{customs:h})]),_:1})],2))}}),qLe=Ye(HLe,[["__scopeId","data-v-be82239b"]]),KLe={name:"排序",icon:"sort",summary:{title:"排序",brief:"允许用户对多个选项按照一定的顺序进行排列,以体现用户对这些选项相对重要性或优先级的判断。",image:Ke("images/widget/sort.png")}},YLe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACi0lEQVR4AexWsW4TQRCduTiShejIWfkDUiIhhGyQMKIlEvxBkChwnIKOJoULCugo4pgCCf8BSIGaIIVzgZAo4Q+iO5cIWbK5YebiWY69PSe2LpcUOWm8t/vezHu3t95bD874Oj8G/HawV2sPaFYwZ+y3B8/yJk0wvx2MZ9UQjDl7WsPMAALe18G8ljkVIFjLwwVLOLmEI4A5RssYOIIAiOhpHFPTFYBwO/o9ainXbhOMOZlcoicENLH50ncYgO/DXuOzK8Kd+hfo3x1JojMYE046F2D5EBE7CFhxmfCchQoaXGl9vYreZB8BVgngkAi27NKnZiAjHleavEZ+lGLAJT7s3fhpi0u/8BmYR7xwA/OK/2dAV6i3hBMBFgkPxy/MguN3bk+71lYt0Ui9AtzmVdoPf42+CbBIxLT0hjeS9+QQl3pSmwj6ALgN08sYiLr1l9Fu/dHM//k0Ka8Z9m5+DHcbD+0nN3zeJyLWEC0dMwZ0oOz2wsDFDJgZ8Pmg4W8O3sLGp6prIcomU9sM3l1pB/dc+InGuLZoiJbyjQE+CTxHhI3a5ep1BbUVcfmqAeIDD/AxLHhJbdEQLS3h6Q3y91ru4z9UkVZDxVE/qXGlo9i8rdbGqZbkGwPSscMh3szdZOzkE/ZzDZQhLh6dBsoSdxtAWJMFh//eeeHTLsIamRngVbpTlriYyBrgFUp8hObjeQdgvLrSCu5o1LYGt/L2CSkmmHCUb7f8cNcSXuonY0AwZBMe4mvPw/108KHywL9U7UHOlWAEB+mc9D0ivrJTjQEC+mCDdp85E0DInGwNj7GEYwbcN8wxWsZA1G2sh906zoqo21hOHybs8oIJJzy+zrrmGgM6UHR7XL2/AAAA//8kN4IgAAAABklEQVQDAHbRpVDMZtJxAAAAAElFTkSuQmCC";/*!
130
130
  * Signature Pad v5.1.3 | https://github.com/szimek/signature_pad
131
131
  * (c) 2025 Szymon Nowak | Released under the MIT license
132
- */var Um=class{constructor(e,t,n,o){Vn(this,"x");Vn(this,"y");Vn(this,"pressure");Vn(this,"time");if(isNaN(e)||isNaN(t))throw new Error(`Point is invalid: (${e}, ${t})`);this.x=+e,this.y=+t,this.pressure=n||0,this.time=o||Date.now()}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}equals(e){return this.x===e.x&&this.y===e.y&&this.pressure===e.pressure&&this.time===e.time}velocityFrom(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):0}},GLe=class UN{constructor(t,n,o,a,r,s){this.startPoint=t,this.control2=n,this.control1=o,this.endPoint=a,this.startWidth=r,this.endWidth=s}static fromPoints(t,n){const o=this.calculateControlPoints(t[0],t[1],t[2]).c2,a=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new UN(t[1],o,a,t[2],n.start,n.end)}static calculateControlPoints(t,n,o){const a=t.x-n.x,r=t.y-n.y,s=n.x-o.x,i=n.y-o.y,l={x:(t.x+n.x)/2,y:(t.y+n.y)/2},d={x:(n.x+o.x)/2,y:(n.y+o.y)/2},f=Math.sqrt(a*a+r*r),p=Math.sqrt(s*s+i*i),h=l.x-d.x,m=l.y-d.y,b=f+p==0?0:p/(f+p),g={x:d.x+h*b,y:d.y+m*b},y=n.x-g.x,_=n.y-g.y;return{c1:new Um(l.x+y,l.y+_),c2:new Um(d.x+y,d.y+_)}}length(){let n=0,o,a;for(let r=0;r<=10;r+=1){const s=r/10,i=this.point(s,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),l=this.point(s,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(r>0){const d=i-o,f=l-a;n+=Math.sqrt(d*d+f*f)}o=i,a=l}return n}point(t,n,o,a,r){return n*(1-t)*(1-t)*(1-t)+3*o*(1-t)*(1-t)*t+3*a*(1-t)*t*t+r*t*t*t}},QLe=class{constructor(){Vn(this,"_et");try{this._et=new EventTarget}catch{this._et=document}}addEventListener(e,t,n){this._et.addEventListener(e,t,n)}dispatchEvent(e){return this._et.dispatchEvent(e)}removeEventListener(e,t,n){this._et.removeEventListener(e,t,n)}};function JLe(e,t=250){let n=0,o=null,a,r,s;const i=()=>{n=Date.now(),o=null,a=e.apply(r,s),o||(r=null,s=[])};return function(...d){const f=Date.now(),p=t-(f-n);return r=this,s=d,p<=0||p>t?(o&&(clearTimeout(o),o=null),n=f,a=e.apply(r,s),o||(r=null,s=[])):o||(o=window.setTimeout(i,p)),a}}var XLe=class _1 extends QLe{constructor(n,o={}){super();Vn(this,"dotSize");Vn(this,"minWidth");Vn(this,"maxWidth");Vn(this,"penColor");Vn(this,"minDistance");Vn(this,"velocityFilterWeight");Vn(this,"compositeOperation");Vn(this,"backgroundColor");Vn(this,"throttle");Vn(this,"canvasContextOptions");Vn(this,"_ctx");Vn(this,"_drawingStroke",!1);Vn(this,"_isEmpty",!0);Vn(this,"_dataUrl");Vn(this,"_dataUrlOptions");Vn(this,"_lastPoints",[]);Vn(this,"_data",[]);Vn(this,"_lastVelocity",0);Vn(this,"_lastWidth",0);Vn(this,"_strokeMoveUpdate");Vn(this,"_strokePointerId");this.canvas=n,this.velocityFilterWeight=o.velocityFilterWeight||.7,this.minWidth=o.minWidth||.5,this.maxWidth=o.maxWidth||2.5,this.throttle=o.throttle??16,this.minDistance=o.minDistance??5,this.dotSize=o.dotSize||0,this.penColor=o.penColor||"black",this.backgroundColor=o.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=o.compositeOperation||"source-over",this.canvasContextOptions=o.canvasContextOptions??{},this._strokeMoveUpdate=this.throttle?JLe(_1.prototype._strokeUpdate,this.throttle):_1.prototype._strokeUpdate,this._handleMouseDown=this._handleMouseDown.bind(this),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handlePointerDown=this._handlePointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._handlePointerCancel=this._handlePointerCancel.bind(this),this._handleTouchCancel=this._handleTouchCancel.bind(this),this._ctx=n.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:n,canvas:o}=this;n.fillStyle=this.backgroundColor,n.clearRect(0,0,o.width,o.height),n.fillRect(0,0,o.width,o.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0,this._dataUrl=void 0,this._dataUrlOptions=void 0,this._strokePointerId=void 0}redraw(){const n=this._data,o=this._dataUrl,a=this._dataUrlOptions;this.clear(),o&&this.fromDataURL(o,a),this.fromData(n,{clear:!1})}fromDataURL(n,o={}){return new Promise((a,r)=>{const s=new Image,i=o.ratio||window.devicePixelRatio||1,l=o.width||this.canvas.width/i,d=o.height||this.canvas.height/i,f=o.xOffset||0,p=o.yOffset||0;this._reset(this._getPointGroupOptions()),s.onload=()=>{this._ctx.drawImage(s,f,p,l,d),a()},s.onerror=h=>{r(h)},s.crossOrigin="anonymous",s.src=n,this._isEmpty=!1,this._dataUrl=n,this._dataUrlOptions={...o}})}toDataURL(n="image/png",o){switch(n){case"image/svg+xml":return typeof o!="object"&&(o=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(o))}`;default:return typeof o!="number"&&(o=void 0),this.canvas.toDataURL(n,o)}}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none",this.canvas.style.webkitUserSelect="none";const n=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!n?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.style.webkitUserSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){const n=window.document===this.canvas.ownerDocument?window:this.canvas.ownerDocument.defaultView??this.canvas.ownerDocument;return{addEventListener:n.addEventListener.bind(n),removeEventListener:n.removeEventListener.bind(n)}}_removeMoveUpEventListeners(){const{removeEventListener:n}=this._getListenerFunctions();n("pointermove",this._handlePointerMove),n("pointerup",this._handlePointerUp),n("pointercancel",this._handlePointerCancel),n("mousemove",this._handleMouseMove),n("mouseup",this._handleMouseUp),n("touchmove",this._handleTouchMove),n("touchend",this._handleTouchEnd),n("touchcancel",this._handleTouchCancel)}isEmpty(){return this._isEmpty}fromData(n,{clear:o=!0}={}){o&&this.clear(),this._fromData(n,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(n)}toData(){return this._data}_isLeftButtonPressed(n,o){return o?n.buttons===1:(n.buttons&1)===1}_pointerEventToSignatureEvent(n){return{event:n,type:n.type,x:n.clientX,y:n.clientY,pressure:"pressure"in n?n.pressure:0}}_touchEventToSignatureEvent(n){const o=n.changedTouches[0];return{event:n,type:n.type,x:o.clientX,y:o.clientY,pressure:o.force}}_handleMouseDown(n){!this._isLeftButtonPressed(n,!0)||this._drawingStroke||this._strokeBegin(this._pointerEventToSignatureEvent(n))}_handleMouseMove(n){if(!this._isLeftButtonPressed(n,!0)||!this._drawingStroke){this._strokeEnd(this._pointerEventToSignatureEvent(n),!1);return}this._strokeMoveUpdate(this._pointerEventToSignatureEvent(n))}_handleMouseUp(n){this._isLeftButtonPressed(n)||this._strokeEnd(this._pointerEventToSignatureEvent(n))}_handleTouchStart(n){n.targetTouches.length!==1||this._drawingStroke||(n.cancelable&&n.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(n)))}_handleTouchMove(n){if(n.targetTouches.length===1){if(n.cancelable&&n.preventDefault(),!this._drawingStroke){this._strokeEnd(this._touchEventToSignatureEvent(n),!1);return}this._strokeMoveUpdate(this._touchEventToSignatureEvent(n))}}_handleTouchEnd(n){n.targetTouches.length===0&&(n.cancelable&&n.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(n)))}_handlePointerCancel(n){this._allowPointerId(n)&&(n.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(n),!1))}_handleTouchCancel(n){n.cancelable&&n.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(n),!1)}_getPointerId(n){return n.persistentDeviceId||n.pointerId}_allowPointerId(n,o=!1){return typeof this._strokePointerId>"u"?o:this._getPointerId(n)===this._strokePointerId}_handlePointerDown(n){this._drawingStroke||!this._isLeftButtonPressed(n)||!this._allowPointerId(n,!0)||(this._strokePointerId=this._getPointerId(n),n.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(n)))}_handlePointerMove(n){if(this._allowPointerId(n)){if(!this._isLeftButtonPressed(n,!0)||!this._drawingStroke){this._strokeEnd(this._pointerEventToSignatureEvent(n),!1);return}n.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(n))}}_handlePointerUp(n){this._isLeftButtonPressed(n)||!this._allowPointerId(n)||(n.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(n)))}_getPointGroupOptions(n){return{penColor:n&&"penColor"in n?n.penColor:this.penColor,dotSize:n&&"dotSize"in n?n.dotSize:this.dotSize,minWidth:n&&"minWidth"in n?n.minWidth:this.minWidth,maxWidth:n&&"maxWidth"in n?n.maxWidth:this.maxWidth,velocityFilterWeight:n&&"velocityFilterWeight"in n?n.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:n&&"compositeOperation"in n?n.compositeOperation:this.compositeOperation}}_strokeBegin(n){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:n,cancelable:!0})))return;const{addEventListener:a}=this._getListenerFunctions();switch(n.event.type){case"mousedown":a("mousemove",this._handleMouseMove,{passive:!1}),a("mouseup",this._handleMouseUp,{passive:!1});break;case"touchstart":a("touchmove",this._handleTouchMove,{passive:!1}),a("touchend",this._handleTouchEnd,{passive:!1}),a("touchcancel",this._handleTouchCancel,{passive:!1});break;case"pointerdown":a("pointermove",this._handlePointerMove,{passive:!1}),a("pointerup",this._handlePointerUp,{passive:!1}),a("pointercancel",this._handlePointerCancel,{passive:!1});break}this._drawingStroke=!0;const r=this._getPointGroupOptions(),s={...r,points:[]};this._data.push(s),this._reset(r),this._strokeUpdate(n)}_strokeUpdate(n){if(!this._drawingStroke)return;if(this._data.length===0){this._strokeBegin(n);return}this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:n}));const o=this._createPoint(n.x,n.y,n.pressure),a=this._data[this._data.length-1],r=a.points,s=r.length>0&&r[r.length-1],i=s?o.distanceTo(s)<=this.minDistance:!1,l=this._getPointGroupOptions(a);if(!s||!(s&&i)){const d=this._addPoint(o,l);s?d&&this._drawCurve(d,l):this._drawDot(o,l),r.push({time:o.time,x:o.x,y:o.y,pressure:o.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:n}))}_strokeEnd(n,o=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(o&&this._strokeUpdate(n),this._drawingStroke=!1,this._strokePointerId=void 0,this.dispatchEvent(new CustomEvent("endStroke",{detail:n})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown,{passive:!1})}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown,{passive:!1})}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart,{passive:!1})}_reset(n){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(n.minWidth+n.maxWidth)/2,this._ctx.fillStyle=n.penColor,this._ctx.globalCompositeOperation=n.compositeOperation}_createPoint(n,o,a){const r=this.canvas.getBoundingClientRect();return new Um(n-r.left,o-r.top,a,new Date().getTime())}_addPoint(n,o){const{_lastPoints:a}=this;if(a.push(n),a.length>2){a.length===3&&a.unshift(a[0]);const r=this._calculateCurveWidths(a[1],a[2],o),s=GLe.fromPoints(a,r);return a.shift(),s}return null}_calculateCurveWidths(n,o,a){const r=a.velocityFilterWeight*o.velocityFrom(n)+(1-a.velocityFilterWeight)*this._lastVelocity,s=this._strokeWidth(r,a),i={end:s,start:this._lastWidth};return this._lastVelocity=r,this._lastWidth=s,i}_strokeWidth(n,o){return Math.max(o.maxWidth/(n+1),o.minWidth)}_drawCurveSegment(n,o,a){const r=this._ctx;r.moveTo(n,o),r.arc(n,o,a,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(n,o){const a=this._ctx,r=n.endWidth-n.startWidth,s=Math.ceil(n.length())*2;a.beginPath(),a.fillStyle=o.penColor;for(let i=0;i<s;i+=1){const l=i/s,d=l*l,f=d*l,p=1-l,h=p*p,m=h*p;let b=m*n.startPoint.x;b+=3*h*l*n.control1.x,b+=3*p*d*n.control2.x,b+=f*n.endPoint.x;let g=m*n.startPoint.y;g+=3*h*l*n.control1.y,g+=3*p*d*n.control2.y,g+=f*n.endPoint.y;const y=Math.min(n.startWidth+f*r,o.maxWidth);this._drawCurveSegment(b,g,y)}a.closePath(),a.fill()}_drawDot(n,o){const a=this._ctx,r=o.dotSize>0?o.dotSize:(o.minWidth+o.maxWidth)/2;a.beginPath(),this._drawCurveSegment(n.x,n.y,r),a.closePath(),a.fillStyle=o.penColor,a.fill()}_fromData(n,o,a){for(const r of n){const{points:s}=r,i=this._getPointGroupOptions(r);if(s.length>1)for(let l=0;l<s.length;l+=1){const d=s[l],f=new Um(d.x,d.y,d.pressure,d.time);l===0&&this._reset(i);const p=this._addPoint(f,i);p&&o(p,i)}else this._reset(i),a(s[0],i)}}toSVG({includeBackgroundColor:n=!1,includeDataUrl:o=!1}={}){var p,h,m,b,g;const a=this._data,r=Math.max(window.devicePixelRatio||1,1),s=0,i=0,l=this.canvas.width/r,d=this.canvas.height/r,f=document.createElementNS("http://www.w3.org/2000/svg","svg");if(f.setAttribute("xmlns","http://www.w3.org/2000/svg"),f.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),f.setAttribute("viewBox",`${s} ${i} ${l} ${d}`),f.setAttribute("width",l.toString()),f.setAttribute("height",d.toString()),n&&this.backgroundColor){const y=document.createElement("rect");y.setAttribute("width","100%"),y.setAttribute("height","100%"),y.setAttribute("fill",this.backgroundColor),f.appendChild(y)}if(o&&this._dataUrl){const y=((p=this._dataUrlOptions)==null?void 0:p.ratio)||window.devicePixelRatio||1,_=((h=this._dataUrlOptions)==null?void 0:h.width)||this.canvas.width/y,I=((m=this._dataUrlOptions)==null?void 0:m.height)||this.canvas.height/y,k=((b=this._dataUrlOptions)==null?void 0:b.xOffset)||0,E=((g=this._dataUrlOptions)==null?void 0:g.yOffset)||0,T=document.createElement("image");T.setAttribute("x",k.toString()),T.setAttribute("y",E.toString()),T.setAttribute("width",_.toString()),T.setAttribute("height",I.toString()),T.setAttribute("preserveAspectRatio","none"),T.setAttribute("href",this._dataUrl),f.appendChild(T)}return this._fromData(a,(y,{penColor:_})=>{const I=document.createElement("path");if(!isNaN(y.control1.x)&&!isNaN(y.control1.y)&&!isNaN(y.control2.x)&&!isNaN(y.control2.y)){const k=`M ${y.startPoint.x.toFixed(3)},${y.startPoint.y.toFixed(3)} C ${y.control1.x.toFixed(3)},${y.control1.y.toFixed(3)} ${y.control2.x.toFixed(3)},${y.control2.y.toFixed(3)} ${y.endPoint.x.toFixed(3)},${y.endPoint.y.toFixed(3)}`;I.setAttribute("d",k),I.setAttribute("stroke-width",(y.endWidth*2.25).toFixed(3)),I.setAttribute("stroke",_),I.setAttribute("fill","none"),I.setAttribute("stroke-linecap","round"),f.appendChild(I)}},(y,{penColor:_,dotSize:I,minWidth:k,maxWidth:E})=>{const T=document.createElement("circle"),x=I>0?I:(k+E)/2;T.setAttribute("r",x.toString()),T.setAttribute("cx",y.x.toString()),T.setAttribute("cy",y.y.toString()),T.setAttribute("fill",_),f.appendChild(T)}),f.outerHTML}};const bu=e=>(At("data-v-aa057477"),e=e(),Ot(),e),ZLe={key:0,class:"signature-pad-container"},eFe=bu(()=>w("div",{class:"title"},"手写签名",-1)),tFe=bu(()=>w("img",{src:YLe,alt:"全屏"},null,-1)),nFe=bu(()=>w("div",null,"全屏",-1)),oFe=[tFe,nFe],aFe={key:0,class:"placeholder"},rFe=bu(()=>w("div",{class:"text"},"清除",-1)),sFe=bu(()=>w("div",{class:"text"},"完成",-1)),iFe={key:1,class:"signature-pad-landscape-container"},lFe={class:"footer"},uFe={class:"btn-group"},cFe=bu(()=>w("div",{class:"text"},"清除",-1)),dFe=bu(()=>w("div",{class:"text"},"完成",-1)),fFe={key:0,class:"placeholder"},pFe={__name:"signaturePad",props:{visible:Boolean,showWatermark:!1},emits:["save","close"],setup(e,{emit:t}){const n=e,o=t,a=P(null),r=P(null),s=P(null);P(null);const i=P(!1),l=P(!1),d=P(n.visible);Se(()=>n.visible,k=>{d.value=k,k&&ot(()=>{p()})}),Se(()=>n.showWatermark,k=>{k?m():h()});const f=async()=>{i.value=!i.value,l.value=!1,ot(()=>{p()})},p=()=>{if(!s.value)return;const k=s.value,E=1;k.width=k.clientWidth*E,k.height=k.clientHeight*E,a.value=new XLe(k),a.value.addEventListener("beginStroke",()=>{l.value=!0}),n.showWatermark?m():h()},h=()=>{if(!s.value)return;const k=s.value;k.getContext("2d").clearRect(0,0,k.width,k.height)},m=()=>{if(!s.value)return;const k=s.value,E=k.getContext("2d");E.save(),E.fillStyle="#d8d8d8",E.font="12px Arial",E.textAlign="center",E.textBaseline="middle";const{code_name:T,chain:x}=exports.globalInject.getExtraData(),S=Lf(),D=`仅限${T}(${x})中填写${S}时使用`,L=E.measureText(D).width,F=14,z=i.value?Math.PI/3:-Math.PI/6,j=Math.cos(z),X=Math.sin(z),U=Math.abs(L*j)+Math.abs(F*X),W=Math.abs(F*j)+Math.abs(L*X);let Q=1.3;i.value&&(Q=2);const q=U*Q,V=W*Q,Y=q/2,Z=Math.sqrt(k.width**2+k.height**2),ce=-Z,re=Z,ye=-Z,he=Z;E.translate(k.width/2,k.height/2),E.rotate(z);for(let le=ce;le<re;le+=q)for(let ue=ye;ue<he;ue+=60){const J=le+(ue/V%2===0?0:Y);E.fillText(D,J,ue)}E.restore()};st(()=>{window.addEventListener("resize",p)});const b=async(k,E)=>{if(!k)return ht.error("画布元素不存在!"),null;const T=1e3,x=T/k.clientWidth,S=T/k.clientHeight,D=k.clientWidth,N=k.clientHeight;let L,F;E?(L=N*S,F=D*S):(L=D*x,F=N*x);const z=document.createElement("canvas");z.width=L,z.height=F;const j=z.getContext("2d");return j?(j.imageSmoothingEnabled=!0,j.imageSmoothingQuality="high",j.fillStyle="#FFFFFF",j.fillRect(0,0,z.width,z.height),E?j.scale(S,S):j.scale(x,x),E?(j.translate(N/2,D/2),j.rotate(-Math.PI/2),j.drawImage(k,-D/2,-N/2)):j.drawImage(k,0,0,D,N),new Promise(X=>{z.toBlob(U=>{X(U||null)},"image/png",1)})):(ht.error("无法获取画布绘图上下文!"),null)},g=async()=>{const k=await b(s.value,!0);if(!k){ht.error("保存签名失败!");return}o("save",k),I()},y=async()=>{if(i.value){await g();return}const k=await b(s.value,!1);if(!k){ht.error("保存签名失败!");return}o("save",k),I()},_=()=>{a.value.clear(),l.value=!1,n.showWatermark&&m()},I=()=>{o("close")};return(k,E)=>(C(),A(Ae,null,[d.value&&!i.value?(C(),A("div",ZLe,[w("div",{class:"tool-bar"},[w("i",{class:"iconfont icon-form-close",onClick:I}),eFe,w("div",{class:"fullscreen",onClick:f},oFe)]),w("div",{class:"signature-container",ref_key:"signatureRef",ref:r},[w("canvas",{ref_key:"canvasRef",ref:s,class:"signature-canvas"},null,512),l.value?G("",!0):(C(),A("div",aFe,"请在该区域签字"))],512),w("div",{class:B(["footer",{"landscape-footer":i.value}])},[w("div",{class:"btn clear",onClick:_},[O(c(lt),null,{default:H(()=>[O(c(y_))]),_:1}),rFe]),w("div",{class:"btn complete",onClick:y},[O(c(lt),null,{default:H(()=>[O(c(__))]),_:1}),sFe])],2)])):G("",!0),d.value&&i.value?(C(),A("div",iFe,[w("div",lFe,[w("div",{class:"btn change-btn",onClick:f}," 切为半屏 "),w("div",uFe,[w("div",{class:"btn clear",onClick:_},[O(c(lt),null,{default:H(()=>[O(c(y_))]),_:1}),cFe]),w("div",{class:"btn complete",onClick:y},[O(c(lt),null,{default:H(()=>[O(c(__))]),_:1}),dFe])])]),w("div",{class:"signature-container",ref_key:"signatureRef",ref:r},[w("canvas",{ref_key:"canvasRef",ref:s,class:"signature-canvas"},null,512),l.value?G("",!0):(C(),A("div",fFe,"请在该区域签字"))],512)])):G("",!0)],64))}},vFe=Ye(pFe,[["__scopeId","data-v-aa057477"]]),WN=e=>new Promise((t,n)=>{const o=`form_render_jsonp_${Date.now()}`,a=document.createElement("script");a.src=`${e}${e.includes("?")?"&":"?"}callback=${o}&output=jsonp`,a.async=!0,a.onload=()=>{a.remove()},a.onerror=()=>{a.remove(),n()},window[o]=r=>{t(r),delete window[o]},document.body.appendChild(a)}),HN=e=>(At("data-v-4a750439"),e=e(),Ot(),e),hFe={class:"signature-container"},mFe=HN(()=>w("i",{class:"iconfont icon-form-a-dianziqianming41"},null,-1)),gFe=HN(()=>w("div",{class:"title"},"点此签名",-1)),bFe=[mFe,gFe],yFe={key:1,class:"signature-img"},_Fe=["src"],wFe=se({__name:"watermark",setup(e){const t=de("widgetStore"),n=de("editable"),o=P(!1),a=P(!1),r=P(""),s=P({});Se(()=>t.attrs.showOneTimeUseTag,m=>{a.value=m},{deep:!0}),Se(()=>t.value,m=>{m!=null&&m.value&&(r.value=m.value)},{deep:!0});const i=async()=>{if(!n){if(t.attrs.showLocation){const{lon:m,lat:b,address:g}=await p();s.value={lat:b,lon:m,address:g};return}o.value=!0}},l=()=>{r.value="",t.updateValue({value:"",position:{}})},d=(m,b)=>m>=-180&&m<=180&&b>=-90&&b<=90,f=async(m,b)=>{var y,_,I;const g=await WN(`https://apis.map.qq.com/ws/geocoder/v1/?location=${b},${m}&key=${Wbe()}`);return((_=(y=g.result)==null?void 0:y.formatted_addresses)==null?void 0:_.standard_address)||((I=g.result)==null?void 0:I.address)||"未知地址"},p=async()=>{const m=()=>new Promise((b,g)=>{if(!("geolocation"in navigator)){ht.error("不支持定位"),g(new Error("浏览器不支持定位"));return}navigator.geolocation.getCurrentPosition(y=>{o.value=!0,b(y)},y=>{ht.error("获取位置权限失败"),g(new Error(`获取位置失败:${y.message}`))},{enableHighAccuracy:!0})});try{const b=await m(),g=b.coords.longitude,y=b.coords.latitude;if(!d(g,y))return ht.warning("无法获取当前位置,请检查是否开启定位服务!"),{lon:0,lat:0,address:"未知地址"};let _=g,I=y;const k=await f(_,I);return{lon:_,lat:I,address:k}}catch{return ht.error("获取位置失败"),{lon:0,lat:0,address:"未知地址"}}},h=async m=>{r.value=URL.createObjectURL(m);const b=new File([m],`signature_${at()}.png`,{type:"image/png"});(await exports.globalInject.uploadFile(b)).subscribe({error:y=>{ht.error(y)},complete:async y=>{if(!y.key){ht.error("上传失败");return}const _={};t.attrs.showLocation&&Object.assign(_,{...s.value});const I="https://bc6.afbza.cn/"+y.key;t.updateValue({value:I,position:_})}})};return(m,b)=>(C(),A("div",hFe,[O(Kn),r.value?(C(),A("div",{key:0,class:"clear-btn",onClick:l},"清除")):G("",!0),O(lo,null,{default:H(()=>{var g;return[O(eo),r.value?G("",!0):(C(),A("div",{key:0,class:B(["placeholder-container",{"verfiy-disabled":(g=c(t).valueVer)==null?void 0:g.message}]),onClick:i},bFe,2)),r.value?(C(),A("div",yFe,[w("img",{src:r.value},null,8,_Fe)])):G("",!0),O(To),O(ao),O(vFe,{visible:o.value,showWatermark:a.value,onSave:h,onClose:b[0]||(b[0]=y=>o.value=!1)},null,8,["visible","showWatermark"])]}),_:1})]))}}),$Fe=Ye(wFe,[["__scopeId","data-v-4a750439"]]),CFe={title:"电子签名",desc:"",required:!1,disabled:!1,enabled:!1,showUploadTime:!0,showFiller:!1,showLocation:!1,showQRCode:!1,showOneTimeUseTag:!1},DC={attrs:{...CFe},info:{name:"电子签名",icon:"a-dianziqianming41",vip:!1,summary:{title:"电子签名",brief:`用于获取填表人的签名,适用于文件签阅,信息确认等场景。
132
+ */var Um=class{constructor(e,t,n,o){Vn(this,"x");Vn(this,"y");Vn(this,"pressure");Vn(this,"time");if(isNaN(e)||isNaN(t))throw new Error(`Point is invalid: (${e}, ${t})`);this.x=+e,this.y=+t,this.pressure=n||0,this.time=o||Date.now()}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}equals(e){return this.x===e.x&&this.y===e.y&&this.pressure===e.pressure&&this.time===e.time}velocityFrom(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):0}},GLe=class UN{constructor(t,n,o,a,r,s){this.startPoint=t,this.control2=n,this.control1=o,this.endPoint=a,this.startWidth=r,this.endWidth=s}static fromPoints(t,n){const o=this.calculateControlPoints(t[0],t[1],t[2]).c2,a=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new UN(t[1],o,a,t[2],n.start,n.end)}static calculateControlPoints(t,n,o){const a=t.x-n.x,r=t.y-n.y,s=n.x-o.x,i=n.y-o.y,l={x:(t.x+n.x)/2,y:(t.y+n.y)/2},d={x:(n.x+o.x)/2,y:(n.y+o.y)/2},f=Math.sqrt(a*a+r*r),p=Math.sqrt(s*s+i*i),h=l.x-d.x,m=l.y-d.y,b=f+p==0?0:p/(f+p),g={x:d.x+h*b,y:d.y+m*b},y=n.x-g.x,_=n.y-g.y;return{c1:new Um(l.x+y,l.y+_),c2:new Um(d.x+y,d.y+_)}}length(){let n=0,o,a;for(let r=0;r<=10;r+=1){const s=r/10,i=this.point(s,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),l=this.point(s,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(r>0){const d=i-o,f=l-a;n+=Math.sqrt(d*d+f*f)}o=i,a=l}return n}point(t,n,o,a,r){return n*(1-t)*(1-t)*(1-t)+3*o*(1-t)*(1-t)*t+3*a*(1-t)*t*t+r*t*t*t}},QLe=class{constructor(){Vn(this,"_et");try{this._et=new EventTarget}catch{this._et=document}}addEventListener(e,t,n){this._et.addEventListener(e,t,n)}dispatchEvent(e){return this._et.dispatchEvent(e)}removeEventListener(e,t,n){this._et.removeEventListener(e,t,n)}};function JLe(e,t=250){let n=0,o=null,a,r,s;const i=()=>{n=Date.now(),o=null,a=e.apply(r,s),o||(r=null,s=[])};return function(...d){const f=Date.now(),p=t-(f-n);return r=this,s=d,p<=0||p>t?(o&&(clearTimeout(o),o=null),n=f,a=e.apply(r,s),o||(r=null,s=[])):o||(o=window.setTimeout(i,p)),a}}var XLe=class _1 extends QLe{constructor(n,o={}){super();Vn(this,"dotSize");Vn(this,"minWidth");Vn(this,"maxWidth");Vn(this,"penColor");Vn(this,"minDistance");Vn(this,"velocityFilterWeight");Vn(this,"compositeOperation");Vn(this,"backgroundColor");Vn(this,"throttle");Vn(this,"canvasContextOptions");Vn(this,"_ctx");Vn(this,"_drawingStroke",!1);Vn(this,"_isEmpty",!0);Vn(this,"_dataUrl");Vn(this,"_dataUrlOptions");Vn(this,"_lastPoints",[]);Vn(this,"_data",[]);Vn(this,"_lastVelocity",0);Vn(this,"_lastWidth",0);Vn(this,"_strokeMoveUpdate");Vn(this,"_strokePointerId");this.canvas=n,this.velocityFilterWeight=o.velocityFilterWeight||.7,this.minWidth=o.minWidth||.5,this.maxWidth=o.maxWidth||2.5,this.throttle=o.throttle??16,this.minDistance=o.minDistance??5,this.dotSize=o.dotSize||0,this.penColor=o.penColor||"black",this.backgroundColor=o.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=o.compositeOperation||"source-over",this.canvasContextOptions=o.canvasContextOptions??{},this._strokeMoveUpdate=this.throttle?JLe(_1.prototype._strokeUpdate,this.throttle):_1.prototype._strokeUpdate,this._handleMouseDown=this._handleMouseDown.bind(this),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handlePointerDown=this._handlePointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._handlePointerCancel=this._handlePointerCancel.bind(this),this._handleTouchCancel=this._handleTouchCancel.bind(this),this._ctx=n.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:n,canvas:o}=this;n.fillStyle=this.backgroundColor,n.clearRect(0,0,o.width,o.height),n.fillRect(0,0,o.width,o.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0,this._dataUrl=void 0,this._dataUrlOptions=void 0,this._strokePointerId=void 0}redraw(){const n=this._data,o=this._dataUrl,a=this._dataUrlOptions;this.clear(),o&&this.fromDataURL(o,a),this.fromData(n,{clear:!1})}fromDataURL(n,o={}){return new Promise((a,r)=>{const s=new Image,i=o.ratio||window.devicePixelRatio||1,l=o.width||this.canvas.width/i,d=o.height||this.canvas.height/i,f=o.xOffset||0,p=o.yOffset||0;this._reset(this._getPointGroupOptions()),s.onload=()=>{this._ctx.drawImage(s,f,p,l,d),a()},s.onerror=h=>{r(h)},s.crossOrigin="anonymous",s.src=n,this._isEmpty=!1,this._dataUrl=n,this._dataUrlOptions={...o}})}toDataURL(n="image/png",o){switch(n){case"image/svg+xml":return typeof o!="object"&&(o=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(o))}`;default:return typeof o!="number"&&(o=void 0),this.canvas.toDataURL(n,o)}}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none",this.canvas.style.webkitUserSelect="none";const n=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!n?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.style.webkitUserSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){const n=window.document===this.canvas.ownerDocument?window:this.canvas.ownerDocument.defaultView??this.canvas.ownerDocument;return{addEventListener:n.addEventListener.bind(n),removeEventListener:n.removeEventListener.bind(n)}}_removeMoveUpEventListeners(){const{removeEventListener:n}=this._getListenerFunctions();n("pointermove",this._handlePointerMove),n("pointerup",this._handlePointerUp),n("pointercancel",this._handlePointerCancel),n("mousemove",this._handleMouseMove),n("mouseup",this._handleMouseUp),n("touchmove",this._handleTouchMove),n("touchend",this._handleTouchEnd),n("touchcancel",this._handleTouchCancel)}isEmpty(){return this._isEmpty}fromData(n,{clear:o=!0}={}){o&&this.clear(),this._fromData(n,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(n)}toData(){return this._data}_isLeftButtonPressed(n,o){return o?n.buttons===1:(n.buttons&1)===1}_pointerEventToSignatureEvent(n){return{event:n,type:n.type,x:n.clientX,y:n.clientY,pressure:"pressure"in n?n.pressure:0}}_touchEventToSignatureEvent(n){const o=n.changedTouches[0];return{event:n,type:n.type,x:o.clientX,y:o.clientY,pressure:o.force}}_handleMouseDown(n){!this._isLeftButtonPressed(n,!0)||this._drawingStroke||this._strokeBegin(this._pointerEventToSignatureEvent(n))}_handleMouseMove(n){if(!this._isLeftButtonPressed(n,!0)||!this._drawingStroke){this._strokeEnd(this._pointerEventToSignatureEvent(n),!1);return}this._strokeMoveUpdate(this._pointerEventToSignatureEvent(n))}_handleMouseUp(n){this._isLeftButtonPressed(n)||this._strokeEnd(this._pointerEventToSignatureEvent(n))}_handleTouchStart(n){n.targetTouches.length!==1||this._drawingStroke||(n.cancelable&&n.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(n)))}_handleTouchMove(n){if(n.targetTouches.length===1){if(n.cancelable&&n.preventDefault(),!this._drawingStroke){this._strokeEnd(this._touchEventToSignatureEvent(n),!1);return}this._strokeMoveUpdate(this._touchEventToSignatureEvent(n))}}_handleTouchEnd(n){n.targetTouches.length===0&&(n.cancelable&&n.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(n)))}_handlePointerCancel(n){this._allowPointerId(n)&&(n.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(n),!1))}_handleTouchCancel(n){n.cancelable&&n.preventDefault(),this._strokeEnd(this._touchEventToSignatureEvent(n),!1)}_getPointerId(n){return n.persistentDeviceId||n.pointerId}_allowPointerId(n,o=!1){return typeof this._strokePointerId>"u"?o:this._getPointerId(n)===this._strokePointerId}_handlePointerDown(n){this._drawingStroke||!this._isLeftButtonPressed(n)||!this._allowPointerId(n,!0)||(this._strokePointerId=this._getPointerId(n),n.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(n)))}_handlePointerMove(n){if(this._allowPointerId(n)){if(!this._isLeftButtonPressed(n,!0)||!this._drawingStroke){this._strokeEnd(this._pointerEventToSignatureEvent(n),!1);return}n.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(n))}}_handlePointerUp(n){this._isLeftButtonPressed(n)||!this._allowPointerId(n)||(n.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(n)))}_getPointGroupOptions(n){return{penColor:n&&"penColor"in n?n.penColor:this.penColor,dotSize:n&&"dotSize"in n?n.dotSize:this.dotSize,minWidth:n&&"minWidth"in n?n.minWidth:this.minWidth,maxWidth:n&&"maxWidth"in n?n.maxWidth:this.maxWidth,velocityFilterWeight:n&&"velocityFilterWeight"in n?n.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:n&&"compositeOperation"in n?n.compositeOperation:this.compositeOperation}}_strokeBegin(n){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:n,cancelable:!0})))return;const{addEventListener:a}=this._getListenerFunctions();switch(n.event.type){case"mousedown":a("mousemove",this._handleMouseMove,{passive:!1}),a("mouseup",this._handleMouseUp,{passive:!1});break;case"touchstart":a("touchmove",this._handleTouchMove,{passive:!1}),a("touchend",this._handleTouchEnd,{passive:!1}),a("touchcancel",this._handleTouchCancel,{passive:!1});break;case"pointerdown":a("pointermove",this._handlePointerMove,{passive:!1}),a("pointerup",this._handlePointerUp,{passive:!1}),a("pointercancel",this._handlePointerCancel,{passive:!1});break}this._drawingStroke=!0;const r=this._getPointGroupOptions(),s={...r,points:[]};this._data.push(s),this._reset(r),this._strokeUpdate(n)}_strokeUpdate(n){if(!this._drawingStroke)return;if(this._data.length===0){this._strokeBegin(n);return}this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:n}));const o=this._createPoint(n.x,n.y,n.pressure),a=this._data[this._data.length-1],r=a.points,s=r.length>0&&r[r.length-1],i=s?o.distanceTo(s)<=this.minDistance:!1,l=this._getPointGroupOptions(a);if(!s||!(s&&i)){const d=this._addPoint(o,l);s?d&&this._drawCurve(d,l):this._drawDot(o,l),r.push({time:o.time,x:o.x,y:o.y,pressure:o.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:n}))}_strokeEnd(n,o=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(o&&this._strokeUpdate(n),this._drawingStroke=!1,this._strokePointerId=void 0,this.dispatchEvent(new CustomEvent("endStroke",{detail:n})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown,{passive:!1})}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown,{passive:!1})}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart,{passive:!1})}_reset(n){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(n.minWidth+n.maxWidth)/2,this._ctx.fillStyle=n.penColor,this._ctx.globalCompositeOperation=n.compositeOperation}_createPoint(n,o,a){const r=this.canvas.getBoundingClientRect();return new Um(n-r.left,o-r.top,a,new Date().getTime())}_addPoint(n,o){const{_lastPoints:a}=this;if(a.push(n),a.length>2){a.length===3&&a.unshift(a[0]);const r=this._calculateCurveWidths(a[1],a[2],o),s=GLe.fromPoints(a,r);return a.shift(),s}return null}_calculateCurveWidths(n,o,a){const r=a.velocityFilterWeight*o.velocityFrom(n)+(1-a.velocityFilterWeight)*this._lastVelocity,s=this._strokeWidth(r,a),i={end:s,start:this._lastWidth};return this._lastVelocity=r,this._lastWidth=s,i}_strokeWidth(n,o){return Math.max(o.maxWidth/(n+1),o.minWidth)}_drawCurveSegment(n,o,a){const r=this._ctx;r.moveTo(n,o),r.arc(n,o,a,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(n,o){const a=this._ctx,r=n.endWidth-n.startWidth,s=Math.ceil(n.length())*2;a.beginPath(),a.fillStyle=o.penColor;for(let i=0;i<s;i+=1){const l=i/s,d=l*l,f=d*l,p=1-l,h=p*p,m=h*p;let b=m*n.startPoint.x;b+=3*h*l*n.control1.x,b+=3*p*d*n.control2.x,b+=f*n.endPoint.x;let g=m*n.startPoint.y;g+=3*h*l*n.control1.y,g+=3*p*d*n.control2.y,g+=f*n.endPoint.y;const y=Math.min(n.startWidth+f*r,o.maxWidth);this._drawCurveSegment(b,g,y)}a.closePath(),a.fill()}_drawDot(n,o){const a=this._ctx,r=o.dotSize>0?o.dotSize:(o.minWidth+o.maxWidth)/2;a.beginPath(),this._drawCurveSegment(n.x,n.y,r),a.closePath(),a.fillStyle=o.penColor,a.fill()}_fromData(n,o,a){for(const r of n){const{points:s}=r,i=this._getPointGroupOptions(r);if(s.length>1)for(let l=0;l<s.length;l+=1){const d=s[l],f=new Um(d.x,d.y,d.pressure,d.time);l===0&&this._reset(i);const p=this._addPoint(f,i);p&&o(p,i)}else this._reset(i),a(s[0],i)}}toSVG({includeBackgroundColor:n=!1,includeDataUrl:o=!1}={}){var p,h,m,b,g;const a=this._data,r=Math.max(window.devicePixelRatio||1,1),s=0,i=0,l=this.canvas.width/r,d=this.canvas.height/r,f=document.createElementNS("http://www.w3.org/2000/svg","svg");if(f.setAttribute("xmlns","http://www.w3.org/2000/svg"),f.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),f.setAttribute("viewBox",`${s} ${i} ${l} ${d}`),f.setAttribute("width",l.toString()),f.setAttribute("height",d.toString()),n&&this.backgroundColor){const y=document.createElement("rect");y.setAttribute("width","100%"),y.setAttribute("height","100%"),y.setAttribute("fill",this.backgroundColor),f.appendChild(y)}if(o&&this._dataUrl){const y=((p=this._dataUrlOptions)==null?void 0:p.ratio)||window.devicePixelRatio||1,_=((h=this._dataUrlOptions)==null?void 0:h.width)||this.canvas.width/y,I=((m=this._dataUrlOptions)==null?void 0:m.height)||this.canvas.height/y,k=((b=this._dataUrlOptions)==null?void 0:b.xOffset)||0,E=((g=this._dataUrlOptions)==null?void 0:g.yOffset)||0,T=document.createElement("image");T.setAttribute("x",k.toString()),T.setAttribute("y",E.toString()),T.setAttribute("width",_.toString()),T.setAttribute("height",I.toString()),T.setAttribute("preserveAspectRatio","none"),T.setAttribute("href",this._dataUrl),f.appendChild(T)}return this._fromData(a,(y,{penColor:_})=>{const I=document.createElement("path");if(!isNaN(y.control1.x)&&!isNaN(y.control1.y)&&!isNaN(y.control2.x)&&!isNaN(y.control2.y)){const k=`M ${y.startPoint.x.toFixed(3)},${y.startPoint.y.toFixed(3)} C ${y.control1.x.toFixed(3)},${y.control1.y.toFixed(3)} ${y.control2.x.toFixed(3)},${y.control2.y.toFixed(3)} ${y.endPoint.x.toFixed(3)},${y.endPoint.y.toFixed(3)}`;I.setAttribute("d",k),I.setAttribute("stroke-width",(y.endWidth*2.25).toFixed(3)),I.setAttribute("stroke",_),I.setAttribute("fill","none"),I.setAttribute("stroke-linecap","round"),f.appendChild(I)}},(y,{penColor:_,dotSize:I,minWidth:k,maxWidth:E})=>{const T=document.createElement("circle"),x=I>0?I:(k+E)/2;T.setAttribute("r",x.toString()),T.setAttribute("cx",y.x.toString()),T.setAttribute("cy",y.y.toString()),T.setAttribute("fill",_),f.appendChild(T)}),f.outerHTML}};const bu=e=>(At("data-v-aa057477"),e=e(),Ot(),e),ZLe={key:0,class:"signature-pad-container"},e5e=bu(()=>w("div",{class:"title"},"手写签名",-1)),t5e=bu(()=>w("img",{src:YLe,alt:"全屏"},null,-1)),n5e=bu(()=>w("div",null,"全屏",-1)),o5e=[t5e,n5e],a5e={key:0,class:"placeholder"},r5e=bu(()=>w("div",{class:"text"},"清除",-1)),s5e=bu(()=>w("div",{class:"text"},"完成",-1)),i5e={key:1,class:"signature-pad-landscape-container"},l5e={class:"footer"},u5e={class:"btn-group"},c5e=bu(()=>w("div",{class:"text"},"清除",-1)),d5e=bu(()=>w("div",{class:"text"},"完成",-1)),f5e={key:0,class:"placeholder"},p5e={__name:"signaturePad",props:{visible:Boolean,showWatermark:!1},emits:["save","close"],setup(e,{emit:t}){const n=e,o=t,a=P(null),r=P(null),s=P(null);P(null);const i=P(!1),l=P(!1),d=P(n.visible);Se(()=>n.visible,k=>{d.value=k,k&&ot(()=>{p()})}),Se(()=>n.showWatermark,k=>{k?m():h()});const f=async()=>{i.value=!i.value,l.value=!1,ot(()=>{p()})},p=()=>{if(!s.value)return;const k=s.value,E=1;k.width=k.clientWidth*E,k.height=k.clientHeight*E,a.value=new XLe(k),a.value.addEventListener("beginStroke",()=>{l.value=!0}),n.showWatermark?m():h()},h=()=>{if(!s.value)return;const k=s.value;k.getContext("2d").clearRect(0,0,k.width,k.height)},m=()=>{if(!s.value)return;const k=s.value,E=k.getContext("2d");E.save(),E.fillStyle="#d8d8d8",E.font="12px Arial",E.textAlign="center",E.textBaseline="middle";const{code_name:T,chain:x}=exports.globalInject.getExtraData(),S=Lf(),D=`仅限${T}(${x})中填写${S}时使用`,L=E.measureText(D).width,F=14,z=i.value?Math.PI/3:-Math.PI/6,j=Math.cos(z),X=Math.sin(z),U=Math.abs(L*j)+Math.abs(F*X),W=Math.abs(F*j)+Math.abs(L*X);let Q=1.3;i.value&&(Q=2);const q=U*Q,V=W*Q,Y=q/2,Z=Math.sqrt(k.width**2+k.height**2),ce=-Z,re=Z,ye=-Z,he=Z;E.translate(k.width/2,k.height/2),E.rotate(z);for(let le=ce;le<re;le+=q)for(let ue=ye;ue<he;ue+=60){const J=le+(ue/V%2===0?0:Y);E.fillText(D,J,ue)}E.restore()};st(()=>{window.addEventListener("resize",p)});const b=async(k,E)=>{if(!k)return ht.error("画布元素不存在!"),null;const T=1e3,x=T/k.clientWidth,S=T/k.clientHeight,D=k.clientWidth,N=k.clientHeight;let L,F;E?(L=N*S,F=D*S):(L=D*x,F=N*x);const z=document.createElement("canvas");z.width=L,z.height=F;const j=z.getContext("2d");return j?(j.imageSmoothingEnabled=!0,j.imageSmoothingQuality="high",j.fillStyle="#FFFFFF",j.fillRect(0,0,z.width,z.height),E?j.scale(S,S):j.scale(x,x),E?(j.translate(N/2,D/2),j.rotate(-Math.PI/2),j.drawImage(k,-D/2,-N/2)):j.drawImage(k,0,0,D,N),new Promise(X=>{z.toBlob(U=>{X(U||null)},"image/png",1)})):(ht.error("无法获取画布绘图上下文!"),null)},g=async()=>{const k=await b(s.value,!0);if(!k){ht.error("保存签名失败!");return}o("save",k),I()},y=async()=>{if(i.value){await g();return}const k=await b(s.value,!1);if(!k){ht.error("保存签名失败!");return}o("save",k),I()},_=()=>{a.value.clear(),l.value=!1,n.showWatermark&&m()},I=()=>{o("close")};return(k,E)=>(C(),A(Ae,null,[d.value&&!i.value?(C(),A("div",ZLe,[w("div",{class:"tool-bar"},[w("i",{class:"iconfont icon-form-close",onClick:I}),e5e,w("div",{class:"fullscreen",onClick:f},o5e)]),w("div",{class:"signature-container",ref_key:"signatureRef",ref:r},[w("canvas",{ref_key:"canvasRef",ref:s,class:"signature-canvas"},null,512),l.value?G("",!0):(C(),A("div",a5e,"请在该区域签字"))],512),w("div",{class:B(["footer",{"landscape-footer":i.value}])},[w("div",{class:"btn clear",onClick:_},[O(c(lt),null,{default:H(()=>[O(c(y_))]),_:1}),r5e]),w("div",{class:"btn complete",onClick:y},[O(c(lt),null,{default:H(()=>[O(c(__))]),_:1}),s5e])],2)])):G("",!0),d.value&&i.value?(C(),A("div",i5e,[w("div",l5e,[w("div",{class:"btn change-btn",onClick:f}," 切为半屏 "),w("div",u5e,[w("div",{class:"btn clear",onClick:_},[O(c(lt),null,{default:H(()=>[O(c(y_))]),_:1}),c5e]),w("div",{class:"btn complete",onClick:y},[O(c(lt),null,{default:H(()=>[O(c(__))]),_:1}),d5e])])]),w("div",{class:"signature-container",ref_key:"signatureRef",ref:r},[w("canvas",{ref_key:"canvasRef",ref:s,class:"signature-canvas"},null,512),l.value?G("",!0):(C(),A("div",f5e,"请在该区域签字"))],512)])):G("",!0)],64))}},v5e=Ye(p5e,[["__scopeId","data-v-aa057477"]]),WN=e=>new Promise((t,n)=>{const o=`form_render_jsonp_${Date.now()}`,a=document.createElement("script");a.src=`${e}${e.includes("?")?"&":"?"}callback=${o}&output=jsonp`,a.async=!0,a.onload=()=>{a.remove()},a.onerror=()=>{a.remove(),n()},window[o]=r=>{t(r),delete window[o]},document.body.appendChild(a)}),HN=e=>(At("data-v-4a750439"),e=e(),Ot(),e),h5e={class:"signature-container"},m5e=HN(()=>w("i",{class:"iconfont icon-form-a-dianziqianming41"},null,-1)),g5e=HN(()=>w("div",{class:"title"},"点此签名",-1)),b5e=[m5e,g5e],y5e={key:1,class:"signature-img"},_5e=["src"],w5e=se({__name:"watermark",setup(e){const t=de("widgetStore"),n=de("editable"),o=P(!1),a=P(!1),r=P(""),s=P({});Se(()=>t.attrs.showOneTimeUseTag,m=>{a.value=m},{deep:!0}),Se(()=>t.value,m=>{m!=null&&m.value&&(r.value=m.value)},{deep:!0});const i=async()=>{if(!n){if(t.attrs.showLocation){const{lon:m,lat:b,address:g}=await p();s.value={lat:b,lon:m,address:g};return}o.value=!0}},l=()=>{r.value="",t.updateValue({value:"",position:{}})},d=(m,b)=>m>=-180&&m<=180&&b>=-90&&b<=90,f=async(m,b)=>{var y,_,I;const g=await WN(`https://apis.map.qq.com/ws/geocoder/v1/?location=${b},${m}&key=${Wbe()}`);return((_=(y=g.result)==null?void 0:y.formatted_addresses)==null?void 0:_.standard_address)||((I=g.result)==null?void 0:I.address)||"未知地址"},p=async()=>{const m=()=>new Promise((b,g)=>{if(!("geolocation"in navigator)){ht.error("不支持定位"),g(new Error("浏览器不支持定位"));return}navigator.geolocation.getCurrentPosition(y=>{o.value=!0,b(y)},y=>{ht.error("获取位置权限失败"),g(new Error(`获取位置失败:${y.message}`))},{enableHighAccuracy:!0})});try{const b=await m(),g=b.coords.longitude,y=b.coords.latitude;if(!d(g,y))return ht.warning("无法获取当前位置,请检查是否开启定位服务!"),{lon:0,lat:0,address:"未知地址"};let _=g,I=y;const k=await f(_,I);return{lon:_,lat:I,address:k}}catch{return ht.error("获取位置失败"),{lon:0,lat:0,address:"未知地址"}}},h=async m=>{r.value=URL.createObjectURL(m);const b=new File([m],`signature_${at()}.png`,{type:"image/png"});(await exports.globalInject.uploadFile(b)).subscribe({error:y=>{ht.error(y)},complete:async y=>{if(!y.key){ht.error("上传失败");return}const _={};t.attrs.showLocation&&Object.assign(_,{...s.value});const I="https://bc6.afbza.cn/"+y.key;t.updateValue({value:I,position:_})}})};return(m,b)=>(C(),A("div",h5e,[O(Kn),r.value?(C(),A("div",{key:0,class:"clear-btn",onClick:l},"清除")):G("",!0),O(lo,null,{default:H(()=>{var g;return[O(eo),r.value?G("",!0):(C(),A("div",{key:0,class:B(["placeholder-container",{"verfiy-disabled":(g=c(t).valueVer)==null?void 0:g.message}]),onClick:i},b5e,2)),r.value?(C(),A("div",y5e,[w("img",{src:r.value},null,8,_5e)])):G("",!0),O(To),O(ao),O(v5e,{visible:o.value,showWatermark:a.value,onSave:h,onClose:b[0]||(b[0]=y=>o.value=!1)},null,8,["visible","showWatermark"])]}),_:1})]))}}),$5e=Ye(w5e,[["__scopeId","data-v-4a750439"]]),C5e={title:"电子签名",desc:"",required:!1,disabled:!1,enabled:!1,showUploadTime:!0,showFiller:!1,showLocation:!1,showQRCode:!1,showOneTimeUseTag:!1},DC={attrs:{...C5e},info:{name:"电子签名",icon:"a-dianziqianming41",vip:!1,summary:{title:"电子签名",brief:`用于获取填表人的签名,适用于文件签阅,信息确认等场景。
133
133
 
134
- 提交后将生成电子签名图,支持添加水印内容。`,image:Ke("images/widget/esignature.png")}},component:$Fe},PC=e=>(At("data-v-ee16248d"),e=e(),Ot(),e),SFe={class:"location-container"},EFe=PC(()=>w("i",{class:"iconfont icon-form-location"},null,-1)),kFe=PC(()=>w("div",null,"点击获取位置信息",-1)),IFe=[EFe,kFe],TFe={key:1,class:"address-wrapper"},xFe={class:"address-info"},AFe=PC(()=>w("i",{class:"iconfont icon-form-location"},null,-1)),OFe={class:"address"},DFe=se({__name:"location",setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=de("formStore");st(()=>{r()});const r=()=>{const d=exports.globalInject.getRoute(),{position:f}=d.query;if(!f)return;const{lat:p,lon:h,address:m}=JSON.parse(f);o.updateValue({position:{lat:p,lon:h,address:m}}),o.updateAttr("address",m),o.updateAttr("lon",h),o.updateAttr("lat",p)},s=async()=>{if(t)return;const d=exports.globalInject.getRoute(),{domain:f,short:p,position:h,phone:m}=d.query;let b="https://"+f+"/"+p;const g=[];h&&g.push(`position=${h}`),m&&g.push(`phone=${m}`);const y=JSON.stringify(a.data);g.push(`form_answer=${encodeURIComponent(y)}`),g.length>0&&(b+=`?${g.join("&")}`);const _={url:encodeURIComponent(b),pages:"/pages_auth/auth-location",mini_type:2};if(await iC()){wx.miniProgram.reLaunch({url:`/pages_auth/auth-location?url=${_.url}`});return}exports.globalInject.getEnvType()==="dev"&&Object.assign(_,{debug:1}),ht.info(JSON.stringify(_));const k=await exports.globalInject.$axios.get("/wx/j/pages",{params:{..._}});k.data.status===1&&(window.location.href=k.data.result)},i=()=>{const d=exports.globalInject.getRoute(),{position:f}=d.query;if(!f)return;const{lat:p,lon:h,address:m}=JSON.parse(f),b=navigator.userAgent.toLowerCase();if(/micromessenger/.test(b)){window.wx.miniProgram.getEnv(_=>{if(_.miniprogram)window.wx.miniProgram.navigateTo({url:`/pages/map/map?lat=${p}&lng=${h}&name=${m}&address=${m}`});else{let I=`https://apis.map.qq.com/uri/v1/routeplan?type=drive&to=${m}&tocoord=${p},${h}`;window.open(I)}});return}let y=`https://apis.map.qq.com/uri/v1/routeplan?type=drive&to=${m}&tocoord=${p},${h}`;window.open(y)},l=()=>{o.updateValue({position:{lat:0,lon:0,address:""}})};return(d,f)=>(C(),A("div",SFe,[O(Kn),O(lo,null,{default:H(()=>{var p,h,m;return[O(eo),(h=(p=c(o).value)==null?void 0:p.position)!=null&&h.address?(C(),A("div",TFe,[w("div",xFe,[AFe,w("div",OFe,ie(c(o).value.position.address),1)]),w("div",{class:"operate-btns"},[w("div",{class:"left"},[w("div",{class:"open-address",onClick:i},"地图中查看"),w("div",{class:"clear-address",onClick:l},"清除")]),w("div",{class:"right",onClick:s},"重新定位")])])):(C(),A("div",{key:0,class:B(["wrapper",{disabled:c(t)&&!c(o).isSettingAnswer||c(o).attrs.disabled,mobile:c(n),"verfiy-disabled":(m=c(o).valueVer)==null?void 0:m.message}]),onClick:s},IFe,2)),O(To),Fe(),O(ao)]}),_:1})]))}}),PFe=Ye(DFe,[["__scopeId","data-v-ee16248d"]]),MFe={title:"定位",desc:"",required:!1,lat:0,lon:0,address:"",disabled:!0},MC={attrs:{...MFe},info:{name:"获取定位",icon:"location",summary:{title:"获取定位",brief:"用于获取填表人的定位信息,适用于现场打卡、巡检等线下活动场景",image:Ke("images/widget/location.png")}},component:PFe},NFe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAACDElEQVR4AeyUPy4FURTGPxKvU7zkoaSwBBK6WYT+WYTSEmxAp7QLOgqlBVCioFBRcH4vOcmLzMy5f0ZCMi9z3Dv3nvN9vzlzx6r++G8ErH1BYwfHDtZ2oLb+/5/BZ2n+JL3YePUqbdd2BA3Tu7FAcx7phR38ks5WpJkJNR/SNQY2L7qoRcP0DixmaEdCIaAJPbiIzXcwwMjXUkdqqEXDa2x+7/OuMQRck47sSasg2+DQNO3jLjBfDwGn0uNEahD0Invy5E52waGJtmt2jSEghQghmAtZC4d3EiCJuZBDwOGbDEhyKuRQcHhmAVIQQQ4Jh182IEV9kD//lXBuOb/UUJsbRYCYYIgxANwTfN0Ec4I9csjlviSKATHDGABAuF8O1tgjZ3k9d14FmGtWkl8F2PZBOASvmvNIjq+VjMWAGAMAiBvzWgm/Z48ccn0tdywCxBBjANwQMM4cwdzXySGXGl/LGbMBMcIQYzcCCDA+CII5a75PLjXU+lrqmAWIAUYYugEgE6kBzNeYDwWZDJgKNzRkEmAu3JCQIWAp3FCQIeCndBGdOQW/njN5GZQqBDSBPYvF1fZBLDYS/rRBWtmuRe8VAlr3TkzhzeKOLxMjmxdd1KJhD3prAu9mfmpj72U5vfvakM43panFPgb92fEuGlvSoemtox1VhICRwG/vj4C1HR47OHawtgO19d8AAAD//2QzylIAAAAGSURBVAMALx/rUfivew4AAAAASUVORK5CYII=",RFe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABzUlEQVR4AezWv07CQBwH8LvrjbI7ymaij6AJg4mLG+CCicBL6IibPgSExcQU3DQMPoYvoImJzwCRnvctpSmVVu6u13Yo6a/t9f59+LVwZaTknwpoeoOqDFYZNM2Aaf9yPYNud58MGjz6pcoBdNt7jtt/45R986P6OwE0UBYPlDhOajNKydnKRA8ZZZ3VOSFsfVLIMcARSk6i80vsx7pcHDABJ2GDZWv0LI/+VgwwBffTHt35smCXP1ABB2O+QEVcvkANXH5ATVw+QAPcJlAuMWzSvXHc3oRPe+eoNA5DHOYPfyTOcb3DCLunlLaIoC/OtN9EA+3IAIe5Q6AQ9AAXguBUkCdtZEY4WEKgN58PhRDhEiMr9ZAZ4qQhshZfPX4tHdYwQmaM2wSi1Bx+aiMt4EAKbzEKfuggLeHg+QvEVRWkj6vN4q9McphBfOGX15S37UAMswvSMg6MZCBqU5G9ay7fhG1lDtMjGHapkYikY9s4uP4HotV2JGqikckzFx0Q57sB0TIdaQWHaXcHovV2pDUcplQDogeQi8WpR7xbuX5fZPFXgmGTQh2IkeSy6LXHD8vL4SuKNkMPaFMUG7sCxhKiXKwyqJyyWIfSZ/AXAAD//4l8zzwAAAAGSURBVAMA63r0UYLGBQoAAAAASUVORK5CYII=",LFe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAACI0lEQVR4AeyYMUtCURiGrxKKuDiqNPQPWtoaJAoKCgrqB7QpBIb/wD8QhjSo0N7Q4GBQ0FBDW0v/oCGc3UQR7TkHk3vN5d7vOyGkfJ/nXOG+PL73nOOLcW/JXytA6QP6nw7WarVMq9W6bDabF9VqdU3iohMHU6lUYTKZXAN2DuCIMXI5AYTmhDZ1Z94krQ6IY2uxWMwC4uKzBM7cqw6Yz+e3Ec4A91kqlT6Yi0odcDweW/eguqfFpQ4IkQWMx+Md5uJSBWw0Gpusvw2oet1u941RXKqA0BzQHuuvzWYRHS9Gx7QqIO6dGVG6TauUGmC9Xl+HaAv3Rv1+/5W5SqkBJpPJ4ynRY6VS6U3n4kENEOfs+oNI7fGi5akAmnCAmAUcDodPzNVKBTCdTu+yQUxqeS+Xy19qdAipAPJ47eGMnjgcoBEoMSDnnXHuyKgCKg4HRsffYsBsNltAUC0coBUoMSBq1j1G1d2Lni0NQLv+CAfLB+giHFjbfG8iBzlarHue53XYLCrhwMdmpyJAFOz6Y/eqhFP0flVkQFfhYJ4wMmAikTidiqmGg6nmbIgMiMIe7bEOVaK90VrUkQD94WAwGDwsEtb6LBIg4eAQ58xPnHo4mP9ikQDZtTZaIebkcEZ3VqEBOe+Mcz/Hi9P1ZyhDA+ZyuX1udBYO0A5UaEAeb5Z+YQ3eBJQcXYQG5P+WW3qnWCxeOWIKyIYGDNz9BxcrQKnJ3wAAAP//eV46LgAAAAZJREFUAwB8apxRE1OeyAAAAABJRU5ErkJggg==",NC=e=>(At("data-v-ecf4b55c"),e=e(),Ot(),e),FFe={class:"check-entry-container"},BFe={key:0,class:"verify-tip"},VFe=["onClick","onMouseenter"],zFe={key:0},jFe=NC(()=>w("div",{class:"drag_handle"},[w("span",{class:"icon iconfont icon-form-handle-v"})],-1)),UFe=[jFe],WFe={class:"left"},HFe=["contenteditable","onBlur","onFocus"],qFe={key:0,class:"right"},KFe=["onClick"],YFe=NC(()=>w("div",{class:"line"},null,-1)),GFe=["onClick"],QFe={key:0,class:"line"},JFe=["onClick"],XFe={key:1,class:"selected-right"},ZFe=["src"],e5e=["onClick"],t5e=NC(()=>w("i",{class:"iconfont icon-form-shezhi"},null,-1)),n5e=se({__name:"checkEntry",setup(e){de("editable");const t=de("isMobileSize"),n=de("widgetStore");M(()=>n.isSettingAnswer);const o=P(!1),a=P(),r=P(n.attrs.list),s=P(""),i=P(!1),l=P(-1),d=x=>({0:NFe,1:RFe,2:LFe})[x.checked];Se(()=>n.attrs.list,x=>{r.value=x},{deep:!0});const f=M(()=>n.attrs.list.find(x=>x.isActive===!0));Ir(a,r,{handle:".drag_handle",direction:"vertical",ghostClass:"ghost_row",dragClass:"drag_row",group:{name:"radioList",pull:!1},animation:150,forceFallback:!0,onStart(){o.value=!0},onEnd:x=>{o.value=!1,x.oldIndex!==x.newIndex&&Xt({id:n.id,attr:"list",value:r.value})}});const p=()=>[{key:"addOption",label:"添加检查项",icon:"fill-circle-add",callback:()=>{h()}}],h=()=>{n.attrs.list.push({id:at(),value:"检查项",checked:null,desc:"",isActive:!1})},m=()=>{if(!t.value)return;const x=n.attrs.list.every(D=>D.checked===1);n.attrs.list.forEach(D=>{D.checked=x?null:1});const S=n.attrs.list.reduce((D,N)=>(D[N.id]={value:N.value,checked:N.checked,desc:N.desc},D),{});n.updateValue(S)},b=(x,S)=>{s.value=x.id,l.value=S},g=()=>{s.value="",l.value=-1},y=x=>{r.value.splice(x,1),n.attrs.list=r.value},_=x=>{x.checked!==null&&(x.checked=null),n.attrs.list.forEach(S=>{S.isActive=!1}),x.isActive=!0},I=(x,S)=>{const D=x.target.innerText;S.value=D,S.isFocus=!1},k=x=>{x.isFocus=!0},E=(x,S)=>{if(!t.value)return;x.checked=S;const D=n.attrs.list.reduce((N,L)=>(N[L.id]={value:L.value,checked:L.checked,desc:L.desc},N),{});n.updateValue(D)},T=()=>{t.value&&(i.value=!0)};return(x,S)=>{var D;return C(),A("div",FFe,[w("div",{class:B({"check-entry-title-container":c(t)})},[O(Kn),(D=c(n).valueVer)!=null&&D.message&&c(t)?(C(),A("div",BFe,ie(c(n).valueVer.message),1)):G("",!0)],2),c(n).attrs.allChecked?(C(),A("div",{key:0,class:B(["check-all-btn",{"pc-btn":!c(t)}]),onClick:m}," 一键打勾 ",2)):G("",!0),O(lo,null,{default:H(()=>[O(eo),w("div",{ref_key:"checkEntryRef",ref:a,class:"check-entry-list"},[(C(!0),A(Ae,null,et(r.value,(N,L)=>(C(),A("div",{class:B(["check-entry-item",{"option-item-active":s.value===N.id}]),onClick:F=>_(N),onMouseenter:F=>b(N,L),onMouseleave:S[0]||(S[0]=F=>g())},[!c(t)&&N.checked===null?(C(),A("div",zFe,UFe)):G("",!0),w("div",{class:B(["check-entry-item-main",{selected:N.checked===1,"not-selected":N.checked===0,"not-check":N.checked===2,mobile:c(t)}])},[w("div",WFe,[w("div",{contenteditable:!c(t),class:"item-title",onBlur:F=>I(F,N),onFocus:F=>k(N)},ie(N.value),41,HFe),N.desc&&!N.isFocus&&N.checked===null?(C(),A("div",{key:0,class:"item-desc",onClick:T}," 检查要求 ")):G("",!0)]),N.checked===null?(C(),A("div",qFe,[w("i",{class:"iconfont icon-form-right",onClick:mt(F=>E(N,1),["stop"])},null,8,KFe),YFe,w("i",{class:"iconfont icon-form-close",onClick:mt(F=>E(N,0),["stop"])},null,8,GFe),c(n).attrs.globalEnabled?(C(),A("div",QFe)):G("",!0),c(n).attrs.globalEnabled?(C(),A("div",{key:1,onClick:mt(F=>E(N,2),["stop"])}," / ",8,JFe)):G("",!0)])):(C(),A("div",XFe,[w("img",{src:d(N)},null,8,ZFe)]))],2),c(n).isActive?(C(),A("div",{key:1,class:B(["operate-btns",{"active-btns":l.value===L}])},[O(c(_o),{class:"box-item",effect:"dark",content:"删除",placement:"top"},{default:H(()=>[w("i",{class:"iconfont icon-form-jianshao2",onClick:F=>y(L)},null,8,e5e)]),_:2},1024),O(c(_o),{class:"box-item",effect:"dark",content:"设置",placement:"top"},{default:H(()=>[t5e]),_:1})],2)):G("",!0)],42,VFe))),256))],512),O(ao,{customs:p()},null,8,["customs"])]),_:1}),O(c(J_),{modelValue:i.value,"onUpdate:modelValue":S[1]||(S[1]=N=>i.value=N),title:"检查要求",direction:"btt","show-close":!1,"modal-class":"check-entry-modal"},{default:H(()=>[w("span",null,ie(f.value.desc),1)]),_:1},8,["modelValue"])])}}}),o5e=Ye(n5e,[["__scopeId","data-v-ecf4b55c"]]),a5e={title:"检查项",desc:"根据以下要求检查,符合点勾,不符合点叉",required:!1,globalEnabled:!1,allChecked:!1,list:[{id:at(),value:"洗手台整洁",checked:null,desc:"",isActive:!0},{id:at(),value:"地面无垃圾",checked:null,desc:"",isActive:!1}]},RC={attrs:{...a5e},info:{name:"检查项",icon:"form-input",summary:{title:"检查项",brief:`清晰地罗列所有的检查内容,填表人只需要选择√、×进行检查。
134
+ 提交后将生成电子签名图,支持添加水印内容。`,image:Ke("images/widget/esignature.png")}},component:$5e},PC=e=>(At("data-v-ee16248d"),e=e(),Ot(),e),S5e={class:"location-container"},E5e=PC(()=>w("i",{class:"iconfont icon-form-location"},null,-1)),k5e=PC(()=>w("div",null,"点击获取位置信息",-1)),I5e=[E5e,k5e],T5e={key:1,class:"address-wrapper"},x5e={class:"address-info"},A5e=PC(()=>w("i",{class:"iconfont icon-form-location"},null,-1)),O5e={class:"address"},D5e=se({__name:"location",setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=de("formStore");st(()=>{r()});const r=()=>{const d=exports.globalInject.getRoute(),{position:f}=d.query;if(!f)return;const{lat:p,lon:h,address:m}=JSON.parse(f);o.updateValue({position:{lat:p,lon:h,address:m}}),o.updateAttr("address",m),o.updateAttr("lon",h),o.updateAttr("lat",p)},s=async()=>{if(t)return;const d=exports.globalInject.getRoute(),{domain:f,short:p,position:h,phone:m}=d.query;let b="https://"+f+"/"+p;const g=[];h&&g.push(`position=${h}`),m&&g.push(`phone=${m}`);const y=JSON.stringify(a.data);g.push(`form_answer=${encodeURIComponent(y)}`),g.length>0&&(b+=`?${g.join("&")}`);const _={url:encodeURIComponent(b),pages:"/pages_auth/auth-location",mini_type:2};if(await iC()){wx.miniProgram.reLaunch({url:`/pages_auth/auth-location?url=${_.url}`});return}exports.globalInject.getEnvType()==="dev"&&Object.assign(_,{debug:1}),ht.info(JSON.stringify(_));const k=await exports.globalInject.$axios.get("/wx/j/pages",{params:{..._}});k.data.status===1&&(window.location.href=k.data.result)},i=()=>{const d=exports.globalInject.getRoute(),{position:f}=d.query;if(!f)return;const{lat:p,lon:h,address:m}=JSON.parse(f),b=navigator.userAgent.toLowerCase();if(/micromessenger/.test(b)){window.wx.miniProgram.getEnv(_=>{if(_.miniprogram)window.wx.miniProgram.navigateTo({url:`/pages/map/map?lat=${p}&lng=${h}&name=${m}&address=${m}`});else{let I=`https://apis.map.qq.com/uri/v1/routeplan?type=drive&to=${m}&tocoord=${p},${h}`;window.open(I)}});return}let y=`https://apis.map.qq.com/uri/v1/routeplan?type=drive&to=${m}&tocoord=${p},${h}`;window.open(y)},l=()=>{o.updateValue({position:{lat:0,lon:0,address:""}})};return(d,f)=>(C(),A("div",S5e,[O(Kn),O(lo,null,{default:H(()=>{var p,h,m;return[O(eo),(h=(p=c(o).value)==null?void 0:p.position)!=null&&h.address?(C(),A("div",T5e,[w("div",x5e,[A5e,w("div",O5e,ie(c(o).value.position.address),1)]),w("div",{class:"operate-btns"},[w("div",{class:"left"},[w("div",{class:"open-address",onClick:i},"地图中查看"),w("div",{class:"clear-address",onClick:l},"清除")]),w("div",{class:"right",onClick:s},"重新定位")])])):(C(),A("div",{key:0,class:B(["wrapper",{disabled:c(t)&&!c(o).isSettingAnswer||c(o).attrs.disabled,mobile:c(n),"verfiy-disabled":(m=c(o).valueVer)==null?void 0:m.message}]),onClick:s},I5e,2)),O(To),Fe(),O(ao)]}),_:1})]))}}),P5e=Ye(D5e,[["__scopeId","data-v-ee16248d"]]),M5e={title:"定位",desc:"",required:!1,lat:0,lon:0,address:"",disabled:!0},MC={attrs:{...M5e},info:{name:"获取定位",icon:"location",summary:{title:"获取定位",brief:"用于获取填表人的定位信息,适用于现场打卡、巡检等线下活动场景",image:Ke("images/widget/location.png")}},component:P5e},N5e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAACDElEQVR4AeyUPy4FURTGPxKvU7zkoaSwBBK6WYT+WYTSEmxAp7QLOgqlBVCioFBRcH4vOcmLzMy5f0ZCMi9z3Dv3nvN9vzlzx6r++G8ErH1BYwfHDtZ2oLb+/5/BZ2n+JL3YePUqbdd2BA3Tu7FAcx7phR38ks5WpJkJNR/SNQY2L7qoRcP0DixmaEdCIaAJPbiIzXcwwMjXUkdqqEXDa2x+7/OuMQRck47sSasg2+DQNO3jLjBfDwGn0uNEahD0Invy5E52waGJtmt2jSEghQghmAtZC4d3EiCJuZBDwOGbDEhyKuRQcHhmAVIQQQ4Jh182IEV9kD//lXBuOb/UUJsbRYCYYIgxANwTfN0Ec4I9csjlviSKATHDGABAuF8O1tgjZ3k9d14FmGtWkl8F2PZBOASvmvNIjq+VjMWAGAMAiBvzWgm/Z48ccn0tdywCxBBjANwQMM4cwdzXySGXGl/LGbMBMcIQYzcCCDA+CII5a75PLjXU+lrqmAWIAUYYugEgE6kBzNeYDwWZDJgKNzRkEmAu3JCQIWAp3FCQIeCndBGdOQW/njN5GZQqBDSBPYvF1fZBLDYS/rRBWtmuRe8VAlr3TkzhzeKOLxMjmxdd1KJhD3prAu9mfmpj72U5vfvakM43panFPgb92fEuGlvSoemtox1VhICRwG/vj4C1HR47OHawtgO19d8AAAD//2QzylIAAAAGSURBVAMALx/rUfivew4AAAAASUVORK5CYII=",R5e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABzUlEQVR4AezWv07CQBwH8LvrjbI7ymaij6AJg4mLG+CCicBL6IibPgSExcQU3DQMPoYvoImJzwCRnvctpSmVVu6u13Yo6a/t9f59+LVwZaTknwpoeoOqDFYZNM2Aaf9yPYNud58MGjz6pcoBdNt7jtt/45R986P6OwE0UBYPlDhOajNKydnKRA8ZZZ3VOSFsfVLIMcARSk6i80vsx7pcHDABJ2GDZWv0LI/+VgwwBffTHt35smCXP1ABB2O+QEVcvkANXH5ATVw+QAPcJlAuMWzSvXHc3oRPe+eoNA5DHOYPfyTOcb3DCLunlLaIoC/OtN9EA+3IAIe5Q6AQ9AAXguBUkCdtZEY4WEKgN58PhRDhEiMr9ZAZ4qQhshZfPX4tHdYwQmaM2wSi1Bx+aiMt4EAKbzEKfuggLeHg+QvEVRWkj6vN4q9McphBfOGX15S37UAMswvSMg6MZCBqU5G9ay7fhG1lDtMjGHapkYikY9s4uP4HotV2JGqikckzFx0Q57sB0TIdaQWHaXcHovV2pDUcplQDogeQi8WpR7xbuX5fZPFXgmGTQh2IkeSy6LXHD8vL4SuKNkMPaFMUG7sCxhKiXKwyqJyyWIfSZ/AXAAD//4l8zzwAAAAGSURBVAMA63r0UYLGBQoAAAAASUVORK5CYII=",L5e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAACI0lEQVR4AeyYMUtCURiGrxKKuDiqNPQPWtoaJAoKCgrqB7QpBIb/wD8QhjSo0N7Q4GBQ0FBDW0v/oCGc3UQR7TkHk3vN5d7vOyGkfJ/nXOG+PL73nOOLcW/JXytA6QP6nw7WarVMq9W6bDabF9VqdU3iohMHU6lUYTKZXAN2DuCIMXI5AYTmhDZ1Z94krQ6IY2uxWMwC4uKzBM7cqw6Yz+e3Ec4A91kqlT6Yi0odcDweW/eguqfFpQ4IkQWMx+Md5uJSBWw0Gpusvw2oet1u941RXKqA0BzQHuuvzWYRHS9Gx7QqIO6dGVG6TauUGmC9Xl+HaAv3Rv1+/5W5SqkBJpPJ4ynRY6VS6U3n4kENEOfs+oNI7fGi5akAmnCAmAUcDodPzNVKBTCdTu+yQUxqeS+Xy19qdAipAPJ47eGMnjgcoBEoMSDnnXHuyKgCKg4HRsffYsBsNltAUC0coBUoMSBq1j1G1d2Lni0NQLv+CAfLB+giHFjbfG8iBzlarHue53XYLCrhwMdmpyJAFOz6Y/eqhFP0flVkQFfhYJ4wMmAikTidiqmGg6nmbIgMiMIe7bEOVaK90VrUkQD94WAwGDwsEtb6LBIg4eAQ58xPnHo4mP9ikQDZtTZaIebkcEZ3VqEBOe+Mcz/Hi9P1ZyhDA+ZyuX1udBYO0A5UaEAeb5Z+YQ3eBJQcXYQG5P+WW3qnWCxeOWIKyIYGDNz9BxcrQKnJ3wAAAP//eV46LgAAAAZJREFUAwB8apxRE1OeyAAAAABJRU5ErkJggg==",NC=e=>(At("data-v-ecf4b55c"),e=e(),Ot(),e),F5e={class:"check-entry-container"},B5e={key:0,class:"verify-tip"},V5e=["onClick","onMouseenter"],z5e={key:0},j5e=NC(()=>w("div",{class:"drag_handle"},[w("span",{class:"icon iconfont icon-form-handle-v"})],-1)),U5e=[j5e],W5e={class:"left"},H5e=["contenteditable","onBlur","onFocus"],q5e={key:0,class:"right"},K5e=["onClick"],Y5e=NC(()=>w("div",{class:"line"},null,-1)),G5e=["onClick"],Q5e={key:0,class:"line"},J5e=["onClick"],X5e={key:1,class:"selected-right"},Z5e=["src"],eFe=["onClick"],tFe=NC(()=>w("i",{class:"iconfont icon-form-shezhi"},null,-1)),nFe=se({__name:"checkEntry",setup(e){de("editable");const t=de("isMobileSize"),n=de("widgetStore");M(()=>n.isSettingAnswer);const o=P(!1),a=P(),r=P(n.attrs.list),s=P(""),i=P(!1),l=P(-1),d=x=>({0:N5e,1:R5e,2:L5e})[x.checked];Se(()=>n.attrs.list,x=>{r.value=x},{deep:!0});const f=M(()=>n.attrs.list.find(x=>x.isActive===!0));Ir(a,r,{handle:".drag_handle",direction:"vertical",ghostClass:"ghost_row",dragClass:"drag_row",group:{name:"radioList",pull:!1},animation:150,forceFallback:!0,onStart(){o.value=!0},onEnd:x=>{o.value=!1,x.oldIndex!==x.newIndex&&Xt({id:n.id,attr:"list",value:r.value})}});const p=()=>[{key:"addOption",label:"添加检查项",icon:"fill-circle-add",callback:()=>{h()}}],h=()=>{n.attrs.list.push({id:at(),value:"检查项",checked:null,desc:"",isActive:!1})},m=()=>{if(!t.value)return;const x=n.attrs.list.every(D=>D.checked===1);n.attrs.list.forEach(D=>{D.checked=x?null:1});const S=n.attrs.list.reduce((D,N)=>(D[N.id]={value:N.value,checked:N.checked,desc:N.desc},D),{});n.updateValue(S)},b=(x,S)=>{s.value=x.id,l.value=S},g=()=>{s.value="",l.value=-1},y=x=>{r.value.splice(x,1),n.attrs.list=r.value},_=x=>{x.checked!==null&&(x.checked=null),n.attrs.list.forEach(S=>{S.isActive=!1}),x.isActive=!0},I=(x,S)=>{const D=x.target.innerText;S.value=D,S.isFocus=!1},k=x=>{x.isFocus=!0},E=(x,S)=>{if(!t.value)return;x.checked=S;const D=n.attrs.list.reduce((N,L)=>(N[L.id]={value:L.value,checked:L.checked,desc:L.desc},N),{});n.updateValue(D)},T=()=>{t.value&&(i.value=!0)};return(x,S)=>{var D;return C(),A("div",F5e,[w("div",{class:B({"check-entry-title-container":c(t)})},[O(Kn),(D=c(n).valueVer)!=null&&D.message&&c(t)?(C(),A("div",B5e,ie(c(n).valueVer.message),1)):G("",!0)],2),c(n).attrs.allChecked?(C(),A("div",{key:0,class:B(["check-all-btn",{"pc-btn":!c(t)}]),onClick:m}," 一键打勾 ",2)):G("",!0),O(lo,null,{default:H(()=>[O(eo),w("div",{ref_key:"checkEntryRef",ref:a,class:"check-entry-list"},[(C(!0),A(Ae,null,et(r.value,(N,L)=>(C(),A("div",{class:B(["check-entry-item",{"option-item-active":s.value===N.id}]),onClick:F=>_(N),onMouseenter:F=>b(N,L),onMouseleave:S[0]||(S[0]=F=>g())},[!c(t)&&N.checked===null?(C(),A("div",z5e,U5e)):G("",!0),w("div",{class:B(["check-entry-item-main",{selected:N.checked===1,"not-selected":N.checked===0,"not-check":N.checked===2,mobile:c(t)}])},[w("div",W5e,[w("div",{contenteditable:!c(t),class:"item-title",onBlur:F=>I(F,N),onFocus:F=>k(N)},ie(N.value),41,H5e),N.desc&&!N.isFocus&&N.checked===null?(C(),A("div",{key:0,class:"item-desc",onClick:T}," 检查要求 ")):G("",!0)]),N.checked===null?(C(),A("div",q5e,[w("i",{class:"iconfont icon-form-right",onClick:mt(F=>E(N,1),["stop"])},null,8,K5e),Y5e,w("i",{class:"iconfont icon-form-close",onClick:mt(F=>E(N,0),["stop"])},null,8,G5e),c(n).attrs.globalEnabled?(C(),A("div",Q5e)):G("",!0),c(n).attrs.globalEnabled?(C(),A("div",{key:1,onClick:mt(F=>E(N,2),["stop"])}," / ",8,J5e)):G("",!0)])):(C(),A("div",X5e,[w("img",{src:d(N)},null,8,Z5e)]))],2),c(n).isActive?(C(),A("div",{key:1,class:B(["operate-btns",{"active-btns":l.value===L}])},[O(c(_o),{class:"box-item",effect:"dark",content:"删除",placement:"top"},{default:H(()=>[w("i",{class:"iconfont icon-form-jianshao2",onClick:F=>y(L)},null,8,eFe)]),_:2},1024),O(c(_o),{class:"box-item",effect:"dark",content:"设置",placement:"top"},{default:H(()=>[tFe]),_:1})],2)):G("",!0)],42,V5e))),256))],512),O(ao,{customs:p()},null,8,["customs"])]),_:1}),O(c(J_),{modelValue:i.value,"onUpdate:modelValue":S[1]||(S[1]=N=>i.value=N),title:"检查要求",direction:"btt","show-close":!1,"modal-class":"check-entry-modal"},{default:H(()=>[w("span",null,ie(f.value.desc),1)]),_:1},8,["modelValue"])])}}}),oFe=Ye(nFe,[["__scopeId","data-v-ecf4b55c"]]),aFe={title:"检查项",desc:"根据以下要求检查,符合点勾,不符合点叉",required:!1,globalEnabled:!1,allChecked:!1,list:[{id:at(),value:"洗手台整洁",checked:null,desc:"",isActive:!0},{id:at(),value:"地面无垃圾",checked:null,desc:"",isActive:!1}]},RC={attrs:{...aFe},info:{name:"检查项",icon:"form-input",summary:{title:"检查项",brief:`清晰地罗列所有的检查内容,填表人只需要选择√、×进行检查。
135
135
 
136
- 适用于巡检项目和清点物品的场景。`,image:Ke("images/widget/checkEntry.png")}},component:o5e},qN=e=>(At("data-v-e4db2823"),e=e(),Ot(),e),r5e={class:"file-collect-box widget-box"},s5e={key:0,class:"file-list-container"},i5e={class:"list-item"},l5e={class:"file-content"},u5e={class:"type-image"},c5e=["src"],d5e={class:"file-info"},f5e={class:"file-name"},p5e={class:"file-size"},v5e={class:"editor-box"},h5e=["onClick"],m5e=["onClick"],g5e=qN(()=>w("span",{class:"icon iconfont icon-form-delete"},null,-1)),b5e=[g5e],y5e=qN(()=>w("div",{class:"upload-content"},"将附件拖拽至此区域 或 点击上传",-1)),_5e=se({__name:"File",props:{attrs:{},value:{default:[]},id:{}},emits:["update:value"],setup(e,{emit:t}){const n=e,o=de("formMode"),a=P(""),r=P(null),{accept:s,maxSize:i,maxCount:l}=wo(n.attrs),d=de("editable"),f=M(()=>Vg.value>=M$.value),p=t;async function h(g){if(f.value){Xt({attr:"request",value:!1}),ht.error("上传失败,已超出表单上传容量");return}if(g.file.size>i){ht.error("文件大小超过限制");return}const y=BM.service({text:"上传中"});try{(await exports.globalInject.uploadForForm(g.file,L$())).subscribe({error:I=>{ht.error(I)},complete:async I=>{if(y.close(),!I.key){ht.error("上传失败");return}let k=await P9e({file_path:I.key,file_size:g.file.size,form_id:exports.globalInject.getFormId(),file_name:g.file.name}),E;a.value?(E=n.value.map(T=>T.id===a.value?{name:g.file.name,url:"https://fatt.bmwax.cn/"+I.key,size:g.file.size,id:k}:T),a.value=""):E=[...n.value||[],{name:g.file.name,url:"https://fatt.bmwax.cn/"+I.key,size:g.file.size,id:k}],p("update:value",E),nwe(g.file.size)}})}catch(_){y.close(),ht.error("上传失败"+_)}}async function m(g){var y;a.value=g;try{((y=r.value)==null?void 0:y.$el.querySelector("input")).click()}catch{a.value=""}}function b(g){let y=n.value.filter(_=>_.id!==g);p("update:value",y)}return(g,y)=>{const _=Bt("svg-icon");return C(),A("div",r5e,[O(Kn),O(lo,null,{default:H(()=>[O(eo),w("div",{class:B(["file--upload",{disabled:c(o)==="answer-preview"}])},[n.value.length>0?(C(),A("div",s5e,[(C(!0),A(Ae,null,et(n.value,I=>(C(),A("div",i5e,[w("div",l5e,[w("div",u5e,[c(Sm)(I.url)==="img"?(C(),A("img",{key:0,src:I.url,alt:""},null,8,c5e)):(C(),ve(_,{key:1,class:"file-icon",name:c(Sm)(I.url)},null,8,["name"]))]),w("div",d5e,[w("div",f5e,ie(I.name),1),w("div",p5e,ie(c(jM)(I.size)),1)]),w("div",v5e,[w("div",{class:"toggle",onClick:k=>m(I.id)}," 重新选择 ",8,h5e),w("div",{class:"delete-icon",onClick:k=>b(I.id)},b5e,8,m5e)])])]))),256))])):G("",!0),Et(O(c(Gc),{class:B(["upload-box",[c(d)?"upload-box-disabled":"upload-box-answer"]]),disabled:c(d),action:"",accept:c(s),drag:"",ref_key:"uploadEl",ref:r,"show-file-list":!1,"http-request":h},{default:H(()=>[y5e]),_:1},8,["class","disabled","accept"]),[[nn,n.value.length<c(l)]])],2),O(To),O(ao)]),_:1})])}}}),R0=Ye(_5e,[["__scopeId","data-v-e4db2823"]]),fb=[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"5",value:5},{label:"6",value:6},{label:"7",value:7},{label:"8",value:8},{label:"9",value:9},{label:"10",value:10},{label:"11",value:11},{label:"12",value:12},{label:"13",value:13},{label:"14",value:14},{label:"15",value:15}],pb=[{label:"1MB(证件照)",value:1*1024*1024},{label:"5MB(图片、文档)",value:5*1024*1024},{label:"10MB(高清图片、文档)",value:10*1024*1024},{label:"20MB(视频)",value:20*1024*1024},{label:"50MB",value:50*1024*1024},{label:"100MB",value:100*1024*1024}],vb=[{label:"不限制",value:"*"},{label:"仅图片",value:"image/*"},{label:"仅文档",value:".doc,.docx,.pdf,.txt"},{label:"仅视频",value:"video/*"},{label:"仅音频",value:"audio/*"}],w5e={title:"收集附件",description:"",type:"file",required:!1,important:!1,accept:vb[0].value,maxSize:pb[3].value,maxCount:fb[0].value,vip:!0},$5e={title:"请上传你的个人简历",description:"",type:"resume",required:!1,important:!1,accept:vb[0].value,maxSize:pb[2].value,maxCount:fb[0].value,vip:!0},C5e={title:"请上传你的个人作品",description:"",type:"work",required:!1,important:!1,accept:vb[0].value,maxSize:pb[2].value,maxCount:fb[0].value,vip:!0},S5e={name:"收集附件",icon:"upload-cloud",vip:!0,summary:{title:"收集附件",brief:"用来收集一切文件,可以帮助你解决截图、照片、简历、word文档、PSD设计图以及项目合作中各种文件收集的麻烦。",image:Ke("images/widget/attached.png")}},E5e={name:"个人简历",icon:"jianli",vip:!0,summary:{title:"个人简历",brief:"收集用户关于个人教育背景、工作经历、技能证书等履历文件,常用于招聘相关的场景。",image:Ke("images/widget/resume.png")}},k5e={name:"个人作品",icon:"zuopin",vip:!0,summary:{title:"个人作品",brief:"收集用户自己的个人作品相关文件,适用于各种与创作、才艺展示相关的调查。",image:Ke("images/widget/personal-work.png")}},I5e={title:"地理位置",desc:"",required:!1},T5e={name:"地理位置",icon:"location",summary:{title:"地理位置",brief:"基于腾讯地图的IP定位功能,根据用户当前设备所在位置自动获取地理信息,可手动修改定位。",image:Ke("images/widget/geolocation.png")}},x5e={title:"-最近填写的客户-",rows:3},A5e={name:"跑马灯",icon:"carousel",summary:{title:"跑马灯",brief:"此组件可以更好地吸引客户群体填写,助力营销。",image:Ke("images/widget/marquee.png")}},O5e={lng:121.475186,lat:31.228725,name:"上海人民广场",address:"上海市黄浦区人民大道185号"},D5e={title:"我们在这里",desc:"停车位置紧张可以乘坐公共交通到达",...O5e},P5e={name:"地图导航",icon:"location2",summary:{title:"地图导航",brief:"在表单中直接插入[地址信息],填表者点击后可以直接跳转至[高德地图]定位导航,无需手动复制地址。",image:Ke("images/widget/navigation.png")}},M5e={showImage:!0,align:"center",title:C$(),desc:WM(),headerImage:""},N5e={name:"标题",icon:"header"},R5e={qrcode:"",tel:""},L5e={name:"联系我们",icon:"phone-forwarded",summary:{title:"联系我们",brief:"在表单中加入悬浮按钮,展示联系电话和微信二维码,以便实现对客户的及时告知。",image:Ke("images/widget/contact-us.png")}},F5e={title:"",desc:""},B5e={name:"分页",icon:"page",summary:{title:"分页",brief:"如果你在表单中需要收集的信息很多,可以使用分页将业务划分,提升填表体验。",image:Ke("images/widget/pagination.png")}};var KN=(e=>(e.link="0",e.miniProgram="1",e.qrCode="2",e.phone="3",e))(KN||{});const V5e={name:"按钮",icon:"carousel",vip:!0,summary:{title:"按钮",brief:"支持设置4种链接类型,包括[网页链接]、[小程序]等,可设置为单个或双个跳转,让你的线上营销更高效。",image:Ke("images/widget/button.png")}},YN=()=>(console.debug("创造按钮中"),{label:"跳转链接",link:"0",linkValue:{val1:"",val2:""},font:"Microsoft YaHei",fontSize:"14px",bold:!1,background:"#2278FF",color:"#fff",value:at()}),z5e={title:null,function:null,num:1,fixedBottom:!1,list:[YN()]},GN={title:"图文描述",value:""},j5e={name:"图文描述",icon:"calendar",vip:!1,summary:{title:"图文描述",brief:"用于展示给填表人的图文信息,支持插入图片和链接,适用于设置填写须知,补充说明等内容。",image:Ke("images/widget/description.png")}},U5e={slot:"title"},W5e={class:"title-view flex flex-row items-center justify-between"},H5e={class:"section-title dialog-title"},q5e={class:"tips-text"},K5e={key:0,class:"text-sm text-normal-c666 whitespace-pre-line"},QN=se({__name:"CommonModal",props:{title:"",tips:"",content:"",dialogVisible:!1,width:"560px",confirmBtnDisabled:!1},emits:["onCancel","onOk","onClose"],setup(e,{emit:t}){const n=e,o=t,a=M({get:()=>n.dialogVisible,set:()=>{}}),r=()=>{o("onCancel")},s=()=>{o("onOk")},i=()=>{o("onClose")};return(l,d)=>(C(),ve(c(Ga),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),"show-close":!1,class:"common-modal1",width:e.width,onClose:i},{footer:H(()=>[w("div",null,[O(c(Wt),{onClick:r,class:"button"},{default:H(()=>[Fe(" 取消 ")]),_:1}),O(c(Wt),{onClick:s,class:"button",type:"primary",disabled:e.confirmBtnDisabled},{default:H(()=>[Fe(" 确定 ")]),_:1},8,["disabled"])])]),default:H(()=>[w("div",U5e,[w("div",W5e,[w("span",H5e,ie(e.title),1),w("div",{class:"flex justify-end items-center"},[w("div",{class:"cursor-pointer flex items-center justify-center w-7.5 h-7.5 rounded-full hover:bg-normal-eee"},[w("i",{onClick:i,class:"el-icon-close text-normal-gray text-xl"})])])])]),w("div",q5e,ie(e.tips),1),xe(l.$slots,"content",{},()=>[e.content?(C(),A("div",K5e,ie(e.content),1)):G("",!0)])]),_:3},8,["modelValue","width"]))}}),Y5e=w("i",{style:{cursor:"pointer"},class:"iconfont icon-form-question"},null,-1),JA=se({__name:"QuesPop",props:{title:"",content:"",disabled:!1},setup(e){return(t,n)=>(C(),ve(c(Yc),{trigger:"hover",title:e.title,content:e.content,placement:"bottom",width:"370px",disabled:e.disabled},{reference:H(()=>[Y5e]),_:1},8,["title","content","disabled"]))}}),hb=e=>(At("data-v-c98609fa"),e=e(),Ot(),e),G5e={class:"input-top-bg"},Q5e={class:"input"},J5e={class:"input"},X5e={key:0,class:"image-setting"},Z5e={class:"title"},eBe={class:"image-list"},tBe={key:0,class:"upload-image"},nBe=["src"],oBe={class:"image-mask"},aBe=["onClick"],rBe=hb(()=>w("i",{class:"iconfont icon-form-edit"},null,-1)),sBe=[rBe],iBe=["onClick"],lBe={class:"input-medium-bg"},uBe=hb(()=>w("div",{class:"text"},"价格与库存",-1)),cBe={class:"input-row"},dBe={class:"flex flex-row gap-1 items-center"},fBe={class:"small-input"},pBe=hb(()=>w("span",null,"¥",-1)),vBe={class:"flex flex-row gap-1 items-center"},hBe={class:"small-input"},mBe=hb(()=>w("span",null,"¥",-1)),gBe={class:"small-input"},bBe="https://upload-cn-east-2.qiniup.com",yBe=se({__name:"GainEditModal",props:{visible:!1,product:{},hasPic:!1},emits:["close"],setup(e,{emit:t}){const n=t,o=P(null),a=P(!1),r=e,s=P(xp(r.product)),i=P({key:"",token:""}),l=S=>parseFloat(S.price)/100,d=(S,D)=>{S.price=D*100},f=S=>parseFloat(S.linedPrice)/100,p=(S,D)=>{S.linedPrice=D*100},h=()=>{let S="";for(let D=0;D<6;D++){const N=parseInt(Math.random()*10);S+=N}return S},m=S=>{s.value.imgs.splice(S,1),console.debug(s.value.imgs,"imgs"),ot(()=>{b()==4&&s.value.imgs.push({})})},b=()=>s.value.imgs.some(S=>S.url==null)?s.value.imgs.length-1:s.value.imgs.length,g=S=>{console.debug(S,"idcx")},y=(S,D,N,L)=>{if(!S)return;console.debug(N,"files");const F=encodeURI(S.key);s.value.imgs[L].url?console.debug("1"):(s.value.imgs.length!=5&&s.value.imgs.push({}),console.debug("2")),s.value.imgs[L].url="https://hs1.bmwas.cn/"+F,s.value.imgs[L].name=D.name,a.value=!1,console.debug(s.value.imgs[L],"idx")},_=async S=>{a.value=!0,console.debug(S,"file");try{return await k(S),!0}catch{return!1}},I=()=>"mqrcode/"+exports.globalInject.getUserInfo().uid+"/",k=async S=>{const D=parseInt(Date.now()/1e3).toString(),N=h(),F=I()+D+"_"+N+"_"+S.name,z=exports.globalInject.getToken(),j=await exports.globalInject.$axios.get(`/v1/getQiniuToken?eacb=${z}`);i.value={key:F,token:j.data.result.token}},E=M({get:()=>r.visible,set:()=>{}}),T=()=>{n("close")},x=()=>{console.debug(s.value,"editForm"),n("editProduct",s.value),n("close")};return(S,D)=>(C(),ve(QN,{width:"620px",title:"编辑商品",dialogVisible:E.value,onOnClose:T,onOnCancel:T,onOnOk:x,confirmBtnDisabled:a.value},{content:H(()=>[w("div",null,[O(c(KD),{model:s.value,"label-position":"top"},{default:H(()=>[w("div",G5e,[O(c(js),{prop:"productName",label:"商品名"},{default:H(()=>[w("div",Q5e,[O(c(Pt),{modelValue:s.value.productName,"onUpdate:modelValue":D[0]||(D[0]=N=>s.value.productName=N)},null,8,["modelValue"])])]),_:1}),O(c(js),{prop:"productDescOpen"},{default:H(()=>[O(c(Xo),{modelValue:s.value.productDescOpen,"onUpdate:modelValue":D[1]||(D[1]=N=>s.value.productDescOpen=N),label:"商品说明"},null,8,["modelValue"])]),_:1}),s.value.productDescOpen?(C(),ve(c(js),{key:0,style:{"margin-top":"-18px"},prop:"productDesc"},{default:H(()=>[w("div",J5e,[O(c(Pt),{type:"textarea",resize:"none",modelValue:s.value.productDesc,"onUpdate:modelValue":D[2]||(D[2]=N=>s.value.productDesc=N)},null,8,["modelValue"])])]),_:1})):G("",!0)]),e.hasPic?(C(),A("div",X5e,[w("div",Z5e,"展示图片("+ie(b())+"/5)",1),w("div",eBe,[(C(!0),A(Ae,null,et(s.value.imgs,(N,L)=>(C(),ve(c(Gc),{ref_for:!0,ref_key:"upload",ref:o,key:L,action:bBe,"list-type":"picture-card",data:i.value,"on-success":(F,z,j)=>y(F,z,j,L),"before-upload":F=>_(F),"show-file-list":!1},{default:H(()=>[N.url?(C(),A("div",tBe,[w("img",{class:"image",src:N.url},null,8,nBe),w("div",oBe,[w("div",{onClick:F=>g(L),class:"img"},sBe,8,aBe),s.value.imgs.length>1?(C(),A("i",{key:0,onClick:mt(F=>m(L),["stop"]),class:"icon close-icon el-icon-close"},null,8,iBe)):G("",!0)])])):(C(),ve(c(lt),{key:1,class:"plus-icon"},{default:H(()=>[O(c(Sg))]),_:1}))]),_:2},1032,["data","on-success","before-upload"]))),128))])])):G("",!0),w("div",lBe,[uBe,w("div",cBe,[O(c(js),{prop:"price",label:"现价(CNY)"},{label:H(()=>[w("div",dBe,[Fe(" 现价(CNY) "),O(JA,{title:"现价",content:"商品的销售标价,具体的成交价格可能因会员使用优惠券、商品优惠等发生变化,最终以订单结算价格为准。"})])]),default:H(()=>[w("div",fBe,[O(c(ka),{"controls-position":"right",class:"custom-input-number","model-value":l(s.value),"onUpdate:modelValue":D[3]||(D[3]=N=>d(s.value,N)),precision:"2"},{prefix:H(()=>[pBe]),_:1},8,["model-value"])])]),_:1}),O(c(js),{prop:"linedPrice"},{label:H(()=>[w("div",vBe,[Fe(" 划线价(CNY) "),O(JA,{title:"划线价",content:"划线的价格可能是商品的专柜价、吊牌价、正品零售价、指导价、曾经展示过的销售价等,仅供您参考。"})])]),default:H(()=>[w("div",hBe,[O(c(ka),{"controls-position":"right","model-value":f(s.value),"onUpdate:modelValue":D[4]||(D[4]=N=>p(s.value,N)),precision:"2"},{prefix:H(()=>[mBe]),_:1},8,["model-value"])])]),_:1}),O(c(js),{prop:"stock",label:"库存"},{default:H(()=>[w("div",gBe,[O(c(ka),{"controls-position":"right",modelValue:s.value.stock,"onUpdate:modelValue":D[5]||(D[5]=N=>s.value.stock=N)},null,8,["modelValue"])])]),_:1})])])]),_:1},8,["model"])])]),_:1},8,["dialogVisible","confirmBtnDisabled"]))}}),_Be=Ye(yBe,[["__scopeId","data-v-c98609fa"]]),wBe=e=>(At("data-v-2f2d60fc"),e=e(),Ot(),e),$Be={class:"flex justify-between items-center"},CBe=["src"],SBe=wBe(()=>w("span",null,"编辑",-1)),EBe=["src"],kBe=["src"],IBe=se({__name:"HoverEdit",props:{hasPic:!1,isDragging:!1},emits:["openEditModal","handleDelete"],setup(e,{emit:t}){const n=t,o=()=>{n("openEditModal")},a=()=>{n("handleDelete")};return(r,s)=>(C(),A("div",$Be,[w("div",{onClick:o,class:B(e.hasPic?"mask-text":"mask-text-nopic")},[w("img",{class:"mask-icon",src:c(Ke)(e.hasPic?"images/widget/gain-edit-white-icon.png":"images/widget/gain-edit-icon.png")},null,8,CBe),SBe],2),w("div",{class:B(["drag_handle",{"drag_handle-h":e.isDragging,"drag-handle":!0}])},[w("div",{class:B(e.hasPic?"mask-text":"mask-text-nopic")},[w("img",{class:"mask-icon",src:c(Ke)(e.hasPic?"images/widget/gain-drag-white-icon.png":"images/widget/gain-drag-icon.png")},null,8,EBe)],2)],2),w("div",{onClick:a,class:B(e.hasPic?"mask-text":"mask-text-nopic")},[w("img",{class:"mask-icon",src:c(Ke)(e.hasPic?"images/widget/gain-close-white-icon.png":"images/widget/gain-close-icon.png")},null,8,kBe)],2)]))}}),XA=Ye(IBe,[["__scopeId","data-v-2f2d60fc"]]),TBe={key:0,class:"top"},xBe={class:"img"},ABe=["src"],OBe={key:0,class:"mask"},DBe={class:"medium"},PBe={key:0,class:"hover-edit"},MBe={class:"title"},NBe={class:"bottom"},RBe={class:"flex flex-row justify-between"},LBe={class:"price-col"},FBe={class:"price"},BBe={key:0,class:"lined-price"},VBe={key:0,class:"stock-text"},zBe=["src"],jBe={key:1},UBe=se({__name:"GainOption",props:{item:{},index:0,hasPic:!1,isDragging:!1},emits:["deleteOption","editProduct","answer"],setup(e,{emit:t}){const n=de("editable"),o=de("formStore"),a=de("widgetStore"),r=P(!1),s=t,i=e;Se(o,y=>{n||y.data[a.id].some(_=>_.value==i.item.value)&&(i.item.num=y.data[a.id].find(_=>_.value==i.item.value).num)});const l=()=>{n||i.item.remainingStock==0||(i.item.num=1,f())},d=y=>{f()},f=()=>{const y={value:i.item.value,label:i.item.productName,num:i.item.num,totalPrice:i.item.num*i.item.price,price:i.item.price,isPaid:!0};s("answer",y,i.index)},p=()=>{r.value=!0},h=y=>{if(y.remainingStock==0)return"已售空";{const _=a.attrs.prefixStock==""||a.attrs.prefixStock==null?"库存":a.attrs.prefixStock,I=a.attrs.suffixStock==""||a.attrs.suffixStock==null?"件":a.attrs.suffixStock;return`${_}:${y.remainingStock||y.stock} ${I}`}},m=y=>y?(parseFloat(y)/100).toFixed(2):"0.00",b=y=>{s("editProduct",y,i.index),r.value=!1},g=()=>{s("deleteOption",i.index)};return(y,_)=>(C(),A(Ae,null,[e.hasPic?(C(),A("div",TBe,[w("div",xBe,[w("img",{src:e.item.imgs[0].url},null,8,ABe),c(n)?(C(),A("div",OBe,[O(XA,{hasPic:e.hasPic&&c(n),onHandleDelete:g,onOpenEditModal:p},null,8,["hasPic"])])):G("",!0)])])):G("",!0),w("div",DBe,[!e.hasPic&&c(n)?(C(),A("div",PBe,[O(XA,{isDragging:e.isDragging,hasPic:e.hasPic,onHandleDelete:g,onOpenEditModal:p},null,8,["isDragging","hasPic"])])):G("",!0),w("div",MBe,ie(e.item.productName),1),e.item.productDescOpen?(C(),ve(Up,{key:1,option:{label:e.item.productName,desc:e.item.productDesc}},null,8,["option"])):G("",!0)]),w("div",NBe,[w("div",RBe,[w("div",LBe,[w("div",FBe,"¥"+ie(m(e.item.price)),1),e.item.linedPrice?(C(),A("div",BBe," ¥"+ie(m(e.item.linedPrice)),1)):G("",!0)]),e.item.stock!=null?(C(),A("div",VBe,ie(h(e.item)),1)):G("",!0)]),e.item.num?(C(),A("div",jBe,[O(c(ka),{style:{width:"100%","margin-top":"12px"},modelValue:e.item.num,"onUpdate:modelValue":_[0]||(_[0]=I=>e.item.num=I),onChange:d,min:0,max:e.item.remainingStock??1/0},null,8,["modelValue","max"])])):(C(),A("div",{key:0,onClick:l,class:"addBtn"},[w("img",{style:{width:"16px",height:"16px"},src:c(Ke)("images/widget/gain-add-black-icon.png")},null,8,zBe)]))]),r.value?(C(),ve(_Be,{key:1,onClose:_[1]||(_[1]=I=>r.value=!1),visible:r.value,onEditProduct:b,product:e.item,hasPic:e.hasPic},null,8,["visible","product","hasPic"])):G("",!0)],64))}}),WBe=Ye(UBe,[["__scopeId","data-v-c810b62d"]]),HBe=e=>(At("data-v-170b252a"),e=e(),Ot(),e),qBe=HBe(()=>w("div",{class:"title"},"商品名称(实例)",-1)),KBe={class:"answer-container"},YBe=se({__name:"CacheOption",props:{datas:[]},setup(e){const t=e;return st(()=>{console.debug(t.datas,"datas")}),(n,o)=>(C(!0),A(Ae,null,et(e.datas,a=>(C(),A("div",null,[qBe,w("div",KBe,ie(a.label)+"(数量: "+ie(a.num)+")",1)]))),256))}}),GBe=Ye(YBe,[["__scopeId","data-v-170b252a"]]),QBe={key:0},JBe=se({__name:"Gain",props:{hasPic:!1},setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=P(null),r=P([]);P([]);const s=P(!1),i=P(null),l=e,d=de("formStore"),f=P([]);Se(d,I=>{let k=0;if(I.pay_info[o.id]){console.debug(I.pay_info[o.id],"saaa"),I.pay_info[o.id].list.map(T=>{k+=T.totalPrice});const E=I.pay_info[o.id];E.totalPrice=k,o.updatePayInfo(E)}}),t&&Ir(a,f,{handle:".drag_handle",direction:"vertical",ghostClass:"ghost_row",group:{name:"gains",pull:!1},dragClass:"drag-row",animation:150,forceFallback:!0,onStart(){s.value=!0},onEnd:I=>{s.value=!1,I.oldIndex!==I.newIndex&&Xt({id:o.id,attr:"list",value:f.value})}});const p=()=>{f.value=[{productName:"商品一",productDescOpen:!1,productDesc:"",value:at(),imgs:[{name:"1.png",url:Ke("images/widget/gain-default1.png")},{}],price:1e3,isPaid:!0,num:0,linedPrice:null,stock:10},{productName:"商品二",productDescOpen:!1,productDesc:"",value:at(),imgs:[{name:"1.png",url:Ke("images/widget/gain-default2.png")},{}],price:2e3,isPaid:!0,num:0,linedPrice:null,stock:10},{productName:"商品三",productDescOpen:!1,productDesc:"",value:at(),isPaid:!0,imgs:[{name:"1.png",url:Ke("images/widget/gain-default3.png")},{}],num:0,price:3e3,linedPrice:null,stock:10}]};st(()=>{o.attrs.list?f.value=o.attrs.list:p(),Uf.on("deleteAllAnswers",()=>{r.value=[],f.value.map(I=>I.num=0),o.updateValue(r.value)}),Xt({id:o.id,attr:"list",value:g()})}),Nn(()=>{Uf.off("deleteAllAnswers")});const h=()=>{const I={productName:"商品三",productDescOpen:!1,productDesc:"",value:at(),isPaid:!0,price:3e3,linedPrice:null,stock:10};l.hasPic&&(I.imgs=[{name:"1.png",url:Ke("images/widget/gain-default3.png")}]),f.value.push(I),Xt({id:o.id,attr:"list",value:f.value})},m=async(I,k)=>{f.value[k].num=I.num,I.num>0?r.value[k]=I:r.value.splice(k,1);let E=0;r.value.map(x=>{E+=x.totalPrice});const T={trade_type:n.value?1:2,mch_config_id:gt.value.pay_setting.mch_config_id,list:r.value.flat(),totalPrice:E,type:o.type};if(n.value&&!i.value){const x=exports.globalInject.getRoute().query.state;if(x){const S=await exports.globalInject.$axios.get(`/v1/WxPlatforms/getOpenidByState?state=${x}`);i.value=S.data.result,T.openid=S.data.result}}i.value&&(T.openid=i.value),o.updateValue(r.value.flat()),gt.value.pay_setting.mch_config_id&&o.updatePayInfo(T)},b=I=>{f.value.splice(I,1),Xt({id:o.id,attr:"list",value:f.value})},g=()=>{const I=On(f.value);return I.map(k=>{let E=[];l.hasPic&&(k.imgs.map(T=>{E.push({url:T.url,name:T.name})}),k.imgs=E),k.price=k.price}),I},y=(I,k)=>{f.value[k]=I,Xt({id:o.id,attr:"list",value:g()})},_=()=>[{key:"addAppointment",label:"添加商品",icon:"fill-circle-add",callback:()=>{h()}}];return(I,k)=>(C(),A("div",null,[O(Kn),O(lo,null,{default:H(()=>[O(eo),c(o).mode=="answer"?(C(),A("div",QBe,[O(GBe,{datas:c(d).data[c(o).id]},null,8,["datas"])])):(C(),A("div",{key:1,ref_key:"dragList",ref:a,class:"optionList"},[(C(!0),A(Ae,null,et(f.value,(E,T)=>(C(),A("div",{class:B(["option-row",{option:!c(n),"mobile-option":c(n)}])},[O(WBe,{hasPic:e.hasPic,index:T,item:E,isDragging:s.value,class:B({dragging_container:s.value,"item-lf":c(t)}),onAnswer:m,onEditProduct:y,onDeleteOption:b},null,8,["hasPic","index","item","isDragging","class"])],2))),256))],512)),O(To),O(ao,{customs:_()},null,8,["customs"])]),_:1})]))}}),JN=Ye(JBe,[["__scopeId","data-v-effef445"]]),XBe={__name:"GainWithPic",setup(e){return(t,n)=>(C(),ve(JN,{hasPic:!0}))}},ZBe={__name:"GainWithoutPic",setup(e){return(t,n)=>(C(),ve(JN,{hasPic:!1}))}},eVe={title:"无图商品",desc:"",placeholder:"请输入",required:!1},tVe={title:"配图商品",desc:"",placeholder:"请输入",required:!1},LC={attrs:{...eVe},info:{name:"无图商品",icon:"gainnopic",color:"#4F57FD",vip:!1,summary:{title:"无图商品",brief:`适用于:高级版及以上
136
+ 适用于巡检项目和清点物品的场景。`,image:Ke("images/widget/checkEntry.png")}},component:oFe},qN=e=>(At("data-v-e4db2823"),e=e(),Ot(),e),rFe={class:"file-collect-box widget-box"},sFe={key:0,class:"file-list-container"},iFe={class:"list-item"},lFe={class:"file-content"},uFe={class:"type-image"},cFe=["src"],dFe={class:"file-info"},fFe={class:"file-name"},pFe={class:"file-size"},vFe={class:"editor-box"},hFe=["onClick"],mFe=["onClick"],gFe=qN(()=>w("span",{class:"icon iconfont icon-form-delete"},null,-1)),bFe=[gFe],yFe=qN(()=>w("div",{class:"upload-content"},"将附件拖拽至此区域 或 点击上传",-1)),_Fe=se({__name:"File",props:{attrs:{},value:{default:[]},id:{}},emits:["update:value"],setup(e,{emit:t}){const n=e,o=de("formMode"),a=P(""),r=P(null),{accept:s,maxSize:i,maxCount:l}=wo(n.attrs),d=de("editable"),f=M(()=>Vg.value>=M$.value),p=t;async function h(g){if(f.value){Xt({attr:"request",value:!1}),ht.error("上传失败,已超出表单上传容量");return}if(g.file.size>i){ht.error("文件大小超过限制");return}const y=BM.service({text:"上传中"});try{(await exports.globalInject.uploadForForm(g.file,L$())).subscribe({error:I=>{ht.error(I)},complete:async I=>{if(y.close(),!I.key){ht.error("上传失败");return}let k=await P9e({file_path:I.key,file_size:g.file.size,form_id:exports.globalInject.getFormId(),file_name:g.file.name}),E;a.value?(E=n.value.map(T=>T.id===a.value?{name:g.file.name,url:"https://fatt.bmwax.cn/"+I.key,size:g.file.size,id:k}:T),a.value=""):E=[...n.value||[],{name:g.file.name,url:"https://fatt.bmwax.cn/"+I.key,size:g.file.size,id:k}],p("update:value",E),nwe(g.file.size)}})}catch(_){y.close(),ht.error("上传失败"+_)}}async function m(g){var y;a.value=g;try{((y=r.value)==null?void 0:y.$el.querySelector("input")).click()}catch{a.value=""}}function b(g){let y=n.value.filter(_=>_.id!==g);p("update:value",y)}return(g,y)=>{const _=Bt("svg-icon");return C(),A("div",rFe,[O(Kn),O(lo,null,{default:H(()=>[O(eo),w("div",{class:B(["file--upload",{disabled:c(o)==="answer-preview"}])},[n.value.length>0?(C(),A("div",sFe,[(C(!0),A(Ae,null,et(n.value,I=>(C(),A("div",iFe,[w("div",lFe,[w("div",uFe,[c(Sm)(I.url)==="img"?(C(),A("img",{key:0,src:I.url,alt:""},null,8,cFe)):(C(),ve(_,{key:1,class:"file-icon",name:c(Sm)(I.url)},null,8,["name"]))]),w("div",dFe,[w("div",fFe,ie(I.name),1),w("div",pFe,ie(c(jM)(I.size)),1)]),w("div",vFe,[w("div",{class:"toggle",onClick:k=>m(I.id)}," 重新选择 ",8,hFe),w("div",{class:"delete-icon",onClick:k=>b(I.id)},bFe,8,mFe)])])]))),256))])):G("",!0),Et(O(c(Gc),{class:B(["upload-box",[c(d)?"upload-box-disabled":"upload-box-answer"]]),disabled:c(d),action:"",accept:c(s),drag:"",ref_key:"uploadEl",ref:r,"show-file-list":!1,"http-request":h},{default:H(()=>[yFe]),_:1},8,["class","disabled","accept"]),[[nn,n.value.length<c(l)]])],2),O(To),O(ao)]),_:1})])}}}),R0=Ye(_Fe,[["__scopeId","data-v-e4db2823"]]),fb=[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"5",value:5},{label:"6",value:6},{label:"7",value:7},{label:"8",value:8},{label:"9",value:9},{label:"10",value:10},{label:"11",value:11},{label:"12",value:12},{label:"13",value:13},{label:"14",value:14},{label:"15",value:15}],pb=[{label:"1MB(证件照)",value:1*1024*1024},{label:"5MB(图片、文档)",value:5*1024*1024},{label:"10MB(高清图片、文档)",value:10*1024*1024},{label:"20MB(视频)",value:20*1024*1024},{label:"50MB",value:50*1024*1024},{label:"100MB",value:100*1024*1024}],vb=[{label:"不限制",value:"*"},{label:"仅图片",value:"image/*"},{label:"仅文档",value:".doc,.docx,.pdf,.txt"},{label:"仅视频",value:"video/*"},{label:"仅音频",value:"audio/*"}],wFe={title:"收集附件",description:"",type:"file",required:!1,important:!1,accept:vb[0].value,maxSize:pb[3].value,maxCount:fb[0].value,vip:!0},$Fe={title:"请上传你的个人简历",description:"",type:"resume",required:!1,important:!1,accept:vb[0].value,maxSize:pb[2].value,maxCount:fb[0].value,vip:!0},CFe={title:"请上传你的个人作品",description:"",type:"work",required:!1,important:!1,accept:vb[0].value,maxSize:pb[2].value,maxCount:fb[0].value,vip:!0},SFe={name:"收集附件",icon:"upload-cloud",vip:!0,summary:{title:"收集附件",brief:"用来收集一切文件,可以帮助你解决截图、照片、简历、word文档、PSD设计图以及项目合作中各种文件收集的麻烦。",image:Ke("images/widget/attached.png")}},EFe={name:"个人简历",icon:"jianli",vip:!0,summary:{title:"个人简历",brief:"收集用户关于个人教育背景、工作经历、技能证书等履历文件,常用于招聘相关的场景。",image:Ke("images/widget/resume.png")}},kFe={name:"个人作品",icon:"zuopin",vip:!0,summary:{title:"个人作品",brief:"收集用户自己的个人作品相关文件,适用于各种与创作、才艺展示相关的调查。",image:Ke("images/widget/personal-work.png")}},IFe={title:"地理位置",desc:"",required:!1},TFe={name:"地理位置",icon:"location",summary:{title:"地理位置",brief:"基于腾讯地图的IP定位功能,根据用户当前设备所在位置自动获取地理信息,可手动修改定位。",image:Ke("images/widget/geolocation.png")}},xFe={title:"-最近填写的客户-",rows:3},AFe={name:"跑马灯",icon:"carousel",summary:{title:"跑马灯",brief:"此组件可以更好地吸引客户群体填写,助力营销。",image:Ke("images/widget/marquee.png")}},OFe={lng:121.475186,lat:31.228725,name:"上海人民广场",address:"上海市黄浦区人民大道185号"},DFe={title:"我们在这里",desc:"停车位置紧张可以乘坐公共交通到达",...OFe},PFe={name:"地图导航",icon:"location2",summary:{title:"地图导航",brief:"在表单中直接插入[地址信息],填表者点击后可以直接跳转至[高德地图]定位导航,无需手动复制地址。",image:Ke("images/widget/navigation.png")}},MFe={showImage:!0,align:"center",title:C$(),desc:WM(),headerImage:""},NFe={name:"标题",icon:"header"},RFe={qrcode:"",tel:""},LFe={name:"联系我们",icon:"phone-forwarded",summary:{title:"联系我们",brief:"在表单中加入悬浮按钮,展示联系电话和微信二维码,以便实现对客户的及时告知。",image:Ke("images/widget/contact-us.png")}},FFe={title:"",desc:""},BFe={name:"分页",icon:"page",summary:{title:"分页",brief:"如果你在表单中需要收集的信息很多,可以使用分页将业务划分,提升填表体验。",image:Ke("images/widget/pagination.png")}};var KN=(e=>(e.link="0",e.miniProgram="1",e.qrCode="2",e.phone="3",e))(KN||{});const VFe={name:"按钮",icon:"carousel",vip:!0,summary:{title:"按钮",brief:"支持设置4种链接类型,包括[网页链接]、[小程序]等,可设置为单个或双个跳转,让你的线上营销更高效。",image:Ke("images/widget/button.png")}},YN=()=>(console.debug("创造按钮中"),{label:"跳转链接",link:"0",linkValue:{val1:"",val2:""},font:"Microsoft YaHei",fontSize:"14px",bold:!1,background:"#2278FF",color:"#fff",value:at()}),zFe={title:null,function:null,num:1,fixedBottom:!1,list:[YN()]},GN={title:"图文描述",value:""},jFe={name:"图文描述",icon:"calendar",vip:!1,summary:{title:"图文描述",brief:"用于展示给填表人的图文信息,支持插入图片和链接,适用于设置填写须知,补充说明等内容。",image:Ke("images/widget/description.png")}},UFe={slot:"title"},WFe={class:"title-view flex flex-row items-center justify-between"},HFe={class:"section-title dialog-title"},qFe={class:"tips-text"},KFe={key:0,class:"text-sm text-normal-c666 whitespace-pre-line"},QN=se({__name:"CommonModal",props:{title:"",tips:"",content:"",dialogVisible:!1,width:"560px",confirmBtnDisabled:!1},emits:["onCancel","onOk","onClose"],setup(e,{emit:t}){const n=e,o=t,a=M({get:()=>n.dialogVisible,set:()=>{}}),r=()=>{o("onCancel")},s=()=>{o("onOk")},i=()=>{o("onClose")};return(l,d)=>(C(),ve(c(Ga),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),"show-close":!1,class:"common-modal1",width:e.width,onClose:i},{footer:H(()=>[w("div",null,[O(c(Wt),{onClick:r,class:"button"},{default:H(()=>[Fe(" 取消 ")]),_:1}),O(c(Wt),{onClick:s,class:"button",type:"primary",disabled:e.confirmBtnDisabled},{default:H(()=>[Fe(" 确定 ")]),_:1},8,["disabled"])])]),default:H(()=>[w("div",UFe,[w("div",WFe,[w("span",HFe,ie(e.title),1),w("div",{class:"flex justify-end items-center"},[w("div",{class:"cursor-pointer flex items-center justify-center w-7.5 h-7.5 rounded-full hover:bg-normal-eee"},[w("i",{onClick:i,class:"el-icon-close text-normal-gray text-xl"})])])])]),w("div",qFe,ie(e.tips),1),xe(l.$slots,"content",{},()=>[e.content?(C(),A("div",KFe,ie(e.content),1)):G("",!0)])]),_:3},8,["modelValue","width"]))}}),YFe=w("i",{style:{cursor:"pointer"},class:"iconfont icon-form-question"},null,-1),JA=se({__name:"QuesPop",props:{title:"",content:"",disabled:!1},setup(e){return(t,n)=>(C(),ve(c(Yc),{trigger:"hover",title:e.title,content:e.content,placement:"bottom",width:"370px",disabled:e.disabled},{reference:H(()=>[YFe]),_:1},8,["title","content","disabled"]))}}),hb=e=>(At("data-v-c98609fa"),e=e(),Ot(),e),GFe={class:"input-top-bg"},QFe={class:"input"},JFe={class:"input"},XFe={key:0,class:"image-setting"},ZFe={class:"title"},eBe={class:"image-list"},tBe={key:0,class:"upload-image"},nBe=["src"],oBe={class:"image-mask"},aBe=["onClick"],rBe=hb(()=>w("i",{class:"iconfont icon-form-edit"},null,-1)),sBe=[rBe],iBe=["onClick"],lBe={class:"input-medium-bg"},uBe=hb(()=>w("div",{class:"text"},"价格与库存",-1)),cBe={class:"input-row"},dBe={class:"flex flex-row gap-1 items-center"},fBe={class:"small-input"},pBe=hb(()=>w("span",null,"¥",-1)),vBe={class:"flex flex-row gap-1 items-center"},hBe={class:"small-input"},mBe=hb(()=>w("span",null,"¥",-1)),gBe={class:"small-input"},bBe="https://upload-cn-east-2.qiniup.com",yBe=se({__name:"GainEditModal",props:{visible:!1,product:{},hasPic:!1},emits:["close"],setup(e,{emit:t}){const n=t,o=P(null),a=P(!1),r=e,s=P(xp(r.product)),i=P({key:"",token:""}),l=S=>parseFloat(S.price)/100,d=(S,D)=>{S.price=D*100},f=S=>parseFloat(S.linedPrice)/100,p=(S,D)=>{S.linedPrice=D*100},h=()=>{let S="";for(let D=0;D<6;D++){const N=parseInt(Math.random()*10);S+=N}return S},m=S=>{s.value.imgs.splice(S,1),console.debug(s.value.imgs,"imgs"),ot(()=>{b()==4&&s.value.imgs.push({})})},b=()=>s.value.imgs.some(S=>S.url==null)?s.value.imgs.length-1:s.value.imgs.length,g=S=>{console.debug(S,"idcx")},y=(S,D,N,L)=>{if(!S)return;console.debug(N,"files");const F=encodeURI(S.key);s.value.imgs[L].url?console.debug("1"):(s.value.imgs.length!=5&&s.value.imgs.push({}),console.debug("2")),s.value.imgs[L].url="https://hs1.bmwas.cn/"+F,s.value.imgs[L].name=D.name,a.value=!1,console.debug(s.value.imgs[L],"idx")},_=async S=>{a.value=!0,console.debug(S,"file");try{return await k(S),!0}catch{return!1}},I=()=>"mqrcode/"+exports.globalInject.getUserInfo().uid+"/",k=async S=>{const D=parseInt(Date.now()/1e3).toString(),N=h(),F=I()+D+"_"+N+"_"+S.name,z=exports.globalInject.getToken(),j=await exports.globalInject.$axios.get(`/v1/getQiniuToken?eacb=${z}`);i.value={key:F,token:j.data.result.token}},E=M({get:()=>r.visible,set:()=>{}}),T=()=>{n("close")},x=()=>{console.debug(s.value,"editForm"),n("editProduct",s.value),n("close")};return(S,D)=>(C(),ve(QN,{width:"620px",title:"编辑商品",dialogVisible:E.value,onOnClose:T,onOnCancel:T,onOnOk:x,confirmBtnDisabled:a.value},{content:H(()=>[w("div",null,[O(c(KD),{model:s.value,"label-position":"top"},{default:H(()=>[w("div",GFe,[O(c(js),{prop:"productName",label:"商品名"},{default:H(()=>[w("div",QFe,[O(c(Pt),{modelValue:s.value.productName,"onUpdate:modelValue":D[0]||(D[0]=N=>s.value.productName=N)},null,8,["modelValue"])])]),_:1}),O(c(js),{prop:"productDescOpen"},{default:H(()=>[O(c(Xo),{modelValue:s.value.productDescOpen,"onUpdate:modelValue":D[1]||(D[1]=N=>s.value.productDescOpen=N),label:"商品说明"},null,8,["modelValue"])]),_:1}),s.value.productDescOpen?(C(),ve(c(js),{key:0,style:{"margin-top":"-18px"},prop:"productDesc"},{default:H(()=>[w("div",JFe,[O(c(Pt),{type:"textarea",resize:"none",modelValue:s.value.productDesc,"onUpdate:modelValue":D[2]||(D[2]=N=>s.value.productDesc=N)},null,8,["modelValue"])])]),_:1})):G("",!0)]),e.hasPic?(C(),A("div",XFe,[w("div",ZFe,"展示图片("+ie(b())+"/5)",1),w("div",eBe,[(C(!0),A(Ae,null,et(s.value.imgs,(N,L)=>(C(),ve(c(Gc),{ref_for:!0,ref_key:"upload",ref:o,key:L,action:bBe,"list-type":"picture-card",data:i.value,"on-success":(F,z,j)=>y(F,z,j,L),"before-upload":F=>_(F),"show-file-list":!1},{default:H(()=>[N.url?(C(),A("div",tBe,[w("img",{class:"image",src:N.url},null,8,nBe),w("div",oBe,[w("div",{onClick:F=>g(L),class:"img"},sBe,8,aBe),s.value.imgs.length>1?(C(),A("i",{key:0,onClick:mt(F=>m(L),["stop"]),class:"icon close-icon el-icon-close"},null,8,iBe)):G("",!0)])])):(C(),ve(c(lt),{key:1,class:"plus-icon"},{default:H(()=>[O(c(Sg))]),_:1}))]),_:2},1032,["data","on-success","before-upload"]))),128))])])):G("",!0),w("div",lBe,[uBe,w("div",cBe,[O(c(js),{prop:"price",label:"现价(CNY)"},{label:H(()=>[w("div",dBe,[Fe(" 现价(CNY) "),O(JA,{title:"现价",content:"商品的销售标价,具体的成交价格可能因会员使用优惠券、商品优惠等发生变化,最终以订单结算价格为准。"})])]),default:H(()=>[w("div",fBe,[O(c(ka),{"controls-position":"right",class:"custom-input-number","model-value":l(s.value),"onUpdate:modelValue":D[3]||(D[3]=N=>d(s.value,N)),precision:"2"},{prefix:H(()=>[pBe]),_:1},8,["model-value"])])]),_:1}),O(c(js),{prop:"linedPrice"},{label:H(()=>[w("div",vBe,[Fe(" 划线价(CNY) "),O(JA,{title:"划线价",content:"划线的价格可能是商品的专柜价、吊牌价、正品零售价、指导价、曾经展示过的销售价等,仅供您参考。"})])]),default:H(()=>[w("div",hBe,[O(c(ka),{"controls-position":"right","model-value":f(s.value),"onUpdate:modelValue":D[4]||(D[4]=N=>p(s.value,N)),precision:"2"},{prefix:H(()=>[mBe]),_:1},8,["model-value"])])]),_:1}),O(c(js),{prop:"stock",label:"库存"},{default:H(()=>[w("div",gBe,[O(c(ka),{"controls-position":"right",modelValue:s.value.stock,"onUpdate:modelValue":D[5]||(D[5]=N=>s.value.stock=N)},null,8,["modelValue"])])]),_:1})])])]),_:1},8,["model"])])]),_:1},8,["dialogVisible","confirmBtnDisabled"]))}}),_Be=Ye(yBe,[["__scopeId","data-v-c98609fa"]]),wBe=e=>(At("data-v-2f2d60fc"),e=e(),Ot(),e),$Be={class:"flex justify-between items-center"},CBe=["src"],SBe=wBe(()=>w("span",null,"编辑",-1)),EBe=["src"],kBe=["src"],IBe=se({__name:"HoverEdit",props:{hasPic:!1,isDragging:!1},emits:["openEditModal","handleDelete"],setup(e,{emit:t}){const n=t,o=()=>{n("openEditModal")},a=()=>{n("handleDelete")};return(r,s)=>(C(),A("div",$Be,[w("div",{onClick:o,class:B(e.hasPic?"mask-text":"mask-text-nopic")},[w("img",{class:"mask-icon",src:c(Ke)(e.hasPic?"images/widget/gain-edit-white-icon.png":"images/widget/gain-edit-icon.png")},null,8,CBe),SBe],2),w("div",{class:B(["drag_handle",{"drag_handle-h":e.isDragging,"drag-handle":!0}])},[w("div",{class:B(e.hasPic?"mask-text":"mask-text-nopic")},[w("img",{class:"mask-icon",src:c(Ke)(e.hasPic?"images/widget/gain-drag-white-icon.png":"images/widget/gain-drag-icon.png")},null,8,EBe)],2)],2),w("div",{onClick:a,class:B(e.hasPic?"mask-text":"mask-text-nopic")},[w("img",{class:"mask-icon",src:c(Ke)(e.hasPic?"images/widget/gain-close-white-icon.png":"images/widget/gain-close-icon.png")},null,8,kBe)],2)]))}}),XA=Ye(IBe,[["__scopeId","data-v-2f2d60fc"]]),TBe={key:0,class:"top"},xBe={class:"img"},ABe=["src"],OBe={key:0,class:"mask"},DBe={class:"medium"},PBe={key:0,class:"hover-edit"},MBe={class:"title"},NBe={class:"bottom"},RBe={class:"flex flex-row justify-between"},LBe={class:"price-col"},FBe={class:"price"},BBe={key:0,class:"lined-price"},VBe={key:0,class:"stock-text"},zBe=["src"],jBe={key:1},UBe=se({__name:"GainOption",props:{item:{},index:0,hasPic:!1,isDragging:!1},emits:["deleteOption","editProduct","answer"],setup(e,{emit:t}){const n=de("editable"),o=de("formStore"),a=de("widgetStore"),r=P(!1),s=t,i=e;Se(o,y=>{n||y.data[a.id].some(_=>_.value==i.item.value)&&(i.item.num=y.data[a.id].find(_=>_.value==i.item.value).num)});const l=()=>{n||i.item.remainingStock==0||(i.item.num=1,f())},d=y=>{f()},f=()=>{const y={value:i.item.value,label:i.item.productName,num:i.item.num,totalPrice:i.item.num*i.item.price,price:i.item.price,isPaid:!0};s("answer",y,i.index)},p=()=>{r.value=!0},h=y=>{if(y.remainingStock==0)return"已售空";{const _=a.attrs.prefixStock==""||a.attrs.prefixStock==null?"库存":a.attrs.prefixStock,I=a.attrs.suffixStock==""||a.attrs.suffixStock==null?"件":a.attrs.suffixStock;return`${_}:${y.remainingStock||y.stock} ${I}`}},m=y=>y?(parseFloat(y)/100).toFixed(2):"0.00",b=y=>{s("editProduct",y,i.index),r.value=!1},g=()=>{s("deleteOption",i.index)};return(y,_)=>(C(),A(Ae,null,[e.hasPic?(C(),A("div",TBe,[w("div",xBe,[w("img",{src:e.item.imgs[0].url},null,8,ABe),c(n)?(C(),A("div",OBe,[O(XA,{hasPic:e.hasPic&&c(n),onHandleDelete:g,onOpenEditModal:p},null,8,["hasPic"])])):G("",!0)])])):G("",!0),w("div",DBe,[!e.hasPic&&c(n)?(C(),A("div",PBe,[O(XA,{isDragging:e.isDragging,hasPic:e.hasPic,onHandleDelete:g,onOpenEditModal:p},null,8,["isDragging","hasPic"])])):G("",!0),w("div",MBe,ie(e.item.productName),1),e.item.productDescOpen?(C(),ve(Up,{key:1,option:{label:e.item.productName,desc:e.item.productDesc}},null,8,["option"])):G("",!0)]),w("div",NBe,[w("div",RBe,[w("div",LBe,[w("div",FBe,"¥"+ie(m(e.item.price)),1),e.item.linedPrice?(C(),A("div",BBe," ¥"+ie(m(e.item.linedPrice)),1)):G("",!0)]),e.item.stock!=null?(C(),A("div",VBe,ie(h(e.item)),1)):G("",!0)]),e.item.num?(C(),A("div",jBe,[O(c(ka),{style:{width:"100%","margin-top":"12px"},modelValue:e.item.num,"onUpdate:modelValue":_[0]||(_[0]=I=>e.item.num=I),onChange:d,min:0,max:e.item.remainingStock??1/0},null,8,["modelValue","max"])])):(C(),A("div",{key:0,onClick:l,class:"addBtn"},[w("img",{style:{width:"16px",height:"16px"},src:c(Ke)("images/widget/gain-add-black-icon.png")},null,8,zBe)]))]),r.value?(C(),ve(_Be,{key:1,onClose:_[1]||(_[1]=I=>r.value=!1),visible:r.value,onEditProduct:b,product:e.item,hasPic:e.hasPic},null,8,["visible","product","hasPic"])):G("",!0)],64))}}),WBe=Ye(UBe,[["__scopeId","data-v-c810b62d"]]),HBe=e=>(At("data-v-170b252a"),e=e(),Ot(),e),qBe=HBe(()=>w("div",{class:"title"},"商品名称(实例)",-1)),KBe={class:"answer-container"},YBe=se({__name:"CacheOption",props:{datas:[]},setup(e){const t=e;return st(()=>{console.debug(t.datas,"datas")}),(n,o)=>(C(!0),A(Ae,null,et(e.datas,a=>(C(),A("div",null,[qBe,w("div",KBe,ie(a.label)+"(数量: "+ie(a.num)+")",1)]))),256))}}),GBe=Ye(YBe,[["__scopeId","data-v-170b252a"]]),QBe={key:0},JBe=se({__name:"Gain",props:{hasPic:!1},setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=P(null),r=P([]);P([]);const s=P(!1),i=P(null),l=e,d=de("formStore"),f=P([]);Se(d,I=>{let k=0;if(I.pay_info[o.id]){console.debug(I.pay_info[o.id],"saaa"),I.pay_info[o.id].list.map(T=>{k+=T.totalPrice});const E=I.pay_info[o.id];E.totalPrice=k,o.updatePayInfo(E)}}),t&&Ir(a,f,{handle:".drag_handle",direction:"vertical",ghostClass:"ghost_row",group:{name:"gains",pull:!1},dragClass:"drag-row",animation:150,forceFallback:!0,onStart(){s.value=!0},onEnd:I=>{s.value=!1,I.oldIndex!==I.newIndex&&Xt({id:o.id,attr:"list",value:f.value})}});const p=()=>{f.value=[{productName:"商品一",productDescOpen:!1,productDesc:"",value:at(),imgs:[{name:"1.png",url:Ke("images/widget/gain-default1.png")},{}],price:1e3,isPaid:!0,num:0,linedPrice:null,stock:10},{productName:"商品二",productDescOpen:!1,productDesc:"",value:at(),imgs:[{name:"1.png",url:Ke("images/widget/gain-default2.png")},{}],price:2e3,isPaid:!0,num:0,linedPrice:null,stock:10},{productName:"商品三",productDescOpen:!1,productDesc:"",value:at(),isPaid:!0,imgs:[{name:"1.png",url:Ke("images/widget/gain-default3.png")},{}],num:0,price:3e3,linedPrice:null,stock:10}]};st(()=>{o.attrs.list?f.value=o.attrs.list:p(),Uf.on("deleteAllAnswers",()=>{r.value=[],f.value.map(I=>I.num=0),o.updateValue(r.value)}),Xt({id:o.id,attr:"list",value:g()})}),Nn(()=>{Uf.off("deleteAllAnswers")});const h=()=>{const I={productName:"商品三",productDescOpen:!1,productDesc:"",value:at(),isPaid:!0,price:3e3,linedPrice:null,stock:10};l.hasPic&&(I.imgs=[{name:"1.png",url:Ke("images/widget/gain-default3.png")}]),f.value.push(I),Xt({id:o.id,attr:"list",value:f.value})},m=async(I,k)=>{f.value[k].num=I.num,I.num>0?r.value[k]=I:r.value.splice(k,1);let E=0;r.value.map(x=>{E+=x.totalPrice});const T={trade_type:n.value?1:2,mch_config_id:gt.value.pay_setting.mch_config_id,list:r.value.flat(),totalPrice:E,type:o.type};if(n.value&&!i.value){const x=exports.globalInject.getRoute().query.state;if(x){const S=await exports.globalInject.$axios.get(`/v1/WxPlatforms/getOpenidByState?state=${x}`);i.value=S.data.result,T.openid=S.data.result}}i.value&&(T.openid=i.value),o.updateValue(r.value.flat()),gt.value.pay_setting.mch_config_id&&o.updatePayInfo(T)},b=I=>{f.value.splice(I,1),Xt({id:o.id,attr:"list",value:f.value})},g=()=>{const I=On(f.value);return I.map(k=>{let E=[];l.hasPic&&(k.imgs.map(T=>{E.push({url:T.url,name:T.name})}),k.imgs=E),k.price=k.price}),I},y=(I,k)=>{f.value[k]=I,Xt({id:o.id,attr:"list",value:g()})},_=()=>[{key:"addAppointment",label:"添加商品",icon:"fill-circle-add",callback:()=>{h()}}];return(I,k)=>(C(),A("div",null,[O(Kn),O(lo,null,{default:H(()=>[O(eo),c(o).mode=="answer"?(C(),A("div",QBe,[O(GBe,{datas:c(d).data[c(o).id]},null,8,["datas"])])):(C(),A("div",{key:1,ref_key:"dragList",ref:a,class:"optionList"},[(C(!0),A(Ae,null,et(f.value,(E,T)=>(C(),A("div",{class:B(["option-row",{option:!c(n),"mobile-option":c(n)}])},[O(WBe,{hasPic:e.hasPic,index:T,item:E,isDragging:s.value,class:B({dragging_container:s.value,"item-lf":c(t)}),onAnswer:m,onEditProduct:y,onDeleteOption:b},null,8,["hasPic","index","item","isDragging","class"])],2))),256))],512)),O(To),O(ao,{customs:_()},null,8,["customs"])]),_:1})]))}}),JN=Ye(JBe,[["__scopeId","data-v-effef445"]]),XBe={__name:"GainWithPic",setup(e){return(t,n)=>(C(),ve(JN,{hasPic:!0}))}},ZBe={__name:"GainWithoutPic",setup(e){return(t,n)=>(C(),ve(JN,{hasPic:!1}))}},eVe={title:"无图商品",desc:"",placeholder:"请输入",required:!1},tVe={title:"配图商品",desc:"",placeholder:"请输入",required:!1},LC={attrs:{...eVe},info:{name:"无图商品",icon:"gainnopic",color:"#4F57FD",vip:!1,summary:{title:"无图商品",brief:`适用于:高级版及以上
137
137
  用于无图商品的展示和销售。常用于场景:收取活动报名费、无图商品销售。`,image:Ke("images/widget/gain-withoutpic-show.png")}},component:ZBe},FC={attrs:{...tVe},info:{name:"配图商品",icon:"gainpic",color:"#4F57FD",vip:!1,summary:{title:"配图商品",brief:`适用于:高级版及以上
138
- 用于配图商品的展示和销售。常用于场景:收取课程费、配图商品销售。`,image:Ke("images/widget/gain-withpic-show.png")}},component:XBe},nVe=e=>(At("data-v-e828990a"),e=e(),Ot(),e),oVe={class:"group-title-container"},aVe=nVe(()=>w("div",{class:"line"},null,-1)),rVe=se({__name:"title",setup(e){return(t,n)=>(C(),A("div",oVe,[O(Kn),aVe,O(ao)]))}}),sVe=Ye(rVe,[["__scopeId","data-v-e828990a"]]),BC={attrs:{title:"分组标题",placeholder:"请输入分组标题",desc:"",important:!1,minLength:null,maxLength:null},info:{name:"分组标题",icon:"wenjian-wenbenwendang",summary:{title:"分组标题",brief:"用于分组展示表单内容。",image:Ke("images/widget/group-title.png")}},component:sVe},iVe={key:0,class:"text-widget-placeholder"},lVe={key:1,class:"text-widget"},uVe=se({__name:"text",props:{info:{},isEditor:{}},emits:["update:info","update:value"],setup(e,{emit:t}){const n=e,o=t,a=de("editable");de("widgetStore");const r=M(()=>({idCard:d=>d.replace(/[^0-9a-zA-Z]/g,"")})[n.info.type]),s=M({get:()=>n.info.text_value,set:l=>{r.value&&(l=r.value(l)),o("update:value",l)}}),i=()=>{o("update:info",n.info.text_value)};return(l,d)=>c(a)?(C(),A("div",iVe,ie(l.info.placeholder),1)):(C(),A("div",lVe,[O(c(Pt),{modelValue:s.value,"onUpdate:modelValue":d[0]||(d[0]=f=>s.value=f),onBlur:i,placeholder:l.info.placeholder},null,8,["modelValue","placeholder"])]))}}),gh=Ye(uVe,[["__scopeId","data-v-67fceca2"]]),cVe=e=>(At("data-v-5714ea24"),e=e(),Ot(),e),dVe={key:0},fVe={key:1},pVe=cVe(()=>w("i",{class:"iconfont icon-form-edu-select"},null,-1)),vVe=se({__name:"date",props:{info:{},isEditor:{}},emits:["update:info","update:value"],setup(e,{emit:t}){const n=de("editable");de("widgetStore");const o=P(!1),a=t,r=i=>{o.value=!1,a("update:value",i),a("update:info")},s=()=>{n||(o.value=!0)};return(i,l)=>(C(),A(Ae,null,[w("div",{class:B(["date-placeholder",{"mobile-date-placeholder":c(n)}]),onClick:s},[i.info.text_value?(C(),A("span",fVe,ie(i.info.text_value),1)):(C(),A("span",dVe,"请选择")),pVe],2),O(BN,{date:i.info.text_value,"date-type":i.info.dateType,visible:o.value,onCancel:l[0]||(l[0]=d=>o.value=!1),onConfirm:r},null,8,["date","date-type","visible"])],64))}}),hVe=Ye(vVe,[["__scopeId","data-v-5714ea24"]]),mVe={key:0,class:"textarea-widget-placeholder"},gVe={key:1,class:"textarea-widget"},bVe=se({__name:"textarea",props:{info:{},isEditor:{}},emits:["update:info"],setup(e,{emit:t}){const n=de("editable"),o=de("widgetStore"),a=e,r=t,s=()=>{r("update:info",a.info.text_value)};return(i,l)=>i.isEditor?(C(),A("div",mVe,ie(i.info.placeholder),1)):(C(),A("div",gVe,[O(c(Pt),{modelValue:i.info.text_value,"onUpdate:modelValue":l[0]||(l[0]=d=>i.info.text_value=d),type:"textarea",onBlur:s,resize:"none",placeholder:i.info.placeholder,autosize:"",disabled:c(n)&&!c(o).isSettingAnswer},null,8,["modelValue","placeholder","disabled"])]))}}),yVe=Ye(bVe,[["__scopeId","data-v-91118325"]]),_Ve={key:0,class:"number-widget-placeholder"},wVe={key:1,class:"number-widget"},$Ve=se({__name:"number",props:{info:{},isEditor:{}},emits:["update:info"],setup(e,{emit:t}){const n=de("editable"),o=de("widgetStore"),a=e,r=t,s=()=>{r("update:info",a.info.text_value)};return(i,l)=>i.isEditor?(C(),A("div",_Ve,ie(i.info.placeholder),1)):(C(),A("div",wVe,[O(c(Pt),{modelValue:i.info.text_value,"onUpdate:modelValue":l[0]||(l[0]=d=>i.info.text_value=d),type:"number",onBlur:s,placeholder:i.info.placeholder,disabled:c(n)&&!c(o).isSettingAnswer},null,8,["modelValue","placeholder","disabled"])]))}}),ZA=Ye($Ve,[["__scopeId","data-v-392d49bf"]]),XN=e=>(At("data-v-2504d77f"),e=e(),Ot(),e),CVe=["onMouseenter","onClick"],SVe=XN(()=>w("div",{class:"drag_handle"},[w("span",{class:"icon iconfont icon-form-handle-v"})],-1)),EVe=[SVe],kVe=["contenteditable","onBlur"],IVe={class:"item-value"},TVe=["onClick"],xVe=XN(()=>w("i",{class:"iconfont icon-form-shezhi"},null,-1)),AVe=se({__name:"table",props:{list:{}},emits:["update:sort","update:value","del:item"],setup(e,{emit:t}){const n=e,o=t,a=de("isMobileSize"),r=de("widgetStore"),s=de("editable"),i=P(),l=P(n.list),d=P(!1),f=P(-1);Se(()=>n.list,k=>{l.value=k});const p=k=>{switch(k){case"text":return gh;case"textarea":return yVe;case"number":return ZA;case"date":return hVe;case"idCard":return gh;case"email":return gh;case"phone":return ZA;default:return gh}};Ir(i,l,{handle:".drag_handle",direction:"vertical",ghostClass:"ghost_row",dragClass:"drag_row",group:{name:"radioList",pull:!1},animation:150,forceFallback:!0,onStart(){d.value=!0},onEnd:k=>{d.value=!1,k.oldIndex!==k.newIndex&&(r.attrs.options.items=l.value,o("update:sort",l.value))}});const h=k=>{l.value.splice(k,1),r.attrs.options.items=l.value,o("del:item",k)},m=(k,E)=>{r.attrs.options.items.forEach(T=>{T.isActive=!1}),k.isActive=!0,r.attrs.options.items[E].isActive=!0},b=(k,E,T)=>{const x=k.target.innerText;E.value=x,r.attrs.options.items[T].value=x,o("update:value",l.value)},g=k=>{f.value=k},y=()=>{f.value=-1},_=()=>{o("update:value",l.value)},I=(k,E)=>{k.text_value=E};return(k,E)=>(C(),A("div",{ref_key:"tableRef",ref:i,class:"table-container"},[(C(!0),A(Ae,null,et(l.value,(T,x)=>{var S;return C(),A("div",{class:"table-list-item",onMouseenter:D=>g(x),onMouseleave:E[1]||(E[1]=D=>y()),onClick:D=>m(T,x)},[w("div",{class:B(["item-handle",{"active-handle":c(r).isActive&&f.value===x}])},EVe,2),w("div",{class:B(["item-content",{"verify-error":((S=c(r).valueVer)==null?void 0:S.id)===T.id,"mobile-item-content":c(a)}])},[w("div",{class:B(["item-label",{"item-label-disabled":c(a)}])},[w("div",{ref_for:!0,ref:"inputRef",class:B(["label-input",{"active-input":T.isActive||f.value===x,"disabled-input":c(a)}]),contenteditable:!c(a),onBlur:D=>b(D,T,x)},ie(T.value),43,kVe)],2),w("div",IVe,[(C(),ve(Kt(p(T.type)),{isEditor:c(s),info:T,"onUpdate:info":E[0]||(E[0]=()=>_()),"onUpdate:value":D=>I(T,D),key:T},null,40,["isEditor","info","onUpdate:value"]))])],2),c(r).isActive?(C(),A("div",{key:0,class:B(["operate-btns",{"active-btns":f.value===x}])},[O(c(_o),{class:"box-item",effect:"dark",content:"删除",placement:"top"},{default:H(()=>[w("i",{class:"iconfont icon-form-jianshao2",onClick:D=>h(x)},null,8,TVe)]),_:2},1024),O(c(_o),{class:"box-item",effect:"dark",content:"设置",placement:"top"},{default:H(()=>[xVe]),_:1})],2)):G("",!0)],40,CVe)}),256))],512))}}),ZN=Ye(AVe,[["__scopeId","data-v-2504d77f"]]),OVe={key:0,class:"verify-tip"},DVe=se({__name:"BasicTable",setup(e){const t=de("isMobileSize"),n=de("widgetStore"),o=P(n.attrs.options.items),a=P(),r=P();Se(()=>n.attrs.options.items,p=>{o.value=p});const s=()=>[{key:"addOption",label:"添加字段",icon:"fill-circle-add",callback:()=>{i()}}],i=()=>{n.attrs.options.items.forEach(p=>{p.isActive=!1}),o.value.push({id:at(),type:"text",value:"名称",text_value:"",isActive:!0,placeholder:"请输入",minLength:null,maxLength:null})},l=()=>{const p=n.attrs.options.items.reduce((h,m)=>(h[m.id]={type:m.type,value:m.value,text_value:m.text_value},h),{});n.updateValue(p),n.updateValueVer()},d=p=>{const h=document.querySelector(".form-right");h&&h.contains(p.target)||n.attrs.options.items.forEach(m=>{m.isActive=!1})},f=p=>{a.value&&!a.value.contains(p.target)&&n.attrs.options.items.forEach(h=>{h.isActive=!1})};return st(()=>{r.value&&r.value.addEventListener("click",f)}),po(()=>{r.value&&r.value.removeEventListener("click",f)}),(p,h)=>{var b;const m=rl("click-away");return Et((C(),A("div",{class:"basic-table-container",ref_key:"basicTableContainer",ref:r},[w("div",{class:B({"basic-table-title-container":c(t)})},[O(Kn),(b=c(n).valueVer)!=null&&b.message&&c(t)?(C(),A("div",OVe,ie(c(n).valueVer.message),1)):G("",!0)],2),O(lo,null,{default:H(()=>[O(eo),w("div",{ref_key:"basicTableRef",ref:a},[O(ZN,{list:o.value,"onUpdate:value":l},null,8,["list"])],512),O(ao,{customs:s()},null,8,["customs"])]),_:1})])),[[m,d]])}}}),PVe=Ye(DVe,[["__scopeId","data-v-bde6816c"]]),e6=e=>(At("data-v-5949c7c1"),e=e(),Ot(),e),MVe={key:0,class:"verify-tip"},NVe={class:"dynamic-table-list"},RVe=["onClick"],LVe={class:"dynamic-table-footer"},FVe=e6(()=>w("i",{class:"iconfont icon-form-tianjia"},null,-1)),BVe=e6(()=>w("span",null,"新增一组",-1)),VVe=[FVe,BVe],zVe={key:1,class:"empty-container"},jVe=se({__name:"DynamicTable",setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=P([]),r=P(),s=P(),i=M(()=>o.attrs.max===null?!0:a.value.length<o.attrs.max),l=M(()=>n.value&&a.value.length>1);Se(()=>o.attrs.count,()=>{d()}),Se(()=>o.attrs.options.items,x=>{h()}),Se(()=>v8.value,()=>{a.value.forEach(x=>{o.attrs.options.items.forEach(S=>{const D=x.find(N=>N.id===S.id);D&&x.forEach(N=>{N.id===S.id&&Object.assign(N,{...S,text_value:D.text_value})})})})},{deep:!0});const d=()=>{const x=o.attrs.count||1,S=o.attrs.options.items||[],D=[];for(let N=0;N<x;N++){const L=JSON.parse(JSON.stringify(S));D.push(L)}a.value=D},f=x=>{a.value.splice(x,1)},p=()=>{h()},h=()=>{a.value=a.value.map(x=>o.attrs.options.items.map(S=>{const D=x.find(N=>N.id===S.id);return{...S,text_value:D.text_value}}))},m=x=>{o.attrs.options.items=x.map(S=>({...S,text_value:""}))},b=()=>[{key:"addOption",label:"添加字段",icon:"fill-circle-add",callback:()=>{g()}}],g=()=>{o.attrs.options.items.forEach(S=>{S.isActive=!1});const x={id:at(),type:"text",value:"名称",text_value:"",isActive:!0,placeholder:"请输入",minLength:null,maxLength:null};o.attrs.options.items.push(x),a.value.forEach(S=>{S.push(x)})},y=()=>{!n.value&&t||a.value.push(JSON.parse(JSON.stringify(o.attrs.options.items)))},_=x=>{o.attrs.options.items=x.map(S=>({...S,text_value:""})),a.value.forEach(S=>{S.forEach(D=>{const N=o.attrs.options.items.find(L=>L.id===D.id);D.value=N.value})}),I()},I=()=>{const x=a.value.reduce((S,D)=>{const N=D.reduce((L,F)=>(L[F.id]={type:F.type,value:F.value,text_value:F.text_value},L),{});return S.push(N),S},[]);o.updateValue(x),o.updateValueVer()},k=x=>{const S=document.querySelector(".form-right");S&&S.contains(x.target)||o.attrs.options.items.forEach(D=>{D.isActive=!1})},E=x=>{r.value&&!r.value.contains(x.target)&&o.attrs.options.items.forEach(S=>{S.isActive=!1})},T=()=>{const x=exports.globalInject.getRoute(),{form_answer:S}=x.query;if(!S)return;const N=JSON.parse(decodeURIComponent(S))[o.id];if(!N.length)return;const L=N.length||1,F=o.attrs.options.items||[],z=[];for(let j=0;j<L;j++){const X=JSON.parse(JSON.stringify(F));z.push(X)}a.value=z,a.value.forEach((j,X)=>{j.forEach(U=>{const W=N[X][U.id];W&&(U.text_value=W.text_value)})})};return st(()=>{d(),s.value&&s.value.addEventListener("click",E),T()}),po(()=>{s.value&&s.value.removeEventListener("click",E)}),(x,S)=>{var N;const D=rl("click-away");return Et((C(),A("div",{class:"dynamic-table-container",ref_key:"dynamicTableContainer",ref:s},[w("div",{class:B({"dynamic-table-title-container":c(n)})},[O(Kn),(N=c(o).valueVer)!=null&&N.message&&c(n)?(C(),A("div",MVe,ie(c(o).valueVer.message),1)):G("",!0)],2),O(lo,null,{default:H(()=>[O(eo),w("div",{class:"table-wrapper",ref_key:"dynamicTableRef",ref:r},[(C(!0),A(Ae,null,et(a.value,(L,F)=>(C(),A("div",NVe,[l.value?(C(),A("i",{key:0,class:"iconfont icon-form-guanbi del-icon",onClick:z=>f(F)},null,8,RVe)):G("",!0),O(ZN,{list:L,"onUpdate:sort":S[0]||(S[0]=z=>m(z)),"onUpdate:value":_,"onDel:item":p},null,8,["list"])]))),256)),w("div",LVe,[i.value?(C(),A("div",{key:0,class:B(["dynamic-table-add",{"mobile-table-add":c(n)}]),onClick:y},VVe,2)):G("",!0),c(o).isActive?(C(),A("div",zVe)):G("",!0)])],512),O(ao,{customs:b()},null,8,["customs"])]),_:1})])),[[D,k]])}}}),UVe=Ye(jVe,[["__scopeId","data-v-5949c7c1"]]),WVe={title:"单行文本",desc:"",required:!1,disabled:!1},HVe={title:"自增表格",placeholder:"请输入",desc:"",required:!1,disabled:!1,min:null,max:null,count:1},VC={attrs:{...WVe,title:"表格",options:{items:[{id:at(),type:"text",text_value:"",value:"姓名",isActive:!1,placeholder:"请输入",minLength:null,maxLength:null},{id:at(),type:"textarea",text_value:"",value:"手机号",isActive:!1,placeholder:"请输入",minLength:null,maxLength:null}]}},info:{name:"表格",icon:"PopUp_Form_Senior_Subform-1024",summary:{title:"表格",brief:"以表格的方式清晰收集信息。",image:Ke("images/widget/basic-table.png")}},component:PVe},zC={attrs:{...HVe,options:{items:[{id:at(),type:"text",text_value:"",value:"姓名",isActive:!1,placeholder:"请输入",minLength:null,maxLength:null},{id:at(),type:"text",text_value:"",value:"手机号",isActive:!1,placeholder:"请输入",minLength:null,maxLength:null}]}},info:{name:"自增表格",icon:"zizengbiaoge",summary:{title:"自增表格",brief:"以表格的方式清晰收集信息。支持填表人自定义数量,适用于不定量信息收集,比如家庭成员信息填写。",image:Ke("images/widget/dynamic-table.png")}},component:UVe},qVe=[{name:"身份证",fields:[{key:"name",label:"姓名",value:""},{key:"gender",label:"性别",value:""},{key:"ethnicity",label:"民族",value:""},{key:"birthDate",label:"出生日期",value:""},{key:"address",label:"住址",value:""},{key:"idNumber",label:"身份证号",value:""}]}],KVe=[{name:"银行卡",fields:[{key:"bankName",label:"银行名称",value:""},{key:"cardNumber",label:"银行卡号",value:""},{key:"cardType",label:"银行卡类型",value:""},{key:"validPeriod",label:"有效期限",value:""}]}],YVe=[{name:"行驶证",fields:[{key:"plateNumber",label:"号牌号码",value:""},{key:"vehicleType",label:"车辆类型",value:""},{key:"owner",label:"所有人",value:""},{key:"address",label:"住址",value:""},{key:"useCharacter",label:"使用性质",value:""},{key:"brandModel",label:"品牌型号",value:""},{key:"vin",label:"车辆识别代号",value:""},{key:"engineNumber",label:"发动机号码",value:""},{key:"registerDate",label:"注册日期",value:""},{key:"issueDate",label:"发证日期",value:""},{key:"sealInfo",label:"印章信息",value:""}]}],GVe=[{name:"驾驶证",fields:[{key:"licenseNumber",label:"证号",value:""},{key:"name",label:"姓名",value:""},{key:"gender",label:"性别",value:""},{key:"nationality",label:"国籍",value:""},{key:"address",label:"住址",value:""},{key:"birthDate",label:"出生日期",value:""},{key:"firstIssueDate",label:"初次领证日期",value:""},{key:"vehicleClass",label:"准驾车型",value:""},{key:"issuingAuthority",label:"发证单位",value:""},{key:"validFrom",label:"有效期开始时间",value:""},{key:"validTo",label:"有效期结束时间",value:""}]}],QVe=[{name:"营业执照",fields:[{key:"creditCode",label:"统一社会信用代码",value:""},{key:"companyName",label:"名称",value:""},{key:"companyType",label:"类型",value:""},{key:"legalRepresentative",label:"法定代表人",value:""},{key:"businessScope",label:"经营范围",value:""},{key:"registeredCapital",label:"注册资本",value:""},{key:"establishDate",label:"成立日期",value:""},{key:"businessPeriod",label:"营业期限",value:""},{key:"address",label:"住所",value:""}]}],JVe=[{name:"特种作业证",fields:[{key:"certNumber",label:"证号",value:""},{key:"name",label:"姓名",value:""},{key:"jobCategory",label:"作业类别",value:""},{key:"gender",label:"性别",value:""},{key:"operationItem",label:"操作项目",value:""},{key:"firstIssueDate",label:"初领日期",value:""},{key:"validPeriod",label:"有效期限",value:""},{key:"reviewDate",label:"应复审日期",value:""},{key:"issuingAuthority",label:"签发机关",value:""}]}],XVe=[{name:"发票基本信息",fields:[{key:"invoiceType",label:"发票类型",value:""},{key:"invoiceName",label:"发票名称",value:""},{key:"invoiceCode",label:"发票代码",value:""},{key:"invoiceNumber",label:"发票号码",value:""},{key:"passwordArea",label:"密码区",value:""},{key:"payee",label:"收款人",value:""},{key:"reviewer",label:"复核",value:""},{key:"drawer",label:"开票人",value:""}]},{name:"购买方",fields:[{key:"buyerName",label:"名称",value:""},{key:"buyerTaxId",label:"纳税人识别号",value:""},{key:"buyerAddress",label:"地址",value:""},{key:"buyerPhone",label:"电话",value:""},{key:"buyerBankAccount",label:"开户行及账号",value:""}]},{name:"销售方",fields:[{key:"sellerName",label:"名称",value:""},{key:"sellerTaxId",label:"纳税人识别号",value:""},{key:"sellerAddress",label:"地址",value:""},{key:"sellerPhone",label:"电话",value:""},{key:"sellerBankAccount",label:"开户行及账号",value:""}]},{name:"货物或应税劳务、服务",fields:[{key:"goodsName",label:"名称",value:""},{key:"goodsAmount",label:"金额",value:""},{key:"goodsTaxRate",label:"税率",value:""},{key:"goodsTaxAmount",label:"税额",value:""}]},{name:"合计",fields:[{key:"totalAmount",label:"金额合计",value:""},{key:"totalTaxAmount",label:"税额合计",value:""},{key:"totalAmountCapital",label:"价税合计(大写)",value:""},{key:"totalAmountLower",label:"价税合计(小写)",value:""}]}],ZVe=[];function fl(e,t,n,o){const a=o.map(r=>({...r,fields:r.fields.map(s=>({...s,visible:!0}))}));return{title:t,desc:n,required:!1,ocrType:e,sections:a,allowCamera:!0,allowGallery:!0}}const e9e=fl("idCard","身份证识别","请正面拍摄身份证,要求内容清晰完整,方便AI识别",qVe),t9e=fl("bankCard","银行卡识别","请拍摄银行卡正面,确保卡号清晰可见",KVe),n9e=fl("vehicleLicense","行驶证识别","请拍摄行驶证主页,确保信息完整清晰",YVe),o9e=fl("driverLicense","驾驶证识别","请拍摄驾驶证主页,确保信息完整清晰",GVe),a9e=fl("businessLicense","营业执照识别","请拍摄营业执照,确保文字清晰完整",QVe),r9e=fl("specialCertificate","特种作业证识别","请拍摄特种作业证,确保信息完整清晰",JVe),s9e=fl("vatInvoice","增值税发票识别","请拍摄增值税发票,确保票面信息清晰完整",XVe),i9e=fl("customTable","自定义表格识别","请拍摄表格图片,识别后可在字段管理中配置识别字段",ZVe),l9e=An(()=>Promise.resolve().then(()=>require("./OcrWidget-Ch2_0k8s.cjs")));function pl(e,t){return{attrs:e,info:t,component:l9e}}const u9e={name:"身份证",icon:"id-card",settingBrief:"仅支持二代身份证识别",summary:{title:"身份证",brief:"用于收集填表人身份证信息,支持修改",image:Ke("images/widget/ocr/tip-idcard.webp")},example:{title:"身份证识别",desc:"请正面拍摄身份证,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-idcard.jpg")}},c9e={name:"银行卡",icon:"bank-card",settingBrief:"支持识别银行卡,录入相关信息",summary:{title:"银行卡",brief:"用于收集填表人银行卡信息,支持修改",image:Ke("images/widget/ocr/tip-bankcard.webp")},example:{title:"银行卡识别",desc:"请正面拍摄银行卡,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-bankcard.jpg")}},d9e={name:"行驶证",icon:"vehicle",settingBrief:"支持识别行驶证相关信息",summary:{title:"行驶证",brief:"用于收集填表人行驶证信息,支持修改",image:Ke("images/widget/ocr/tip-vehicle.webp")},example:{title:"行驶证识别",desc:"请正面拍摄行驶证,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-vehicle.jpg")}},f9e={name:"驾驶证",icon:"driver-license",settingBrief:"支持识别驾驶证相关信息",summary:{title:"驾驶证",brief:"用于收集填表人驾驶证信息,支持修改",image:Ke("images/widget/ocr/tip-driver.webp")},example:{title:"驾驶证识别",desc:"请正面拍摄驾驶证,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-driver.jpg")}},p9e={name:"营业执照",icon:"business-license",settingBrief:"支持识别营业执照,录入企业信息",summary:{title:"营业执照",brief:"用于收集填表人营业执照信息,支持修改",image:Ke("images/widget/ocr/tip-business.webp")},example:{title:"营业执照识别",desc:"请正面拍摄营业执照,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-business.jpg")}},v9e={name:"特种作业证",icon:"special-certificate",settingBrief:"支持识别特种作业证,录入相关信息",summary:{title:"特种作业证",brief:"用于收集填表人特种作业证信息,支持修改",image:Ke("images/widget/ocr/tip-special.webp")},example:{title:"特种作业证识别",desc:"请正面拍摄特种作业证,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-special.jpg")}},h9e={name:"增值税发票",icon:"invoice",settingBrief:"支持识别增值税发票信息",summary:{title:"增值税发票",brief:"用于收集填表人增值税发票信息,支持修改",image:Ke("images/widget/ocr/tip-invoice.webp")},example:{title:"增值税发票识别",desc:"请正面拍摄增值税发票,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-invoice.jpg")}},m9e={name:"自定义表格",icon:"table-custom",settingBrief:"Al可从表格单据识别出重要字段",summary:{title:"自定义表格",brief:"AI可从表格单据、证件、实物照片中识别出重要字段,适用于识别内部单据、集装箱箱号等场景。",image:Ke("images/widget/ocr/tip-custom.webp")},example:{title:"自定义表格识别",desc:"请正面拍摄,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-custom.jpg")}},jC=pl(e9e,u9e),UC=pl(t9e,c9e),WC=pl(n9e,d9e),HC=pl(o9e,f9e),qC=pl(a9e,p9e),KC=pl(r9e,v9e),YC=pl(s9e,h9e),GC=pl(i9e,m9e),Hh={basicInput:lC.attrs,fillBlank:zm.attrs,emailInput:Rp.attrs,idCardInput:Lp.attrs,textarea:pC.attrs,shortAnswer:jm.attrs,phoneInput:mC.attrs,numberInput:hC.attrs,nameInput:Np.attrs,companyInput:uC.attrs,departmentInput:cC.attrs,positionInput:dC.attrs,ageInput:gC.attrs,basicSelect:SC.props,multiSelect:kC.props,businessSelect:IC.props,nationSelect:TC.props,regionSelect:xC.props,rate:FN,date:VN,basicRadio:q_e,checkbox:K_e,imgRadio:Y_e,imgCheckbox:G_e,sort:Q_e,occupationRadio:J_e,sexRadio:X_e,educationRadio:Z_e,ageRadio:e1e,file:w5e,resume:$5e,work:C5e,geolocation:I5e,mapNavigation:D5e,carousel:x5e,pageHeader:M5e,contactUs:R5e,pagination:F5e,description:GN,button:z5e,eduRadio:a1e,fillBlank2:ON.attrs,shortAnswer2:DN.attrs,numberFillBlank:bC.attrs,eduCheckbox:r1e,eduJudgement:s1e,eduImgRadio:i1e,eduImgCheckbox:l1e,eduSelect:EC.props,appoint:vC.attrs,gainWithPic:FC.attrs,gainWithoutPic:LC.attrs,groupTitle:BC.attrs,preparerNameInput:rb.attrs,preparerIdCardInput:ib.attrs,preparerPhoneInput:sb.attrs,preparerWorkIdInput:lb.attrs,watermark:DC.attrs,location:MC.attrs,checkEntry:RC.attrs,basicTable:VC.attrs,dynamicTable:zC.attrs,idCardOcr:jC.attrs,bankCardOcr:UC.attrs,vehicleLicenseOcr:WC.attrs,driverLicenseOcr:HC.attrs,businessLicenseOcr:qC.attrs,specialCertificateOcr:KC.attrs,vatInvoiceOcr:YC.attrs,customTableOcr:GC.attrs},QC={basicInput:lC.component,fillBlank:zm.component,emailInput:Rp.component,idCardInput:Lp.component,textarea:pC.component,shortAnswer:jm.component,phoneInput:mC.component,numberInput:hC.component,nameInput:Np.component,companyInput:uC.component,departmentInput:cC.component,positionInput:dC.component,ageInput:gC.component,basicSelect:SC.component,multiSelect:kC.component,businessSelect:IC.component,nationSelect:TC.component,regionSelect:xC.component,rate:X6e,date:_Re,basicRadio:Ol,checkbox:YA,imgRadio:GA,imgCheckbox:QA,sort:qLe,occupationRadio:Ol,sexRadio:Ol,educationRadio:Ol,ageRadio:Ol,file:R0,resume:R0,work:R0,geolocation:An(()=>Promise.resolve().then(()=>require("./Geolocation-C4xm2vzZ.cjs"))),mapNavigation:An(()=>Promise.resolve().then(()=>require("./MapNavigation-Bi9QBjbD.cjs"))),carousel:An(()=>Promise.resolve().then(()=>require("./Carousel-OBHfMkCa.cjs"))),pageHeader:An(()=>Promise.resolve().then(()=>require("./PageHeader-1U9LDmfs.cjs"))),contactUs:An(()=>Promise.resolve().then(()=>require("./ContactUs-D9JVf9UL.cjs"))),pagination:An(()=>Promise.resolve().then(()=>require("./Pagination-Bss8MgCh.cjs"))),description:An(()=>Promise.resolve().then(()=>require("./index-C34Ree1i.cjs"))),button:An(()=>Promise.resolve().then(()=>require("./Button-CS5A13cl.cjs"))),eduRadio:Ol,fillBlank2:zm.component,shortAnswer2:jm.component,numberFillBlank:bC.component,eduCheckbox:YA,eduJudgement:Ol,eduImgRadio:GA,eduImgCheckbox:QA,eduSelect:EC.component,appoint:vC.component,gainWithoutPic:LC.component,gainWithPic:FC.component,groupTitle:BC.component,preparerNameInput:rb.component,preparerIdCardInput:ib.component,preparerPhoneInput:sb.component,preparerWorkIdInput:lb.component,watermark:DC.component,location:MC.component,checkEntry:RC.component,basicTable:VC.component,dynamicTable:zC.component,idCardOcr:jC.component,bankCardOcr:UC.component,vehicleLicenseOcr:WC.component,driverLicenseOcr:HC.component,businessLicenseOcr:qC.component,specialCertificateOcr:KC.component,vatInvoiceOcr:YC.component,customTableOcr:GC.component},JC={nameInput:Np.info,fillBlank:zm.info,emailInput:Rp.info,idCardInput:Lp.info,businessSelect:IC.widget,companyInput:uC.info,departmentInput:cC.info,positionInput:dC.info,phoneInput:mC.info,ageInput:gC.info,educationRadio:KRe,regionSelect:xC.widget,sexRadio:qRe,ageRadio:YRe,occupationRadio:HRe,nationSelect:TC.widget,geolocation:T5e,basicRadio:WRe,checkbox:nLe,basicSelect:SC.widget,multiSelect:kC.widget,imgRadio:ALe,imgCheckbox:OLe,basicInput:lC.info,textarea:pC.info,shortAnswer:jm.info,numberInput:hC.info,date:wRe,rate:Z6e,sort:KLe,file:S5e,resume:E5e,work:k5e,carousel:A5e,mapNavigation:P5e,pageHeader:N5e,contactUs:L5e,pagination:B5e,description:j5e,button:V5e,eduRadio:GRe,fillBlank2:ON.info,shortAnswer2:DN.info,numberFillBlank:bC.info,eduCheckbox:oLe,eduJudgement:QRe,eduImgRadio:DLe,eduImgCheckbox:PLe,eduSelect:EC.widget,appoint:vC.info,gainWithoutPic:LC.info,gainWithPic:FC.info,groupTitle:BC.info,preparerNameInput:rb.info,preparerIdCardInput:ib.info,preparerPhoneInput:sb.info,preparerWorkIdInput:lb.info,watermark:DC.info,location:MC.info,checkEntry:RC.info,basicTable:VC.info,dynamicTable:zC.info,idCardOcr:jC.info,bankCardOcr:UC.info,vehicleLicenseOcr:WC.info,driverLicenseOcr:HC.info,businessLicenseOcr:qC.info,specialCertificateOcr:KC.info,vatInvoiceOcr:YC.info,customTableOcr:GC.info},Wp=e=>({id:at(),type:e,attrs:On(Hh[e])}),nt=P([]),Tc=P({}),t6=e=>{e.type==="pagination"&&nt.value.filter(n=>n.type==="pagination").length===1&&Zu("pagination",0)},Zu=(e,t)=>{const n=Wp(e);switch(console.debug(n,"sss"),e){case"contactUs":{br.value=n;break}default:!t&&t!==0?nt.value.push(n):nt.value.splice(t,0,n)}return t6(n),n},g9e=e=>{if(e.type==="pagination"){const t=nt.value.filter(n=>n.type==="pagination");t.length===1&&w1(t[0].id)}},w1=e=>{const t=nt.value.findIndex(o=>o.id===e);if(t===-1){console.warn("deleteWidget","widget not found!");return}const n=nt.value[t];nt.value.splice(t,1),g9e(n)},b9e=e=>{const t=nt.value.findIndex(o=>o.id===e);if(t===-1){console.warn("duplicateWidget","widget not found!");return}const n=JSON.parse(JSON.stringify(nt.value[t]));n.id=at(),nt.value.splice(t+1,0,n)},y9e=e=>{const t=QC[e];return t||console.error("getCompByType",`${e} component is unavailable!`),t},Io=P(On(Wp("pageHeader"))),br=P(),XC=e=>{Array.isArray(e.widgets)&&(nt.value=e.widgets.map(t=>{const n=SI(Object.keys(Hh[t.type]),Object.keys(t.attrs));n.length&&console.warn("applyWidgets",`${t.type} missing attrs: ${n.join(", ")}`);const o=SI(Object.keys(t.attrs),Object.keys(Hh[t.type]));return o.length&&console.warn("applyWidgets",`${t.type} extra attrs: ${o.join(", ")}`),{...t,attrs:{...Hh[t.type],...t.attrs}}})),Io.value={...Io.value,...e.header,attrs:{...Io.value.attrs,...e.header.attrs}},exports.globalInject.setFormName(Io.value.attrs.title),e.contactUs&&(br.value=e.contactUs)},_9e=()=>{nt.value=[],Tc.value={},Io.value=On(Wp("pageHeader")),br.value=void 0},ZC=()=>[...nt.value,Io.value,...br.value?[br.value]:[]];let n6=[],Wd={};const Hp=()=>{n6=On(ZC()),Wd=On({widgets:nt.value,header:Io.value,contactUs:br.value})},w9e=()=>{const e=ZC();return!c3(n6,e)},$9e=()=>{nt.value.splice(0,nt.value.length,...On(Wd.widgets)),Object.assign(Io.value,On(Wd.header)),br.value?Object.assign(br.value,On(Wd.contactUs)):br.value=On(Wd.contactUs)},o6=e=>{const t={};for(const n of e)t[n.id]=a6(n);return t},a6=e=>{switch(e.type){case"fillBlank2":case"shortAnswer2":return S9e(e.attrs);case"numberFillBlank":return E9e(e.attrs);case"eduRadio":case"eduCheckbox":case"eduJudgement":case"eduImgRadio":case"eduImgCheckbox":case"eduSelect":return C9e(e.attrs);default:return{}}};function C9e(e){const t={};return Object.entries(e).forEach(([n,o])=>{switch(n){case"standard":{if(!o.length){t[n]="请输入正确答案";break}if(e.scoreType==="cumulative"&&o.some(a=>typeof a.mark!="number")){t[n]="请输入正确分数";break}if(e.scoreType==="multiple"&&(o.some(a=>typeof a.mark!="number")||o.length!==(e.list||e.options).length)){t[n]="请输入正确分数";break}break}case"score":{typeof o!="number"&&(t[n]="请输入正确分数");break}}}),t}const S9e=e=>{const t={};return Object.entries(e).forEach(([n,o])=>{switch(n){case"standard":{o!=null&&o.length||(t[n]="请输入正确答案");break}case"score":{typeof o!="number"&&(t[n]="请输入正确分数");break}}}),t},E9e=e=>{const t={};return Object.entries(e).forEach(([n,o])=>{switch(n){case"standard":{typeof o!="number"&&(t[n]="请输入正确答案");break}case"score":{typeof o!="number"&&(t[n]="请输入正确分数");break}}}),t},k9e=1,r6=e=>e.map(t=>{var a;if(!fu.types.includes(t.type))return t;const n=(a=t.attrs)==null?void 0:a.sections;if(!n||!Array.isArray(n))return t;const o=n.map(r=>({...r,fields:(r.fields||[]).filter(s=>s.visible!==!1&&s.label)})).filter(r=>r.fields.length>0);return{...t,attrs:{...t.attrs,sections:o}}}),I9e=async()=>{const e={eacb:exports.globalInject.getToken(),name:Io.value.attrs.title,widgets:r6(nt.value),setting:tS(),version:k9e,extend:nS(),header:Io.value,contact_us:br.value,scene_id:xa(),parent_id:exports.globalInject.getRoute().query.folderId??0},{data:t}=await exports.globalInject.$axios.post("/v2/form/create",e);return t},T9e=async e=>{const t={id:e,eacb:exports.globalInject.getToken(),name:Io.value.attrs.title,widgets:r6(nt.value),setting:tS(),extend:nS(),header:Io.value,contact_us:br.value},{data:n}=await exports.globalInject.$axios.post("/v2/form/update",t);return n},x9e=()=>{Tc.value=o6(nt.value),Object.entries(Tc.value).forEach(([e,t])=>{const n=Object.keys(t)[0];if(n)throw zf(e),ht.error(t[n]),new Error(`widget(${e}) ${n} is invalid`)})},eS=async e=>{await Ube(500),x9e();try{const t=exports.globalInject.getFormId(),n=t?await T9e(t):await I9e(),{status:o,result:a}=n;return Hp(),Xc(),!t&&(a!=null&&a.form_id)&&await exports.globalInject.replaceFormId(a.form_id),$a.value=(a==null?void 0:a.short_url)??"",Ff.value=(a==null?void 0:a.render_url)??"",o!==1||!(a!=null&&a.url)?ht.error("保存失败"):(e&&e(),ht.success("保存成功")),n}catch(t){throw ht.error("保存失败"),t}},s6=async()=>{const t={id:exports.globalInject.getFormId(),eacb:exports.globalInject.getToken(),setting:tS(),extend:nS()},{data:{status:n,result:o}}=await exports.globalInject.$axios.post("/v2/form/updateSetting",t);return n!==1?(console.error("updateSetting","status is not success!"),null):(Xc(),o)},mb=e=>{var t,n;w$(e.scene_id),XC({widgets:e.widgets,header:e.header,contactUs:e.contact_us}),owe({create_uid:e.create_uid,short_url:e.short_url,render_url:e.render_url,fill_history:e.fill_history??0,unable_submit:e.unable_submit??!1,now_datetime:e.now_datetime??null,next_time:e.next_time??-1}),I$({setting:e.setting,extend:e.extend}),KM(((n=(t=e.setting)==null?void 0:t.details)==null?void 0:n.widget_common_setting)??{})},i6=async(e,t)=>{const n=t??exports.globalInject.getToken(),{data:o}=await exports.globalInject.$axios.get(`/v2/form/info?id=${e}&eacb=${n}`),{status:a,result:r,msg:s}=o;return a!==1?ht.error(s||"获取表单失败"):mb(r),Hp(),Xc(),o},l6=async e=>{var r;const{data:t}=await exports.globalInject.$axios.get(`/v2/form/getTplInfo?id=${e}`),{status:n,result:o,msg:a}=t;if(n!==1)ht.error(a||"获取表单模板失败");else{w$(o.scene_id),XC({widgets:JSON.parse(o.widgets),header:JSON.parse(o.header),contactUs:o.contact_us?JSON.parse(o.contact_us):void 0});const s=JSON.parse(o.setting),i=o.extend?JSON.parse(o.extend):null;I$({setting:s,extend:i}),KM(((r=s==null?void 0:s.details)==null?void 0:r.widget_common_setting)??{}),F$()}return Hp(),Xc(),o},A9e=()=>{const e=exports.globalInject.getRoute();w$(parseInt(e.query.scene));const t=Wp("pageHeader"),n={title:C$(),desc:WM()};XC({widgets:[],header:{...t,attrs:{...t.attrs,...n}},contactUs:void 0}),gye(),pye(),F$(),Hp(),Xc()},u6=async e=>{var d,f,p,h;const t=(f=(d=exports.globalInject).getFormId)==null?void 0:f.call(d),n=(h=(p=exports.globalInject).getCodeId)==null?void 0:h.call(p),{query:{vhcode:o,sign:a}}=exports.globalInject.getRoute(),{data:r}=await exports.globalInject.$axios.get(`/v2/form/getInfoByLandingPage?id=${t}&vhcode=${o}&sign=${a}&deviceId=${S$(t)}&link_id=${n}&unionid=${e}`),{status:s,result:i,msg:l}=r;return s!==1?ht.error(l||"获取表单失败"):mb(i),r},O9e=e=>{const t=[];return["preparerNameInput","preparerPhoneInput","preparerIdCardInput","preparerWorkIdInput","watermark"].forEach(o=>{var r;const a=nt.value.find(s=>s.type===o);a&&t.push({id:a.id,type:a.type,value:((r=e.data[a.id])==null?void 0:r.value)||""})}),t},D9e=async e=>{const t=Math.floor(Date.now()/1e3),n=t-Math.floor(performance.now()/1e3),o=O9e(e),a={form_id:exports.globalInject.getFormId(),link_id:exports.globalInject.getCodeId(),answer:e.data,pay_info:e.pay_info,cancel_order_num:e.cancel_order_num,attachment:UM(e.data),meta_info:{answerInfo:{endTime:t,startTime:n},userInfo:{}},source:exports.globalInject.getRoute().query.source,extend_type:o};e!=null&&e.cancel_order_num&&(a.cancel_order_num=e.cancel_order_num);const r=localStorage.getItem("authInfo");r&&(a.meta_info.userInfo=JSON.parse(r)),console.debug(a,"params");const s=S$(exports.globalInject.getFormId()),{data:i}=await exports.globalInject.$axios.post("/v2/form/answer",a,{headers:{deviceid:s}});if(i.status===4013){ht.error(i.msg);return}return i.status!==1&&console.error("submitFormData","status is not success!"),i},P9e=async e=>{const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.post("/v2/form/uploadAnswerFile",e);if(t!==1)throw console.error("PostUploadAnswerFile","status is not success!"),new Error(o);return n},M9e=async e=>{const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/getUploadLimit?uid=${e}`);if(t!==1)throw console.error("PostUploadAnswerFile","status is not success!"),new Error(o);return n},tS=()=>({switch:gt.value.switch,crown_setting:gt.value.crown_setting,test_setting:gt.value.test_setting,pay_setting:gt.value.pay_setting,details:{...gt.value.details,widget_common_setting:Sr.value}}),nS=()=>{const e=gt.value,{valid_start_time:t,valid_end_time:n}=e;return{valid_start_time:t===-1?-1:Math.round(t/1e3),valid_end_time:n===-1?-1:Math.round(n/1e3)}},N9e=async e=>{const{data:t}=await exports.globalInject.$axios.get(`/v2/form/infoExplain?id=${e}`),{status:n,result:o,msg:a}=t;return n!==1?ht.error(a||"获取表单失败"):mb(o),t},R9e=async e=>{const{data:t}=await exports.globalInject.$axios.get(`/v2/form/answerDetailExplain?answer_id=${e}`),{status:n,msg:o}=t;return n!==1&&ht.error(o||"获取数据失败"),t},L9e=async({answer:e,form_id:t,fake_id:n})=>{let o={answer:e,attachment:UM(e),form_id:window.btoa(t),fake_id:window.btoa(n)};const{data:a}=await exports.globalInject.$axios.post("/v2/form/answerEdit",o),{status:r,msg:s}=a;return r!==1&&ht.error(s||"修改数据失败"),a};async function F9e(e,t){const{data:n}=await exports.globalInject.$axios.get(`/v2/form/getOpenSearchChain?chain=${e}&password=${t}`),{status:o,msg:a,result:r}=n;return{status:o,msg:a,result:r}}async function B9e(e){const{data:{status:t,msg:n}}=await exports.globalInject.$axios.post("/v2/form/createOpenSearch",e);t!==1&&ht.error(n||"设置失败")}async function V9e(e){const{data:{status:t,msg:n}}=await exports.globalInject.$axios.post("/v2/form/editOpenSearch",e);t!==1&&ht.error(n||"设置失败")}async function z9e(e){const{data:{status:t,msg:n}}=await exports.globalInject.$axios.post("/v2/form/delOpenSearch",e);t!==1?ht.error(n||"设置失败"):ht.success("删除成功")}async function j9e(e){const{data:{status:t,msg:n,result:o}}=await exports.globalInject.$axios.post("/v2/form/switchOpenSearchStatus",e);return t!==1&&ht.error(n||"设置失败"),o}async function U9e(){const{data:{status:e,result:t,msg:n}}=await exports.globalInject.$axios.get(`/v2/form/getOpenSearchList?eacb=${exports.globalInject.getToken()}&form_id=${exports.globalInject.getFormId()}`);return e!==1?(ht.error(n||"获取数据失败"),[]):t}async function W9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/getOpenSearchWidgets?id=${e}`);return t!==1?(ht.error(o||"获取数据失败"),{status:t,result:n,msg:o}):{status:t,result:n,msg:o}}async function H9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.post("/v2/form/source/add",{eacb:exports.globalInject.getToken(),form_id:exports.globalInject.getFormId(),source:e});return t!==1?(ht.error(o||"添加失败"),{status:t,result:n,msg:o}):{status:t,result:n,msg:o}}async function q9e(){const{data:{status:e,result:t,msg:n}}=await exports.globalInject.$axios.get(`/v2/form/source/list?eacb=${exports.globalInject.getToken()}&form_id=${exports.globalInject.getFormId()}`);return e!==1?(ht.error(n||"获取数据失败"),{status:e,result:t,msg:n}):{status:e,result:t,msg:n}}async function K9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.post("/v2/form/source/del",{eacb:exports.globalInject.getToken(),form_id:exports.globalInject.getFormId(),id:e});return t!==1?(ht.error(o||"删除失败"),{status:t,result:n,msg:o}):{status:t,result:n,msg:o}}async function Y9e(e){const t={eacb:exports.globalInject.getToken(),url:e,title:""},{data:{status:n,result:o,msg:a}}=await exports.globalInject.$axios.post("/v2/form/link/add",t);return console.log("status, result, msg: ",n,o,a),n===1?(ht.success("设置成功"),{status:n,url:o.url,id:o.id}):(ht.error(a||"设置失败"),{status:n,url:"",id:""})}async function c6(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/link/one?id=${e}`);return{status:t,result:n,msg:o}}async function G9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.post("/v2/form/cancelAppointment",e);return t}async function Q9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/getAnswerListByD?form_id=${e.form_id}&deviceid=${e.deviceid}`);return n}async function d6(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/answerDetailExplain?answer_id=${e.answer_id}`);return n}async function J9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/getAppointmentTempUse?eacb=${exports.globalInject.getToken()}&type=${e}`);return n}async function X9e(){const t=exports.globalInject.getRoute().query.short;console.log("short: ",t);const{data:{status:n,result:o,msg:a}}=await exports.globalInject.$axios.get(`/wx/j/viewForm?q=${t}`);return o}const Z9e=()=>{if(O$())return e7e()},e7e=()=>new Promise(e=>{const{showConfirm:t}=ul();t({title:"表单未保存",content:"当前编辑内容未保存,离开当前页面前是否需要保存?",confirmText:"保存",cancelText:"不保存",isNew:!0,type:"warn",onConfirm:()=>{eS().then(()=>{e(!0)})},onCancel:()=>{e(!1)}})}),t7e=(e="取消")=>new Promise(t=>{const{showConfirm:n}=ul();n({title:"表单未保存",content:"当前编辑内容未保存,离开当前页面前是否需要保存?",confirmText:"保存",cancelText:e,isNew:!0,type:"warn",onConfirm:()=>{t(!0)},onCancel:()=>{t(!1)}})}),Ld=sN(),oS={on(e,t){Ld.on(e,t)},off(e,t){Ld.off(e,t)},emit(e,t){Ld.emit(e,t)},clear(){Ld.all.clear()},raw:Ld};var sd={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}},vl={},n7e=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},f6={},Qa={};let aS;const o7e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Qa.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};Qa.getSymbolTotalCodewords=function(t){return o7e[t]};Qa.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Qa.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');aS=t};Qa.isKanjiModeEnabled=function(){return typeof aS<"u"};Qa.toSJIS=function(t){return aS(t)};var gb={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},e.from=function(o,a){if(e.isValid(o))return o;try{return t(o)}catch{return a}}})(gb);function p6(){this.buffer=[],this.length=0}p6.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var a7e=p6;function qp(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}qp.prototype.set=function(e,t,n,o){const a=e*this.size+t;this.data[a]=n,o&&(this.reservedBit[a]=!0)};qp.prototype.get=function(e,t){return this.data[e*this.size+t]};qp.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};qp.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var r7e=qp,v6={};(function(e){const t=Qa.getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const a=Math.floor(o/7)+2,r=t(o),s=r===145?26:Math.ceil((r-13)/(2*a-2))*2,i=[r-7];for(let l=1;l<a-1;l++)i[l]=i[l-1]-s;return i.push(6),i.reverse()},e.getPositions=function(o){const a=[],r=e.getRowColCoords(o),s=r.length;for(let i=0;i<s;i++)for(let l=0;l<s;l++)i===0&&l===0||i===0&&l===s-1||i===s-1&&l===0||a.push([r[i],r[l]]);return a}})(v6);var h6={};const s7e=Qa.getSymbolSize,eO=7;h6.getPositions=function(t){const n=s7e(t);return[[0,0],[n-eO,0],[0,n-eO]]};var m6={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(a){return a!=null&&a!==""&&!isNaN(a)&&a>=0&&a<=7},e.from=function(a){return e.isValid(a)?parseInt(a,10):void 0},e.getPenaltyN1=function(a){const r=a.size;let s=0,i=0,l=0,d=null,f=null;for(let p=0;p<r;p++){i=l=0,d=f=null;for(let h=0;h<r;h++){let m=a.get(p,h);m===d?i++:(i>=5&&(s+=t.N1+(i-5)),d=m,i=1),m=a.get(h,p),m===f?l++:(l>=5&&(s+=t.N1+(l-5)),f=m,l=1)}i>=5&&(s+=t.N1+(i-5)),l>=5&&(s+=t.N1+(l-5))}return s},e.getPenaltyN2=function(a){const r=a.size;let s=0;for(let i=0;i<r-1;i++)for(let l=0;l<r-1;l++){const d=a.get(i,l)+a.get(i,l+1)+a.get(i+1,l)+a.get(i+1,l+1);(d===4||d===0)&&s++}return s*t.N2},e.getPenaltyN3=function(a){const r=a.size;let s=0,i=0,l=0;for(let d=0;d<r;d++){i=l=0;for(let f=0;f<r;f++)i=i<<1&2047|a.get(d,f),f>=10&&(i===1488||i===93)&&s++,l=l<<1&2047|a.get(f,d),f>=10&&(l===1488||l===93)&&s++}return s*t.N3},e.getPenaltyN4=function(a){let r=0;const s=a.data.length;for(let l=0;l<s;l++)r+=a.data[l];return Math.abs(Math.ceil(r*100/s/5)-10)*t.N4};function n(o,a,r){switch(o){case e.Patterns.PATTERN000:return(a+r)%2===0;case e.Patterns.PATTERN001:return a%2===0;case e.Patterns.PATTERN010:return r%3===0;case e.Patterns.PATTERN011:return(a+r)%3===0;case e.Patterns.PATTERN100:return(Math.floor(a/2)+Math.floor(r/3))%2===0;case e.Patterns.PATTERN101:return a*r%2+a*r%3===0;case e.Patterns.PATTERN110:return(a*r%2+a*r%3)%2===0;case e.Patterns.PATTERN111:return(a*r%3+(a+r)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}e.applyMask=function(a,r){const s=r.size;for(let i=0;i<s;i++)for(let l=0;l<s;l++)r.isReserved(l,i)||r.xor(l,i,n(a,l,i))},e.getBestMask=function(a,r){const s=Object.keys(e.Patterns).length;let i=0,l=1/0;for(let d=0;d<s;d++){r(d),e.applyMask(d,a);const f=e.getPenaltyN1(a)+e.getPenaltyN2(a)+e.getPenaltyN3(a)+e.getPenaltyN4(a);e.applyMask(d,a),f<l&&(l=f,i=d)}return i}})(m6);var bb={};const zi=gb,bh=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],yh=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];bb.getBlocksCount=function(t,n){switch(n){case zi.L:return bh[(t-1)*4+0];case zi.M:return bh[(t-1)*4+1];case zi.Q:return bh[(t-1)*4+2];case zi.H:return bh[(t-1)*4+3];default:return}};bb.getTotalCodewordsCount=function(t,n){switch(n){case zi.L:return yh[(t-1)*4+0];case zi.M:return yh[(t-1)*4+1];case zi.Q:return yh[(t-1)*4+2];case zi.H:return yh[(t-1)*4+3];default:return}};var g6={},yb={};const vf=new Uint8Array(512),Wm=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)vf[n]=t,Wm[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)vf[n]=vf[n-255]})();yb.log=function(t){if(t<1)throw new Error("log("+t+")");return Wm[t]};yb.exp=function(t){return vf[t]};yb.mul=function(t,n){return t===0||n===0?0:vf[Wm[t]+Wm[n]]};(function(e){const t=yb;e.mul=function(o,a){const r=new Uint8Array(o.length+a.length-1);for(let s=0;s<o.length;s++)for(let i=0;i<a.length;i++)r[s+i]^=t.mul(o[s],a[i]);return r},e.mod=function(o,a){let r=new Uint8Array(o);for(;r.length-a.length>=0;){const s=r[0];for(let l=0;l<a.length;l++)r[l]^=t.mul(a[l],s);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(o){let a=new Uint8Array([1]);for(let r=0;r<o;r++)a=e.mul(a,new Uint8Array([1,t.exp(r)]));return a}})(g6);const b6=g6;function rS(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}rS.prototype.initialize=function(t){this.degree=t,this.genPoly=b6.generateECPolynomial(this.degree)};rS.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const o=b6.mod(n,this.genPoly),a=this.degree-o.length;if(a>0){const r=new Uint8Array(this.degree);return r.set(o,a),r}return o};var i7e=rS,y6={},hl={},sS={};sS.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var ks={};const _6="[0-9]+",l7e="[A-Z $%*+\\-./:]+";let qf="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";qf=qf.replace(/u/g,"\\u");const u7e="(?:(?![A-Z0-9 $%*+\\-./:]|"+qf+`)(?:.|[\r
138
+ 用于配图商品的展示和销售。常用于场景:收取课程费、配图商品销售。`,image:Ke("images/widget/gain-withpic-show.png")}},component:XBe},nVe=e=>(At("data-v-e828990a"),e=e(),Ot(),e),oVe={class:"group-title-container"},aVe=nVe(()=>w("div",{class:"line"},null,-1)),rVe=se({__name:"title",setup(e){return(t,n)=>(C(),A("div",oVe,[O(Kn),aVe,O(ao)]))}}),sVe=Ye(rVe,[["__scopeId","data-v-e828990a"]]),BC={attrs:{title:"分组标题",placeholder:"请输入分组标题",desc:"",important:!1,minLength:null,maxLength:null},info:{name:"分组标题",icon:"wenjian-wenbenwendang",summary:{title:"分组标题",brief:"用于分组展示表单内容。",image:Ke("images/widget/group-title.png")}},component:sVe},iVe={key:0,class:"text-widget-placeholder"},lVe={key:1,class:"text-widget"},uVe=se({__name:"text",props:{info:{},isEditor:{}},emits:["update:info","update:value"],setup(e,{emit:t}){const n=e,o=t,a=de("editable");de("widgetStore");const r=M(()=>({idCard:d=>d.replace(/[^0-9a-zA-Z]/g,"")})[n.info.type]),s=M({get:()=>n.info.text_value,set:l=>{r.value&&(l=r.value(l)),o("update:value",l)}}),i=()=>{o("update:info",n.info.text_value)};return(l,d)=>c(a)?(C(),A("div",iVe,ie(l.info.placeholder),1)):(C(),A("div",lVe,[O(c(Pt),{modelValue:s.value,"onUpdate:modelValue":d[0]||(d[0]=f=>s.value=f),onBlur:i,placeholder:l.info.placeholder},null,8,["modelValue","placeholder"])]))}}),gh=Ye(uVe,[["__scopeId","data-v-67fceca2"]]),cVe=e=>(At("data-v-5714ea24"),e=e(),Ot(),e),dVe={key:0},fVe={key:1},pVe=cVe(()=>w("i",{class:"iconfont icon-form-edu-select"},null,-1)),vVe=se({__name:"date",props:{info:{},isEditor:{}},emits:["update:info","update:value"],setup(e,{emit:t}){const n=de("editable");de("widgetStore");const o=P(!1),a=t,r=i=>{o.value=!1,a("update:value",i),a("update:info")},s=()=>{n||(o.value=!0)};return(i,l)=>(C(),A(Ae,null,[w("div",{class:B(["date-placeholder",{"mobile-date-placeholder":c(n)}]),onClick:s},[i.info.text_value?(C(),A("span",fVe,ie(i.info.text_value),1)):(C(),A("span",dVe,"请选择")),pVe],2),O(BN,{date:i.info.text_value,"date-type":i.info.dateType,visible:o.value,onCancel:l[0]||(l[0]=d=>o.value=!1),onConfirm:r},null,8,["date","date-type","visible"])],64))}}),hVe=Ye(vVe,[["__scopeId","data-v-5714ea24"]]),mVe={key:0,class:"textarea-widget-placeholder"},gVe={key:1,class:"textarea-widget"},bVe=se({__name:"textarea",props:{info:{},isEditor:{}},emits:["update:info"],setup(e,{emit:t}){const n=de("editable"),o=de("widgetStore"),a=e,r=t,s=()=>{r("update:info",a.info.text_value)};return(i,l)=>i.isEditor?(C(),A("div",mVe,ie(i.info.placeholder),1)):(C(),A("div",gVe,[O(c(Pt),{modelValue:i.info.text_value,"onUpdate:modelValue":l[0]||(l[0]=d=>i.info.text_value=d),type:"textarea",onBlur:s,resize:"none",placeholder:i.info.placeholder,autosize:"",disabled:c(n)&&!c(o).isSettingAnswer},null,8,["modelValue","placeholder","disabled"])]))}}),yVe=Ye(bVe,[["__scopeId","data-v-91118325"]]),_Ve={key:0,class:"number-widget-placeholder"},wVe={key:1,class:"number-widget"},$Ve=se({__name:"number",props:{info:{},isEditor:{}},emits:["update:info"],setup(e,{emit:t}){const n=de("editable"),o=de("widgetStore"),a=e,r=t,s=()=>{r("update:info",a.info.text_value)};return(i,l)=>i.isEditor?(C(),A("div",_Ve,ie(i.info.placeholder),1)):(C(),A("div",wVe,[O(c(Pt),{modelValue:i.info.text_value,"onUpdate:modelValue":l[0]||(l[0]=d=>i.info.text_value=d),type:"number",onBlur:s,placeholder:i.info.placeholder,disabled:c(n)&&!c(o).isSettingAnswer},null,8,["modelValue","placeholder","disabled"])]))}}),ZA=Ye($Ve,[["__scopeId","data-v-392d49bf"]]),XN=e=>(At("data-v-2504d77f"),e=e(),Ot(),e),CVe=["onMouseenter","onClick"],SVe=XN(()=>w("div",{class:"drag_handle"},[w("span",{class:"icon iconfont icon-form-handle-v"})],-1)),EVe=[SVe],kVe=["contenteditable","onBlur"],IVe={class:"item-value"},TVe=["onClick"],xVe=XN(()=>w("i",{class:"iconfont icon-form-shezhi"},null,-1)),AVe=se({__name:"table",props:{list:{}},emits:["update:sort","update:value","del:item"],setup(e,{emit:t}){const n=e,o=t,a=de("isMobileSize"),r=de("widgetStore"),s=de("editable"),i=P(),l=P(n.list),d=P(!1),f=P(-1);Se(()=>n.list,k=>{l.value=k});const p=k=>{switch(k){case"text":return gh;case"textarea":return yVe;case"number":return ZA;case"date":return hVe;case"idCard":return gh;case"email":return gh;case"phone":return ZA;default:return gh}};Ir(i,l,{handle:".drag_handle",direction:"vertical",ghostClass:"ghost_row",dragClass:"drag_row",group:{name:"radioList",pull:!1},animation:150,forceFallback:!0,onStart(){d.value=!0},onEnd:k=>{d.value=!1,k.oldIndex!==k.newIndex&&(r.attrs.options.items=l.value,o("update:sort",l.value))}});const h=k=>{l.value.splice(k,1),r.attrs.options.items=l.value,o("del:item",k)},m=(k,E)=>{r.attrs.options.items.forEach(T=>{T.isActive=!1}),k.isActive=!0,r.attrs.options.items[E].isActive=!0},b=(k,E,T)=>{const x=k.target.innerText;E.value=x,r.attrs.options.items[T].value=x,o("update:value",l.value)},g=k=>{f.value=k},y=()=>{f.value=-1},_=()=>{o("update:value",l.value)},I=(k,E)=>{k.text_value=E};return(k,E)=>(C(),A("div",{ref_key:"tableRef",ref:i,class:"table-container"},[(C(!0),A(Ae,null,et(l.value,(T,x)=>{var S;return C(),A("div",{class:"table-list-item",onMouseenter:D=>g(x),onMouseleave:E[1]||(E[1]=D=>y()),onClick:D=>m(T,x)},[w("div",{class:B(["item-handle",{"active-handle":c(r).isActive&&f.value===x}])},EVe,2),w("div",{class:B(["item-content",{"verify-error":((S=c(r).valueVer)==null?void 0:S.id)===T.id,"mobile-item-content":c(a)}])},[w("div",{class:B(["item-label",{"item-label-disabled":c(a)}])},[w("div",{ref_for:!0,ref:"inputRef",class:B(["label-input",{"active-input":T.isActive||f.value===x,"disabled-input":c(a)}]),contenteditable:!c(a),onBlur:D=>b(D,T,x)},ie(T.value),43,kVe)],2),w("div",IVe,[(C(),ve(Kt(p(T.type)),{isEditor:c(s),info:T,"onUpdate:info":E[0]||(E[0]=()=>_()),"onUpdate:value":D=>I(T,D),key:T},null,40,["isEditor","info","onUpdate:value"]))])],2),c(r).isActive?(C(),A("div",{key:0,class:B(["operate-btns",{"active-btns":f.value===x}])},[O(c(_o),{class:"box-item",effect:"dark",content:"删除",placement:"top"},{default:H(()=>[w("i",{class:"iconfont icon-form-jianshao2",onClick:D=>h(x)},null,8,TVe)]),_:2},1024),O(c(_o),{class:"box-item",effect:"dark",content:"设置",placement:"top"},{default:H(()=>[xVe]),_:1})],2)):G("",!0)],40,CVe)}),256))],512))}}),ZN=Ye(AVe,[["__scopeId","data-v-2504d77f"]]),OVe={key:0,class:"verify-tip"},DVe=se({__name:"BasicTable",setup(e){const t=de("isMobileSize"),n=de("widgetStore"),o=P(n.attrs.options.items),a=P(),r=P();Se(()=>n.attrs.options.items,p=>{o.value=p});const s=()=>[{key:"addOption",label:"添加字段",icon:"fill-circle-add",callback:()=>{i()}}],i=()=>{n.attrs.options.items.forEach(p=>{p.isActive=!1}),o.value.push({id:at(),type:"text",value:"名称",text_value:"",isActive:!0,placeholder:"请输入",minLength:null,maxLength:null})},l=()=>{const p=n.attrs.options.items.reduce((h,m)=>(h[m.id]={type:m.type,value:m.value,text_value:m.text_value},h),{});n.updateValue(p),n.updateValueVer()},d=p=>{const h=document.querySelector(".form-right");h&&h.contains(p.target)||n.attrs.options.items.forEach(m=>{m.isActive=!1})},f=p=>{a.value&&!a.value.contains(p.target)&&n.attrs.options.items.forEach(h=>{h.isActive=!1})};return st(()=>{r.value&&r.value.addEventListener("click",f)}),po(()=>{r.value&&r.value.removeEventListener("click",f)}),(p,h)=>{var b;const m=rl("click-away");return Et((C(),A("div",{class:"basic-table-container",ref_key:"basicTableContainer",ref:r},[w("div",{class:B({"basic-table-title-container":c(t)})},[O(Kn),(b=c(n).valueVer)!=null&&b.message&&c(t)?(C(),A("div",OVe,ie(c(n).valueVer.message),1)):G("",!0)],2),O(lo,null,{default:H(()=>[O(eo),w("div",{ref_key:"basicTableRef",ref:a},[O(ZN,{list:o.value,"onUpdate:value":l},null,8,["list"])],512),O(ao,{customs:s()},null,8,["customs"])]),_:1})])),[[m,d]])}}}),PVe=Ye(DVe,[["__scopeId","data-v-bde6816c"]]),e6=e=>(At("data-v-5949c7c1"),e=e(),Ot(),e),MVe={key:0,class:"verify-tip"},NVe={class:"dynamic-table-list"},RVe=["onClick"],LVe={class:"dynamic-table-footer"},FVe=e6(()=>w("i",{class:"iconfont icon-form-tianjia"},null,-1)),BVe=e6(()=>w("span",null,"新增一组",-1)),VVe=[FVe,BVe],zVe={key:1,class:"empty-container"},jVe=se({__name:"DynamicTable",setup(e){const t=de("editable"),n=de("isMobileSize"),o=de("widgetStore"),a=P([]),r=P(),s=P(),i=M(()=>o.attrs.max===null?!0:a.value.length<o.attrs.max),l=M(()=>n.value&&a.value.length>1);Se(()=>o.attrs.count,()=>{d()}),Se(()=>o.attrs.options.items,x=>{h()}),Se(()=>v8.value,()=>{a.value.forEach(x=>{o.attrs.options.items.forEach(S=>{const D=x.find(N=>N.id===S.id);D&&x.forEach(N=>{N.id===S.id&&Object.assign(N,{...S,text_value:D.text_value})})})})},{deep:!0});const d=()=>{const x=o.attrs.count||1,S=o.attrs.options.items||[],D=[];for(let N=0;N<x;N++){const L=JSON.parse(JSON.stringify(S));D.push(L)}a.value=D},f=x=>{a.value.splice(x,1)},p=()=>{h()},h=()=>{a.value=a.value.map(x=>o.attrs.options.items.map(S=>{const D=x.find(N=>N.id===S.id);return{...S,text_value:D.text_value}}))},m=x=>{o.attrs.options.items=x.map(S=>({...S,text_value:""}))},b=()=>[{key:"addOption",label:"添加字段",icon:"fill-circle-add",callback:()=>{g()}}],g=()=>{o.attrs.options.items.forEach(S=>{S.isActive=!1});const x={id:at(),type:"text",value:"名称",text_value:"",isActive:!0,placeholder:"请输入",minLength:null,maxLength:null};o.attrs.options.items.push(x),a.value.forEach(S=>{S.push(x)})},y=()=>{!n.value&&t||a.value.push(JSON.parse(JSON.stringify(o.attrs.options.items)))},_=x=>{o.attrs.options.items=x.map(S=>({...S,text_value:""})),a.value.forEach(S=>{S.forEach(D=>{const N=o.attrs.options.items.find(L=>L.id===D.id);D.value=N.value})}),I()},I=()=>{const x=a.value.reduce((S,D)=>{const N=D.reduce((L,F)=>(L[F.id]={type:F.type,value:F.value,text_value:F.text_value},L),{});return S.push(N),S},[]);o.updateValue(x),o.updateValueVer()},k=x=>{const S=document.querySelector(".form-right");S&&S.contains(x.target)||o.attrs.options.items.forEach(D=>{D.isActive=!1})},E=x=>{r.value&&!r.value.contains(x.target)&&o.attrs.options.items.forEach(S=>{S.isActive=!1})},T=()=>{const x=exports.globalInject.getRoute(),{form_answer:S}=x.query;if(!S)return;const N=JSON.parse(decodeURIComponent(S))[o.id];if(!N.length)return;const L=N.length||1,F=o.attrs.options.items||[],z=[];for(let j=0;j<L;j++){const X=JSON.parse(JSON.stringify(F));z.push(X)}a.value=z,a.value.forEach((j,X)=>{j.forEach(U=>{const W=N[X][U.id];W&&(U.text_value=W.text_value)})})};return st(()=>{d(),s.value&&s.value.addEventListener("click",E),T()}),po(()=>{s.value&&s.value.removeEventListener("click",E)}),(x,S)=>{var N;const D=rl("click-away");return Et((C(),A("div",{class:"dynamic-table-container",ref_key:"dynamicTableContainer",ref:s},[w("div",{class:B({"dynamic-table-title-container":c(n)})},[O(Kn),(N=c(o).valueVer)!=null&&N.message&&c(n)?(C(),A("div",MVe,ie(c(o).valueVer.message),1)):G("",!0)],2),O(lo,null,{default:H(()=>[O(eo),w("div",{class:"table-wrapper",ref_key:"dynamicTableRef",ref:r},[(C(!0),A(Ae,null,et(a.value,(L,F)=>(C(),A("div",NVe,[l.value?(C(),A("i",{key:0,class:"iconfont icon-form-guanbi del-icon",onClick:z=>f(F)},null,8,RVe)):G("",!0),O(ZN,{list:L,"onUpdate:sort":S[0]||(S[0]=z=>m(z)),"onUpdate:value":_,"onDel:item":p},null,8,["list"])]))),256)),w("div",LVe,[i.value?(C(),A("div",{key:0,class:B(["dynamic-table-add",{"mobile-table-add":c(n)}]),onClick:y},VVe,2)):G("",!0),c(o).isActive?(C(),A("div",zVe)):G("",!0)])],512),O(ao,{customs:b()},null,8,["customs"])]),_:1})])),[[D,k]])}}}),UVe=Ye(jVe,[["__scopeId","data-v-5949c7c1"]]),WVe={title:"单行文本",desc:"",required:!1,disabled:!1},HVe={title:"自增表格",placeholder:"请输入",desc:"",required:!1,disabled:!1,min:null,max:null,count:1},VC={attrs:{...WVe,title:"表格",options:{items:[{id:at(),type:"text",text_value:"",value:"姓名",isActive:!1,placeholder:"请输入",minLength:null,maxLength:null},{id:at(),type:"textarea",text_value:"",value:"手机号",isActive:!1,placeholder:"请输入",minLength:null,maxLength:null}]}},info:{name:"表格",icon:"PopUp_Form_Senior_Subform-1024",summary:{title:"表格",brief:"以表格的方式清晰收集信息。",image:Ke("images/widget/basic-table.png")}},component:PVe},zC={attrs:{...HVe,options:{items:[{id:at(),type:"text",text_value:"",value:"姓名",isActive:!1,placeholder:"请输入",minLength:null,maxLength:null},{id:at(),type:"text",text_value:"",value:"手机号",isActive:!1,placeholder:"请输入",minLength:null,maxLength:null}]}},info:{name:"自增表格",icon:"zizengbiaoge",summary:{title:"自增表格",brief:"以表格的方式清晰收集信息。支持填表人自定义数量,适用于不定量信息收集,比如家庭成员信息填写。",image:Ke("images/widget/dynamic-table.png")}},component:UVe},qVe=[{name:"身份证",fields:[{key:"name",label:"姓名",value:""},{key:"gender",label:"性别",value:""},{key:"ethnicity",label:"民族",value:""},{key:"birthDate",label:"出生日期",value:""},{key:"address",label:"住址",value:""},{key:"idNumber",label:"身份证号",value:""}]}],KVe=[{name:"银行卡",fields:[{key:"bankName",label:"银行名称",value:""},{key:"cardNumber",label:"银行卡号",value:""},{key:"cardType",label:"银行卡类型",value:""},{key:"validPeriod",label:"有效期限",value:""}]}],YVe=[{name:"行驶证",fields:[{key:"plateNumber",label:"号牌号码",value:""},{key:"vehicleType",label:"车辆类型",value:""},{key:"owner",label:"所有人",value:""},{key:"address",label:"住址",value:""},{key:"useCharacter",label:"使用性质",value:""},{key:"brandModel",label:"品牌型号",value:""},{key:"vin",label:"车辆识别代号",value:""},{key:"engineNumber",label:"发动机号码",value:""},{key:"registerDate",label:"注册日期",value:""},{key:"issueDate",label:"发证日期",value:""},{key:"sealInfo",label:"印章信息",value:""}]}],GVe=[{name:"驾驶证",fields:[{key:"licenseNumber",label:"证号",value:""},{key:"name",label:"姓名",value:""},{key:"gender",label:"性别",value:""},{key:"nationality",label:"国籍",value:""},{key:"address",label:"住址",value:""},{key:"birthDate",label:"出生日期",value:""},{key:"firstIssueDate",label:"初次领证日期",value:""},{key:"vehicleClass",label:"准驾车型",value:""},{key:"issuingAuthority",label:"发证单位",value:""},{key:"validFrom",label:"有效期开始时间",value:""},{key:"validTo",label:"有效期结束时间",value:""}]}],QVe=[{name:"营业执照",fields:[{key:"creditCode",label:"统一社会信用代码",value:""},{key:"companyName",label:"名称",value:""},{key:"companyType",label:"类型",value:""},{key:"legalRepresentative",label:"法定代表人",value:""},{key:"businessScope",label:"经营范围",value:""},{key:"registeredCapital",label:"注册资本",value:""},{key:"establishDate",label:"成立日期",value:""},{key:"businessPeriod",label:"营业期限",value:""},{key:"address",label:"住所",value:""}]}],JVe=[{name:"特种作业证",fields:[{key:"certNumber",label:"证号",value:""},{key:"name",label:"姓名",value:""},{key:"jobCategory",label:"作业类别",value:""},{key:"gender",label:"性别",value:""},{key:"operationItem",label:"操作项目",value:""},{key:"firstIssueDate",label:"初领日期",value:""},{key:"validPeriod",label:"有效期限",value:""},{key:"reviewDate",label:"应复审日期",value:""},{key:"issuingAuthority",label:"签发机关",value:""}]}],XVe=[{name:"发票基本信息",fields:[{key:"invoiceType",label:"发票类型",value:""},{key:"invoiceName",label:"发票名称",value:""},{key:"invoiceCode",label:"发票代码",value:""},{key:"invoiceNumber",label:"发票号码",value:""},{key:"passwordArea",label:"密码区",value:""},{key:"payee",label:"收款人",value:""},{key:"reviewer",label:"复核",value:""},{key:"drawer",label:"开票人",value:""}]},{name:"购买方",fields:[{key:"buyerName",label:"名称",value:""},{key:"buyerTaxId",label:"纳税人识别号",value:""},{key:"buyerAddress",label:"地址",value:""},{key:"buyerPhone",label:"电话",value:""},{key:"buyerBankAccount",label:"开户行及账号",value:""}]},{name:"销售方",fields:[{key:"sellerName",label:"名称",value:""},{key:"sellerTaxId",label:"纳税人识别号",value:""},{key:"sellerAddress",label:"地址",value:""},{key:"sellerPhone",label:"电话",value:""},{key:"sellerBankAccount",label:"开户行及账号",value:""}]},{name:"货物或应税劳务、服务",fields:[{key:"goodsName",label:"名称",value:""},{key:"goodsAmount",label:"金额",value:""},{key:"goodsTaxRate",label:"税率",value:""},{key:"goodsTaxAmount",label:"税额",value:""}]},{name:"合计",fields:[{key:"totalAmount",label:"金额合计",value:""},{key:"totalTaxAmount",label:"税额合计",value:""},{key:"totalAmountCapital",label:"价税合计(大写)",value:""},{key:"totalAmountLower",label:"价税合计(小写)",value:""}]}],ZVe=[];function fl(e,t,n,o){const a=o.map(r=>({...r,fields:r.fields.map(s=>({...s,visible:!0}))}));return{title:t,desc:n,required:!1,ocrType:e,sections:a,allowCamera:!0,allowGallery:!0}}const e9e=fl("idCard","身份证识别","请正面拍摄身份证,要求内容清晰完整,方便AI识别",qVe),t9e=fl("bankCard","银行卡识别","请拍摄银行卡正面,确保卡号清晰可见",KVe),n9e=fl("vehicleLicense","行驶证识别","请拍摄行驶证主页,确保信息完整清晰",YVe),o9e=fl("driverLicense","驾驶证识别","请拍摄驾驶证主页,确保信息完整清晰",GVe),a9e=fl("businessLicense","营业执照识别","请拍摄营业执照,确保文字清晰完整",QVe),r9e=fl("specialCertificate","特种作业证识别","请拍摄特种作业证,确保信息完整清晰",JVe),s9e=fl("vatInvoice","增值税发票识别","请拍摄增值税发票,确保票面信息清晰完整",XVe),i9e=fl("customTable","自定义表格识别","请拍摄表格图片,识别后可在字段管理中配置识别字段",ZVe),l9e=An(()=>Promise.resolve().then(()=>require("./OcrWidget-CLs8LU6u.cjs")));function pl(e,t){return{attrs:e,info:t,component:l9e}}const u9e={name:"身份证",icon:"id-card",settingBrief:"仅支持二代身份证识别",summary:{title:"身份证",brief:"用于收集填表人身份证信息,支持修改",image:Ke("images/widget/ocr/tip-idcard.webp")},example:{title:"身份证识别",desc:"请正面拍摄身份证,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-idcard.jpg")}},c9e={name:"银行卡",icon:"bank-card",settingBrief:"支持识别银行卡,录入相关信息",summary:{title:"银行卡",brief:"用于收集填表人银行卡信息,支持修改",image:Ke("images/widget/ocr/tip-bankcard.webp")},example:{title:"银行卡识别",desc:"请正面拍摄银行卡,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-bankcard.jpg")}},d9e={name:"行驶证",icon:"vehicle",settingBrief:"支持识别行驶证相关信息",summary:{title:"行驶证",brief:"用于收集填表人行驶证信息,支持修改",image:Ke("images/widget/ocr/tip-vehicle.webp")},example:{title:"行驶证识别",desc:"请正面拍摄行驶证,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-vehicle.jpg")}},f9e={name:"驾驶证",icon:"driver-license",settingBrief:"支持识别驾驶证相关信息",summary:{title:"驾驶证",brief:"用于收集填表人驾驶证信息,支持修改",image:Ke("images/widget/ocr/tip-driver.webp")},example:{title:"驾驶证识别",desc:"请正面拍摄驾驶证,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-driver.jpg")}},p9e={name:"营业执照",icon:"business-license",settingBrief:"支持识别营业执照,录入企业信息",summary:{title:"营业执照",brief:"用于收集填表人营业执照信息,支持修改",image:Ke("images/widget/ocr/tip-business.webp")},example:{title:"营业执照识别",desc:"请正面拍摄营业执照,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-business.jpg")}},v9e={name:"特种作业证",icon:"special-certificate",settingBrief:"支持识别特种作业证,录入相关信息",summary:{title:"特种作业证",brief:"用于收集填表人特种作业证信息,支持修改",image:Ke("images/widget/ocr/tip-special.webp")},example:{title:"特种作业证识别",desc:"请正面拍摄特种作业证,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-special.jpg")}},h9e={name:"增值税发票",icon:"invoice",settingBrief:"支持识别增值税发票信息",summary:{title:"增值税发票",brief:"用于收集填表人增值税发票信息,支持修改",image:Ke("images/widget/ocr/tip-invoice.webp")},example:{title:"增值税发票识别",desc:"请正面拍摄增值税发票,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-invoice.jpg")}},m9e={name:"自定义表格",icon:"table-custom",settingBrief:"Al可从表格单据识别出重要字段",summary:{title:"自定义表格",brief:"AI可从表格单据、证件、实物照片中识别出重要字段,适用于识别内部单据、集装箱箱号等场景。",image:Ke("images/widget/ocr/tip-custom.webp")},example:{title:"自定义表格识别",desc:"请正面拍摄,要求内容清晰完整,方便Al识别",image:Ke("images/widget/ocr/example-custom.jpg")}},jC=pl(e9e,u9e),UC=pl(t9e,c9e),WC=pl(n9e,d9e),HC=pl(o9e,f9e),qC=pl(a9e,p9e),KC=pl(r9e,v9e),YC=pl(s9e,h9e),GC=pl(i9e,m9e),Hh={basicInput:lC.attrs,fillBlank:zm.attrs,emailInput:Rp.attrs,idCardInput:Lp.attrs,textarea:pC.attrs,shortAnswer:jm.attrs,phoneInput:mC.attrs,numberInput:hC.attrs,nameInput:Np.attrs,companyInput:uC.attrs,departmentInput:cC.attrs,positionInput:dC.attrs,ageInput:gC.attrs,basicSelect:SC.props,multiSelect:kC.props,businessSelect:IC.props,nationSelect:TC.props,regionSelect:xC.props,rate:FN,date:VN,basicRadio:q_e,checkbox:K_e,imgRadio:Y_e,imgCheckbox:G_e,sort:Q_e,occupationRadio:J_e,sexRadio:X_e,educationRadio:Z_e,ageRadio:e1e,file:wFe,resume:$Fe,work:CFe,geolocation:IFe,mapNavigation:DFe,carousel:xFe,pageHeader:MFe,contactUs:RFe,pagination:FFe,description:GN,button:zFe,eduRadio:a1e,fillBlank2:ON.attrs,shortAnswer2:DN.attrs,numberFillBlank:bC.attrs,eduCheckbox:r1e,eduJudgement:s1e,eduImgRadio:i1e,eduImgCheckbox:l1e,eduSelect:EC.props,appoint:vC.attrs,gainWithPic:FC.attrs,gainWithoutPic:LC.attrs,groupTitle:BC.attrs,preparerNameInput:rb.attrs,preparerIdCardInput:ib.attrs,preparerPhoneInput:sb.attrs,preparerWorkIdInput:lb.attrs,watermark:DC.attrs,location:MC.attrs,checkEntry:RC.attrs,basicTable:VC.attrs,dynamicTable:zC.attrs,idCardOcr:jC.attrs,bankCardOcr:UC.attrs,vehicleLicenseOcr:WC.attrs,driverLicenseOcr:HC.attrs,businessLicenseOcr:qC.attrs,specialCertificateOcr:KC.attrs,vatInvoiceOcr:YC.attrs,customTableOcr:GC.attrs},QC={basicInput:lC.component,fillBlank:zm.component,emailInput:Rp.component,idCardInput:Lp.component,textarea:pC.component,shortAnswer:jm.component,phoneInput:mC.component,numberInput:hC.component,nameInput:Np.component,companyInput:uC.component,departmentInput:cC.component,positionInput:dC.component,ageInput:gC.component,basicSelect:SC.component,multiSelect:kC.component,businessSelect:IC.component,nationSelect:TC.component,regionSelect:xC.component,rate:X6e,date:_Re,basicRadio:Ol,checkbox:YA,imgRadio:GA,imgCheckbox:QA,sort:qLe,occupationRadio:Ol,sexRadio:Ol,educationRadio:Ol,ageRadio:Ol,file:R0,resume:R0,work:R0,geolocation:An(()=>Promise.resolve().then(()=>require("./Geolocation-Cvp-gUlJ.cjs"))),mapNavigation:An(()=>Promise.resolve().then(()=>require("./MapNavigation-CuNBFeii.cjs"))),carousel:An(()=>Promise.resolve().then(()=>require("./Carousel-ClxI06AJ.cjs"))),pageHeader:An(()=>Promise.resolve().then(()=>require("./PageHeader-D7VBZZxL.cjs"))),contactUs:An(()=>Promise.resolve().then(()=>require("./ContactUs-B3NnHlzg.cjs"))),pagination:An(()=>Promise.resolve().then(()=>require("./Pagination-Dz3Zsq6F.cjs"))),description:An(()=>Promise.resolve().then(()=>require("./index-CT99e2GX.cjs"))),button:An(()=>Promise.resolve().then(()=>require("./Button-BXatkcP-.cjs"))),eduRadio:Ol,fillBlank2:zm.component,shortAnswer2:jm.component,numberFillBlank:bC.component,eduCheckbox:YA,eduJudgement:Ol,eduImgRadio:GA,eduImgCheckbox:QA,eduSelect:EC.component,appoint:vC.component,gainWithoutPic:LC.component,gainWithPic:FC.component,groupTitle:BC.component,preparerNameInput:rb.component,preparerIdCardInput:ib.component,preparerPhoneInput:sb.component,preparerWorkIdInput:lb.component,watermark:DC.component,location:MC.component,checkEntry:RC.component,basicTable:VC.component,dynamicTable:zC.component,idCardOcr:jC.component,bankCardOcr:UC.component,vehicleLicenseOcr:WC.component,driverLicenseOcr:HC.component,businessLicenseOcr:qC.component,specialCertificateOcr:KC.component,vatInvoiceOcr:YC.component,customTableOcr:GC.component},JC={nameInput:Np.info,fillBlank:zm.info,emailInput:Rp.info,idCardInput:Lp.info,businessSelect:IC.widget,companyInput:uC.info,departmentInput:cC.info,positionInput:dC.info,phoneInput:mC.info,ageInput:gC.info,educationRadio:KRe,regionSelect:xC.widget,sexRadio:qRe,ageRadio:YRe,occupationRadio:HRe,nationSelect:TC.widget,geolocation:TFe,basicRadio:WRe,checkbox:nLe,basicSelect:SC.widget,multiSelect:kC.widget,imgRadio:ALe,imgCheckbox:OLe,basicInput:lC.info,textarea:pC.info,shortAnswer:jm.info,numberInput:hC.info,date:wRe,rate:Z6e,sort:KLe,file:SFe,resume:EFe,work:kFe,carousel:AFe,mapNavigation:PFe,pageHeader:NFe,contactUs:LFe,pagination:BFe,description:jFe,button:VFe,eduRadio:GRe,fillBlank2:ON.info,shortAnswer2:DN.info,numberFillBlank:bC.info,eduCheckbox:oLe,eduJudgement:QRe,eduImgRadio:DLe,eduImgCheckbox:PLe,eduSelect:EC.widget,appoint:vC.info,gainWithoutPic:LC.info,gainWithPic:FC.info,groupTitle:BC.info,preparerNameInput:rb.info,preparerIdCardInput:ib.info,preparerPhoneInput:sb.info,preparerWorkIdInput:lb.info,watermark:DC.info,location:MC.info,checkEntry:RC.info,basicTable:VC.info,dynamicTable:zC.info,idCardOcr:jC.info,bankCardOcr:UC.info,vehicleLicenseOcr:WC.info,driverLicenseOcr:HC.info,businessLicenseOcr:qC.info,specialCertificateOcr:KC.info,vatInvoiceOcr:YC.info,customTableOcr:GC.info},Wp=e=>({id:at(),type:e,attrs:On(Hh[e])}),nt=P([]),Tc=P({}),t6=e=>{e.type==="pagination"&&nt.value.filter(n=>n.type==="pagination").length===1&&Zu("pagination",0)},Zu=(e,t)=>{const n=Wp(e);switch(console.debug(n,"sss"),e){case"contactUs":{br.value=n;break}default:!t&&t!==0?nt.value.push(n):nt.value.splice(t,0,n)}return t6(n),n},g9e=e=>{if(e.type==="pagination"){const t=nt.value.filter(n=>n.type==="pagination");t.length===1&&w1(t[0].id)}},w1=e=>{const t=nt.value.findIndex(o=>o.id===e);if(t===-1){console.warn("deleteWidget","widget not found!");return}const n=nt.value[t];nt.value.splice(t,1),g9e(n)},b9e=e=>{const t=nt.value.findIndex(o=>o.id===e);if(t===-1){console.warn("duplicateWidget","widget not found!");return}const n=JSON.parse(JSON.stringify(nt.value[t]));n.id=at(),nt.value.splice(t+1,0,n)},y9e=e=>{const t=QC[e];return t||console.error("getCompByType",`${e} component is unavailable!`),t},Io=P(On(Wp("pageHeader"))),br=P(),XC=e=>{Array.isArray(e.widgets)&&(nt.value=e.widgets.map(t=>{const n=SI(Object.keys(Hh[t.type]),Object.keys(t.attrs));n.length&&console.warn("applyWidgets",`${t.type} missing attrs: ${n.join(", ")}`);const o=SI(Object.keys(t.attrs),Object.keys(Hh[t.type]));return o.length&&console.warn("applyWidgets",`${t.type} extra attrs: ${o.join(", ")}`),{...t,attrs:{...Hh[t.type],...t.attrs}}})),Io.value={...Io.value,...e.header,attrs:{...Io.value.attrs,...e.header.attrs}},exports.globalInject.setFormName(Io.value.attrs.title),e.contactUs&&(br.value=e.contactUs)},_9e=()=>{nt.value=[],Tc.value={},Io.value=On(Wp("pageHeader")),br.value=void 0},ZC=()=>[...nt.value,Io.value,...br.value?[br.value]:[]];let n6=[],Wd={};const Hp=()=>{n6=On(ZC()),Wd=On({widgets:nt.value,header:Io.value,contactUs:br.value})},w9e=()=>{const e=ZC();return!c3(n6,e)},$9e=()=>{nt.value.splice(0,nt.value.length,...On(Wd.widgets)),Object.assign(Io.value,On(Wd.header)),br.value?Object.assign(br.value,On(Wd.contactUs)):br.value=On(Wd.contactUs)},o6=e=>{const t={};for(const n of e)t[n.id]=a6(n);return t},a6=e=>{switch(e.type){case"fillBlank2":case"shortAnswer2":return S9e(e.attrs);case"numberFillBlank":return E9e(e.attrs);case"eduRadio":case"eduCheckbox":case"eduJudgement":case"eduImgRadio":case"eduImgCheckbox":case"eduSelect":return C9e(e.attrs);default:return{}}};function C9e(e){const t={};return Object.entries(e).forEach(([n,o])=>{switch(n){case"standard":{if(!o.length){t[n]="请输入正确答案";break}if(e.scoreType==="cumulative"&&o.some(a=>typeof a.mark!="number")){t[n]="请输入正确分数";break}if(e.scoreType==="multiple"&&(o.some(a=>typeof a.mark!="number")||o.length!==(e.list||e.options).length)){t[n]="请输入正确分数";break}break}case"score":{typeof o!="number"&&(t[n]="请输入正确分数");break}}}),t}const S9e=e=>{const t={};return Object.entries(e).forEach(([n,o])=>{switch(n){case"standard":{o!=null&&o.length||(t[n]="请输入正确答案");break}case"score":{typeof o!="number"&&(t[n]="请输入正确分数");break}}}),t},E9e=e=>{const t={};return Object.entries(e).forEach(([n,o])=>{switch(n){case"standard":{typeof o!="number"&&(t[n]="请输入正确答案");break}case"score":{typeof o!="number"&&(t[n]="请输入正确分数");break}}}),t},k9e=1,r6=e=>e.map(t=>{var a;if(!fu.types.includes(t.type))return t;const n=(a=t.attrs)==null?void 0:a.sections;if(!n||!Array.isArray(n))return t;const o=n.map(r=>({...r,fields:(r.fields||[]).filter(s=>s.visible!==!1&&s.label)})).filter(r=>r.fields.length>0);return{...t,attrs:{...t.attrs,sections:o}}}),I9e=async()=>{const e={eacb:exports.globalInject.getToken(),name:Io.value.attrs.title,widgets:r6(nt.value),setting:tS(),version:k9e,extend:nS(),header:Io.value,contact_us:br.value,scene_id:xa(),parent_id:exports.globalInject.getRoute().query.folderId??0},{data:t}=await exports.globalInject.$axios.post("/v2/form/create",e);return t},T9e=async e=>{const t={id:e,eacb:exports.globalInject.getToken(),name:Io.value.attrs.title,widgets:r6(nt.value),setting:tS(),extend:nS(),header:Io.value,contact_us:br.value},{data:n}=await exports.globalInject.$axios.post("/v2/form/update",t);return n},x9e=()=>{Tc.value=o6(nt.value),Object.entries(Tc.value).forEach(([e,t])=>{const n=Object.keys(t)[0];if(n)throw zf(e),ht.error(t[n]),new Error(`widget(${e}) ${n} is invalid`)})},eS=async e=>{await Ube(500),x9e();try{const t=exports.globalInject.getFormId(),n=t?await T9e(t):await I9e(),{status:o,result:a}=n;return Hp(),Xc(),!t&&(a!=null&&a.form_id)&&await exports.globalInject.replaceFormId(a.form_id),$a.value=(a==null?void 0:a.short_url)??"",Ff.value=(a==null?void 0:a.render_url)??"",o!==1||!(a!=null&&a.url)?ht.error("保存失败"):(e&&e(),ht.success("保存成功")),n}catch(t){throw ht.error("保存失败"),t}},s6=async()=>{const t={id:exports.globalInject.getFormId(),eacb:exports.globalInject.getToken(),setting:tS(),extend:nS()},{data:{status:n,result:o}}=await exports.globalInject.$axios.post("/v2/form/updateSetting",t);return n!==1?(console.error("updateSetting","status is not success!"),null):(Xc(),o)},mb=e=>{var t,n;w$(e.scene_id),XC({widgets:e.widgets,header:e.header,contactUs:e.contact_us}),owe({create_uid:e.create_uid,short_url:e.short_url,render_url:e.render_url,fill_history:e.fill_history??0,unable_submit:e.unable_submit??!1,now_datetime:e.now_datetime??null,next_time:e.next_time??-1}),I$({setting:e.setting,extend:e.extend}),KM(((n=(t=e.setting)==null?void 0:t.details)==null?void 0:n.widget_common_setting)??{})},i6=async(e,t)=>{const n=t??exports.globalInject.getToken(),{data:o}=await exports.globalInject.$axios.get(`/v2/form/info?id=${e}&eacb=${n}`),{status:a,result:r,msg:s}=o;return a!==1?ht.error(s||"获取表单失败"):mb(r),Hp(),Xc(),o},l6=async e=>{var r;const{data:t}=await exports.globalInject.$axios.get(`/v2/form/getTplInfo?id=${e}`),{status:n,result:o,msg:a}=t;if(n!==1)ht.error(a||"获取表单模板失败");else{w$(o.scene_id),XC({widgets:JSON.parse(o.widgets),header:JSON.parse(o.header),contactUs:o.contact_us?JSON.parse(o.contact_us):void 0});const s=JSON.parse(o.setting),i=o.extend?JSON.parse(o.extend):null;I$({setting:s,extend:i}),KM(((r=s==null?void 0:s.details)==null?void 0:r.widget_common_setting)??{}),F$()}return Hp(),Xc(),o},A9e=()=>{const e=exports.globalInject.getRoute();w$(parseInt(e.query.scene));const t=Wp("pageHeader"),n={title:C$(),desc:WM()};XC({widgets:[],header:{...t,attrs:{...t.attrs,...n}},contactUs:void 0}),gye(),pye(),F$(),Hp(),Xc()},u6=async e=>{var d,f,p,h;const t=(f=(d=exports.globalInject).getFormId)==null?void 0:f.call(d),n=(h=(p=exports.globalInject).getCodeId)==null?void 0:h.call(p),{query:{vhcode:o,sign:a}}=exports.globalInject.getRoute(),{data:r}=await exports.globalInject.$axios.get(`/v2/form/getInfoByLandingPage?id=${t}&vhcode=${o}&sign=${a}&deviceId=${S$(t)}&link_id=${n}&unionid=${e}`),{status:s,result:i,msg:l}=r;return s!==1?ht.error(l||"获取表单失败"):mb(i),r},O9e=e=>{const t=[];return["preparerNameInput","preparerPhoneInput","preparerIdCardInput","preparerWorkIdInput","watermark"].forEach(o=>{var r;const a=nt.value.find(s=>s.type===o);a&&t.push({id:a.id,type:a.type,value:((r=e.data[a.id])==null?void 0:r.value)||""})}),t},D9e=async e=>{const t=Math.floor(Date.now()/1e3),n=t-Math.floor(performance.now()/1e3),o=O9e(e),a={form_id:exports.globalInject.getFormId(),link_id:exports.globalInject.getCodeId(),answer:e.data,pay_info:e.pay_info,cancel_order_num:e.cancel_order_num,attachment:UM(e.data),meta_info:{answerInfo:{endTime:t,startTime:n},userInfo:{}},source:exports.globalInject.getRoute().query.source,extend_type:o};e!=null&&e.cancel_order_num&&(a.cancel_order_num=e.cancel_order_num);const r=localStorage.getItem("authInfo");r&&(a.meta_info.userInfo=JSON.parse(r)),console.debug(a,"params");const s=S$(exports.globalInject.getFormId()),{data:i}=await exports.globalInject.$axios.post("/v2/form/answer",a,{headers:{deviceid:s}});if(i.status===4013){ht.error(i.msg);return}return i.status!==1&&console.error("submitFormData","status is not success!"),i},P9e=async e=>{const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.post("/v2/form/uploadAnswerFile",e);if(t!==1)throw console.error("PostUploadAnswerFile","status is not success!"),new Error(o);return n},M9e=async e=>{const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/getUploadLimit?uid=${e}`);if(t!==1)throw console.error("PostUploadAnswerFile","status is not success!"),new Error(o);return n},tS=()=>({switch:gt.value.switch,crown_setting:gt.value.crown_setting,test_setting:gt.value.test_setting,pay_setting:gt.value.pay_setting,details:{...gt.value.details,widget_common_setting:Sr.value}}),nS=()=>{const e=gt.value,{valid_start_time:t,valid_end_time:n}=e;return{valid_start_time:t===-1?-1:Math.round(t/1e3),valid_end_time:n===-1?-1:Math.round(n/1e3)}},N9e=async e=>{const{data:t}=await exports.globalInject.$axios.get(`/v2/form/infoExplain?id=${e}`),{status:n,result:o,msg:a}=t;return n!==1?ht.error(a||"获取表单失败"):mb(o),t},R9e=async e=>{const{data:t}=await exports.globalInject.$axios.get(`/v2/form/answerDetailExplain?answer_id=${e}`),{status:n,msg:o}=t;return n!==1&&ht.error(o||"获取数据失败"),t},L9e=async({answer:e,form_id:t,fake_id:n})=>{let o={answer:e,attachment:UM(e),form_id:window.btoa(t),fake_id:window.btoa(n)};const{data:a}=await exports.globalInject.$axios.post("/v2/form/answerEdit",o),{status:r,msg:s}=a;return r!==1&&ht.error(s||"修改数据失败"),a};async function F9e(e,t){const{data:n}=await exports.globalInject.$axios.get(`/v2/form/getOpenSearchChain?chain=${e}&password=${t}`),{status:o,msg:a,result:r}=n;return{status:o,msg:a,result:r}}async function B9e(e){const{data:{status:t,msg:n}}=await exports.globalInject.$axios.post("/v2/form/createOpenSearch",e);t!==1&&ht.error(n||"设置失败")}async function V9e(e){const{data:{status:t,msg:n}}=await exports.globalInject.$axios.post("/v2/form/editOpenSearch",e);t!==1&&ht.error(n||"设置失败")}async function z9e(e){const{data:{status:t,msg:n}}=await exports.globalInject.$axios.post("/v2/form/delOpenSearch",e);t!==1?ht.error(n||"设置失败"):ht.success("删除成功")}async function j9e(e){const{data:{status:t,msg:n,result:o}}=await exports.globalInject.$axios.post("/v2/form/switchOpenSearchStatus",e);return t!==1&&ht.error(n||"设置失败"),o}async function U9e(){const{data:{status:e,result:t,msg:n}}=await exports.globalInject.$axios.get(`/v2/form/getOpenSearchList?eacb=${exports.globalInject.getToken()}&form_id=${exports.globalInject.getFormId()}`);return e!==1?(ht.error(n||"获取数据失败"),[]):t}async function W9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/getOpenSearchWidgets?id=${e}`);return t!==1?(ht.error(o||"获取数据失败"),{status:t,result:n,msg:o}):{status:t,result:n,msg:o}}async function H9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.post("/v2/form/source/add",{eacb:exports.globalInject.getToken(),form_id:exports.globalInject.getFormId(),source:e});return t!==1?(ht.error(o||"添加失败"),{status:t,result:n,msg:o}):{status:t,result:n,msg:o}}async function q9e(){const{data:{status:e,result:t,msg:n}}=await exports.globalInject.$axios.get(`/v2/form/source/list?eacb=${exports.globalInject.getToken()}&form_id=${exports.globalInject.getFormId()}`);return e!==1?(ht.error(n||"获取数据失败"),{status:e,result:t,msg:n}):{status:e,result:t,msg:n}}async function K9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.post("/v2/form/source/del",{eacb:exports.globalInject.getToken(),form_id:exports.globalInject.getFormId(),id:e});return t!==1?(ht.error(o||"删除失败"),{status:t,result:n,msg:o}):{status:t,result:n,msg:o}}async function Y9e(e){const t={eacb:exports.globalInject.getToken(),url:e,title:""},{data:{status:n,result:o,msg:a}}=await exports.globalInject.$axios.post("/v2/form/link/add",t);return console.log("status, result, msg: ",n,o,a),n===1?(ht.success("设置成功"),{status:n,url:o.url,id:o.id}):(ht.error(a||"设置失败"),{status:n,url:"",id:""})}async function c6(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/link/one?id=${e}`);return{status:t,result:n,msg:o}}async function G9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.post("/v2/form/cancelAppointment",e);return t}async function Q9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/getAnswerListByD?form_id=${e.form_id}&deviceid=${e.deviceid}`);return n}async function d6(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/answerDetailExplain?answer_id=${e.answer_id}`);return n}async function J9e(e){const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/getAppointmentTempUse?eacb=${exports.globalInject.getToken()}&type=${e}`);return n}async function X9e(){const t=exports.globalInject.getRoute().query.short;console.log("short: ",t);const{data:{status:n,result:o,msg:a}}=await exports.globalInject.$axios.get(`/wx/j/viewForm?q=${t}`);return o}const Z9e=()=>{if(O$())return e7e()},e7e=()=>new Promise(e=>{const{showConfirm:t}=ul();t({title:"表单未保存",content:"当前编辑内容未保存,离开当前页面前是否需要保存?",confirmText:"保存",cancelText:"不保存",isNew:!0,type:"warn",onConfirm:()=>{eS().then(()=>{e(!0)})},onCancel:()=>{e(!1)}})}),t7e=(e="取消")=>new Promise(t=>{const{showConfirm:n}=ul();n({title:"表单未保存",content:"当前编辑内容未保存,离开当前页面前是否需要保存?",confirmText:"保存",cancelText:e,isNew:!0,type:"warn",onConfirm:()=>{t(!0)},onCancel:()=>{t(!1)}})}),Ld=sN(),oS={on(e,t){Ld.on(e,t)},off(e,t){Ld.off(e,t)},emit(e,t){Ld.emit(e,t)},clear(){Ld.all.clear()},raw:Ld};var sd={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}},vl={},n7e=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},f6={},Qa={};let aS;const o7e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Qa.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};Qa.getSymbolTotalCodewords=function(t){return o7e[t]};Qa.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Qa.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');aS=t};Qa.isKanjiModeEnabled=function(){return typeof aS<"u"};Qa.toSJIS=function(t){return aS(t)};var gb={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},e.from=function(o,a){if(e.isValid(o))return o;try{return t(o)}catch{return a}}})(gb);function p6(){this.buffer=[],this.length=0}p6.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var a7e=p6;function qp(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}qp.prototype.set=function(e,t,n,o){const a=e*this.size+t;this.data[a]=n,o&&(this.reservedBit[a]=!0)};qp.prototype.get=function(e,t){return this.data[e*this.size+t]};qp.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};qp.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var r7e=qp,v6={};(function(e){const t=Qa.getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const a=Math.floor(o/7)+2,r=t(o),s=r===145?26:Math.ceil((r-13)/(2*a-2))*2,i=[r-7];for(let l=1;l<a-1;l++)i[l]=i[l-1]-s;return i.push(6),i.reverse()},e.getPositions=function(o){const a=[],r=e.getRowColCoords(o),s=r.length;for(let i=0;i<s;i++)for(let l=0;l<s;l++)i===0&&l===0||i===0&&l===s-1||i===s-1&&l===0||a.push([r[i],r[l]]);return a}})(v6);var h6={};const s7e=Qa.getSymbolSize,eO=7;h6.getPositions=function(t){const n=s7e(t);return[[0,0],[n-eO,0],[0,n-eO]]};var m6={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(a){return a!=null&&a!==""&&!isNaN(a)&&a>=0&&a<=7},e.from=function(a){return e.isValid(a)?parseInt(a,10):void 0},e.getPenaltyN1=function(a){const r=a.size;let s=0,i=0,l=0,d=null,f=null;for(let p=0;p<r;p++){i=l=0,d=f=null;for(let h=0;h<r;h++){let m=a.get(p,h);m===d?i++:(i>=5&&(s+=t.N1+(i-5)),d=m,i=1),m=a.get(h,p),m===f?l++:(l>=5&&(s+=t.N1+(l-5)),f=m,l=1)}i>=5&&(s+=t.N1+(i-5)),l>=5&&(s+=t.N1+(l-5))}return s},e.getPenaltyN2=function(a){const r=a.size;let s=0;for(let i=0;i<r-1;i++)for(let l=0;l<r-1;l++){const d=a.get(i,l)+a.get(i,l+1)+a.get(i+1,l)+a.get(i+1,l+1);(d===4||d===0)&&s++}return s*t.N2},e.getPenaltyN3=function(a){const r=a.size;let s=0,i=0,l=0;for(let d=0;d<r;d++){i=l=0;for(let f=0;f<r;f++)i=i<<1&2047|a.get(d,f),f>=10&&(i===1488||i===93)&&s++,l=l<<1&2047|a.get(f,d),f>=10&&(l===1488||l===93)&&s++}return s*t.N3},e.getPenaltyN4=function(a){let r=0;const s=a.data.length;for(let l=0;l<s;l++)r+=a.data[l];return Math.abs(Math.ceil(r*100/s/5)-10)*t.N4};function n(o,a,r){switch(o){case e.Patterns.PATTERN000:return(a+r)%2===0;case e.Patterns.PATTERN001:return a%2===0;case e.Patterns.PATTERN010:return r%3===0;case e.Patterns.PATTERN011:return(a+r)%3===0;case e.Patterns.PATTERN100:return(Math.floor(a/2)+Math.floor(r/3))%2===0;case e.Patterns.PATTERN101:return a*r%2+a*r%3===0;case e.Patterns.PATTERN110:return(a*r%2+a*r%3)%2===0;case e.Patterns.PATTERN111:return(a*r%3+(a+r)%2)%2===0;default:throw new Error("bad maskPattern:"+o)}}e.applyMask=function(a,r){const s=r.size;for(let i=0;i<s;i++)for(let l=0;l<s;l++)r.isReserved(l,i)||r.xor(l,i,n(a,l,i))},e.getBestMask=function(a,r){const s=Object.keys(e.Patterns).length;let i=0,l=1/0;for(let d=0;d<s;d++){r(d),e.applyMask(d,a);const f=e.getPenaltyN1(a)+e.getPenaltyN2(a)+e.getPenaltyN3(a)+e.getPenaltyN4(a);e.applyMask(d,a),f<l&&(l=f,i=d)}return i}})(m6);var bb={};const zi=gb,bh=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],yh=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];bb.getBlocksCount=function(t,n){switch(n){case zi.L:return bh[(t-1)*4+0];case zi.M:return bh[(t-1)*4+1];case zi.Q:return bh[(t-1)*4+2];case zi.H:return bh[(t-1)*4+3];default:return}};bb.getTotalCodewordsCount=function(t,n){switch(n){case zi.L:return yh[(t-1)*4+0];case zi.M:return yh[(t-1)*4+1];case zi.Q:return yh[(t-1)*4+2];case zi.H:return yh[(t-1)*4+3];default:return}};var g6={},yb={};const vf=new Uint8Array(512),Wm=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)vf[n]=t,Wm[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)vf[n]=vf[n-255]})();yb.log=function(t){if(t<1)throw new Error("log("+t+")");return Wm[t]};yb.exp=function(t){return vf[t]};yb.mul=function(t,n){return t===0||n===0?0:vf[Wm[t]+Wm[n]]};(function(e){const t=yb;e.mul=function(o,a){const r=new Uint8Array(o.length+a.length-1);for(let s=0;s<o.length;s++)for(let i=0;i<a.length;i++)r[s+i]^=t.mul(o[s],a[i]);return r},e.mod=function(o,a){let r=new Uint8Array(o);for(;r.length-a.length>=0;){const s=r[0];for(let l=0;l<a.length;l++)r[l]^=t.mul(a[l],s);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(o){let a=new Uint8Array([1]);for(let r=0;r<o;r++)a=e.mul(a,new Uint8Array([1,t.exp(r)]));return a}})(g6);const b6=g6;function rS(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}rS.prototype.initialize=function(t){this.degree=t,this.genPoly=b6.generateECPolynomial(this.degree)};rS.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const o=b6.mod(n,this.genPoly),a=this.degree-o.length;if(a>0){const r=new Uint8Array(this.degree);return r.set(o,a),r}return o};var i7e=rS,y6={},hl={},sS={};sS.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var ks={};const _6="[0-9]+",l7e="[A-Z $%*+\\-./:]+";let qf="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";qf=qf.replace(/u/g,"\\u");const u7e="(?:(?![A-Z0-9 $%*+\\-./:]|"+qf+`)(?:.|[\r
139
139
  ]))+`;ks.KANJI=new RegExp(qf,"g");ks.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");ks.BYTE=new RegExp(u7e,"g");ks.NUMERIC=new RegExp(_6,"g");ks.ALPHANUMERIC=new RegExp(l7e,"g");const c7e=new RegExp("^"+qf+"$"),d7e=new RegExp("^"+_6+"$"),f7e=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");ks.testKanji=function(t){return c7e.test(t)};ks.testNumeric=function(t){return d7e.test(t)};ks.testAlphanumeric=function(t){return f7e.test(t)};(function(e){const t=sS,n=ks;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(r,s){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?r.ccBits[0]:s<27?r.ccBits[1]:r.ccBits[2]},e.getBestModeForData=function(r){return n.testNumeric(r)?e.NUMERIC:n.testAlphanumeric(r)?e.ALPHANUMERIC:n.testKanji(r)?e.KANJI:e.BYTE},e.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},e.isValid=function(r){return r&&r.bit&&r.ccBits};function o(a){if(typeof a!="string")throw new Error("Param is not a string");switch(a.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+a)}}e.from=function(r,s){if(e.isValid(r))return r;try{return o(r)}catch{return s}}})(hl);(function(e){const t=Qa,n=bb,o=gb,a=hl,r=sS,s=7973,i=t.getBCHDigit(s);function l(h,m,b){for(let g=1;g<=40;g++)if(m<=e.getCapacity(g,b,h))return g}function d(h,m){return a.getCharCountIndicator(h,m)+4}function f(h,m){let b=0;return h.forEach(function(g){const y=d(g.mode,m);b+=y+g.getBitsLength()}),b}function p(h,m){for(let b=1;b<=40;b++)if(f(h,b)<=e.getCapacity(b,m,a.MIXED))return b}e.from=function(m,b){return r.isValid(m)?parseInt(m,10):b},e.getCapacity=function(m,b,g){if(!r.isValid(m))throw new Error("Invalid QR Code version");typeof g>"u"&&(g=a.BYTE);const y=t.getSymbolTotalCodewords(m),_=n.getTotalCodewordsCount(m,b),I=(y-_)*8;if(g===a.MIXED)return I;const k=I-d(g,m);switch(g){case a.NUMERIC:return Math.floor(k/10*3);case a.ALPHANUMERIC:return Math.floor(k/11*2);case a.KANJI:return Math.floor(k/13);case a.BYTE:default:return Math.floor(k/8)}},e.getBestVersionForData=function(m,b){let g;const y=o.from(b,o.M);if(Array.isArray(m)){if(m.length>1)return p(m,y);if(m.length===0)return 1;g=m[0]}else g=m;return l(g.mode,g.getLength(),y)},e.getEncodedBits=function(m){if(!r.isValid(m)||m<7)throw new Error("Invalid QR Code version");let b=m<<12;for(;t.getBCHDigit(b)-i>=0;)b^=s<<t.getBCHDigit(b)-i;return m<<12|b}})(y6);var w6={};const $1=Qa,$6=1335,p7e=21522,tO=$1.getBCHDigit($6);w6.getEncodedBits=function(t,n){const o=t.bit<<3|n;let a=o<<10;for(;$1.getBCHDigit(a)-tO>=0;)a^=$6<<$1.getBCHDigit(a)-tO;return(o<<10|a)^p7e};var C6={};const v7e=hl;function xc(e){this.mode=v7e.NUMERIC,this.data=e.toString()}xc.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};xc.prototype.getLength=function(){return this.data.length};xc.prototype.getBitsLength=function(){return xc.getBitsLength(this.data.length)};xc.prototype.write=function(t){let n,o,a;for(n=0;n+3<=this.data.length;n+=3)o=this.data.substr(n,3),a=parseInt(o,10),t.put(a,10);const r=this.data.length-n;r>0&&(o=this.data.substr(n),a=parseInt(o,10),t.put(a,r*3+1))};var h7e=xc;const m7e=hl,L0=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Ac(e){this.mode=m7e.ALPHANUMERIC,this.data=e}Ac.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Ac.prototype.getLength=function(){return this.data.length};Ac.prototype.getBitsLength=function(){return Ac.getBitsLength(this.data.length)};Ac.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let o=L0.indexOf(this.data[n])*45;o+=L0.indexOf(this.data[n+1]),t.put(o,11)}this.data.length%2&&t.put(L0.indexOf(this.data[n]),6)};var g7e=Ac,b7e=function(t){for(var n=[],o=t.length,a=0;a<o;a++){var r=t.charCodeAt(a);if(r>=55296&&r<=56319&&o>a+1){var s=t.charCodeAt(a+1);s>=56320&&s<=57343&&(r=(r-55296)*1024+s-56320+65536,a+=1)}if(r<128){n.push(r);continue}if(r<2048){n.push(r>>6|192),n.push(r&63|128);continue}if(r<55296||r>=57344&&r<65536){n.push(r>>12|224),n.push(r>>6&63|128),n.push(r&63|128);continue}if(r>=65536&&r<=1114111){n.push(r>>18|240),n.push(r>>12&63|128),n.push(r>>6&63|128),n.push(r&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const y7e=b7e,_7e=hl;function Oc(e){this.mode=_7e.BYTE,typeof e=="string"&&(e=y7e(e)),this.data=new Uint8Array(e)}Oc.getBitsLength=function(t){return t*8};Oc.prototype.getLength=function(){return this.data.length};Oc.prototype.getBitsLength=function(){return Oc.getBitsLength(this.data.length)};Oc.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)};var w7e=Oc;const $7e=hl,C7e=Qa;function Dc(e){this.mode=$7e.KANJI,this.data=e}Dc.getBitsLength=function(t){return t*13};Dc.prototype.getLength=function(){return this.data.length};Dc.prototype.getBitsLength=function(){return Dc.getBitsLength(this.data.length)};Dc.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=C7e.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
140
140
  Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var S7e=Dc,S6={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,o,a){var r={},s={};s[o]=0;var i=t.PriorityQueue.make();i.push(o,0);for(var l,d,f,p,h,m,b,g,y;!i.empty();){l=i.pop(),d=l.value,p=l.cost,h=n[d]||{};for(f in h)h.hasOwnProperty(f)&&(m=h[f],b=p+m,g=s[f],y=typeof s[f]>"u",(y||g>b)&&(s[f]=b,i.push(f,b),r[f]=d))}if(typeof a<"u"&&typeof s[a]>"u"){var _=["Could not find a path from ",o," to ",a,"."].join("");throw new Error(_)}return r},extract_shortest_path_from_predecessor_list:function(n,o){for(var a=[],r=o;r;)a.push(r),n[r],r=n[r];return a.reverse(),a},find_path:function(n,o,a){var r=t.single_source_shortest_paths(n,o,a);return t.extract_shortest_path_from_predecessor_list(r,a)},PriorityQueue:{make:function(n){var o=t.PriorityQueue,a={},r;n=n||{};for(r in o)o.hasOwnProperty(r)&&(a[r]=o[r]);return a.queue=[],a.sorter=n.sorter||o.default_sorter,a},default_sorter:function(n,o){return n.cost-o.cost},push:function(n,o){var a={value:n,cost:o};this.queue.push(a),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(S6);var E7e=S6.exports;(function(e){const t=hl,n=h7e,o=g7e,a=w7e,r=S7e,s=ks,i=Qa,l=E7e;function d(_){return unescape(encodeURIComponent(_)).length}function f(_,I,k){const E=[];let T;for(;(T=_.exec(k))!==null;)E.push({data:T[0],index:T.index,mode:I,length:T[0].length});return E}function p(_){const I=f(s.NUMERIC,t.NUMERIC,_),k=f(s.ALPHANUMERIC,t.ALPHANUMERIC,_);let E,T;return i.isKanjiModeEnabled()?(E=f(s.BYTE,t.BYTE,_),T=f(s.KANJI,t.KANJI,_)):(E=f(s.BYTE_KANJI,t.BYTE,_),T=[]),I.concat(k,E,T).sort(function(S,D){return S.index-D.index}).map(function(S){return{data:S.data,mode:S.mode,length:S.length}})}function h(_,I){switch(I){case t.NUMERIC:return n.getBitsLength(_);case t.ALPHANUMERIC:return o.getBitsLength(_);case t.KANJI:return r.getBitsLength(_);case t.BYTE:return a.getBitsLength(_)}}function m(_){return _.reduce(function(I,k){const E=I.length-1>=0?I[I.length-1]:null;return E&&E.mode===k.mode?(I[I.length-1].data+=k.data,I):(I.push(k),I)},[])}function b(_){const I=[];for(let k=0;k<_.length;k++){const E=_[k];switch(E.mode){case t.NUMERIC:I.push([E,{data:E.data,mode:t.ALPHANUMERIC,length:E.length},{data:E.data,mode:t.BYTE,length:E.length}]);break;case t.ALPHANUMERIC:I.push([E,{data:E.data,mode:t.BYTE,length:E.length}]);break;case t.KANJI:I.push([E,{data:E.data,mode:t.BYTE,length:d(E.data)}]);break;case t.BYTE:I.push([{data:E.data,mode:t.BYTE,length:d(E.data)}])}}return I}function g(_,I){const k={},E={start:{}};let T=["start"];for(let x=0;x<_.length;x++){const S=_[x],D=[];for(let N=0;N<S.length;N++){const L=S[N],F=""+x+N;D.push(F),k[F]={node:L,lastCount:0},E[F]={};for(let z=0;z<T.length;z++){const j=T[z];k[j]&&k[j].node.mode===L.mode?(E[j][F]=h(k[j].lastCount+L.length,L.mode)-h(k[j].lastCount,L.mode),k[j].lastCount+=L.length):(k[j]&&(k[j].lastCount=L.length),E[j][F]=h(L.length,L.mode)+4+t.getCharCountIndicator(L.mode,I))}}T=D}for(let x=0;x<T.length;x++)E[T[x]].end=0;return{map:E,table:k}}function y(_,I){let k;const E=t.getBestModeForData(_);if(k=t.from(I,E),k!==t.BYTE&&k.bit<E.bit)throw new Error('"'+_+'" cannot be encoded with mode '+t.toString(k)+`.
141
141
  Suggested mode is: `+t.toString(E));switch(k===t.KANJI&&!i.isKanjiModeEnabled()&&(k=t.BYTE),k){case t.NUMERIC:return new n(_);case t.ALPHANUMERIC:return new o(_);case t.KANJI:return new r(_);case t.BYTE:return new a(_)}}e.fromArray=function(I){return I.reduce(function(k,E){return typeof E=="string"?k.push(y(E,null)):E.data&&k.push(y(E.data,E.mode)),k},[])},e.fromString=function(I,k){const E=p(I,i.isKanjiModeEnabled()),T=b(E),x=g(T,k),S=l.find_path(x.map,"start","end"),D=[];for(let N=1;N<S.length-1;N++)D.push(x.table[S[N]].node);return e.fromArray(m(D))},e.rawSplit=function(I){return e.fromArray(p(I,i.isKanjiModeEnabled()))}})(C6);const _b=Qa,F0=gb,k7e=a7e,I7e=r7e,T7e=v6,x7e=h6,C1=m6,S1=bb,A7e=i7e,Hm=y6,O7e=w6,D7e=hl,B0=C6;function P7e(e,t){const n=e.size,o=x7e.getPositions(t);for(let a=0;a<o.length;a++){const r=o[a][0],s=o[a][1];for(let i=-1;i<=7;i++)if(!(r+i<=-1||n<=r+i))for(let l=-1;l<=7;l++)s+l<=-1||n<=s+l||(i>=0&&i<=6&&(l===0||l===6)||l>=0&&l<=6&&(i===0||i===6)||i>=2&&i<=4&&l>=2&&l<=4?e.set(r+i,s+l,!0,!0):e.set(r+i,s+l,!1,!0))}}function M7e(e){const t=e.size;for(let n=8;n<t-8;n++){const o=n%2===0;e.set(n,6,o,!0),e.set(6,n,o,!0)}}function N7e(e,t){const n=T7e.getPositions(t);for(let o=0;o<n.length;o++){const a=n[o][0],r=n[o][1];for(let s=-2;s<=2;s++)for(let i=-2;i<=2;i++)s===-2||s===2||i===-2||i===2||s===0&&i===0?e.set(a+s,r+i,!0,!0):e.set(a+s,r+i,!1,!0)}}function R7e(e,t){const n=e.size,o=Hm.getEncodedBits(t);let a,r,s;for(let i=0;i<18;i++)a=Math.floor(i/3),r=i%3+n-8-3,s=(o>>i&1)===1,e.set(a,r,s,!0),e.set(r,a,s,!0)}function V0(e,t,n){const o=e.size,a=O7e.getEncodedBits(t,n);let r,s;for(r=0;r<15;r++)s=(a>>r&1)===1,r<6?e.set(r,8,s,!0):r<8?e.set(r+1,8,s,!0):e.set(o-15+r,8,s,!0),r<8?e.set(8,o-r-1,s,!0):r<9?e.set(8,15-r-1+1,s,!0):e.set(8,15-r-1,s,!0);e.set(o-8,8,1,!0)}function L7e(e,t){const n=e.size;let o=-1,a=n-1,r=7,s=0;for(let i=n-1;i>0;i-=2)for(i===6&&i--;;){for(let l=0;l<2;l++)if(!e.isReserved(a,i-l)){let d=!1;s<t.length&&(d=(t[s]>>>r&1)===1),e.set(a,i-l,d),r--,r===-1&&(s++,r=7)}if(a+=o,a<0||n<=a){a-=o,o=-o;break}}}function F7e(e,t,n){const o=new k7e;n.forEach(function(l){o.put(l.mode.bit,4),o.put(l.getLength(),D7e.getCharCountIndicator(l.mode,e)),l.write(o)});const a=_b.getSymbolTotalCodewords(e),r=S1.getTotalCodewordsCount(e,t),s=(a-r)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const i=(s-o.getLengthInBits())/8;for(let l=0;l<i;l++)o.put(l%2?17:236,8);return B7e(o,e,t)}function B7e(e,t,n){const o=_b.getSymbolTotalCodewords(t),a=S1.getTotalCodewordsCount(t,n),r=o-a,s=S1.getBlocksCount(t,n),i=o%s,l=s-i,d=Math.floor(o/s),f=Math.floor(r/s),p=f+1,h=d-f,m=new A7e(h);let b=0;const g=new Array(s),y=new Array(s);let _=0;const I=new Uint8Array(e.buffer);for(let S=0;S<s;S++){const D=S<l?f:p;g[S]=I.slice(b,b+D),y[S]=m.encode(g[S]),b+=D,_=Math.max(_,D)}const k=new Uint8Array(o);let E=0,T,x;for(T=0;T<_;T++)for(x=0;x<s;x++)T<g[x].length&&(k[E++]=g[x][T]);for(T=0;T<h;T++)for(x=0;x<s;x++)k[E++]=y[x][T];return k}function V7e(e,t,n,o){let a;if(Array.isArray(e))a=B0.fromArray(e);else if(typeof e=="string"){let d=t;if(!d){const f=B0.rawSplit(e);d=Hm.getBestVersionForData(f,n)}a=B0.fromString(e,d||40)}else throw new Error("Invalid data");const r=Hm.getBestVersionForData(a,n);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=r;else if(t<r)throw new Error(`
142
142
  The chosen QR Code version cannot contain this amount of data.
143
143
  Minimum version required to store current data is: `+r+`.
144
144
  `);const s=F7e(t,n,a),i=_b.getSymbolSize(t),l=new I7e(i);return P7e(l,t),M7e(l),N7e(l,t),V0(l,n,0),t>=7&&R7e(l,t),L7e(l,s),isNaN(o)&&(o=C1.getBestMask(l,V0.bind(null,l,n))),C1.applyMask(o,l),V0(l,n,o),{modules:l,version:t,errorCorrectionLevel:n,maskPattern:o,segments:a}}f6.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let o=F0.M,a,r;return typeof n<"u"&&(o=F0.from(n.errorCorrectionLevel,F0.M),a=Hm.from(n.version),r=C1.from(n.maskPattern),n.toSJISFunc&&_b.setToSJISFunction(n.toSJISFunc)),V7e(t,a,o,r)};var E6={},iS={};(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let o=n.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+n);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(r){return[r,r]}))),o.length===6&&o.push("F","F");const a=parseInt(o.join(""),16);return{r:a>>24&255,g:a>>16&255,b:a>>8&255,a:a&255,hex:"#"+o.slice(0,6).join("")}}e.getOptions=function(o){o||(o={}),o.color||(o.color={});const a=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,r=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:r,scale:r?4:s,margin:a,color:{dark:t(o.color.dark||"#000000ff"),light:t(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},e.getScale=function(o,a){return a.width&&a.width>=o+a.margin*2?a.width/(o+a.margin*2):a.scale},e.getImageWidth=function(o,a){const r=e.getScale(o,a);return Math.floor((o+a.margin*2)*r)},e.qrToImageData=function(o,a,r){const s=a.modules.size,i=a.modules.data,l=e.getScale(s,r),d=Math.floor((s+r.margin*2)*l),f=r.margin*l,p=[r.color.light,r.color.dark];for(let h=0;h<d;h++)for(let m=0;m<d;m++){let b=(h*d+m)*4,g=r.color.light;if(h>=f&&m>=f&&h<d-f&&m<d-f){const y=Math.floor((h-f)/l),_=Math.floor((m-f)/l);g=p[i[y*s+_]?1:0]}o[b++]=g.r,o[b++]=g.g,o[b++]=g.b,o[b]=g.a}}})(iS);(function(e){const t=iS;function n(a,r,s){a.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=s,r.width=s,r.style.height=s+"px",r.style.width=s+"px"}function o(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(r,s,i){let l=i,d=s;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),s||(d=o()),l=t.getOptions(l);const f=t.getImageWidth(r.modules.size,l),p=d.getContext("2d"),h=p.createImageData(f,f);return t.qrToImageData(h.data,r,l),n(p,d,f),p.putImageData(h,0,0),d},e.renderToDataURL=function(r,s,i){let l=i;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),l||(l={});const d=e.render(r,s,l),f=l.type||"image/png",p=l.rendererOpts||{};return d.toDataURL(f,p.quality)}})(E6);var k6={};const z7e=iS;function nO(e,t){const n=e.a/255,o=t+'="'+e.hex+'"';return n<1?o+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':o}function z0(e,t,n){let o=e+t;return typeof n<"u"&&(o+=" "+n),o}function j7e(e,t,n){let o="",a=0,r=!1,s=0;for(let i=0;i<e.length;i++){const l=Math.floor(i%t),d=Math.floor(i/t);!l&&!r&&(r=!0),e[i]?(s++,i>0&&l>0&&e[i-1]||(o+=r?z0("M",l+n,.5+d+n):z0("m",a,0),a=0,r=!1),l+1<t&&e[i+1]||(o+=z0("h",s),s=0)):a++}return o}k6.render=function(t,n,o){const a=z7e.getOptions(n),r=t.modules.size,s=t.modules.data,i=r+a.margin*2,l=a.color.light.a?"<path "+nO(a.color.light,"fill")+' d="M0 0h'+i+"v"+i+'H0z"/>':"",d="<path "+nO(a.color.dark,"stroke")+' d="'+j7e(s,r,a.margin)+'"/>',f='viewBox="0 0 '+i+" "+i+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+f+' shape-rendering="crispEdges">'+l+d+`</svg>
145
- `;return typeof o=="function"&&o(null,h),h};const U7e=n7e,E1=f6,I6=E6,W7e=k6;function lS(e,t,n,o,a){const r=[].slice.call(arguments,1),s=r.length,i=typeof r[s-1]=="function";if(!i&&!U7e())throw new Error("Callback required as last argument");if(i){if(s<2)throw new Error("Too few arguments provided");s===2?(a=n,n=t,t=o=void 0):s===3&&(t.getContext&&typeof a>"u"?(a=o,o=void 0):(a=o,o=n,n=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(n=t,t=o=void 0):s===2&&!t.getContext&&(o=n,n=t,t=void 0),new Promise(function(l,d){try{const f=E1.create(n,o);l(e(f,t,o))}catch(f){d(f)}})}try{const l=E1.create(n,o);a(null,e(l,t,o))}catch(l){a(l)}}vl.create=E1.create;vl.toCanvas=lS.bind(null,I6.render);vl.toDataURL=lS.bind(null,I6.renderToDataURL);vl.toString=lS.bind(null,function(e,t,n){return W7e.render(e,n)});const H7e=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const q7e=()=>{};function K7e(...e){if(e.length!==1)return _n(...e);const t=e[0];return typeof t=="function"?al(PO(()=>({get:t,set:q7e}))):P(t)}function wb(e,t){const n=K7e(e),o=P("");return Se(n,async a=>{n.value&&H7e&&(o.value=await vl.toDataURL(a,t))},{immediate:!0}),o}const Y7e=e=>(At("data-v-e6b6ece9"),e=e(),Ot(),e),G7e={class:"link-tab"},Q7e={class:"row"},J7e={class:"left"},X7e=["src"],Z7e={class:"size-options"},eze=["onClick"],tze={class:"right"},nze={class:"switch"},oze=Y7e(()=>w("div",{class:"tip"},"注:根据中华人民共和国网络安全法规定,在收集个人信息时,需征得填表者同意,并不得违反法律、行政法规的规定和双方约定收集、使用个人信息。",-1)),aze=se({__name:"LinkTab",setup(e){const t=xa(),n=M({get:()=>gt.value.switch,set:f=>{gt.value.switch=f,s6()}}),o=[{name:"小号",size:200},{name:"中号",size:400,active:!0},{name:"大号",size:800}],a=wb(Ff,{width:400,margin:2}),r=f=>{const p=document.createElement("canvas");vl.toCanvas(p,Ff.value,{width:f,margin:2},h=>{h&&console.error(h);const m=document.createElement("a");m.href=p.toDataURL("image/png"),m.download=`${Lf()}_${f}_${new Date().getTime()}.png`,m.click()})},{copy:s,copied:i}=ub(),l=async()=>{await s($a.value),i.value?ht.success("复制链接成功"):ht.warning("复制链接失败")},d=()=>{window.open($a.value)};return(f,p)=>(C(),A("div",G7e,[w("div",Q7e,[w("div",J7e,[w("img",{class:"qrcode",src:c(a),alt:""},null,8,X7e),O(c(Yc),{trigger:"hover",placement:"bottom",width:"90","popper-style":{padding:"0 5px"}},{reference:H(()=>[O(c(Wt),{class:"btn",size:"small",type:"primary",link:"",onClick:p[0]||(p[0]=h=>r(400))},{default:H(()=>[Fe(" 下载 ")]),_:1})]),default:H(()=>[w("div",Z7e,[(C(),A(Ae,null,et(o,h=>w("div",{key:h.size,class:"item",onClick:m=>r(h.size)},ie(`${h.name}(${h.size}px * ${h.size}px)`),9,eze)),64))])]),_:1})]),w("div",tze,[w("div",nze,[O(c(Jl),{size:"small",modelValue:n.value,"onUpdate:modelValue":p[1]||(p[1]=h=>n.value=h),"active-value":0,"inactive-value":1},null,8,["modelValue"]),w("span",null,ie(c(t)==4?"预约开启":"问卷开启,数据收集中"),1)]),O(c(Pt),{class:"link",readonly:!0,"model-value":c($a)},{suffix:H(()=>[O(c(_o),{content:"直接打开"},{default:H(()=>[w("i",{class:"iconfont icon-form-share",onClick:d})]),_:1})]),_:1},8,["model-value"]),O(c(Wt),{class:"copy",type:"primary",onClick:l},{default:H(()=>[Fe(" 复制链接 ")]),_:1})])]),oze]))}}),rze=Ye(aze,[["__scopeId","data-v-e6b6ece9"]]),$b=e=>(At("data-v-345ff8f2"),e=e(),Ot(),e),sze={class:"wechat-tab"},ize=$b(()=>w("div",{class:"dot"},"1",-1)),lze=$b(()=>w("div",{class:"dot"},"2",-1)),uze=$b(()=>w("div",{class:"dot"},"3",-1)),cze=$b(()=>w("div",null,"在「文章设置-原文链接」中粘贴表单链接",-1)),dze={class:"url-row"},fze={class:"url-row"},pze={class:"qrcode"},vze=["src"],hze={class:"url-row"},mze={class:"url-row"},gze=se({__name:"WechatTab",setup(e){const t=M(()=>`<a href="${$a.value}">${Lf()}</a>`),n=wb($a,{width:400,margin:2}),{copy:o,copied:a}=ub(),r=async()=>{await o($a.value),a.value?ht.success("复制链接成功"):ht.warning("复制链接失败")},s=async()=>{await o(t.value),a.value?ht.success("复制代码成功"):ht.warning("复制代码失败")},i=()=>{window.open($a.value)},l=()=>{const I=document.createElement("a");I.href=n.value,I.download=`${Lf()}_400_${new Date().getTime()}.png`,I.click()},d=[{label:"已认证公众号",value:"1"},{label:"已开通微信支付",value:"2"},{label:"未认证公众号",value:"3"}],f=P(d[0].value),p=[{label:"公众号文章",value:"1"},{label:"底部菜单栏",value:"2"},{label:"自动回复",value:"3"}],h=P(p[0].value),m={"1,1":["原文链接","二维码"],"1,2":["超链接"],"1,3":["链接代码","表单链接"],"2,1":["超链接","原文链接","二维码"],"2,2":["超链接"],"2,3":["链接代码","表单链接"],"3,1":["原文链接","二维码"],"3,2":["二维码"],"3,3":["链接代码","表单链接"]},b=M(()=>`${f.value},${h.value}`),g=M(()=>m[b.value]),y=P(g.value[0]);return Zo(()=>{y.value=m[b.value][0]}),(_,I)=>(C(),A("div",sze,[O(c(zge),null,{default:H(()=>[O(c(y0),{timestamp:"公众号类型",placement:"top"},{dot:H(()=>[ize]),default:H(()=>[O(c(Pf),{modelValue:f.value,"onUpdate:modelValue":I[0]||(I[0]=k=>f.value=k)},{default:H(()=>[(C(),A(Ae,null,et(d,k=>O(c(Df),{value:k.value},{default:H(()=>[Fe(ie(k.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1}),O(c(y0),{timestamp:"发布到",placement:"top"},{dot:H(()=>[lze]),default:H(()=>[O(c(Pf),{modelValue:h.value,"onUpdate:modelValue":I[1]||(I[1]=k=>h.value=k)},{default:H(()=>[(C(),A(Ae,null,et(p,k=>O(c(Df),{value:k.value},{default:H(()=>[Fe(ie(k.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1}),O(c(y0),{timestamp:"嵌入方式",placement:"top"},{dot:H(()=>[uze]),default:H(()=>[O(c(Fg),{modelValue:y.value,"onUpdate:modelValue":I[2]||(I[2]=k=>y.value=k),type:"border-card"},{default:H(()=>[g.value.includes("原文链接")?(C(),ve(c(zr),{key:0,label:"原文链接",name:"原文链接"},{default:H(()=>[cze,w("div",dze,[O(c(Pt),{readonly:!0,"model-value":c($a)},{suffix:H(()=>[O(c(_o),{content:"直接打开"},{default:H(()=>[w("i",{class:"iconfont icon-form-share",onClick:i})]),_:1})]),_:1},8,["model-value"]),O(c(Wt),{class:"btn",onClick:r},{default:H(()=>[Fe(" 复制 ")]),_:1})])]),_:1})):G("",!0),g.value.includes("超链接")?(C(),ve(c(zr),{key:1,label:"超链接",name:"超链接"},{default:H(()=>[w("div",fze,[O(c(Pt),{readonly:!0,"model-value":c($a)},{suffix:H(()=>[O(c(_o),{content:"直接打开"},{default:H(()=>[w("i",{class:"iconfont icon-form-share",onClick:i})]),_:1})]),_:1},8,["model-value"]),O(c(Wt),{class:"btn",onClick:r},{default:H(()=>[Fe(" 复制 ")]),_:1})])]),_:1})):G("",!0),g.value.includes("二维码")?(C(),ve(c(zr),{key:2,label:"二维码",name:"二维码"},{default:H(()=>[w("div",pze,[w("img",{src:c(n),alt:""},null,8,vze),O(c(Wt),{size:"small",type:"primary",link:"",onClick:l},{default:H(()=>[Fe(" 下载 ")]),_:1})])]),_:1})):G("",!0),g.value.includes("链接代码")?(C(),ve(c(zr),{key:3,label:"链接代码",name:"链接代码"},{default:H(()=>[w("div",hze,[O(c(Pt),{"model-value":t.value,readonly:!0},null,8,["model-value"]),O(c(Wt),{class:"btn",onClick:s},{default:H(()=>[Fe(" 复制代码 ")]),_:1})])]),_:1})):G("",!0),g.value.includes("表单链接")?(C(),ve(c(zr),{key:4,label:"表单链接",name:"表单链接"},{default:H(()=>[w("div",mze,[O(c(Pt),{readonly:!0,"model-value":c($a)},{suffix:H(()=>[O(c(_o),{content:"直接打开"},{default:H(()=>[w("i",{class:"iconfont icon-form-share",onClick:i})]),_:1})]),_:1},8,["model-value"]),O(c(Wt),{class:"btn",onClick:r},{default:H(()=>[Fe(" 复制 ")]),_:1})])]),_:1})):G("",!0)]),_:1},8,["modelValue"])]),_:1})]),_:1})]))}}),bze=Ye(gze,[["__scopeId","data-v-345ff8f2"]]),yze=e=>(At("data-v-c76da449"),e=e(),Ot(),e),_ze={class:"publish-modal"},wze=yze(()=>w("div",{class:"title"},"发布表单",-1)),$ze=se({__name:"index",setup(e){let t=null;const n={getBoundingClientRect:()=>{if(!t){const{width:l}=document.body.getBoundingClientRect();return{left:l-100,top:30,width:100,height:60}}return t}},o=P(!1),a=()=>{var d,f;const l=document.getElementById("publish-form-btn");l&&(t=l.getBoundingClientRect()),o.value=!0,!exports.globalInject.isAdvancedVip()&&((f=(d=exports.globalInject.getRoute())==null?void 0:d.query)==null?void 0:f.scene)==="4"&&(gt.value.prob_status===0||gt.value.prob_status===2)&&ht.error("您还不是高级版及以上会员,预约发布仅可浏览但无法提交")},r=()=>{if(O$()){const{showConfirm:l}=ul();l({type:"warn",title:"表单未保存",content:"是否需要保存后再发布?",cancelText:"否,直接发布",confirmText:"是,保存后发布",onConfirm:async()=>{await eS(),a()},onCancel:a})}else a()};document.addEventListener("form-render:publish",r),po(()=>{document.removeEventListener("form-render:publish",r)});const s=[{name:"link",label:"分享链接",component:rze},{name:"wechat",label:"发布到微信公众号",component:bze}],i=P("link");return(l,d)=>(C(),ve(c(Yc),{"show-arrow":!1,"virtual-ref":n,trigger:"click","virtual-triggering":"",visible:o.value,"onUpdate:visible":d[1]||(d[1]=f=>o.value=f),width:"500","popper-style":{padding:"20px"}},{default:H(()=>[w("div",_ze,[wze,O(c(Fg),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=f=>i.value=f),class:"tabs"},{default:H(()=>[(C(),A(Ae,null,et(s,f=>O(c(zr),{label:f.label,name:f.name},{default:H(()=>[(C(),ve(Kt(f.component)))]),_:2},1032,["label","name"])),64))]),_:1},8,["modelValue"])])]),_:1},8,["visible"]))}}),Cze=Ye($ze,[["__scopeId","data-v-c76da449"]]);var jl=(e=>(e.Editor="0",e.Setting="1",e.Publish="2",e.Data="3",e))(jl||{});const oO=e=>Object.values(jl).some(t=>t===e),Sze=e=>{const t=P(oO(e)?e:"0"),n=a=>{const r=exports.globalInject.getRoute();exports.globalInject.getRouter().replace({query:{...r.query,tab:a}})},o=a=>{const r=t.value,s=a.detail;!oO(s)||s===r||(t.value=s,n(s))};return st(()=>{document.addEventListener("form-render:tab-change",o)}),po(()=>{document.removeEventListener("form-render:tab-change",o)}),{activeTab:t}},Eze=se({__name:"App",props:{tab:{}},setup(e){const t=e,{activeTab:n}=Sze(t.tab),o={[jl.Editor]:An(()=>Promise.resolve().then(()=>require("./index-DDUh0DJT.cjs")).then(r=>r.index)),[jl.Setting]:An(()=>Promise.resolve().then(()=>require("./index-CHpG34g7.cjs")).then(r=>r.index)),[jl.Data]:An(()=>Promise.resolve().then(()=>require("./index-B_TK71cG.cjs"))),[jl.Publish]:An(()=>Promise.resolve().then(()=>require("./index-DpRNjwWQ.cjs")))},a=()=>{const r=document.createElement("script");r.src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js",r.onload=()=>{console.log("WeChat SDK loaded")},r.onerror=()=>{console.error("Failed to load WeChat SDK")},document.head.appendChild(r)};return f8(),po(()=>{bye(),_9e(),F$(),a()}),(r,s)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":5e3},{default:H(()=>[(C(),ve(Kt(o[c(n)]))),O(Cze)]),_:1},8,["locale"]))}}),T6=function(){return document.ontouchstart!==null?"click":"touchstart"},qm="__vue_click_away__",x6=function(e,t,n){A6(e);let o=n.context,a=t.value,r=!1;setTimeout(function(){r=!0},0),e[qm]=function(s){if((!e||!e.contains(s.target))&&a&&r&&typeof a=="function")return a.call(o,s)},document.addEventListener(T6(),e[qm],!1)},A6=function(e){document.removeEventListener(T6(),e[qm],!1),delete e[qm]},kze=function(e,t,n){t.value!==t.oldValue&&x6(e,t,n)},Ize={install:function(e){e.directive("click-away",Tze)}},Tze={mounted:x6,updated:kze,unmounted:A6},xze=e=>{e.component("icon",jf),e.component("SvgIcon",LN)},Aze=e=>{e.directive("loading",BM.directive)},Oze=e=>{e.use(Ize)},Dze=()=>{const e=Object.assign({"../assets/iconfont/iconfont.js":()=>Promise.resolve().then(()=>require("./iconfont-CRr0eauA.cjs"))});for(const t in e)e[t]()},id=e=>{xze(e),Aze(e),Oze(e),Dze()},Pze=e=>{const t=si(Eze,e);return t.config.compilerOptions.isCustomElement=n=>n.startsWith("wx-"),id(t),t},Mze=e=>(At("data-v-e2b2bb68"),e=e(),Ot(),e),Nze={class:"dialog-main"},Rze=Mze(()=>w("div",{class:"title"},"请输入密码填写表单",-1)),Lze={class:"error-text"},Fze=se({__name:"InputPassword",emits:["closed"],setup(e,{emit:t}){const n=P(!1),o=()=>{n.value=!1};st(()=>{n.value=!0});const a=P(""),r=P(""),s=()=>{a.value===gt.value.details.password?o():r.value=a.value.length?"密码错误":"请输入密码"};return(i,l)=>(C(),ve(c(Ga),{modelValue:n.value,"onUpdate:modelValue":l[2]||(l[2]=d=>n.value=d),width:"400px",top:"30vh","show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1,"modal-class":"input-password-modal",onClosed:l[3]||(l[3]=d=>i.$emit("closed"))},{default:H(()=>[w("div",Nze,[Rze,O(c(Pt),{class:B(["input",{"error-input":r.value}]),size:"large",type:"password",modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=d=>a.value=d),modelModifiers:{trim:!0},placeholder:"密码","show-password":!0,onInput:l[1]||(l[1]=d=>r.value="")},{prefix:H(()=>[w("i",{class:B(["iconfont icon-form-lock",{error:r.value}])},null,2)]),_:1},8,["class","modelValue"]),w("div",Lze,ie(r.value),1),w("div",{class:"btn",onClick:s}," 验证 ")])]),_:1},8,["modelValue"]))}}),Bze=Ye(Fze,[["__scopeId","data-v-e2b2bb68"]]);var Vze=Xr,zze=function(){return Vze.Date.now()},jze=zze,Uze=ii,j0=jze,aO=P$,Wze="Expected a function",Hze=Math.max,qze=Math.min;function Kze(e,t,n){var o,a,r,s,i,l,d=0,f=!1,p=!1,h=!0;if(typeof e!="function")throw new TypeError(Wze);t=aO(t)||0,Uze(n)&&(f=!!n.leading,p="maxWait"in n,r=p?Hze(aO(n.maxWait)||0,t):r,h="trailing"in n?!!n.trailing:h);function m(x){var S=o,D=a;return o=a=void 0,d=x,s=e.apply(D,S),s}function b(x){return d=x,i=setTimeout(_,t),f?m(x):s}function g(x){var S=x-l,D=x-d,N=t-S;return p?qze(N,r-D):N}function y(x){var S=x-l,D=x-d;return l===void 0||S>=t||S<0||p&&D>=r}function _(){var x=j0();if(y(x))return I(x);i=setTimeout(_,g(x))}function I(x){return i=void 0,h&&o?m(x):(o=a=void 0,s)}function k(){i!==void 0&&clearTimeout(i),d=0,o=l=a=i=void 0}function E(){return i===void 0?s:I(j0())}function T(){var x=j0(),S=y(x);if(o=arguments,a=this,l=x,S){if(i===void 0)return b(l);if(p)return clearTimeout(i),i=setTimeout(_,t),m(l)}return i===void 0&&(i=setTimeout(_,t)),s}return T.cancel=k,T.flush=E,T}var O6=Kze;const Yze=vo(O6);var Gze=O6,Qze=ii,Jze="Expected a function";function Xze(e,t,n){var o=!0,a=!0;if(typeof e!="function")throw new TypeError(Jze);return Qze(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),Gze(e,t,{leading:o,maxWait:t,trailing:a})}var Zze=Xze;const D6=vo(Zze),uS=e=>{const n=P(!1),o=()=>{e.value&&(n.value=e.value.offsetWidth<780)};st(o);const a=D6(o,500);return window.addEventListener("resize",a),po(()=>{window.removeEventListener("resize",a)}),{isFullSize:n}},P6=e=>(At("data-v-ed255526"),e=e(),Ot(),e),eje=["innerHTML"],tje=P6(()=>w("div",{class:"tit"},"题目结构",-1)),nje={class:"val"},oje={class:"table"},aje=P6(()=>w("div",{class:"row"},[w("div",{class:"col1"},"题型"),w("div",{class:"col2"},"出题数目")],-1)),rje={class:"col1"},sje={class:"col2"},ije={class:"btn-row"},lje=se({__name:"PreNotice",emits:["start"],setup(e,{emit:t}){const n=M(()=>D$(Rf.value)),o=P(),a=P(!1);st(()=>{o.value&&(a.value=o.value.offsetWidth<780)});const{isFullSize:r}=uS(o);return(s,i)=>(C(),A("div",{class:B(["pre-notice",{full:c(r)}]),ref_key:"preNoticeRef",ref:o},[w("div",{class:B(["title",{mobile:a.value}])},ie(c(Io).attrs.title),3),c(gt).test_setting.show_pre_notice?(C(),A("div",{key:0,class:B(["item",{mobile:a.value}])},[w("div",{class:"val",innerHTML:c(gt).test_setting.pre_notice_content},null,8,eje)],2)):G("",!0),c(gt).test_setting.show_topic_structure?(C(),A("div",{key:1,class:B(["item",{mobile:a.value}])},[tje,w("div",nje,[w("div",oje,[aje,(C(!0),A(Ae,null,et(n.value,l=>(C(),A("div",{key:l.name,class:"row"},[w("div",rje,ie(l.title),1),w("div",sje,ie(l.total),1)]))),128))])])],2)):G("",!0),w("div",ije,[w("div",{class:B(["start-btn",{mobile:a.value}]),onClick:i[0]||(i[0]=l=>s.$emit("start"))}," 我知道了,开始答题 ",2)])],2))}}),uje=Ye(lje,[["__scopeId","data-v-ed255526"]]),cje={class:"agreement-dialog"},dje={class:"agreement-content"},fje=y4('<div class="agreement-title" data-v-02371898>表单填写须知</div><div class="agreement-text" data-v-02371898><p class="sub" data-v-02371898>在填写本问卷前,请您务必仔细阅读并理解以下重要提示:</p><p data-v-02371898><strong data-v-02371898>1.信息提交即授权:</strong>当您填写并提交本表单,即代表您自愿授权表单的创建者收集和使用您所填写的信息(可能包括姓名、联系方式、身份证号、位置信息等信息)。 </p><p data-v-02371898><strong data-v-02371898>2.请谨慎判断和提交:</strong> 请您自行判断是否同意向表单创建者提供这些信息。如果您对提供某些信息存在<strong data-v-02371898>疑虑或不同意,请切勿填写并提交</strong>。您提交的所有信息将由表单创建者负责接收、存储、处理和使用。如您对问卷收集信息的目的、用途、安全性或隐私政策有<strong data-v-02371898>任何疑问或顾虑</strong>,请直接联系本表单的创建者。 </p><p data-v-02371898><strong data-v-02371898>八木屋二维码仅为表单设计、发布与收集的技术服务。平台自身不会查看、使用或以任何方式处理您提交给表单创建者的具体信息内容。</strong></p></div>',2),pje=se({__name:"agreementDialog",emits:["agree","disagree"],setup(e,{emit:t}){const n=t;function o(){n("agree")}return(a,r)=>(C(),A("div",cje,[w("div",dje,[fje,O(c(Vm),{type:"primary",style:{width:"100%"},onClick:o},{default:H(()=>[Fe("确定")]),_:1})])]))}}),vje=Ye(pje,[["__scopeId","data-v-02371898"]]),hje=se({__name:"FormHeader",setup(e){const t=QC.pageHeader,n=M(()=>kn.value===Io.value.id),o=de("editable"),a=()=>{o&&Vf(Io.value.id)};return(r,s)=>(C(),A("div",{class:B(["form-header",{editable:c(o),active:n.value}]),onClick:a},[O(c(t),{attrs:c(Io).attrs},null,8,["attrs"])],2))}}),mje=Ye(hje,[["__scopeId","data-v-dd4105fc"]]),qh=P(null),Kh=P(null),M6="widgets",N6=(e,t)=>{e.dragged.dataset.widgetType;const o=t.target,a=o.dataset.widgetType,r=o.dataset.widgetId,s=nt.value.findIndex(i=>i.id===r);return nt.value.length?!(a==="pagination"&&s===0):!0},R6=new Map,cS=P(null),gje=e=>{cS.value=e.id},bje=()=>{cS.value=null},yje={key:0,class:"iconfont icon-form-handle-h drag-icon"},_je=se({__name:"DragHandle",setup(e){const t=de("editable"),n=de("widgetStore"),o=()=>n.type==="pagination"&&n.index===0,a=M(()=>t&&(n.isActive||n.isHover)&&!o()&&!n.attrs.fixedBottom);return(r,s)=>a.value?(C(),A("i",yje)):G("",!0)}}),wje=Ye(_je,[["__scopeId","data-v-b0994d94"]]);var Kf=(e=>(e[e.Error=0]="Error",e[e.Success=1]="Success",e))(Kf||{});const L6=(e,t)=>{const n={};for(const o of e){const a=t[o.id];n[o.id]=B6(o,a)}return n},Mn={status:1,message:""},os={status:0,message:"该题为必填"},F6={status:0,message:"该题的补充信息为必填"},B6=(e,t)=>{switch(e.type){case"basicInput":case"nameInput":case"textarea":case"companyInput":case"departmentInput":case"positionInput":case"fillBlank":case"fillBlank2":case"shortAnswer":case"shortAnswer2":return Pc(e.attrs,t);case"emailInput":return pS(e.attrs,t);case"idCardInput":return Ym(e.attrs,t);case"phoneInput":return Km(e.attrs,t);case"numberInput":case"numberFillBlank":return dS(e.attrs,t);case"rate":return Cje(e.attrs,t);case"date":return fS(e.attrs,t);case"checkbox":case"imgCheckbox":case"eduImgCheckbox":case"eduCheckbox":return Sje(e,e.attrs,t);case"imgRadio":case"eduImgRadio":return rO(e,e.attrs,t);case"sort":return Eje(e.attrs,t);case"ageRadio":case"basicRadio":case"educationRadio":case"occupationRadio":case"sexRadio":case"eduRadio":case"eduJudgement":return rO(e,e.attrs,t);case"basicSelect":case"eduSelect":return _h(e.attrs,t);case"multiSelect":return U0(e.attrs,t);case"businessSelect":return U0(e.attrs,t);case"nationSelect":return _h(e.attrs,t);case"regionSelect":return U0(e.attrs,t);case"file":case"resume":case"work":return $je(e.attrs,t);case"geolocation":return _h(e.attrs,t);case"pagination":return Mn;case"preparerPhoneInput":return Km(e.attrs,t==null?void 0:t.value);case"preparerNameInput":case"preparerWorkIdInput":return Pc(e.attrs,t==null?void 0:t.value);case"preparerIdCardInput":return Ym(e.attrs,t==null?void 0:t.value);case"checkEntry":return kje(e.attrs,t);case"watermark":return Ije(e.attrs,t==null?void 0:t.value);case"location":return Tje(e.attrs,t==null?void 0:t.value);case"basicTable":return xje(e.attrs,t);case"dynamicTable":return Aje(e.attrs,t);case"customTableOcr":return Oje(e.attrs);default:return console.warn("verifyValue",`undispatched widget type: ${e.type}`),_h(e.attrs,t)}},_h=(e,t)=>e.required&&!t?os:Mn,Pc=(e,t)=>t?e.minLength&&t.length<e.minLength?{status:0,message:`最少输入${e.minLength}字`}:e.maxLength&&t.length>e.maxLength?{status:0,message:`最多输入${e.maxLength}字`}:Mn:e.required?os:Mn,Km=(e,t)=>t?/^1[3-9]\d{9}$/.test(t)?Mn:{status:0,message:"手机号格式不正确"}:e.required?os:Mn,dS=(e,t)=>t===void 0?e.required?os:Mn:e.min&&t<e.min?{status:0,message:`最小值为${e.min}`}:e.max&&t>e.max?{status:0,message:`最大值为${e.max}`}:Mn,$je=(e,t)=>e.required&&!(t&&t.length)?{status:0,message:"该题为必填"}:Mn,Cje=(e,t)=>e.required&&!t?os:Mn,fS=(e,t)=>e.required&&!t?os:Mn,rO=(e,t,n)=>{if(t.required&&!n)return os;if(e.type=="basicRadio"&&n){const o=t.list.find(a=>a.value==n.id);if(o.hasInput&&o.required&&(n.supplyInput==""||n.supplyInput==null))return F6}return Mn},Sje=(e,t,n)=>{let o=!1;return e.type=="checkbox"&&n&&n.map(a=>{const r=t.list.find(s=>s.value==a.id);r.hasInput&&r.required&&(a.supplyInput==""||!a.supplyInput)&&(o=!0)}),o?F6:t.required&&!n?os:t.min&&(!n||n.length<t.min)?{status:0,message:`最少选择${t.min}项`}:t.max&&n&&n.length>t.max?{status:0,message:`最多选择${t.max}项`}:Mn},Eje=(e,t)=>e.required&&(t==null?void 0:t.length)!==e.list.length?{status:0,message:"排序数量不正确"}:Mn,U0=(e,t)=>e.required&&(!(t!=null&&t.length)||t.every(n=>!n))?os:Mn,pS=(e,t)=>t?Vbe(t)?Mn:{status:0,message:"邮箱格式不正确"}:e.required?os:Mn,Ym=(e,t)=>t?zbe(t)?Mn:{status:0,message:"身份证格式不正确"}:e.required?os:Mn,kje=(e,t)=>e.required?t?e.list.some(o=>o.checked===null)?{status:0,message:"请进行检查项填写"}:Mn:{status:0,message:"请进行检查项填写"}:Mn,Ije=(e,t)=>e.required&&!t?{status:0,message:"请填写签名"}:Mn,Tje=(e,t)=>e.required&&!t?{status:0,message:"请获取位置"}:Mn,xje=(e,t)=>{if(!t||Object.keys(t).every(r=>!t[r].text_value.trim()))return Mn;const o=e.options.items,a={text:Pc,textarea:Pc,number:dS,date:fS,email:pS,idCard:Ym,phone:Km};for(let r=0;r<o.length;r++){const s=o[r];if(!s.text_value)continue;const i=a[s.type](s,s.text_value);if((i==null?void 0:i.status)!==1)return i.id=s.id,i}return Mn},Aje=(e,t)=>{if(!t)return e.required?{status:0,message:`至少填写${e.min||1}组`}:Mn;const n=t.length;if(e.min&&n<e.min)return{status:0,message:`至少填写${e.min}组`};const o=e.options.items,a={text:Pc,textarea:Pc,number:dS,date:fS,email:pS,idCard:Ym,phone:Km};for(let r=0;r<o.length;r++){const s=o[r];for(let i=0;i<t.length;i++){const l=t[i][s.id];if(!l.text_value)continue;const d=a[s.type](s,l.text_value);if((d==null?void 0:d.status)!==1)return d.id=s.id,d}}return Mn},Oje=(e,t)=>{const n=e.sections.flatMap(a=>a.fields);if(n.length===0)return{status:0,message:"至少配置一个识别字段"};if(n.length>30)return{status:0,message:"最多配置30个识别字段"};const o=new Set;for(const a of n){if(!a.label||a.label.trim()==="")return{status:0,message:"识别字段名称不能为空"};if(a.label.length>50)return{status:0,message:`字段名称"${a.label}"不能超过50个字`};if(o.has(a.label))return{status:0,message:`字段名称"${a.label}"重复`};o.add(a.label)}return Mn},Dje=["data-widget-id","data-widget-type"],Pje=se({__name:"Widget",props:{widget:{},mode:{},isDateModal:{type:Boolean},memberInfo:{}},setup(e){const t=e,n=de("editable"),o=de("formStore"),a=de("isMobileSize"),r=gn({id:t.widget.id,mode:t.mode,type:M(()=>t.widget.type),voteTotal:M(()=>t.widget.voteTotal),index:M(()=>a8(r.id,r.type)),attrs:M(()=>t.widget.attrs),updateAttr:(m,b)=>{const g=nt.value.findIndex(y=>y.id===t.widget.id);nt.value[g].attrs.hasOwnProperty(m)||console.warn("updateAttr",`widget ${t.widget.id} has no attr ${m}`),nt.value[g].attrs[m]=b},errorAttrs:M(()=>n?Tc.value[t.widget.id]||{}:{}),updateErrorAttrs:()=>{Tc.value[t.widget.id]=a6(t.widget)},isActive:M(()=>{var m;return n&&!o.isBatchSettingAnswer&&((m=zg.value)==null?void 0:m.id)===t.widget.id}),isHover:M(()=>n&&!o.isBatchSettingAnswer&&cS.value===t.widget.id),isDragging:M(()=>n&&Kh.value===t.widget.id),isChoosen:M(()=>n&&qh.value===t.widget.id),value:M(()=>o.data[t.widget.id]),updateValue:m=>{o.data[t.widget.id]=m},updatePayInfo:m=>o.pay_info[t.widget.id]=m,valueVer:M(()=>o.dataVer[t.widget.id]),updateValueVer:()=>{o.dataVer[t.widget.id]=B6(t.widget,o.data[t.widget.id])},isSettingAnswer:o.isBatchSettingAnswer,updateIsSettingAnswer:m=>r.isSettingAnswer=m,checkAutoSave:()=>{},isDateModal:M(()=>t.isDateModal??!1),disabled:M(()=>r.attrs.disabled),updateDisabled:m=>{r.updateAttr("disabled",m)},isTeam:!1,updateIsTeam:m=>{r.isTeam=m}});Tt("widgetStore",r);const s=async()=>{var T,x,S,D,N,L,F,z,j,X,U;if(!localStorage.getItem("authInfo"))return;const b=exports.globalInject.getRoute(),{phone:g,form_answer:y}=b.query,_=((x=(T=t.memberInfo)==null?void 0:T.profile_info)==null?void 0:x.nickname)||((S=t.memberInfo)==null?void 0:S.nickname),I=!!((N=(D=t.memberInfo)==null?void 0:D.profile_info)!=null&&N.team_member);r.updateIsTeam(I),r.type==="preparerNameInput"&&(r.updateValue({value:_}),r.updateDisabled(I)),r.type==="preparerPhoneInput"&&(r.updateValue({value:g||((F=(L=t.memberInfo)==null?void 0:L.profile_info)==null?void 0:F.phone)}),r.updateDisabled(!0)),r.type==="preparerIdCardInput"&&(r.updateValue({value:(j=(z=t.memberInfo)==null?void 0:z.profile_info)==null?void 0:j.passport_id}),r.updateDisabled(!1)),r.type==="preparerWorkIdInput"&&(r.updateValue({value:(U=(X=t.memberInfo)==null?void 0:X.profile_info)==null?void 0:U.work_id}),r.updateDisabled(!1));const k=["preparerNameInput","preparerPhoneInput","preparerIdCardInput","preparerWorkIdInput","location"];if(!y)return;const E=JSON.parse(decodeURIComponent(y)||"{}");if(!k.includes(t.widget.type)){const W=E[t.widget.id],q={checkEntry:i,basicTable:l,basicSelect:d}[t.widget.type];q&&q(W),r.updateValue(W)}};Zo(()=>{t.memberInfo&&s()});const i=m=>{r.attrs.list.forEach(b=>{b.checked=m[b.id].checked,b.value=m[b.id].value,b.desc=m[b.id].desc})},l=m=>{r.attrs.options.items.forEach(b=>{b.text_value=m[b.id].text_value})},d=m=>{r.attrs.value={value:m.id,label:m.label}},f=n&&{onClick:()=>{Vf(t.widget.id)},onMouseover:()=>{gje(t.widget)},onMouseleave:()=>{bje()}},p=M(()=>n?"editor-padding":a.value?"mobile-padding":"pc-padding"),h=M(()=>r.isDragging?{backgroundColor:"#fafafa",borderColor:"#eee",coverColor:"#eee"}:r.isActive?{backgroundColor:"#fafafa",borderColor:"#d8d8d8",coverColor:"transparent"}:Object.keys(r.errorAttrs).length?{backgroundColor:"#ffc7c788",borderColor:"#ea0000",coverColor:"transparent"}:r.isHover?{backgroundColor:"#fafafa",borderColor:"#d8d8d8",coverColor:"transparent"}:{backgroundColor:"#ffffff",borderColor:"transparent",coverColor:"transparent"});return(m,b)=>(C(),A("div",vn({class:["widget",[p.value,!m.widget.attrs.fixedBottom&&"draggable-item",m.widget.attrs.fixedBottom&&c(a)&&"fix-bottom"]],style:{backgroundColor:h.value.backgroundColor},"data-widget-id":m.widget.id,"data-widget-type":m.widget.type},c(f)),[(C(),ve(Kt(c(y9e)(m.widget.type)),{id:m.widget.id,type:m.widget.type,attrs:m.widget.attrs,value:c(o).data[m.widget.id],"onUpdate:value":b[0]||(b[0]=g=>c(o).data[m.widget.id]=g)},null,40,["id","type","attrs","value"])),O(wje),w("div",{class:"border",style:Ze({borderColor:h.value.borderColor,backgroundColor:h.value.coverColor})},null,4)],16,Dje))}}),Mje=Ye(Pje,[["__scopeId","data-v-3202b929"]]),Nje={},Rje=e=>(At("data-v-c38f2101"),e=e(),Ot(),e),Lje={class:"empty-view"},Fje=Rje(()=>w("div",{class:"inner"},[w("i",{class:"iconfont icon-form-mouse"}),w("span",null,"点击左侧字段"),w("span",null,"  或  "),w("i",{class:"iconfont icon-form-move"}),w("span",null,"拖拽字段到此处")],-1)),Bje=[Fje];function Vje(e,t){return C(),A("div",Lje,Bje)}const zje=Ye(Nje,[["render",Vje],["__scopeId","data-v-c38f2101"]]),jje={key:0,class:"confirm-code"},Uje={class:"confirm-container"},Wje=se({__name:"WidgetList",props:{mode:"",isDateModal:!1},setup(e){xa();const t=de("formMode"),n=de("formStore"),o=t.value==="editor",a=P(),r=P(null);o&&Ir(a,nt,{group:{name:M6,put:!0,pull:!1},animation:100,direction:"vertical",draggable:".draggable-item",handle:".drag-icon",dragClass:"widget",forceFallback:!0,chosenClass:"choosen-widget",onStart:l=>{const d=l.item.dataset.widgetId;if(!d){console.warn("onDragStart","widgetId is not found");return}Kh.value=d},onEnd:l=>{Kh.value=null},onChoose:l=>{const d=l.item.dataset.widgetId;if(!d){console.warn("onDragStart","widgetId is not found");return}qh.value=d,document.body.classList.add("draggable-cursor")},onUnchoose:l=>{qh.value=null,document.body.classList.remove("draggable-cursor")},onMove:N6,onAdd:l=>{const d=R6.get(l.item.dataset.widgetId),f=nt.value.find(p=>p.id===d);if(!f){console.warn("onAdd","addedWidget is not found");return}t6(f),Vf(f.id)}}),st(async()=>{await i()}),po(()=>{Vf(null),qh.value=null,Kh.value=null});const i=async()=>{const l=exports.globalInject.getRoute(),d=localStorage.getItem("authInfo");if(!d)return;const f=JSON.parse(d),{data:{status:p,result:h}}=await exports.globalInject.$axios.get(`/v2/form/getMemberInfo?openid=${f.openid}&unionid=${f.unionid}&pid=${l.query.pid}`);p===1&&(r.value=h)};return(l,d)=>(C(),A("div",{class:"widget-list",ref_key:"widgetListRef",ref:a},[(C(!0),A(Ae,null,et(c(n).widgetList,f=>(C(),ve(Mje,{key:f.id,widget:f,mode:e.mode,isDateModal:e.isDateModal,memberInfo:r.value},null,8,["widget","mode","isDateModal","memberInfo"]))),128)),c(gt).details.confirmCode==1&&e.mode=="answer"?(C(),A("div",jje,[w("span",null,ie(c(gt).details.confirmName),1),w("div",Uje,ie(c(n).confirm_code),1)])):G("",!0),o&&!c(n).widgetList.length?(C(),ve(zje,{key:1})):G("",!0)],512))}}),vS=Ye(Wje,[["__scopeId","data-v-4d02093b"]]),Hje=se({__name:"FooterButton",props:{text:{},disabled:{type:Boolean},onClick:{type:Function},type:{}},setup(e){const t=de("isMobileSize");return(n,o)=>(C(),A("div",{class:B(["footer-btn",{disabled:n.disabled,mobile:c(t),autoFill:!n.disabled&&n.type==="info"}]),onClick:o[0]||(o[0]=(...a)=>n.onClick&&n.onClick(...a))},ie(n.text),3))}}),qje=Ye(Hje,[["__scopeId","data-v-caf3aed0"]]);let Pi;async function Kje(e){const t=Math.floor(Date.now()/1e3),n=t-Math.floor(performance.now()/1e3);let o={form_id:e.id,answer:e.answer,fake_id:e.fake_id,meta_info:{answerInfo:{endTime:t,startTime:n}},code:e.confirm_code};e.type==4&&(o=await d6({answer_id:e.id}));let a=JSON.parse(localStorage.getItem(e.id)||"[]");a.unshift(o),Pi=a,localStorage.setItem(e.id,JSON.stringify(a))}function sO(e){let t=JSON.parse(localStorage.getItem(e)||"[]");return Pi=t,t}function Yje(e,t){Pi&&Pi.length?(Pi=Pi.map(n=>n.fake_id===e?{...n,answer:t}:n),localStorage.setItem(Pi[0].form_id,JSON.stringify(Pi))):console.error("modifyStoreDate data is empty")}const hS=e=>(At("data-v-705ad3bb"),e=e(),Ot(),e),Gje=hS(()=>w("div",{class:"center"},"收银台",-1)),Qje={class:"dialog-content"},Jje=hS(()=>w("div",null,"八木屋表单支付",-1)),Xje={class:"qrcode-content"},Zje=hS(()=>w("p",null,"请使用微信扫一扫支付",-1)),eUe={class:"price"},tUe={ref:"qrcode",id:"canvas",class:"qrcode"},nUe=se({__name:"PayDialog",props:{visible:!1,code_url:"",order_num:"",pay_money:0},emits:["close"],setup(e,{emit:t}){const n=t,o=e,a=M({get:()=>o.visible,set:()=>{}}),r=P(null),s=()=>{n("close")};Se(a,d=>{d&&ot(()=>{l()}),d||clearInterval(r.value)});const i=d=>(parseFloat(d)/100).toFixed(2),l=()=>{var d=document.getElementById("canvas");vl.toCanvas(d,o.code_url,function(f){f&&console.error(f)}),r.value=setInterval(async()=>{const f=await exports.globalInject.$axios.get(`/v1/WxMchOrder/getOrderStatus?order_num=${o.order_num}`);f.data.result.status==1?(console.debug("支付成功"),n("close"),document.dispatchEvent(new CustomEvent("form-render:submit-success",{detail:f})),clearInterval(r.value)):f.data.result.status==2?(console.debug("支付关闭"),clearInterval(r.value)):console.debug("支付中")},2e3)};return(d,f)=>(C(),ve(c(Ga),{fullscreen:"",modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=p=>a.value=p),onClose:s,class:"custom-dialog"},{header:H(({close:p,titleId:h,titleClass:m})=>[w("div",{class:"dialog-header"},[w("div",{class:"left",onClick:s}," < 返回表单 "),Gje])]),default:H(()=>[w("div",Qje,[Jje,w("div",Xje,[Zje,w("div",eUe,"¥"+ie(i(e.pay_money)),1),w("canvas",tUe,null,512)])])]),_:1},8,["modelValue"]))}}),oUe=Ye(nUe,[["__scopeId","data-v-705ad3bb"]]),V6=async(e,t)=>{var n;e.isBatchSettingAnswer=!1,(n=e.pageList[e.pageNumber])==null||n.forEach(o=>{t[o.id]&&(o.attrs.standard=t[o.id],o.attrs.value=t[o.id])}),e.data={...e.data,...t},ht.success("已填充上次提交的内容")},aUe={class:"button-list"},rUe=se({__name:"ButtonList",setup(e,{expose:t}){de("isMobileSize"),P(!1);const n=de("formMode"),o=de("editable"),a=de("formStore"),r=de("lastAnswerInfo"),s=P(""),i=P(""),l=P(0),d=P(!1);P(""),de("widgetStore");const f={4016:"预约时间错误",4017:"预约名额不足",4018:"预约失败",4015:"商品库存不足"},p=de("setAnswerInfo"),h=M(()=>gt.value.auto_fill.isFill&&gt.value.auto_fill.type===1&&Object.keys(r.value).length>0),m=M(()=>{const S={prev:{text:"上一页",disabled:!1,onClick:()=>{a.pageNumber-=1,y()}},next:{text:"下一页",type:"primary",disabled:!1,onClick:()=>{g()&&(a.pageNumber+=1,y())}},submit:{text:"提交",type:"primary",disabled:o||Bf.value,onClick:()=>{b()}},fill:{text:"填充上次内容",disabled:o,type:"info",onClick:()=>{V6(a,r.value)}}};return o?h.value?[S.fill,S.submit]:[S.submit]:a.pageList.length<=1?h.value?[S.fill,S.submit]:[S.submit]:a.pageNumber===0?[S.next]:a.pageNumber===a.pageList.length-1?[S.prev,S.submit]:[S.prev,S.next]}),b=()=>{if(o||Bf.value)return;g()&&x()},g=()=>{const S=L6(a.widgetList,a.data);if(a.dataVer={...a.dataVer,...S},Object.values(S).some(D=>D.status!==Kf.Success)){const D=a.widgetList.find(N=>{var L;return((L=S[N.id])==null?void 0:L.status)!==Kf.Success});return D?zf(D.id):console.warn("invalidWidget is not found"),!1}return!0},y=()=>{ot(()=>{const S=a.widgetList[0];S&&zf(S.id)})},_=S=>{typeof window.WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",I(S),!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",I(S)),document.attachEvent("onWeixinJSBridgeReady",I(S))):I(S)},I=S=>{try{window.WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:S.appId,timeStamp:S.timeStamp,nonceStr:S.nonceStr,package:S.package,signType:S.signType,paySign:S.paySign},function(D){D.err_msg==="get_brand_wcpay_request:ok"&&document.dispatchEvent(new CustomEvent("form-render:submit-success",{detail:D}))})}catch(D){this.$message.error(D)}},k=S=>{setTimeout(()=>{window.open(S,"_blank")})},E=S=>{var D,N;if(p(a.data),S.status===-1)document.dispatchEvent(new CustomEvent("form-render:submit-fail",{detail:S}));else{const L=xa();if(Kje({id:exports.globalInject.getFormId(),answer:a.data,fake_id:S.result.fake_id,confirm_code:S.result.code,type:L}),(D=S.result.pay_info)!=null&&D.code_url){l.value=S.result.pay_info.price,i.value=S.result.pay_info.order_num,s.value=S.result.pay_info.code_url,localStorage.setItem("last_order_num",S.result.pay_info.order_num),d.value=!0;return}if((N=S.result.pay_info)!=null&&N.openid){const{appId:F,timeStamp:z,nonceStr:j,signType:X,paySign:U,order_num:W}=S.result.pay_info;console.debug(S.result.pay_info.order_num);const Q={appId:F,timeStamp:z,nonceStr:j,package:S.result.pay_info.package,signType:X,paySign:U,order_num:W};console.debug(Q,"query"),_(Q);return}switch(gt.value.details.after_submit){case"show_score":{const F={id:S.result.id,formId:exports.globalInject.getFormId()},z=JSON.stringify(F);Xu(`/table/answer?q=${window.btoa(z)}`);break}case"show_link":{let{id:F,url:z}=gt.value.details.link_info;F&&(c6(F).then(j=>{j.status===1&&(j.result.status===0?k(z):j.result.status===1?k(`/table/error?q=${window.btoa(JSON.stringify({code:"2078"}))}`):j.result.status===2&&k(`/table/error?q=${window.btoa(JSON.stringify({code:"2077"}))}`))}),document.dispatchEvent(new CustomEvent("form-render:submit-success",{detail:S})));break}case"show_tip":default:{document.dispatchEvent(new CustomEvent("form-render:submit-success",{detail:S}));break}}}},T=P(!1),x=async()=>{if(!(o||T.value)&&n.value==="input")try{T.value=!0,console.debug(a,"formStore"),localStorage.getItem("last_order_num")&&(a.cancel_order_num=localStorage.getItem("last_order_num"));const S=await D9e(a);if([4016,4017,4018,4015].includes(S.status)){ht.error(f[S.status]);return}gt.value.details.confirmCodeValue=S==null?void 0:S.result.code,console.debug(S.result,"result"),E(S)}catch(S){console.error("submit error",S)}finally{T.value=!1}};return document.addEventListener("form-render:autosubmit",x),po(()=>{document.removeEventListener("form-render:autosubmit",x)}),t({submitBtnClick:b}),(S,D)=>(C(),A(Ae,null,[w("div",aUe,[(C(!0),A(Ae,null,et(m.value,N=>(C(),ve(qje,hf(lc(N)),null,16))),256))]),O(oUe,{onClose:D[0]||(D[0]=N=>d.value=!1),visible:d.value,code_url:s.value,order_num:i.value,pay_money:l.value},null,8,["visible","code_url","order_num","pay_money"])],64))}}),sUe=Ye(rUe,[["__scopeId","data-v-2a829e4d"]]),iUe={class:"bottom-bar"},lUe={class:"text-black"},uUe={class:"text-white"},cUe=se({__name:"FormBottom",setup(e){const t=P(0),n=P(),o=P({0:"表单",1:"问卷",2:"报名",3:"考试"});st(()=>{a()});const a=async()=>{const i=exports.globalInject.getRoute();n.value=i.query.tid;const l=await exports.globalInject.$axios.get(`/v2/form/getTplInfo?id=${n.value}`);t.value=l.data.result.scene_id},r=()=>{window.open(`${window.location.origin}/templates?scene_id=${t.value}`)},s=()=>{exports.globalInject.$token?window.open(`${window.location.origin}/table/workspace?tid=${n.value}&scene=${t.value}&folderId=0`):exports.globalInject.showLoginModal({callback:()=>{window.open(`${window.location.origin}/table/workspace?tid=${n.value}&scene=${t.value}&folderId=0`),window.location.reload()}})};return(i,l)=>(C(),A("div",iUe,[w("div",{onClick:r,class:"footer-btn bg-white border border-solid border-black"},[w("span",lUe,"更多"+ie(o.value[t.value]),1)]),w("div",{class:"footer-btn",onClick:s,style:{"background-color":"#2278ff"}},[w("span",uUe,"使用此"+ie(o.value[t.value]),1)])]))}}),dUe=Ye(cUe,[["__scopeId","data-v-e24a0ef6"]]),fUe={key:0,class:"top-container"},pUe=se({__name:"DailyPreviewTop",setup(e){const t=de("formMode");de("editable");const n=de("isMobileSize"),o=M(()=>t.value!="input"?!1:gt.value.details.everyDay_limit==1?gt.value.details.before_visible_vote==1&&Bf.value:!1),a=M(()=>{const{daily_limit_times:r}=gt.value.details;let s="";return r.map((i,l)=>{if(i.length!=0){const d=i[0].split(":"),f=i[1].split(":"),p=`${d[0]}:${d[1]}`,h=`${f[0]}:${f[1]}`;l!=r.length-1?s+=`${p} - ${h}、`:s+=`${p} - ${h}`,l==0&&n.value&&(s+=`
146
- `)}}),s});return(r,s)=>o.value?(C(),A("div",fUe," 投票开放填写时间为 每日"+ie(a.value),1)):G("",!0)}}),vUe=Ye(pUe,[["__scopeId","data-v-fa644b59"]]),hUe={class:"flex flex-row justify-between items-center mb-2.5"},mUe={class:"appoint-text",style:{color:"#666666"}},gUe={key:0,class:"appoint-text",style:{color:"#999999"}},bUe={key:1,class:"appoint-text",style:{color:"#999999"}},yUe={key:2,class:"appoint-text"},_Ue={key:0,class:"flex flex-row items-center mb-1"},wUe=["src"],$Ue={class:"appointment-text"},CUe={class:"answer-container"},SUe={class:"flex flex-col"},EUe={class:"date-text"},kUe={key:0,class:"date-text",style:{color:"#e34152"}},IUe={key:0,class:"date-text",style:{"margin-right":"80px","margin-left":"-60px",color:"#e34152"}},TUe={key:0,class:"quota-container"},xUe={key:0,class:"date-text",style:{color:"#e34152"}},AUe=se({__name:"appointAnswers",props:{appointWidgetList:{},widgetAnswers:[],answerIndex:null},setup(e){const t=["周日","周一","周二","周三","周四","周五","周六"],n=e,o=l=>l.reduce((d,f)=>Array.isArray(f)?d.concat(o(f)):d.concat(f),[]),a=M({get:()=>o(n.widgetAnswers).some(l=>l.isPaid==!0),set:l=>{}}),r=de("isMobileSize"),s=l=>parseFloat(l/100).toFixed(2),i=l=>{if(l.type=="time"){const d=l.appointment_time.substring(8,10),f=l.appointment_time.substring(10,12),p=l.appointment_time.substring(12,14),h=l.appointment_time.substring(14,16);return`${d}:${f} - ${p}:${h}`}else{const d=l.appointment_date,f=new Date(d);return`,${t[f.getDay()]}`}};return(l,d)=>(C(),A(Ae,null,[w("div",hUe,[w("span",mUe,ie(e.appointWidgetList[e.answerIndex].attrs.title),1),!c(r)&&a.value?(C(),A("span",gUe," 单价 ")):G("",!0),e.appointWidgetList[e.answerIndex].attrs.multiplyQuota&&!c(r)?(C(),A("span",bUe,"数量")):G("",!0),!c(r)&&a.value?(C(),A("span",yUe,"小计")):G("",!0)]),(C(!0),A(Ae,null,et(e.widgetAnswers,f=>(C(),A("div",null,[f&&f.length>0?(C(),A("div",_Ue,[e.appointWidgetList[e.answerIndex].attrs.appoint.find(p=>p.basicInfo.id==f[0].appointment_id).basicInfo.img[0]!=""?(C(),A("img",{key:0,class:"img",src:e.appointWidgetList[e.answerIndex].attrs.appoint.find(p=>p.basicInfo.id==f[0].appointment_id).basicInfo.img[0]},null,8,wUe)):G("",!0),w("span",$Ue,ie(e.appointWidgetList[e.answerIndex].attrs.appoint.find(p=>p.basicInfo.id==f[0].appointment_id).basicInfo.name),1)])):G("",!0),(C(!0),A(Ae,null,et(f,p=>(C(),A("div",CUe,[w("div",SUe,[w("div",EUe,[Fe(ie(p.appointment_date.replaceAll("-","/"))+" ",1),w("span",null,ie(i(p)),1)]),p.isPaid&&c(r)?(C(),A("span",kUe,"¥"+ie(s(p.price)),1)):G("",!0)]),w("div",null,[p.isPaid&&!c(r)&&a.value?(C(),A("span",IUe,"¥"+ie(s(p.price)),1)):G("",!0)]),e.appointWidgetList[e.answerIndex].attrs.multiplyQuota?(C(),A("div",TUe,[O(c(ka),{modelValue:p.quota,"onUpdate:modelValue":h=>p.quota=h,min:1,max:p.remainingQuota=="-1"||p.remainingQuota==null?1/0:p.remainingQuota},null,8,["modelValue","onUpdate:modelValue","max"])])):G("",!0),w("div",null,[p.isPaid&&!c(r)&&a.value?(C(),A("span",xUe,"¥"+ie((s(p.price)*p.quota).toFixed(2)),1)):G("",!0)])]))),256))]))),256))],64))}}),OUe=Ye(AUe,[["__scopeId","data-v-3f9156c3"]]),Cb=e=>(At("data-v-d72b5427"),e=e(),Ot(),e),DUe={key:0,class:"gain-answer grey-text"},PUe=Cb(()=>w("span",null,"商品",-1)),MUe=Cb(()=>w("span",null,"单价",-1)),NUe=Cb(()=>w("span",null,"数量",-1)),RUe=Cb(()=>w("span",null,"小计",-1)),LUe=[PUe,MUe,NUe,RUe],FUe={class:"gain-answer grey-text"},BUe={key:0,class:"gain-answer gain-text"},VUe={key:0},zUe=["src"],jUe={class:"money-text",style:{width:"100px","text-align":"end",color:"#e34152"}},UUe={key:1,class:"gain-answer-mobile"},WUe={class:"gain-answer-left"},HUe=["src"],qUe={class:"text-col"},KUe={style:{width:"160px"}},YUe={style:{width:"100px",color:"#e34152"}},GUe={class:"gain-answer-right"},QUe=se({__name:"gainAnswers",props:{widgetAnswers:[],gainWidgetList:[],answerIndex:null},setup(e){const t=de("isMobileSize");de("widgetStore"),de("formStore");const n=a=>(parseFloat(a)/100).toFixed(2),o=(a,r)=>{r.totalPrice=a*r.price};return(a,r)=>(C(),A(Ae,null,[c(t)?G("",!0):(C(),A("div",DUe,LUe)),w("div",FUe,[w("span",null,ie(e.gainWidgetList[e.answerIndex].attrs.title),1)]),(C(!0),A(Ae,null,et(e.widgetAnswers,s=>(C(),A("div",null,[c(t)?(C(),A("div",UUe,[w("div",WUe,[e.gainWidgetList[e.answerIndex].type=="gainWithPic"?(C(),A("img",{key:0,style:{width:"64px",height:"64px"},src:e.gainWidgetList[e.answerIndex].attrs.list.find(i=>i.value==s.value).imgs[0].url},null,8,HUe)):G("",!0),w("div",qUe,[w("div",KUe,ie(s.label),1),w("div",YUe,"¥"+ie(n(s.price)),1)])]),w("div",GUe,[w("div",null,[O(c(ka),{onChange:i=>o(i,s),style:{width:"124px"},modelValue:s.num,"onUpdate:modelValue":i=>s.num=i},null,8,["onChange","modelValue","onUpdate:modelValue"])])])])):(C(),A("div",BUe,[e.gainWidgetList[e.answerIndex].type=="gainWithPic"?(C(),A("div",VUe,[w("img",{style:{width:"36px",height:"36px","border-radius":"4px"},src:e.gainWidgetList[e.answerIndex].attrs.list.find(i=>i.value==s.value).imgs[0].url},null,8,zUe)])):G("",!0),w("div",{style:Ze([{width:"160px"},e.gainWidgetList[e.answerIndex].type=="gainWithPic"?"margin-left:-56px":""])},ie(s.label),5),w("div",{class:"money-text",style:Ze([{width:"100px",color:"#e34152"},e.gainWidgetList[e.answerIndex].type=="gainWithPic"?"margin-left:-56px":""])}," ¥"+ie(n(s.price)),5),w("div",null,[O(c(ka),{onChange:i=>o(i,s),style:{width:"150px"},modelValue:s.num,"onUpdate:modelValue":i=>s.num=i},null,8,["onChange","modelValue","onUpdate:modelValue"])]),w("div",jUe," ¥"+ie(n(s.totalPrice)),1)]))]))),256))],64))}}),JUe=Ye(QUe,[["__scopeId","data-v-d72b5427"]]),yu=e=>(At("data-v-b3ed40e9"),e=e(),Ot(),e),XUe={class:"appoint-detail-title"},ZUe={class:"title"},eWe=["src"],tWe=yu(()=>w("span",{class:"grey-text"},"清空",-1)),nWe={class:"appoint-detail"},oWe={class:"appoint-detail"},aWe={key:0,class:"flex justify-between w-full"},rWe={class:"flex flex-col"},sWe=yu(()=>w("div",{class:"text"},"共计",-1)),iWe={class:"text"},lWe={key:0},uWe={style:{color:"#eb3d3d"}},cWe={key:1},dWe={key:2},fWe={style:{color:"#2278ff"}},pWe={key:3},vWe=yu(()=>w("i",{class:"iconfont icon-form-total-expand"},null,-1)),hWe=[vWe],mWe={key:0,style:{color:"#333333"},class:"text flex items-center"},gWe={class:"total-money"},bWe=yu(()=>w("span",{style:{"font-size":"14px"}}," ¥",-1)),yWe={key:1,class:"flex justify-between h-full items-center"},_We={class:"flex items-center gap-2"},wWe={key:0,class:"flex items-center",style:{gap:"8px"}},$We={style:{position:"relative"}},CWe=["src"],SWe={class:"num-rot"},EWe={class:"total-money"},kWe=yu(()=>w("span",{style:{"font-size":"14px"}},"¥",-1)),IWe={key:1,class:"flex items-center gap-2"},TWe=yu(()=>w("div",{class:"text"},"共计",-1)),xWe={key:0},AWe={style:{color:"#2278ff"}},OWe=yu(()=>w("i",{class:"iconfont icon-form-total-expand"},null,-1)),DWe=[OWe],PWe=se({__name:"totalAnswers",props:{widgetsBtmRef:null},emits:["submit"],setup(e,{emit:t}){const n=de("isMobileSize");de("widgetStore");const o=t,a=P(!1),r=P([]);P([]);const s=P([]),i=P([]),l=P([]),d=P([]),f=de("formStore"),p=de("formMode"),h=P(!1),m=P(),b=xa(),g=e,y=N=>{for(;N&&N!==document.body;){const L=window.getComputedStyle(N);if(L.overflow==="auto"||L.overflow==="scroll"||L["overflow-x"]==="auto"||L["overflow-x"]==="scroll"||L["overflow-y"]==="auto"||L["overflow-y"]==="scroll")return N;N=N.parentElement}return null};Se(g,N=>{if(n.value){h.value=!0;return}if(N.widgetsBtmRef){const L=y(N.widgetsBtmRef);let F;L.addEventListener("scroll",()=>{F=N.widgetsBtmRef.getBoundingClientRect(),F.top-window.innerHeight<0?(console.debug("here"),h.value=!1,a.value=!0):(console.debug("这里"),h.value=!0,a.value=!1)})}},{deep:!0}),Se(()=>f.data,N=>{_(N)},{deep:!0});const _=N=>{let L=[],F=[],z=[],j=[],X=[];console.debug(N,"formStoreData"),(b==6||b==4)&&Object.entries(N).forEach(([U,W])=>{var Q;if(Array.isArray(W)&&W.length>0){const q=Object.groupBy(W,({id:Y})=>Y);console.debug(q,"prdsByIdsObject");const V=Object.values(q);L=[...L,...V],(Q=V[0][0])!=null&&Q.appointment_id?(z.push(V),j.push(f.widgetList.find(Y=>Y.id===U))):(F=[...F,...V],X.push(f.widgetList.find(Y=>Y.id===U)))}}),r.value=L,d.value=j,l.value=X,i.value=z,s.value=F,console.debug(r.value,"answers.value"),console.debug(d.value,"appointWidgetList.value"),console.debug(i.value,"appointAnswers.value"),console.debug(l.value,"gainWidgetList.value"),console.debug(s.value,"gainAnswers.value")},I=()=>{o("submit")},k=()=>{r.value=[],l.value=[],s.value=[],i.value=[],d.value=[],a.value=!1,Uf.emit("deleteAllAnswers")},E=()=>r.value.flat().flat().length,T=N=>N.reduce((L,F)=>Array.isArray(F)?L.concat(T(F)):L.concat(F),[]),x=M({get:()=>T(r.value).some(N=>N.isPaid==!0),set:N=>{}}),S=()=>{let N=0;const L=r.value.flat().flat();return console.debug(L,"answerFlat"),L.map(F=>{F.isPaid&&(N+=F.price*(F.quota||F.num))}),(parseFloat(N)/100).toFixed(2)},D=()=>{h.value&&(a.value=!a.value)};return(N,L)=>(C(),A(Ae,null,[r.value.length>0?(C(),A("div",{key:0,ref_key:"totalRef",ref:m,class:B({"bottom-appoint":h.value,"bottom-appoint-mobile":c(n),"bottom-appoint-mobile-preview":c(n)&&c(p)=="preview","not-bottom-appoint":!h.value}),style:Ze({"pointer-events":a.value?"":"none",padding:c(n)?"0px":""})},[w("div",{style:Ze(h.value?"":"z-index:1"),class:B({"appoint-detail-container":!0,"appoint-detail-visible":a.value||!h.value})},[w("div",XUe,[w("span",ZUe,"已选"+ie(c(b)==6?"商品":"项目"),1),w("div",{onClick:k,class:"flex flex-row gap-1 cursor-pointer items-center"},[w("img",{class:"img",src:c(Ke)("images/widget/appoint-clearAll.png")},null,8,eWe),tWe])]),(C(!0),A(Ae,null,et(i.value,(F,z)=>(C(),A("div",nWe,[O(OUe,{widgetAnswers:F,answerIndex:z,appointWidgetList:d.value},null,8,["widgetAnswers","answerIndex","appointWidgetList"])]))),256)),(C(!0),A(Ae,null,et(s.value,(F,z)=>(C(),A("div",oWe,[O(JUe,{widgetAnswers:F,gainWidgetList:l.value,answerIndex:z},null,8,["widgetAnswers","gainWidgetList","answerIndex"])]))),256))],6),E()>0?(C(),A("div",{key:0,onClick:D,class:B(["",{"bottom-container":h.value,"bottom-container-expand":a.value,"not-bottom-container":!h.value}])},[c(n)?(C(),A("div",yWe,[w("div",_We,[x.value?(C(),A("div",wWe,[w("div",$We,[w("img",{style:{width:"24px",height:"24px"},src:c(Ke)("/images/widget/total-answer-icon.png")},null,8,CWe),w("div",SWe,[w("span",null,ie(E()),1)])]),w("div",EWe,[kWe,Fe(ie(S()),1)]),w("div",null,"(明细"+ie(E())+")",1)])):(C(),A("div",IWe,[TWe,i.value.length>0?(C(),A("span",xWe,[w("span",AWe,ie(T(i.value).length),1),Fe(" 个预约 ")])):G("",!0)])),h.value?(C(),A("div",{key:2,class:B({"expand-icon":!0,"expand-icon-up":a.value}),style:Ze(a.value?"":"transform: translateY(-5px)")},DWe,6)):G("",!0)]),w("div",null,[O(c(Wt),{onClick:mt(I,["stop"]),type:"primary"},{default:H(()=>[Fe(" 提交 ")]),_:1})])])):(C(),A("div",aWe,[w("div",rWe,[sWe,w("div",iWe,[s.value.length>0?(C(),A("span",lWe,[w("span",uWe,ie(T(s.value).length),1),Fe("个商品 ")])):G("",!0),T(s.value).length>0&&T(i.value).length>0?(C(),A("span",cWe,"、")):G("",!0),i.value.length>0?(C(),A("span",dWe,[w("span",fWe,ie(T(i.value).length),1),Fe(" 个预约 ")])):G("",!0),h.value?(C(),A("span",pWe,"(下拉至底部可提交)")):G("",!0),h.value?(C(),A("div",{key:4,class:B({"expand-icon":!0,"expand-icon-up":a.value})},hWe,2)):G("",!0)])]),x.value?(C(),A("div",mWe,[Fe(" 应付(CNY): "),w("span",gWe,[bWe,Fe(ie(S()),1)])])):G("",!0)]))],2)):G("",!0)],6)):G("",!0),a.value&&!(c(n)&&c(p)=="preview")&&h.value?(C(),A("div",{key:1,onClick:L[0]||(L[0]=F=>a.value=!1),class:"mask"})):G("",!0)],64))}}),MWe=Ye(PWe,[["__scopeId","data-v-b3ed40e9"]]),NWe={class:"agreement"},RWe={key:3,class:"form-info"},LWe=se({__name:"NormalView",setup(e){const t=An(()=>Promise.resolve().then(()=>require("./ExamBar-Db61wdIk.cjs"))),n=An(()=>Promise.resolve().then(()=>require("./ContactUs-BKQca1-e.cjs"))),o=An(()=>Promise.resolve().then(()=>require("./InputTimer-BVczi-cG.cjs"))),a=An(()=>Promise.resolve().then(()=>require("./FormProgress-Dd1vNCsb.cjs"))),r=An(()=>Promise.resolve().then(()=>require("./AntiCheating-C9nRRNhm.cjs"))),s=An(()=>Promise.resolve().then(()=>require("./ShareQRCode-DTkYJBQi.cjs"))),i=An(()=>Promise.resolve().then(()=>require("./CacheIcon-Rc-dHOrU.cjs"))),l=de("formMode"),d=de("editable"),f=P(),p=P(),h=P(),m=P(),b=P(!1),g=P(),y=de("formStore"),_=P(),I=xa(),k=P();["dev","test"].includes(exports.globalInject.getEnvType());const E=exports.globalInject.getEnvType(),T=P(),x=C6e(T),S=P({});Tt("lastAnswerInfo",S),Tt("formBounding",x);const D=de("setAuth"),N=de("isLanding"),L=M(()=>l.value==="editor"||l.value==="input"&&!N?!1:x.width.value<780);Tt("isMobileSize",L);const F=M(()=>(console.log("lastAnswerInfo",S.value),gt.value.auto_fill.isFill&&gt.value.auto_fill.type===0&&Object.keys(S.value).length>0)),z=()=>{oS.emit("notify","")},j=D6(ye=>{var he;!N0()&&((he=exports.globalInject)!=null&&he.getCodeId())&&(ye.stopPropagation(),D8e({message:"仅支持在微信小程序中操作,是否跳转至小程序?",confirmButtonText:"前往小程序",cancelButtonText:"取消"}).then(()=>{X9e().then(le=>{console.log("res",le),window.location.href=le})}))},1e3),X={dev:"https://sit-api.bmwac.cn/h5/",test:"https://sit-api.bmwac.cn/h5/",prod:"https://a.bamuwu.com/h5/",stage:"https://a.bamuwu.com/h5/"},U=async()=>{const ye=gt.value.crown_setting.isCollectInfo,he=exports.globalInject.getRoute().query;if(sessionStorage.getItem("authInfo")){const le=JSON.parse(sessionStorage.getItem("authInfo"));localStorage.setItem("authInfo",JSON.stringify(le)),D(le);return}if(l.value=="input"&&he.code){let le;ye.collectSource=="self"?le=gt.value.pay_setting.pappid||gt.value.crown_setting.isCollectInfo.pappid:le=-1;const J=(await exports.globalInject.$axios.get(`v1/WxPlatforms/getAppidById?id=${le}`)).data.result,oe=new Date().getTime(),ge=(await exports.globalInject.$axios.post("/v1/WxPlatforms/getWxUserInfo",{code:he.code,appid:J.appid,type:J.type,from:"form",time:oe})).data.result;if(!(ge!=null&&ge.openid))return;const Me=await exports.globalInject.$axios.get(`/v2/form/getMemberInfo?openid=${ge.openid}&unionid=${ge.unionid}&form_id=${exports.globalInject.getFormId()}`);let ee="";if(Me.data.status===1&&(ee=Me.data.result.nickname||"微信用户"+ge.unionid.slice(-6)),ge.openid){const ne={nickname:ee||ge.nickname,openid:ge.openid,unionid:ge.unionid||void 0,headimgurl:ge.headimgurl};D(ne),localStorage.setItem("authInfo",JSON.stringify(ne)),sessionStorage.setItem("authInfo",JSON.stringify(ne));return}else Cm({title:"授权失败",message:"授权失败,请重新扫码",type:"warning",showConfirmButton:!1,showClose:!1,closeOnClickModal:!1,closeOnPressEscape:!1});ht.success(ge)}else if(L.value&&l.value=="input"&&ye.open==1&&ye.collectMethod=="auth"&&N0()){const le=new URLSearchParams(he),J=`${X[E]||"https://a.bamuwu.com/h5/"}?${le.toString().replace(/=null/g,"")}`,oe=encodeURIComponent(J);let _e;ye.collectSource=="self"?_e=gt.value.pay_setting.pappid||gt.value.crown_setting.isCollectInfo.pappid:_e=-1;const Me=(await exports.globalInject.$axios.get(`v1/WxPlatforms/getAppidById?id=${_e}`)).data.result;console.debug(Me,"config"),Me.type=="self"?window.location.replace(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${Me.appid}&redirect_uri=${oe}&response_type=code&scope=snsapi_userinfo&component_appid=${Me.component_appid}#wechat_redirect`):window.location.replace(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${Me.appid}&redirect_uri=${oe}&response_type=code&scope=snsapi_userinfo#wechat_redirect`)}};po(()=>{clearInterval(_.value)});const W=()=>{l.value=="input"&&gt.value.details.isAutoSave==1&&(_.value=setInterval(()=>{localStorage.setItem("formStore",JSON.stringify(y.data))},1e3))};st(async()=>{await U(),await Q();const ye=exports.globalInject.getRoute(),he=MN(f.value);he==null||he.scrollTo(0,0),m.value=window.location.href.includes("preview"),g.value=ye.query.isMobile,localStorage.getItem("formStore")!="{}"&&gt.value.details.isAutoSave==1&&l.value=="input"?Cm.confirm("你已填写过部分内容,是否继续填写?","提示",{confirmButtonText:"继续填写",cancelButtonText:"重新填写"}).then(()=>{const le=localStorage.getItem("formStore")||"",ue=JSON.parse(le);y.data=ue,W()}).catch(()=>{W()}):W()});const Q=async()=>{if(!N0())return;const ye=exports.globalInject.getCodeId(),he=exports.globalInject.getFormId();let le={unionid:""};if(sessionStorage.getItem("authInfo")){const oe=JSON.parse(sessionStorage.getItem("authInfo"));oe!=null&&oe.unionid&&(le=oe)}if(!le.unionid)return;const ue=await exports.globalInject.$axios.get(`v2/form/getAnswerListByO?id=${ye}&unionid=${le.unionid}&form_id=${he}`);if(ue.data.status!==1)return;const{answer:J}=ue.data.result;S.value=J},q=M(()=>l.value!=="editor"&&gt.value.test_setting.is_time_limit),V=()=>{h.value&&h.value.submitBtnClick()},Y=M(()=>l.value==="input"&&gt.value.test_setting.is_anti_cheating),Z=M(()=>l.value==="editor"&&$$()),ce=M(()=>l.value==="input"&&!!gt.value.details.show_share_qrcode&&!L.value),re=async()=>{await V6(y,S.value)};return(ye,he)=>(C(),A(Ae,null,[w("div",{class:"normal-view",ref_key:"normalViewRef",ref:f,onClickCapture:he[1]||(he[1]=(...le)=>c(j)&&c(j)(...le))},[O(vUe),q.value?(C(),ve(c(o),{key:0})):G("",!0),Z.value?(C(),ve(c(t),{key:1})):G("",!0),w("div",{ref_key:"formMainRef",ref:T,class:B(["form-main",{mobile:L.value,isEditor:c(d)}])},[O(mje),O(vS,{ref:"widgetsRef"},null,512),w("div",{ref_key:"divideRef",ref:k},null,512),c(I)==4||c(I)==6?(C(),ve(MWe,{key:0,ref_key:"totalRef",ref:p,widgetsBtmRef:k.value,onSubmit:V},null,8,["widgetsBtmRef"])):G("",!0),F.value?(C(),A("div",{key:1,class:"auto-fill",style:Ze({top:L.value?"50vh":"270px",position:L.value?"fixed":"absolute"}),onClick:re}," 自动填充 ",4)):G("",!0),w("div",NWe,[Fe(" 提交即授权该表单收集你所填写的内容,"),w("span",{class:"agreement-link",onClick:he[0]||(he[0]=le=>b.value=!0)},"查看详情")]),O(sUe,{ref_key:"submitRef",ref:h},null,512)],2),m.value&&!g.value?(C(),ve(dUe,{key:2})):G("",!0),c(d)?(C(),A("div",RWe,[Fe(" 提交后展示内容:图文信息 "),w("span",{onClick:z},"修改")])):G("",!0)],544),c(I)==4||c(I)==5||c(I)==6?(C(),ve(c(i),{key:0})):G("",!0),O(c(n)),c(d)?G("",!0):(C(),ve(c(a),{key:1})),Y.value?(C(),ve(c(r),{key:2})):G("",!0),ce.value?(C(),ve(c(s),{key:3})):G("",!0),b.value?(C(),ve(vje,{key:4,onAgree:he[2]||(he[2]=le=>b.value=!1)})):G("",!0)],64))}}),FWe=Ye(LWe,[["__scopeId","data-v-b62098ef"]]),Kp=e=>(At("data-v-b3f45ef1"),e=e(),Ot(),e),BWe=Kp(()=>w("div",{class:"left main-text"},"已填数据",-1)),VWe={class:"right"},zWe={class:"info-text"},jWe={key:0,class:"appoint-container"},UWe=Kp(()=>w("div",{class:"answer-title"},"预约状态",-1)),WWe={class:"answer-container"},HWe={class:"appoint-answer"},qWe={key:1,class:"appoint-container"},KWe=Kp(()=>w("div",{class:"answer-title"},"应付金额",-1)),YWe={class:"answer-container"},GWe=Kp(()=>w("div",{class:"answer-title"},"交易号",-1)),QWe={class:"answer-container"},JWe=Kp(()=>w("div",{class:"answer-title"},"交易状态",-1)),XWe={class:"answer-container"},ZWe=se({__name:"index",props:{formStore:{},canEdit:{type:Boolean},isMobileSize:{type:Boolean}},emits:["closed"],setup(e,{emit:t}){const n=xa(),o=e;console.log("props: ",o);const a=gn({...o.formStore});console.debug(a,"formStore");const r=P(!1),s=P("answer-preview");Tt("formMode",s),Tt("editable",!1),n==3?Tt("isMobileSize",P(!1)):Tt("isMobileSize",o.isMobileSize),Tt("formStore",a);const i=P(!1),l=()=>{i.value=!0},d=()=>{i.value=!1},f=(m=!0)=>{const b=L6(a.widgetList,a.data);if(a.dataVer={...a.dataVer,...b},Object.values(b).some(g=>g.status!==Kf.Success)){const g=a.widgetList.find(y=>{var _;return((_=b[y.id])==null?void 0:_.status)!==Kf.Success});return g&&m?zf(g.id):console.warn("invalidWidget is not found"),!1}return!0};async function p(){s.value==="answer-preview"?s.value="input":f(!1)&&(await L9e({form_id:a.formId,fake_id:a.fake_id,answer:a.data})).status===1&&(ht.success("修改成功"),Yje(a.fake_id,a.data),u6(),d())}async function h(){await G9e({form_id:o.formStore.formId,answer_id:o.formStore.answerId})==1&&(r.value=!0)}return st(l),(m,b)=>(C(),ve(c(Ga),{width:m.isMobileSize?"88%":"680px",modelValue:i.value,"onUpdate:modelValue":b[2]||(b[2]=g=>i.value=g),"align-center":"","show-close":!1,class:"form-answer-preview-dialog",onClosed:b[3]||(b[3]=g=>m.$emit("closed"))},Ia({header:H(()=>[BWe,w("div",VWe,[w("span",zWe,ie(c(Em)(new Date(a.date*1e3)))+" 提交填写",1),w("span",{onClick:b[0]||(b[0]=g=>m.$emit("closed")),class:"icon iconfont icon-form-close"})])]),default:H(()=>[O(vS,{mode:"answer",isDateModal:!0}),a.appointment.length>0?(C(),A("div",jWe,[UWe,w("div",WWe,[w("div",HWe,ie(a.appointment[0]&&a.appointment[0].status==1&&!r.value?"已预约":"已取消"),1)])])):G("",!0),c(n)==6?(C(),A("div",qWe,[KWe,w("div",YWe,ie(a.trade_info.price),1),GWe,w("div",QWe,ie(a.trade_info.transaction_id),1),JWe,w("div",XWe,ie(a.trade_info.status),1)])):G("",!0)]),_:2},[m.canEdit?{name:"footer",fn:H(()=>[s.value!=="answer-preview"?(C(),ve(c(Wt),{key:0,type:"info",onClick:b[1]||(b[1]=g=>m.$emit("closed")),size:"large"},{default:H(()=>[Fe(" 取消")]),_:1})):G("",!0),O(c(Wt),{type:"primary",onClick:p,size:"large"},{default:H(()=>[Fe(ie(s.value==="answer-preview"?"修改数据":"提交"),1)]),_:1})]),key:"0"}:void 0,c(gt).details.cancelAppoint==1&&!r.value?{name:"footer",fn:H(()=>[a.appointment.length>0&&a.appointment[0].status==1?(C(),ve(c(Wt),{key:0,onClick:h,type:"danger"},{default:H(()=>[Fe(" 取消预约 ")]),_:1})):G("",!0)]),key:"1"}:void 0]),1032,["width","modelValue"]))}}),eHe=Ye(ZWe,[["__scopeId","data-v-b3f45ef1"]]);function iO(e,t,n){const o=document.createElement("div"),a=()=>{Ha(null,o),o.remove()},r=_t(Cs,{namespace:"bmwfr"},()=>_t(eHe,{formStore:e,canEdit:t,isMobileSize:n,onClosed:a}));document.body.appendChild(o),Ha(r,o)}const tHe={class:"content"},nHe=["data-id","onClick"],oHe=se({__name:"CacheDialog",props:{showCacheDialog:{type:Boolean},cacheDateList:{},formStore:{}},emits:["update:showCacheDialog","change"],setup(e,{emit:t}){const n=de("isMobileSize"),o=e,a=t,r=xa(),s=M({get:()=>o.showCacheDialog,set:l=>{a("update:showCacheDialog",l)}});async function i(l){console.debug(l,"itemsss"),exports.globalInject.getToken();let d;[4,5,6].includes(r)?(d=await d6({answer_id:l.id}),s.value=!1,console.debug(d,"res"),iO({...o.formStore,data:d.answer,formId:d.form_id,fake_id:d.fake_id,date:d.meta_info.answerInfo.startTime,confirm_code:d.code,answerId:d.id,appointment:d.appointment},gt.value.details.modifyData===0,n.value)):(s.value=!1,iO({...o.formStore,data:l.answer,formId:l.form_id,fake_id:l.fake_id,date:l.meta_info.answerInfo.startTime,confirm_code:l.code,answerId:l.id,appointment:[]},gt.value.details.modifyData===0))}return(l,d)=>(C(),ve(c(Ga),{modelValue:s.value,"onUpdate:modelValue":d[0]||(d[0]=f=>s.value=f),title:"已填数据",width:c(n)?"88%":"440px","align-center":"",class:"cache-data-dialog"},{default:H(()=>[w("div",tHe,[w("ul",null,[(C(!0),A(Ae,null,et(l.cacheDateList,f=>(C(),A("li",{key:f.id,class:"data-item","data-id":f.id,onClick:p=>i(f)},ie([4,5,6].includes(c(r))?c(Em)(new Date(f.create_at*1e3)):c(Em)(new Date(f.meta_info.answerInfo.startTime*1e3)))+" 提交填写 ",9,nHe))),128))])])]),_:1},8,["modelValue","width"]))}}),z6=Ye(oHe,[["__scopeId","data-v-136b43a0"]]),mS=se({__name:"index",props:{mode:{}},setup(e){const t=e,n=P(t.mode);Tt("formMode",n);let o=t.mode==="editor";Tt("editable",o);const a=xa(),r=P(!1),s=P(!o&&!!gt.value.details.verify_pwd),i=P(!o&&$$()&&(!!gt.value.test_setting.show_pre_notice||!!gt.value.test_setting.show_topic_structure)),l=gn({isBatchSettingAnswer:!1,data:{},dataVer:{},pay_info:{},pageNumber:0,pageList:M(()=>u1e(o)),widgetList:M(()=>l.pageList[l.pageNumber]??[]),answerId:"",confirm_code:""});function d(){if(f.value.length>0&&![4,5,6].includes(a)&&n.value=="input"){const{showConfirm:p}=ul();p({type:"warn",title:"提示",content:"您已填写过该表单",cancelText:"再次填写",confirmText:"查看已填数据",onConfirm:()=>{r.value=!0},onCancel:()=>{}})}}const f=M(()=>o||gt.value.details.checkData===1?[]:(console.log(" getStoreDate(globalInject.getFormId(): ",sO(exports.globalInject.getFormId())),sO(exports.globalInject.getFormId())));return st(()=>{a==4&&l.widgetList.length==0&&Zu("appoint"),a==6&&l.widgetList.length==0&&(Zu("gainWithPic"),Zu("nameInput"),Zu("phoneInput"))}),st(()=>{d()}),Tt("formStore",l),(p,h)=>(C(),A(Ae,null,[s.value?(C(),ve(Bze,{key:0,onClosed:h[0]||(h[0]=m=>s.value=!1)})):i.value?(C(),ve(uje,{key:1,onStart:h[1]||(h[1]=m=>i.value=!1)})):(C(),ve(FWe,{key:2})),r.value?(C(),ve(z6,{key:3,showCacheDialog:r.value,"onUpdate:showCacheDialog":h[2]||(h[2]=m=>r.value=m),cacheDateList:f.value,formStore:l},null,8,["showCacheDialog","cacheDateList","formStore"])):G("",!0)],64))}}),ld=e=>(At("data-v-58378def"),e=e(),Ot(),e),aHe={class:"disable-wechat-view"},rHe=["src"],sHe={class:"disable-wechat-tips"},iHe=["src"],lHe=ld(()=>w("div",{class:"title"},"该表单仅限在微信里填写",-1)),uHe=ld(()=>w("div",{class:"des-text"},"微信扫一扫填写表单",-1)),cHe=["src"],dHe={class:"msg"},fHe={key:0,class:"time-tip"},pHe=ld(()=>w("span",null,"开放时间为",-1)),vHe=ld(()=>w("br",null,null,-1)),hHe={class:"range"},mHe={key:1,class:"time-tip"},gHe=ld(()=>w("span",null,"开放时间为",-1)),bHe=ld(()=>w("br",null,null,-1)),yHe={class:"range"},_He=se({__name:"DisabledView",props:{errInfo:{}},setup(e){const t=e,n=wb(window.location.href,{width:170,margin:0}),o=`${Hn}/images/table-empty.png`,a={4002:{msg:"抱歉!您不在可填写的地区范围内",img:`${Hn}/images/disabled_region.png`},4003:{msg:"抱歉!您的填写次数已达上限",img:`${Hn}/images/disabled_max.png`},4004:{msg:"该表单已达到指定收集量",img:`${Hn}/images/disabled_num.png`},4005:{msg:"您访问的表单暂未开放",img:`${Hn}/images/disabled_time.png`},4006:{msg:"该表单已停止收集",img:`${Hn}/images/disabled_stop.png`},4014:{msg:"您访问的表单暂未开放",img:`${Hn}/images/disabled_time.png`}},r=M(()=>{var h;return((h=a[t.errInfo.status])==null?void 0:h.img)||o}),s=M(()=>{var h;return((h=a[t.errInfo.status])==null?void 0:h.msg)||t.errInfo.msg||""}),i=h=>{let m="";return h.map((b,g)=>{if(b.length!=0){const y=b[0].split(":"),_=b[1].split(":"),I=`${y[0]}:${y[1]}`,k=`${_[0]}:${_[1]}`;g!=h.length-1?m+=`${I} - ${k}、`:m+=`${I} - ${k}`}}),`每日${m}`},l=h=>{var b,g,y,_;const m=i((b=h.result)==null?void 0:b.daily_limit_times);return((g=h.result)==null?void 0:g.valid_end_time)!=-1&&((y=h.result)==null?void 0:y.valid_start_time)!=-1?d(((_=h.result)==null?void 0:_.valid_start_time)*1e3,h.result.valid_end_time*1e3)+","+m:m},d=(h,m)=>`${ut(h).format("YYYY-MM-DD HH:mm")} - ${ut(m).format("YYYY-MM-DD HH:mm")}`,f=P(),{isFullSize:p}=uS(f);return(h,m)=>{var b,g,y,_;return C(),A("div",{ref_key:"disabledViewRef",ref:f,class:B(["disabled-view",{mobile:c(p)}])},[h.errInfo.status===3922?(C(),A(Ae,{key:0},[w("div",aHe,[w("img",{src:c(n),class:"qrCode-img",alt:""},null,8,rHe)]),w("div",sHe,[w("img",{src:`${c(Hn)}/images/wx-image.png`,alt:""},null,8,iHe),lHe,uHe])],64)):(C(),A(Ae,{key:1},[w("img",{class:"img",src:r.value,alt:""},null,8,cHe),w("div",dHe,ie(s.value),1),h.errInfo.status===4005&&((b=h.errInfo.result)!=null&&b.valid_start_time)&&((g=h.errInfo.result)!=null&&g.valid_end_time)?(C(),A("div",fHe,[pHe,vHe,w("span",hHe,ie(d(((y=h.errInfo.result)==null?void 0:y.valid_start_time)*1e3,h.errInfo.result.valid_end_time*1e3)),1)])):G("",!0),h.errInfo.status===4014&&((_=h.errInfo.result)==null?void 0:_.daily_limit_times.length)>0?(C(),A("div",mHe,[gHe,bHe,w("span",yHe,ie(l(h.errInfo)),1)])):G("",!0)],64))],2)}}}),wHe=Ye(_He,[["__scopeId","data-v-58378def"]]),$He=e=>(At("data-v-c1e71e3e"),e=e(),Ot(),e),CHe=$He(()=>w("svg",{class:"svg-icon","aria-hidden":"true"},[w("use",{"xlink:href":"#icon-form-success"})],-1)),SHe={class:"success-content"},EHe=["innerHTML"],kHe=["onClick"],IHe={key:1,class:"btn-operate"},THe={class:"btn-operate-contanier"},xHe=["onClick"],AHe={class:"item-text"},OHe=se({__name:"CommitView",props:{id:{type:String,default:""}},setup(e){const t={theme:"snow",readOnly:!0,modules:{toolbar:!1}},n=M(()=>["dev","test"].includes(exports.globalInject.getEnvType())),o=de("answerInfo");console.log("🚀 ~ answerInfo:",o);const a=P(null),r=P(!1);st(async()=>{if(typeof window<"u"&&typeof document<"u"){const h=await Promise.resolve().then(()=>require("./vue-quill.esm-bundler-DStpiAl0.cjs"));a.value=h.QuillEditor,r.value=!0}});const s=P();uS(s);const i=M(()=>gt.value.commit.btnList),l=M(()=>gt.value.commit.btnList.length);st(()=>{oS.emit("close-editor-expand","")});const d=(h,m)=>{const b=document.createElement("div");return b.innerHTML=h,b.querySelectorAll("span[data-id]").forEach(g=>{const y=g.getAttribute("data-id");if(y&&m[y]!=null&&(typeof m[y]=="string"&&(g.innerText=m[y]),Array.isArray(m[y])&&(g.innerText=m[y].map(_=>_.label?_.label.join("、"):_)),Object.prototype.toString.call(m[y])==="[object Object]"&&(g.innerText=m[y].label)),y==="000000"){const _=new Date,I=_.getFullYear(),k=_.getMonth()+1,E=_.getDate();g.innerText=`${I}.${k}.${E}`}g.style.setProperty("background","transparent","important"),g&&g.parentNode instanceof HTMLElement&&g.parentNode.style.setProperty("background","transparent","important")}),b.innerHTML},f=M(()=>d(gt.value.commit.html,o)),p=h=>{switch(h.alias){case"complete_link":window.parent.postMessage({data:{action:"exit"}},"*");break;case"go_link":window.location.href=h.link;break;case"back_link":const m=new URL(window.location.href);m.searchParams.has("code")&&m.searchParams.delete("code"),m.searchParams.has("form_answer")&&m.searchParams.delete("form_answer"),m.searchParams.has("phone")&&m.searchParams.delete("phone"),m.searchParams.has("position")&&m.searchParams.delete("position"),window.history.replaceState({},"",m.toString()),window.location.reload();break;case"detail_link":Xu("/");break}};return(h,m)=>(C(),A("div",{class:"success-view-wrap",ref_key:"successViewRef",ref:s},[w("div",{class:"success-wrap",style:Ze({paddingTop:n.value?"107px":"0"})},[CHe,w("div",SHe,[r.value&&a.value?(C(),ve(Kt(a.value),{key:0,content:f.value,"onUpdate:content":m[0]||(m[0]=b=>f.value=b),contentType:"html",options:t},null,40,["content"])):(C(),A("div",{key:1,innerHTML:f.value},null,8,EHe))])],4),l.value<3?(C(),A("div",{key:0,class:"btn-list",style:Ze({marginBottom:l.value===1?"134px":"80px"})},[(C(!0),A(Ae,null,et(i.value,(b,g)=>(C(),A("div",{class:"btn-item",onClick:y=>p(b),style:Ze({background:g===1?"#F2F2F2":"#2278FF",color:g===1?"#2278FF":"#fff"})},ie(b.name||b.value),13,kHe))),256))],4)):(C(),A("div",IHe,[w("div",THe,[(C(!0),A(Ae,null,et(i.value,(b,g)=>(C(),A("div",{class:"btn-item",onClick:y=>p(b),style:Ze({borderColor:g===l.value-1?"transparent":"#eee"})},[w("div",AHe,ie(b.name||b.value),1),O(c(lt),null,{default:H(()=>[O(c(qr))]),_:1})],12,xHe))),256))])]))],512))}}),DHe=Ye(OHe,[["__scopeId","data-v-c1e71e3e"]]),PHe={key:0,class:"success-wrap-container"},MHe=se({__name:"App",props:{el:{},id:{},token:{},isLanding:{}},setup(e){const t=e,n=P({status:0,msg:"获取表单失败2"}),o=gn({});function a(f){Object.assign(o,On(f))}const r=f=>{i(f.unionid)};Tt("answerInfo",o),Tt("setAnswerInfo",a),Tt("setAuth",r),Tt("isLanding",(t==null?void 0:t.isLanding)||!1),f8(),L4(t.id);const s=P(!0),i=(f="")=>{u6(f).then(({status:p,msg:h,result:m})=>{var b;console.log("🚀 ~ init ~ status:",p,typeof p),p!==1?n.value={status:p,msg:h,result:m}:n.value=dye((b=m==null?void 0:m.setting)==null?void 0:b.crown_setting)||{status:1,msg:""}}).finally(()=>{s.value=!1})};i(),document.addEventListener("form-render:submit-fail",f=>{n.value=f.detail});const l=P(!1);document.addEventListener("form-render:submit-success",()=>{l.value=!0,ot(()=>{var f;(f=t.el)==null||f.scrollTo(0,0)})});const d=()=>{const f=document.createElement("script");f.src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js",f.onload=()=>{console.log("WeChat SDK loaded")},f.onerror=()=>{console.error("Failed to load WeChat SDK")},document.head.appendChild(f)};return st(()=>{d()}),(f,p)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":1888},{default:H(()=>[s.value?G("",!0):(C(),A(Ae,{key:0},[n.value.status!==1?(C(),ve(wHe,{key:0,errInfo:n.value},null,8,["errInfo"])):(C(),A(Ae,{key:1},[l.value?(C(),A("div",PHe,[O(DHe,{id:f.id},null,8,["id"])])):(C(),ve(mS,{key:1,mode:"input"}))],64))],64))]),_:1},8,["locale"]))}}),NHe=Ye(MHe,[["__scopeId","data-v-173b8479"]]),RHe=e=>{const t=si(NHe,e);return t.config.compilerOptions.isCustomElement=n=>n.startsWith("wx-"),id(t),t},LHe=se({__name:"App",props:{tid:{},id:{},token:{}},setup(e){const t=e,n=P(!0);return(t.tid?l6(t.tid):t.id?i6(t.id,t.token):Promise.resolve()).finally(()=>{n.value=!1}),(a,r)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":1888},{default:H(()=>[n.value?G("",!0):(C(),ve(mS,{key:0,mode:"preview"}))]),_:1},8,["locale"]))}}),FHe=e=>{const t=si(LHe,e);return id(t),t},ud=e=>(At("data-v-064e4378"),e=e(),Ot(),e),BHe={key:0,class:"mobile-score-result"},VHe={class:"header"},zHe=ud(()=>w("i",{class:"iconfont icon-form-share1"},null,-1)),jHe={class:"full-score"},UHe={class:"title"},WHe={class:"info"},HHe={class:"name"},qHe={class:"time1"},KHe={class:"time2"},YHe={class:"table"},GHe={class:"tit"},QHe={class:"val"},JHe={class:"row"},XHe=ud(()=>w("div",{class:"tit"},"得分",-1)),ZHe={class:"val"},eqe={class:"score",style:{"margin-left":"10px"}},tqe=ud(()=>w("img",{src:"https://static.bmwax.cn/form_static/images/score-underline.png",alt:""},null,-1)),nqe={key:1,class:"score-result"},oqe={class:"header"},aqe=ud(()=>w("i",{class:"iconfont icon-form-share1"},null,-1)),rqe={class:"title"},sqe={class:"full-score"},iqe={class:"info"},lqe={class:"name"},uqe={class:"time1"},cqe={class:"time2"},dqe={class:"table"},fqe={class:"tit"},pqe={class:"val"},vqe={class:"col"},hqe=ud(()=>w("div",{class:"tit"},"得分",-1)),mqe={class:"val"},gqe={class:"score"},bqe=ud(()=>w("img",{src:"https://static.bmwax.cn/form_static/images/score-underline.png",alt:""},null,-1)),yqe=se({__name:"ScoreResult",setup(e){const t=de("isMobileSize"),n=de("answerPage"),o=M(()=>Object.values(n.fullScore).reduce((d,f)=>d+f,0)),a=M(()=>Object.values(n.score).reduce((d,f)=>d+f,0)),r=M(()=>D$(Rf.value).map(d=>({...d,score:d.ids.reduce((f,p)=>f+n.score[p],0),fullScore:d.ids.reduce((f,p)=>f+n.fullScore[p],0)}))),{copy:s,copied:i}=ub(),l=async()=>{await s(window.location.href),i.value?ht.success("复制成功"):ht.warning("复制失败")};return(d,f)=>c(t)?(C(),A("div",BHe,[w("div",VHe,[w("div",{class:"share-btn",onClick:l},[zHe,Fe(" 分享给好友 ")]),w("div",jHe,"满分:"+ie(o.value)+"分",1)]),w("div",UHe,ie(c(n).formTitle),1),w("div",WHe,[w("div",HHe,"姓名:"+ie(c(n).userName),1),w("div",qHe,[Fe(" 答题时长:"),w("span",null,ie(c(n).time)+"s",1)]),w("div",KHe,"提交时间:"+ie(c(n).createAt),1)]),w("div",YHe,[(C(!0),A(Ae,null,et(r.value,p=>(C(),A("div",{key:p.key,class:"row"},[w("div",GHe,ie(p.title),1),w("div",QHe,ie(p.score)+"/"+ie(p.fullScore),1)]))),128)),w("div",JHe,[XHe,w("div",ZHe,[w("span",eqe,[w("span",null,ie(a.value),1),tqe])])])])])):(C(),A("div",nqe,[w("div",oqe,[w("div",{class:"share-btn",onClick:l},[aqe,Fe(" 分享给好友 ")]),w("div",rqe,ie(c(n).formTitle),1),w("div",sqe,"满分:"+ie(o.value)+"分",1)]),w("div",iqe,[w("div",lqe,"姓名:"+ie(c(n).userName),1),w("div",uqe,[Fe(" 答题时长:"),w("span",null,ie(c(n).time)+"s",1)]),w("div",cqe,"提交时间:"+ie(c(n).createAt),1)]),w("div",dqe,[(C(!0),A(Ae,null,et(r.value,p=>(C(),A("div",{key:p.type,class:"col"},[w("div",fqe,ie(p.title),1),w("div",pqe,ie(p.score)+"/"+ie(p.fullScore),1)]))),128)),w("div",vqe,[hqe,w("div",mqe,[w("span",gqe,[w("span",null,ie(a.value),1),bqe])])])])]))}}),_qe=Ye(yqe,[["__scopeId","data-v-064e4378"]]),wqe={class:"answer-title"},$qe={class:"lf"},Cqe={class:"total"},Sqe=["src"],Eqe={class:"rt"},kqe={key:0},Iqe={class:"score"},Tqe=se({__name:"AnswerTitle",props:{index:{}},setup(e){const t=de("widget"),n=de("answerItem"),o=de("isMobileSize");return(a,r)=>(C(),A("div",wqe,[w("div",$qe,[w("span",null,ie(`${a.index+1}. ${c(t).attrs.title}`),1),w("span",Cqe,"("+ie(c(n).fullScore)+"分)",1),w("img",{class:"icon",src:c(n).isCorrect?c(Ke)("/images/correct.png"):c(Ke)("/images/incorrect.png"),alt:""},null,8,Sqe)]),w("div",Eqe,[c(o)?G("",!0):(C(),A("span",kqe,"得分:")),w("span",Iqe,ie(c(n).score),1),Fe(" 分 ")])]))}}),xqe=Ye(Tqe,[["__scopeId","data-v-78cd63d1"]]),gS=e=>(At("data-v-53a6413f"),e=e(),Ot(),e),Aqe={class:"answer-item"},Oqe=gS(()=>w("div",{style:{height:"10px"}},null,-1)),Dqe={class:"desc"},Pqe=gS(()=>w("div",{style:{height:"13px"}},null,-1)),Mqe=gS(()=>w("div",{style:{height:"10px"}},null,-1)),Nqe={class:"analysis"},Rqe=se({__name:"AnswerItem",props:{index:{},widget:{},answer:{}},setup(e){const t=e;Tt("widget",t.widget);const n=de("answerPage"),o=gn({fullScore:M(()=>n.fullScore[t.widget.id]),score:M(()=>n.score[t.widget.id]),answer:M(()=>t.answer),isCorrect:M(()=>s8(o.score))});Tt("answerItem",o);const a=()=>{const r={fillBlank2:An(()=>Promise.resolve().then(()=>require("./FillBlank-DEAZb9OG.cjs"))),shortAnswer2:An(()=>Promise.resolve().then(()=>require("./FillBlank-DEAZb9OG.cjs"))),numberFillBlank:An(()=>Promise.resolve().then(()=>require("./NumberFillBlank-oRuQenIR.cjs"))),eduRadio:An(()=>Promise.resolve().then(()=>require("./Choice-BpDTbXtG.cjs"))),eduCheckbox:An(()=>Promise.resolve().then(()=>require("./Choice-BpDTbXtG.cjs"))),eduJudgement:An(()=>Promise.resolve().then(()=>require("./Choice-BpDTbXtG.cjs"))),eduSelect:An(()=>Promise.resolve().then(()=>require("./Choice-BpDTbXtG.cjs"))),eduImgRadio:An(()=>Promise.resolve().then(()=>require("./ImgCard-CsVvXbxm.cjs"))),eduImgCheckbox:An(()=>Promise.resolve().then(()=>require("./ImgCard-CsVvXbxm.cjs")))};return r[t.widget.type]||r.fillBlank2};return(r,s)=>(C(),A("div",Aqe,[O(xqe,{index:r.index},null,8,["index"]),r.widget.attrs.desc?(C(),A(Ae,{key:0},[Oqe,w("div",Dqe,ie(r.widget.attrs.desc),1)],64)):G("",!0),Pqe,(C(),ve(Kt(a()))),c(n8)&&r.widget.attrs.showAnalysis?(C(),A(Ae,{key:1},[Mqe,w("div",Nqe,"答案解析:"+ie(r.widget.attrs.analysis||"无"),1)],64)):G("",!0)]))}}),Lqe=Ye(Rqe,[["__scopeId","data-v-53a6413f"]]),Fqe={class:"header"},Bqe={class:"switch"},Vqe=["onClick"],zqe={class:"list"},jqe=se({__name:"AnswerList",setup(e){const t=[{title:"显示全部",key:"all"},{title:"只看错题",key:"incorrect"}],n=P(t[0].key),o=de("answerPage"),a=de("isMobileSize"),r=M(()=>n.value==="all"?Rf.value:Rf.value.filter(i=>!s8(o.score[i.id]))),s=i=>o.answers[i.id];return(i,l)=>(C(),A("div",{class:"answer-list",style:Ze({padding:c(a)?"20px":"20px 30px"})},[w("div",Fqe,[w("div",Bqe,[(C(),A(Ae,null,et(t,d=>w("span",{key:d.key,class:B(["item",{active:d.key===n.value}]),onClick:f=>n.value=d.key},ie(d.title),11,Vqe)),64))])]),w("div",zqe,[(C(!0),A(Ae,null,et(r.value,(d,f)=>(C(),A("div",{key:d.id,class:"item"},[O(Lqe,{index:f,widget:d,answer:s(d)},null,8,["index","widget","answer"])]))),128))])],4))}}),Uqe=Ye(jqe,[["__scopeId","data-v-a801da69"]]),Wqe={class:"conatiner"},Hqe=se({__name:"index",setup(e){const t=P(),{width:n}=cb(t),o=M(()=>n.value<700);return Tt("isMobileSize",o),(a,r)=>(C(),A("div",{ref_key:"answerPageRef",ref:t,class:"answer-page"},[w("div",Wqe,[O(_qe),O(Uqe)])],512))}}),qqe=Ye(Hqe,[["__scopeId","data-v-24a732b9"]]),Kqe=se({__name:"App",props:{id:{},formId:{}},setup(e){const t=e,n=gn({id:t.id,userName:"匿名",formId:t.formId,formTitle:"",answers:{},score:{},fullScore:{},createAt:"",time:60});Tt("answerPage",n);const o=P(!0);return Promise.all([N9e(t.formId),R9e(t.id)]).then(([a,r])=>{n.answers=r.result.answer,n.formTitle=a.result.header.attrs.title,i8(a.result.widgets).forEach(d=>{n.score[d.id]=p8(d,n.answers[d.id]),n.fullScore[d.id]=swe(d)});const s=a.result.widgets.find(d=>d.type==="nameInput");s&&(n.userName=n.answers[s.id]||"匿名"),n.createAt=ut(r.result.create_at*1e3).format("YYYY-MM-DD HH:mm:ss");const{endTime:i,startTime:l}=r.result.meta_info.answerInfo;n.time=ut(i*1e3-l*1e3).second()}).finally(()=>{o.value=!1}),(a,r)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":1888},{default:H(()=>[o.value?G("",!0):(C(),ve(qqe,{key:0}))]),_:1},8,["locale"]))}}),Yqe=e=>{const t=si(Kqe,e);return id(t),t};function j6(e,t){let n=[],o=e.search_config.list||[];for(const a of o){let r=t.find(s=>s.id===a.value);if(r)n.push(r);else return{status:5002,msg:"改链接组件失效",result:[]}}return{status:200,msg:"获取成功",result:n}}function Gqe(e,t,n,o,a,r){console.log("searchInfo: ",a),console.log("formId: ",r),console.log("page: ",n),console.log("order_type: ",t),console.log("order: ",e);const s=P([]),i=P(0);function l(){var f;let d={form_id:r,order:e.value,order_type:t.value,page:n.value,pagecount:o.value,searchInfo:a.value,chain:(f=exports.globalInject.getRoute().query)==null?void 0:f.chain};Qqe(d).then(p=>{s.value=p.list,i.value=p.total})}return l(),Zo(l),{dataList:s,total:i}}const Qqe=async e=>{const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.post("/v2/form/openSearch",e);if(t!==1)throw new Error(o);return n},k1=["basicRadio","occupationRadio","sexRadio","educationRadio","ageRadio","eduRadio"],U6=["index","basicInput","fillBlank","emailInput","idCardInput","textarea","shortAnswer","phoneInput","numberInput","nameInput","companyInput","departmentInput","positionInput","ageInput","fillBlank2","shortAnswer2","numberFillBlank"],Jqe=e=>(At("data-v-0343c7ad"),e=e(),Ot(),e),Xqe={key:0,class:"search-container"},Zqe=Jqe(()=>w("span",{class:"icon iconfont icon-form-sousuo"},null,-1)),eKe={key:1,class:"extra-info"},tKe={class:"title"},nKe=["src"],oKe={class:"des"},aKe={class:"section"},rKe={class:"section-title"},sKe={key:0,class:"request-icon"},iKe={class:"section-content"},lKe=["onClick"],uKe={class:"section-title"},cKe={key:0,class:"request-icon"},dKe={class:"section-content"},fKe={key:2,class:"error-text"},pKe={class:"bottom"},vKe={key:1,class:"title"},hKe=se({__name:"Search",props:{searchWidgets:{},searchInfo:{},searchType:{},tab:{},formTitle:{}},emits:["goSearch"],setup(e,{emit:t}){const n=e,o=P(!1),a=exports.globalInject.getRoute().query,r=P(Object.fromEntries(n.searchWidgets.map(g=>[g.id,a[g.id]]))),s=M(()=>{let g=[];for(const y in r.value){const _=n.searchWidgets.find(I=>I.id===y);_&&r.value[y]&&(k1.includes(_.type)?g.push({label:_.attrs.title,value:_.attrs.list.find(I=>I.value===r.value[y]).label}):g.push({label:_.attrs.title,value:r.value[y]}))}return g}),i=P(!1),l=P(null),d=t,f=M(()=>n.searchInfo.search_config.type==="and");function p(){if(f.value){for(let g in r.value)if(r.value[g]===void 0){i.value=!0;return}}o.value&&(o.value=!1),d("goSearch",r.value)}function h(g,y){r.value[g.id]===y.value?r.value[g.id]=void 0:r.value[g.id]=y.value}function m(g){o.value=!o.value,g.preventDefault()}const b=g=>{o.value&&!l.value.contains(g.target)&&(o.value=!1)};return st(()=>{document.addEventListener("click",b)}),Nn(()=>{document.removeEventListener("click",b)}),(g,y)=>g.searchType===1?(C(),A("div",Xqe,[g.tab==2?(C(),A("div",{key:0,class:"search-input",onClick:mt(m,["stop"])},[Zqe,(C(!0),A(Ae,null,et(s.value,_=>(C(),A("div",{class:"search-card",key:_.label},ie(_.label)+": "+ie(_.value),1))),128))])):G("",!0),g.tab==1?(C(),A("div",eKe,[w("div",tKe,ie(g.searchInfo.extra.title),1),w("img",{src:g.searchInfo.extra.backgroundUrl,alt:""},null,8,nKe)])):G("",!0),Et(w("div",{class:B(["container",{"absolute-class":g.tab==2}]),ref_key:"modalOverlay",ref:l},[w("div",oKe,ie(n.searchInfo.search_config.type==="and"?"输入以下全部条件查询":"输入以下任一条件查询"),1),(C(!0),A(Ae,null,et(g.searchWidgets,_=>(C(),A("div",aKe,[c(k1).includes(_.type)?(C(),A(Ae,{key:0},[w("div",rKe,[f.value?(C(),A("span",sKe,"*")):G("",!0),Fe(" "+ie(_.attrs.title),1)]),w("div",iKe,[(C(!0),A(Ae,null,et(_.attrs.list,I=>(C(),A("div",{class:B(["option-item",{active:r.value[_.id]===I.value}]),onClick:k=>h(_,I)},ie(I.label),11,lKe))),256))])],64)):G("",!0),c(U6).includes(_.type)?(C(),A(Ae,{key:1},[w("div",uKe,[f.value?(C(),A("span",cKe,"*")):G("",!0),Fe(" "+ie(_.attrs.title),1)]),w("div",dKe,[O(c(Pt),{class:B({"error-input":i.value&&!r.value[_.id]}),modelValue:r.value[_.id],"onUpdate:modelValue":I=>r.value[_.id]=I},null,8,["class","modelValue","onUpdate:modelValue"])])],64)):G("",!0),i.value&&!r.value[_.id]?(C(),A("div",fKe," 此项为必填 ")):G("",!0)]))),256)),w("div",pKe,[O(c(Wt),{onClick:p,type:"primary"},{default:H(()=>[Fe("确定")]),_:1})])],2),[[nn,o.value||g.tab==1]])])):(C(),A("div",vKe,ie(g.formTitle),1))}}),mKe=Ye(hKe,[["__scopeId","data-v-0343c7ad"]]),xn={total:"bmu-front-end-fixed--id-totalScoped-bfed893",index:"fake_id",source:"bmu-front-end-fixed--id-source-a3a3a3a3",submitDate:"bmu-front-end-fixed--id-submitDate-acd9fb7",district:"bmu-front-end-fixed--id-district-2d0a0b0c",ip:"bmu-front-end-fixed--id-ip-479a5894",browser:"bmu-front-end-fixed--id-browser-7c9b3837",system:"bmu-front-end-fixed--id-system-f0a5ef8d"};function gKe(e,t,n,o){var f;const a=P([]),r=P([]),s=P(!1),i=P(0);s.value=!0,lO((f=exports.globalInject.getRoute().query)==null?void 0:f.id).then(p=>{r.value=Gm(p.widgets,{source:!!p.get_source_data},p.show_pay_list)});function l(){var p;d(),lO((p=exports.globalInject.getRoute().query)==null?void 0:p.id).then(h=>{r.value=Gm(h.widgets,{},h.show_pay_list)})}function d(){var m;s.value=!0;const p={form_id:(m=exports.globalInject.getRoute().query)==null?void 0:m.id,eacb:exports.globalInject.getToken(),order:e.value,order_type:t.value,page:n.value,pagecount:o.value},h=new Promise(b=>{setTimeout(()=>{b()},1e3)});Promise.all([bKe(p),h]).then(([b])=>{a.value=b.list,i.value=b.total}).finally(()=>{s.value=!1})}return Zo(d),{dataList:a,widgets:r,loading:s,total:i,refreshFn:l}}const bKe=async e=>{if(!e.form_id||!e.eacb){console.error("getFormData","form_id or eacb is unavailable!");return}const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/answerList?form_id=${e.form_id}&eacb=${e.eacb}&order=${e.order}&order_type=${e.order_type}&page=${e.page}&pagecount=${e.pagecount}`);if(t!==1)throw new Error(o);return n};async function lO(e){if(!e){console.error("form_id is unavailable!");return}const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/info?id=${e}&eacb=${exports.globalInject.getToken()}`);if(t!==1)throw new Error(o);return n}function Gm(e,t,n){var l,d,f;const o=["pagination","contactUs","carousel","mapNavigation","button","description"];let a=e||nt.value||[];a=a.filter(p=>!o.includes(p.type)),a.find(p=>p.attrs.standard!==void 0)&&a.unshift({id:xn.total,type:"total",attrs:{title:"总分",id:xn.total}}),a.unshift({id:xn.index,type:"index",attrs:{title:"序号",id:xn.index,value:"fake_id"}});const r=[{id:xn.submitDate,type:"submitDate",attrs:{title:"提交时间",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}},{id:xn.district,type:"district",attrs:{title:"地区",id:xn.district,value:"meta_info.clientInfo.city"}},{id:xn.district,type:"ip",attrs:{title:"IP",id:xn.ip,value:"meta_info.clientInfo.ip"}},{id:xn.browser,type:"browser",attrs:{title:"浏览器",id:xn.browser,value:"meta_info.clientInfo.browser"}},{id:xn.system,type:"system",attrs:{title:"操作系统",id:xn.system,value:"meta_info.clientInfo.osBase.os"}}],s=[{id:xn.submitDate,type:"nickname",attrs:{title:"用户昵称",id:xn.submitDate,value:"meta_info.userInfo.nickname"}},{id:xn.district,type:"openid",attrs:{title:"openId",id:xn.district,value:"meta_info.userInfo.openid"}}];t!=null&&t.source&&r.unshift({id:xn.source,type:"source",attrs:{title:"来源",id:xn.source,value:"source"}});const i=[...a,...r,...s];return+((l=exports.globalInject.getRoute().query)==null?void 0:l.scene)===ac.appoint&&i.push({id:xn.submitDate,type:"appointStatus",attrs:{title:"预约状态",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}},{id:xn.submitDate,type:"appointOperate",attrs:{title:"预约操作",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}}),n&&(+((d=exports.globalInject.getRoute().query)==null?void 0:d.scene)===ac.gain||+((f=exports.globalInject.getRoute().query)==null?void 0:f.scene)===ac.appoint)&&i.push({id:xn.submitDate,type:"gainTotalPrice",attrs:{title:"应付金额",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}},{id:xn.submitDate,type:"gainGradeNumber",attrs:{title:"交易号",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}},{id:xn.submitDate,type:"gainGradeStatus",attrs:{title:"交易状态",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}}),i}async function yKe(e){Lbe(e.url,e.name)}async function _Ke(e,t){const n={form_id:e,answer_id:t,eacb:exports.globalInject.getToken()};return await exports.globalInject.$axios.post("/v2/form/cancelAppointmentAdmin",n)}const sa={__name:"TooltipRow",props:{content:String|Number},setup(e){const t=P(null),n=P(!1),o=()=>{t.value&&(n.value=t.value.scrollWidth>t.value.clientWidth)};return(a,r)=>(C(),A("div",{onMouseenter:o},[n.value?(C(),ve(c(_o),{key:0,class:"item",effect:"dark",content:e.content,placement:"top","show-after":1e3},{default:H(()=>[w("div",{class:"cell-content",ref_key:"cellContent",ref:t},[xe(a.$slots,"default")],512)]),_:3},8,["content"])):(C(),A("div",{key:1,class:"cell-content",ref_key:"cellContent",ref:t},[xe(a.$slots,"default")],512))],32))}},bS=e=>(At("data-v-acc8d1e5"),e=e(),Ot(),e),wKe={style:{height:"100%"}},$Ke={style:{"text-align":"center"}},CKe={class:"cell-content"},SKe={class:"img-radio-box"},EKe={key:0},kKe=["src"],IKe={key:0,class:"file-list"},TKe=["onClick"],xKe=["src","preview-src-list"],AKe={key:0,class:"geolocation-container"},OKe={class:"local-title"},DKe=bS(()=>w("span",{class:"icon iconfont icon-form-location"},null,-1)),PKe={class:"local-des"},MKe=["onMouseenter"],NKe=["onClick"],RKe=["src"],LKe=bS(()=>w("div",{class:"upgrade-title"},[w("span",{class:"icon iconfont icon-form-circle-notice"}),Fe("取消预约")],-1)),FKe=bS(()=>w("span",null," 你确认要取消预约吗?确认取消后,当前预约将失效,系统会自动释放该预约项目的预约名额。 ",-1)),BKe={class:"dialog-footer"},VKe=se({__name:"DataTable",props:{dataList:{},widgets:{},order_type:{},disabled:{type:Boolean}},emits:["update:order_type","cancelAppointSuccess"],setup(e,{emit:t}){const n=e,o=P(!1),a=P(new Map),r=t,s=["basicInput","fillBlank","textarea","phoneInput","shortAnswer","numberInput","nameInput","date","rate","companyInput","departmentInput","positionInput","ageInput","idCardInput","emailInput","fillBlank2","shortAnswer2","numberFillBlank"],i=["gainWithPic","gainWithoutPic"],l=["businessSelect","multiSelect","regionSelect"],d=["basicSelect","nationSelect","eduSelect"],f=["eduJudgement","eduRadio","basicRadio","sexRadio","occupationRadio","educationRadio","ageRadio"],p=["checkbox","eduCheckbox"],h=["sort"],m=["imgRadio","imgCheckbox","eduImgCheckbox","eduImgRadio"],b=["file","resume","work"],g=["geolocation"],y=["source","submitDate","district","ip","browser","system"];st(()=>{console.debug(n.dataList,"dataList"),console.debug(n.dataList.some(he=>{var le;return!!((le=he.meta_info.userInfo)!=null&&le.nickname)}))});const _=M({get:()=>n.dataList.some(he=>{var le;return!!((le=he.meta_info.userInfo)!=null&&le.nickname)}),set:()=>{}});function I(he){return he.country+"-"+he.province+"-"+he.city}function k(){r("update:order_type",n.order_type==="asc"?"desc":"asc")}function E(he,le){let ue=le.id;return he.answer[ue]||"-"}function T(he,le){console.debug(he,le,"row column");let ue=le.id,J="";if(he.answer[ue])return he.answer[ue].map((oe,_e)=>{J+=oe.label+"(数量:"+oe.num+")",_e!=he.answer[ue].length-1&&(J+="、")}),J}function x(he){return console.debug(he,"row11"),(parseFloat(he.total_fee)/100).toFixed(2)}function S(he){if(!he.answer)return 0;let le=0;return n.widgets.map(ue=>{let J=p8(ue,he.answer[ue.id]);le+=J}),le}function D(he){n.disabled||yKe(he)}function N(he){if(n.disabled)return;const le={id:he.id,formId:exports.globalInject.getFormId()},ue=JSON.stringify(le);window.open(`/table/answer?q=${window.btoa(ue)}`)}function L(he,le){let ue=le.id,J=he.answer[ue];return!J||!J.length?"-":J.map(oe=>oe.label).join("-")}function F(he,le){let ue=le.id,J=he.answer[ue];if(!J)return"-";const oe=le.attrs.options.find(_e=>_e.value===J.id);return(oe==null?void 0:oe.label)||"-"}function z(he,le){let ue=le.id,J=he.answer[ue];if(!J)return;let oe=le.attrs.list;if(oe.length){if(J instanceof Array){let _e=oe.filter(ge=>J.includes(ge.value));return _e.length?_e:void 0}return[oe.find(_e=>_e.value===J)]}}function j(he,le){let ue=le.id,J=he.answer[ue];if(!J||!J.id)return"-";const oe=le.attrs.list.find(_e=>_e.value===J.id);return oe&&oe.type==="other"?oe.label+":"+J.input:oe&&J.supplyInput?oe.label+":"+J.supplyInput:(oe==null?void 0:oe.label)||"-"}function X(he,le){var _e;let ue=le.id,J=he.answer[ue];return!J||!J.length?"-":(_e=le.attrs.list.map(ge=>{let Me=J.find(ee=>ee.id===ge.value);if(Me)return ge.type==="other"?Me.label+":"+Me.input:Me.supplyInput?Me.label+":"+Me.supplyInput:Me.label}))==null?void 0:_e.filter(ge=>ge!==void 0).join(",")}function U(he,le){var _e;let ue=le.id,J=he.answer[ue];if(!J||!J.length)return"-";let oe=le.attrs.list;return oe.length?(_e=J.map(ge=>{var Me;return(Me=oe.find(ee=>ee.value===ge))==null?void 0:Me.label}))==null?void 0:_e.join(">"):"-"}function W(he,le){let ue=le.id,J=he.answer[ue];if(!(!J||!J.length))return J}function Q(he,le){let ue=le.attrs.value;ue=ue.split(".");let J=he;for(let oe=0;oe<ue.length;oe++)if(J)J=J[ue[oe]];else return"-";switch(le.type){case"submitDate":return Em(new Date(J*1e3));case"district":return I(J);default:return J}}function q(he){if(!he)return;const le=he.lat,ue=he.lng;return`https://apis.map.qq.com/ws/staticmap/v2/?center=${le},${ue}&zoom=17&size=300*300&key=${exports.globalInject.qqMapKey}`}const V=P({});function Y(he){o.value=!0,V.value=he}const Z=async()=>{o.value=!1,(await _Ke(V.value.form_id,V.value.id)).data.status===1?(r("cancelAppointSuccess"),ht.success("取消预约成功")):ht.error("取消预约失败")},ce=(he,le)=>{var _e;let ue=(he==null?void 0:he.answer[le.id])||[],J=((_e=le==null?void 0:le.attrs)==null?void 0:_e.appoint)||[],oe=[];return ue.forEach(ge=>{let Me=ge.appointment_id,ee=ge.appointment_date||"",ne=`(${ge.quota})`,fe="",ke="";if(ge!=null&&ge.appointment_time){let Pe=re(String(ge.appointment_time));fe=Pe.formattedStartTime,ke=Pe.formattedEndTime}let $e=J.find(Pe=>{var ze;return((ze=Pe==null?void 0:Pe.basicInfo)==null?void 0:ze.id)===Me});if($e&&($e!=null&&$e.basicInfo)){let Pe=($e==null?void 0:$e.basicInfo)||{};oe.push(Pe.name+" "+ee+fe+ke+ne)}}),oe.join(",")},re=he=>{if(he.length!==16)throw new Error("Input string must be 16 characters long");const le=he.substring(8,12),ue=he.substring(12,16),J=` ${le.substring(0,2)}:${le.substring(2)}`,oe=`-${ue.substring(0,2)}:${ue.substring(2)}`;return{formattedStartTime:J,formattedEndTime:oe}},ye=he=>{let le="";return!he.appointment||!he.appointment.length||(le=he.appointment[0].status===1?"已预约":"已取消"),le};return(he,le)=>{const ue=Bt("svg-icon");return C(),A("div",wKe,[O(c(TM),{data:he.dataList,height:"100%",style:{width:"100%"},"header-cell-style":{background:"#F5F8FD","font-weight":"400","font-size":"14px",color:"#1A1A1A","line-height":"23px",height:"50px"},border:!0,"cell-style":{"font-weight":"400","font-size":"14px",color:"#767676",padding:"10px 0",height:"40px"},"scrollbar-always-on":!0},{default:H(()=>[(C(!0),A(Ae,null,et(he.widgets,J=>(C(),ve(c(xM),{height:"40",width:"130",resizable:!0,data:J,fixed:J.type==="index",prop:J.id,key:J.fake_id,"show-overflow-tooltip":!1},Ia({_:2},[J.type==="index"?{name:"header",fn:H(()=>[w("div",{class:"sort-cell",onClick:k},[Fe(" 序号 "),w("span",{class:B(["icon iconfont icon-form-sort",{active:he.order_type==="asc"}])},null,2)])]),key:"0"}:{name:"header",fn:H(()=>[O(sa,{content:J.attrs.title},{default:H(()=>[Fe(ie(J.attrs.title),1)]),_:2},1032,["content"])]),key:"1"},J.type==="index"?{name:"default",fn:H(({row:oe})=>[w("div",$Ke,ie(oe.fake_id),1)]),key:"2"}:void 0,s.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:E(oe,J)},{default:H(()=>[Fe(ie(E(oe,J)),1)]),_:2},1032,["content"])]),key:"3"}:void 0,i.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:T(oe,J)},{default:H(()=>[Fe(ie(T(oe,J)),1)]),_:2},1032,["content"])]),key:"4"}:void 0,l.includes(J.type)?{name:"default",fn:H(({row:oe})=>[w("div",CKe,[O(sa,{content:L(oe,J)},{default:H(()=>[Fe(ie(L(oe,J)),1)]),_:2},1032,["content"])])]),key:"5"}:void 0,f.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:j(oe,J)},{default:H(()=>[Fe(ie(j(oe,J)),1)]),_:2},1032,["content"])]),key:"6"}:void 0,d.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:F(oe,J)},{default:H(()=>[Fe(ie(F(oe,J)),1)]),_:2},1032,["content"])]),key:"7"}:void 0,p.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:X(oe,J)},{default:H(()=>[Fe(ie(X(oe,J)),1)]),_:2},1032,["content"])]),key:"8"}:void 0,h.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:U(oe,J)},{default:H(()=>[Fe(ie(U(oe,J)),1)]),_:2},1032,["content"])]),key:"9"}:void 0,m.includes(J.type)?{name:"default",fn:H(({row:oe})=>[w("div",SKe,[z(oe,J)?(C(!0),A(Ae,{key:0},et(z(oe,J),(_e,ge)=>(C(),A(Ae,{key:_e.value},[ge!==0?(C(),A("span",EKe,",")):G("",!0),w("img",{src:_e.url},null,8,kKe),w("span",null,ie(_e.label),1)],64))),128)):(C(),A(Ae,{key:1},[Fe("-")],64))])]),key:"10"}:void 0,b.includes(J.type)?{name:"default",fn:H(({row:oe})=>[W(oe,J)?(C(),A("div",IKe,[(C(!0),A(Ae,null,et(W(oe,J),_e=>(C(),A("div",{class:"file-item",key:_e.id,onClick:ge=>D(_e)},[O(c(_o),{content:_e.name,placement:"top"},{default:H(()=>[c(Sm)(_e.url)==="img"?(C(),A("img",{key:0,src:_e.url,"preview-src-list":[_e.url],alt:""},null,8,xKe)):(C(),ve(ue,{key:1,class:"file-icon",name:c(Sm)(_e.url)},null,8,["name"]))]),_:2},1032,["content"])],8,TKe))),128))])):G("",!0)]),key:"11"}:void 0,g.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(c(Yc),{trigger:"hover",width:"325","popper-class":"geolocation-popover",disabled:!oe.answer[J.id]},{reference:H(()=>{var _e;return[w("div",{class:"cell-content",onMouseenter:ge=>a.value.set(oe.fake_id,!0)},[w("span",null,ie(((_e=oe.answer[J.id])==null?void 0:_e.address)||"-"),1)],40,MKe)]}),default:H(()=>{var _e,ge,Me;return[a.value.has(oe.fake_id)?(C(),A("div",AKe,[w("div",OKe,[DKe,Fe(" "+ie((_e=oe.answer[J.id])==null?void 0:_e.address),1)]),w("div",PKe,"经度:"+ie((ge=oe.answer[J.id])==null?void 0:ge.lat)+" 纬度:"+ie((Me=oe.answer[J.id])==null?void 0:Me.lng),1),O(c(fM),{class:"image",src:q(oe.answer[J.id])},null,8,["src"])])):G("",!0)]}),_:2},1032,["disabled"])]),key:"12"}:void 0,J.type==="total"?{name:"default",fn:H(({row:oe})=>[w("div",{class:"edu-total-scope",onClick:_e=>N(oe)},ie(S(oe)),9,NKe)]),key:"13"}:void 0,y.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:Q(oe,J)},{default:H(()=>[Fe(ie(Q(oe,J)),1)]),_:2},1032,["content"])]),key:"14"}:void 0,J.type==="appointStatus"?{name:"default",fn:H(({row:oe})=>[Fe(ie(ye(oe)),1)]),key:"15"}:void 0,J.type==="appoint"?{name:"default",fn:H(({row:oe})=>[O(sa,{content:ce(oe,J)},{default:H(()=>[Fe(ie(ce(oe,J)),1)]),_:2},1032,["content"])]),key:"16"}:void 0,J.type==="appointOperate"?{name:"default",fn:H(({row:oe})=>[ye(oe)==="已预约"?(C(),ve(c(Wt),{key:0,type:"primary",link:"",onClick:_e=>Y(oe)},{default:H(()=>[Fe(" 取消预约 ")]),_:2},1032,["onClick"])):G("",!0)]),key:"17"}:void 0,J.type==="gainTotalPrice"?{name:"default",fn:H(({row:oe})=>[O(sa,{content:x(oe)},{default:H(()=>[Fe(ie(x(oe)),1)]),_:2},1032,["content"])]),key:"18"}:void 0,J.type==="gainGradeNumber"?{name:"default",fn:H(({row:oe})=>[O(sa,{content:oe.transaction_id},{default:H(()=>[Fe(ie(oe.transaction_id),1)]),_:2},1032,["content"])]),key:"19"}:void 0,J.type==="gainGradeStatus"?{name:"default",fn:H(({row:oe})=>[O(sa,{content:oe.order_status_str},{default:H(()=>[Fe(ie(oe.order_status_str),1)]),_:2},1032,["content"])]),key:"20"}:void 0,J.type==="nickname"&&_.value?{name:"default",fn:H(({row:oe})=>[oe.meta_info.userInfo?(C(),ve(sa,{key:0,content:oe.meta_info.userInfo.nickname??""},{default:H(()=>[oe.meta_info.userInfo.headimgurl?(C(),A("img",{key:0,style:{width:"18px","border-radius":"50%"},src:oe.meta_info.userInfo.headimgurl},null,8,RKe)):G("",!0),Fe(" "+ie(oe.meta_info.userInfo.nickname??""),1)]),_:2},1032,["content"])):G("",!0)]),key:"21"}:void 0,J.type==="openid"&&_.value?{name:"default",fn:H(({row:oe})=>[oe.meta_info.userInfo?(C(),ve(sa,{key:0,content:oe.meta_info.userInfo.openid??""},{default:H(()=>[Fe(ie(oe.meta_info.userInfo.openid??""),1)]),_:2},1032,["content"])):G("",!0)]),key:"22"}:void 0]),1032,["data","fixed","prop"]))),128))]),_:1},8,["data"]),O(c(Ga),{modelValue:o.value,"onUpdate:modelValue":le[1]||(le[1]=J=>o.value=J),width:"400px"},{header:H(()=>[LKe]),footer:H(()=>[w("div",BKe,[O(c(Wt),{onClick:le[0]||(le[0]=J=>o.value=!1)},{default:H(()=>[Fe("暂不取消")]),_:1}),O(c(Wt),{type:"primary",onClick:Z},{default:H(()=>[Fe(" 取消预约 ")]),_:1})])]),default:H(()=>[FKe]),_:1},8,["modelValue"])])}}}),W6=Ye(VKe,[["__scopeId","data-v-acc8d1e5"]]),zKe={class:"search-result-page"},jKe={key:0,class:"title-text"},UKe={key:2,class:"empty-table"},WKe=se({__name:"Result",props:{searchWidgets:{},searchInfo:{},widgets:{},formId:{}},setup(e){const t=e,n=P("fake_id"),o=P("desc"),a=P(1),r=P(30),s=exports.globalInject.getRoute().query,i=P({...s,id:void 0,tab:void 0,chain:void 0}),l=M(()=>t.widgets.filter(m=>t.searchInfo.show_config.find(b=>m.id===b.id))||[]);function d(m){a.value=m}function f(m){r.value=m}let{dataList:p,total:h}=Gqe(n,o,a,r,i,t.formId);return(m,b)=>(C(),A("div",zKe,[m.searchInfo.type===2?(C(),A("div",jKe)):G("",!0),c(p).length?(C(),ve(W6,{key:1,class:"data-table-container",dataList:c(p),widgets:l.value,disabled:!0,order_type:o.value,"onUpdate:order_type":b[0]||(b[0]=g=>o.value=g)},null,8,["dataList","widgets","order_type"])):(C(),A("div",UKe," 没有查询到结果,请确认所填信息正确 ")),c(h)?(C(),ve(c(mM),{key:3,background:!0,"current-page":a.value,"onUpdate:currentPage":b[1]||(b[1]=g=>a.value=g),"page-size":r.value,"onUpdate:pageSize":b[2]||(b[2]=g=>r.value=g),"page-sizes":[10,20,30,50],small:!0,total:c(h),layout:"prev, pager, next, sizes",onSizeChange:f,onCurrentChange:d,class:"pagination-container"},null,8,["current-page","page-size","total"])):G("",!0)]))}}),HKe=Ye(WKe,[["__scopeId","data-v-c32a4997"]]),Sb=e=>(At("data-v-2ff1d313"),e=e(),Ot(),e),qKe={key:0,class:"password-page"},KKe=Sb(()=>w("div",{class:"title"},"输入密码才能查询",-1)),YKe=Sb(()=>w("div",{class:"des-title"},"如没密码或密码不正确,请向表单管理员索取",-1)),GKe={class:"error-text"},QKe={key:1,class:"error-page"},JKe=["src"],XKe=Sb(()=>w("div",{class:"main-text"},"对不起,当前链接无法访问",-1)),ZKe=Sb(()=>w("div",{class:"des-text"},"请联系管理员",-1)),eYe=se({__name:"Interpage",props:{errInfo:{}},emits:["confirmPassword"],setup(e,{emit:t}){const n=e;console.log("props: ",n);const o=M(()=>n.errInfo.status===4009?"密码错误":""),a=t,r=P("");function s(){a("confirmPassword",r.value)}return(i,l)=>[4008,4009].includes(i.errInfo.status)?(C(),A("div",qKe,[KKe,YKe,O(c(Pt),{class:B({"error-input":o.value}),type:"password",modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=d=>r.value=d),"show-password":!0},{prefix:H(()=>[w("span",{class:B([{"error-text":o.value},"icon iconfont icon-form-lock"])},null,2)]),_:1},8,["class","modelValue"]),w("div",GKe,ie(o.value),1),O(c(Wt),{class:"confirm-btn",size:"large",type:"primary",onClick:s},{default:H(()=>[Fe("验证并搜索")]),_:1})])):(C(),A("div",QKe,[w("img",{src:`${c(Hn)}/images/search-error.png`,class:"error-img",alt:""},null,8,JKe),XKe,ZKe]))}}),tYe=Ye(eYe,[["__scopeId","data-v-2ff1d313"]]),nYe={key:1,class:"container"},oYe=se({__name:"index",setup(e){const t=P(!0),n=P(),o=P(""),a=P(""),r=P(0),s=P(null),i=P(1);function l(_){r.value=1,ot(()=>{const I=exports.globalInject.getRouter(),k=exports.globalInject.getRoute();I.replace({query:{tab:"2",id:h.value.form_id,..._,chain:k.query.chain}}).catch(E=>{E.name!=="NavigationDuplicated"&&console.error(E)}).finally(()=>{r.value=2})})}const{chain:d}=exports.globalInject.getRoute().query,f=P([]),p=P([]),h=P({extra:{},form_id:""});d&&b(d);function m(_){b(d,btoa(unescape(encodeURIComponent(_))))}async function b(_,I=""){let k=await F9e(_,I);if(k.status!==1){t.value=!1,s.value=k,k.status===4009&&ht.error(k.msg);return}h.value=k.result,a.value=k.result.form_id;let E=await W9e(k.result.form_id);if(E.status===1)o.value=E.result.header.attrs.title,s.value=null,t.value=!1;else{t.value=!1,s.value={status:5002};return}if(f.value=Gm(E.result.widgets),i.value=k.result.type,k.result.type===2){r.value=2;return}let{status:T,result:x}=j6(k.result,f.value);T===200?(p.value=x,r.value=1):s.value={status:T}}const{width:g}=cb(n),y=M(()=>g.value<700);return Tt("isMobileSize",y),(_,I)=>{const k=rl("loading");return Et((C(),A("div",{ref_key:"searchPageRef",ref:n,class:"search-page"},[s.value?(C(),ve(tYe,{key:0,onConfirmPassword:m,errInfo:s.value},null,8,["errInfo"])):(C(),A("div",nYe,[[1,2].includes(r.value)?(C(),ve(mKe,{key:0,onGoSearch:l,searchType:i.value,searchInfo:h.value,formTitle:o.value,tab:r.value,searchWidgets:p.value},null,8,["searchType","searchInfo","formTitle","tab","searchWidgets"])):G("",!0),r.value==2?(C(),ve(HKe,{key:1,searchType:i.value,searchInfo:h.value,widgets:f.value,formId:a.value,searchWidgets:p.value},null,8,["searchType","searchInfo","widgets","formId","searchWidgets"])):G("",!0)]))])),[[k,t.value]])}}}),aYe=Ye(oYe,[["__scopeId","data-v-dd54375b"]]),rYe=se({__name:"App",props:{formId:{}},setup(e){return(t,n)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":1888},{default:H(()=>[O(aYe)]),_:1},8,["locale"]))}}),sYe=e=>{const t=si(rYe,e);return id(t),t},iYe=e=>{switch(e){case"2077":return{url:"https://static.bmwax.cn/form_static/images/url-illegal-bg.png",title:"该网址存在安全风险,无法跳转",des:"",btnText:"创建我的表单",handleClick:()=>{Xu("/")}};case"2078":return{url:"https://static.bmwax.cn/form_static/images/url-pendding-bg.png",title:"此网址正在审核中",des:"大约需要 1 小时,请您耐心等待",btnText:"创建我的表单",handleClick:()=>{Xu("/")}};default:return Xu("/404"),{url:"",title:"",des:"",btnText:"",handleClick:()=>{Xu("")}}}},lYe={class:"content"},uYe=["src"],cYe={key:1,class:"title-text"},dYe={key:2,class:"des-text"},fYe=se({__name:"App",props:{code:{}},setup(e){const t=e;let{url:n,des:o,title:a,btnText:r,handleClick:s}=iYe(t.code);return(i,l)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":1888},{default:H(()=>[w("div",lYe,[c(n)?(C(),A("img",{key:0,src:c(n),alt:""},null,8,uYe)):G("",!0),c(a)?(C(),A("div",cYe,ie(c(a)),1)):G("",!0),c(o)?(C(),A("div",dYe,ie(c(o)),1)):G("",!0),c(r)?(C(),ve(c(Wt),{key:3,class:"main-btn",type:"primary",onClick:c(s)},{default:H(()=>[Fe(ie(c(r)),1)]),_:1},8,["onClick"])):G("",!0)])]),_:1},8,["locale"]))}}),pYe=Ye(fYe,[["__scopeId","data-v-05126dba"]]),vYe=e=>{const t=si(pYe,e);return id(t),t},hYe=()=>{const e=document.createElement("script");e.src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js",e.onload=()=>{console.log("WeChat SDK loaded")},e.onerror=()=>{console.error("Failed to load WeChat SDK")},document.head.appendChild(e)};st(()=>{console.log("mounted"),hYe()});exports.CHANGE_EVENT=Xs;exports.CacheDialog=z6;exports.ChoosenView=lo;exports.ClickOutside=$c;exports.CommonSetting=Sr;exports.ConfirmDialog=m8;exports.DataTable=W6;exports.DefaultDescAttrs=GN;exports.EVENT_CODE=Mt;exports.ElButton=Wt;exports.ElButtonGroup=sP;exports.ElCheckbox=Xo;exports.ElConfigProvider=Cs;exports.ElDatePicker=wm;exports.ElDialog=Ga;exports.ElDivider=Q_;exports.ElDropdown=cM;exports.ElDropdownMenu=dM;exports.ElIcon=lt;exports.ElInput=Pt;exports.ElInputNumber=ka;exports.ElMessage=ht;exports.ElOption=qs;exports.ElPagination=mM;exports.ElPopover=Yc;exports.ElProgress=Rg;exports.ElRadio=Df;exports.ElRadioButton=U_;exports.ElRadioGroup=Pf;exports.ElScrollbar=du;exports.ElSelect=Hs;exports.ElSwitch=Jl;exports.ElTabPane=zr;exports.ElTable=TM;exports.ElTableColumn=xM;exports.ElTabs=Fg;exports.ElTag=zP;exports.ElTimePicker=Pg;exports.ElTooltip=_o;exports.ElUpload=Gc;exports.FormSetting=gt;exports.Fragment=Ae;exports.LinkTab=KN;exports.SceneType=ac;exports.Tab=jl;exports.TinyColor=aP;exports.Transition=ta;exports.UPDATE_MODEL_EVENT=yn;exports.VerifyTip=To;exports.Vt=Ir;exports.WidgetList=vS;exports._Set=t3;exports._SetCache=dw;exports._arrayIncludes=d3;exports._arrayIncludesWith=f3;exports._baseFlatten=v3;exports._baseIteratee=A$;exports._baseRest=mw;exports._cacheHas=fw;exports._export_sfc=Ye;exports._export_sfc$1=dt;exports._setToArray=l3;exports._sfc_main=Kn;exports._sfc_main$1=eo;exports._sfc_main$2=ao;exports._sfc_main$3=mS;exports._sfc_main$4=QN;exports.acceptList=vb;exports.actionBtnOptions=vye;exports.activeWidget=zg;exports.activeWidgetAttrs=v8;exports.activeWidgetId=kn;exports.activeWidgetIndex=cwe;exports.activeWidgetInfo=dwe;exports.activeWidgetType=o1;exports.addClass=Ji;exports.addExtraLink=H9e;exports.addUnit=da;exports.addWidget=Zu;exports.answerTypeOptions=YM;exports.applyFormSetting=I$;exports.applyFrom=mb;exports.arrow_down_default=Hc;exports.arrow_right_default=qr;exports.arrow_up_default=Cg;exports.beforeExitWorksapce=Z9e;exports.browser=vl;exports.buildProps=it;exports.caret_right_default=bse;exports.changeCommonSetting=fye;exports.checkWidgets=o6;exports.cloneDeep=On;exports.cloneDeep$1=xp;exports.close_default=_s;exports.collectList=fb;exports.collectList$1=rye;exports.commonjsGlobal=io;exports.componentConfig=QC;exports.computed=M;exports.contactUsWidget=br;exports.copyText=Bbe;exports.createBaseVNode=w;exports.createBlock=ve;exports.createCommentVNode=G;exports.createElementBlock=A;exports.createFormAnswerApp=Yqe;exports.createFormErrorApp=vYe;exports.createFormInputApp=RHe;exports.createFormPreviewApp=FHe;exports.createFormSearchApp=sYe;exports.createOpenSearch=B9e;exports.createSlots=Ia;exports.createStaticVNode=y4;exports.createTextVNode=Fe;exports.createVNode=O;exports.createWidget=Wp;exports.createWorkspaceApp=Pze;exports.debounce=Yze;exports.debounce$1=Gi;exports.debugWarn=on;exports.defineAsyncComponent=An;exports.defineComponent=se;exports.definePropType=De;exports.deleteLink=K9e;exports.deleteOpenSearch=z9e;exports.errorWidgets=Tc;exports.eventBus=oS;exports.examWidgets=Rf;exports.flattedChildren=tf;exports.formItemContextKey=el;exports.formatFileSize=jM;exports.generateDefaultLinkAttr=YN;exports.generateUUID=at;exports.getAnswerListByD=Q9e;exports.getAppointmentTempUse=J9e;exports.getClientXY=Oee;exports.getCreateUid=L$;exports.getCurrentInstance=kt;exports.getDataList=gKe;exports.getDefaultExportFromCjs=vo;exports.getDefaultForm=A9e;exports.getDeviceId=S$;exports.getFileExtension=b$;exports.getForm=i6;exports.getFormName=Lf;exports.getGroupedIds=D$;exports.getImageUrl=Ke;exports.getLinkStatus=c6;exports.getList=q9e;exports.getOpenSearchList=U9e;exports.getRandomPhone=Fbe;exports.getRegion=uye;exports.getSceneFormTitle=C$;exports.getSceneType=xa;exports.getScenenName=tye;exports.getScoreTypes=l8;exports.getSearchWidget=j6;exports.getTemplate=l6;exports.getTotalTableColumn=Gm;exports.getWidgetRealIndex=a8;exports.groupName=M6;exports.groupedWidgets=km;exports.guardReactiveProps=lc;exports.h=_t;exports.hasClass=pr;exports.hasOwn=bs;exports.headerWidget=Io;exports.iconPropType=Do;exports.idMapping=R6;exports.infoConfig=JC;exports.inject=de;exports.inputWidgets=U6;exports.isArrayLikeObject_1=h3;exports.isClient=Qt;exports.isExamScene=$$;exports.isFormChanged=O$;exports.isFunction=mn;exports.isMobile=oye;exports.isMobileOrTablet=jbe;exports.isNil=Wa;exports.isObject=fo;exports.isPropAbsent=hc;exports.isRef=bn;exports.isScoreTypeDisabled=u8;exports.isShowAnalysis=n8;exports.isString=wn;exports.isWechatBrowser=qM;exports.isWxMiniProgram=iC;exports.loading_default=nu;exports.lodashExports=Xl;exports.mergeModels=Yi;exports.mergeProps=vn;exports.message=ds;exports.more_default=zse;exports.mutable=_r;exports.nextTick=ot;exports.noDisturbOptions=mye;exports.normalizeClass=B;exports.normalizeProps=hf;exports.normalizeStyle=Ze;exports.noticeModeOptions=hye;exports.numList=sye;exports.onActivated=Xf;exports.onBeforeMount=Rc;exports.onBeforeUnmount=Nn;exports.onDragMove=N6;exports.onMounted=st;exports.onUnmounted=po;exports.onUpdated=sl;exports.openBlock=C;exports.plus_default=Sg;exports.popScopeId=Ot;exports.provide=Tt;exports.pushScopeId=At;exports.putOpenSearch=V9e;exports.radioWidgets=k1;exports.reactive=gn;exports.ref=P;exports.removeClass=Qr;exports.render=Ha;exports.renderList=et;exports.renderSlot=xe;exports.resetSettingOldData=_ye;exports.resetWidgetsOldData=$9e;exports.resolveComponent=Bt;exports.resolveDirective=rl;exports.resolveDynamicComponent=Kt;exports.saveConfirm=t7e;exports.saveForm=eS;exports.saveOldSetting=Xc;exports.saveOldWidgets=Hp;exports.sceneConfigList=eye;exports.scrollToWidget=zf;exports.selectKey=bp;exports.select_default=__;exports.setActiveWidget=Vf;exports.setActiveWidgetRows=Cwe;exports.setAllRequired=wwe;exports.setCodeId=pU;exports.setDateAttrs=hwe;exports.setExtraData=vU;exports.setFormId=L4;exports.setGlobalInject=fU;exports.setJumpLink=Y9e;exports.setMapNavAttrs=Swe;exports.setMaxLength=pwe;exports.setMaxNum=_we;exports.setMinLength=fwe;exports.setMinNum=ywe;exports.setMultiplyAppoint=Ewe;exports.setMultiplyAvail=Iwe;exports.setMultiplyQuota=kwe;exports.setOpenSearchStatus=j9e;exports.setOptionRandom=$we;exports.setPageHeaderAttrs=vwe;exports.setPlaceholder=mwe;exports.setPrefixStock=Twe;exports.setRatingAttrs=a1;exports.setSuffixStock=xwe;exports.setViewVoteRate=Ep;exports.setWidgetAttrs=Xt;exports.shallowRef=Ua;exports.shortUrl=$a;exports.sizeList=pb;exports.staticPrefix=Hn;exports.storage=M$;exports.throwError=Ka;exports.timeList=iye;exports.timeList2=lye;exports.toDisplayString=ie;exports.toHandlers=Fz;exports.toNumber=G1e;exports.toRaw=wt;exports.toRef=_n;exports.toRefs=wo;exports.triggerEvent=YZ;exports.unref=c;exports.updateSetting=s6;exports.useAriaProps=Er;exports.useClipboard=ub;exports.useConfirm=ul;exports.useElementSize=cb;exports.useEventListener=Xn;exports.useFocusController=Gw;exports.useFormDisabled=kr;exports.useFormItem=ts;exports.useFormItemInputId=cu;exports.useFormSize=ea;exports.useGeolocation=S6e;exports.useJSONP=WN;exports.useLocale=pn;exports.useModel=Gr;exports.useNamespace=Xe;exports.useQRCode=wb;exports.useResizeObserver=jo;exports.useScroll=E6e;exports.useSizeProp=Ya;exports.useTimeoutFn=fm;exports.useTooltipContentProps=wa;exports.usedStorage=Vg;exports.vModelText=D4;exports.vShow=nn;exports.verifyFormData=cye;exports.watch=Se;exports.watchEffect=Zo;exports.watchOnce=_6e;exports.widgets=nt;exports.withCtx=H;exports.withDirectives=Et;exports.withInstall=fn;exports.withKeys=Ln;exports.withModifiers=mt;exports.withNoopInstall=Ta;
145
+ `;return typeof o=="function"&&o(null,h),h};const U7e=n7e,E1=f6,I6=E6,W7e=k6;function lS(e,t,n,o,a){const r=[].slice.call(arguments,1),s=r.length,i=typeof r[s-1]=="function";if(!i&&!U7e())throw new Error("Callback required as last argument");if(i){if(s<2)throw new Error("Too few arguments provided");s===2?(a=n,n=t,t=o=void 0):s===3&&(t.getContext&&typeof a>"u"?(a=o,o=void 0):(a=o,o=n,n=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(n=t,t=o=void 0):s===2&&!t.getContext&&(o=n,n=t,t=void 0),new Promise(function(l,d){try{const f=E1.create(n,o);l(e(f,t,o))}catch(f){d(f)}})}try{const l=E1.create(n,o);a(null,e(l,t,o))}catch(l){a(l)}}vl.create=E1.create;vl.toCanvas=lS.bind(null,I6.render);vl.toDataURL=lS.bind(null,I6.renderToDataURL);vl.toString=lS.bind(null,function(e,t,n){return W7e.render(e,n)});const H7e=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const q7e=()=>{};function K7e(...e){if(e.length!==1)return _n(...e);const t=e[0];return typeof t=="function"?al(PO(()=>({get:t,set:q7e}))):P(t)}function wb(e,t){const n=K7e(e),o=P("");return Se(n,async a=>{n.value&&H7e&&(o.value=await vl.toDataURL(a,t))},{immediate:!0}),o}const Y7e=e=>(At("data-v-e6b6ece9"),e=e(),Ot(),e),G7e={class:"link-tab"},Q7e={class:"row"},J7e={class:"left"},X7e=["src"],Z7e={class:"size-options"},eze=["onClick"],tze={class:"right"},nze={class:"switch"},oze=Y7e(()=>w("div",{class:"tip"},"注:根据中华人民共和国网络安全法规定,在收集个人信息时,需征得填表者同意,并不得违反法律、行政法规的规定和双方约定收集、使用个人信息。",-1)),aze=se({__name:"LinkTab",setup(e){const t=xa(),n=M({get:()=>gt.value.switch,set:f=>{gt.value.switch=f,s6()}}),o=[{name:"小号",size:200},{name:"中号",size:400,active:!0},{name:"大号",size:800}],a=wb(Ff,{width:400,margin:2}),r=f=>{const p=document.createElement("canvas");vl.toCanvas(p,Ff.value,{width:f,margin:2},h=>{h&&console.error(h);const m=document.createElement("a");m.href=p.toDataURL("image/png"),m.download=`${Lf()}_${f}_${new Date().getTime()}.png`,m.click()})},{copy:s,copied:i}=ub(),l=async()=>{await s($a.value),i.value?ht.success("复制链接成功"):ht.warning("复制链接失败")},d=()=>{window.open($a.value)};return(f,p)=>(C(),A("div",G7e,[w("div",Q7e,[w("div",J7e,[w("img",{class:"qrcode",src:c(a),alt:""},null,8,X7e),O(c(Yc),{trigger:"hover",placement:"bottom",width:"90","popper-style":{padding:"0 5px"}},{reference:H(()=>[O(c(Wt),{class:"btn",size:"small",type:"primary",link:"",onClick:p[0]||(p[0]=h=>r(400))},{default:H(()=>[Fe(" 下载 ")]),_:1})]),default:H(()=>[w("div",Z7e,[(C(),A(Ae,null,et(o,h=>w("div",{key:h.size,class:"item",onClick:m=>r(h.size)},ie(`${h.name}(${h.size}px * ${h.size}px)`),9,eze)),64))])]),_:1})]),w("div",tze,[w("div",nze,[O(c(Jl),{size:"small",modelValue:n.value,"onUpdate:modelValue":p[1]||(p[1]=h=>n.value=h),"active-value":0,"inactive-value":1},null,8,["modelValue"]),w("span",null,ie(c(t)==4?"预约开启":"问卷开启,数据收集中"),1)]),O(c(Pt),{class:"link",readonly:!0,"model-value":c($a)},{suffix:H(()=>[O(c(_o),{content:"直接打开"},{default:H(()=>[w("i",{class:"iconfont icon-form-share",onClick:d})]),_:1})]),_:1},8,["model-value"]),O(c(Wt),{class:"copy",type:"primary",onClick:l},{default:H(()=>[Fe(" 复制链接 ")]),_:1})])]),oze]))}}),rze=Ye(aze,[["__scopeId","data-v-e6b6ece9"]]),$b=e=>(At("data-v-345ff8f2"),e=e(),Ot(),e),sze={class:"wechat-tab"},ize=$b(()=>w("div",{class:"dot"},"1",-1)),lze=$b(()=>w("div",{class:"dot"},"2",-1)),uze=$b(()=>w("div",{class:"dot"},"3",-1)),cze=$b(()=>w("div",null,"在「文章设置-原文链接」中粘贴表单链接",-1)),dze={class:"url-row"},fze={class:"url-row"},pze={class:"qrcode"},vze=["src"],hze={class:"url-row"},mze={class:"url-row"},gze=se({__name:"WechatTab",setup(e){const t=M(()=>`<a href="${$a.value}">${Lf()}</a>`),n=wb($a,{width:400,margin:2}),{copy:o,copied:a}=ub(),r=async()=>{await o($a.value),a.value?ht.success("复制链接成功"):ht.warning("复制链接失败")},s=async()=>{await o(t.value),a.value?ht.success("复制代码成功"):ht.warning("复制代码失败")},i=()=>{window.open($a.value)},l=()=>{const I=document.createElement("a");I.href=n.value,I.download=`${Lf()}_400_${new Date().getTime()}.png`,I.click()},d=[{label:"已认证公众号",value:"1"},{label:"已开通微信支付",value:"2"},{label:"未认证公众号",value:"3"}],f=P(d[0].value),p=[{label:"公众号文章",value:"1"},{label:"底部菜单栏",value:"2"},{label:"自动回复",value:"3"}],h=P(p[0].value),m={"1,1":["原文链接","二维码"],"1,2":["超链接"],"1,3":["链接代码","表单链接"],"2,1":["超链接","原文链接","二维码"],"2,2":["超链接"],"2,3":["链接代码","表单链接"],"3,1":["原文链接","二维码"],"3,2":["二维码"],"3,3":["链接代码","表单链接"]},b=M(()=>`${f.value},${h.value}`),g=M(()=>m[b.value]),y=P(g.value[0]);return Zo(()=>{y.value=m[b.value][0]}),(_,I)=>(C(),A("div",sze,[O(c(zge),null,{default:H(()=>[O(c(y0),{timestamp:"公众号类型",placement:"top"},{dot:H(()=>[ize]),default:H(()=>[O(c(Pf),{modelValue:f.value,"onUpdate:modelValue":I[0]||(I[0]=k=>f.value=k)},{default:H(()=>[(C(),A(Ae,null,et(d,k=>O(c(Df),{value:k.value},{default:H(()=>[Fe(ie(k.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1}),O(c(y0),{timestamp:"发布到",placement:"top"},{dot:H(()=>[lze]),default:H(()=>[O(c(Pf),{modelValue:h.value,"onUpdate:modelValue":I[1]||(I[1]=k=>h.value=k)},{default:H(()=>[(C(),A(Ae,null,et(p,k=>O(c(Df),{value:k.value},{default:H(()=>[Fe(ie(k.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1}),O(c(y0),{timestamp:"嵌入方式",placement:"top"},{dot:H(()=>[uze]),default:H(()=>[O(c(Fg),{modelValue:y.value,"onUpdate:modelValue":I[2]||(I[2]=k=>y.value=k),type:"border-card"},{default:H(()=>[g.value.includes("原文链接")?(C(),ve(c(zr),{key:0,label:"原文链接",name:"原文链接"},{default:H(()=>[cze,w("div",dze,[O(c(Pt),{readonly:!0,"model-value":c($a)},{suffix:H(()=>[O(c(_o),{content:"直接打开"},{default:H(()=>[w("i",{class:"iconfont icon-form-share",onClick:i})]),_:1})]),_:1},8,["model-value"]),O(c(Wt),{class:"btn",onClick:r},{default:H(()=>[Fe(" 复制 ")]),_:1})])]),_:1})):G("",!0),g.value.includes("超链接")?(C(),ve(c(zr),{key:1,label:"超链接",name:"超链接"},{default:H(()=>[w("div",fze,[O(c(Pt),{readonly:!0,"model-value":c($a)},{suffix:H(()=>[O(c(_o),{content:"直接打开"},{default:H(()=>[w("i",{class:"iconfont icon-form-share",onClick:i})]),_:1})]),_:1},8,["model-value"]),O(c(Wt),{class:"btn",onClick:r},{default:H(()=>[Fe(" 复制 ")]),_:1})])]),_:1})):G("",!0),g.value.includes("二维码")?(C(),ve(c(zr),{key:2,label:"二维码",name:"二维码"},{default:H(()=>[w("div",pze,[w("img",{src:c(n),alt:""},null,8,vze),O(c(Wt),{size:"small",type:"primary",link:"",onClick:l},{default:H(()=>[Fe(" 下载 ")]),_:1})])]),_:1})):G("",!0),g.value.includes("链接代码")?(C(),ve(c(zr),{key:3,label:"链接代码",name:"链接代码"},{default:H(()=>[w("div",hze,[O(c(Pt),{"model-value":t.value,readonly:!0},null,8,["model-value"]),O(c(Wt),{class:"btn",onClick:s},{default:H(()=>[Fe(" 复制代码 ")]),_:1})])]),_:1})):G("",!0),g.value.includes("表单链接")?(C(),ve(c(zr),{key:4,label:"表单链接",name:"表单链接"},{default:H(()=>[w("div",mze,[O(c(Pt),{readonly:!0,"model-value":c($a)},{suffix:H(()=>[O(c(_o),{content:"直接打开"},{default:H(()=>[w("i",{class:"iconfont icon-form-share",onClick:i})]),_:1})]),_:1},8,["model-value"]),O(c(Wt),{class:"btn",onClick:r},{default:H(()=>[Fe(" 复制 ")]),_:1})])]),_:1})):G("",!0)]),_:1},8,["modelValue"])]),_:1})]),_:1})]))}}),bze=Ye(gze,[["__scopeId","data-v-345ff8f2"]]),yze=e=>(At("data-v-c76da449"),e=e(),Ot(),e),_ze={class:"publish-modal"},wze=yze(()=>w("div",{class:"title"},"发布表单",-1)),$ze=se({__name:"index",setup(e){let t=null;const n={getBoundingClientRect:()=>{if(!t){const{width:l}=document.body.getBoundingClientRect();return{left:l-100,top:30,width:100,height:60}}return t}},o=P(!1),a=()=>{var d,f;const l=document.getElementById("publish-form-btn");l&&(t=l.getBoundingClientRect()),o.value=!0,!exports.globalInject.isAdvancedVip()&&((f=(d=exports.globalInject.getRoute())==null?void 0:d.query)==null?void 0:f.scene)==="4"&&(gt.value.prob_status===0||gt.value.prob_status===2)&&ht.error("您还不是高级版及以上会员,预约发布仅可浏览但无法提交")},r=()=>{if(O$()){const{showConfirm:l}=ul();l({type:"warn",title:"表单未保存",content:"是否需要保存后再发布?",cancelText:"否,直接发布",confirmText:"是,保存后发布",onConfirm:async()=>{await eS(),a()},onCancel:a})}else a()};document.addEventListener("form-render:publish",r),po(()=>{document.removeEventListener("form-render:publish",r)});const s=[{name:"link",label:"分享链接",component:rze},{name:"wechat",label:"发布到微信公众号",component:bze}],i=P("link");return(l,d)=>(C(),ve(c(Yc),{"show-arrow":!1,"virtual-ref":n,trigger:"click","virtual-triggering":"",visible:o.value,"onUpdate:visible":d[1]||(d[1]=f=>o.value=f),width:"500","popper-style":{padding:"20px"}},{default:H(()=>[w("div",_ze,[wze,O(c(Fg),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=f=>i.value=f),class:"tabs"},{default:H(()=>[(C(),A(Ae,null,et(s,f=>O(c(zr),{label:f.label,name:f.name},{default:H(()=>[(C(),ve(Kt(f.component)))]),_:2},1032,["label","name"])),64))]),_:1},8,["modelValue"])])]),_:1},8,["visible"]))}}),Cze=Ye($ze,[["__scopeId","data-v-c76da449"]]);var jl=(e=>(e.Editor="0",e.Setting="1",e.Publish="2",e.Data="3",e))(jl||{});const oO=e=>Object.values(jl).some(t=>t===e),Sze=e=>{const t=P(oO(e)?e:"0"),n=a=>{const r=exports.globalInject.getRoute();exports.globalInject.getRouter().replace({query:{...r.query,tab:a}})},o=a=>{const r=t.value,s=a.detail;!oO(s)||s===r||(t.value=s,n(s))};return st(()=>{document.addEventListener("form-render:tab-change",o)}),po(()=>{document.removeEventListener("form-render:tab-change",o)}),{activeTab:t}},Eze=se({__name:"App",props:{tab:{}},setup(e){const t=e,{activeTab:n}=Sze(t.tab),o={[jl.Editor]:An(()=>Promise.resolve().then(()=>require("./index-CftE72_b.cjs")).then(r=>r.index)),[jl.Setting]:An(()=>Promise.resolve().then(()=>require("./index-DI8gv4f0.cjs")).then(r=>r.index)),[jl.Data]:An(()=>Promise.resolve().then(()=>require("./index-DTLmySAQ.cjs"))),[jl.Publish]:An(()=>Promise.resolve().then(()=>require("./index-CRPPGSlX.cjs")))},a=()=>{const r=document.createElement("script");r.src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js",r.onload=()=>{console.log("WeChat SDK loaded")},r.onerror=()=>{console.error("Failed to load WeChat SDK")},document.head.appendChild(r)};return f8(),po(()=>{bye(),_9e(),F$(),a()}),(r,s)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":5e3},{default:H(()=>[(C(),ve(Kt(o[c(n)]))),O(Cze)]),_:1},8,["locale"]))}}),T6=function(){return document.ontouchstart!==null?"click":"touchstart"},qm="__vue_click_away__",x6=function(e,t,n){A6(e);let o=n.context,a=t.value,r=!1;setTimeout(function(){r=!0},0),e[qm]=function(s){if((!e||!e.contains(s.target))&&a&&r&&typeof a=="function")return a.call(o,s)},document.addEventListener(T6(),e[qm],!1)},A6=function(e){document.removeEventListener(T6(),e[qm],!1),delete e[qm]},kze=function(e,t,n){t.value!==t.oldValue&&x6(e,t,n)},Ize={install:function(e){e.directive("click-away",Tze)}},Tze={mounted:x6,updated:kze,unmounted:A6},xze=e=>{e.component("icon",jf),e.component("SvgIcon",LN)},Aze=e=>{e.directive("loading",BM.directive)},Oze=e=>{e.use(Ize)},Dze=()=>{const e=Object.assign({"../assets/iconfont/iconfont.js":()=>Promise.resolve().then(()=>require("./iconfont-CRr0eauA.cjs"))});for(const t in e)e[t]()},id=e=>{xze(e),Aze(e),Oze(e),Dze()},Pze=e=>{const t=si(Eze,e);return t.config.compilerOptions.isCustomElement=n=>n.startsWith("wx-"),id(t),t},Mze=e=>(At("data-v-e2b2bb68"),e=e(),Ot(),e),Nze={class:"dialog-main"},Rze=Mze(()=>w("div",{class:"title"},"请输入密码填写表单",-1)),Lze={class:"error-text"},Fze=se({__name:"InputPassword",emits:["closed"],setup(e,{emit:t}){const n=P(!1),o=()=>{n.value=!1};st(()=>{n.value=!0});const a=P(""),r=P(""),s=()=>{a.value===gt.value.details.password?o():r.value=a.value.length?"密码错误":"请输入密码"};return(i,l)=>(C(),ve(c(Ga),{modelValue:n.value,"onUpdate:modelValue":l[2]||(l[2]=d=>n.value=d),width:"400px",top:"30vh","show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":!1,"modal-class":"input-password-modal",onClosed:l[3]||(l[3]=d=>i.$emit("closed"))},{default:H(()=>[w("div",Nze,[Rze,O(c(Pt),{class:B(["input",{"error-input":r.value}]),size:"large",type:"password",modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=d=>a.value=d),modelModifiers:{trim:!0},placeholder:"密码","show-password":!0,onInput:l[1]||(l[1]=d=>r.value="")},{prefix:H(()=>[w("i",{class:B(["iconfont icon-form-lock",{error:r.value}])},null,2)]),_:1},8,["class","modelValue"]),w("div",Lze,ie(r.value),1),w("div",{class:"btn",onClick:s}," 验证 ")])]),_:1},8,["modelValue"]))}}),Bze=Ye(Fze,[["__scopeId","data-v-e2b2bb68"]]);var Vze=Xr,zze=function(){return Vze.Date.now()},jze=zze,Uze=ii,j0=jze,aO=P$,Wze="Expected a function",Hze=Math.max,qze=Math.min;function Kze(e,t,n){var o,a,r,s,i,l,d=0,f=!1,p=!1,h=!0;if(typeof e!="function")throw new TypeError(Wze);t=aO(t)||0,Uze(n)&&(f=!!n.leading,p="maxWait"in n,r=p?Hze(aO(n.maxWait)||0,t):r,h="trailing"in n?!!n.trailing:h);function m(x){var S=o,D=a;return o=a=void 0,d=x,s=e.apply(D,S),s}function b(x){return d=x,i=setTimeout(_,t),f?m(x):s}function g(x){var S=x-l,D=x-d,N=t-S;return p?qze(N,r-D):N}function y(x){var S=x-l,D=x-d;return l===void 0||S>=t||S<0||p&&D>=r}function _(){var x=j0();if(y(x))return I(x);i=setTimeout(_,g(x))}function I(x){return i=void 0,h&&o?m(x):(o=a=void 0,s)}function k(){i!==void 0&&clearTimeout(i),d=0,o=l=a=i=void 0}function E(){return i===void 0?s:I(j0())}function T(){var x=j0(),S=y(x);if(o=arguments,a=this,l=x,S){if(i===void 0)return b(l);if(p)return clearTimeout(i),i=setTimeout(_,t),m(l)}return i===void 0&&(i=setTimeout(_,t)),s}return T.cancel=k,T.flush=E,T}var O6=Kze;const Yze=vo(O6);var Gze=O6,Qze=ii,Jze="Expected a function";function Xze(e,t,n){var o=!0,a=!0;if(typeof e!="function")throw new TypeError(Jze);return Qze(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),Gze(e,t,{leading:o,maxWait:t,trailing:a})}var Zze=Xze;const D6=vo(Zze),uS=e=>{const n=P(!1),o=()=>{e.value&&(n.value=e.value.offsetWidth<780)};st(o);const a=D6(o,500);return window.addEventListener("resize",a),po(()=>{window.removeEventListener("resize",a)}),{isFullSize:n}},P6=e=>(At("data-v-ed255526"),e=e(),Ot(),e),eje=["innerHTML"],tje=P6(()=>w("div",{class:"tit"},"题目结构",-1)),nje={class:"val"},oje={class:"table"},aje=P6(()=>w("div",{class:"row"},[w("div",{class:"col1"},"题型"),w("div",{class:"col2"},"出题数目")],-1)),rje={class:"col1"},sje={class:"col2"},ije={class:"btn-row"},lje=se({__name:"PreNotice",emits:["start"],setup(e,{emit:t}){const n=M(()=>D$(Rf.value)),o=P(),a=P(!1);st(()=>{o.value&&(a.value=o.value.offsetWidth<780)});const{isFullSize:r}=uS(o);return(s,i)=>(C(),A("div",{class:B(["pre-notice",{full:c(r)}]),ref_key:"preNoticeRef",ref:o},[w("div",{class:B(["title",{mobile:a.value}])},ie(c(Io).attrs.title),3),c(gt).test_setting.show_pre_notice?(C(),A("div",{key:0,class:B(["item",{mobile:a.value}])},[w("div",{class:"val",innerHTML:c(gt).test_setting.pre_notice_content},null,8,eje)],2)):G("",!0),c(gt).test_setting.show_topic_structure?(C(),A("div",{key:1,class:B(["item",{mobile:a.value}])},[tje,w("div",nje,[w("div",oje,[aje,(C(!0),A(Ae,null,et(n.value,l=>(C(),A("div",{key:l.name,class:"row"},[w("div",rje,ie(l.title),1),w("div",sje,ie(l.total),1)]))),128))])])],2)):G("",!0),w("div",ije,[w("div",{class:B(["start-btn",{mobile:a.value}]),onClick:i[0]||(i[0]=l=>s.$emit("start"))}," 我知道了,开始答题 ",2)])],2))}}),uje=Ye(lje,[["__scopeId","data-v-ed255526"]]),cje={class:"agreement-dialog"},dje={class:"agreement-content"},fje=y4('<div class="agreement-title" data-v-02371898>表单填写须知</div><div class="agreement-text" data-v-02371898><p class="sub" data-v-02371898>在填写本问卷前,请您务必仔细阅读并理解以下重要提示:</p><p data-v-02371898><strong data-v-02371898>1.信息提交即授权:</strong>当您填写并提交本表单,即代表您自愿授权表单的创建者收集和使用您所填写的信息(可能包括姓名、联系方式、身份证号、位置信息等信息)。 </p><p data-v-02371898><strong data-v-02371898>2.请谨慎判断和提交:</strong> 请您自行判断是否同意向表单创建者提供这些信息。如果您对提供某些信息存在<strong data-v-02371898>疑虑或不同意,请切勿填写并提交</strong>。您提交的所有信息将由表单创建者负责接收、存储、处理和使用。如您对问卷收集信息的目的、用途、安全性或隐私政策有<strong data-v-02371898>任何疑问或顾虑</strong>,请直接联系本表单的创建者。 </p><p data-v-02371898><strong data-v-02371898>八木屋二维码仅为表单设计、发布与收集的技术服务。平台自身不会查看、使用或以任何方式处理您提交给表单创建者的具体信息内容。</strong></p></div>',2),pje=se({__name:"agreementDialog",emits:["agree","disagree"],setup(e,{emit:t}){const n=t;function o(){n("agree")}return(a,r)=>(C(),A("div",cje,[w("div",dje,[fje,O(c(Vm),{type:"primary",style:{width:"100%"},onClick:o},{default:H(()=>[Fe("确定")]),_:1})])]))}}),vje=Ye(pje,[["__scopeId","data-v-02371898"]]),hje=se({__name:"FormHeader",setup(e){const t=QC.pageHeader,n=M(()=>kn.value===Io.value.id),o=de("editable"),a=()=>{o&&Vf(Io.value.id)};return(r,s)=>(C(),A("div",{class:B(["form-header",{editable:c(o),active:n.value}]),onClick:a},[O(c(t),{attrs:c(Io).attrs},null,8,["attrs"])],2))}}),mje=Ye(hje,[["__scopeId","data-v-dd4105fc"]]),qh=P(null),Kh=P(null),M6="widgets",N6=(e,t)=>{e.dragged.dataset.widgetType;const o=t.target,a=o.dataset.widgetType,r=o.dataset.widgetId,s=nt.value.findIndex(i=>i.id===r);return nt.value.length?!(a==="pagination"&&s===0):!0},R6=new Map,cS=P(null),gje=e=>{cS.value=e.id},bje=()=>{cS.value=null},yje={key:0,class:"iconfont icon-form-handle-h drag-icon"},_je=se({__name:"DragHandle",setup(e){const t=de("editable"),n=de("widgetStore"),o=()=>n.type==="pagination"&&n.index===0,a=M(()=>t&&(n.isActive||n.isHover)&&!o()&&!n.attrs.fixedBottom);return(r,s)=>a.value?(C(),A("i",yje)):G("",!0)}}),wje=Ye(_je,[["__scopeId","data-v-b0994d94"]]);var Kf=(e=>(e[e.Error=0]="Error",e[e.Success=1]="Success",e))(Kf||{});const L6=(e,t)=>{const n={};for(const o of e){const a=t[o.id];n[o.id]=B6(o,a)}return n},Mn={status:1,message:""},os={status:0,message:"该题为必填"},F6={status:0,message:"该题的补充信息为必填"},B6=(e,t)=>{switch(e.type){case"basicInput":case"nameInput":case"textarea":case"companyInput":case"departmentInput":case"positionInput":case"fillBlank":case"fillBlank2":case"shortAnswer":case"shortAnswer2":return Pc(e.attrs,t);case"emailInput":return pS(e.attrs,t);case"idCardInput":return Ym(e.attrs,t);case"phoneInput":return Km(e.attrs,t);case"numberInput":case"numberFillBlank":return dS(e.attrs,t);case"rate":return Cje(e.attrs,t);case"date":return fS(e.attrs,t);case"checkbox":case"imgCheckbox":case"eduImgCheckbox":case"eduCheckbox":return Sje(e,e.attrs,t);case"imgRadio":case"eduImgRadio":return rO(e,e.attrs,t);case"sort":return Eje(e.attrs,t);case"ageRadio":case"basicRadio":case"educationRadio":case"occupationRadio":case"sexRadio":case"eduRadio":case"eduJudgement":return rO(e,e.attrs,t);case"basicSelect":case"eduSelect":return _h(e.attrs,t);case"multiSelect":return U0(e.attrs,t);case"businessSelect":return U0(e.attrs,t);case"nationSelect":return _h(e.attrs,t);case"regionSelect":return U0(e.attrs,t);case"file":case"resume":case"work":return $je(e.attrs,t);case"geolocation":return _h(e.attrs,t);case"pagination":return Mn;case"preparerPhoneInput":return Km(e.attrs,t==null?void 0:t.value);case"preparerNameInput":case"preparerWorkIdInput":return Pc(e.attrs,t==null?void 0:t.value);case"preparerIdCardInput":return Ym(e.attrs,t==null?void 0:t.value);case"checkEntry":return kje(e.attrs,t);case"watermark":return Ije(e.attrs,t==null?void 0:t.value);case"location":return Tje(e.attrs,t==null?void 0:t.value);case"basicTable":return xje(e.attrs,t);case"dynamicTable":return Aje(e.attrs,t);case"customTableOcr":return Oje(e.attrs);default:return console.warn("verifyValue",`undispatched widget type: ${e.type}`),_h(e.attrs,t)}},_h=(e,t)=>e.required&&!t?os:Mn,Pc=(e,t)=>t?e.minLength&&t.length<e.minLength?{status:0,message:`最少输入${e.minLength}字`}:e.maxLength&&t.length>e.maxLength?{status:0,message:`最多输入${e.maxLength}字`}:Mn:e.required?os:Mn,Km=(e,t)=>t?/^1[3-9]\d{9}$/.test(t)?Mn:{status:0,message:"手机号格式不正确"}:e.required?os:Mn,dS=(e,t)=>t===void 0?e.required?os:Mn:e.min&&t<e.min?{status:0,message:`最小值为${e.min}`}:e.max&&t>e.max?{status:0,message:`最大值为${e.max}`}:Mn,$je=(e,t)=>e.required&&!(t&&t.length)?{status:0,message:"该题为必填"}:Mn,Cje=(e,t)=>e.required&&!t?os:Mn,fS=(e,t)=>e.required&&!t?os:Mn,rO=(e,t,n)=>{if(t.required&&!n)return os;if(e.type=="basicRadio"&&n){const o=t.list.find(a=>a.value==n.id);if(o.hasInput&&o.required&&(n.supplyInput==""||n.supplyInput==null))return F6}return Mn},Sje=(e,t,n)=>{let o=!1;return e.type=="checkbox"&&n&&n.map(a=>{const r=t.list.find(s=>s.value==a.id);r.hasInput&&r.required&&(a.supplyInput==""||!a.supplyInput)&&(o=!0)}),o?F6:t.required&&!n?os:t.min&&(!n||n.length<t.min)?{status:0,message:`最少选择${t.min}项`}:t.max&&n&&n.length>t.max?{status:0,message:`最多选择${t.max}项`}:Mn},Eje=(e,t)=>e.required&&(t==null?void 0:t.length)!==e.list.length?{status:0,message:"排序数量不正确"}:Mn,U0=(e,t)=>e.required&&(!(t!=null&&t.length)||t.every(n=>!n))?os:Mn,pS=(e,t)=>t?Vbe(t)?Mn:{status:0,message:"邮箱格式不正确"}:e.required?os:Mn,Ym=(e,t)=>t?zbe(t)?Mn:{status:0,message:"身份证格式不正确"}:e.required?os:Mn,kje=(e,t)=>e.required?t?e.list.some(o=>o.checked===null)?{status:0,message:"请进行检查项填写"}:Mn:{status:0,message:"请进行检查项填写"}:Mn,Ije=(e,t)=>e.required&&!t?{status:0,message:"请填写签名"}:Mn,Tje=(e,t)=>e.required&&!t?{status:0,message:"请获取位置"}:Mn,xje=(e,t)=>{if(!t||Object.keys(t).every(r=>!t[r].text_value.trim()))return Mn;const o=e.options.items,a={text:Pc,textarea:Pc,number:dS,date:fS,email:pS,idCard:Ym,phone:Km};for(let r=0;r<o.length;r++){const s=o[r];if(!s.text_value)continue;const i=a[s.type](s,s.text_value);if((i==null?void 0:i.status)!==1)return i.id=s.id,i}return Mn},Aje=(e,t)=>{if(!t)return e.required?{status:0,message:`至少填写${e.min||1}组`}:Mn;const n=t.length;if(e.min&&n<e.min)return{status:0,message:`至少填写${e.min}组`};const o=e.options.items,a={text:Pc,textarea:Pc,number:dS,date:fS,email:pS,idCard:Ym,phone:Km};for(let r=0;r<o.length;r++){const s=o[r];for(let i=0;i<t.length;i++){const l=t[i][s.id];if(!l.text_value)continue;const d=a[s.type](s,l.text_value);if((d==null?void 0:d.status)!==1)return d.id=s.id,d}}return Mn},Oje=(e,t)=>{const n=e.sections.flatMap(a=>a.fields);if(n.length===0)return{status:0,message:"至少配置一个识别字段"};if(n.length>30)return{status:0,message:"最多配置30个识别字段"};const o=new Set;for(const a of n){if(!a.label||a.label.trim()==="")return{status:0,message:"识别字段名称不能为空"};if(a.label.length>50)return{status:0,message:`字段名称"${a.label}"不能超过50个字`};if(o.has(a.label))return{status:0,message:`字段名称"${a.label}"重复`};o.add(a.label)}return Mn},Dje=["data-widget-id","data-widget-type"],Pje=se({__name:"Widget",props:{widget:{},mode:{},isDateModal:{type:Boolean},memberInfo:{}},setup(e){const t=e,n=de("editable"),o=de("formStore"),a=de("isMobileSize"),r=gn({id:t.widget.id,mode:t.mode,type:M(()=>t.widget.type),voteTotal:M(()=>t.widget.voteTotal),index:M(()=>a8(r.id,r.type)),attrs:M(()=>t.widget.attrs),updateAttr:(m,b)=>{const g=nt.value.findIndex(y=>y.id===t.widget.id);nt.value[g].attrs.hasOwnProperty(m)||console.warn("updateAttr",`widget ${t.widget.id} has no attr ${m}`),nt.value[g].attrs[m]=b},errorAttrs:M(()=>n?Tc.value[t.widget.id]||{}:{}),updateErrorAttrs:()=>{Tc.value[t.widget.id]=a6(t.widget)},isActive:M(()=>{var m;return n&&!o.isBatchSettingAnswer&&((m=zg.value)==null?void 0:m.id)===t.widget.id}),isHover:M(()=>n&&!o.isBatchSettingAnswer&&cS.value===t.widget.id),isDragging:M(()=>n&&Kh.value===t.widget.id),isChoosen:M(()=>n&&qh.value===t.widget.id),value:M(()=>o.data[t.widget.id]),updateValue:m=>{o.data[t.widget.id]=m},updatePayInfo:m=>o.pay_info[t.widget.id]=m,valueVer:M(()=>o.dataVer[t.widget.id]),updateValueVer:()=>{o.dataVer[t.widget.id]=B6(t.widget,o.data[t.widget.id])},isSettingAnswer:o.isBatchSettingAnswer,updateIsSettingAnswer:m=>r.isSettingAnswer=m,checkAutoSave:()=>{},isDateModal:M(()=>t.isDateModal??!1),disabled:M(()=>r.attrs.disabled),updateDisabled:m=>{r.updateAttr("disabled",m)},isTeam:!1,updateIsTeam:m=>{r.isTeam=m}});Tt("widgetStore",r);const s=async()=>{var T,x,S,D,N,L,F,z,j,X,U;if(!localStorage.getItem("authInfo"))return;const b=exports.globalInject.getRoute(),{phone:g,form_answer:y}=b.query,_=((x=(T=t.memberInfo)==null?void 0:T.profile_info)==null?void 0:x.nickname)||((S=t.memberInfo)==null?void 0:S.nickname),I=!!((N=(D=t.memberInfo)==null?void 0:D.profile_info)!=null&&N.team_member);r.updateIsTeam(I),r.type==="preparerNameInput"&&(r.updateValue({value:_}),r.updateDisabled(I)),r.type==="preparerPhoneInput"&&(r.updateValue({value:g||((F=(L=t.memberInfo)==null?void 0:L.profile_info)==null?void 0:F.phone)}),r.updateDisabled(!0)),r.type==="preparerIdCardInput"&&(r.updateValue({value:(j=(z=t.memberInfo)==null?void 0:z.profile_info)==null?void 0:j.passport_id}),r.updateDisabled(!1)),r.type==="preparerWorkIdInput"&&(r.updateValue({value:(U=(X=t.memberInfo)==null?void 0:X.profile_info)==null?void 0:U.work_id}),r.updateDisabled(!1));const k=["preparerNameInput","preparerPhoneInput","preparerIdCardInput","preparerWorkIdInput","location"];if(!y)return;const E=JSON.parse(decodeURIComponent(y)||"{}");if(!k.includes(t.widget.type)){const W=E[t.widget.id],q={checkEntry:i,basicTable:l,basicSelect:d}[t.widget.type];q&&q(W),r.updateValue(W)}};Zo(()=>{t.memberInfo&&s()});const i=m=>{r.attrs.list.forEach(b=>{b.checked=m[b.id].checked,b.value=m[b.id].value,b.desc=m[b.id].desc})},l=m=>{r.attrs.options.items.forEach(b=>{b.text_value=m[b.id].text_value})},d=m=>{r.attrs.value={value:m.id,label:m.label}},f=n&&{onClick:()=>{Vf(t.widget.id)},onMouseover:()=>{gje(t.widget)},onMouseleave:()=>{bje()}},p=M(()=>n?"editor-padding":a.value?"mobile-padding":"pc-padding"),h=M(()=>r.isDragging?{backgroundColor:"#fafafa",borderColor:"#eee",coverColor:"#eee"}:r.isActive?{backgroundColor:"#fafafa",borderColor:"#d8d8d8",coverColor:"transparent"}:Object.keys(r.errorAttrs).length?{backgroundColor:"#ffc7c788",borderColor:"#ea0000",coverColor:"transparent"}:r.isHover?{backgroundColor:"#fafafa",borderColor:"#d8d8d8",coverColor:"transparent"}:{backgroundColor:"#ffffff",borderColor:"transparent",coverColor:"transparent"});return(m,b)=>(C(),A("div",vn({class:["widget",[p.value,!m.widget.attrs.fixedBottom&&"draggable-item",m.widget.attrs.fixedBottom&&c(a)&&"fix-bottom"]],style:{backgroundColor:h.value.backgroundColor},"data-widget-id":m.widget.id,"data-widget-type":m.widget.type},c(f)),[(C(),ve(Kt(c(y9e)(m.widget.type)),{id:m.widget.id,type:m.widget.type,attrs:m.widget.attrs,value:c(o).data[m.widget.id],"onUpdate:value":b[0]||(b[0]=g=>c(o).data[m.widget.id]=g)},null,40,["id","type","attrs","value"])),O(wje),w("div",{class:"border",style:Ze({borderColor:h.value.borderColor,backgroundColor:h.value.coverColor})},null,4)],16,Dje))}}),Mje=Ye(Pje,[["__scopeId","data-v-3202b929"]]),Nje={},Rje=e=>(At("data-v-c38f2101"),e=e(),Ot(),e),Lje={class:"empty-view"},Fje=Rje(()=>w("div",{class:"inner"},[w("i",{class:"iconfont icon-form-mouse"}),w("span",null,"点击左侧字段"),w("span",null,"  或  "),w("i",{class:"iconfont icon-form-move"}),w("span",null,"拖拽字段到此处")],-1)),Bje=[Fje];function Vje(e,t){return C(),A("div",Lje,Bje)}const zje=Ye(Nje,[["render",Vje],["__scopeId","data-v-c38f2101"]]),jje={key:0,class:"confirm-code"},Uje={class:"confirm-container"},Wje=se({__name:"WidgetList",props:{mode:"",isDateModal:!1},setup(e){xa();const t=de("formMode"),n=de("formStore"),o=t.value==="editor",a=P(),r=P(null);o&&Ir(a,nt,{group:{name:M6,put:!0,pull:!1},animation:100,direction:"vertical",draggable:".draggable-item",handle:".drag-icon",dragClass:"widget",forceFallback:!0,chosenClass:"choosen-widget",onStart:l=>{const d=l.item.dataset.widgetId;if(!d){console.warn("onDragStart","widgetId is not found");return}Kh.value=d},onEnd:l=>{Kh.value=null},onChoose:l=>{const d=l.item.dataset.widgetId;if(!d){console.warn("onDragStart","widgetId is not found");return}qh.value=d,document.body.classList.add("draggable-cursor")},onUnchoose:l=>{qh.value=null,document.body.classList.remove("draggable-cursor")},onMove:N6,onAdd:l=>{const d=R6.get(l.item.dataset.widgetId),f=nt.value.find(p=>p.id===d);if(!f){console.warn("onAdd","addedWidget is not found");return}t6(f),Vf(f.id)}}),st(async()=>{await i()}),po(()=>{Vf(null),qh.value=null,Kh.value=null});const i=async()=>{const l=exports.globalInject.getRoute(),d=localStorage.getItem("authInfo");if(!d)return;const f=JSON.parse(d),{data:{status:p,result:h}}=await exports.globalInject.$axios.get(`/v2/form/getMemberInfo?openid=${f.openid}&unionid=${f.unionid}&pid=${l.query.pid}`);p===1&&(r.value=h)};return(l,d)=>(C(),A("div",{class:"widget-list",ref_key:"widgetListRef",ref:a},[(C(!0),A(Ae,null,et(c(n).widgetList,f=>(C(),ve(Mje,{key:f.id,widget:f,mode:e.mode,isDateModal:e.isDateModal,memberInfo:r.value},null,8,["widget","mode","isDateModal","memberInfo"]))),128)),c(gt).details.confirmCode==1&&e.mode=="answer"?(C(),A("div",jje,[w("span",null,ie(c(gt).details.confirmName),1),w("div",Uje,ie(c(n).confirm_code),1)])):G("",!0),o&&!c(n).widgetList.length?(C(),ve(zje,{key:1})):G("",!0)],512))}}),vS=Ye(Wje,[["__scopeId","data-v-4d02093b"]]),Hje=se({__name:"FooterButton",props:{text:{},disabled:{type:Boolean},onClick:{type:Function},type:{}},setup(e){const t=de("isMobileSize");return(n,o)=>(C(),A("div",{class:B(["footer-btn",{disabled:n.disabled,mobile:c(t),autoFill:!n.disabled&&n.type==="info"}]),onClick:o[0]||(o[0]=(...a)=>n.onClick&&n.onClick(...a))},ie(n.text),3))}}),qje=Ye(Hje,[["__scopeId","data-v-caf3aed0"]]);let Pi;async function Kje(e){const t=Math.floor(Date.now()/1e3),n=t-Math.floor(performance.now()/1e3);let o={form_id:e.id,answer:e.answer,fake_id:e.fake_id,meta_info:{answerInfo:{endTime:t,startTime:n}},code:e.confirm_code};e.type==4&&(o=await d6({answer_id:e.id}));let a=JSON.parse(localStorage.getItem(e.id)||"[]");a.unshift(o),Pi=a,localStorage.setItem(e.id,JSON.stringify(a))}function sO(e){let t=JSON.parse(localStorage.getItem(e)||"[]");return Pi=t,t}function Yje(e,t){Pi&&Pi.length?(Pi=Pi.map(n=>n.fake_id===e?{...n,answer:t}:n),localStorage.setItem(Pi[0].form_id,JSON.stringify(Pi))):console.error("modifyStoreDate data is empty")}const hS=e=>(At("data-v-705ad3bb"),e=e(),Ot(),e),Gje=hS(()=>w("div",{class:"center"},"收银台",-1)),Qje={class:"dialog-content"},Jje=hS(()=>w("div",null,"八木屋表单支付",-1)),Xje={class:"qrcode-content"},Zje=hS(()=>w("p",null,"请使用微信扫一扫支付",-1)),eUe={class:"price"},tUe={ref:"qrcode",id:"canvas",class:"qrcode"},nUe=se({__name:"PayDialog",props:{visible:!1,code_url:"",order_num:"",pay_money:0},emits:["close"],setup(e,{emit:t}){const n=t,o=e,a=M({get:()=>o.visible,set:()=>{}}),r=P(null),s=()=>{n("close")};Se(a,d=>{d&&ot(()=>{l()}),d||clearInterval(r.value)});const i=d=>(parseFloat(d)/100).toFixed(2),l=()=>{var d=document.getElementById("canvas");vl.toCanvas(d,o.code_url,function(f){f&&console.error(f)}),r.value=setInterval(async()=>{const f=await exports.globalInject.$axios.get(`/v1/WxMchOrder/getOrderStatus?order_num=${o.order_num}`);f.data.result.status==1?(console.debug("支付成功"),n("close"),document.dispatchEvent(new CustomEvent("form-render:submit-success",{detail:f})),clearInterval(r.value)):f.data.result.status==2?(console.debug("支付关闭"),clearInterval(r.value)):console.debug("支付中")},2e3)};return(d,f)=>(C(),ve(c(Ga),{fullscreen:"",modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=p=>a.value=p),onClose:s,class:"custom-dialog"},{header:H(({close:p,titleId:h,titleClass:m})=>[w("div",{class:"dialog-header"},[w("div",{class:"left",onClick:s}," < 返回表单 "),Gje])]),default:H(()=>[w("div",Qje,[Jje,w("div",Xje,[Zje,w("div",eUe,"¥"+ie(i(e.pay_money)),1),w("canvas",tUe,null,512)])])]),_:1},8,["modelValue"]))}}),oUe=Ye(nUe,[["__scopeId","data-v-705ad3bb"]]),V6=async(e,t)=>{var n;e.isBatchSettingAnswer=!1,(n=e.pageList[e.pageNumber])==null||n.forEach(o=>{t[o.id]&&(o.attrs.standard=t[o.id],o.attrs.value=t[o.id])}),e.data={...e.data,...t},ht.success("已填充上次提交的内容")},aUe={class:"button-list"},rUe=se({__name:"ButtonList",setup(e,{expose:t}){de("isMobileSize"),P(!1);const n=de("formMode"),o=de("editable"),a=de("formStore"),r=de("lastAnswerInfo"),s=P(""),i=P(""),l=P(0),d=P(!1);P(""),de("widgetStore");const f={4016:"预约时间错误",4017:"预约名额不足",4018:"预约失败",4015:"商品库存不足"},p=de("setAnswerInfo"),h=M(()=>gt.value.auto_fill.isFill&&gt.value.auto_fill.type===1&&Object.keys(r.value).length>0),m=M(()=>{const S={prev:{text:"上一页",disabled:!1,onClick:()=>{a.pageNumber-=1,y()}},next:{text:"下一页",type:"primary",disabled:!1,onClick:()=>{g()&&(a.pageNumber+=1,y())}},submit:{text:"提交",type:"primary",disabled:o||Bf.value,onClick:()=>{b()}},fill:{text:"填充上次内容",disabled:o,type:"info",onClick:()=>{V6(a,r.value)}}};return o?h.value?[S.fill,S.submit]:[S.submit]:a.pageList.length<=1?h.value?[S.fill,S.submit]:[S.submit]:a.pageNumber===0?[S.next]:a.pageNumber===a.pageList.length-1?[S.prev,S.submit]:[S.prev,S.next]}),b=()=>{if(o||Bf.value)return;g()&&x()},g=()=>{const S=L6(a.widgetList,a.data);if(a.dataVer={...a.dataVer,...S},Object.values(S).some(D=>D.status!==Kf.Success)){const D=a.widgetList.find(N=>{var L;return((L=S[N.id])==null?void 0:L.status)!==Kf.Success});return D?zf(D.id):console.warn("invalidWidget is not found"),!1}return!0},y=()=>{ot(()=>{const S=a.widgetList[0];S&&zf(S.id)})},_=S=>{typeof window.WeixinJSBridge>"u"?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",I(S),!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",I(S)),document.attachEvent("onWeixinJSBridgeReady",I(S))):I(S)},I=S=>{try{window.WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:S.appId,timeStamp:S.timeStamp,nonceStr:S.nonceStr,package:S.package,signType:S.signType,paySign:S.paySign},function(D){D.err_msg==="get_brand_wcpay_request:ok"&&document.dispatchEvent(new CustomEvent("form-render:submit-success",{detail:D}))})}catch(D){this.$message.error(D)}},k=S=>{setTimeout(()=>{window.open(S,"_blank")})},E=S=>{var D,N;if(p(a.data),S.status===-1)document.dispatchEvent(new CustomEvent("form-render:submit-fail",{detail:S}));else{const L=xa();if(Kje({id:exports.globalInject.getFormId(),answer:a.data,fake_id:S.result.fake_id,confirm_code:S.result.code,type:L}),(D=S.result.pay_info)!=null&&D.code_url){l.value=S.result.pay_info.price,i.value=S.result.pay_info.order_num,s.value=S.result.pay_info.code_url,localStorage.setItem("last_order_num",S.result.pay_info.order_num),d.value=!0;return}if((N=S.result.pay_info)!=null&&N.openid){const{appId:F,timeStamp:z,nonceStr:j,signType:X,paySign:U,order_num:W}=S.result.pay_info;console.debug(S.result.pay_info.order_num);const Q={appId:F,timeStamp:z,nonceStr:j,package:S.result.pay_info.package,signType:X,paySign:U,order_num:W};console.debug(Q,"query"),_(Q);return}switch(gt.value.details.after_submit){case"show_score":{const F={id:S.result.id,formId:exports.globalInject.getFormId()},z=JSON.stringify(F);Xu(`/table/answer?q=${window.btoa(z)}`);break}case"show_link":{let{id:F,url:z}=gt.value.details.link_info;F&&(c6(F).then(j=>{j.status===1&&(j.result.status===0?k(z):j.result.status===1?k(`/table/error?q=${window.btoa(JSON.stringify({code:"2078"}))}`):j.result.status===2&&k(`/table/error?q=${window.btoa(JSON.stringify({code:"2077"}))}`))}),document.dispatchEvent(new CustomEvent("form-render:submit-success",{detail:S})));break}case"show_tip":default:{document.dispatchEvent(new CustomEvent("form-render:submit-success",{detail:S}));break}}}},T=P(!1),x=async()=>{if(!(o||T.value)&&n.value==="input")try{T.value=!0,console.debug(a,"formStore"),localStorage.getItem("last_order_num")&&(a.cancel_order_num=localStorage.getItem("last_order_num"));const S=await D9e(a);if([4016,4017,4018,4015].includes(S.status)){ht.error(f[S.status]);return}gt.value.details.confirmCodeValue=S==null?void 0:S.result.code,console.debug(S.result,"result"),E(S)}catch(S){console.error("submit error",S)}finally{T.value=!1}};return document.addEventListener("form-render:autosubmit",x),po(()=>{document.removeEventListener("form-render:autosubmit",x)}),t({submitBtnClick:b}),(S,D)=>(C(),A(Ae,null,[w("div",aUe,[(C(!0),A(Ae,null,et(m.value,N=>(C(),ve(qje,hf(lc(N)),null,16))),256))]),O(oUe,{onClose:D[0]||(D[0]=N=>d.value=!1),visible:d.value,code_url:s.value,order_num:i.value,pay_money:l.value},null,8,["visible","code_url","order_num","pay_money"])],64))}}),sUe=Ye(rUe,[["__scopeId","data-v-2a829e4d"]]),iUe={class:"bottom-bar"},lUe={class:"text-black"},uUe={class:"text-white"},cUe=se({__name:"FormBottom",setup(e){const t=P(0),n=P(),o=P({0:"表单",1:"问卷",2:"报名",3:"考试"});st(()=>{a()});const a=async()=>{const i=exports.globalInject.getRoute();n.value=i.query.tid;const l=await exports.globalInject.$axios.get(`/v2/form/getTplInfo?id=${n.value}`);t.value=l.data.result.scene_id},r=()=>{window.open(`${window.location.origin}/templates?scene_id=${t.value}`)},s=()=>{exports.globalInject.$token?window.open(`${window.location.origin}/table/workspace?tid=${n.value}&scene=${t.value}&folderId=0`):exports.globalInject.showLoginModal({callback:()=>{window.open(`${window.location.origin}/table/workspace?tid=${n.value}&scene=${t.value}&folderId=0`),window.location.reload()}})};return(i,l)=>(C(),A("div",iUe,[w("div",{onClick:r,class:"footer-btn bg-white border border-solid border-black"},[w("span",lUe,"更多"+ie(o.value[t.value]),1)]),w("div",{class:"footer-btn",onClick:s,style:{"background-color":"#2278ff"}},[w("span",uUe,"使用此"+ie(o.value[t.value]),1)])]))}}),dUe=Ye(cUe,[["__scopeId","data-v-e24a0ef6"]]),fUe={key:0,class:"top-container"},pUe=se({__name:"DailyPreviewTop",setup(e){const t=de("formMode");de("editable");const n=de("isMobileSize"),o=M(()=>t.value!="input"?!1:gt.value.details.everyDay_limit==1?gt.value.details.before_visible_vote==1&&Bf.value:!1),a=M(()=>{const{daily_limit_times:r}=gt.value.details;let s="";return r.map((i,l)=>{if(i.length!=0){const d=i[0].split(":"),f=i[1].split(":"),p=`${d[0]}:${d[1]}`,h=`${f[0]}:${f[1]}`;l!=r.length-1?s+=`${p} - ${h}、`:s+=`${p} - ${h}`,l==0&&n.value&&(s+=`
146
+ `)}}),s});return(r,s)=>o.value?(C(),A("div",fUe," 投票开放填写时间为 每日"+ie(a.value),1)):G("",!0)}}),vUe=Ye(pUe,[["__scopeId","data-v-fa644b59"]]),hUe={class:"flex flex-row justify-between items-center mb-2.5"},mUe={class:"appoint-text",style:{color:"#666666"}},gUe={key:0,class:"appoint-text",style:{color:"#999999"}},bUe={key:1,class:"appoint-text",style:{color:"#999999"}},yUe={key:2,class:"appoint-text"},_Ue={key:0,class:"flex flex-row items-center mb-1"},wUe=["src"],$Ue={class:"appointment-text"},CUe={class:"answer-container"},SUe={class:"flex flex-col"},EUe={class:"date-text"},kUe={key:0,class:"date-text",style:{color:"#e34152"}},IUe={key:0,class:"date-text",style:{"margin-right":"80px","margin-left":"-60px",color:"#e34152"}},TUe={key:0,class:"quota-container"},xUe={key:0,class:"date-text",style:{color:"#e34152"}},AUe=se({__name:"appointAnswers",props:{appointWidgetList:{},widgetAnswers:[],answerIndex:null},setup(e){const t=["周日","周一","周二","周三","周四","周五","周六"],n=e,o=l=>l.reduce((d,f)=>Array.isArray(f)?d.concat(o(f)):d.concat(f),[]),a=M({get:()=>o(n.widgetAnswers).some(l=>l.isPaid==!0),set:l=>{}}),r=de("isMobileSize"),s=l=>parseFloat(l/100).toFixed(2),i=l=>{if(l.type=="time"){const d=l.appointment_time.substring(8,10),f=l.appointment_time.substring(10,12),p=l.appointment_time.substring(12,14),h=l.appointment_time.substring(14,16);return`${d}:${f} - ${p}:${h}`}else{const d=l.appointment_date,f=new Date(d);return`,${t[f.getDay()]}`}};return(l,d)=>(C(),A(Ae,null,[w("div",hUe,[w("span",mUe,ie(e.appointWidgetList[e.answerIndex].attrs.title),1),!c(r)&&a.value?(C(),A("span",gUe," 单价 ")):G("",!0),e.appointWidgetList[e.answerIndex].attrs.multiplyQuota&&!c(r)?(C(),A("span",bUe,"数量")):G("",!0),!c(r)&&a.value?(C(),A("span",yUe,"小计")):G("",!0)]),(C(!0),A(Ae,null,et(e.widgetAnswers,f=>(C(),A("div",null,[f&&f.length>0?(C(),A("div",_Ue,[e.appointWidgetList[e.answerIndex].attrs.appoint.find(p=>p.basicInfo.id==f[0].appointment_id).basicInfo.img[0]!=""?(C(),A("img",{key:0,class:"img",src:e.appointWidgetList[e.answerIndex].attrs.appoint.find(p=>p.basicInfo.id==f[0].appointment_id).basicInfo.img[0]},null,8,wUe)):G("",!0),w("span",$Ue,ie(e.appointWidgetList[e.answerIndex].attrs.appoint.find(p=>p.basicInfo.id==f[0].appointment_id).basicInfo.name),1)])):G("",!0),(C(!0),A(Ae,null,et(f,p=>(C(),A("div",CUe,[w("div",SUe,[w("div",EUe,[Fe(ie(p.appointment_date.replaceAll("-","/"))+" ",1),w("span",null,ie(i(p)),1)]),p.isPaid&&c(r)?(C(),A("span",kUe,"¥"+ie(s(p.price)),1)):G("",!0)]),w("div",null,[p.isPaid&&!c(r)&&a.value?(C(),A("span",IUe,"¥"+ie(s(p.price)),1)):G("",!0)]),e.appointWidgetList[e.answerIndex].attrs.multiplyQuota?(C(),A("div",TUe,[O(c(ka),{modelValue:p.quota,"onUpdate:modelValue":h=>p.quota=h,min:1,max:p.remainingQuota=="-1"||p.remainingQuota==null?1/0:p.remainingQuota},null,8,["modelValue","onUpdate:modelValue","max"])])):G("",!0),w("div",null,[p.isPaid&&!c(r)&&a.value?(C(),A("span",xUe,"¥"+ie((s(p.price)*p.quota).toFixed(2)),1)):G("",!0)])]))),256))]))),256))],64))}}),OUe=Ye(AUe,[["__scopeId","data-v-3f9156c3"]]),Cb=e=>(At("data-v-d72b5427"),e=e(),Ot(),e),DUe={key:0,class:"gain-answer grey-text"},PUe=Cb(()=>w("span",null,"商品",-1)),MUe=Cb(()=>w("span",null,"单价",-1)),NUe=Cb(()=>w("span",null,"数量",-1)),RUe=Cb(()=>w("span",null,"小计",-1)),LUe=[PUe,MUe,NUe,RUe],FUe={class:"gain-answer grey-text"},BUe={key:0,class:"gain-answer gain-text"},VUe={key:0},zUe=["src"],jUe={class:"money-text",style:{width:"100px","text-align":"end",color:"#e34152"}},UUe={key:1,class:"gain-answer-mobile"},WUe={class:"gain-answer-left"},HUe=["src"],qUe={class:"text-col"},KUe={style:{width:"160px"}},YUe={style:{width:"100px",color:"#e34152"}},GUe={class:"gain-answer-right"},QUe=se({__name:"gainAnswers",props:{widgetAnswers:[],gainWidgetList:[],answerIndex:null},setup(e){const t=de("isMobileSize");de("widgetStore"),de("formStore");const n=a=>(parseFloat(a)/100).toFixed(2),o=(a,r)=>{r.totalPrice=a*r.price};return(a,r)=>(C(),A(Ae,null,[c(t)?G("",!0):(C(),A("div",DUe,LUe)),w("div",FUe,[w("span",null,ie(e.gainWidgetList[e.answerIndex].attrs.title),1)]),(C(!0),A(Ae,null,et(e.widgetAnswers,s=>(C(),A("div",null,[c(t)?(C(),A("div",UUe,[w("div",WUe,[e.gainWidgetList[e.answerIndex].type=="gainWithPic"?(C(),A("img",{key:0,style:{width:"64px",height:"64px"},src:e.gainWidgetList[e.answerIndex].attrs.list.find(i=>i.value==s.value).imgs[0].url},null,8,HUe)):G("",!0),w("div",qUe,[w("div",KUe,ie(s.label),1),w("div",YUe,"¥"+ie(n(s.price)),1)])]),w("div",GUe,[w("div",null,[O(c(ka),{onChange:i=>o(i,s),style:{width:"124px"},modelValue:s.num,"onUpdate:modelValue":i=>s.num=i},null,8,["onChange","modelValue","onUpdate:modelValue"])])])])):(C(),A("div",BUe,[e.gainWidgetList[e.answerIndex].type=="gainWithPic"?(C(),A("div",VUe,[w("img",{style:{width:"36px",height:"36px","border-radius":"4px"},src:e.gainWidgetList[e.answerIndex].attrs.list.find(i=>i.value==s.value).imgs[0].url},null,8,zUe)])):G("",!0),w("div",{style:Ze([{width:"160px"},e.gainWidgetList[e.answerIndex].type=="gainWithPic"?"margin-left:-56px":""])},ie(s.label),5),w("div",{class:"money-text",style:Ze([{width:"100px",color:"#e34152"},e.gainWidgetList[e.answerIndex].type=="gainWithPic"?"margin-left:-56px":""])}," ¥"+ie(n(s.price)),5),w("div",null,[O(c(ka),{onChange:i=>o(i,s),style:{width:"150px"},modelValue:s.num,"onUpdate:modelValue":i=>s.num=i},null,8,["onChange","modelValue","onUpdate:modelValue"])]),w("div",jUe," ¥"+ie(n(s.totalPrice)),1)]))]))),256))],64))}}),JUe=Ye(QUe,[["__scopeId","data-v-d72b5427"]]),yu=e=>(At("data-v-b3ed40e9"),e=e(),Ot(),e),XUe={class:"appoint-detail-title"},ZUe={class:"title"},eWe=["src"],tWe=yu(()=>w("span",{class:"grey-text"},"清空",-1)),nWe={class:"appoint-detail"},oWe={class:"appoint-detail"},aWe={key:0,class:"flex justify-between w-full"},rWe={class:"flex flex-col"},sWe=yu(()=>w("div",{class:"text"},"共计",-1)),iWe={class:"text"},lWe={key:0},uWe={style:{color:"#eb3d3d"}},cWe={key:1},dWe={key:2},fWe={style:{color:"#2278ff"}},pWe={key:3},vWe=yu(()=>w("i",{class:"iconfont icon-form-total-expand"},null,-1)),hWe=[vWe],mWe={key:0,style:{color:"#333333"},class:"text flex items-center"},gWe={class:"total-money"},bWe=yu(()=>w("span",{style:{"font-size":"14px"}}," ¥",-1)),yWe={key:1,class:"flex justify-between h-full items-center"},_We={class:"flex items-center gap-2"},wWe={key:0,class:"flex items-center",style:{gap:"8px"}},$We={style:{position:"relative"}},CWe=["src"],SWe={class:"num-rot"},EWe={class:"total-money"},kWe=yu(()=>w("span",{style:{"font-size":"14px"}},"¥",-1)),IWe={key:1,class:"flex items-center gap-2"},TWe=yu(()=>w("div",{class:"text"},"共计",-1)),xWe={key:0},AWe={style:{color:"#2278ff"}},OWe=yu(()=>w("i",{class:"iconfont icon-form-total-expand"},null,-1)),DWe=[OWe],PWe=se({__name:"totalAnswers",props:{widgetsBtmRef:null},emits:["submit"],setup(e,{emit:t}){const n=de("isMobileSize");de("widgetStore");const o=t,a=P(!1),r=P([]);P([]);const s=P([]),i=P([]),l=P([]),d=P([]),f=de("formStore"),p=de("formMode"),h=P(!1),m=P(),b=xa(),g=e,y=N=>{for(;N&&N!==document.body;){const L=window.getComputedStyle(N);if(L.overflow==="auto"||L.overflow==="scroll"||L["overflow-x"]==="auto"||L["overflow-x"]==="scroll"||L["overflow-y"]==="auto"||L["overflow-y"]==="scroll")return N;N=N.parentElement}return null};Se(g,N=>{if(n.value){h.value=!0;return}if(N.widgetsBtmRef){const L=y(N.widgetsBtmRef);let F;L.addEventListener("scroll",()=>{F=N.widgetsBtmRef.getBoundingClientRect(),F.top-window.innerHeight<0?(console.debug("here"),h.value=!1,a.value=!0):(console.debug("这里"),h.value=!0,a.value=!1)})}},{deep:!0}),Se(()=>f.data,N=>{_(N)},{deep:!0});const _=N=>{let L=[],F=[],z=[],j=[],X=[];console.debug(N,"formStoreData"),(b==6||b==4)&&Object.entries(N).forEach(([U,W])=>{var Q;if(Array.isArray(W)&&W.length>0){const q=Object.groupBy(W,({id:Y})=>Y);console.debug(q,"prdsByIdsObject");const V=Object.values(q);L=[...L,...V],(Q=V[0][0])!=null&&Q.appointment_id?(z.push(V),j.push(f.widgetList.find(Y=>Y.id===U))):(F=[...F,...V],X.push(f.widgetList.find(Y=>Y.id===U)))}}),r.value=L,d.value=j,l.value=X,i.value=z,s.value=F,console.debug(r.value,"answers.value"),console.debug(d.value,"appointWidgetList.value"),console.debug(i.value,"appointAnswers.value"),console.debug(l.value,"gainWidgetList.value"),console.debug(s.value,"gainAnswers.value")},I=()=>{o("submit")},k=()=>{r.value=[],l.value=[],s.value=[],i.value=[],d.value=[],a.value=!1,Uf.emit("deleteAllAnswers")},E=()=>r.value.flat().flat().length,T=N=>N.reduce((L,F)=>Array.isArray(F)?L.concat(T(F)):L.concat(F),[]),x=M({get:()=>T(r.value).some(N=>N.isPaid==!0),set:N=>{}}),S=()=>{let N=0;const L=r.value.flat().flat();return console.debug(L,"answerFlat"),L.map(F=>{F.isPaid&&(N+=F.price*(F.quota||F.num))}),(parseFloat(N)/100).toFixed(2)},D=()=>{h.value&&(a.value=!a.value)};return(N,L)=>(C(),A(Ae,null,[r.value.length>0?(C(),A("div",{key:0,ref_key:"totalRef",ref:m,class:B({"bottom-appoint":h.value,"bottom-appoint-mobile":c(n),"bottom-appoint-mobile-preview":c(n)&&c(p)=="preview","not-bottom-appoint":!h.value}),style:Ze({"pointer-events":a.value?"":"none",padding:c(n)?"0px":""})},[w("div",{style:Ze(h.value?"":"z-index:1"),class:B({"appoint-detail-container":!0,"appoint-detail-visible":a.value||!h.value})},[w("div",XUe,[w("span",ZUe,"已选"+ie(c(b)==6?"商品":"项目"),1),w("div",{onClick:k,class:"flex flex-row gap-1 cursor-pointer items-center"},[w("img",{class:"img",src:c(Ke)("images/widget/appoint-clearAll.png")},null,8,eWe),tWe])]),(C(!0),A(Ae,null,et(i.value,(F,z)=>(C(),A("div",nWe,[O(OUe,{widgetAnswers:F,answerIndex:z,appointWidgetList:d.value},null,8,["widgetAnswers","answerIndex","appointWidgetList"])]))),256)),(C(!0),A(Ae,null,et(s.value,(F,z)=>(C(),A("div",oWe,[O(JUe,{widgetAnswers:F,gainWidgetList:l.value,answerIndex:z},null,8,["widgetAnswers","gainWidgetList","answerIndex"])]))),256))],6),E()>0?(C(),A("div",{key:0,onClick:D,class:B(["",{"bottom-container":h.value,"bottom-container-expand":a.value,"not-bottom-container":!h.value}])},[c(n)?(C(),A("div",yWe,[w("div",_We,[x.value?(C(),A("div",wWe,[w("div",$We,[w("img",{style:{width:"24px",height:"24px"},src:c(Ke)("/images/widget/total-answer-icon.png")},null,8,CWe),w("div",SWe,[w("span",null,ie(E()),1)])]),w("div",EWe,[kWe,Fe(ie(S()),1)]),w("div",null,"(明细"+ie(E())+")",1)])):(C(),A("div",IWe,[TWe,i.value.length>0?(C(),A("span",xWe,[w("span",AWe,ie(T(i.value).length),1),Fe(" 个预约 ")])):G("",!0)])),h.value?(C(),A("div",{key:2,class:B({"expand-icon":!0,"expand-icon-up":a.value}),style:Ze(a.value?"":"transform: translateY(-5px)")},DWe,6)):G("",!0)]),w("div",null,[O(c(Wt),{onClick:mt(I,["stop"]),type:"primary"},{default:H(()=>[Fe(" 提交 ")]),_:1})])])):(C(),A("div",aWe,[w("div",rWe,[sWe,w("div",iWe,[s.value.length>0?(C(),A("span",lWe,[w("span",uWe,ie(T(s.value).length),1),Fe("个商品 ")])):G("",!0),T(s.value).length>0&&T(i.value).length>0?(C(),A("span",cWe,"、")):G("",!0),i.value.length>0?(C(),A("span",dWe,[w("span",fWe,ie(T(i.value).length),1),Fe(" 个预约 ")])):G("",!0),h.value?(C(),A("span",pWe,"(下拉至底部可提交)")):G("",!0),h.value?(C(),A("div",{key:4,class:B({"expand-icon":!0,"expand-icon-up":a.value})},hWe,2)):G("",!0)])]),x.value?(C(),A("div",mWe,[Fe(" 应付(CNY): "),w("span",gWe,[bWe,Fe(ie(S()),1)])])):G("",!0)]))],2)):G("",!0)],6)):G("",!0),a.value&&!(c(n)&&c(p)=="preview")&&h.value?(C(),A("div",{key:1,onClick:L[0]||(L[0]=F=>a.value=!1),class:"mask"})):G("",!0)],64))}}),MWe=Ye(PWe,[["__scopeId","data-v-b3ed40e9"]]),NWe={class:"agreement"},RWe={key:3,class:"form-info"},LWe=se({__name:"NormalView",setup(e){const t=An(()=>Promise.resolve().then(()=>require("./ExamBar-KYCi9o4B.cjs"))),n=An(()=>Promise.resolve().then(()=>require("./ContactUs-CPT64Dp2.cjs"))),o=An(()=>Promise.resolve().then(()=>require("./InputTimer-DxIYmKfP.cjs"))),a=An(()=>Promise.resolve().then(()=>require("./FormProgress-B7LTCaIV.cjs"))),r=An(()=>Promise.resolve().then(()=>require("./AntiCheating-BG3DPuXi.cjs"))),s=An(()=>Promise.resolve().then(()=>require("./ShareQRCode-CX1gOZI2.cjs"))),i=An(()=>Promise.resolve().then(()=>require("./CacheIcon-CulV9_p4.cjs"))),l=de("formMode"),d=de("editable"),f=P(),p=P(),h=P(),m=P(),b=P(!1),g=P(),y=de("formStore"),_=P(),I=xa(),k=P();["dev","test"].includes(exports.globalInject.getEnvType());const E=exports.globalInject.getEnvType(),T=P(),x=C6e(T),S=P({});Tt("lastAnswerInfo",S),Tt("formBounding",x);const D=de("setAuth"),N=de("isLanding"),L=M(()=>l.value==="editor"||l.value==="input"&&!N?!1:x.width.value<780);Tt("isMobileSize",L);const F=M(()=>gt.value.auto_fill.isFill&&gt.value.auto_fill.type===0&&Object.keys(S.value).length>0),z=()=>{oS.emit("notify","")},j=D6(ye=>{var he;!N0()&&((he=exports.globalInject)!=null&&he.getCodeId())&&(ye.stopPropagation(),D8e({message:"仅支持在微信小程序中操作,是否跳转至小程序?",confirmButtonText:"前往小程序",cancelButtonText:"取消"}).then(()=>{X9e().then(le=>{window.location.href=le})}))},1e3),X={dev:"https://sit-api.bmwac.cn/h5/",test:"https://sit-api.bmwac.cn/h5/",prod:"https://a.bamuwu.com/h5/",stage:"https://a.bamuwu.com/h5/"},U=async()=>{const ye=gt.value.crown_setting.isCollectInfo,he=exports.globalInject.getRoute().query;if(sessionStorage.getItem("authInfo")){const le=JSON.parse(sessionStorage.getItem("authInfo"));localStorage.setItem("authInfo",JSON.stringify(le)),D(le);return}if(l.value=="input"&&he.code){let le;ye.collectSource=="self"?le=gt.value.pay_setting.pappid||gt.value.crown_setting.isCollectInfo.pappid:le=-1;const J=(await exports.globalInject.$axios.get(`v1/WxPlatforms/getAppidById?id=${le}`)).data.result,oe=new Date().getTime(),ge=(await exports.globalInject.$axios.post("/v1/WxPlatforms/getWxUserInfo",{code:he.code,appid:J.appid,type:J.type,from:"form",time:oe})).data.result;if(!(ge!=null&&ge.openid))return;const Me=await exports.globalInject.$axios.get(`/v2/form/getMemberInfo?openid=${ge.openid}&unionid=${ge.unionid}&form_id=${exports.globalInject.getFormId()}`);let ee="";if(Me.data.status===1&&(ee=Me.data.result.nickname||"微信用户"+ge.unionid.slice(-6)),ge.openid){const ne={nickname:ee||ge.nickname,openid:ge.openid,unionid:ge.unionid||void 0,headimgurl:ge.headimgurl};D(ne),localStorage.setItem("authInfo",JSON.stringify(ne)),sessionStorage.setItem("authInfo",JSON.stringify(ne));return}else Cm({title:"授权失败",message:"授权失败,请重新扫码",type:"warning",showConfirmButton:!1,showClose:!1,closeOnClickModal:!1,closeOnPressEscape:!1});ht.success(ge)}else if(L.value&&l.value=="input"&&ye.open==1&&ye.collectMethod=="auth"&&N0()){const le=new URLSearchParams(he),J=`${X[E]||"https://a.bamuwu.com/h5/"}?${le.toString().replace(/=null/g,"")}`,oe=encodeURIComponent(J);let _e;ye.collectSource=="self"?_e=gt.value.pay_setting.pappid||gt.value.crown_setting.isCollectInfo.pappid:_e=-1;const Me=(await exports.globalInject.$axios.get(`v1/WxPlatforms/getAppidById?id=${_e}`)).data.result;console.debug(Me,"config"),Me.type=="self"?window.location.replace(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${Me.appid}&redirect_uri=${oe}&response_type=code&scope=snsapi_userinfo&component_appid=${Me.component_appid}#wechat_redirect`):window.location.replace(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=${Me.appid}&redirect_uri=${oe}&response_type=code&scope=snsapi_userinfo#wechat_redirect`)}};po(()=>{clearInterval(_.value)});const W=()=>{l.value=="input"&&gt.value.details.isAutoSave==1&&(_.value=setInterval(()=>{localStorage.setItem("formStore",JSON.stringify(y.data))},1e3))};st(async()=>{await U(),await Q();const ye=exports.globalInject.getRoute(),he=MN(f.value);he==null||he.scrollTo(0,0),m.value=window.location.href.includes("preview"),g.value=ye.query.isMobile,localStorage.getItem("formStore")!="{}"&&gt.value.details.isAutoSave==1&&l.value=="input"?Cm.confirm("你已填写过部分内容,是否继续填写?","提示",{confirmButtonText:"继续填写",cancelButtonText:"重新填写"}).then(()=>{const le=localStorage.getItem("formStore")||"",ue=JSON.parse(le);y.data=ue,W()}).catch(()=>{W()}):W()});const Q=async()=>{if(!N0())return;const ye=exports.globalInject.getCodeId(),he=exports.globalInject.getFormId();let le={unionid:""};if(sessionStorage.getItem("authInfo")){const oe=JSON.parse(sessionStorage.getItem("authInfo"));oe!=null&&oe.unionid&&(le=oe)}if(!le.unionid)return;const ue=await exports.globalInject.$axios.get(`v2/form/getAnswerListByO?id=${ye}&unionid=${le.unionid}&form_id=${he}`);if(ue.data.status!==1)return;const{answer:J}=ue.data.result;S.value=J},q=M(()=>l.value!=="editor"&&gt.value.test_setting.is_time_limit),V=()=>{h.value&&h.value.submitBtnClick()},Y=M(()=>l.value==="input"&&gt.value.test_setting.is_anti_cheating),Z=M(()=>l.value==="editor"&&$$()),ce=M(()=>l.value==="input"&&!!gt.value.details.show_share_qrcode&&!L.value),re=async()=>{await V6(y,S.value)};return(ye,he)=>(C(),A(Ae,null,[w("div",{class:"normal-view",ref_key:"normalViewRef",ref:f,onClickCapture:he[1]||(he[1]=(...le)=>c(j)&&c(j)(...le))},[O(vUe),q.value?(C(),ve(c(o),{key:0})):G("",!0),Z.value?(C(),ve(c(t),{key:1})):G("",!0),w("div",{ref_key:"formMainRef",ref:T,class:B(["form-main",{mobile:L.value,isEditor:c(d)}])},[O(mje),O(vS,{ref:"widgetsRef"},null,512),w("div",{ref_key:"divideRef",ref:k},null,512),c(I)==4||c(I)==6?(C(),ve(MWe,{key:0,ref_key:"totalRef",ref:p,widgetsBtmRef:k.value,onSubmit:V},null,8,["widgetsBtmRef"])):G("",!0),F.value?(C(),A("div",{key:1,class:"auto-fill",style:Ze({top:L.value?"50vh":"270px",position:L.value?"fixed":"absolute"}),onClick:re}," 自动填充 ",4)):G("",!0),w("div",NWe,[Fe(" 提交即授权该表单收集你所填写的内容,"),w("span",{class:"agreement-link",onClick:he[0]||(he[0]=le=>b.value=!0)},"查看详情")]),O(sUe,{ref_key:"submitRef",ref:h},null,512)],2),m.value&&!g.value?(C(),ve(dUe,{key:2})):G("",!0),c(d)?(C(),A("div",RWe,[Fe(" 提交后展示内容:图文信息 "),w("span",{onClick:z},"修改")])):G("",!0)],544),c(I)==4||c(I)==5||c(I)==6?(C(),ve(c(i),{key:0})):G("",!0),O(c(n)),c(d)?G("",!0):(C(),ve(c(a),{key:1})),Y.value?(C(),ve(c(r),{key:2})):G("",!0),ce.value?(C(),ve(c(s),{key:3})):G("",!0),b.value?(C(),ve(vje,{key:4,onAgree:he[2]||(he[2]=le=>b.value=!1)})):G("",!0)],64))}}),FWe=Ye(LWe,[["__scopeId","data-v-14e8358c"]]),Kp=e=>(At("data-v-b3f45ef1"),e=e(),Ot(),e),BWe=Kp(()=>w("div",{class:"left main-text"},"已填数据",-1)),VWe={class:"right"},zWe={class:"info-text"},jWe={key:0,class:"appoint-container"},UWe=Kp(()=>w("div",{class:"answer-title"},"预约状态",-1)),WWe={class:"answer-container"},HWe={class:"appoint-answer"},qWe={key:1,class:"appoint-container"},KWe=Kp(()=>w("div",{class:"answer-title"},"应付金额",-1)),YWe={class:"answer-container"},GWe=Kp(()=>w("div",{class:"answer-title"},"交易号",-1)),QWe={class:"answer-container"},JWe=Kp(()=>w("div",{class:"answer-title"},"交易状态",-1)),XWe={class:"answer-container"},ZWe=se({__name:"index",props:{formStore:{},canEdit:{type:Boolean},isMobileSize:{type:Boolean}},emits:["closed"],setup(e,{emit:t}){const n=xa(),o=e;console.log("props: ",o);const a=gn({...o.formStore});console.debug(a,"formStore");const r=P(!1),s=P("answer-preview");Tt("formMode",s),Tt("editable",!1),n==3?Tt("isMobileSize",P(!1)):Tt("isMobileSize",o.isMobileSize),Tt("formStore",a);const i=P(!1),l=()=>{i.value=!0},d=()=>{i.value=!1},f=(m=!0)=>{const b=L6(a.widgetList,a.data);if(a.dataVer={...a.dataVer,...b},Object.values(b).some(g=>g.status!==Kf.Success)){const g=a.widgetList.find(y=>{var _;return((_=b[y.id])==null?void 0:_.status)!==Kf.Success});return g&&m?zf(g.id):console.warn("invalidWidget is not found"),!1}return!0};async function p(){s.value==="answer-preview"?s.value="input":f(!1)&&(await L9e({form_id:a.formId,fake_id:a.fake_id,answer:a.data})).status===1&&(ht.success("修改成功"),Yje(a.fake_id,a.data),u6(),d())}async function h(){await G9e({form_id:o.formStore.formId,answer_id:o.formStore.answerId})==1&&(r.value=!0)}return st(l),(m,b)=>(C(),ve(c(Ga),{width:m.isMobileSize?"88%":"680px",modelValue:i.value,"onUpdate:modelValue":b[2]||(b[2]=g=>i.value=g),"align-center":"","show-close":!1,class:"form-answer-preview-dialog",onClosed:b[3]||(b[3]=g=>m.$emit("closed"))},Ia({header:H(()=>[BWe,w("div",VWe,[w("span",zWe,ie(c(Em)(new Date(a.date*1e3)))+" 提交填写",1),w("span",{onClick:b[0]||(b[0]=g=>m.$emit("closed")),class:"icon iconfont icon-form-close"})])]),default:H(()=>[O(vS,{mode:"answer",isDateModal:!0}),a.appointment.length>0?(C(),A("div",jWe,[UWe,w("div",WWe,[w("div",HWe,ie(a.appointment[0]&&a.appointment[0].status==1&&!r.value?"已预约":"已取消"),1)])])):G("",!0),c(n)==6?(C(),A("div",qWe,[KWe,w("div",YWe,ie(a.trade_info.price),1),GWe,w("div",QWe,ie(a.trade_info.transaction_id),1),JWe,w("div",XWe,ie(a.trade_info.status),1)])):G("",!0)]),_:2},[m.canEdit?{name:"footer",fn:H(()=>[s.value!=="answer-preview"?(C(),ve(c(Wt),{key:0,type:"info",onClick:b[1]||(b[1]=g=>m.$emit("closed")),size:"large"},{default:H(()=>[Fe(" 取消")]),_:1})):G("",!0),O(c(Wt),{type:"primary",onClick:p,size:"large"},{default:H(()=>[Fe(ie(s.value==="answer-preview"?"修改数据":"提交"),1)]),_:1})]),key:"0"}:void 0,c(gt).details.cancelAppoint==1&&!r.value?{name:"footer",fn:H(()=>[a.appointment.length>0&&a.appointment[0].status==1?(C(),ve(c(Wt),{key:0,onClick:h,type:"danger"},{default:H(()=>[Fe(" 取消预约 ")]),_:1})):G("",!0)]),key:"1"}:void 0]),1032,["width","modelValue"]))}}),eHe=Ye(ZWe,[["__scopeId","data-v-b3f45ef1"]]);function iO(e,t,n){const o=document.createElement("div"),a=()=>{Ha(null,o),o.remove()},r=_t(Cs,{namespace:"bmwfr"},()=>_t(eHe,{formStore:e,canEdit:t,isMobileSize:n,onClosed:a}));document.body.appendChild(o),Ha(r,o)}const tHe={class:"content"},nHe=["data-id","onClick"],oHe=se({__name:"CacheDialog",props:{showCacheDialog:{type:Boolean},cacheDateList:{},formStore:{}},emits:["update:showCacheDialog","change"],setup(e,{emit:t}){const n=de("isMobileSize"),o=e,a=t,r=xa(),s=M({get:()=>o.showCacheDialog,set:l=>{a("update:showCacheDialog",l)}});async function i(l){console.debug(l,"itemsss"),exports.globalInject.getToken();let d;[4,5,6].includes(r)?(d=await d6({answer_id:l.id}),s.value=!1,console.debug(d,"res"),iO({...o.formStore,data:d.answer,formId:d.form_id,fake_id:d.fake_id,date:d.meta_info.answerInfo.startTime,confirm_code:d.code,answerId:d.id,appointment:d.appointment},gt.value.details.modifyData===0,n.value)):(s.value=!1,iO({...o.formStore,data:l.answer,formId:l.form_id,fake_id:l.fake_id,date:l.meta_info.answerInfo.startTime,confirm_code:l.code,answerId:l.id,appointment:[]},gt.value.details.modifyData===0))}return(l,d)=>(C(),ve(c(Ga),{modelValue:s.value,"onUpdate:modelValue":d[0]||(d[0]=f=>s.value=f),title:"已填数据",width:c(n)?"88%":"440px","align-center":"",class:"cache-data-dialog"},{default:H(()=>[w("div",tHe,[w("ul",null,[(C(!0),A(Ae,null,et(l.cacheDateList,f=>(C(),A("li",{key:f.id,class:"data-item","data-id":f.id,onClick:p=>i(f)},ie([4,5,6].includes(c(r))?c(Em)(new Date(f.create_at*1e3)):c(Em)(new Date(f.meta_info.answerInfo.startTime*1e3)))+" 提交填写 ",9,nHe))),128))])])]),_:1},8,["modelValue","width"]))}}),z6=Ye(oHe,[["__scopeId","data-v-136b43a0"]]),mS=se({__name:"index",props:{mode:{}},setup(e){const t=e,n=P(t.mode);Tt("formMode",n);let o=t.mode==="editor";Tt("editable",o);const a=xa(),r=P(!1),s=P(!o&&!!gt.value.details.verify_pwd),i=P(!o&&$$()&&(!!gt.value.test_setting.show_pre_notice||!!gt.value.test_setting.show_topic_structure)),l=gn({isBatchSettingAnswer:!1,data:{},dataVer:{},pay_info:{},pageNumber:0,pageList:M(()=>u1e(o)),widgetList:M(()=>l.pageList[l.pageNumber]??[]),answerId:"",confirm_code:""});function d(){if(f.value.length>0&&![4,5,6].includes(a)&&n.value=="input"){const{showConfirm:p}=ul();p({type:"warn",title:"提示",content:"您已填写过该表单",cancelText:"再次填写",confirmText:"查看已填数据",onConfirm:()=>{r.value=!0},onCancel:()=>{}})}}const f=M(()=>o||gt.value.details.checkData===1?[]:(console.log(" getStoreDate(globalInject.getFormId(): ",sO(exports.globalInject.getFormId())),sO(exports.globalInject.getFormId())));return st(()=>{a==4&&l.widgetList.length==0&&Zu("appoint"),a==6&&l.widgetList.length==0&&(Zu("gainWithPic"),Zu("nameInput"),Zu("phoneInput"))}),st(()=>{d()}),Tt("formStore",l),(p,h)=>(C(),A(Ae,null,[s.value?(C(),ve(Bze,{key:0,onClosed:h[0]||(h[0]=m=>s.value=!1)})):i.value?(C(),ve(uje,{key:1,onStart:h[1]||(h[1]=m=>i.value=!1)})):(C(),ve(FWe,{key:2})),r.value?(C(),ve(z6,{key:3,showCacheDialog:r.value,"onUpdate:showCacheDialog":h[2]||(h[2]=m=>r.value=m),cacheDateList:f.value,formStore:l},null,8,["showCacheDialog","cacheDateList","formStore"])):G("",!0)],64))}}),ld=e=>(At("data-v-58378def"),e=e(),Ot(),e),aHe={class:"disable-wechat-view"},rHe=["src"],sHe={class:"disable-wechat-tips"},iHe=["src"],lHe=ld(()=>w("div",{class:"title"},"该表单仅限在微信里填写",-1)),uHe=ld(()=>w("div",{class:"des-text"},"微信扫一扫填写表单",-1)),cHe=["src"],dHe={class:"msg"},fHe={key:0,class:"time-tip"},pHe=ld(()=>w("span",null,"开放时间为",-1)),vHe=ld(()=>w("br",null,null,-1)),hHe={class:"range"},mHe={key:1,class:"time-tip"},gHe=ld(()=>w("span",null,"开放时间为",-1)),bHe=ld(()=>w("br",null,null,-1)),yHe={class:"range"},_He=se({__name:"DisabledView",props:{errInfo:{}},setup(e){const t=e,n=wb(window.location.href,{width:170,margin:0}),o=`${Hn}/images/table-empty.png`,a={4002:{msg:"抱歉!您不在可填写的地区范围内",img:`${Hn}/images/disabled_region.png`},4003:{msg:"抱歉!您的填写次数已达上限",img:`${Hn}/images/disabled_max.png`},4004:{msg:"该表单已达到指定收集量",img:`${Hn}/images/disabled_num.png`},4005:{msg:"您访问的表单暂未开放",img:`${Hn}/images/disabled_time.png`},4006:{msg:"该表单已停止收集",img:`${Hn}/images/disabled_stop.png`},4014:{msg:"您访问的表单暂未开放",img:`${Hn}/images/disabled_time.png`}},r=M(()=>{var h;return((h=a[t.errInfo.status])==null?void 0:h.img)||o}),s=M(()=>{var h;return((h=a[t.errInfo.status])==null?void 0:h.msg)||t.errInfo.msg||""}),i=h=>{let m="";return h.map((b,g)=>{if(b.length!=0){const y=b[0].split(":"),_=b[1].split(":"),I=`${y[0]}:${y[1]}`,k=`${_[0]}:${_[1]}`;g!=h.length-1?m+=`${I} - ${k}、`:m+=`${I} - ${k}`}}),`每日${m}`},l=h=>{var b,g,y,_;const m=i((b=h.result)==null?void 0:b.daily_limit_times);return((g=h.result)==null?void 0:g.valid_end_time)!=-1&&((y=h.result)==null?void 0:y.valid_start_time)!=-1?d(((_=h.result)==null?void 0:_.valid_start_time)*1e3,h.result.valid_end_time*1e3)+","+m:m},d=(h,m)=>`${ut(h).format("YYYY-MM-DD HH:mm")} - ${ut(m).format("YYYY-MM-DD HH:mm")}`,f=P(),{isFullSize:p}=uS(f);return(h,m)=>{var b,g,y,_;return C(),A("div",{ref_key:"disabledViewRef",ref:f,class:B(["disabled-view",{mobile:c(p)}])},[h.errInfo.status===3922?(C(),A(Ae,{key:0},[w("div",aHe,[w("img",{src:c(n),class:"qrCode-img",alt:""},null,8,rHe)]),w("div",sHe,[w("img",{src:`${c(Hn)}/images/wx-image.png`,alt:""},null,8,iHe),lHe,uHe])],64)):(C(),A(Ae,{key:1},[w("img",{class:"img",src:r.value,alt:""},null,8,cHe),w("div",dHe,ie(s.value),1),h.errInfo.status===4005&&((b=h.errInfo.result)!=null&&b.valid_start_time)&&((g=h.errInfo.result)!=null&&g.valid_end_time)?(C(),A("div",fHe,[pHe,vHe,w("span",hHe,ie(d(((y=h.errInfo.result)==null?void 0:y.valid_start_time)*1e3,h.errInfo.result.valid_end_time*1e3)),1)])):G("",!0),h.errInfo.status===4014&&((_=h.errInfo.result)==null?void 0:_.daily_limit_times.length)>0?(C(),A("div",mHe,[gHe,bHe,w("span",yHe,ie(l(h.errInfo)),1)])):G("",!0)],64))],2)}}}),wHe=Ye(_He,[["__scopeId","data-v-58378def"]]),$He=e=>(At("data-v-c1e71e3e"),e=e(),Ot(),e),CHe=$He(()=>w("svg",{class:"svg-icon","aria-hidden":"true"},[w("use",{"xlink:href":"#icon-form-success"})],-1)),SHe={class:"success-content"},EHe=["innerHTML"],kHe=["onClick"],IHe={key:1,class:"btn-operate"},THe={class:"btn-operate-contanier"},xHe=["onClick"],AHe={class:"item-text"},OHe=se({__name:"CommitView",props:{id:{type:String,default:""}},setup(e){const t={theme:"snow",readOnly:!0,modules:{toolbar:!1}},n=M(()=>["dev","test"].includes(exports.globalInject.getEnvType())),o=de("answerInfo");console.log("🚀 ~ answerInfo:",o);const a=P(null),r=P(!1);st(async()=>{if(typeof window<"u"&&typeof document<"u"){const h=await Promise.resolve().then(()=>require("./vue-quill.esm-bundler-BQgFSpLK.cjs"));a.value=h.QuillEditor,r.value=!0}});const s=P();uS(s);const i=M(()=>gt.value.commit.btnList),l=M(()=>gt.value.commit.btnList.length);st(()=>{oS.emit("close-editor-expand","")});const d=(h,m)=>{const b=document.createElement("div");return b.innerHTML=h,b.querySelectorAll("span[data-id]").forEach(g=>{const y=g.getAttribute("data-id");if(y&&m[y]!=null&&(typeof m[y]=="string"&&(g.innerText=m[y]),Array.isArray(m[y])&&(g.innerText=m[y].map(_=>_.label?_.label.join("、"):_)),Object.prototype.toString.call(m[y])==="[object Object]"&&(g.innerText=m[y].label)),y==="000000"){const _=new Date,I=_.getFullYear(),k=_.getMonth()+1,E=_.getDate();g.innerText=`${I}.${k}.${E}`}g.style.setProperty("background","transparent","important"),g&&g.parentNode instanceof HTMLElement&&g.parentNode.style.setProperty("background","transparent","important")}),b.innerHTML},f=M(()=>d(gt.value.commit.html,o)),p=h=>{switch(h.alias){case"complete_link":window.parent.postMessage({data:{action:"exit"}},"*");break;case"go_link":window.location.href=h.link;break;case"back_link":const m=new URL(window.location.href);m.searchParams.has("code")&&m.searchParams.delete("code"),m.searchParams.has("form_answer")&&m.searchParams.delete("form_answer"),m.searchParams.has("phone")&&m.searchParams.delete("phone"),m.searchParams.has("position")&&m.searchParams.delete("position"),window.history.replaceState({},"",m.toString()),window.location.reload();break;case"detail_link":Xu("/");break}};return(h,m)=>(C(),A("div",{class:"success-view-wrap",ref_key:"successViewRef",ref:s},[w("div",{class:"success-wrap",style:Ze({paddingTop:n.value?"107px":"0"})},[CHe,w("div",SHe,[r.value&&a.value?(C(),ve(Kt(a.value),{key:0,content:f.value,"onUpdate:content":m[0]||(m[0]=b=>f.value=b),contentType:"html",options:t},null,40,["content"])):(C(),A("div",{key:1,innerHTML:f.value},null,8,EHe))])],4),l.value<3?(C(),A("div",{key:0,class:"btn-list",style:Ze({marginBottom:l.value===1?"134px":"80px"})},[(C(!0),A(Ae,null,et(i.value,(b,g)=>(C(),A("div",{class:"btn-item",onClick:y=>p(b),style:Ze({background:g===1?"#F2F2F2":"#2278FF",color:g===1?"#2278FF":"#fff"})},ie(b.name||b.value),13,kHe))),256))],4)):(C(),A("div",IHe,[w("div",THe,[(C(!0),A(Ae,null,et(i.value,(b,g)=>(C(),A("div",{class:"btn-item",onClick:y=>p(b),style:Ze({borderColor:g===l.value-1?"transparent":"#eee"})},[w("div",AHe,ie(b.name||b.value),1),O(c(lt),null,{default:H(()=>[O(c(qr))]),_:1})],12,xHe))),256))])]))],512))}}),DHe=Ye(OHe,[["__scopeId","data-v-c1e71e3e"]]),PHe={key:0,class:"success-wrap-container"},MHe=se({__name:"App",props:{el:{},id:{},token:{},isLanding:{}},setup(e){const t=e,n=P({status:0,msg:"获取表单失败"}),o=gn({});function a(f){Object.assign(o,On(f))}const r=f=>{i(f.unionid)};Tt("answerInfo",o),Tt("setAnswerInfo",a),Tt("setAuth",r),Tt("isLanding",(t==null?void 0:t.isLanding)||!1),f8(),L4(t.id);const s=P(!0),i=(f="")=>{u6(f).then(({status:p,msg:h,result:m})=>{var b;console.log("🚀 ~ init ~ status:",p,typeof p),p!==1?n.value={status:p,msg:h,result:m}:n.value=dye((b=m==null?void 0:m.setting)==null?void 0:b.crown_setting)||{status:1,msg:""}}).finally(()=>{s.value=!1})};i(),document.addEventListener("form-render:submit-fail",f=>{n.value=f.detail});const l=P(!1);document.addEventListener("form-render:submit-success",()=>{l.value=!0,ot(()=>{var f;(f=t.el)==null||f.scrollTo(0,0)})});const d=()=>{const f=document.createElement("script");f.src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js",f.onload=()=>{console.log("WeChat SDK loaded")},f.onerror=()=>{console.error("Failed to load WeChat SDK")},document.head.appendChild(f)};return st(()=>{d()}),(f,p)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":1888},{default:H(()=>[s.value?G("",!0):(C(),A(Ae,{key:0},[n.value.status!==1?(C(),ve(wHe,{key:0,errInfo:n.value},null,8,["errInfo"])):(C(),A(Ae,{key:1},[l.value?(C(),A("div",PHe,[O(DHe,{id:f.id},null,8,["id"])])):(C(),ve(mS,{key:1,mode:"input"}))],64))],64))]),_:1},8,["locale"]))}}),NHe=Ye(MHe,[["__scopeId","data-v-68ae576c"]]),RHe=e=>{const t=si(NHe,e);return t.config.compilerOptions.isCustomElement=n=>n.startsWith("wx-"),id(t),t},LHe=se({__name:"App",props:{tid:{},id:{},token:{}},setup(e){const t=e,n=P(!0);return(t.tid?l6(t.tid):t.id?i6(t.id,t.token):Promise.resolve()).finally(()=>{n.value=!1}),(a,r)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":1888},{default:H(()=>[n.value?G("",!0):(C(),ve(mS,{key:0,mode:"preview"}))]),_:1},8,["locale"]))}}),FHe=e=>{const t=si(LHe,e);return id(t),t},ud=e=>(At("data-v-064e4378"),e=e(),Ot(),e),BHe={key:0,class:"mobile-score-result"},VHe={class:"header"},zHe=ud(()=>w("i",{class:"iconfont icon-form-share1"},null,-1)),jHe={class:"full-score"},UHe={class:"title"},WHe={class:"info"},HHe={class:"name"},qHe={class:"time1"},KHe={class:"time2"},YHe={class:"table"},GHe={class:"tit"},QHe={class:"val"},JHe={class:"row"},XHe=ud(()=>w("div",{class:"tit"},"得分",-1)),ZHe={class:"val"},eqe={class:"score",style:{"margin-left":"10px"}},tqe=ud(()=>w("img",{src:"https://static.bmwax.cn/form_static/images/score-underline.png",alt:""},null,-1)),nqe={key:1,class:"score-result"},oqe={class:"header"},aqe=ud(()=>w("i",{class:"iconfont icon-form-share1"},null,-1)),rqe={class:"title"},sqe={class:"full-score"},iqe={class:"info"},lqe={class:"name"},uqe={class:"time1"},cqe={class:"time2"},dqe={class:"table"},fqe={class:"tit"},pqe={class:"val"},vqe={class:"col"},hqe=ud(()=>w("div",{class:"tit"},"得分",-1)),mqe={class:"val"},gqe={class:"score"},bqe=ud(()=>w("img",{src:"https://static.bmwax.cn/form_static/images/score-underline.png",alt:""},null,-1)),yqe=se({__name:"ScoreResult",setup(e){const t=de("isMobileSize"),n=de("answerPage"),o=M(()=>Object.values(n.fullScore).reduce((d,f)=>d+f,0)),a=M(()=>Object.values(n.score).reduce((d,f)=>d+f,0)),r=M(()=>D$(Rf.value).map(d=>({...d,score:d.ids.reduce((f,p)=>f+n.score[p],0),fullScore:d.ids.reduce((f,p)=>f+n.fullScore[p],0)}))),{copy:s,copied:i}=ub(),l=async()=>{await s(window.location.href),i.value?ht.success("复制成功"):ht.warning("复制失败")};return(d,f)=>c(t)?(C(),A("div",BHe,[w("div",VHe,[w("div",{class:"share-btn",onClick:l},[zHe,Fe(" 分享给好友 ")]),w("div",jHe,"满分:"+ie(o.value)+"分",1)]),w("div",UHe,ie(c(n).formTitle),1),w("div",WHe,[w("div",HHe,"姓名:"+ie(c(n).userName),1),w("div",qHe,[Fe(" 答题时长:"),w("span",null,ie(c(n).time)+"s",1)]),w("div",KHe,"提交时间:"+ie(c(n).createAt),1)]),w("div",YHe,[(C(!0),A(Ae,null,et(r.value,p=>(C(),A("div",{key:p.key,class:"row"},[w("div",GHe,ie(p.title),1),w("div",QHe,ie(p.score)+"/"+ie(p.fullScore),1)]))),128)),w("div",JHe,[XHe,w("div",ZHe,[w("span",eqe,[w("span",null,ie(a.value),1),tqe])])])])])):(C(),A("div",nqe,[w("div",oqe,[w("div",{class:"share-btn",onClick:l},[aqe,Fe(" 分享给好友 ")]),w("div",rqe,ie(c(n).formTitle),1),w("div",sqe,"满分:"+ie(o.value)+"分",1)]),w("div",iqe,[w("div",lqe,"姓名:"+ie(c(n).userName),1),w("div",uqe,[Fe(" 答题时长:"),w("span",null,ie(c(n).time)+"s",1)]),w("div",cqe,"提交时间:"+ie(c(n).createAt),1)]),w("div",dqe,[(C(!0),A(Ae,null,et(r.value,p=>(C(),A("div",{key:p.type,class:"col"},[w("div",fqe,ie(p.title),1),w("div",pqe,ie(p.score)+"/"+ie(p.fullScore),1)]))),128)),w("div",vqe,[hqe,w("div",mqe,[w("span",gqe,[w("span",null,ie(a.value),1),bqe])])])])]))}}),_qe=Ye(yqe,[["__scopeId","data-v-064e4378"]]),wqe={class:"answer-title"},$qe={class:"lf"},Cqe={class:"total"},Sqe=["src"],Eqe={class:"rt"},kqe={key:0},Iqe={class:"score"},Tqe=se({__name:"AnswerTitle",props:{index:{}},setup(e){const t=de("widget"),n=de("answerItem"),o=de("isMobileSize");return(a,r)=>(C(),A("div",wqe,[w("div",$qe,[w("span",null,ie(`${a.index+1}. ${c(t).attrs.title}`),1),w("span",Cqe,"("+ie(c(n).fullScore)+"分)",1),w("img",{class:"icon",src:c(n).isCorrect?c(Ke)("/images/correct.png"):c(Ke)("/images/incorrect.png"),alt:""},null,8,Sqe)]),w("div",Eqe,[c(o)?G("",!0):(C(),A("span",kqe,"得分:")),w("span",Iqe,ie(c(n).score),1),Fe(" 分 ")])]))}}),xqe=Ye(Tqe,[["__scopeId","data-v-78cd63d1"]]),gS=e=>(At("data-v-53a6413f"),e=e(),Ot(),e),Aqe={class:"answer-item"},Oqe=gS(()=>w("div",{style:{height:"10px"}},null,-1)),Dqe={class:"desc"},Pqe=gS(()=>w("div",{style:{height:"13px"}},null,-1)),Mqe=gS(()=>w("div",{style:{height:"10px"}},null,-1)),Nqe={class:"analysis"},Rqe=se({__name:"AnswerItem",props:{index:{},widget:{},answer:{}},setup(e){const t=e;Tt("widget",t.widget);const n=de("answerPage"),o=gn({fullScore:M(()=>n.fullScore[t.widget.id]),score:M(()=>n.score[t.widget.id]),answer:M(()=>t.answer),isCorrect:M(()=>s8(o.score))});Tt("answerItem",o);const a=()=>{const r={fillBlank2:An(()=>Promise.resolve().then(()=>require("./FillBlank-BhJ3Hn4L.cjs"))),shortAnswer2:An(()=>Promise.resolve().then(()=>require("./FillBlank-BhJ3Hn4L.cjs"))),numberFillBlank:An(()=>Promise.resolve().then(()=>require("./NumberFillBlank-CH1MhBym.cjs"))),eduRadio:An(()=>Promise.resolve().then(()=>require("./Choice-qy-hijdN.cjs"))),eduCheckbox:An(()=>Promise.resolve().then(()=>require("./Choice-qy-hijdN.cjs"))),eduJudgement:An(()=>Promise.resolve().then(()=>require("./Choice-qy-hijdN.cjs"))),eduSelect:An(()=>Promise.resolve().then(()=>require("./Choice-qy-hijdN.cjs"))),eduImgRadio:An(()=>Promise.resolve().then(()=>require("./ImgCard-UYYypqrq.cjs"))),eduImgCheckbox:An(()=>Promise.resolve().then(()=>require("./ImgCard-UYYypqrq.cjs")))};return r[t.widget.type]||r.fillBlank2};return(r,s)=>(C(),A("div",Aqe,[O(xqe,{index:r.index},null,8,["index"]),r.widget.attrs.desc?(C(),A(Ae,{key:0},[Oqe,w("div",Dqe,ie(r.widget.attrs.desc),1)],64)):G("",!0),Pqe,(C(),ve(Kt(a()))),c(n8)&&r.widget.attrs.showAnalysis?(C(),A(Ae,{key:1},[Mqe,w("div",Nqe,"答案解析:"+ie(r.widget.attrs.analysis||"无"),1)],64)):G("",!0)]))}}),Lqe=Ye(Rqe,[["__scopeId","data-v-53a6413f"]]),Fqe={class:"header"},Bqe={class:"switch"},Vqe=["onClick"],zqe={class:"list"},jqe=se({__name:"AnswerList",setup(e){const t=[{title:"显示全部",key:"all"},{title:"只看错题",key:"incorrect"}],n=P(t[0].key),o=de("answerPage"),a=de("isMobileSize"),r=M(()=>n.value==="all"?Rf.value:Rf.value.filter(i=>!s8(o.score[i.id]))),s=i=>o.answers[i.id];return(i,l)=>(C(),A("div",{class:"answer-list",style:Ze({padding:c(a)?"20px":"20px 30px"})},[w("div",Fqe,[w("div",Bqe,[(C(),A(Ae,null,et(t,d=>w("span",{key:d.key,class:B(["item",{active:d.key===n.value}]),onClick:f=>n.value=d.key},ie(d.title),11,Vqe)),64))])]),w("div",zqe,[(C(!0),A(Ae,null,et(r.value,(d,f)=>(C(),A("div",{key:d.id,class:"item"},[O(Lqe,{index:f,widget:d,answer:s(d)},null,8,["index","widget","answer"])]))),128))])],4))}}),Uqe=Ye(jqe,[["__scopeId","data-v-a801da69"]]),Wqe={class:"conatiner"},Hqe=se({__name:"index",setup(e){const t=P(),{width:n}=cb(t),o=M(()=>n.value<700);return Tt("isMobileSize",o),(a,r)=>(C(),A("div",{ref_key:"answerPageRef",ref:t,class:"answer-page"},[w("div",Wqe,[O(_qe),O(Uqe)])],512))}}),qqe=Ye(Hqe,[["__scopeId","data-v-24a732b9"]]),Kqe=se({__name:"App",props:{id:{},formId:{}},setup(e){const t=e,n=gn({id:t.id,userName:"匿名",formId:t.formId,formTitle:"",answers:{},score:{},fullScore:{},createAt:"",time:60});Tt("answerPage",n);const o=P(!0);return Promise.all([N9e(t.formId),R9e(t.id)]).then(([a,r])=>{n.answers=r.result.answer,n.formTitle=a.result.header.attrs.title,i8(a.result.widgets).forEach(d=>{n.score[d.id]=p8(d,n.answers[d.id]),n.fullScore[d.id]=swe(d)});const s=a.result.widgets.find(d=>d.type==="nameInput");s&&(n.userName=n.answers[s.id]||"匿名"),n.createAt=ut(r.result.create_at*1e3).format("YYYY-MM-DD HH:mm:ss");const{endTime:i,startTime:l}=r.result.meta_info.answerInfo;n.time=ut(i*1e3-l*1e3).second()}).finally(()=>{o.value=!1}),(a,r)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":1888},{default:H(()=>[o.value?G("",!0):(C(),ve(qqe,{key:0}))]),_:1},8,["locale"]))}}),Yqe=e=>{const t=si(Kqe,e);return id(t),t};function j6(e,t){let n=[],o=e.search_config.list||[];for(const a of o){let r=t.find(s=>s.id===a.value);if(r)n.push(r);else return{status:5002,msg:"改链接组件失效",result:[]}}return{status:200,msg:"获取成功",result:n}}function Gqe(e,t,n,o,a,r){console.log("searchInfo: ",a),console.log("formId: ",r),console.log("page: ",n),console.log("order_type: ",t),console.log("order: ",e);const s=P([]),i=P(0);function l(){var f;let d={form_id:r,order:e.value,order_type:t.value,page:n.value,pagecount:o.value,searchInfo:a.value,chain:(f=exports.globalInject.getRoute().query)==null?void 0:f.chain};Qqe(d).then(p=>{s.value=p.list,i.value=p.total})}return l(),Zo(l),{dataList:s,total:i}}const Qqe=async e=>{const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.post("/v2/form/openSearch",e);if(t!==1)throw new Error(o);return n},k1=["basicRadio","occupationRadio","sexRadio","educationRadio","ageRadio","eduRadio"],U6=["index","basicInput","fillBlank","emailInput","idCardInput","textarea","shortAnswer","phoneInput","numberInput","nameInput","companyInput","departmentInput","positionInput","ageInput","fillBlank2","shortAnswer2","numberFillBlank"],Jqe=e=>(At("data-v-0343c7ad"),e=e(),Ot(),e),Xqe={key:0,class:"search-container"},Zqe=Jqe(()=>w("span",{class:"icon iconfont icon-form-sousuo"},null,-1)),eKe={key:1,class:"extra-info"},tKe={class:"title"},nKe=["src"],oKe={class:"des"},aKe={class:"section"},rKe={class:"section-title"},sKe={key:0,class:"request-icon"},iKe={class:"section-content"},lKe=["onClick"],uKe={class:"section-title"},cKe={key:0,class:"request-icon"},dKe={class:"section-content"},fKe={key:2,class:"error-text"},pKe={class:"bottom"},vKe={key:1,class:"title"},hKe=se({__name:"Search",props:{searchWidgets:{},searchInfo:{},searchType:{},tab:{},formTitle:{}},emits:["goSearch"],setup(e,{emit:t}){const n=e,o=P(!1),a=exports.globalInject.getRoute().query,r=P(Object.fromEntries(n.searchWidgets.map(g=>[g.id,a[g.id]]))),s=M(()=>{let g=[];for(const y in r.value){const _=n.searchWidgets.find(I=>I.id===y);_&&r.value[y]&&(k1.includes(_.type)?g.push({label:_.attrs.title,value:_.attrs.list.find(I=>I.value===r.value[y]).label}):g.push({label:_.attrs.title,value:r.value[y]}))}return g}),i=P(!1),l=P(null),d=t,f=M(()=>n.searchInfo.search_config.type==="and");function p(){if(f.value){for(let g in r.value)if(r.value[g]===void 0){i.value=!0;return}}o.value&&(o.value=!1),d("goSearch",r.value)}function h(g,y){r.value[g.id]===y.value?r.value[g.id]=void 0:r.value[g.id]=y.value}function m(g){o.value=!o.value,g.preventDefault()}const b=g=>{o.value&&!l.value.contains(g.target)&&(o.value=!1)};return st(()=>{document.addEventListener("click",b)}),Nn(()=>{document.removeEventListener("click",b)}),(g,y)=>g.searchType===1?(C(),A("div",Xqe,[g.tab==2?(C(),A("div",{key:0,class:"search-input",onClick:mt(m,["stop"])},[Zqe,(C(!0),A(Ae,null,et(s.value,_=>(C(),A("div",{class:"search-card",key:_.label},ie(_.label)+": "+ie(_.value),1))),128))])):G("",!0),g.tab==1?(C(),A("div",eKe,[w("div",tKe,ie(g.searchInfo.extra.title),1),w("img",{src:g.searchInfo.extra.backgroundUrl,alt:""},null,8,nKe)])):G("",!0),Et(w("div",{class:B(["container",{"absolute-class":g.tab==2}]),ref_key:"modalOverlay",ref:l},[w("div",oKe,ie(n.searchInfo.search_config.type==="and"?"输入以下全部条件查询":"输入以下任一条件查询"),1),(C(!0),A(Ae,null,et(g.searchWidgets,_=>(C(),A("div",aKe,[c(k1).includes(_.type)?(C(),A(Ae,{key:0},[w("div",rKe,[f.value?(C(),A("span",sKe,"*")):G("",!0),Fe(" "+ie(_.attrs.title),1)]),w("div",iKe,[(C(!0),A(Ae,null,et(_.attrs.list,I=>(C(),A("div",{class:B(["option-item",{active:r.value[_.id]===I.value}]),onClick:k=>h(_,I)},ie(I.label),11,lKe))),256))])],64)):G("",!0),c(U6).includes(_.type)?(C(),A(Ae,{key:1},[w("div",uKe,[f.value?(C(),A("span",cKe,"*")):G("",!0),Fe(" "+ie(_.attrs.title),1)]),w("div",dKe,[O(c(Pt),{class:B({"error-input":i.value&&!r.value[_.id]}),modelValue:r.value[_.id],"onUpdate:modelValue":I=>r.value[_.id]=I},null,8,["class","modelValue","onUpdate:modelValue"])])],64)):G("",!0),i.value&&!r.value[_.id]?(C(),A("div",fKe," 此项为必填 ")):G("",!0)]))),256)),w("div",pKe,[O(c(Wt),{onClick:p,type:"primary"},{default:H(()=>[Fe("确定")]),_:1})])],2),[[nn,o.value||g.tab==1]])])):(C(),A("div",vKe,ie(g.formTitle),1))}}),mKe=Ye(hKe,[["__scopeId","data-v-0343c7ad"]]),xn={total:"bmu-front-end-fixed--id-totalScoped-bfed893",index:"fake_id",source:"bmu-front-end-fixed--id-source-a3a3a3a3",submitDate:"bmu-front-end-fixed--id-submitDate-acd9fb7",district:"bmu-front-end-fixed--id-district-2d0a0b0c",ip:"bmu-front-end-fixed--id-ip-479a5894",browser:"bmu-front-end-fixed--id-browser-7c9b3837",system:"bmu-front-end-fixed--id-system-f0a5ef8d"};function gKe(e,t,n,o){var f;const a=P([]),r=P([]),s=P(!1),i=P(0);s.value=!0,lO((f=exports.globalInject.getRoute().query)==null?void 0:f.id).then(p=>{r.value=Gm(p.widgets,{source:!!p.get_source_data},p.show_pay_list)});function l(){var p;d(),lO((p=exports.globalInject.getRoute().query)==null?void 0:p.id).then(h=>{r.value=Gm(h.widgets,{},h.show_pay_list)})}function d(){var m;s.value=!0;const p={form_id:(m=exports.globalInject.getRoute().query)==null?void 0:m.id,eacb:exports.globalInject.getToken(),order:e.value,order_type:t.value,page:n.value,pagecount:o.value},h=new Promise(b=>{setTimeout(()=>{b()},1e3)});Promise.all([bKe(p),h]).then(([b])=>{a.value=b.list,i.value=b.total}).finally(()=>{s.value=!1})}return Zo(d),{dataList:a,widgets:r,loading:s,total:i,refreshFn:l}}const bKe=async e=>{if(!e.form_id||!e.eacb){console.error("getFormData","form_id or eacb is unavailable!");return}const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/answerList?form_id=${e.form_id}&eacb=${e.eacb}&order=${e.order}&order_type=${e.order_type}&page=${e.page}&pagecount=${e.pagecount}`);if(t!==1)throw new Error(o);return n};async function lO(e){if(!e){console.error("form_id is unavailable!");return}const{data:{status:t,result:n,msg:o}}=await exports.globalInject.$axios.get(`/v2/form/info?id=${e}&eacb=${exports.globalInject.getToken()}`);if(t!==1)throw new Error(o);return n}function Gm(e,t,n){var l,d,f;const o=["pagination","contactUs","carousel","mapNavigation","button","description"];let a=e||nt.value||[];a=a.filter(p=>!o.includes(p.type)),a.find(p=>p.attrs.standard!==void 0)&&a.unshift({id:xn.total,type:"total",attrs:{title:"总分",id:xn.total}}),a.unshift({id:xn.index,type:"index",attrs:{title:"序号",id:xn.index,value:"fake_id"}});const r=[{id:xn.submitDate,type:"submitDate",attrs:{title:"提交时间",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}},{id:xn.district,type:"district",attrs:{title:"地区",id:xn.district,value:"meta_info.clientInfo.city"}},{id:xn.district,type:"ip",attrs:{title:"IP",id:xn.ip,value:"meta_info.clientInfo.ip"}},{id:xn.browser,type:"browser",attrs:{title:"浏览器",id:xn.browser,value:"meta_info.clientInfo.browser"}},{id:xn.system,type:"system",attrs:{title:"操作系统",id:xn.system,value:"meta_info.clientInfo.osBase.os"}}],s=[{id:xn.submitDate,type:"nickname",attrs:{title:"用户昵称",id:xn.submitDate,value:"meta_info.userInfo.nickname"}},{id:xn.district,type:"openid",attrs:{title:"openId",id:xn.district,value:"meta_info.userInfo.openid"}}];t!=null&&t.source&&r.unshift({id:xn.source,type:"source",attrs:{title:"来源",id:xn.source,value:"source"}});const i=[...a,...r,...s];return+((l=exports.globalInject.getRoute().query)==null?void 0:l.scene)===ac.appoint&&i.push({id:xn.submitDate,type:"appointStatus",attrs:{title:"预约状态",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}},{id:xn.submitDate,type:"appointOperate",attrs:{title:"预约操作",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}}),n&&(+((d=exports.globalInject.getRoute().query)==null?void 0:d.scene)===ac.gain||+((f=exports.globalInject.getRoute().query)==null?void 0:f.scene)===ac.appoint)&&i.push({id:xn.submitDate,type:"gainTotalPrice",attrs:{title:"应付金额",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}},{id:xn.submitDate,type:"gainGradeNumber",attrs:{title:"交易号",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}},{id:xn.submitDate,type:"gainGradeStatus",attrs:{title:"交易状态",id:xn.submitDate,value:"meta_info.answerInfo.endTime"}}),i}async function yKe(e){Lbe(e.url,e.name)}async function _Ke(e,t){const n={form_id:e,answer_id:t,eacb:exports.globalInject.getToken()};return await exports.globalInject.$axios.post("/v2/form/cancelAppointmentAdmin",n)}const sa={__name:"TooltipRow",props:{content:String|Number},setup(e){const t=P(null),n=P(!1),o=()=>{t.value&&(n.value=t.value.scrollWidth>t.value.clientWidth)};return(a,r)=>(C(),A("div",{onMouseenter:o},[n.value?(C(),ve(c(_o),{key:0,class:"item",effect:"dark",content:e.content,placement:"top","show-after":1e3},{default:H(()=>[w("div",{class:"cell-content",ref_key:"cellContent",ref:t},[xe(a.$slots,"default")],512)]),_:3},8,["content"])):(C(),A("div",{key:1,class:"cell-content",ref_key:"cellContent",ref:t},[xe(a.$slots,"default")],512))],32))}},bS=e=>(At("data-v-acc8d1e5"),e=e(),Ot(),e),wKe={style:{height:"100%"}},$Ke={style:{"text-align":"center"}},CKe={class:"cell-content"},SKe={class:"img-radio-box"},EKe={key:0},kKe=["src"],IKe={key:0,class:"file-list"},TKe=["onClick"],xKe=["src","preview-src-list"],AKe={key:0,class:"geolocation-container"},OKe={class:"local-title"},DKe=bS(()=>w("span",{class:"icon iconfont icon-form-location"},null,-1)),PKe={class:"local-des"},MKe=["onMouseenter"],NKe=["onClick"],RKe=["src"],LKe=bS(()=>w("div",{class:"upgrade-title"},[w("span",{class:"icon iconfont icon-form-circle-notice"}),Fe("取消预约")],-1)),FKe=bS(()=>w("span",null," 你确认要取消预约吗?确认取消后,当前预约将失效,系统会自动释放该预约项目的预约名额。 ",-1)),BKe={class:"dialog-footer"},VKe=se({__name:"DataTable",props:{dataList:{},widgets:{},order_type:{},disabled:{type:Boolean}},emits:["update:order_type","cancelAppointSuccess"],setup(e,{emit:t}){const n=e,o=P(!1),a=P(new Map),r=t,s=["basicInput","fillBlank","textarea","phoneInput","shortAnswer","numberInput","nameInput","date","rate","companyInput","departmentInput","positionInput","ageInput","idCardInput","emailInput","fillBlank2","shortAnswer2","numberFillBlank"],i=["gainWithPic","gainWithoutPic"],l=["businessSelect","multiSelect","regionSelect"],d=["basicSelect","nationSelect","eduSelect"],f=["eduJudgement","eduRadio","basicRadio","sexRadio","occupationRadio","educationRadio","ageRadio"],p=["checkbox","eduCheckbox"],h=["sort"],m=["imgRadio","imgCheckbox","eduImgCheckbox","eduImgRadio"],b=["file","resume","work"],g=["geolocation"],y=["source","submitDate","district","ip","browser","system"];st(()=>{console.debug(n.dataList,"dataList"),console.debug(n.dataList.some(he=>{var le;return!!((le=he.meta_info.userInfo)!=null&&le.nickname)}))});const _=M({get:()=>n.dataList.some(he=>{var le;return!!((le=he.meta_info.userInfo)!=null&&le.nickname)}),set:()=>{}});function I(he){return he.country+"-"+he.province+"-"+he.city}function k(){r("update:order_type",n.order_type==="asc"?"desc":"asc")}function E(he,le){let ue=le.id;return he.answer[ue]||"-"}function T(he,le){console.debug(he,le,"row column");let ue=le.id,J="";if(he.answer[ue])return he.answer[ue].map((oe,_e)=>{J+=oe.label+"(数量:"+oe.num+")",_e!=he.answer[ue].length-1&&(J+="、")}),J}function x(he){return console.debug(he,"row11"),(parseFloat(he.total_fee)/100).toFixed(2)}function S(he){if(!he.answer)return 0;let le=0;return n.widgets.map(ue=>{let J=p8(ue,he.answer[ue.id]);le+=J}),le}function D(he){n.disabled||yKe(he)}function N(he){if(n.disabled)return;const le={id:he.id,formId:exports.globalInject.getFormId()},ue=JSON.stringify(le);window.open(`/table/answer?q=${window.btoa(ue)}`)}function L(he,le){let ue=le.id,J=he.answer[ue];return!J||!J.length?"-":J.map(oe=>oe.label).join("-")}function F(he,le){let ue=le.id,J=he.answer[ue];if(!J)return"-";const oe=le.attrs.options.find(_e=>_e.value===J.id);return(oe==null?void 0:oe.label)||"-"}function z(he,le){let ue=le.id,J=he.answer[ue];if(!J)return;let oe=le.attrs.list;if(oe.length){if(J instanceof Array){let _e=oe.filter(ge=>J.includes(ge.value));return _e.length?_e:void 0}return[oe.find(_e=>_e.value===J)]}}function j(he,le){let ue=le.id,J=he.answer[ue];if(!J||!J.id)return"-";const oe=le.attrs.list.find(_e=>_e.value===J.id);return oe&&oe.type==="other"?oe.label+":"+J.input:oe&&J.supplyInput?oe.label+":"+J.supplyInput:(oe==null?void 0:oe.label)||"-"}function X(he,le){var _e;let ue=le.id,J=he.answer[ue];return!J||!J.length?"-":(_e=le.attrs.list.map(ge=>{let Me=J.find(ee=>ee.id===ge.value);if(Me)return ge.type==="other"?Me.label+":"+Me.input:Me.supplyInput?Me.label+":"+Me.supplyInput:Me.label}))==null?void 0:_e.filter(ge=>ge!==void 0).join(",")}function U(he,le){var _e;let ue=le.id,J=he.answer[ue];if(!J||!J.length)return"-";let oe=le.attrs.list;return oe.length?(_e=J.map(ge=>{var Me;return(Me=oe.find(ee=>ee.value===ge))==null?void 0:Me.label}))==null?void 0:_e.join(">"):"-"}function W(he,le){let ue=le.id,J=he.answer[ue];if(!(!J||!J.length))return J}function Q(he,le){let ue=le.attrs.value;ue=ue.split(".");let J=he;for(let oe=0;oe<ue.length;oe++)if(J)J=J[ue[oe]];else return"-";switch(le.type){case"submitDate":return Em(new Date(J*1e3));case"district":return I(J);default:return J}}function q(he){if(!he)return;const le=he.lat,ue=he.lng;return`https://apis.map.qq.com/ws/staticmap/v2/?center=${le},${ue}&zoom=17&size=300*300&key=${exports.globalInject.qqMapKey}`}const V=P({});function Y(he){o.value=!0,V.value=he}const Z=async()=>{o.value=!1,(await _Ke(V.value.form_id,V.value.id)).data.status===1?(r("cancelAppointSuccess"),ht.success("取消预约成功")):ht.error("取消预约失败")},ce=(he,le)=>{var _e;let ue=(he==null?void 0:he.answer[le.id])||[],J=((_e=le==null?void 0:le.attrs)==null?void 0:_e.appoint)||[],oe=[];return ue.forEach(ge=>{let Me=ge.appointment_id,ee=ge.appointment_date||"",ne=`(${ge.quota})`,fe="",ke="";if(ge!=null&&ge.appointment_time){let Pe=re(String(ge.appointment_time));fe=Pe.formattedStartTime,ke=Pe.formattedEndTime}let $e=J.find(Pe=>{var ze;return((ze=Pe==null?void 0:Pe.basicInfo)==null?void 0:ze.id)===Me});if($e&&($e!=null&&$e.basicInfo)){let Pe=($e==null?void 0:$e.basicInfo)||{};oe.push(Pe.name+" "+ee+fe+ke+ne)}}),oe.join(",")},re=he=>{if(he.length!==16)throw new Error("Input string must be 16 characters long");const le=he.substring(8,12),ue=he.substring(12,16),J=` ${le.substring(0,2)}:${le.substring(2)}`,oe=`-${ue.substring(0,2)}:${ue.substring(2)}`;return{formattedStartTime:J,formattedEndTime:oe}},ye=he=>{let le="";return!he.appointment||!he.appointment.length||(le=he.appointment[0].status===1?"已预约":"已取消"),le};return(he,le)=>{const ue=Bt("svg-icon");return C(),A("div",wKe,[O(c(TM),{data:he.dataList,height:"100%",style:{width:"100%"},"header-cell-style":{background:"#F5F8FD","font-weight":"400","font-size":"14px",color:"#1A1A1A","line-height":"23px",height:"50px"},border:!0,"cell-style":{"font-weight":"400","font-size":"14px",color:"#767676",padding:"10px 0",height:"40px"},"scrollbar-always-on":!0},{default:H(()=>[(C(!0),A(Ae,null,et(he.widgets,J=>(C(),ve(c(xM),{height:"40",width:"130",resizable:!0,data:J,fixed:J.type==="index",prop:J.id,key:J.fake_id,"show-overflow-tooltip":!1},Ia({_:2},[J.type==="index"?{name:"header",fn:H(()=>[w("div",{class:"sort-cell",onClick:k},[Fe(" 序号 "),w("span",{class:B(["icon iconfont icon-form-sort",{active:he.order_type==="asc"}])},null,2)])]),key:"0"}:{name:"header",fn:H(()=>[O(sa,{content:J.attrs.title},{default:H(()=>[Fe(ie(J.attrs.title),1)]),_:2},1032,["content"])]),key:"1"},J.type==="index"?{name:"default",fn:H(({row:oe})=>[w("div",$Ke,ie(oe.fake_id),1)]),key:"2"}:void 0,s.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:E(oe,J)},{default:H(()=>[Fe(ie(E(oe,J)),1)]),_:2},1032,["content"])]),key:"3"}:void 0,i.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:T(oe,J)},{default:H(()=>[Fe(ie(T(oe,J)),1)]),_:2},1032,["content"])]),key:"4"}:void 0,l.includes(J.type)?{name:"default",fn:H(({row:oe})=>[w("div",CKe,[O(sa,{content:L(oe,J)},{default:H(()=>[Fe(ie(L(oe,J)),1)]),_:2},1032,["content"])])]),key:"5"}:void 0,f.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:j(oe,J)},{default:H(()=>[Fe(ie(j(oe,J)),1)]),_:2},1032,["content"])]),key:"6"}:void 0,d.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:F(oe,J)},{default:H(()=>[Fe(ie(F(oe,J)),1)]),_:2},1032,["content"])]),key:"7"}:void 0,p.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:X(oe,J)},{default:H(()=>[Fe(ie(X(oe,J)),1)]),_:2},1032,["content"])]),key:"8"}:void 0,h.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:U(oe,J)},{default:H(()=>[Fe(ie(U(oe,J)),1)]),_:2},1032,["content"])]),key:"9"}:void 0,m.includes(J.type)?{name:"default",fn:H(({row:oe})=>[w("div",SKe,[z(oe,J)?(C(!0),A(Ae,{key:0},et(z(oe,J),(_e,ge)=>(C(),A(Ae,{key:_e.value},[ge!==0?(C(),A("span",EKe,",")):G("",!0),w("img",{src:_e.url},null,8,kKe),w("span",null,ie(_e.label),1)],64))),128)):(C(),A(Ae,{key:1},[Fe("-")],64))])]),key:"10"}:void 0,b.includes(J.type)?{name:"default",fn:H(({row:oe})=>[W(oe,J)?(C(),A("div",IKe,[(C(!0),A(Ae,null,et(W(oe,J),_e=>(C(),A("div",{class:"file-item",key:_e.id,onClick:ge=>D(_e)},[O(c(_o),{content:_e.name,placement:"top"},{default:H(()=>[c(Sm)(_e.url)==="img"?(C(),A("img",{key:0,src:_e.url,"preview-src-list":[_e.url],alt:""},null,8,xKe)):(C(),ve(ue,{key:1,class:"file-icon",name:c(Sm)(_e.url)},null,8,["name"]))]),_:2},1032,["content"])],8,TKe))),128))])):G("",!0)]),key:"11"}:void 0,g.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(c(Yc),{trigger:"hover",width:"325","popper-class":"geolocation-popover",disabled:!oe.answer[J.id]},{reference:H(()=>{var _e;return[w("div",{class:"cell-content",onMouseenter:ge=>a.value.set(oe.fake_id,!0)},[w("span",null,ie(((_e=oe.answer[J.id])==null?void 0:_e.address)||"-"),1)],40,MKe)]}),default:H(()=>{var _e,ge,Me;return[a.value.has(oe.fake_id)?(C(),A("div",AKe,[w("div",OKe,[DKe,Fe(" "+ie((_e=oe.answer[J.id])==null?void 0:_e.address),1)]),w("div",PKe,"经度:"+ie((ge=oe.answer[J.id])==null?void 0:ge.lat)+" 纬度:"+ie((Me=oe.answer[J.id])==null?void 0:Me.lng),1),O(c(fM),{class:"image",src:q(oe.answer[J.id])},null,8,["src"])])):G("",!0)]}),_:2},1032,["disabled"])]),key:"12"}:void 0,J.type==="total"?{name:"default",fn:H(({row:oe})=>[w("div",{class:"edu-total-scope",onClick:_e=>N(oe)},ie(S(oe)),9,NKe)]),key:"13"}:void 0,y.includes(J.type)?{name:"default",fn:H(({row:oe})=>[O(sa,{content:Q(oe,J)},{default:H(()=>[Fe(ie(Q(oe,J)),1)]),_:2},1032,["content"])]),key:"14"}:void 0,J.type==="appointStatus"?{name:"default",fn:H(({row:oe})=>[Fe(ie(ye(oe)),1)]),key:"15"}:void 0,J.type==="appoint"?{name:"default",fn:H(({row:oe})=>[O(sa,{content:ce(oe,J)},{default:H(()=>[Fe(ie(ce(oe,J)),1)]),_:2},1032,["content"])]),key:"16"}:void 0,J.type==="appointOperate"?{name:"default",fn:H(({row:oe})=>[ye(oe)==="已预约"?(C(),ve(c(Wt),{key:0,type:"primary",link:"",onClick:_e=>Y(oe)},{default:H(()=>[Fe(" 取消预约 ")]),_:2},1032,["onClick"])):G("",!0)]),key:"17"}:void 0,J.type==="gainTotalPrice"?{name:"default",fn:H(({row:oe})=>[O(sa,{content:x(oe)},{default:H(()=>[Fe(ie(x(oe)),1)]),_:2},1032,["content"])]),key:"18"}:void 0,J.type==="gainGradeNumber"?{name:"default",fn:H(({row:oe})=>[O(sa,{content:oe.transaction_id},{default:H(()=>[Fe(ie(oe.transaction_id),1)]),_:2},1032,["content"])]),key:"19"}:void 0,J.type==="gainGradeStatus"?{name:"default",fn:H(({row:oe})=>[O(sa,{content:oe.order_status_str},{default:H(()=>[Fe(ie(oe.order_status_str),1)]),_:2},1032,["content"])]),key:"20"}:void 0,J.type==="nickname"&&_.value?{name:"default",fn:H(({row:oe})=>[oe.meta_info.userInfo?(C(),ve(sa,{key:0,content:oe.meta_info.userInfo.nickname??""},{default:H(()=>[oe.meta_info.userInfo.headimgurl?(C(),A("img",{key:0,style:{width:"18px","border-radius":"50%"},src:oe.meta_info.userInfo.headimgurl},null,8,RKe)):G("",!0),Fe(" "+ie(oe.meta_info.userInfo.nickname??""),1)]),_:2},1032,["content"])):G("",!0)]),key:"21"}:void 0,J.type==="openid"&&_.value?{name:"default",fn:H(({row:oe})=>[oe.meta_info.userInfo?(C(),ve(sa,{key:0,content:oe.meta_info.userInfo.openid??""},{default:H(()=>[Fe(ie(oe.meta_info.userInfo.openid??""),1)]),_:2},1032,["content"])):G("",!0)]),key:"22"}:void 0]),1032,["data","fixed","prop"]))),128))]),_:1},8,["data"]),O(c(Ga),{modelValue:o.value,"onUpdate:modelValue":le[1]||(le[1]=J=>o.value=J),width:"400px"},{header:H(()=>[LKe]),footer:H(()=>[w("div",BKe,[O(c(Wt),{onClick:le[0]||(le[0]=J=>o.value=!1)},{default:H(()=>[Fe("暂不取消")]),_:1}),O(c(Wt),{type:"primary",onClick:Z},{default:H(()=>[Fe(" 取消预约 ")]),_:1})])]),default:H(()=>[FKe]),_:1},8,["modelValue"])])}}}),W6=Ye(VKe,[["__scopeId","data-v-acc8d1e5"]]),zKe={class:"search-result-page"},jKe={key:0,class:"title-text"},UKe={key:2,class:"empty-table"},WKe=se({__name:"Result",props:{searchWidgets:{},searchInfo:{},widgets:{},formId:{}},setup(e){const t=e,n=P("fake_id"),o=P("desc"),a=P(1),r=P(30),s=exports.globalInject.getRoute().query,i=P({...s,id:void 0,tab:void 0,chain:void 0}),l=M(()=>t.widgets.filter(m=>t.searchInfo.show_config.find(b=>m.id===b.id))||[]);function d(m){a.value=m}function f(m){r.value=m}let{dataList:p,total:h}=Gqe(n,o,a,r,i,t.formId);return(m,b)=>(C(),A("div",zKe,[m.searchInfo.type===2?(C(),A("div",jKe)):G("",!0),c(p).length?(C(),ve(W6,{key:1,class:"data-table-container",dataList:c(p),widgets:l.value,disabled:!0,order_type:o.value,"onUpdate:order_type":b[0]||(b[0]=g=>o.value=g)},null,8,["dataList","widgets","order_type"])):(C(),A("div",UKe," 没有查询到结果,请确认所填信息正确 ")),c(h)?(C(),ve(c(mM),{key:3,background:!0,"current-page":a.value,"onUpdate:currentPage":b[1]||(b[1]=g=>a.value=g),"page-size":r.value,"onUpdate:pageSize":b[2]||(b[2]=g=>r.value=g),"page-sizes":[10,20,30,50],small:!0,total:c(h),layout:"prev, pager, next, sizes",onSizeChange:f,onCurrentChange:d,class:"pagination-container"},null,8,["current-page","page-size","total"])):G("",!0)]))}}),HKe=Ye(WKe,[["__scopeId","data-v-c32a4997"]]),Sb=e=>(At("data-v-2ff1d313"),e=e(),Ot(),e),qKe={key:0,class:"password-page"},KKe=Sb(()=>w("div",{class:"title"},"输入密码才能查询",-1)),YKe=Sb(()=>w("div",{class:"des-title"},"如没密码或密码不正确,请向表单管理员索取",-1)),GKe={class:"error-text"},QKe={key:1,class:"error-page"},JKe=["src"],XKe=Sb(()=>w("div",{class:"main-text"},"对不起,当前链接无法访问",-1)),ZKe=Sb(()=>w("div",{class:"des-text"},"请联系管理员",-1)),eYe=se({__name:"Interpage",props:{errInfo:{}},emits:["confirmPassword"],setup(e,{emit:t}){const n=e;console.log("props: ",n);const o=M(()=>n.errInfo.status===4009?"密码错误":""),a=t,r=P("");function s(){a("confirmPassword",r.value)}return(i,l)=>[4008,4009].includes(i.errInfo.status)?(C(),A("div",qKe,[KKe,YKe,O(c(Pt),{class:B({"error-input":o.value}),type:"password",modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=d=>r.value=d),"show-password":!0},{prefix:H(()=>[w("span",{class:B([{"error-text":o.value},"icon iconfont icon-form-lock"])},null,2)]),_:1},8,["class","modelValue"]),w("div",GKe,ie(o.value),1),O(c(Wt),{class:"confirm-btn",size:"large",type:"primary",onClick:s},{default:H(()=>[Fe("验证并搜索")]),_:1})])):(C(),A("div",QKe,[w("img",{src:`${c(Hn)}/images/search-error.png`,class:"error-img",alt:""},null,8,JKe),XKe,ZKe]))}}),tYe=Ye(eYe,[["__scopeId","data-v-2ff1d313"]]),nYe={key:1,class:"container"},oYe=se({__name:"index",setup(e){const t=P(!0),n=P(),o=P(""),a=P(""),r=P(0),s=P(null),i=P(1);function l(_){r.value=1,ot(()=>{const I=exports.globalInject.getRouter(),k=exports.globalInject.getRoute();I.replace({query:{tab:"2",id:h.value.form_id,..._,chain:k.query.chain}}).catch(E=>{E.name!=="NavigationDuplicated"&&console.error(E)}).finally(()=>{r.value=2})})}const{chain:d}=exports.globalInject.getRoute().query,f=P([]),p=P([]),h=P({extra:{},form_id:""});d&&b(d);function m(_){b(d,btoa(unescape(encodeURIComponent(_))))}async function b(_,I=""){let k=await F9e(_,I);if(k.status!==1){t.value=!1,s.value=k,k.status===4009&&ht.error(k.msg);return}h.value=k.result,a.value=k.result.form_id;let E=await W9e(k.result.form_id);if(E.status===1)o.value=E.result.header.attrs.title,s.value=null,t.value=!1;else{t.value=!1,s.value={status:5002};return}if(f.value=Gm(E.result.widgets),i.value=k.result.type,k.result.type===2){r.value=2;return}let{status:T,result:x}=j6(k.result,f.value);T===200?(p.value=x,r.value=1):s.value={status:T}}const{width:g}=cb(n),y=M(()=>g.value<700);return Tt("isMobileSize",y),(_,I)=>{const k=rl("loading");return Et((C(),A("div",{ref_key:"searchPageRef",ref:n,class:"search-page"},[s.value?(C(),ve(tYe,{key:0,onConfirmPassword:m,errInfo:s.value},null,8,["errInfo"])):(C(),A("div",nYe,[[1,2].includes(r.value)?(C(),ve(mKe,{key:0,onGoSearch:l,searchType:i.value,searchInfo:h.value,formTitle:o.value,tab:r.value,searchWidgets:p.value},null,8,["searchType","searchInfo","formTitle","tab","searchWidgets"])):G("",!0),r.value==2?(C(),ve(HKe,{key:1,searchType:i.value,searchInfo:h.value,widgets:f.value,formId:a.value,searchWidgets:p.value},null,8,["searchType","searchInfo","widgets","formId","searchWidgets"])):G("",!0)]))])),[[k,t.value]])}}}),aYe=Ye(oYe,[["__scopeId","data-v-dd54375b"]]),rYe=se({__name:"App",props:{formId:{}},setup(e){return(t,n)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":1888},{default:H(()=>[O(aYe)]),_:1},8,["locale"]))}}),sYe=e=>{const t=si(rYe,e);return id(t),t},iYe=e=>{switch(e){case"2077":return{url:"https://static.bmwax.cn/form_static/images/url-illegal-bg.png",title:"该网址存在安全风险,无法跳转",des:"",btnText:"创建我的表单",handleClick:()=>{Xu("/")}};case"2078":return{url:"https://static.bmwax.cn/form_static/images/url-pendding-bg.png",title:"此网址正在审核中",des:"大约需要 1 小时,请您耐心等待",btnText:"创建我的表单",handleClick:()=>{Xu("/")}};default:return Xu("/404"),{url:"",title:"",des:"",btnText:"",handleClick:()=>{Xu("")}}}},lYe={class:"content"},uYe=["src"],cYe={key:1,class:"title-text"},dYe={key:2,class:"des-text"},fYe=se({__name:"App",props:{code:{}},setup(e){const t=e;let{url:n,des:o,title:a,btnText:r,handleClick:s}=iYe(t.code);return(i,l)=>(C(),ve(c(Cs),{namespace:"bmwfr",locale:c(sd),"z-index":1888},{default:H(()=>[w("div",lYe,[c(n)?(C(),A("img",{key:0,src:c(n),alt:""},null,8,uYe)):G("",!0),c(a)?(C(),A("div",cYe,ie(c(a)),1)):G("",!0),c(o)?(C(),A("div",dYe,ie(c(o)),1)):G("",!0),c(r)?(C(),ve(c(Wt),{key:3,class:"main-btn",type:"primary",onClick:c(s)},{default:H(()=>[Fe(ie(c(r)),1)]),_:1},8,["onClick"])):G("",!0)])]),_:1},8,["locale"]))}}),pYe=Ye(fYe,[["__scopeId","data-v-05126dba"]]),vYe=e=>{const t=si(pYe,e);return id(t),t},hYe=()=>{const e=document.createElement("script");e.src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js",e.onload=()=>{console.log("WeChat SDK loaded")},e.onerror=()=>{console.error("Failed to load WeChat SDK")},document.head.appendChild(e)};st(()=>{console.log("mounted"),hYe()});exports.CHANGE_EVENT=Xs;exports.CacheDialog=z6;exports.ChoosenView=lo;exports.ClickOutside=$c;exports.CommonSetting=Sr;exports.ConfirmDialog=m8;exports.DataTable=W6;exports.DefaultDescAttrs=GN;exports.EVENT_CODE=Mt;exports.ElButton=Wt;exports.ElButtonGroup=sP;exports.ElCheckbox=Xo;exports.ElConfigProvider=Cs;exports.ElDatePicker=wm;exports.ElDialog=Ga;exports.ElDivider=Q_;exports.ElDropdown=cM;exports.ElDropdownMenu=dM;exports.ElIcon=lt;exports.ElInput=Pt;exports.ElInputNumber=ka;exports.ElMessage=ht;exports.ElOption=qs;exports.ElPagination=mM;exports.ElPopover=Yc;exports.ElProgress=Rg;exports.ElRadio=Df;exports.ElRadioButton=U_;exports.ElRadioGroup=Pf;exports.ElScrollbar=du;exports.ElSelect=Hs;exports.ElSwitch=Jl;exports.ElTabPane=zr;exports.ElTable=TM;exports.ElTableColumn=xM;exports.ElTabs=Fg;exports.ElTag=zP;exports.ElTimePicker=Pg;exports.ElTooltip=_o;exports.ElUpload=Gc;exports.FormSetting=gt;exports.Fragment=Ae;exports.LinkTab=KN;exports.SceneType=ac;exports.Tab=jl;exports.TinyColor=aP;exports.Transition=ta;exports.UPDATE_MODEL_EVENT=yn;exports.VerifyTip=To;exports.Vt=Ir;exports.WidgetList=vS;exports._Set=t3;exports._SetCache=dw;exports._arrayIncludes=d3;exports._arrayIncludesWith=f3;exports._baseFlatten=v3;exports._baseIteratee=A$;exports._baseRest=mw;exports._cacheHas=fw;exports._export_sfc=Ye;exports._export_sfc$1=dt;exports._setToArray=l3;exports._sfc_main=Kn;exports._sfc_main$1=eo;exports._sfc_main$2=ao;exports._sfc_main$3=mS;exports._sfc_main$4=QN;exports.acceptList=vb;exports.actionBtnOptions=vye;exports.activeWidget=zg;exports.activeWidgetAttrs=v8;exports.activeWidgetId=kn;exports.activeWidgetIndex=cwe;exports.activeWidgetInfo=dwe;exports.activeWidgetType=o1;exports.addClass=Ji;exports.addExtraLink=H9e;exports.addUnit=da;exports.addWidget=Zu;exports.answerTypeOptions=YM;exports.applyFormSetting=I$;exports.applyFrom=mb;exports.arrow_down_default=Hc;exports.arrow_right_default=qr;exports.arrow_up_default=Cg;exports.beforeExitWorksapce=Z9e;exports.browser=vl;exports.buildProps=it;exports.caret_right_default=bse;exports.changeCommonSetting=fye;exports.checkWidgets=o6;exports.cloneDeep=On;exports.cloneDeep$1=xp;exports.close_default=_s;exports.collectList=fb;exports.collectList$1=rye;exports.commonjsGlobal=io;exports.componentConfig=QC;exports.computed=M;exports.contactUsWidget=br;exports.copyText=Bbe;exports.createBaseVNode=w;exports.createBlock=ve;exports.createCommentVNode=G;exports.createElementBlock=A;exports.createFormAnswerApp=Yqe;exports.createFormErrorApp=vYe;exports.createFormInputApp=RHe;exports.createFormPreviewApp=FHe;exports.createFormSearchApp=sYe;exports.createOpenSearch=B9e;exports.createSlots=Ia;exports.createStaticVNode=y4;exports.createTextVNode=Fe;exports.createVNode=O;exports.createWidget=Wp;exports.createWorkspaceApp=Pze;exports.debounce=Yze;exports.debounce$1=Gi;exports.debugWarn=on;exports.defineAsyncComponent=An;exports.defineComponent=se;exports.definePropType=De;exports.deleteLink=K9e;exports.deleteOpenSearch=z9e;exports.errorWidgets=Tc;exports.eventBus=oS;exports.examWidgets=Rf;exports.flattedChildren=tf;exports.formItemContextKey=el;exports.formatFileSize=jM;exports.generateDefaultLinkAttr=YN;exports.generateUUID=at;exports.getAnswerListByD=Q9e;exports.getAppointmentTempUse=J9e;exports.getClientXY=Oee;exports.getCreateUid=L$;exports.getCurrentInstance=kt;exports.getDataList=gKe;exports.getDefaultExportFromCjs=vo;exports.getDefaultForm=A9e;exports.getDeviceId=S$;exports.getFileExtension=b$;exports.getForm=i6;exports.getFormName=Lf;exports.getGroupedIds=D$;exports.getImageUrl=Ke;exports.getLinkStatus=c6;exports.getList=q9e;exports.getOpenSearchList=U9e;exports.getRandomPhone=Fbe;exports.getRegion=uye;exports.getSceneFormTitle=C$;exports.getSceneType=xa;exports.getScenenName=tye;exports.getScoreTypes=l8;exports.getSearchWidget=j6;exports.getTemplate=l6;exports.getTotalTableColumn=Gm;exports.getWidgetRealIndex=a8;exports.groupName=M6;exports.groupedWidgets=km;exports.guardReactiveProps=lc;exports.h=_t;exports.hasClass=pr;exports.hasOwn=bs;exports.headerWidget=Io;exports.iconPropType=Do;exports.idMapping=R6;exports.infoConfig=JC;exports.inject=de;exports.inputWidgets=U6;exports.isArrayLikeObject_1=h3;exports.isClient=Qt;exports.isExamScene=$$;exports.isFormChanged=O$;exports.isFunction=mn;exports.isMobile=oye;exports.isMobileOrTablet=jbe;exports.isNil=Wa;exports.isObject=fo;exports.isPropAbsent=hc;exports.isRef=bn;exports.isScoreTypeDisabled=u8;exports.isShowAnalysis=n8;exports.isString=wn;exports.isWechatBrowser=qM;exports.isWxMiniProgram=iC;exports.loading_default=nu;exports.lodashExports=Xl;exports.mergeModels=Yi;exports.mergeProps=vn;exports.message=ds;exports.more_default=zse;exports.mutable=_r;exports.nextTick=ot;exports.noDisturbOptions=mye;exports.normalizeClass=B;exports.normalizeProps=hf;exports.normalizeStyle=Ze;exports.noticeModeOptions=hye;exports.numList=sye;exports.onActivated=Xf;exports.onBeforeMount=Rc;exports.onBeforeUnmount=Nn;exports.onDragMove=N6;exports.onMounted=st;exports.onUnmounted=po;exports.onUpdated=sl;exports.openBlock=C;exports.plus_default=Sg;exports.popScopeId=Ot;exports.provide=Tt;exports.pushScopeId=At;exports.putOpenSearch=V9e;exports.radioWidgets=k1;exports.reactive=gn;exports.ref=P;exports.removeClass=Qr;exports.render=Ha;exports.renderList=et;exports.renderSlot=xe;exports.resetSettingOldData=_ye;exports.resetWidgetsOldData=$9e;exports.resolveComponent=Bt;exports.resolveDirective=rl;exports.resolveDynamicComponent=Kt;exports.saveConfirm=t7e;exports.saveForm=eS;exports.saveOldSetting=Xc;exports.saveOldWidgets=Hp;exports.sceneConfigList=eye;exports.scrollToWidget=zf;exports.selectKey=bp;exports.select_default=__;exports.setActiveWidget=Vf;exports.setActiveWidgetRows=Cwe;exports.setAllRequired=wwe;exports.setCodeId=pU;exports.setDateAttrs=hwe;exports.setExtraData=vU;exports.setFormId=L4;exports.setGlobalInject=fU;exports.setJumpLink=Y9e;exports.setMapNavAttrs=Swe;exports.setMaxLength=pwe;exports.setMaxNum=_we;exports.setMinLength=fwe;exports.setMinNum=ywe;exports.setMultiplyAppoint=Ewe;exports.setMultiplyAvail=Iwe;exports.setMultiplyQuota=kwe;exports.setOpenSearchStatus=j9e;exports.setOptionRandom=$we;exports.setPageHeaderAttrs=vwe;exports.setPlaceholder=mwe;exports.setPrefixStock=Twe;exports.setRatingAttrs=a1;exports.setSuffixStock=xwe;exports.setViewVoteRate=Ep;exports.setWidgetAttrs=Xt;exports.shallowRef=Ua;exports.shortUrl=$a;exports.sizeList=pb;exports.staticPrefix=Hn;exports.storage=M$;exports.throwError=Ka;exports.timeList=iye;exports.timeList2=lye;exports.toDisplayString=ie;exports.toHandlers=Fz;exports.toNumber=G1e;exports.toRaw=wt;exports.toRef=_n;exports.toRefs=wo;exports.triggerEvent=YZ;exports.unref=c;exports.updateSetting=s6;exports.useAriaProps=Er;exports.useClipboard=ub;exports.useConfirm=ul;exports.useElementSize=cb;exports.useEventListener=Xn;exports.useFocusController=Gw;exports.useFormDisabled=kr;exports.useFormItem=ts;exports.useFormItemInputId=cu;exports.useFormSize=ea;exports.useGeolocation=S6e;exports.useJSONP=WN;exports.useLocale=pn;exports.useModel=Gr;exports.useNamespace=Xe;exports.useQRCode=wb;exports.useResizeObserver=jo;exports.useScroll=E6e;exports.useSizeProp=Ya;exports.useTimeoutFn=fm;exports.useTooltipContentProps=wa;exports.usedStorage=Vg;exports.vModelText=D4;exports.vShow=nn;exports.verifyFormData=cye;exports.watch=Se;exports.watchEffect=Zo;exports.watchOnce=_6e;exports.widgets=nt;exports.withCtx=H;exports.withDirectives=Et;exports.withInstall=fn;exports.withKeys=Ln;exports.withModifiers=mt;exports.withNoopInstall=Ta;