UNPKG

jobsys-newbie

Version:

Enhanced component based on ant-design-vue

9,620 lines 442 kB
import { defineComponent as Pe, reactive as qe, watch as oe, createVNode as u, mergeProps as H, ref as z, shallowRef as It, onMounted as tn, toRaw as ed, createElementBlock as Tt, openBlock as At, watchEffect as vo, provide as En, inject as pn, onBeforeUnmount as nd, nextTick as hn, withModifiers as Fe, isVNode as Re, computed as J, getCurrentInstance as Nt, unref as $t, getCurrentScope as Mt, onScopeDispose as jt, toRef as yo, readonly as Lt, customRef as bo, isRef as ad, toRefs as od, createTextVNode as xe, resolveComponent as wo, TransitionGroup as zt, h as Z, Transition as td } from "vue";
import { Cascader as ko, Button as re, Form as Ta, message as ge, DatePicker as Rt, RangePicker as Bt, TimePicker as Ut, TimeRangePicker as Vt, Input as Tn, Tag as Oe, Select as Mn, TreeSelect as cd, Spin as Ft, InputNumber as ka, Switch as ta, RadioGroup as Aa, CheckboxGroup as Kt, Upload as dd, ImagePreviewGroup as ld, Image as Ht, Modal as en, Drawer as rd, Space as An, Textarea as ha, CheckableTag as id, Transfer as sd, Tooltip as Ye, TypographyText as ud, Dropdown as Co, Menu as So, MenuItem as Xn, Card as xo, Row as Dn, Col as un, Checkbox as Eo, Divider as Cn, Table as ca, Flex as md, TableSummaryRow as fd, TableSummaryCell as pd, FormItemRest as Bn, Popconfirm as hd, Rate as gd, Radio as Wt, FormItem as ao, Affix as vd, Skeleton as yd, List as bd, InputPassword as wd, Empty as kd, Alert as Xo } from "ant-design-vue";
import { u as gn, a as da, b as I, c as jn, d as Cd, e as Ba, f as Sd, g as Oo, h as Po, S as xd, i as ze, j as qo, k as rn, l as Ca, m as Ed, n as Od, o as Pd, p as _d, _ as Dd } from "./i18n-_3sLFN0p.js";
import pe from "dayjs";
import { isNull as oo, isUndefined as ne, isFunction as j, isArray as ye, isObject as Ke, isString as se, isNumber as fe, debounce as Id, isEqual as Ln, map as Qo, random as Td, pick as to, every as Sn, find as ve, findIndex as Yt, concat as Ad, isBoolean as Sa, cloneDeep as Ce, orderBy as Ua, remove as Nd, sum as $d, uniq as Go } from "lodash-es";
import "axios";
import { PlusOutlined as Xt, CloudUploadOutlined as Zo, CloseOutlined as Jo, CompressOutlined as Md, ExpandOutlined as jd, MenuOutlined as Ld, RiseOutlined as qt, FallOutlined as Qt, DeleteOutlined as co, DownOutlined as _o, ShrinkOutlined as zd, ArrowsAltOutlined as Rd, ClearOutlined as Bd, OrderedListOutlined as Ud, SearchOutlined as Vd, SyncOutlined as Fd, InfoCircleOutlined as et, CheckCircleOutlined as Fn, CloseCircleOutlined as Kd, EditOutlined as lo, PictureOutlined as Hd, FilePdfOutlined as Gt, RightOutlined as Wd, CheckSquareOutlined as sa, DownSquareOutlined as Yd, SwitcherOutlined as Xd, FileImageOutlined as qd, FormOutlined as Qd, CalendarOutlined as nt, ClockCircleOutlined as at, FieldBinaryOutlined as Gd, StarOutlined as Zd, NumberOutlined as Jd, UserOutlined as el, SmileFilled as nl, MobileOutlined as al, MailOutlined as ol, EnvironmentOutlined as tl, SaveOutlined as cl, SmileTwoTone as dl, DragOutlined as ll } from "@ant-design/icons-vue";
const rl = /* @__PURE__ */ JSON.parse('[{"code":"440000","name":"广东省","children":[{"code":"440100","name":"广州市","children":[{"code":"440103","name":"荔湾区"},{"code":"440104","name":"越秀区"},{"code":"440105","name":"海珠区"},{"code":"440106","name":"天河区"},{"code":"440111","name":"白云区"},{"code":"440112","name":"黄埔区"},{"code":"440113","name":"番禺区"},{"code":"440114","name":"花都区"},{"code":"440115","name":"南沙区"},{"code":"440117","name":"从化区"},{"code":"440118","name":"增城区"}]},{"code":"440200","name":"韶关市","children":[{"code":"440203","name":"武江区"},{"code":"440204","name":"浈江区"},{"code":"440205","name":"曲江区"},{"code":"440222","name":"始兴县"},{"code":"440224","name":"仁化县"},{"code":"440229","name":"翁源县"},{"code":"440232","name":"乳源瑶族自治县"},{"code":"440233","name":"新丰县"},{"code":"440281","name":"乐昌市"},{"code":"440282","name":"南雄市"}]},{"code":"440300","name":"深圳市","children":[{"code":"440303","name":"罗湖区"},{"code":"440304","name":"福田区"},{"code":"440305","name":"南山区"},{"code":"440306","name":"宝安区"},{"code":"440307","name":"龙岗区"},{"code":"440308","name":"盐田区"},{"code":"440309","name":"龙华区"},{"code":"440310","name":"坪山区"},{"code":"440311","name":"光明区"}]},{"code":"440400","name":"珠海市","children":[{"code":"440402","name":"香洲区"},{"code":"440403","name":"斗门区"},{"code":"440404","name":"金湾区"}]},{"code":"440500","name":"汕头市","children":[{"code":"440507","name":"龙湖区"},{"code":"440511","name":"金平区"},{"code":"440512","name":"濠江区"},{"code":"440513","name":"潮阳区"},{"code":"440514","name":"潮南区"},{"code":"440515","name":"澄海区"},{"code":"440523","name":"南澳县"}]},{"code":"440600","name":"佛山市","children":[{"code":"440604","name":"禅城区"},{"code":"440605","name":"南海区"},{"code":"440606","name":"顺德区"},{"code":"440607","name":"三水区"},{"code":"440608","name":"高明区"}]},{"code":"440700","name":"江门市","children":[{"code":"440703","name":"蓬江区"},{"code":"440704","name":"江海区"},{"code":"440705","name":"新会区"},{"code":"440781","name":"台山市"},{"code":"440783","name":"开平市"},{"code":"440784","name":"鹤山市"},{"code":"440785","name":"恩平市"}]},{"code":"440800","name":"湛江市","children":[{"code":"440802","name":"赤坎区"},{"code":"440803","name":"霞山区"},{"code":"440804","name":"坡头区"},{"code":"440811","name":"麻章区"},{"code":"440823","name":"遂溪县"},{"code":"440825","name":"徐闻县"},{"code":"440881","name":"廉江市"},{"code":"440882","name":"雷州市"},{"code":"440883","name":"吴川市"}]},{"code":"440900","name":"茂名市","children":[{"code":"440902","name":"茂南区"},{"code":"440904","name":"电白区"},{"code":"440981","name":"高州市"},{"code":"440982","name":"化州市"},{"code":"440983","name":"信宜市"}]},{"code":"441200","name":"肇庆市","children":[{"code":"441202","name":"端州区"},{"code":"441203","name":"鼎湖区"},{"code":"441204","name":"高要区"},{"code":"441223","name":"广宁县"},{"code":"441224","name":"怀集县"},{"code":"441225","name":"封开县"},{"code":"441226","name":"德庆县"},{"code":"441284","name":"四会市"}]},{"code":"441300","name":"惠州市","children":[{"code":"441302","name":"惠城区"},{"code":"441303","name":"惠阳区"},{"code":"441322","name":"博罗县"},{"code":"441323","name":"惠东县"},{"code":"441324","name":"龙门县"}]},{"code":"441400","name":"梅州市","children":[{"code":"441402","name":"梅江区"},{"code":"441403","name":"梅县区"},{"code":"441422","name":"大埔县"},{"code":"441423","name":"丰顺县"},{"code":"441424","name":"五华县"},{"code":"441426","name":"平远县"},{"code":"441427","name":"蕉岭县"},{"code":"441481","name":"兴宁市"}]},{"code":"441500","name":"汕尾市","children":[{"code":"441502","name":"城区"},{"code":"441521","name":"海丰县"},{"code":"441523","name":"陆河县"},{"code":"441581","name":"陆丰市"}]},{"code":"441600","name":"河源市","children":[{"code":"441602","name":"源城区"},{"code":"441621","name":"紫金县"},{"code":"441622","name":"龙川县"},{"code":"441623","name":"连平县"},{"code":"441624","name":"和平县"},{"code":"441625","name":"东源县"}]},{"code":"441700","name":"阳江市","children":[{"code":"441702","name":"江城区"},{"code":"441704","name":"阳东区"},{"code":"441721","name":"阳西县"},{"code":"441781","name":"阳春市"}]},{"code":"441800","name":"清远市","children":[{"code":"441802","name":"清城区"},{"code":"441803","name":"清新区"},{"code":"441821","name":"佛冈县"},{"code":"441823","name":"阳山县"},{"code":"441825","name":"连山壮族瑶族自治县"},{"code":"441826","name":"连南瑶族自治县"},{"code":"441881","name":"英德市"},{"code":"441882","name":"连州市"}]},{"code":"441900","name":"东莞市","children":[{"code":"441900003","name":"东城街道"},{"code":"441900004","name":"南城街道"},{"code":"441900005","name":"万江街道"},{"code":"441900006","name":"莞城街道"},{"code":"441900101","name":"石碣镇"},{"code":"441900102","name":"石龙镇"},{"code":"441900103","name":"茶山镇"},{"code":"441900104","name":"石排镇"},{"code":"441900105","name":"企石镇"},{"code":"441900106","name":"横沥镇"},{"code":"441900107","name":"桥头镇"},{"code":"441900108","name":"谢岗镇"},{"code":"441900109","name":"东坑镇"},{"code":"441900110","name":"常平镇"},{"code":"441900111","name":"寮步镇"},{"code":"441900112","name":"樟木头镇"},{"code":"441900113","name":"大朗镇"},{"code":"441900114","name":"黄江镇"},{"code":"441900115","name":"清溪镇"},{"code":"441900116","name":"塘厦镇"},{"code":"441900117","name":"凤岗镇"},{"code":"441900118","name":"大岭山镇"},{"code":"441900119","name":"长安镇"},{"code":"441900121","name":"虎门镇"},{"code":"441900122","name":"厚街镇"},{"code":"441900123","name":"沙田镇"},{"code":"441900124","name":"道滘镇"},{"code":"441900125","name":"洪梅镇"},{"code":"441900126","name":"麻涌镇"},{"code":"441900127","name":"望牛墩镇"},{"code":"441900128","name":"中堂镇"},{"code":"441900129","name":"高埗镇"},{"code":"441900401","name":"松山湖"},{"code":"441900402","name":"东莞港"},{"code":"441900403","name":"东莞生态园"},{"code":"441900404","name":"东莞滨海湾新区"}]},{"code":"442000","name":"中山市","children":[{"code":"442000001","name":"石岐街道"},{"code":"442000002","name":"东区街道"},{"code":"442000003","name":"中山港街道"},{"code":"442000004","name":"西区街道"},{"code":"442000005","name":"南区街道"},{"code":"442000006","name":"五桂山街道"},{"code":"442000007","name":"民众街道"},{"code":"442000008","name":"南朗街道"},{"code":"442000101","name":"黄圃镇"},{"code":"442000103","name":"东凤镇"},{"code":"442000105","name":"古镇镇"},{"code":"442000106","name":"沙溪镇"},{"code":"442000107","name":"坦洲镇"},{"code":"442000108","name":"港口镇"},{"code":"442000109","name":"三角镇"},{"code":"442000110","name":"横栏镇"},{"code":"442000111","name":"南头镇"},{"code":"442000112","name":"阜沙镇"},{"code":"442000114","name":"三乡镇"},{"code":"442000115","name":"板芙镇"},{"code":"442000116","name":"大涌镇"},{"code":"442000117","name":"神湾镇"},{"code":"442000118","name":"小榄镇"}]},{"code":"445100","name":"潮州市","children":[{"code":"445102","name":"湘桥区"},{"code":"445103","name":"潮安区"},{"code":"445122","name":"饶平县"}]},{"code":"445200","name":"揭阳市","children":[{"code":"445202","name":"榕城区"},{"code":"445203","name":"揭东区"},{"code":"445222","name":"揭西县"},{"code":"445224","name":"惠来县"},{"code":"445281","name":"普宁市"}]},{"code":"445300","name":"云浮市","children":[{"code":"445302","name":"云城区"},{"code":"445303","name":"云安区"},{"code":"445321","name":"新兴县"},{"code":"445322","name":"郁南县"},{"code":"445381","name":"罗定市"}]}]},{"code":"110000","name":"北京市","children":[{"code":"110100","name":"市辖区","children":[{"code":"110101","name":"东城区"},{"code":"110102","name":"西城区"},{"code":"110105","name":"朝阳区"},{"code":"110106","name":"丰台区"},{"code":"110107","name":"石景山区"},{"code":"110108","name":"海淀区"},{"code":"110109","name":"门头沟区"},{"code":"110111","name":"房山区"},{"code":"110112","name":"通州区"},{"code":"110113","name":"顺义区"},{"code":"110114","name":"昌平区"},{"code":"110115","name":"大兴区"},{"code":"110116","name":"怀柔区"},{"code":"110117","name":"平谷区"},{"code":"110118","name":"密云区"},{"code":"110119","name":"延庆区"}]}]},{"code":"120000","name":"天津市","children":[{"code":"120100","name":"市辖区","children":[{"code":"120101","name":"和平区"},{"code":"120102","name":"河东区"},{"code":"120103","name":"河西区"},{"code":"120104","name":"南开区"},{"code":"120105","name":"河北区"},{"code":"120106","name":"红桥区"},{"code":"120110","name":"东丽区"},{"code":"120111","name":"西青区"},{"code":"120112","name":"津南区"},{"code":"120113","name":"北辰区"},{"code":"120114","name":"武清区"},{"code":"120115","name":"宝坻区"},{"code":"120116","name":"滨海新区"},{"code":"120117","name":"宁河区"},{"code":"120118","name":"静海区"},{"code":"120119","name":"蓟州区"}]}]},{"code":"130000","name":"河北省","children":[{"code":"130100","name":"石家庄市","children":[{"code":"130102","name":"长安区"},{"code":"130104","name":"桥西区"},{"code":"130105","name":"新华区"},{"code":"130107","name":"井陉矿区"},{"code":"130108","name":"裕华区"},{"code":"130109","name":"藁城区"},{"code":"130110","name":"鹿泉区"},{"code":"130111","name":"栾城区"},{"code":"130121","name":"井陉县"},{"code":"130123","name":"正定县"},{"code":"130125","name":"行唐县"},{"code":"130126","name":"灵寿县"},{"code":"130127","name":"高邑县"},{"code":"130128","name":"深泽县"},{"code":"130129","name":"赞皇县"},{"code":"130130","name":"无极县"},{"code":"130131","name":"平山县"},{"code":"130132","name":"元氏县"},{"code":"130133","name":"赵县"},{"code":"130171","name":"石家庄高新技术产业开发区"},{"code":"130172","name":"石家庄循环化工园区"},{"code":"130181","name":"辛集市"},{"code":"130183","name":"晋州市"},{"code":"130184","name":"新乐市"}]},{"code":"130200","name":"唐山市","children":[{"code":"130202","name":"路南区"},{"code":"130203","name":"路北区"},{"code":"130204","name":"古冶区"},{"code":"130205","name":"开平区"},{"code":"130207","name":"丰南区"},{"code":"130208","name":"丰润区"},{"code":"130209","name":"曹妃甸区"},{"code":"130224","name":"滦南县"},{"code":"130225","name":"乐亭县"},{"code":"130227","name":"迁西县"},{"code":"130229","name":"玉田县"},{"code":"130271","name":"河北唐山芦台经济开发区"},{"code":"130272","name":"唐山市汉沽管理区"},{"code":"130273","name":"唐山高新技术产业开发区"},{"code":"130274","name":"河北唐山海港经济开发区"},{"code":"130281","name":"遵化市"},{"code":"130283","name":"迁安市"},{"code":"130284","name":"滦州市"}]},{"code":"130300","name":"秦皇岛市","children":[{"code":"130302","name":"海港区"},{"code":"130303","name":"山海关区"},{"code":"130304","name":"北戴河区"},{"code":"130306","name":"抚宁区"},{"code":"130321","name":"青龙满族自治县"},{"code":"130322","name":"昌黎县"},{"code":"130324","name":"卢龙县"},{"code":"130371","name":"秦皇岛市经济技术开发区"},{"code":"130372","name":"北戴河新区"}]},{"code":"130400","name":"邯郸市","children":[{"code":"130402","name":"邯山区"},{"code":"130403","name":"丛台区"},{"code":"130404","name":"复兴区"},{"code":"130406","name":"峰峰矿区"},{"code":"130407","name":"肥乡区"},{"code":"130408","name":"永年区"},{"code":"130423","name":"临漳县"},{"code":"130424","name":"成安县"},{"code":"130425","name":"大名县"},{"code":"130426","name":"涉县"},{"code":"130427","name":"磁县"},{"code":"130430","name":"邱县"},{"code":"130431","name":"鸡泽县"},{"code":"130432","name":"广平县"},{"code":"130433","name":"馆陶县"},{"code":"130434","name":"魏县"},{"code":"130435","name":"曲周县"},{"code":"130471","name":"邯郸经济技术开发区"},{"code":"130473","name":"邯郸冀南新区"},{"code":"130481","name":"武安市"}]},{"code":"130500","name":"邢台市","children":[{"code":"130502","name":"襄都区"},{"code":"130503","name":"信都区"},{"code":"130505","name":"任泽区"},{"code":"130506","name":"南和区"},{"code":"130522","name":"临城县"},{"code":"130523","name":"内丘县"},{"code":"130524","name":"柏乡县"},{"code":"130525","name":"隆尧县"},{"code":"130528","name":"宁晋县"},{"code":"130529","name":"巨鹿县"},{"code":"130530","name":"新河县"},{"code":"130531","name":"广宗县"},{"code":"130532","name":"平乡县"},{"code":"130533","name":"威县"},{"code":"130534","name":"清河县"},{"code":"130535","name":"临西县"},{"code":"130571","name":"河北邢台经济开发区"},{"code":"130581","name":"南宫市"},{"code":"130582","name":"沙河市"}]},{"code":"130600","name":"保定市","children":[{"code":"130602","name":"竞秀区"},{"code":"130606","name":"莲池区"},{"code":"130607","name":"满城区"},{"code":"130608","name":"清苑区"},{"code":"130609","name":"徐水区"},{"code":"130623","name":"涞水县"},{"code":"130624","name":"阜平县"},{"code":"130626","name":"定兴县"},{"code":"130627","name":"唐县"},{"code":"130628","name":"高阳县"},{"code":"130629","name":"容城县"},{"code":"130630","name":"涞源县"},{"code":"130631","name":"望都县"},{"code":"130632","name":"安新县"},{"code":"130633","name":"易县"},{"code":"130634","name":"曲阳县"},{"code":"130635","name":"蠡县"},{"code":"130636","name":"顺平县"},{"code":"130637","name":"博野县"},{"code":"130638","name":"雄县"},{"code":"130671","name":"保定高新技术产业开发区"},{"code":"130672","name":"保定白沟新城"},{"code":"130681","name":"涿州市"},{"code":"130682","name":"定州市"},{"code":"130683","name":"安国市"},{"code":"130684","name":"高碑店市"}]},{"code":"130700","name":"张家口市","children":[{"code":"130702","name":"桥东区"},{"code":"130703","name":"桥西区"},{"code":"130705","name":"宣化区"},{"code":"130706","name":"下花园区"},{"code":"130708","name":"万全区"},{"code":"130709","name":"崇礼区"},{"code":"130722","name":"张北县"},{"code":"130723","name":"康保县"},{"code":"130724","name":"沽源县"},{"code":"130725","name":"尚义县"},{"code":"130726","name":"蔚县"},{"code":"130727","name":"阳原县"},{"code":"130728","name":"怀安县"},{"code":"130730","name":"怀来县"},{"code":"130731","name":"涿鹿县"},{"code":"130732","name":"赤城县"},{"code":"130771","name":"张家口经济开发区"},{"code":"130772","name":"张家口市察北管理区"},{"code":"130773","name":"张家口市塞北管理区"}]},{"code":"130800","name":"承德市","children":[{"code":"130802","name":"双桥区"},{"code":"130803","name":"双滦区"},{"code":"130804","name":"鹰手营子矿区"},{"code":"130821","name":"承德县"},{"code":"130822","name":"兴隆县"},{"code":"130824","name":"滦平县"},{"code":"130825","name":"隆化县"},{"code":"130826","name":"丰宁满族自治县"},{"code":"130827","name":"宽城满族自治县"},{"code":"130828","name":"围场满族蒙古族自治县"},{"code":"130871","name":"承德高新技术产业开发区"},{"code":"130881","name":"平泉市"}]},{"code":"130900","name":"沧州市","children":[{"code":"130902","name":"新华区"},{"code":"130903","name":"运河区"},{"code":"130921","name":"沧县"},{"code":"130922","name":"青县"},{"code":"130923","name":"东光县"},{"code":"130924","name":"海兴县"},{"code":"130925","name":"盐山县"},{"code":"130926","name":"肃宁县"},{"code":"130927","name":"南皮县"},{"code":"130928","name":"吴桥县"},{"code":"130929","name":"献县"},{"code":"130930","name":"孟村回族自治县"},{"code":"130971","name":"河北沧州经济开发区"},{"code":"130972","name":"沧州高新技术产业开发区"},{"code":"130973","name":"沧州渤海新区"},{"code":"130981","name":"泊头市"},{"code":"130982","name":"任丘市"},{"code":"130983","name":"黄骅市"},{"code":"130984","name":"河间市"}]},{"code":"131000","name":"廊坊市","children":[{"code":"131002","name":"安次区"},{"code":"131003","name":"广阳区"},{"code":"131022","name":"固安县"},{"code":"131023","name":"永清县"},{"code":"131024","name":"香河县"},{"code":"131025","name":"大城县"},{"code":"131026","name":"文安县"},{"code":"131028","name":"大厂回族自治县"},{"code":"131071","name":"廊坊经济技术开发区"},{"code":"131081","name":"霸州市"},{"code":"131082","name":"三河市"}]},{"code":"131100","name":"衡水市","children":[{"code":"131102","name":"桃城区"},{"code":"131103","name":"冀州区"},{"code":"131121","name":"枣强县"},{"code":"131122","name":"武邑县"},{"code":"131123","name":"武强县"},{"code":"131124","name":"饶阳县"},{"code":"131125","name":"安平县"},{"code":"131126","name":"故城县"},{"code":"131127","name":"景县"},{"code":"131128","name":"阜城县"},{"code":"131171","name":"河北衡水高新技术产业开发区"},{"code":"131172","name":"衡水滨湖新区"},{"code":"131182","name":"深州市"}]}]},{"code":"140000","name":"山西省","children":[{"code":"140100","name":"太原市","children":[{"code":"140105","name":"小店区"},{"code":"140106","name":"迎泽区"},{"code":"140107","name":"杏花岭区"},{"code":"140108","name":"尖草坪区"},{"code":"140109","name":"万柏林区"},{"code":"140110","name":"晋源区"},{"code":"140121","name":"清徐县"},{"code":"140122","name":"阳曲县"},{"code":"140123","name":"娄烦县"},{"code":"140171","name":"山西转型综合改革示范区"},{"code":"140181","name":"古交市"}]},{"code":"140200","name":"大同市","children":[{"code":"140212","name":"新荣区"},{"code":"140213","name":"平城区"},{"code":"140214","name":"云冈区"},{"code":"140215","name":"云州区"},{"code":"140221","name":"阳高县"},{"code":"140222","name":"天镇县"},{"code":"140223","name":"广灵县"},{"code":"140224","name":"灵丘县"},{"code":"140225","name":"浑源县"},{"code":"140226","name":"左云县"},{"code":"140271","name":"山西大同经济开发区"}]},{"code":"140300","name":"阳泉市","children":[{"code":"140302","name":"城区"},{"code":"140303","name":"矿区"},{"code":"140311","name":"郊区"},{"code":"140321","name":"平定县"},{"code":"140322","name":"盂县"}]},{"code":"140400","name":"长治市","children":[{"code":"140403","name":"潞州区"},{"code":"140404","name":"上党区"},{"code":"140405","name":"屯留区"},{"code":"140406","name":"潞城区"},{"code":"140423","name":"襄垣县"},{"code":"140425","name":"平顺县"},{"code":"140426","name":"黎城县"},{"code":"140427","name":"壶关县"},{"code":"140428","name":"长子县"},{"code":"140429","name":"武乡县"},{"code":"140430","name":"沁县"},{"code":"140431","name":"沁源县"},{"code":"140471","name":"山西长治高新技术产业园区"}]},{"code":"140500","name":"晋城市","children":[{"code":"140502","name":"城区"},{"code":"140521","name":"沁水县"},{"code":"140522","name":"阳城县"},{"code":"140524","name":"陵川县"},{"code":"140525","name":"泽州县"},{"code":"140581","name":"高平市"}]},{"code":"140600","name":"朔州市","children":[{"code":"140602","name":"朔城区"},{"code":"140603","name":"平鲁区"},{"code":"140621","name":"山阴县"},{"code":"140622","name":"应县"},{"code":"140623","name":"右玉县"},{"code":"140671","name":"山西朔州经济开发区"},{"code":"140681","name":"怀仁市"}]},{"code":"140700","name":"晋中市","children":[{"code":"140702","name":"榆次区"},{"code":"140703","name":"太谷区"},{"code":"140721","name":"榆社县"},{"code":"140722","name":"左权县"},{"code":"140723","name":"和顺县"},{"code":"140724","name":"昔阳县"},{"code":"140725","name":"寿阳县"},{"code":"140727","name":"祁县"},{"code":"140728","name":"平遥县"},{"code":"140729","name":"灵石县"},{"code":"140781","name":"介休市"}]},{"code":"140800","name":"运城市","children":[{"code":"140802","name":"盐湖区"},{"code":"140821","name":"临猗县"},{"code":"140822","name":"万荣县"},{"code":"140823","name":"闻喜县"},{"code":"140824","name":"稷山县"},{"code":"140825","name":"新绛县"},{"code":"140826","name":"绛县"},{"code":"140827","name":"垣曲县"},{"code":"140828","name":"夏县"},{"code":"140829","name":"平陆县"},{"code":"140830","name":"芮城县"},{"code":"140881","name":"永济市"},{"code":"140882","name":"河津市"}]},{"code":"140900","name":"忻州市","children":[{"code":"140902","name":"忻府区"},{"code":"140921","name":"定襄县"},{"code":"140922","name":"五台县"},{"code":"140923","name":"代县"},{"code":"140924","name":"繁峙县"},{"code":"140925","name":"宁武县"},{"code":"140926","name":"静乐县"},{"code":"140927","name":"神池县"},{"code":"140928","name":"五寨县"},{"code":"140929","name":"岢岚县"},{"code":"140930","name":"河曲县"},{"code":"140931","name":"保德县"},{"code":"140932","name":"偏关县"},{"code":"140971","name":"五台山风景名胜区"},{"code":"140981","name":"原平市"}]},{"code":"141000","name":"临汾市","children":[{"code":"141002","name":"尧都区"},{"code":"141021","name":"曲沃县"},{"code":"141022","name":"翼城县"},{"code":"141023","name":"襄汾县"},{"code":"141024","name":"洪洞县"},{"code":"141025","name":"古县"},{"code":"141026","name":"安泽县"},{"code":"141027","name":"浮山县"},{"code":"141028","name":"吉县"},{"code":"141029","name":"乡宁县"},{"code":"141030","name":"大宁县"},{"code":"141031","name":"隰县"},{"code":"141032","name":"永和县"},{"code":"141033","name":"蒲县"},{"code":"141034","name":"汾西县"},{"code":"141081","name":"侯马市"},{"code":"141082","name":"霍州市"}]},{"code":"141100","name":"吕梁市","children":[{"code":"141102","name":"离石区"},{"code":"141121","name":"文水县"},{"code":"141122","name":"交城县"},{"code":"141123","name":"兴县"},{"code":"141124","name":"临县"},{"code":"141125","name":"柳林县"},{"code":"141126","name":"石楼县"},{"code":"141127","name":"岚县"},{"code":"141128","name":"方山县"},{"code":"141129","name":"中阳县"},{"code":"141130","name":"交口县"},{"code":"141181","name":"孝义市"},{"code":"141182","name":"汾阳市"}]}]},{"code":"150000","name":"内蒙古自治区","children":[{"code":"150100","name":"呼和浩特市","children":[{"code":"150102","name":"新城区"},{"code":"150103","name":"回民区"},{"code":"150104","name":"玉泉区"},{"code":"150105","name":"赛罕区"},{"code":"150121","name":"土默特左旗"},{"code":"150122","name":"托克托县"},{"code":"150123","name":"和林格尔县"},{"code":"150124","name":"清水河县"},{"code":"150125","name":"武川县"},{"code":"150172","name":"呼和浩特经济技术开发区"}]},{"code":"150200","name":"包头市","children":[{"code":"150202","name":"东河区"},{"code":"150203","name":"昆都仑区"},{"code":"150204","name":"青山区"},{"code":"150205","name":"石拐区"},{"code":"150206","name":"白云鄂博矿区"},{"code":"150207","name":"九原区"},{"code":"150221","name":"土默特右旗"},{"code":"150222","name":"固阳县"},{"code":"150223","name":"达尔罕茂明安联合旗"},{"code":"150271","name":"包头稀土高新技术产业开发区"}]},{"code":"150300","name":"乌海市","children":[{"code":"150302","name":"海勃湾区"},{"code":"150303","name":"海南区"},{"code":"150304","name":"乌达区"}]},{"code":"150400","name":"赤峰市","children":[{"code":"150402","name":"红山区"},{"code":"150403","name":"元宝山区"},{"code":"150404","name":"松山区"},{"code":"150421","name":"阿鲁科尔沁旗"},{"code":"150422","name":"巴林左旗"},{"code":"150423","name":"巴林右旗"},{"code":"150424","name":"林西县"},{"code":"150425","name":"克什克腾旗"},{"code":"150426","name":"翁牛特旗"},{"code":"150428","name":"喀喇沁旗"},{"code":"150429","name":"宁城县"},{"code":"150430","name":"敖汉旗"}]},{"code":"150500","name":"通辽市","children":[{"code":"150502","name":"科尔沁区"},{"code":"150521","name":"科尔沁左翼中旗"},{"code":"150522","name":"科尔沁左翼后旗"},{"code":"150523","name":"开鲁县"},{"code":"150524","name":"库伦旗"},{"code":"150525","name":"奈曼旗"},{"code":"150526","name":"扎鲁特旗"},{"code":"150571","name":"通辽经济技术开发区"},{"code":"150581","name":"霍林郭勒市"}]},{"code":"150600","name":"鄂尔多斯市","children":[{"code":"150602","name":"东胜区"},{"code":"150603","name":"康巴什区"},{"code":"150621","name":"达拉特旗"},{"code":"150622","name":"准格尔旗"},{"code":"150623","name":"鄂托克前旗"},{"code":"150624","name":"鄂托克旗"},{"code":"150625","name":"杭锦旗"},{"code":"150626","name":"乌审旗"},{"code":"150627","name":"伊金霍洛旗"}]},{"code":"150700","name":"呼伦贝尔市","children":[{"code":"150702","name":"海拉尔区"},{"code":"150703","name":"扎赉诺尔区"},{"code":"150721","name":"阿荣旗"},{"code":"150722","name":"莫力达瓦达斡尔族自治旗"},{"code":"150723","name":"鄂伦春自治旗"},{"code":"150724","name":"鄂温克族自治旗"},{"code":"150725","name":"陈巴尔虎旗"},{"code":"150726","name":"新巴尔虎左旗"},{"code":"150727","name":"新巴尔虎右旗"},{"code":"150781","name":"满洲里市"},{"code":"150782","name":"牙克石市"},{"code":"150783","name":"扎兰屯市"},{"code":"150784","name":"额尔古纳市"},{"code":"150785","name":"根河市"}]},{"code":"150800","name":"巴彦淖尔市","children":[{"code":"150802","name":"临河区"},{"code":"150821","name":"五原县"},{"code":"150822","name":"磴口县"},{"code":"150823","name":"乌拉特前旗"},{"code":"150824","name":"乌拉特中旗"},{"code":"150825","name":"乌拉特后旗"},{"code":"150826","name":"杭锦后旗"}]},{"code":"150900","name":"乌兰察布市","children":[{"code":"150902","name":"集宁区"},{"code":"150921","name":"卓资县"},{"code":"150922","name":"化德县"},{"code":"150923","name":"商都县"},{"code":"150924","name":"兴和县"},{"code":"150925","name":"凉城县"},{"code":"150926","name":"察哈尔右翼前旗"},{"code":"150927","name":"察哈尔右翼中旗"},{"code":"150928","name":"察哈尔右翼后旗"},{"code":"150929","name":"四子王旗"},{"code":"150981","name":"丰镇市"}]},{"code":"152200","name":"兴安盟","children":[{"code":"152201","name":"乌兰浩特市"},{"code":"152202","name":"阿尔山市"},{"code":"152221","name":"科尔沁右翼前旗"},{"code":"152222","name":"科尔沁右翼中旗"},{"code":"152223","name":"扎赉特旗"},{"code":"152224","name":"突泉县"}]},{"code":"152500","name":"锡林郭勒盟","children":[{"code":"152501","name":"二连浩特市"},{"code":"152502","name":"锡林浩特市"},{"code":"152522","name":"阿巴嘎旗"},{"code":"152523","name":"苏尼特左旗"},{"code":"152524","name":"苏尼特右旗"},{"code":"152525","name":"东乌珠穆沁旗"},{"code":"152526","name":"西乌珠穆沁旗"},{"code":"152527","name":"太仆寺旗"},{"code":"152528","name":"镶黄旗"},{"code":"152529","name":"正镶白旗"},{"code":"152530","name":"正蓝旗"},{"code":"152531","name":"多伦县"},{"code":"152571","name":"乌拉盖管委会"}]},{"code":"152900","name":"阿拉善盟","children":[{"code":"152921","name":"阿拉善左旗"},{"code":"152922","name":"阿拉善右旗"},{"code":"152923","name":"额济纳旗"},{"code":"152971","name":"内蒙古阿拉善高新技术产业开发区"}]}]},{"code":"210000","name":"辽宁省","children":[{"code":"210100","name":"沈阳市","children":[{"code":"210102","name":"和平区"},{"code":"210103","name":"沈河区"},{"code":"210104","name":"大东区"},{"code":"210105","name":"皇姑区"},{"code":"210106","name":"铁西区"},{"code":"210111","name":"苏家屯区"},{"code":"210112","name":"浑南区"},{"code":"210113","name":"沈北新区"},{"code":"210114","name":"于洪区"},{"code":"210115","name":"辽中区"},{"code":"210123","name":"康平县"},{"code":"210124","name":"法库县"},{"code":"210181","name":"新民市"}]},{"code":"210200","name":"大连市","children":[{"code":"210202","name":"中山区"},{"code":"210203","name":"西岗区"},{"code":"210204","name":"沙河口区"},{"code":"210211","name":"甘井子区"},{"code":"210212","name":"旅顺口区"},{"code":"210213","name":"金州区"},{"code":"210214","name":"普兰店区"},{"code":"210224","name":"长海县"},{"code":"210281","name":"瓦房店市"},{"code":"210283","name":"庄河市"}]},{"code":"210300","name":"鞍山市","children":[{"code":"210302","name":"铁东区"},{"code":"210303","name":"铁西区"},{"code":"210304","name":"立山区"},{"code":"210311","name":"千山区"},{"code":"210321","name":"台安县"},{"code":"210323","name":"岫岩满族自治县"},{"code":"210381","name":"海城市"}]},{"code":"210400","name":"抚顺市","children":[{"code":"210402","name":"新抚区"},{"code":"210403","name":"东洲区"},{"code":"210404","name":"望花区"},{"code":"210411","name":"顺城区"},{"code":"210421","name":"抚顺县"},{"code":"210422","name":"新宾满族自治县"},{"code":"210423","name":"清原满族自治县"}]},{"code":"210500","name":"本溪市","children":[{"code":"210502","name":"平山区"},{"code":"210503","name":"溪湖区"},{"code":"210504","name":"明山区"},{"code":"210505","name":"南芬区"},{"code":"210521","name":"本溪满族自治县"},{"code":"210522","name":"桓仁满族自治县"}]},{"code":"210600","name":"丹东市","children":[{"code":"210602","name":"元宝区"},{"code":"210603","name":"振兴区"},{"code":"210604","name":"振安区"},{"code":"210624","name":"宽甸满族自治县"},{"code":"210681","name":"东港市"},{"code":"210682","name":"凤城市"}]},{"code":"210700","name":"锦州市","children":[{"code":"210702","name":"古塔区"},{"code":"210703","name":"凌河区"},{"code":"210711","name":"太和区"},{"code":"210726","name":"黑山县"},{"code":"210727","name":"义县"},{"code":"210781","name":"凌海市"},{"code":"210782","name":"北镇市"}]},{"code":"210800","name":"营口市","children":[{"code":"210802","name":"站前区"},{"code":"210803","name":"西市区"},{"code":"210804","name":"鲅鱼圈区"},{"code":"210811","name":"老边区"},{"code":"210881","name":"盖州市"},{"code":"210882","name":"大石桥市"}]},{"code":"210900","name":"阜新市","children":[{"code":"210902","name":"海州区"},{"code":"210903","name":"新邱区"},{"code":"210904","name":"太平区"},{"code":"210905","name":"清河门区"},{"code":"210911","name":"细河区"},{"code":"210921","name":"阜新蒙古族自治县"},{"code":"210922","name":"彰武县"}]},{"code":"211000","name":"辽阳市","children":[{"code":"211002","name":"白塔区"},{"code":"211003","name":"文圣区"},{"code":"211004","name":"宏伟区"},{"code":"211005","name":"弓长岭区"},{"code":"211011","name":"太子河区"},{"code":"211021","name":"辽阳县"},{"code":"211081","name":"灯塔市"}]},{"code":"211100","name":"盘锦市","children":[{"code":"211102","name":"双台子区"},{"code":"211103","name":"兴隆台区"},{"code":"211104","name":"大洼区"},{"code":"211122","name":"盘山县"}]},{"code":"211200","name":"铁岭市","children":[{"code":"211202","name":"银州区"},{"code":"211204","name":"清河区"},{"code":"211221","name":"铁岭县"},{"code":"211223","name":"西丰县"},{"code":"211224","name":"昌图县"},{"code":"211281","name":"调兵山市"},{"code":"211282","name":"开原市"}]},{"code":"211300","name":"朝阳市","children":[{"code":"211302","name":"双塔区"},{"code":"211303","name":"龙城区"},{"code":"211321","name":"朝阳县"},{"code":"211322","name":"建平县"},{"code":"211324","name":"喀喇沁左翼蒙古族自治县"},{"code":"211381","name":"北票市"},{"code":"211382","name":"凌源市"}]},{"code":"211400","name":"葫芦岛市","children":[{"code":"211402","name":"连山区"},{"code":"211403","name":"龙港区"},{"code":"211404","name":"南票区"},{"code":"211421","name":"绥中县"},{"code":"211422","name":"建昌县"},{"code":"211481","name":"兴城市"}]}]},{"code":"220000","name":"吉林省","children":[{"code":"220100","name":"长春市","children":[{"code":"220102","name":"南关区"},{"code":"220103","name":"宽城区"},{"code":"220104","name":"朝阳区"},{"code":"220105","name":"二道区"},{"code":"220106","name":"绿园区"},{"code":"220112","name":"双阳区"},{"code":"220113","name":"九台区"},{"code":"220122","name":"农安县"},{"code":"220171","name":"长春经济技术开发区"},{"code":"220172","name":"长春净月高新技术产业开发区"},{"code":"220173","name":"长春高新技术产业开发区"},{"code":"220174","name":"长春汽车经济技术开发区"},{"code":"220182","name":"榆树市"},{"code":"220183","name":"德惠市"},{"code":"220184","name":"公主岭市"}]},{"code":"220200","name":"吉林市","children":[{"code":"220202","name":"昌邑区"},{"code":"220203","name":"龙潭区"},{"code":"220204","name":"船营区"},{"code":"220211","name":"丰满区"},{"code":"220221","name":"永吉县"},{"code":"220271","name":"吉林经济开发区"},{"code":"220272","name":"吉林高新技术产业开发区"},{"code":"220273","name":"吉林中国新加坡食品区"},{"code":"220281","name":"蛟河市"},{"code":"220282","name":"桦甸市"},{"code":"220283","name":"舒兰市"},{"code":"220284","name":"磐石市"}]},{"code":"220300","name":"四平市","children":[{"code":"220302","name":"铁西区"},{"code":"220303","name":"铁东区"},{"code":"220322","name":"梨树县"},{"code":"220323","name":"伊通满族自治县"},{"code":"220382","name":"双辽市"}]},{"code":"220400","name":"辽源市","children":[{"code":"220402","name":"龙山区"},{"code":"220403","name":"西安区"},{"code":"220421","name":"东丰县"},{"code":"220422","name":"东辽县"}]},{"code":"220500","name":"通化市","children":[{"code":"220502","name":"东昌区"},{"code":"220503","name":"二道江区"},{"code":"220521","name":"通化县"},{"code":"220523","name":"辉南县"},{"code":"220524","name":"柳河县"},{"code":"220581","name":"梅河口市"},{"code":"220582","name":"集安市"}]},{"code":"220600","name":"白山市","children":[{"code":"220602","name":"浑江区"},{"code":"220605","name":"江源区"},{"code":"220621","name":"抚松县"},{"code":"220622","name":"靖宇县"},{"code":"220623","name":"长白朝鲜族自治县"},{"code":"220681","name":"临江市"}]},{"code":"220700","name":"松原市","children":[{"code":"220702","name":"宁江区"},{"code":"220721","name":"前郭尔罗斯蒙古族自治县"},{"code":"220722","name":"长岭县"},{"code":"220723","name":"乾安县"},{"code":"220771","name":"吉林松原经济开发区"},{"code":"220781","name":"扶余市"}]},{"code":"220800","name":"白城市","children":[{"code":"220802","name":"洮北区"},{"code":"220821","name":"镇赉县"},{"code":"220822","name":"通榆县"},{"code":"220871","name":"吉林白城经济开发区"},{"code":"220881","name":"洮南市"},{"code":"220882","name":"大安市"}]},{"code":"222400","name":"延边朝鲜族自治州","children":[{"code":"222401","name":"延吉市"},{"code":"222402","name":"图们市"},{"code":"222403","name":"敦化市"},{"code":"222404","name":"珲春市"},{"code":"222405","name":"龙井市"},{"code":"222406","name":"和龙市"},{"code":"222424","name":"汪清县"},{"code":"222426","name":"安图县"}]}]},{"code":"230000","name":"黑龙江省","children":[{"code":"230100","name":"哈尔滨市","children":[{"code":"230102","name":"道里区"},{"code":"230103","name":"南岗区"},{"code":"230104","name":"道外区"},{"code":"230108","name":"平房区"},{"code":"230109","name":"松北区"},{"code":"230110","name":"香坊区"},{"code":"230111","name":"呼兰区"},{"code":"230112","name":"阿城区"},{"code":"230113","name":"双城区"},{"code":"230123","name":"依兰县"},{"code":"230124","name":"方正县"},{"code":"230125","name":"宾县"},{"code":"230126","name":"巴彦县"},{"code":"230127","name":"木兰县"},{"code":"230128","name":"通河县"},{"code":"230129","name":"延寿县"},{"code":"230183","name":"尚志市"},{"code":"230184","name":"五常市"}]},{"code":"230200","name":"齐齐哈尔市","children":[{"code":"230202","name":"龙沙区"},{"code":"230203","name":"建华区"},{"code":"230204","name":"铁锋区"},{"code":"230205","name":"昂昂溪区"},{"code":"230206","name":"富拉尔基区"},{"code":"230207","name":"碾子山区"},{"code":"230208","name":"梅里斯达斡尔族区"},{"code":"230221","name":"龙江县"},{"code":"230223","name":"依安县"},{"code":"230224","name":"泰来县"},{"code":"230225","name":"甘南县"},{"code":"230227","name":"富裕县"},{"code":"230229","name":"克山县"},{"code":"230230","name":"克东县"},{"code":"230231","name":"拜泉县"},{"code":"230281","name":"讷河市"}]},{"code":"230300","name":"鸡西市","children":[{"code":"230302","name":"鸡冠区"},{"code":"230303","name":"恒山区"},{"code":"230304","name":"滴道区"},{"code":"230305","name":"梨树区"},{"code":"230306","name":"城子河区"},{"code":"230307","name":"麻山区"},{"code":"230321","name":"鸡东县"},{"code":"230381","name":"虎林市"},{"code":"230382","name":"密山市"}]},{"code":"230400","name":"鹤岗市","children":[{"code":"230402","name":"向阳区"},{"code":"230403","name":"工农区"},{"code":"230404","name":"南山区"},{"code":"230405","name":"兴安区"},{"code":"230406","name":"东山区"},{"code":"230407","name":"兴山区"},{"code":"230421","name":"萝北县"},{"code":"230422","name":"绥滨县"}]},{"code":"230500","name":"双鸭山市","children":[{"code":"230502","name":"尖山区"},{"code":"230503","name":"岭东区"},{"code":"230505","name":"四方台区"},{"code":"230506","name":"宝山区"},{"code":"230521","name":"集贤县"},{"code":"230522","name":"友谊县"},{"code":"230523","name":"宝清县"},{"code":"230524","name":"饶河县"}]},{"code":"230600","name":"大庆市","children":[{"code":"230602","name":"萨尔图区"},{"code":"230603","name":"龙凤区"},{"code":"230604","name":"让胡路区"},{"code":"230605","name":"红岗区"},{"code":"230606","name":"大同区"},{"code":"230621","name":"肇州县"},{"code":"230622","name":"肇源县"},{"code":"230623","name":"林甸县"},{"code":"230624","name":"杜尔伯特蒙古族自治县"},{"code":"230671","name":"大庆高新技术产业开发区"}]},{"code":"230700","name":"伊春市","children":[{"code":"230717","name":"伊美区"},{"code":"230718","name":"乌翠区"},{"code":"230719","name":"友好区"},{"code":"230722","name":"嘉荫县"},{"code":"230723","name":"汤旺县"},{"code":"230724","name":"丰林县"},{"code":"230725","name":"大箐山县"},{"code":"230726","name":"南岔县"},{"code":"230751","name":"金林区"},{"code":"230781","name":"铁力市"}]},{"code":"230800","name":"佳木斯市","children":[{"code":"230803","name":"向阳区"},{"code":"230804","name":"前进区"},{"code":"230805","name":"东风区"},{"code":"230811","name":"郊区"},{"code":"230822","name":"桦南县"},{"code":"230826","name":"桦川县"},{"code":"230828","name":"汤原县"},{"code":"230881","name":"同江市"},{"code":"230882","name":"富锦市"},{"code":"230883","name":"抚远市"}]},{"code":"230900","name":"七台河市","children":[{"code":"230902","name":"新兴区"},{"code":"230903","name":"桃山区"},{"code":"230904","name":"茄子河区"},{"code":"230921","name":"勃利县"}]},{"code":"231000","name":"牡丹江市","children":[{"code":"231002","name":"东安区"},{"code":"231003","name":"阳明区"},{"code":"231004","name":"爱民区"},{"code":"231005","name":"西安区"},{"code":"231025","name":"林口县"},{"code":"231071","name":"牡丹江经济技术开发区"},{"code":"231081","name":"绥芬河市"},{"code":"231083","name":"海林市"},{"code":"231084","name":"宁安市"},{"code":"231085","name":"穆棱市"},{"code":"231086","name":"东宁市"}]},{"code":"231100","name":"黑河市","children":[{"code":"231102","name":"爱辉区"},{"code":"231123","name":"逊克县"},{"code":"231124","name":"孙吴县"},{"code":"231181","name":"北安市"},{"code":"231182","name":"五大连池市"},{"code":"231183","name":"嫩江市"}]},{"code":"231200","name":"绥化市","children":[{"code":"231202","name":"北林区"},{"code":"231221","name":"望奎县"},{"code":"231222","name":"兰西县"},{"code":"231223","name":"青冈县"},{"code":"231224","name":"庆安县"},{"code":"231225","name":"明水县"},{"code":"231226","name":"绥棱县"},{"code":"231281","name":"安达市"},{"code":"231282","name":"肇东市"},{"code":"231283","name":"海伦市"}]},{"code":"232700","name":"大兴安岭地区","children":[{"code":"232701","name":"漠河市"},{"code":"232721","name":"呼玛县"},{"code":"232722","name":"塔河县"},{"code":"232761","name":"加格达奇区"},{"code":"232762","name":"松岭区"},{"code":"232763","name":"新林区"},{"code":"232764","name":"呼中区"}]}]},{"code":"310000","name":"上海市","children":[{"code":"310100","name":"市辖区","children":[{"code":"310101","name":"黄浦区"},{"code":"310104","name":"徐汇区"},{"code":"310105","name":"长宁区"},{"code":"310106","name":"静安区"},{"code":"310107","name":"普陀区"},{"code":"310109","name":"虹口区"},{"code":"310110","name":"杨浦区"},{"code":"310112","name":"闵行区"},{"code":"310113","name":"宝山区"},{"code":"310114","name":"嘉定区"},{"code":"310115","name":"浦东新区"},{"code":"310116","name":"金山区"},{"code":"310117","name":"松江区"},{"code":"310118","name":"青浦区"},{"code":"310120","name":"奉贤区"},{"code":"310151","name":"崇明区"}]}]},{"code":"320000","name":"江苏省","children":[{"code":"320100","name":"南京市","children":[{"code":"320102","name":"玄武区"},{"code":"320104","name":"秦淮区"},{"code":"320105","name":"建邺区"},{"code":"320106","name":"鼓楼区"},{"code":"320111","name":"浦口区"},{"code":"320113","name":"栖霞区"},{"code":"320114","name":"雨花台区"},{"code":"320115","name":"江宁区"},{"code":"320116","name":"六合区"},{"code":"320117","name":"溧水区"},{"code":"320118","name":"高淳区"}]},{"code":"320200","name":"无锡市","children":[{"code":"320205","name":"锡山区"},{"code":"320206","name":"惠山区"},{"code":"320211","name":"滨湖区"},{"code":"320213","name":"梁溪区"},{"code":"320214","name":"新吴区"},{"code":"320281","name":"江阴市"},{"code":"320282","name":"宜兴市"}]},{"code":"320300","name":"徐州市","children":[{"code":"320302","name":"鼓楼区"},{"code":"320303","name":"云龙区"},{"code":"320305","name":"贾汪区"},{"code":"320311","name":"泉山区"},{"code":"320312","name":"铜山区"},{"code":"320321","name":"丰县"},{"code":"320322","name":"沛县"},{"code":"320324","name":"睢宁县"},{"code":"320371","name":"徐州经济技术开发区"},{"code":"320381","name":"新沂市"},{"code":"320382","name":"邳州市"}]},{"code":"320400","name":"常州市","children":[{"code":"320402","name":"天宁区"},{"code":"320404","name":"钟楼区"},{"code":"320411","name":"新北区"},{"code":"320412","name":"武进区"},{"code":"320413","name":"金坛区"},{"code":"320481","name":"溧阳市"}]},{"code":"320500","name":"苏州市","children":[{"code":"320505","name":"虎丘区"},{"code":"320506","name":"吴中区"},{"code":"320507","name":"相城区"},{"code":"320508","name":"姑苏区"},{"code":"320509","name":"吴江区"},{"code":"320571","name":"苏州工业园区"},{"code":"320581","name":"常熟市"},{"code":"320582","name":"张家港市"},{"code":"320583","name":"昆山市"},{"code":"320585","name":"太仓市"}]},{"code":"320600","name":"南通市","children":[{"code":"320612","name":"通州区"},{"code":"320613","name":"崇川区"},{"code":"320614","name":"海门区"},{"code":"320623","name":"如东县"},{"code":"320671","name":"南通经济技术开发区"},{"code":"320681","name":"启东市"},{"code":"320682","name":"如皋市"},{"code":"320685","name":"海安市"}]},{"code":"320700","name":"连云港市","children":[{"code":"320703","name":"连云区"},{"code":"320706","name":"海州区"},{"code":"320707","name":"赣榆区"},{"code":"320722","name":"东海县"},{"code":"320723","name":"灌云县"},{"code":"320724","name":"灌南县"},{"code":"320771","name":"连云港经济技术开发区"},{"code":"320772","name":"连云港高新技术产业开发区"}]},{"code":"320800","name":"淮安市","children":[{"code":"320803","name":"淮安区"},{"code":"320804","name":"淮阴区"},{"code":"320812","name":"清江浦区"},{"code":"320813","name":"洪泽区"},{"code":"320826","name":"涟水县"},{"code":"320830","name":"盱眙县"},{"code":"320831","name":"金湖县"},{"code":"320871","name":"淮安经济技术开发区"}]},{"code":"320900","name":"盐城市","children":[{"code":"320902","name":"亭湖区"},{"code":"320903","name":"盐都区"},{"code":"320904","name":"大丰区"},{"code":"320921","name":"响水县"},{"code":"320922","name":"滨海县"},{"code":"320923","name":"阜宁县"},{"code":"320924","name":"射阳县"},{"code":"320925","name":"建湖县"},{"code":"320971","name":"盐城经济技术开发区"},{"code":"320981","name":"东台市"}]},{"code":"321000","name":"扬州市","children":[{"code":"321002","name":"广陵区"},{"code":"321003","name":"邗江区"},{"code":"321012","name":"江都区"},{"code":"321023","name":"宝应县"},{"code":"321071","name":"扬州经济技术开发区"},{"code":"321081","name":"仪征市"},{"code":"321084","name":"高邮市"}]},{"code":"321100","name":"镇江市","children":[{"code":"321102","name":"京口区"},{"code":"321111","name":"润州区"},{"code":"321112","name":"丹徒区"},{"code":"321171","name":"镇江新区"},{"code":"321181","name":"丹阳市"},{"code":"321182","name":"扬中市"},{"code":"321183","name":"句容市"}]},{"code":"321200","name":"泰州市","children":[{"code":"321202","name":"海陵区"},{"code":"321203","name":"高港区"},{"code":"321204","name":"姜堰区"},{"code":"321271","name":"泰州医药高新技术产业开发区"},{"code":"321281","name":"兴化市"},{"code":"321282","name":"靖江市"},{"code":"321283","name":"泰兴市"}]},{"code":"321300","name":"宿迁市","children":[{"code":"321302","name":"宿城区"},{"code":"321311","name":"宿豫区"},{"code":"321322","name":"沭阳县"},{"code":"321323","name":"泗阳县"},{"code":"321324","name":"泗洪县"},{"code":"321371","name":"宿迁经济技术开发区"}]}]},{"code":"330000","name":"浙江省","children":[{"code":"330100","name":"杭州市","children":[{"code":"330102","name":"上城区"},{"code":"330105","name":"拱墅区"},{"code":"330106","name":"西湖区"},{"code":"330108","name":"滨江区"},{"code":"330109","name":"萧山区"},{"code":"330110","name":"余杭区"},{"code":"330111","name":"富阳区"},{"code":"330112","name":"临安区"},{"code":"330113","name":"临平区"},{"code":"330114","name":"钱塘区"},{"code":"330122","name":"桐庐县"},{"code":"330127","name":"淳安县"},{"code":"330182","name":"建德市"}]},{"code":"330200","name":"宁波市","children":[{"code":"330203","name":"海曙区"},{"code":"330205","name":"江北区"},{"code":"330206","name":"北仑区"},{"code":"330211","name":"镇海区"},{"code":"330212","name":"鄞州区"},{"code":"330213","name":"奉化区"},{"code":"330225","name":"象山县"},{"code":"330226","name":"宁海县"},{"code":"330281","name":"余姚市"},{"code":"330282","name":"慈溪市"}]},{"code":"330300","name":"温州市","children":[{"code":"330302","name":"鹿城区"},{"code":"330303","name":"龙湾区"},{"code":"330304","name":"瓯海区"},{"code":"330305","name":"洞头区"},{"code":"330324","name":"永嘉县"},{"code":"330326","name":"平阳县"},{"code":"330327","name":"苍南县"},{"code":"330328","name":"文成县"},{"code":"330329","name":"泰顺县"},{"code":"330381","name":"瑞安市"},{"code":"330382","name":"乐清市"},{"code":"330383","name":"龙港市"}]},{"code":"330400","name":"嘉兴市","children":[{"code":"330402","name":"南湖区"},{"code":"330411","name":"秀洲区"},{"code":"330421","name":"嘉善县"},{"code":"330424","name":"海盐县"},{"code":"330481","name":"海宁市"},{"code":"330482","name":"平湖市"},{"code":"330483","name":"桐乡市"}]},{"code":"330500","name":"湖州市","children":[{"code":"330502","name":"吴兴区"},{"code":"330503","name":"南浔区"},{"code":"330521","name":"德清县"},{"code":"330522","name":"长兴县"},{"code":"330523","name":"安吉县"}]},{"code":"330600","name":"绍兴市","children":[{"code":"330602","name":"越城区"},{"code":"330603","name":"柯桥区"},{"code":"330604","name":"上虞区"},{"code":"330624","name":"新昌县"},{"code":"330681","name":"诸暨市"},{"code":"330683","name":"嵊州市"}]},{"code":"330700","name":"金华市","children":[{"code":"330702","name":"婺城区"},{"code":"330703","name":"金东区"},{"code":"330723","name":"武义县"},{"code":"330726","name":"浦江县"},{"code":"330727","name":"磐安县"},{"code":"330781","name":"兰溪市"},{"code":"330782","name":"义乌市"},{"code":"330783","name":"东阳市"},{"code":"330784","name":"永康市"}]},{"code":"330800","name":"衢州市","children":[{"code":"330802","name":"柯城区"},{"code":"330803","name":"衢江区"},{"code":"330822","name":"常山县"},{"code":"330824","name":"开化县"},{"code":"330825","name":"龙游县"},{"code":"330881","name":"江山市"}]},{"code":"330900","name":"舟山市","children":[{"code":"330902","name":"定海区"},{"code":"330903","name":"普陀区"},{"code":"330921","name":"岱山县"},{"code":"330922","name":"嵊泗县"}]},{"code":"331000","name":"台州市","children":[{"code":"331002","name":"椒江区"},{"code":"331003","name":"黄岩区"},{"code":"331004","name":"路桥区"},{"code":"331022","name":"三门县"},{"code":"331023","name":"天台县"},{"code":"331024","name":"仙居县"},{"code":"331081","name":"温岭市"},{"code":"331082","name":"临海市"},{"code":"331083","name":"玉环市"}]},{"code":"331100","name":"丽水市","children":[{"code":"331102","name":"莲都区"},{"code":"331121","name":"青田县"},{"code":"331122","name":"缙云县"},{"code":"331123","name":"遂昌县"},{"code":"331124","name":"松阳县"},{"code":"331125","name":"云和县"},{"code":"331126","name":"庆元县"},{"code":"331127","name":"景宁畲族自治县"},{"code":"331181","name":"龙泉市"}]}]},{"code":"340000","name":"安徽省","children":[{"code":"340100","name":"合肥市","children":[{"code":"340102","name":"瑶海区"},{"code":"340103","name":"庐阳区"},{"code":"340104","name":"蜀山区"},{"code":"340111","name":"包河区"},{"code":"340121","name":"长丰县"},{"code":"340122","name":"肥东县"},{"code":"340123","name":"肥西县"},{"code":"340124","name":"庐江县"},{"code":"340171","name":"合肥高新技术产业开发区"},{"code":"340172","name":"合肥经济技术开发区"},{"code":"340173","name":"合肥新站高新技术产业开发区"},{"code":"340181","name":"巢湖市"}]},{"code":"340200","name":"芜湖市","children":[{"code":"340202","name":"镜湖区"},{"code":"340207","name":"鸠江区"},{"code":"340209","name":"弋江区"},{"code":"340210","name":"湾沚区"},{"code":"340212","name":"繁昌区"},{"code":"340223","name":"南陵县"},{"code":"340271","name":"芜湖经济技术开发区"},{"code":"340272","name":"安徽芜湖三山经济开发区"},{"code":"340281","name":"无为市"}]},{"code":"340300","name":"蚌埠市","children":[{"code":"340302","name":"龙子湖区"},{"code":"340303","name":"蚌山区"},{"code":"340304","name":"禹会区"},{"code":"340311","name":"淮上区"},{"code":"340321","name":"怀远县"},{"code":"340322","name":"五河县"},{"code":"340323","name":"固镇县"},{"code":"340371","name":"蚌埠市高新技术开发区"},{"code":"340372","name":"蚌埠市经济开发区"}]},{"code":"340400","name":"淮南市","children":[{"code":"340402","name":"大通区"},{"code":"340403","name":"田家庵区"},{"code":"340404","name":"谢家集区"},{"code":"340405","name":"八公山区"},{"code":"340406","name":"潘集区"},{"code":"340421","name":"凤台县"},{"code":"340422","name":"寿县"}]},{"code":"340500","name":"马鞍山市","children":[{"code":"340503","name":"花山区"},{"code":"340504","name":"雨山区"},{"code":"340506","name":"博望区"},{"code":"340521","name":"当涂县"},{"code":"340522","name":"含山县"},{"code":"340523","name":"和县"}]},{"code":"340600","name":"淮北市","children":[{"code":"340602","name":"杜集区"},{"code":"340603","name":"相山区"},{"code":"340604","name":"烈山区"},{"code":"340621","name":"濉溪县"}]},{"code":"340700","name":"铜陵市","children":[{"code":"340705","name":"铜官区"},{"code":"340706","name":"义安区"},{"code":"340711","name":"郊区"},{"code":"340722","name":"枞阳县"}]},{"code":"340800","name":"安庆市","children":[{"code":"340802","name":"迎江区"},{"code":"340803","name":"大观区"},{"code":"340811","name":"宜秀区"},{"code":"340822","name":"怀宁县"},{"code":"340825","name":"太湖县"},{"code":"340826","name":"宿松县"},{"code":"340827","name":"望江县"},{"code":"340828","name":"岳西县"},{"code":"340871","name":"安徽安庆经济开发区"},{"code":"340881","name":"桐城市"},{"code":"340882","name":"潜山市"}]},{"code":"341000","name":"黄山市","children":[{"code":"341002","name":"屯溪区"},{"code":"341003","name":"黄山区"},{"code":"341004","name":"徽州区"},{"code":"341021","name":"歙县"},{"code":"341022","name":"休宁县"},{"code":"341023","name":"黟县"},{"code":"341024","name":"祁门县"}]},{"code":"341100","name":"滁州市","children":[{"code":"341102","name":"琅琊区"},{"code":"341103","name":"南谯区"},{"code":"341122","name":"来安县"},{"code":"341124","name":"全椒县"},{"code":"341125","name":"定远县"},{"code":"341126","name":"凤阳县"},{"code":"341171","name":"中新苏滁高新技术产业开发区"},{"code":"341172","name":"滁州经济技术开发区"},{"code":"341181","name":"天长市"},{"code":"341182","name":"明光市"}]},{"code":"341200","name":"阜阳市","children":[{"code":"341202","name":"颍州区"},{"code":"341203","name":"颍东区"},{"code":"341204","name":"颍泉区"},{"code":"341221","name":"临泉县"},{"code":"341222","name":"太和县"},{"code":"341225","name":"阜南县"},{"code":"341226","name":"颍上县"},{"code":"341271","name":"阜阳合肥现代产业园区"},{"code":"341272","name":"阜阳经济技术开发区"},{"code":"341282","name":"界首市"}]},{"code":"341300","name":"宿州市","children":[{"code":"341302","name":"埇桥区"},{"code":"341321","name":"砀山县"},{"code":"341322","name":"萧县"},{"code":"341323","name":"灵璧县"},{"code":"341324","name":"泗县"},{"code":"341371","name":"宿州马鞍山现代产业园区"},{"code":"341372","name":"宿州经济技术开发区"}]},{"code":"341500","name":"六安市","children":[{"code":"341502","name":"金安区"},{"code":"341503","name":"裕安区"},{"code":"341504","name":"叶集区"},{"code":"341522","name":"霍邱县"},{"code":"341523","name":"舒城县"},{"code":"341524","name":"金寨县"},{"code":"341525","name":"霍山县"}]},{"code":"341600","name":"亳州市","children":[{"code":"341602","name":"谯城区"},{"code":"341621","name":"涡阳县"},{"code":"341622","name":"蒙城县"},{"code":"341623","name":"利辛县"}]},{"code":"341700","name":"池州市","children":[{"code":"341702","name":"贵池区"},{"code":"341721","name":"东至县"},{"code":"341722","name":"石台县"},{"code":"341723","name":"青阳县"}]},{"code":"341800","name":"宣城市","children":[{"code":"341802","name":"宣州区"},{"code":"341821","name":"郎溪县"},{"code":"341823","name":"泾县"},{"code":"341824","name":"绩溪县"},{"code":"341825","name":"旌德县"},{"code":"341871","name":"宣城市经济开发区"},{"code":"341881","name":"宁国市"},{"code":"341882","name":"广德市"}]}]},{"code":"350000","name":"福建省","children":[{"code":"350100","name":"福州市","children":[{"code":"350102","name":"鼓楼区"},{"code":"350103","name":"台江区"},{"code":"350104","name":"仓山区"},{"code":"350105","name":"马尾区"},{"code":"350111","name":"晋安区"},{"code":"350112","name":"长乐区"},{"code":"350121","name":"闽侯县"},{"code":"350122","name":"连江县"},{"code":"350123","name":"罗源县"},{"code":"350124","name":"闽清县"},{"code":"350125","name":"永泰县"},{"code":"350128","name":"平潭县"},{"code":"350181","name":"福清市"}]},{"code":"350200","name":"厦门市","children":[{"code":"350203","name":"思明区"},{"code":"350205","name":"海沧区"},{"code":"350206","name":"湖里区"},{"code":"350211","name":"集美区"},{"code":"350212","name":"同安区"},{"code":"350213","name":"翔安区"}]},{"code":"350300","name":"莆田市","children":[{"code":"350302","name":"城厢区"},{"code":"350303","name":"涵江区"},{"code":"350304","name":"荔城区"},{"code":"350305","name":"秀屿区"},{"code":"350322","name":"仙游县"}]},{"code":"350400","name":"三明市","children":[{"code":"350404","name":"三元区"},{"code":"350405","name":"沙县区"},{"code":"350421","name":"明溪县"},{"code":"350423","name":"清流县"},{"code":"350424","name":"宁化县"},{"code":"350425","name":"大田县"},{"code":"350426","name":"尤溪县"},{"code":"350428","name":"将乐县"},{"code":"350429","name":"泰宁县"},{"code":"350430","name":"建宁县"},{"code":"350481","name":"永安市"}]},{"code":"350500","name":"泉州市","children":[{"code":"350502","name":"鲤城区"},{"code":"350503","name":"丰泽区"},{"code":"350504","name":"洛江区"},{"code":"350505","name":"泉港区"},{"code":"350521","name":"惠安县"},{"code":"350524","name":"安溪县"},{"code":"350525","name":"永春县"},{"code":"350526","name":"德化县"},{"code":"350527","name":"金门县"},{"code":"350581","name":"石狮市"},{"code":"350582","name":"晋江市"},{"code":"350583","name":"南安市"}]},{"code":"350600","name":"漳州市","children":[{"code":"350602","name":"芗城区"},{"code":"350603","name":"龙文区"},{"code":"350604","name":"龙海区"},{"code":"350605","name":"长泰区"},{"code":"350622","name":"云霄县"},{"code":"350623","name":"漳浦县"},{"code":"350624","name":"诏安县"},{"code":"350626","name":"东山县"},{"code":"350627","name":"南靖县"},{"code":"350628","name":"平和县"},{"code":"350629","name":"华安县"}]},{"code":"350700","name":"南平市","children":[{"code":"350702","name":"延平区"},{"code":"350703","name":"建阳区"},{"code":"350721","name":"顺昌县"},{"code":"350722","name":"浦城县"},{"code":"350723","name":"光泽县"},{"code":"350724","name":"松溪县"},{"code":"350725","name":"政和县"},{"code":"350781","name":"邵武市"},{"code":"350782","name":"武夷山市"},{"code":"350783","name":"建瓯市"}]},{"code":"350800","name":"龙岩市","children":[{"code":"350802","name":"新罗区"},{"code":"350803","name":"永定区"},{"code":"350821","name":"长汀县"},{"code":"350823","name":"上杭县"},{"code":"350824","name":"武平县"},{"code":"350825","name":"连城县"},{"code":"350881","name":"漳平市"}]},{"code":"350900","name":"宁德市","children":[{"code":"350902","name":"蕉城区"},{"code":"350921","name":"霞浦县"},{"code":"350922","name":"古田县"},{"code":"350923","name":"屏南县"},{"code":"350924","name":"寿宁县"},{"code":"350925","name":"周宁县"},{"code":"350926","name":"柘荣县"},{"code":"350981","name":"福安市"},{"code":"350982","name":"福鼎市"}]}]},{"code":"360000","name":"江西省","children":[{"code":"360100","name":"南昌市","children":[{"code":"360102","name":"东湖区"},{"code":"360103","name":"西湖区"},{"code":"360104","name":"青云谱区"},{"code":"360111","name":"青山湖区"},{"code":"360112","name":"新建区"},{"code":"360113","name":"红谷滩区"},{"code":"360121","name":"南昌县"},{"code":"360123","name":"安义县"},{"code":"360124","name":"进贤县"}]},{"code":"360200","name":"景德镇市","children":[{"code":"360202","name":"昌江区"},{"code":"360203","name":"珠山区"},{"code":"360222","name":"浮梁县"},{"code":"360281","name":"乐平市"}]},{"code":"360300","name":"萍乡市","children":[{"code":"360302","name":"安源区"},{"code":"360313","name":"湘东区"},{"code":"360321","name":"莲花县"},{"code":"360322","name":"上栗县"},{"code":"360323","name":"芦溪县"}]},{"code":"360400","name":"九江市","children":[{"code":"360402","name":"濂溪区"},{"code":"360403","name":"浔阳区"},{"code":"360404","name":"柴桑区"},{"code":"360423","name":"武宁县"},{"code":"360424","name":"修水县"},{"code":"360425","name":"永修县"},{"code":"360426","name":"德安县"},{"code":"360428","name":"都昌县"},{"code":"360429","name":"湖口县"},{"code":"360430","name":"彭泽县"},{"code":"360481","name":"瑞昌市"},{"code":"360482","name":"共青城市"},{"code":"360483","name":"庐山市"}]},{"code":"360500","name":"新余市","children":[{"code":"360502","name":"渝水区"},{"code":"360521","name":"分宜县"}]},{"code":"360600","name":"鹰潭市","children":[{"code":"360602","name":"月湖区"},{"code":"360603","name":"余江区"},{"code":"360681","name":"贵溪市"}]},{"code":"360700","name":"赣州市","children":[{"code":"360702","name":"章贡区"},{"code":"360703","name":"南康区"},{"code":"360704","name":"赣县区"},{"code":"360722","name":"信丰县"},{"code":"360723","name":"大余县"},{"code":"360724","name":"上犹县"},{"code":"360725","name":"崇义县"},{"code":"360726","name":"安远县"},{"code":"360728","name":"定南县"},{"code":"360729","name":"全南县"},{"code":"360730","name":"宁都县"},{"code":"360731","name":"于都县"},{"code":"360732","name":"兴国县"},{"code":"360733","name":"会昌县"},{"code":"360734","name":"寻乌县"},{"code":"360735","name":"石城县"},{"code":"360781","name":"瑞金市"},{"code":"360783","name":"龙南市"}]},{"code":"360800","name":"吉安市","children":[{"code":"360802","name":"吉州区"},{"code":"360803","name":"青原区"},{"code":"360821","name":"吉安县"},{"code":"360822","name":"吉水县"},{"code":"360823","name":"峡江县"},{"code":"360824","name":"新干县"},{"code":"360825","name":"永丰县"},{"code":"360826","name":"泰和县"},{"code":"360827","name":"遂川县"},{"code":"360828","name":"万安县"},{"code":"360829","name":"安福县"},{"code":"360830","name":"永新县"},{"code":"360881","name":"井冈山市"}]},{"code":"360900","name":"宜春市","children":[{"code":"360902","name":"袁州区"},{"code":"360921","name":"奉新县"},{"code":"360922","name":"万载县"},{"code":"360923","name":"上高县"},{"code":"360924","name":"宜丰县"},{"code":"360925","name":"靖安县"},{"code":"360926","name":"铜鼓县"},{"code":"360981","name":"丰城市"},{"code":"360982","name":"樟树市"},{"code":"360983","name":"高安市"}]},{"code":"361000","name":"抚州市","children":[{"code":"361002","name":"临川区"},{"code":"361003","name":"东乡区"},{"code":"361021","name":"南城县"},{"code":"361022","name":"黎川县"},{"code":"361023","name":"南丰县"},{"code":"361024","name":"崇仁县"},{"code":"361025","name":"乐安县"},{"code":"361026","name":"宜黄县"},{"code":"361027","name":"金溪县"},{"code":"361028","name":"资溪县"},{"code":"361030","name":"广昌县"}]},{"code":"361100","name":"上饶市","children":[{"code":"361102","name":"信州区"},{"code":"361103","name":"广丰区"},{"code":"361104","name":"广信区"},{"code":"361123","name":"玉山县"},{"code":"361124","name":"铅山县"},{"code":"361125","name":"横峰县"},{"code":"361126","name":"弋阳县"},{"code":"361127","name":"余干县"},{"code":"361128","name":"鄱阳县"},{"code":"361129","name":"万年县"},{"code":"361130","name":"婺源县"},{"code":"361181","name":"德兴市"}]}]},{"code":"370000","name":"山东省","children":[{"code":"370100","name":"济南市","children":[{"code":"370102","name":"历下区"},{"code":"370103","name":"市中区"},{"code":"370104","name":"槐荫区"},{"code":"370105","name":"天桥区"},{"code":"370112","name":"历城区"},{"code":"370113","name":"长清区"},{"code":"370114","name":"章丘区"},{"code":"370115","name":"济阳区"},{"code":"370116","name":"莱芜区"},{"code":"370117","name":"钢城区"},{"code":"370124","name":"平阴县"},{"code":"370126","name":"商河县"},{"code":"370171","name":"济南高新技术产业开发区"}]},{"code":"370200","name":"青岛市","children":[{"code":"370202","name":"市南区"},{"code":"370203","name":"市北区"},{"code":"370211","name":"黄岛区"},{"code":"370212","name":"崂山区"},{"code":"370213","name":"李沧区"},{"code":"370214","name":"城阳区"},{"code":"370215","name":"即墨区"},{"code":"370271","name":"青岛高新技术产业开发区"},{"code":"370281","name":"胶州市"},{"code":"370283","name":"平度市"},{"code":"370285","name":"莱西市"}]},{"code":"370300","name":"淄博市","children":[{"code":"370302","name":"淄川区"},{"code":"370303","name":"张店区"},{"code":"370304","name":"博山区"},{"code":"370305","name":"临淄区"},{"code":"370306","name":"周村区"},{"code":"370321","name":"桓台县"},{"code":"370322","name":"高青县"},{"code":"370323","name":"沂源县"}]},{"code":"370400","name":"枣庄市","children":[{"code":"370402","name":"市中区"},{"code":"370403","name":"薛城区"},{"code":"370404","name":"峄城区"},{"code":"370405","name":"台儿庄区"},{"code":"370406","name":"山亭区"},{"code":"370481","name":"滕州市"}]},{"code":"370500","name":"东营市","children":[{"code":"370502","name":"东营区"},{"code":"370503","name":"河口区"},{"code":"370505","name":"垦利区"},{"code":"370522","name":"利津县"},{"code":"370523","name":"广饶县"},{"code":"370571","name":"东营经济技术开发区"},{"code":"370572","name":"东营港经济开发区"}]},{"code":"370600","name":"烟台市","children":[{"code":"370602","name":"芝罘区"},{"code":"370611","name":"福山区"},{"code":"370612","name":"牟平区"},{"code":"370613","name":"莱山区"},{"code":"370614","name":"蓬莱区"},{"code":"370671","name":"烟台高新技术产业开发区"},{"code":"370672","name":"烟台经济技术开发区"},{"code":"370681","name":"龙口市"},{"code":"370682","name":"莱阳市"},{"code":"370683","name":"莱州市"},{"code":"370685","name":"招远市"},{"code":"370686","name":"栖霞市"},{"code":"370687","name":"海阳市"}]},{"code":"370700","name":"潍坊市","children":[{"code":"370702","name":"潍城区"},{"code":"370703","name":"寒亭区"},{"code":"370704","name":"坊子区"},{"code":"370705","name":"奎文区"},{"code":"370724","name":"临朐县"},{"code":"370725","name":"昌乐县"},{"code":"370772","name":"潍坊滨海经济技术开发区"},{"code":"370781","name":"青州市"},{"code":"370782","name":"诸城市"},{"code":"370783","name":"寿光市"},{"code":"370784","name":"安丘市"},{"code":"370785","name":"高密市"},{"code":"370786","name":"昌邑市"}]},{"code":"370800","name":"济宁市","children":[{"code":"370811","name":"任城区"},{"code":"370812","name":"兖州区"},{"code":"370826","name":"微山县"},{"code":"370827","name":"鱼台县"},{"code":"370828","name":"金乡县"},{"code":"370829","name":"嘉祥县"},{"code":"370830","name":"汶上县"},{"code":"370831","name":"泗水县"},{"code":"370832","name":"梁山县"},{"code":"370871","name":"济宁高新技术产业开发区"},{"code":"370881","name":"曲阜市"},{"code":"370883","name":"邹城市"}]},{"code":"370900","name":"泰安市","children":[{"code":"370902","name":"泰山区"},{"code":"370911","name":"岱岳区"},{"code":"370921","name":"宁阳县"},{"code":"370923","name":"东平县"},{"code":"370982","name":"新泰市"},{"code":"370983","name":"肥城市"}]},{"code":"371000","name":"威海市","children":[{"code":"371002","name":"环翠区"},{"code":"371003","name":"文登区"},{"code":"371071","name":"威海火炬高技术产业开发区"},{"code":"371072","name":"威海经济技术开发区"},{"code":"371073","name":"威海临港经济技术开发区"},{"code":"371082","name":"荣成市"},{"code":"371083","name":"乳山市"}]},{"code":"371100","name":"日照市","children":[{"code":"371102","name":"东港区"},{"code":"371103","name":"岚山区"},{"code":"371121","name":"五莲县"},{"code":"371122","name":"莒县"},{"code":"371171","name":"日照经济技术开发区"}]},{"code":"371300","name":"临沂市","children":[{"code":"371302","name":"兰山区"},{"code":"371311","name":"罗庄区"},{"code":"371312","name":"河东区"},{"code":"371321","name":"沂南县"},{"code":"371322","name":"郯城县"},{"code":"371323","name":"沂水县"},{"code":"371324","name":"兰陵县"},{"code":"371325","name":"费县"},{"code":"371326","name":"平邑县"},{"code":"371327","name":"莒南县"},{"code":"371328","name":"蒙阴县"},{"code":"371329","name":"临沭县"},{"code":"371371","name":"临沂高新技术产业开发区"}]},{"code":"371400","name":"德州市","children":[{"code":"371402","name":"德城区"},{"code":"371403","name":"陵城区"},{"code":"371422","name":"宁津县"},{"code":"371423","name":"庆云县"},{"code":"371424","name":"临邑县"},{"code":"371425","name":"齐河县"},{"code":"371426","name":"平原县"},{"code":"371427","name":"夏津县"},{"code":"371428","name":"武城县"},{"code":"371471","name":"德州天衢新区"},{"code":"371481","name":"乐陵市"},{"code":"371482","name":"禹城市"}]},{"code":"371500","name":"聊城市","children":[{"code":"371502","name":"东昌府区"},{"code":"371503","name":"茌平区"},{"code":"371521","name":"阳谷县"},{"code":"371522","name":"莘县"},{"code":"371524","name":"东阿县"},{"code":"371525","name":"冠县"},{"code":"371526","name":"高唐县"},{"code":"371581","name":"临清市"}]},{"code":"371600","name":"滨州市","children":[{"code":"371602","name":"滨城区"},{"code":"371603","name":"沾化区"},{"code":"371621","name":"惠民县"},{"code":"371622","name":"阳信县"},{"code":"371623","name":"无棣县"},{"code":"371625","name":"博兴县"},{"code":"371681","name":"邹平市"}]},{"code":"371700","name":"菏泽市","children":[{"code":"371702","name":"牡丹区"},{"code":"371703","name":"定陶区"},{"code":"371721","name":"曹县"},{"code":"371722","name":"单县"},{"code":"371723","name":"成武县"},{"code":"371724","name":"巨野县"},{"code":"371725","name":"郓城县"},{"code":"371726","name":"鄄城县"},{"code":"371728","name":"东明县"},{"code":"371771","name":"菏泽经济技术开发区"},{"code":"371772","name":"菏泽高新技术开发区"}]}]},{"code":"410000","name":"河南省","children":[{"code":"410100","name":"郑州市","children":[{"code":"410102","name":"中原区"},{"code":"410103","name":"二七区"},{"code":"410104","name":"管城回族区"},{"code":"410105","name":"金水区"},{"code":"410106","name":"上街区"},{"code":"410108","name":"惠济区"},{"code":"410122","name":"中牟县"},{"code":"410171","name":"郑州经济技术开发区"},{"code":"410172","name":"郑州高新技术产业开发区"},{"code":"410173","name":"郑州航空港经济综合实验区"},{"code":"410181","name":"巩义市"},{"code":"410182","name":"荥阳市"},{"code":"410183","name":"新密市"},{"code":"410184","name":"新郑市"},{"code":"410185","name":"登封市"}]},{"code":"410200","name":"开封市","children":[{"code":"410202","name":"龙亭区"},{"code":"410203","name":"顺河回族区"},{"code":"410204","name":"鼓楼区"},{"code":"410205","name":"禹王台区"},{"code":"410212","name":"祥符区"},{"code":"410221","name":"杞县"},{"code":"410222","name":"通许县"},{"code":"410223","name":"尉氏县"},{"code":"410225","name":"兰考县"}]},{"code":"410300","name":"洛阳市","children":[{"code":"410302","name":"老城区"},{"code":"410303","name":"西工区"},{"code":"410304","name":"瀍河回族区"},{"code":"410305","name":"涧西区"},{"code":"410307","name":"偃师区"},{"code":"410308","name":"孟津区"},{"code":"410311","name":"洛龙区"},{"code":"410323","name":"新安县"},{"code":"410324","name":"栾川县"},{"code":"410325","name":"嵩县"},{"code":"410326","name":"汝阳县"},{"code":"410327","name":"宜阳县"},{"code":"410328","name":"洛宁县"},{"code":"410329","name":"伊川县"},{"code":"410371","name":"洛阳高新技术产业开发区"}]},{"code":"410400","name":"平顶山市","children":[{"code":"410402","name":"新华区"},{"code":"410403","name":"卫东区"},{"code":"410404","name":"石龙区"},{"code":"410411","name":"湛河区"},{"code":"410421","name":"宝丰县"},{"code":"410422","name":"叶县"},{"code":"410423","name":"鲁山县"},{"code":"410425","name":"郏县"},{"code":"410471","name":"平顶山高新技术产业开发区"},{"code":"410472","name":"平顶山市城乡一体化示范区"},{"code":"410481","name":"舞钢市"},{"code":"410482","name":"汝州市"}]},{"code":"410500","name":"安阳市","children":[{"code":"410502","name":"文峰区"},{"code":"410503","name":"北关区"},{"code":"410505","name":"殷都区"},{"code":"410506","name":"龙安区"},{"code":"410522","name":"安阳县"},{"code":"410523","name":"汤阴县"},{"code":"410526","name":"滑县"},{"code":"410527","name":"内黄县"},{"code":"410571","name":"安阳高新技术产业开发区"},{"code":"410581","name":"林州市"}]},{"code":"410600","name":"鹤壁市","children":[{"code":"410602","name":"鹤山区"},{"code":"410603","name":"山城区"},{"code":"410611","name":"淇滨区"},{"code":"410621","name":"浚县"},{"code":"410622","name":"淇县"},{"code":"410671","name":"鹤壁经济技术开发区"}]},{"code":"410700","name":"新乡市","children":[{"code":"410702","name":"红旗区"},{"code":"410703","name":"卫滨区"},{"code":"410704","name":"凤泉区"},{"code":"410711","name":"牧野区"},{"code":"410721","name":"新乡县"},{"code":"410724","name":"获嘉县"},{"code":"410725","name":"原阳县"},{"code":"410726","name":"延津县"},{"code":"410727","name":"封丘县"},{"code":"410771","name":"新乡高新技术产业开发区"},{"code":"410772","name":"新乡经济技术开发区"},{"code":"410773","name":"新乡市平原城乡一体化示范区"},{"code":"410781","name":"卫辉市"},{"code":"410782","name":"辉县市"},{"code":"410783","name":"长垣市"}]},{"code":"410800","name":"焦作市","children":[{"code":"410802","name":"解放区"},{"code":"410803","name":"中站区"},{"code":"410804","name":"马村区"},{"code":"410811","name":"山阳区"},{"code":"410821","name":"修武县"},{"code":"410822","name":"博爱县"},{"code":"410823","name":"武陟县"},{"code":"410825","name":"温县"},{"code":"410871","name":"焦作城乡一体化示范区"},{"code":"410882","name":"沁阳市"},{"code":"410883","name":"孟州市"}]},{"code":"410900","name":"濮阳市","children":[{"code":"410902","name":"华龙区"},{"code":"410922","name":"清丰县"},{"code":"410923","name":"南乐县"},{"code":"410926","name":"范县"},{"code":"410927","name":"台前县"},{"code":"410928","name":"濮阳县"},{"code":"410971","name":"河南濮阳工业园区"},{"code":"410972","name":"濮阳经济技术开发区"}]},{"code":"411000","name":"许昌市","children":[{"code":"411002","name":"魏都区"},{"code":"411003","name":"建安区"},{"code":"411024","name":"鄢陵县"},{"code":"411025","name":"襄城县"},{"code":"411071","name":"许昌经济技术开发区"},{"code":"411081","name":"禹州市"},{"code":"411082","name":"长葛市"}]},{"code":"411100","name":"漯河市","children":[{"code":"411102","name":"源汇区"},{"code":"411103","name":"郾城区"},{"code":"411104","name":"召陵区"},{"code":"411121","name":"舞阳县"},{"code":"411122","name":"临颍县"},{"code":"411171","name":"漯河经济技术开发区"}]},{"code":"411200","name":"三门峡市","children":[{"code":"411202","name":"湖滨区"},{"code":"411203","name":"陕州区"},{"code":"411221","name":"渑池县"},{"code":"411224","name":"卢氏县"},{"code":"411271","name":"河南三门峡经济开发区"},{"code":"411281","name":"义马市"},{"code":"411282","name":"灵宝市"}]},{"code":"411300","name":"南阳市","children":[{"code":"411302","name":"宛城区"},{"code":"411303","name":"卧龙区"},{"code":"411321","name":"南召县"},{"code":"411322","name":"方城县"},{"code":"411323","name":"西峡县"},{"code":"411324","name":"镇平县"},{"code":"411325","name":"内乡县"},{"code":"411326","name":"淅川县"},{"code":"411327","name":"社旗县"},{"code":"411328","name":"唐河县"},{"code":"411329","name":"新野县"},{"code":"411330","name":"桐柏县"},{"code":"411371","name":"南阳高新技术产业开发区"},{"code":"411372","name":"南阳市城乡一体化示范区"},{"code":"411381","name":"邓州市"}]},{"code":"411400","name":"商丘市","children":[{"code":"411402","name":"梁园区"},{"code":"411403","name":"睢阳区"},{"code":"411421","name":"民权县"},{"code":"411422","name":"睢县"},{"code":"411423","name":"宁陵县"},{"code":"411424","name":"柘城县"},{"code":"411425","name":"虞城县"},{"code":"411426","name":"夏邑县"},{"code":"411471","name":"豫东综合物流产业聚集区"},{"code":"411472","name":"河南商丘经济开发区"},{"code":"411481","name":"永城市"}]},{"code":"411500","name":"信阳市","children":[{"code":"411502","name":"浉河区"},{"code":"411503","name":"平桥区"},{"code":"411521","name":"罗山县"},{"code":"411522","name":"光山县"},{"code":"411523","name":"新县"},{"code":"411524","name":"商城县"},{"code":"411525","name":"固始县"},{"code":"411526","name":"潢川县"},{"code":"411527","name":"淮滨县"},{"code":"411528","name":"息县"},{"code":"411571","name":"信阳高新技术产业开发区"}]},{"code":"411600","name":"周口市","children":[{"code":"411602","name":"川汇区"},{"code":"411603","name":"淮阳区"},{"code":"411621","name":"扶沟县"},{"code":"411622","name":"西华县"},{"code":"411623","name":"商水县"},{"code":"411624","name":"沈丘县"},{"code":"411625","name":"郸城县"},{"code":"411627","name":"太康县"},{"code":"411628","name":"鹿邑县"},{"code":"411671","name":"河南周口经济开发区"},{"code":"411681","name":"项城市"}]},{"code":"411700","name":"驻马店市","children":[{"code":"411702","name":"驿城区"},{"code":"411721","name":"西平县"},{"code":"411722","name":"上蔡县"},{"code":"411723","name":"平舆县"},{"code":"411724","name":"正阳县"},{"code":"411725","name":"确山县"},{"code":"411726","name":"泌阳县"},{"code":"411727","name":"汝南县"},{"code":"411728","name":"遂平县"},{"code":"411729","name":"新蔡县"},{"code":"411771","name":"河南驻马店经济开发区"}]},{"code":"419000","name":"省直辖县级行政区划","children":[{"code":"419001","name":"济源市"}]}]},{"code":"420000","name":"湖北省","children":[{"code":"420100","name":"武汉市","children":[{"code":"420102","name":"江岸区"},{"code":"420103","name":"江汉区"},{"code":"420104","name":"硚口区"},{"code":"420105","name":"汉阳区"},{"code":"420106","name":"武昌区"},{"code":"420107","name":"青山区"},{"code":"420111","name":"洪山区"},{"code":"420112","name":"东西湖区"},{"code":"420113","name":"汉南区"},{"code":"420114","name":"蔡甸区"},{"code":"420115","name":"江夏区"},{"code":"420116","name":"黄陂区"},{"code":"420117","name":"新洲区"}]},{"code":"420200","name":"黄石市","children":[{"code":"420202","name":"黄石港区"},{"code":"420203","name":"西塞山区"},{"code":"420204","name":"下陆区"},{"code":"420205","name":"铁山区"},{"code":"420222","name":"阳新县"},{"code":"420281","name":"大冶市"}]},{"code":"420300","name":"十堰市","children":[{"code":"420302","name":"茅箭区"},{"code":"420303","name":"张湾区"},{"code":"420304","name":"郧阳区"},{"code":"420322","name":"郧西县"},{"code":"420323","name":"竹山县"},{"code":"420324","name":"竹溪县"},{"code":"420325","name":"房县"},{"code":"420381","name":"丹江口市"}]},{"code":"420500","name":"宜昌市","children":[{"code":"420502","name":"西陵区"},{"code":"420503","name":"伍家岗区"},{"code":"420504","name":"点军区"},{"code":"420505","name":"猇亭区"},{"code":"420506","name":"夷陵区"},{"code":"420525","name":"远安县"},{"code":"420526","name":"兴山县"},{"code":"420527","name":"秭归县"},{"code":"420528","name":"长阳土家族自治县"},{"code":"420529","name":"五峰土家族自治县"},{"code":"420581","name":"宜都市"},{"code":"420582","name":"当阳市"},{"code":"420583","name":"枝江市"}]},{"code":"420600","name":"襄阳市","children":[{"code":"420602","name":"襄城区"},{"code":"420606","name":"樊城区"},{"code":"420607","name":"襄州区"},{"code":"420624","name":"南漳县"},{"code":"420625","name":"谷城县"},{"code":"420626","name":"保康县"},{"code":"420682","name":"老河口市"},{"code":"420683","name":"枣阳市"},{"code":"420684","name":"宜城市"}]},{"code":"420700","name":"鄂州市","children":[{"code":"420702","name":"梁子湖区"},{"code":"420703","name":"华容区"},{"code":"420704","name":"鄂城区"}]},{"code":"420800","name":"荆门市","children":[{"code":"420802","name":"东宝区"},{"code":"420804","name":"掇刀区"},{"code":"420822","name":"沙洋县"},{"code":"420881","name":"钟祥市"},{"code":"420882","name":"京山市"}]},{"code":"420900","name":"孝感市","children":[{"code":"420902","name":"孝南区"},{"code":"420921","name":"孝昌县"},{"code":"420922","name":"大悟县"},{"code":"420923","name":"云梦县"},{"code":"420981","name":"应城市"},{"code":"420982","name":"安陆市"},{"code":"420984","name":"汉川市"}]},{"code":"421000","name":"荆州市","children":[{"code":"421002","name":"沙市区"},{"code":"421003","name":"荆州区"},{"code":"421022","name":"公安县"},{"code":"421024","name":"江陵县"},{"code":"421071","name":"荆州经济技术开发区"},{"code":"421081","name":"石首市"},{"code":"421083","name":"洪湖市"},{"code":"421087","name":"松滋市"},{"code":"421088","name":"监利市"}]},{"code":"421100","name":"黄冈市","children":[{"code":"421102","name":"黄州区"},{"code":"421121","name":"团风县"},{"code":"421122","name":"红安县"},{"code":"421123","name":"罗田县"},{"code":"421124","name":"英山县"},{"code":"421125","name":"浠水县"},{"code":"421126","name":"蕲春县"},{"code":"421127","name":"黄梅县"},{"code":"421171","name":"龙感湖管理区"},{"code":"421181","name":"麻城市"},{"code":"421182","name":"武穴市"}]},{"code":"421200","name":"咸宁市","children":[{"code":"421202","name":"咸安区"},{"code":"421221","name":"嘉鱼县"},{"code":"421222","name":"通城县"},{"code":"421223","name":"崇阳县"},{"code":"421224","name":"通山县"},{"code":"421281","name":"赤壁市"}]},{"code":"421300","name":"随州市","children":[{"code":"421303","name":"曾都区"},{"code":"421321","name":"随县"},{"code":"421381","name":"广水市"}]},{"code":"422800","name":"恩施土家族苗族自治州","children":[{"code":"422801","name":"恩施市"},{"code":"422802","name":"利川市"},{"code":"422822","name":"建始县"},{"code":"422823","name":"巴东县"},{"code":"422825","name":"宣恩县"},{"code":"422826","name":"咸丰县"},{"code":"422827","name":"来凤县"},{"code":"422828","name":"鹤峰县"}]},{"code":"429000","name":"省直辖县级行政区划","children":[{"code":"429004","name":"仙桃市"},{"code":"429005","name":"潜江市"},{"code":"429006","name":"天门市"},{"code":"429021","name":"神农架林区"}]}]},{"code":"430000","name":"湖南省","children":[{"code":"430100","name":"长沙市","children":[{"code":"430102","name":"芙蓉区"},{"code":"430103","name":"天心区"},{"code":"430104","name":"岳麓区"},{"code":"430105","name":"开福区"},{"code":"430111","name":"雨花区"},{"code":"430112","name":"望城区"},{"code":"430121","name":"长沙县"},{"code":"430181","name":"浏阳市"},{"code":"430182","name":"宁乡市"}]},{"code":"430200","name":"株洲市","children":[{"code":"430202","name":"荷塘区"},{"code":"430203","name":"芦淞区"},{"code":"430204","name":"石峰区"},{"code":"430211","name":"天元区"},{"code":"430212","name":"渌口区"},{"code":"430223","name":"攸县"},{"code":"430224","name":"茶陵县"},{"code":"430225","name":"炎陵县"},{"code":"430281","name":"醴陵市"}]},{"code":"430300","name":"湘潭市","children":[{"code":"430302","name":"雨湖区"},{"code":"430304","name":"岳塘区"},{"code":"430321","name":"湘潭县"},{"code":"430371","name":"湖南湘潭高新技术产业园区"},{"code":"430372","name":"湘潭昭山示范区"},{"code":"430373","name":"湘潭九华示范区"},{"code":"430381","name":"湘乡市"},{"code":"430382","name":"韶山市"}]},{"code":"430400","name":"衡阳市","children":[{"code":"430405","name":"珠晖区"},{"code":"430406","name":"雁峰区"},{"code":"430407","name":"石鼓区"},{"code":"430408","name":"蒸湘区"},{"code":"430412","name":"南岳区"},{"code":"430421","name":"衡阳县"},{"code":"430422","name":"衡南县"},{"code":"430423","name":"衡山县"},{"code":"430424","name":"衡东县"},{"code":"430426","name":"祁东县"},{"code":"430471","name":"衡阳综合保税区"},{"code":"430472","name":"湖南衡阳高新技术产业园区"},{"code":"430473","name":"湖南衡阳松木经济开发区"},{"code":"430481","name":"耒阳市"},{"code":"430482","name":"常宁市"}]},{"code":"430500","name":"邵阳市","children":[{"code":"430502","name":"双清区"},{"code":"430503","name":"大祥区"},{"code":"430511","name":"北塔区"},{"code":"430522","name":"新邵县"},{"code":"430523","name":"邵阳县"},{"code":"430524","name":"隆回县"},{"code":"430525","name":"洞口县"},{"code":"430527","name":"绥宁县"},{"code":"430528","name":"新宁县"},{"code":"430529","name":"城步苗族自治县"},{"code":"430581","name":"武冈市"},{"code":"430582","name":"邵东市"}]},{"code":"430600","name":"岳阳市","children":[{"code":"430602","name":"岳阳楼区"},{"code":"430603","name":"云溪区"},{"code":"430611","name":"君山区"},{"code":"430621","name":"岳阳县"},{"code":"430623","name":"华容县"},{"code":"430624","name":"湘阴县"},{"code":"430626","name":"平江县"},{"code":"430671","name":"岳阳市屈原管理区"},{"code":"430681","name":"汨罗市"},{"code":"430682","name":"临湘市"}]},{"code":"430700","name":"常德市","children":[{"code":"430702","name":"武陵区"},{"code":"430703","name":"鼎城区"},{"code":"430721","name":"安乡县"},{"code":"430722","name":"汉寿县"},{"code":"430723","name":"澧县"},{"code":"430724","name":"临澧县"},{"code":"430725","name":"桃源县"},{"code":"430726","name":"石门县"},{"code":"430771","name":"常德市西洞庭管理区"},{"code":"430781","name":"津市市"}]},{"code":"430800","name":"张家界市","children":[{"code":"430802","name":"永定区"},{"code":"430811","name":"武陵源区"},{"code":"430821","name":"慈利县"},{"code":"430822","name":"桑植县"}]},{"code":"430900","name":"益阳市","children":[{"code":"430902","name":"资阳区"},{"code":"430903","name":"赫山区"},{"code":"430921","name":"南县"},{"code":"430922","name":"桃江县"},{"code":"430923","name":"安化县"},{"code":"430971","name":"益阳市大通湖管理区"},{"code":"430972","name":"湖南益阳高新技术产业园区"},{"code":"430981","name":"沅江市"}]},{"code":"431000","name":"郴州市","children":[{"code":"431002","name":"北湖区"},{"code":"431003","name":"苏仙区"},{"code":"431021","name":"桂阳县"},{"code":"431022","name":"宜章县"},{"code":"431023","name":"永兴县"},{"code":"431024","name":"嘉禾县"},{"code":"431025","name":"临武县"},{"code":"431026","name":"汝城县"},{"code":"431027","name":"桂东县"},{"code":"431028","name":"安仁县"},{"code":"431081","name":"资兴市"}]},{"code":"431100","name":"永州市","children":[{"code":"431102","name":"零陵区"},{"code":"431103","name":"冷水滩区"},{"code":"431122","name":"东安县"},{"code":"431123","name":"双牌县"},{"code":"431124","name":"道县"},{"code":"431125","name":"江永县"},{"code":"431126","name":"宁远县"},{"code":"431127","name":"蓝山县"},{"code":"431128","name":"新田县"},{"code":"431129","name":"江华瑶族自治县"},{"code":"431171","name":"永州经济技术开发区"},{"code":"431173","name":"永州市回龙圩管理区"},{"code":"431181","name":"祁阳市"}]},{"code":"431200","name":"怀化市","children":[{"code":"431202","name":"鹤城区"},{"code":"431221","name":"中方县"},{"code":"431222","name":"沅陵县"},{"code":"431223","name":"辰溪县"},{"code":"431224","name":"溆浦县"},{"code":"431225","name":"会同县"},{"code":"431226","name":"麻阳苗族自治县"},{"code":"431227","name":"新晃侗族自治县"},{"code":"431228","name":"芷江侗族自治县"},{"code":"431229","name":"靖州苗族侗族自治县"},{"code":"431230","name":"通道侗族自治县"},{"code":"431271","name":"怀化市洪江管理区"},{"code":"431281","name":"洪江市"}]},{"code":"431300","name":"娄底市","children":[{"code":"431302","name":"娄星区"},{"code":"431321","name":"双峰县"},{"code":"431322","name":"新化县"},{"code":"431381","name":"冷水江市"},{"code":"431382","name":"涟源市"}]},{"code":"433100","name":"湘西土家族苗族自治州","children":[{"code":"433101","name":"吉首市"},{"code":"433122","name":"泸溪县"},{"code":"433123","name":"凤凰县"},{"code":"433124","name":"花垣县"},{"code":"433125","name":"保靖县"},{"code":"433126","name":"古丈县"},{"code":"433127","name":"永顺县"},{"code":"433130","name":"龙山县"}]}]},{"code":"450000","name":"广西壮族自治区","children":[{"code":"450100","name":"南宁市","children":[{"code":"450102","name":"兴宁区"},{"code":"450103","name":"青秀区"},{"code":"450105","name":"江南区"},{"code":"450107","name":"西乡塘区"},{"code":"450108","name":"良庆区"},{"code":"450109","name":"邕宁区"},{"code":"450110","name":"武鸣区"},{"code":"450123","name":"隆安县"},{"code":"450124","name":"马山县"},{"code":"450125","name":"上林县"},{"code":"450126","name":"宾阳县"},{"code":"450181","name":"横州市"}]},{"code":"450200","name":"柳州市","children":[{"code":"450202","name":"城中区"},{"code":"450203","name":"鱼峰区"},{"code":"450204","name":"柳南区"},{"code":"450205","name":"柳北区"},{"code":"450206","name":"柳江区"},{"code":"450222","name":"柳城县"},{"code":"450223","name":"鹿寨县"},{"code":"450224","name":"融安县"},{"code":"450225","name":"融水苗族自治县"},{"code":"450226","name":"三江侗族自治县"}]},{"code":"450300","name":"桂林市","children":[{"code":"450302","name":"秀峰区"},{"code":"450303","name":"叠彩区"},{"code":"450304","name":"象山区"},{"code":"450305","name":"七星区"},{"code":"450311","name":"雁山区"},{"code":"450312","name":"临桂区"},{"code":"450321","name":"阳朔县"},{"code":"450323","name":"灵川县"},{"code":"450324","name":"全州县"},{"code":"450325","name":"兴安县"},{"code":"450326","name":"永福县"},{"code":"450327","name":"灌阳县"},{"code":"450328","name":"龙胜各族自治县"},{"code":"450329","name":"资源县"},{"code":"450330","name":"平乐县"},{"code":"450332","name":"恭城瑶族自治县"},{"code":"450381","name":"荔浦市"}]},{"code":"450400","name":"梧州市","children":[{"code":"450403","name":"万秀区"},{"code":"450405","name":"长洲区"},{"code":"450406","name":"龙圩区"},{"code":"450421","name":"苍梧县"},{"code":"450422","name":"藤县"},{"code":"450423","name":"蒙山县"},{"code":"450481","name":"岑溪市"}]},{"code":"450500","name":"北海市","children":[{"code":"450502","name":"海城区"},{"code":"450503","name":"银海区"},{"code":"450512","name":"铁山港区"},{"code":"450521","name":"合浦县"}]},{"code":"450600","name":"防城港市","children":[{"code":"450602","name":"港口区"},{"code":"450603","name":"防城区"},{"code":"450621","name":"上思县"},{"code":"450681","name":"东兴市"}]},{"code":"450700","name":"钦州市","children":[{"code":"450702","name":"钦南区"},{"code":"450703","name":"钦北区"},{"code":"450721","name":"灵山县"},{"code":"450722","name":"浦北县"}]},{"code":"450800","name":"贵港市","children":[{"code":"450802","name":"港北区"},{"code":"450803","name":"港南区"},{"code":"450804","name":"覃塘区"},{"code":"450821","name":"平南县"},{"code":"450881","name":"桂平市"}]},{"code":"450900","name":"玉林市","children":[{"code":"450902","name":"玉州区"},{"code":"450903","name":"福绵区"},{"code":"450921","name":"容县"},{"code":"450922","name":"陆川县"},{"code":"450923","name":"博白县"},{"code":"450924","name":"兴业县"},{"code":"450981","name":"北流市"}]},{"code":"451000","name":"百色市","children":[{"code":"451002","name":"右江区"},{"code":"451003","name":"田阳区"},{"code":"451022","name":"田东县"},{"code":"451024","name":"德保县"},{"code":"451026","name":"那坡县"},{"code":"451027","name":"凌云县"},{"code":"451028","name":"乐业县"},{"code":"451029","name":"田林县"},{"code":"451030","name":"西林县"},{"code":"451031","name":"隆林各族自治县"},{"code":"451081","name":"靖西市"},{"code":"451082","name":"平果市"}]},{"code":"451100","name":"贺州市","children":[{"code":"451102","name":"八步区"},{"code":"451103","name":"平桂区"},{"code":"451121","name":"昭平县"},{"code":"451122","name":"钟山县"},{"code":"451123","name":"富川瑶族自治县"}]},{"code":"451200","name":"河池市","children":[{"code":"451202","name":"金城江区"},{"code":"451203","name":"宜州区"},{"code":"451221","name":"南丹县"},{"code":"451222","name":"天峨县"},{"code":"451223","name":"凤山县"},{"code":"451224","name":"东兰县"},{"code":"451225","name":"罗城仫佬族自治县"},{"code":"451226","name":"环江毛南族自治县"},{"code":"451227","name":"巴马瑶族自治县"},{"code":"451228","name":"都安瑶族自治县"},{"code":"451229","name":"大化瑶族自治县"}]},{"code":"451300","name":"来宾市","children":[{"code":"451302","name":"兴宾区"},{"code":"451321","name":"忻城县"},{"code":"451322","name":"象州县"},{"code":"451323","name":"武宣县"},{"code":"451324","name":"金秀瑶族自治县"},{"code":"451381","name":"合山市"}]},{"code":"451400","name":"崇左市","children":[{"code":"451402","name":"江州区"},{"code":"451421","name":"扶绥县"},{"code":"451422","name":"宁明县"},{"code":"451423","name":"龙州县"},{"code":"451424","name":"大新县"},{"code":"451425","name":"天等县"},{"code":"451481","name":"凭祥市"}]}]},{"code":"460000","name":"海南省","children":[{"code":"460100","name":"海口市","children":[{"code":"460105","name":"秀英区"},{"code":"460106","name":"龙华区"},{"code":"460107","name":"琼山区"},{"code":"460108","name":"美兰区"}]},{"code":"460200","name":"三亚市","children":[{"code":"460202","name":"海棠区"},{"code":"460203","name":"吉阳区"},{"code":"460204","name":"天涯区"},{"code":"460205","name":"崖州区"}]},{"code":"460300","name":"三沙市","children":[{"code":"460321","name":"西沙群岛"},{"code":"460322","name":"南沙群岛"},{"code":"460323","name":"中沙群岛的岛礁及其海域"}]},{"code":"460400","name":"儋州市","children":[{"code":"460400100","name":"那大镇"},{"code":"460400101","name":"和庆镇"},{"code":"460400102","name":"南丰镇"},{"code":"460400103","name":"大成镇"},{"code":"460400104","name":"雅星镇"},{"code":"460400105","name":"兰洋镇"},{"code":"460400106","name":"光村镇"},{"code":"460400107","name":"木棠镇"},{"code":"460400108","name":"海头镇"},{"code":"460400109","name":"峨蔓镇"},{"code":"460400111","name":"王五镇"},{"code":"460400112","name":"白马井镇"},{"code":"460400113","name":"中和镇"},{"code":"460400114","name":"排浦镇"},{"code":"460400115","name":"东成镇"},{"code":"460400116","name":"新州镇"},{"code":"460400499","name":"洋浦经济开发区"},{"code":"460400500","name":"华南热作学院"}]},{"code":"469000","name":"省直辖县级行政区划","children":[{"code":"469001","name":"五指山市"},{"code":"469002","name":"琼海市"},{"code":"469005","name":"文昌市"},{"code":"469006","name":"万宁市"},{"code":"469007","name":"东方市"},{"code":"469021","name":"定安县"},{"code":"469022","name":"屯昌县"},{"code":"469023","name":"澄迈县"},{"code":"469024","name":"临高县"},{"code":"469025","name":"白沙黎族自治县"},{"code":"469026","name":"昌江黎族自治县"},{"code":"469027","name":"乐东黎族自治县"},{"code":"469028","name":"陵水黎族自治县"},{"code":"469029","name":"保亭黎族苗族自治县"},{"code":"469030","name":"琼中黎族苗族自治县"}]}]},{"code":"500000","name":"重庆市","children":[{"code":"500100","name":"市辖区","children":[{"code":"500101","name":"万州区"},{"code":"500102","name":"涪陵区"},{"code":"500103","name":"渝中区"},{"code":"500104","name":"大渡口区"},{"code":"500105","name":"江北区"},{"code":"500106","name":"沙坪坝区"},{"code":"500107","name":"九龙坡区"},{"code":"500108","name":"南岸区"},{"code":"500109","name":"北碚区"},{"code":"500110","name":"綦江区"},{"code":"500111","name":"大足区"},{"code":"500112","name":"渝北区"},{"code":"500113","name":"巴南区"},{"code":"500114","name":"黔江区"},{"code":"500115","name":"长寿区"},{"code":"500116","name":"江津区"},{"code":"500117","name":"合川区"},{"code":"500118","name":"永川区"},{"code":"500119","name":"南川区"},{"code":"500120","name":"璧山区"},{"code":"500151","name":"铜梁区"},{"code":"500152","name":"潼南区"},{"code":"500153","name":"荣昌区"},{"code":"500154","name":"开州区"},{"code":"500155","name":"梁平区"},{"code":"500156","name":"武隆区"}]},{"code":"500200","name":"县","children":[{"code":"500229","name":"城口县"},{"code":"500230","name":"丰都县"},{"code":"500231","name":"垫江县"},{"code":"500233","name":"忠县"},{"code":"500235","name":"云阳县"},{"code":"500236","name":"奉节县"},{"code":"500237","name":"巫山县"},{"code":"500238","name":"巫溪县"},{"code":"500240","name":"石柱土家族自治县"},{"code":"500241","name":"秀山土家族苗族自治县"},{"code":"500242","name":"酉阳土家族苗族自治县"},{"code":"500243","name":"彭水苗族土家族自治县"}]}]},{"code":"510000","name":"四川省","children":[{"code":"510100","name":"成都市","children":[{"code":"510104","name":"锦江区"},{"code":"510105","name":"青羊区"},{"code":"510106","name":"金牛区"},{"code":"510107","name":"武侯区"},{"code":"510108","name":"成华区"},{"code":"510112","name":"龙泉驿区"},{"code":"510113","name":"青白江区"},{"code":"510114","name":"新都区"},{"code":"510115","name":"温江区"},{"code":"510116","name":"双流区"},{"code":"510117","name":"郫都区"},{"code":"510118","name":"新津区"},{"code":"510121","name":"金堂县"},{"code":"510129","name":"大邑县"},{"code":"510131","name":"蒲江县"},{"code":"510181","name":"都江堰市"},{"code":"510182","name":"彭州市"},{"code":"510183","name":"邛崃市"},{"code":"510184","name":"崇州市"},{"code":"510185","name":"简阳市"}]},{"code":"510300","name":"自贡市","children":[{"code":"510302","name":"自流井区"},{"code":"510303","name":"贡井区"},{"code":"510304","name":"大安区"},{"code":"510311","name":"沿滩区"},{"code":"510321","name":"荣县"},{"code":"510322","name":"富顺县"}]},{"code":"510400","name":"攀枝花市","children":[{"code":"510402","name":"东区"},{"code":"510403","name":"西区"},{"code":"510411","name":"仁和区"},{"code":"510421","name":"米易县"},{"code":"510422","name":"盐边县"}]},{"code":"510500","name":"泸州市","children":[{"code":"510502","name":"江阳区"},{"code":"510503","name":"纳溪区"},{"code":"510504","name":"龙马潭区"},{"code":"510521","name":"泸县"},{"code":"510522","name":"合江县"},{"code":"510524","name":"叙永县"},{"code":"510525","name":"古蔺县"}]},{"code":"510600","name":"德阳市","children":[{"code":"510603","name":"旌阳区"},{"code":"510604","name":"罗江区"},{"code":"510623","name":"中江县"},{"code":"510681","name":"广汉市"},{"code":"510682","name":"什邡市"},{"code":"510683","name":"绵竹市"}]},{"code":"510700","name":"绵阳市","children":[{"code":"510703","name":"涪城区"},{"code":"510704","name":"游仙区"},{"code":"510705","name":"安州区"},{"code":"510722","name":"三台县"},{"code":"510723","name":"盐亭县"},{"code":"510725","name":"梓潼县"},{"code":"510726","name":"北川羌族自治县"},{"code":"510727","name":"平武县"},{"code":"510781","name":"江油市"}]},{"code":"510800","name":"广元市","children":[{"code":"510802","name":"利州区"},{"code":"510811","name":"昭化区"},{"code":"510812","name":"朝天区"},{"code":"510821","name":"旺苍县"},{"code":"510822","name":"青川县"},{"code":"510823","name":"剑阁县"},{"code":"510824","name":"苍溪县"}]},{"code":"510900","name":"遂宁市","children":[{"code":"510903","name":"船山区"},{"code":"510904","name":"安居区"},{"code":"510921","name":"蓬溪县"},{"code":"510923","name":"大英县"},{"code":"510981","name":"射洪市"}]},{"code":"511000","name":"内江市","children":[{"code":"511002","name":"市中区"},{"code":"511011","name":"东兴区"},{"code":"511024","name":"威远县"},{"code":"511025","name":"资中县"},{"code":"511083","name":"隆昌市"}]},{"code":"511100","name":"乐山市","children":[{"code":"511102","name":"市中区"},{"code":"511111","name":"沙湾区"},{"code":"511112","name":"五通桥区"},{"code":"511113","name":"金口河区"},{"code":"511123","name":"犍为县"},{"code":"511124","name":"井研县"},{"code":"511126","name":"夹江县"},{"code":"511129","name":"沐川县"},{"code":"511132","name":"峨边彝族自治县"},{"code":"511133","name":"马边彝族自治县"},{"code":"511181","name":"峨眉山市"}]},{"code":"511300","name":"南充市","children":[{"code":"511302","name":"顺庆区"},{"code":"511303","name":"高坪区"},{"code":"511304","name":"嘉陵区"},{"code":"511321","name":"南部县"},{"code":"511322","name":"营山县"},{"code":"511323","name":"蓬安县"},{"code":"511324","name":"仪陇县"},{"code":"511325","name":"西充县"},{"code":"511381","name":"阆中市"}]},{"code":"511400","name":"眉山市","children":[{"code":"511402","name":"东坡区"},{"code":"511403","name":"彭山区"},{"code":"511421","name":"仁寿县"},{"code":"511423","name":"洪雅县"},{"code":"511424","name":"丹棱县"},{"code":"511425","name":"青神县"}]},{"code":"511500","name":"宜宾市","children":[{"code":"511502","name":"翠屏区"},{"code":"511503","name":"南溪区"},{"code":"511504","name":"叙州区"},{"code":"511523","name":"江安县"},{"code":"511524","name":"长宁县"},{"code":"511525","name":"高县"},{"code":"511526","name":"珙县"},{"code":"511527","name":"筠连县"},{"code":"511528","name":"兴文县"},{"code":"511529","name":"屏山县"}]},{"code":"511600","name":"广安市","children":[{"code":"511602","name":"广安区"},{"code":"511603","name":"前锋区"},{"code":"511621","name":"岳池县"},{"code":"511622","name":"武胜县"},{"code":"511623","name":"邻水县"},{"code":"511681","name":"华蓥市"}]},{"code":"511700","name":"达州市","children":[{"code":"511702","name":"通川区"},{"code":"511703","name":"达川区"},{"code":"511722","name":"宣汉县"},{"code":"511723","name":"开江县"},{"code":"511724","name":"大竹县"},{"code":"511725","name":"渠县"},{"code":"511781","name":"万源市"}]},{"code":"511800","name":"雅安市","children":[{"code":"511802","name":"雨城区"},{"code":"511803","name":"名山区"},{"code":"511822","name":"荥经县"},{"code":"511823","name":"汉源县"},{"code":"511824","name":"石棉县"},{"code":"511825","name":"天全县"},{"code":"511826","name":"芦山县"},{"code":"511827","name":"宝兴县"}]},{"code":"511900","name":"巴中市","children":[{"code":"511902","name":"巴州区"},{"code":"511903","name":"恩阳区"},{"code":"511921","name":"通江县"},{"code":"511922","name":"南江县"},{"code":"511923","name":"平昌县"}]},{"code":"512000","name":"资阳市","children":[{"code":"512002","name":"雁江区"},{"code":"512021","name":"安岳县"},{"code":"512022","name":"乐至县"}]},{"code":"513200","name":"阿坝藏族羌族自治州","children":[{"code":"513201","name":"马尔康市"},{"code":"513221","name":"汶川县"},{"code":"513222","name":"理县"},{"code":"513223","name":"茂县"},{"code":"513224","name":"松潘县"},{"code":"513225","name":"九寨沟县"},{"code":"513226","name":"金川县"},{"code":"513227","name":"小金县"},{"code":"513228","name":"黑水县"},{"code":"513230","name":"壤塘县"},{"code":"513231","name":"阿坝县"},{"code":"513232","name":"若尔盖县"},{"code":"513233","name":"红原县"}]},{"code":"513300","name":"甘孜藏族自治州","children":[{"code":"513301","name":"康定市"},{"code":"513322","name":"泸定县"},{"code":"513323","name":"丹巴县"},{"code":"513324","name":"九龙县"},{"code":"513325","name":"雅江县"},{"code":"513326","name":"道孚县"},{"code":"513327","name":"炉霍县"},{"code":"513328","name":"甘孜县"},{"code":"513329","name":"新龙县"},{"code":"513330","name":"德格县"},{"code":"513331","name":"白玉县"},{"code":"513332","name":"石渠县"},{"code":"513333","name":"色达县"},{"code":"513334","name":"理塘县"},{"code":"513335","name":"巴塘县"},{"code":"513336","name":"乡城县"},{"code":"513337","name":"稻城县"},{"code":"513338","name":"得荣县"}]},{"code":"513400","name":"凉山彝族自治州","children":[{"code":"513401","name":"西昌市"},{"code":"513402","name":"会理市"},{"code":"513422","name":"木里藏族自治县"},{"code":"513423","name":"盐源县"},{"code":"513424","name":"德昌县"},{"code":"513426","name":"会东县"},{"code":"513427","name":"宁南县"},{"code":"513428","name":"普格县"},{"code":"513429","name":"布拖县"},{"code":"513430","name":"金阳县"},{"code":"513431","name":"昭觉县"},{"code":"513432","name":"喜德县"},{"code":"513433","name":"冕宁县"},{"code":"513434","name":"越西县"},{"code":"513435","name":"甘洛县"},{"code":"513436","name":"美姑县"},{"code":"513437","name":"雷波县"}]}]},{"code":"520000","name":"贵州省","children":[{"code":"520100","name":"贵阳市","children":[{"code":"520102","name":"南明区"},{"code":"520103","name":"云岩区"},{"code":"520111","name":"花溪区"},{"code":"520112","name":"乌当区"},{"code":"520113","name":"白云区"},{"code":"520115","name":"观山湖区"},{"code":"520121","name":"开阳县"},{"code":"520122","name":"息烽县"},{"code":"520123","name":"修文县"},{"code":"520181","name":"清镇市"}]},{"code":"520200","name":"六盘水市","children":[{"code":"520201","name":"钟山区"},{"code":"520203","name":"六枝特区"},{"code":"520204","name":"水城区"},{"code":"520281","name":"盘州市"}]},{"code":"520300","name":"遵义市","children":[{"code":"520302","name":"红花岗区"},{"code":"520303","name":"汇川区"},{"code":"520304","name":"播州区"},{"code":"520322","name":"桐梓县"},{"code":"520323","name":"绥阳县"},{"code":"520324","name":"正安县"},{"code":"520325","name":"道真仡佬族苗族自治县"},{"code":"520326","name":"务川仡佬族苗族自治县"},{"code":"520327","name":"凤冈县"},{"code":"520328","name":"湄潭县"},{"code":"520329","name":"余庆县"},{"code":"520330","name":"习水县"},{"code":"520381","name":"赤水市"},{"code":"520382","name":"仁怀市"}]},{"code":"520400","name":"安顺市","children":[{"code":"520402","name":"西秀区"},{"code":"520403","name":"平坝区"},{"code":"520422","name":"普定县"},{"code":"520423","name":"镇宁布依族苗族自治县"},{"code":"520424","name":"关岭布依族苗族自治县"},{"code":"520425","name":"紫云苗族布依族自治县"}]},{"code":"520500","name":"毕节市","children":[{"code":"520502","name":"七星关区"},{"code":"520521","name":"大方县"},{"code":"520523","name":"金沙县"},{"code":"520524","name":"织金县"},{"code":"520525","name":"纳雍县"},{"code":"520526","name":"威宁彝族回族苗族自治县"},{"code":"520527","name":"赫章县"},{"code":"520581","name":"黔西市"}]},{"code":"520600","name":"铜仁市","children":[{"code":"520602","name":"碧江区"},{"code":"520603","name":"万山区"},{"code":"520621","name":"江口县"},{"code":"520622","name":"玉屏侗族自治县"},{"code":"520623","name":"石阡县"},{"code":"520624","name":"思南县"},{"code":"520625","name":"印江土家族苗族自治县"},{"code":"520626","name":"德江县"},{"code":"520627","name":"沿河土家族自治县"},{"code":"520628","name":"松桃苗族自治县"}]},{"code":"522300","name":"黔西南布依族苗族自治州","children":[{"code":"522301","name":"兴义市"},{"code":"522302","name":"兴仁市"},{"code":"522323","name":"普安县"},{"code":"522324","name":"晴隆县"},{"code":"522325","name":"贞丰县"},{"code":"522326","name":"望谟县"},{"code":"522327","name":"册亨县"},{"code":"522328","name":"安龙县"}]},{"code":"522600","name":"黔东南苗族侗族自治州","children":[{"code":"522601","name":"凯里市"},{"code":"522622","name":"黄平县"},{"code":"522623","name":"施秉县"},{"code":"522624","name":"三穗县"},{"code":"522625","name":"镇远县"},{"code":"522626","name":"岑巩县"},{"code":"522627","name":"天柱县"},{"code":"522628","name":"锦屏县"},{"code":"522629","name":"剑河县"},{"code":"522630","name":"台江县"},{"code":"522631","name":"黎平县"},{"code":"522632","name":"榕江县"},{"code":"522633","name":"从江县"},{"code":"522634","name":"雷山县"},{"code":"522635","name":"麻江县"},{"code":"522636","name":"丹寨县"}]},{"code":"522700","name":"黔南布依族苗族自治州","children":[{"code":"522701","name":"都匀市"},{"code":"522702","name":"福泉市"},{"code":"522722","name":"荔波县"},{"code":"522723","name":"贵定县"},{"code":"522725","name":"瓮安县"},{"code":"522726","name":"独山县"},{"code":"522727","name":"平塘县"},{"code":"522728","name":"罗甸县"},{"code":"522729","name":"长顺县"},{"code":"522730","name":"龙里县"},{"code":"522731","name":"惠水县"},{"code":"522732","name":"三都水族自治县"}]}]},{"code":"530000","name":"云南省","children":[{"code":"530100","name":"昆明市","children":[{"code":"530102","name":"五华区"},{"code":"530103","name":"盘龙区"},{"code":"530111","name":"官渡区"},{"code":"530112","name":"西山区"},{"code":"530113","name":"东川区"},{"code":"530114","name":"呈贡区"},{"code":"530115","name":"晋宁区"},{"code":"530124","name":"富民县"},{"code":"530125","name":"宜良县"},{"code":"530126","name":"石林彝族自治县"},{"code":"530127","name":"嵩明县"},{"code":"530128","name":"禄劝彝族苗族自治县"},{"code":"530129","name":"寻甸回族彝族自治县"},{"code":"530181","name":"安宁市"}]},{"code":"530300","name":"曲靖市","children":[{"code":"530302","name":"麒麟区"},{"code":"530303","name":"沾益区"},{"code":"530304","name":"马龙区"},{"code":"530322","name":"陆良县"},{"code":"530323","name":"师宗县"},{"code":"530324","name":"罗平县"},{"code":"530325","name":"富源县"},{"code":"530326","name":"会泽县"},{"code":"530381","name":"宣威市"}]},{"code":"530400","name":"玉溪市","children":[{"code":"530402","name":"红塔区"},{"code":"530403","name":"江川区"},{"code":"530423","name":"通海县"},{"code":"530424","name":"华宁县"},{"code":"530425","name":"易门县"},{"code":"530426","name":"峨山彝族自治县"},{"code":"530427","name":"新平彝族傣族自治县"},{"code":"530428","name":"元江哈尼族彝族傣族自治县"},{"code":"530481","name":"澄江市"}]},{"code":"530500","name":"保山市","children":[{"code":"530502","name":"隆阳区"},{"code":"530521","name":"施甸县"},{"code":"530523","name":"龙陵县"},{"code":"530524","name":"昌宁县"},{"code":"530581","name":"腾冲市"}]},{"code":"530600","name":"昭通市","children":[{"code":"530602","name":"昭阳区"},{"code":"530621","name":"鲁甸县"},{"code":"530622","name":"巧家县"},{"code":"530623","name":"盐津县"},{"code":"530624","name":"大关县"},{"code":"530625","name":"永善县"},{"code":"530626","name":"绥江县"},{"code":"530627","name":"镇雄县"},{"code":"530628","name":"彝良县"},{"code":"530629","name":"威信县"},{"code":"530681","name":"水富市"}]},{"code":"530700","name":"丽江市","children":[{"code":"530702","name":"古城区"},{"code":"530721","name":"玉龙纳西族自治县"},{"code":"530722","name":"永胜县"},{"code":"530723","name":"华坪县"},{"code":"530724","name":"宁蒗彝族自治县"}]},{"code":"530800","name":"普洱市","children":[{"code":"530802","name":"思茅区"},{"code":"530821","name":"宁洱哈尼族彝族自治县"},{"code":"530822","name":"墨江哈尼族自治县"},{"code":"530823","name":"景东彝族自治县"},{"code":"530824","name":"景谷傣族彝族自治县"},{"code":"530825","name":"镇沅彝族哈尼族拉祜族自治县"},{"code":"530826","name":"江城哈尼族彝族自治县"},{"code":"530827","name":"孟连傣族拉祜族佤族自治县"},{"code":"530828","name":"澜沧拉祜族自治县"},{"code":"530829","name":"西盟佤族自治县"}]},{"code":"530900","name":"临沧市","children":[{"code":"530902","name":"临翔区"},{"code":"530921","name":"凤庆县"},{"code":"530922","name":"云县"},{"code":"530923","name":"永德县"},{"code":"530924","name":"镇康县"},{"code":"530925","name":"双江拉祜族佤族布朗族傣族自治县"},{"code":"530926","name":"耿马傣族佤族自治县"},{"code":"530927","name":"沧源佤族自治县"}]},{"code":"532300","name":"楚雄彝族自治州","children":[{"code":"532301","name":"楚雄市"},{"code":"532302","name":"禄丰市"},{"code":"532322","name":"双柏县"},{"code":"532323","name":"牟定县"},{"code":"532324","name":"南华县"},{"code":"532325","name":"姚安县"},{"code":"532326","name":"大姚县"},{"code":"532327","name":"永仁县"},{"code":"532328","name":"元谋县"},{"code":"532329","name":"武定县"}]},{"code":"532500","name":"红河哈尼族彝族自治州","children":[{"code":"532501","name":"个旧市"},{"code":"532502","name":"开远市"},{"code":"532503","name":"蒙自市"},{"code":"532504","name":"弥勒市"},{"code":"532523","name":"屏边苗族自治县"},{"code":"532524","name":"建水县"},{"code":"532525","name":"石屏县"},{"code":"532527","name":"泸西县"},{"code":"532528","name":"元阳县"},{"code":"532529","name":"红河县"},{"code":"532530","name":"金平苗族瑶族傣族自治县"},{"code":"532531","name":"绿春县"},{"code":"532532","name":"河口瑶族自治县"}]},{"code":"532600","name":"文山壮族苗族自治州","children":[{"code":"532601","name":"文山市"},{"code":"532622","name":"砚山县"},{"code":"532623","name":"西畴县"},{"code":"532624","name":"麻栗坡县"},{"code":"532625","name":"马关县"},{"code":"532626","name":"丘北县"},{"code":"532627","name":"广南县"},{"code":"532628","name":"富宁县"}]},{"code":"532800","name":"西双版纳傣族自治州","children":[{"code":"532801","name":"景洪市"},{"code":"532822","name":"勐海县"},{"code":"532823","name":"勐腊县"}]},{"code":"532900","name":"大理白族自治州","children":[{"code":"532901","name":"大理市"},{"code":"532922","name":"漾濞彝族自治县"},{"code":"532923","name":"祥云县"},{"code":"532924","name":"宾川县"},{"code":"532925","name":"弥渡县"},{"code":"532926","name":"南涧彝族自治县"},{"code":"532927","name":"巍山彝族回族自治县"},{"code":"532928","name":"永平县"},{"code":"532929","name":"云龙县"},{"code":"532930","name":"洱源县"},{"code":"532931","name":"剑川县"},{"code":"532932","name":"鹤庆县"}]},{"code":"533100","name":"德宏傣族景颇族自治州","children":[{"code":"533102","name":"瑞丽市"},{"code":"533103","name":"芒市"},{"code":"533122","name":"梁河县"},{"code":"533123","name":"盈江县"},{"code":"533124","name":"陇川县"}]},{"code":"533300","name":"怒江傈僳族自治州","children":[{"code":"533301","name":"泸水市"},{"code":"533323","name":"福贡县"},{"code":"533324","name":"贡山独龙族怒族自治县"},{"code":"533325","name":"兰坪白族普米族自治县"}]},{"code":"533400","name":"迪庆藏族自治州","children":[{"code":"533401","name":"香格里拉市"},{"code":"533422","name":"德钦县"},{"code":"533423","name":"维西傈僳族自治县"}]}]},{"code":"540000","name":"西藏自治区","children":[{"code":"540100","name":"拉萨市","children":[{"code":"540102","name":"城关区"},{"code":"540103","name":"堆龙德庆区"},{"code":"540104","name":"达孜区"},{"code":"540121","name":"林周县"},{"code":"540122","name":"当雄县"},{"code":"540123","name":"尼木县"},{"code":"540124","name":"曲水县"},{"code":"540127","name":"墨竹工卡县"},{"code":"540171","name":"格尔木藏青工业园区"},{"code":"540172","name":"拉萨经济技术开发区"},{"code":"540173","name":"西藏文化旅游创意园区"},{"code":"540174","name":"达孜工业园区"}]},{"code":"540200","name":"日喀则市","children":[{"code":"540202","name":"桑珠孜区"},{"code":"540221","name":"南木林县"},{"code":"540222","name":"江孜县"},{"code":"540223","name":"定日县"},{"code":"540224","name":"萨迦县"},{"code":"540225","name":"拉孜县"},{"code":"540226","name":"昂仁县"},{"code":"540227","name":"谢通门县"},{"code":"540228","name":"白朗县"},{"code":"540229","name":"仁布县"},{"code":"540230","name":"康马县"},{"code":"540231","name":"定结县"},{"code":"540232","name":"仲巴县"},{"code":"540233","name":"亚东县"},{"code":"540234","name":"吉隆县"},{"code":"540235","name":"聂拉木县"},{"code":"540236","name":"萨嘎县"},{"code":"540237","name":"岗巴县"}]},{"code":"540300","name":"昌都市","children":[{"code":"540302","name":"卡若区"},{"code":"540321","name":"江达县"},{"code":"540322","name":"贡觉县"},{"code":"540323","name":"类乌齐县"},{"code":"540324","name":"丁青县"},{"code":"540325","name":"察雅县"},{"code":"540326","name":"八宿县"},{"code":"540327","name":"左贡县"},{"code":"540328","name":"芒康县"},{"code":"540329","name":"洛隆县"},{"code":"540330","name":"边坝县"}]},{"code":"540400","name":"林芝市","children":[{"code":"540402","name":"巴宜区"},{"code":"540421","name":"工布江达县"},{"code":"540422","name":"米林县"},{"code":"540423","name":"墨脱县"},{"code":"540424","name":"波密县"},{"code":"540425","name":"察隅县"},{"code":"540426","name":"朗县"}]},{"code":"540500","name":"山南市","children":[{"code":"540502","name":"乃东区"},{"code":"540521","name":"扎囊县"},{"code":"540522","name":"贡嘎县"},{"code":"540523","name":"桑日县"},{"code":"540524","name":"琼结县"},{"code":"540525","name":"曲松县"},{"code":"540526","name":"措美县"},{"code":"540527","name":"洛扎县"},{"code":"540528","name":"加查县"},{"code":"540529","name":"隆子县"},{"code":"540530","name":"错那县"},{"code":"540531","name":"浪卡子县"}]},{"code":"540600","name":"那曲市","children":[{"code":"540602","name":"色尼区"},{"code":"540621","name":"嘉黎县"},{"code":"540622","name":"比如县"},{"code":"540623","name":"聂荣县"},{"code":"540624","name":"安多县"},{"code":"540625","name":"申扎县"},{"code":"540626","name":"索县"},{"code":"540627","name":"班戈县"},{"code":"540628","name":"巴青县"},{"code":"540629","name":"尼玛县"},{"code":"540630","name":"双湖县"}]},{"code":"542500","name":"阿里地区","children":[{"code":"542521","name":"普兰县"},{"code":"542522","name":"札达县"},{"code":"542523","name":"噶尔县"},{"code":"542524","name":"日土县"},{"code":"542525","name":"革吉县"},{"code":"542526","name":"改则县"},{"code":"542527","name":"措勤县"}]}]},{"code":"610000","name":"陕西省","children":[{"code":"610100","name":"西安市","children":[{"code":"610102","name":"新城区"},{"code":"610103","name":"碑林区"},{"code":"610104","name":"莲湖区"},{"code":"610111","name":"灞桥区"},{"code":"610112","name":"未央区"},{"code":"610113","name":"雁塔区"},{"code":"610114","name":"阎良区"},{"code":"610115","name":"临潼区"},{"code":"610116","name":"长安区"},{"code":"610117","name":"高陵区"},{"code":"610118","name":"鄠邑区"},{"code":"610122","name":"蓝田县"},{"code":"610124","name":"周至县"}]},{"code":"610200","name":"铜川市","children":[{"code":"610202","name":"王益区"},{"code":"610203","name":"印台区"},{"code":"610204","name":"耀州区"},{"code":"610222","name":"宜君县"}]},{"code":"610300","name":"宝鸡市","children":[{"code":"610302","name":"渭滨区"},{"code":"610303","name":"金台区"},{"code":"610304","name":"陈仓区"},{"code":"610305","name":"凤翔区"},{"code":"610323","name":"岐山县"},{"code":"610324","name":"扶风县"},{"code":"610326","name":"眉县"},{"code":"610327","name":"陇县"},{"code":"610328","name":"千阳县"},{"code":"610329","name":"麟游县"},{"code":"610330","name":"凤县"},{"code":"610331","name":"太白县"}]},{"code":"610400","name":"咸阳市","children":[{"code":"610402","name":"秦都区"},{"code":"610403","name":"杨陵区"},{"code":"610404","name":"渭城区"},{"code":"610422","name":"三原县"},{"code":"610423","name":"泾阳县"},{"code":"610424","name":"乾县"},{"code":"610425","name":"礼泉县"},{"code":"610426","name":"永寿县"},{"code":"610428","name":"长武县"},{"code":"610429","name":"旬邑县"},{"code":"610430","name":"淳化县"},{"code":"610431","name":"武功县"},{"code":"610481","name":"兴平市"},{"code":"610482","name":"彬州市"}]},{"code":"610500","name":"渭南市","children":[{"code":"610502","name":"临渭区"},{"code":"610503","name":"华州区"},{"code":"610522","name":"潼关县"},{"code":"610523","name":"大荔县"},{"code":"610524","name":"合阳县"},{"code":"610525","name":"澄城县"},{"code":"610526","name":"蒲城县"},{"code":"610527","name":"白水县"},{"code":"610528","name":"富平县"},{"code":"610581","name":"韩城市"},{"code":"610582","name":"华阴市"}]},{"code":"610600","name":"延安市","children":[{"code":"610602","name":"宝塔区"},{"code":"610603","name":"安塞区"},{"code":"610621","name":"延长县"},{"code":"610622","name":"延川县"},{"code":"610625","name":"志丹县"},{"code":"610626","name":"吴起县"},{"code":"610627","name":"甘泉县"},{"code":"610628","name":"富县"},{"code":"610629","name":"洛川县"},{"code":"610630","name":"宜川县"},{"code":"610631","name":"黄龙县"},{"code":"610632","name":"黄陵县"},{"code":"610681","name":"子长市"}]},{"code":"610700","name":"汉中市","children":[{"code":"610702","name":"汉台区"},{"code":"610703","name":"南郑区"},{"code":"610722","name":"城固县"},{"code":"610723","name":"洋县"},{"code":"610724","name":"西乡县"},{"code":"610725","name":"勉县"},{"code":"610726","name":"宁强县"},{"code":"610727","name":"略阳县"},{"code":"610728","name":"镇巴县"},{"code":"610729","name":"留坝县"},{"code":"610730","name":"佛坪县"}]},{"code":"610800","name":"榆林市","children":[{"code":"610802","name":"榆阳区"},{"code":"610803","name":"横山区"},{"code":"610822","name":"府谷县"},{"code":"610824","name":"靖边县"},{"code":"610825","name":"定边县"},{"code":"610826","name":"绥德县"},{"code":"610827","name":"米脂县"},{"code":"610828","name":"佳县"},{"code":"610829","name":"吴堡县"},{"code":"610830","name":"清涧县"},{"code":"610831","name":"子洲县"},{"code":"610881","name":"神木市"}]},{"code":"610900","name":"安康市","children":[{"code":"610902","name":"汉滨区"},{"code":"610921","name":"汉阴县"},{"code":"610922","name":"石泉县"},{"code":"610923","name":"宁陕县"},{"code":"610924","name":"紫阳县"},{"code":"610925","name":"岚皋县"},{"code":"610926","name":"平利县"},{"code":"610927","name":"镇坪县"},{"code":"610929","name":"白河县"},{"code":"610981","name":"旬阳市"}]},{"code":"611000","name":"商洛市","children":[{"code":"611002","name":"商州区"},{"code":"611021","name":"洛南县"},{"code":"611022","name":"丹凤县"},{"code":"611023","name":"商南县"},{"code":"611024","name":"山阳县"},{"code":"611025","name":"镇安县"},{"code":"611026","name":"柞水县"}]}]},{"code":"620000","name":"甘肃省","children":[{"code":"620100","name":"兰州市","children":[{"code":"620102","name":"城关区"},{"code":"620103","name":"七里河区"},{"code":"620104","name":"西固区"},{"code":"620105","name":"安宁区"},{"code":"620111","name":"红古区"},{"code":"620121","name":"永登县"},{"code":"620122","name":"皋兰县"},{"code":"620123","name":"榆中县"},{"code":"620171","name":"兰州新区"}]},{"code":"620200","name":"嘉峪关市","children":[{"code":"620201001","name":"雄关街道"},{"code":"620201002","name":"钢城街道"},{"code":"620201100","name":"新城镇"},{"code":"620201101","name":"峪泉镇"},{"code":"620201102","name":"文殊镇"}]},{"code":"620300","name":"金昌市","children":[{"code":"620302","name":"金川区"},{"code":"620321","name":"永昌县"}]},{"code":"620400","name":"白银市","children":[{"code":"620402","name":"白银区"},{"code":"620403","name":"平川区"},{"code":"620421","name":"靖远县"},{"code":"620422","name":"会宁县"},{"code":"620423","name":"景泰县"}]},{"code":"620500","name":"天水市","children":[{"code":"620502","name":"秦州区"},{"code":"620503","name":"麦积区"},{"code":"620521","name":"清水县"},{"code":"620522","name":"秦安县"},{"code":"620523","name":"甘谷县"},{"code":"620524","name":"武山县"},{"code":"620525","name":"张家川回族自治县"}]},{"code":"620600","name":"武威市","children":[{"code":"620602","name":"凉州区"},{"code":"620621","name":"民勤县"},{"code":"620622","name":"古浪县"},{"code":"620623","name":"天祝藏族自治县"}]},{"code":"620700","name":"张掖市","children":[{"code":"620702","name":"甘州区"},{"code":"620721","name":"肃南裕固族自治县"},{"code":"620722","name":"民乐县"},{"code":"620723","name":"临泽县"},{"code":"620724","name":"高台县"},{"code":"620725","name":"山丹县"}]},{"code":"620800","name":"平凉市","children":[{"code":"620802","name":"崆峒区"},{"code":"620821","name":"泾川县"},{"code":"620822","name":"灵台县"},{"code":"620823","name":"崇信县"},{"code":"620825","name":"庄浪县"},{"code":"620826","name":"静宁县"},{"code":"620881","name":"华亭市"}]},{"code":"620900","name":"酒泉市","children":[{"code":"620902","name":"肃州区"},{"code":"620921","name":"金塔县"},{"code":"620922","name":"瓜州县"},{"code":"620923","name":"肃北蒙古族自治县"},{"code":"620924","name":"阿克塞哈萨克族自治县"},{"code":"620981","name":"玉门市"},{"code":"620982","name":"敦煌市"}]},{"code":"621000","name":"庆阳市","children":[{"code":"621002","name":"西峰区"},{"code":"621021","name":"庆城县"},{"code":"621022","name":"环县"},{"code":"621023","name":"华池县"},{"code":"621024","name":"合水县"},{"code":"621025","name":"正宁县"},{"code":"621026","name":"宁县"},{"code":"621027","name":"镇原县"}]},{"code":"621100","name":"定西市","children":[{"code":"621102","name":"安定区"},{"code":"621121","name":"通渭县"},{"code":"621122","name":"陇西县"},{"code":"621123","name":"渭源县"},{"code":"621124","name":"临洮县"},{"code":"621125","name":"漳县"},{"code":"621126","name":"岷县"}]},{"code":"621200","name":"陇南市","children":[{"code":"621202","name":"武都区"},{"code":"621221","name":"成县"},{"code":"621222","name":"文县"},{"code":"621223","name":"宕昌县"},{"code":"621224","name":"康县"},{"code":"621225","name":"西和县"},{"code":"621226","name":"礼县"},{"code":"621227","name":"徽县"},{"code":"621228","name":"两当县"}]},{"code":"622900","name":"临夏回族自治州","children":[{"code":"622901","name":"临夏市"},{"code":"622921","name":"临夏县"},{"code":"622922","name":"康乐县"},{"code":"622923","name":"永靖县"},{"code":"622924","name":"广河县"},{"code":"622925","name":"和政县"},{"code":"622926","name":"东乡族自治县"},{"code":"622927","name":"积石山保安族东乡族撒拉族自治县"}]},{"code":"623000","name":"甘南藏族自治州","children":[{"code":"623001","name":"合作市"},{"code":"623021","name":"临潭县"},{"code":"623022","name":"卓尼县"},{"code":"623023","name":"舟曲县"},{"code":"623024","name":"迭部县"},{"code":"623025","name":"玛曲县"},{"code":"623026","name":"碌曲县"},{"code":"623027","name":"夏河县"}]}]},{"code":"630000","name":"青海省","children":[{"code":"630100","name":"西宁市","children":[{"code":"630102","name":"城东区"},{"code":"630103","name":"城中区"},{"code":"630104","name":"城西区"},{"code":"630105","name":"城北区"},{"code":"630106","name":"湟中区"},{"code":"630121","name":"大通回族土族自治县"},{"code":"630123","name":"湟源县"}]},{"code":"630200","name":"海东市","children":[{"code":"630202","name":"乐都区"},{"code":"630203","name":"平安区"},{"code":"630222","name":"民和回族土族自治县"},{"code":"630223","name":"互助土族自治县"},{"code":"630224","name":"化隆回族自治县"},{"code":"630225","name":"循化撒拉族自治县"}]},{"code":"632200","name":"海北藏族自治州","children":[{"code":"632221","name":"门源回族自治县"},{"code":"632222","name":"祁连县"},{"code":"632223","name":"海晏县"},{"code":"632224","name":"刚察县"}]},{"code":"632300","name":"黄南藏族自治州","children":[{"code":"632301","name":"同仁市"},{"code":"632322","name":"尖扎县"},{"code":"632323","name":"泽库县"},{"code":"632324","name":"河南蒙古族自治县"}]},{"code":"632500","name":"海南藏族自治州","children":[{"code":"632521","name":"共和县"},{"code":"632522","name":"同德县"},{"code":"632523","name":"贵德县"},{"code":"632524","name":"兴海县"},{"code":"632525","name":"贵南县"}]},{"code":"632600","name":"果洛藏族自治州","children":[{"code":"632621","name":"玛沁县"},{"code":"632622","name":"班玛县"},{"code":"632623","name":"甘德县"},{"code":"632624","name":"达日县"},{"code":"632625","name":"久治县"},{"code":"632626","name":"玛多县"}]},{"code":"632700","name":"玉树藏族自治州","children":[{"code":"632701","name":"玉树市"},{"code":"632722","name":"杂多县"},{"code":"632723","name":"称多县"},{"code":"632724","name":"治多县"},{"code":"632725","name":"囊谦县"},{"code":"632726","name":"曲麻莱县"}]},{"code":"632800","name":"海西蒙古族藏族自治州","children":[{"code":"632801","name":"格尔木市"},{"code":"632802","name":"德令哈市"},{"code":"632803","name":"茫崖市"},{"code":"632821","name":"乌兰县"},{"code":"632822","name":"都兰县"},{"code":"632823","name":"天峻县"},{"code":"632857","name":"大柴旦行政委员会"}]}]},{"code":"640000","name":"宁夏回族自治区","children":[{"code":"640100","name":"银川市","children":[{"code":"640104","name":"兴庆区"},{"code":"640105","name":"西夏区"},{"code":"640106","name":"金凤区"},{"code":"640121","name":"永宁县"},{"code":"640122","name":"贺兰县"},{"code":"640181","name":"灵武市"}]},{"code":"640200","name":"石嘴山市","children":[{"code":"640202","name":"大武口区"},{"code":"640205","name":"惠农区"},{"code":"640221","name":"平罗县"}]},{"code":"640300","name":"吴忠市","children":[{"code":"640302","name":"利通区"},{"code":"640303","name":"红寺堡区"},{"code":"640323","name":"盐池县"},{"code":"640324","name":"同心县"},{"code":"640381","name":"青铜峡市"}]},{"code":"640400","name":"固原市","children":[{"code":"640402","name":"原州区"},{"code":"640422","name":"西吉县"},{"code":"640423","name":"隆德县"},{"code":"640424","name":"泾源县"},{"code":"640425","name":"彭阳县"}]},{"code":"640500","name":"中卫市","children":[{"code":"640502","name":"沙坡头区"},{"code":"640521","name":"中宁县"},{"code":"640522","name":"海原县"}]}]},{"code":"650000","name":"新疆维吾尔自治区","children":[{"code":"650100","name":"乌鲁木齐市","children":[{"code":"650102","name":"天山区"},{"code":"650103","name":"沙依巴克区"},{"code":"650104","name":"新市区"},{"code":"650105","name":"水磨沟区"},{"code":"650106","name":"头屯河区"},{"code":"650107","name":"达坂城区"},{"code":"650109","name":"米东区"},{"code":"650121","name":"乌鲁木齐县"}]},{"code":"650200","name":"克拉玛依市","children":[{"code":"650202","name":"独山子区"},{"code":"650203","name":"克拉玛依区"},{"code":"650204","name":"白碱滩区"},{"code":"650205","name":"乌尔禾区"}]},{"code":"650400","name":"吐鲁番市","children":[{"code":"650402","name":"高昌区"},{"code":"650421","name":"鄯善县"},{"code":"650422","name":"托克逊县"}]},{"code":"650500","name":"哈密市","children":[{"code":"650502","name":"伊州区"},{"code":"650521","name":"巴里坤哈萨克自治县"},{"code":"650522","name":"伊吾县"}]},{"code":"652300","name":"昌吉回族自治州","children":[{"code":"652301","name":"昌吉市"},{"code":"652302","name":"阜康市"},{"code":"652323","name":"呼图壁县"},{"code":"652324","name":"玛纳斯县"},{"code":"652325","name":"奇台县"},{"code":"652327","name":"吉木萨尔县"},{"code":"652328","name":"木垒哈萨克自治县"}]},{"code":"652700","name":"博尔塔拉蒙古自治州","children":[{"code":"652701","name":"博乐市"},{"code":"652702","name":"阿拉山口市"},{"code":"652722","name":"精河县"},{"code":"652723","name":"温泉县"}]},{"code":"652800","name":"巴音郭楞蒙古自治州","children":[{"code":"652801","name":"库尔勒市"},{"code":"652822","name":"轮台县"},{"code":"652823","name":"尉犁县"},{"code":"652824","name":"若羌县"},{"code":"652825","name":"且末县"},{"code":"652826","name":"焉耆回族自治县"},{"code":"652827","name":"和静县"},{"code":"652828","name":"和硕县"},{"code":"652829","name":"博湖县"},{"code":"652871","name":"库尔勒经济技术开发区"}]},{"code":"652900","name":"阿克苏地区","children":[{"code":"652901","name":"阿克苏市"},{"code":"652902","name":"库车市"},{"code":"652922","name":"温宿县"},{"code":"652924","name":"沙雅县"},{"code":"652925","name":"新和县"},{"code":"652926","name":"拜城县"},{"code":"652927","name":"乌什县"},{"code":"652928","name":"阿瓦提县"},{"code":"652929","name":"柯坪县"}]},{"code":"653000","name":"克孜勒苏柯尔克孜自治州","children":[{"code":"653001","name":"阿图什市"},{"code":"653022","name":"阿克陶县"},{"code":"653023","name":"阿合奇县"},{"code":"653024","name":"乌恰县"}]},{"code":"653100","name":"喀什地区","children":[{"code":"653101","name":"喀什市"},{"code":"653121","name":"疏附县"},{"code":"653122","name":"疏勒县"},{"code":"653123","name":"英吉沙县"},{"code":"653124","name":"泽普县"},{"code":"653125","name":"莎车县"},{"code":"653126","name":"叶城县"},{"code":"653127","name":"麦盖提县"},{"code":"653128","name":"岳普湖县"},{"code":"653129","name":"伽师县"},{"code":"653130","name":"巴楚县"},{"code":"653131","name":"塔什库尔干塔吉克自治县"}]},{"code":"653200","name":"和田地区","children":[{"code":"653201","name":"和田市"},{"code":"653221","name":"和田县"},{"code":"653222","name":"墨玉县"},{"code":"653223","name":"皮山县"},{"code":"653224","name":"洛浦县"},{"code":"653225","name":"策勒县"},{"code":"653226","name":"于田县"},{"code":"653227","name":"民丰县"}]},{"code":"654000","name":"伊犁哈萨克自治州","children":[{"code":"654002","name":"伊宁市"},{"code":"654003","name":"奎屯市"},{"code":"654004","name":"霍尔果斯市"},{"code":"654021","name":"伊宁县"},{"code":"654022","name":"察布查尔锡伯自治县"},{"code":"654023","name":"霍城县"},{"code":"654024","name":"巩留县"},{"code":"654025","name":"新源县"},{"code":"654026","name":"昭苏县"},{"code":"654027","name":"特克斯县"},{"code":"654028","name":"尼勒克县"}]},{"code":"654200","name":"塔城地区","children":[{"code":"654201","name":"塔城市"},{"code":"654202","name":"乌苏市"},{"code":"654203","name":"沙湾市"},{"code":"654221","name":"额敏县"},{"code":"654224","name":"托里县"},{"code":"654225","name":"裕民县"},{"code":"654226","name":"和布克赛尔蒙古自治县"}]},{"code":"654300","name":"阿勒泰地区","children":[{"code":"654301","name":"阿勒泰市"},{"code":"654321","name":"布尔津县"},{"code":"654322","name":"富蕴县"},{"code":"654323","name":"福海县"},{"code":"654324","name":"哈巴河县"},{"code":"654325","name":"青河县"},{"code":"654326","name":"吉木乃县"}]},{"code":"659000","name":"自治区直辖县级行政区划","children":[{"code":"659001","name":"石河子市"},{"code":"659002","name":"阿拉尔市"},{"code":"659003","name":"图木舒克市"},{"code":"659004","name":"五家渠市"},{"code":"659005","name":"北屯市"},{"code":"659006","name":"铁门关市"},{"code":"659007","name":"双河市"},{"code":"659008","name":"可克达拉市"},{"code":"659009","name":"昆玉市"},{"code":"659010","name":"胡杨河市"},{"code":"659011","name":"新星市"}]}]}]'), Zt = /* @__PURE__ */ Pe({
  name: "NewbieAddress",
  props: {
    value: {
      type: [String, Number, Array],
      default: () => []
    },
    /**
     *    生成哪个级别的数据
     *    1: 省, 2: 省市, 3: 省市区
     */
    level: {
      type: Number,
      default: 3
    },
    /**
     * 是否禁用选择器
     */
    disabled: {
      type: Boolean,
      default: !1
    },
    /**
     * 占位符
     */
    placeholder: {
      type: String,
      default: "请选择地区"
    },
    /**
     * 获取数据的链接,如果不传则使用本地数据
     *
     */
    url: {
      type: String,
      default: ""
    },
    /**
     * 返回数据处理函数,处理后返回数据格式必需符合下面的 [数据格式](#数据格式)
     */
    afterFetched: {
      type: Function,
      default: null
    },
    /**
     * 自定义数据源
     */
    dataSource: {
      type: Array,
      default: () => []
    }
  },
  emits: ["update:value"],
  setup(e, {
    emit: n
  }) {
    const o = qe({
      items: e.dataSource,
      value: e.value
    });
    oe(() => e.dataSource, () => {
      o.items = e.dataSource;
    }), o.items.length === 0 && (e.url ? a() : o.items = rl);
    const a = async () => {
      let c = await gn().get(e.url);
      e.afterFetched && (c = e.afterFetched(c)), o.items = c;
    }, t = (c) => {
      n("update:value", c);
    };
    return () => u(ko, {
      value: o.value,
      "onUpdate:value": (c) => o.value = c,
      fieldNames: {
        label: "name",
        value: "code",
        children: "children"
      },
      allowClear: !0,
      placeholder: e.placeholder,
      disabled: e.disabled,
      options: o.items,
      changeOnSelect: !0,
      showSearch: !0,
      onChange: t
    }, null);
  }
});
function Jt(e, n) {
  if (e += "", e && e.length === 6) {
    if (n || (/0000$/.test(e) ? n = 1 : /00$/.test(e) ? n = 2 : n = 3), n === 1)
      return [`${e.substr(0, 2)}0000`];
    if (n === 2)
      return [`${e.substr(0, 2)}0000`, `${e.substr(0, 4)}00`];
    if (n === 3)
      return [`${e.substr(0, 2)}0000`, `${e.substr(0, 4)}00`, e];
  }
  return [];
}
const $e = (e) => (e.install = (n) => {
  const o = e.name || e.__name;
  n.component(o, e);
}, e), il = Jt, sl = $e(Zt), qn = /* @__PURE__ */ Pe({
  name: "NewbieButton",
  props: {
    /**
     * 按钮类型
     * @values primary, ghost, dashed, link, text ,default
     */
    type: {
      type: String,
      default: "default"
    },
    /**
     * 按钮大小
     * @values large, middle, small
     */
    size: {
      type: String,
      default: "middle"
    },
    /**
     * 失效状态
     */
    disabled: {
      type: Boolean,
      default: !1
    },
    /**
     * 设置危险按钮
     */
    danger: {
      type: Boolean,
      default: !1
    },
    /**
     * 按钮标签
     */
    label: {
      type: String,
      default: ""
    },
    /**
     * 按钮图标,需要使用
     *
     */
    icon: {
      type: Object,
      default: null
    },
    /**
     * 按钮图标位置
     * @values left, right
     */
    iconPosition: {
      type: String,
      default: "left"
    },
    /**
     * 请求状态控制器
     * @param {boolean} fetcher.loading 是否加载中
     */
    fetcher: {
      type: Object,
      default: () => ({
        loading: !1
      })
    },
    /**
     * 原生 [Button](https://www.antdv.com/components/button-cn#api) 配置
     */
    buttonProps: {
      type: Object,
      default: () => ({})
    }
  },
  emits: [
    /**
     * @event click
     * @param {Event} event 点击事件
     */
    "click"
  ],
  setup(e, {
    emit: n,
    slots: o
  }) {
    const a = (d) => {
      n("click", d);
    }, t = () => e.label || o.default(), c = () => e.icon && e.iconPosition === "left" ? [e.icon, t()] : e.icon && e.iconPosition === "right" ? [t(), e.icon] : [t()];
    return () => u(re, H({
      danger: e.danger,
      loading: e.fetcher.loading,
      type: e.type,
      size: e.size,
      disabled: e.disabled,
      onClick: a
    }, e.buttonProps), {
      default: () => c()
    });
  }
}), ul = $e(qn);
function ln(e) {
  let n = `请使用 '@${e}' 事件,不要放在 props 中`;
  return n += `
Please use '@${e}' event instead of props`, n;
}
const ec = (e, n) => {
  const o = e.__vccOpts || e;
  for (const [a, t] of n)
    o[a] = t;
  return o;
}, ml = Pe({
  props: {
    /** 编辑器模式 */
    mode: {
      type: String,
      default: "default"
    },
    /** 编辑器默认内容 */
    defaultContent: {
      type: Array,
      default: () => []
    },
    defaultHtml: {
      type: String,
      default: ""
    },
    /** 编辑器默认配置 */
    defaultConfig: {
      type: Object,
      default: () => ({})
    },
    /* 自定义 v-model */
    modelValue: {
      type: String,
      default: ""
    }
  },
  emits: ["update:modelValue", "onCreated", "onChange", "onDestroyed", "onMaxLength", "onFocus", "onBlur", "customAlert", "customPaste"],
  setup(e, n) {
    const o = z(null), a = It(null), t = z(""), c = (i) => {
      if (!o.value) return;
      const r = ed(e.defaultContent);
      i({
        selector: o.value,
        mode: e.mode,
        content: r || [],
        html: e.defaultHtml || e.modelValue || "",
        config: {
          ...e.defaultConfig,
          onCreated(l) {
            if (a.value = l, n.emit("onCreated", l), e.defaultConfig.onCreated) {
              const m = ln("onCreated");
              throw new Error(m);
            }
          },
          onChange(l) {
            const m = l.getHtml();
            if (t.value = m, n.emit("update:modelValue", m), n.emit("onChange", l), e.defaultConfig.onChange) {
              const g = ln("onChange");
              throw new Error(g);
            }
          },
          onDestroyed(l) {
            if (n.emit("onDestroyed", l), e.defaultConfig.onDestroyed) {
              const m = ln("onDestroyed");
              throw new Error(m);
            }
          },
          onMaxLength(l) {
            if (n.emit("onMaxLength", l), e.defaultConfig.onMaxLength) {
              const m = ln("onMaxLength");
              throw new Error(m);
            }
          },
          onFocus(l) {
            if (n.emit("onFocus", l), e.defaultConfig.onFocus) {
              const m = ln("onFocus");
              throw new Error(m);
            }
          },
          onBlur(l) {
            if (n.emit("onBlur", l), e.defaultConfig.onBlur) {
              const m = ln("onBlur");
              throw new Error(m);
            }
          },
          customAlert(l, m) {
            if (n.emit("customAlert", l, m), e.defaultConfig.customAlert) {
              const g = ln("customAlert");
              throw new Error(g);
            }
          },
          customPaste: (l, m) => {
            if (e.defaultConfig.customPaste) {
              const y = ln("customPaste");
              throw new Error(y);
            }
            let g;
            return n.emit("customPaste", l, m, (y) => {
              g = y;
            }), g;
          }
        }
      });
    };
    function d(i) {
      const r = a.value;
      r != null && r.setHtml(i);
    }
    return tn(() => {
      import("./index.esm-Bn4gCzpz.js").then((i) => {
        c(i.createEditor);
      });
    }), oe(
      () => e.modelValue,
      (i) => {
        i !== t.value && d(i);
      }
    ), {
      box: o
    };
  }
}), fl = {
  ref: "box",
  style: { height: "100%" }
};
function pl(e, n, o, a, t, c) {
  return At(), Tt("div", fl, null, 512);
}
const hl = /* @__PURE__ */ ec(ml, [["render", pl]]), gl = Pe({
  props: {
    // editor 实例
    editor: {
      type: Object,
      default: () => null
    },
    /** 编辑器模式 */
    mode: {
      type: String,
      default: "default"
    },
    /** 编辑器默认配置 */
    defaultConfig: {
      type: Object,
      default: () => ({})
    }
  },
  setup(e) {
    const n = z(null), o = (a) => {
      if (n.value) {
        if (a == null)
          throw new Error("Not found instance of Editor when create <Toolbar/> component");
        import("./index.esm-Bn4gCzpz.js").then((t) => {
          t.DomEditor.getToolbar(a) || t.createToolbar({
            editor: a,
            selector: n.value || "<div></div>",
            mode: e.mode,
            config: e.defaultConfig
          });
        });
      }
    };
    return tn(() => {
      vo(() => {
        const { editor: a } = e;
        a != null && o(a);
      });
    }), {
      selector: n
    };
  }
}), vl = { ref: "selector" };
function yl(e, n, o, a, t, c) {
  return At(), Tt("div", vl, null, 512);
}
const bl = /* @__PURE__ */ ec(gl, [["render", yl]]), wl = Symbol("NEWBIE_LOCALE"), nc = Symbol("NEWBIE_EDITOR"), ac = Symbol("NEWBIE_TABLE"), Na = Symbol("NEWBIE_UPLOADER"), Do = Symbol("NEWBIE_FORM"), oc = Symbol("NEWBIE_SEARCH"), kl = /* @__PURE__ */ Pe({
  name: "NewbieProvider",
  /**
   * @typedef {Object} ProviderProps
   * @property {EditorProviderProps} [editor] `NewbieEditor` 配置
   * @property {TableProviderProps} [table] `NewbieTable` 配置
   * @property {UploaderProviderProps} [uploader] `NewbieUploader` 配置
   * @property {FormProviderProps} [form] `NewbieForm` 配置
   * @property {SearchProviderProps} [search] `NewbieSearch` 配置
   *
   */
  props: {
    /**
     * @typedef {Object} EditorProviderProps `NewbieEditor` 配置
     * @property  {string} editor.uploadUrl 上传地址
     */
    editor: {
      type: Object,
      default: () => ({
        uploadUrl: ""
      })
    },
    /**
     * @typedef {Object} TableProviderProps `NewbieTable` 配置
     * @property {number} [page] 当前页码
     * @property {number} [pageSize] 每页条数
     * @property {string} [pageKey] 页码参数名
     * @property {string} [pageSizeKey] 每页条数参数名
     * @property {Function} [afterFetched] 返回数据处理函数
     */
    table: {
      type: Object,
      default: () => ({
        page: 1,
        pageSize: 10,
        pageKey: "page",
        pageSizeKey: "pageSize",
        afterFetched: null
      })
    },
    /**
     * @typedef {Object} UploaderProviderProps `NewbieUploader` 配置
     * @property {string} uploadUrl 上传地址
     * @property {UploadFileItem} defaultFileItem 默认文件项
     *
     * @typedef {Object} UploadFileItem 文件项
     * @property {string} [id] 文件 ID
     * @property {string} [name] 文件名
     * @property {string} defaultFileItem.url 文件地址
     * @property {string} defaultFileItem.path 文件路径
     * @property {string} [thumbUrl] 缩略图地址
     */
    uploader: {
      type: Object,
      default: () => ({
        uploadUrl: "",
        defaultFileItem: {
          id: "id",
          name: "name",
          url: "url",
          path: "path",
          thumbUrl: "thumbUrl"
        }
      })
    },
    /**
     * @typedef {Object} FormProviderProps `NewbieForm` 配置
     * @property {Object} [format] 格式化配置, 如 {date: true} 表示在提交表单时使用 `useFormFormat` 格式所有日期字段
     * @property {Function} [afterFetched] 处理接口返回数据的函数
     * @property {Object} [columns] Field的默认配置, 如 {switch: {defaultProps: {...}}},可以被覆盖
     */
    form: {
      type: Object,
      default: () => ({
        format: {},
        afterFetched: null,
        columns: {}
      })
    },
    /**
     * @typedef {Object} SearchProviderProps `NewbieSearch` 配置
     * @property {Object} [maskClass] 定制伪 Input 样式
     * @property {Object} [inputClass] 弹层中 Input 的样式
     * @property {Function} [valueFormatter] 时间格式化函数
     */
    search: {
      type: Object,
      default: () => ({
        maskClass: "",
        inputClass: "",
        valueFormatter: null
      })
    },
    /**
     * 语言配置
     */
    locale: {
      type: String,
      default: "zh_CN"
    }
  },
  setup(e, {
    slots: n
  }) {
    const {
      locale: o
    } = da();
    return oe(() => e.locale, (a) => {
      a && (o.value = a);
    }, {
      immediate: !0
    }), En(wl, e.locale), En(nc, {
      uploadUrl: "",
      ...e.editor
    }), En(ac, {
      page: 1,
      pageSize: 10,
      pageKey: "page",
      pageSizeKey: "pageSize",
      afterFetched: null,
      ...e.table
    }), En(Na, {
      defaultFileItem: {
        id: "id",
        name: "name",
        url: "url",
        path: "path",
        thumbUrl: "thumbUrl"
      },
      ...e.uploader
    }), En(Do, {
      format: {},
      ...e.form
    }), En(oc, {
      maskClass: "",
      inputClass: "",
      valueFormatter: null,
      ...e.search
    }), () => {
      var a;
      return u("div", null, [(a = n.default) == null ? void 0 : a.call(n)]);
    };
  }
}), tc = /* @__PURE__ */ Pe({
  name: "NewbieEditor",
  props: {
    /**
     * 输入框的值
     * @model
     */
    value: {
      type: String,
      default: ""
    },
    /**
     * 占位符
     */
    placeholder: {
      type: String,
      default: ""
    },
    /**
     * 是否禁用
     */
    disabled: {
      type: Boolean,
      default: !1
    },
    /**
     * 是否只读
     */
    readonly: {
      type: Boolean,
      default: !1
    },
    /**
     * @param {Object} config.toolbarConfig  [工具栏配置](https://www.wangeditor.com/v5/toolbar-config.html)
     * @param {Object} config.editorConfig [编辑器配置](https://www.wangeditor.com/v5/editor-config.html)
     */
    config: {
      type: Object,
      default: () => ({
        toolbarConfig: {},
        editorConfig: {}
      })
    }
  },
  emits: ["update:value"],
  setup(e, {
    emit: n,
    expose: o
  }) {
    var h, s;
    const a = Ta.useInjectFormItemContext(), t = It(), c = z(""), d = z({
      excludeKeys: ["group-video", "emotion"],
      ...(h = e.config) == null ? void 0 : h.toolbarConfig
    }), {
      uploadUrl: i
    } = pn(nc, () => ({})), r = z({
      placeholder: e.placeholder || I("form.please-input", {
        title: I("common.content")
      }),
      readOnly: e.disabled || e.readonly,
      MENU_CONF: {
        uploadImage: {
          async customUpload(v, w) {
            const E = new FormData();
            E.append("file", v);
            try {
              let k = await gn().post(i, E);
              jn(k, () => {
                const {
                  url: P,
                  alt: O,
                  href: x
                } = k.result;
                w(P, O, x);
              });
            } catch (k) {
              console.log(k);
            }
          }
        }
      },
      ...(s = e.config) == null ? void 0 : s.editorConfig
    }), l = (v) => {
      t.value && t.value.setHtml(v);
    };
    nd(() => {
      const v = t.value;
      v != null && v.destroy();
    }), oe(() => e.value, (v) => {
      v !== c.value && t.value && l(v);
    });
    const m = (v) => {
      t.value = v, l(e.value), v.on("fullScreen", () => {
        document.body.classList.add("fullscreen");
      }), v.on("unFullScreen", () => {
        document.body.classList.remove("fullscreen");
      }), !e.disabled && !e.readonly && (C.value = p());
    }, g = (v) => {
      let w = v.getHtml();
      v.isEmpty() && (w = ""), w !== e.value && (n("update:value", w), a.onFieldChange());
    }, y = async (v, w) => {
      switch (w) {
        case "success":
          ge.success(v);
          break;
        case "info":
          ge.info(v);
          break;
        case "warning":
          ge.warning(v);
          break;
        case "error":
          ge.error(v);
          break;
        default:
          ge.info(v);
          break;
      }
    };
    o({
      setContent: l
    });
    const C = z(), f = z(), p = () => {
      var v;
      return (v = t == null ? void 0 : t.value) != null && v.destroy ? u(bl, {
        editor: t.value,
        defaultConfig: d.value,
        style: "border-bottom: 1px solid #f0f0f0"
      }, null) : u("div", null, null);
    }, b = () => u(hl, {
      modelValue: c.value,
      "onUpdate:modelValue": (v) => c.value = v,
      defaultConfig: r.value,
      style: "height: 400px; overflow-y: hidden",
      onOnChange: g,
      onOnCreated: m,
      onCustomAlert: y
    }, null);
    return tn(() => {
      f.value = b();
    }), () => u("div", {
      style: "border: 1px solid #f0f0f0"
    }, [C.value, f.value]);
  }
}), Cl = $e(tc), Ee = (e) => oo(e) || ne(e) ? "auto" : isNaN(e) ? e : `${e}px`, xa = (e, n, o, a) => {
  let t = "";
  const { uploaderProvider: c } = a;
  if (n && !ne(n[e.key]) ? t = n[e.key] : ne(e.defaultValue) || (t = j(e.defaultValue) ? e.defaultValue({ submitForm: o, existingData: n }) : e.defaultValue), e.init && j(e.init) && (t = e.init({ submitForm: o, value: t, existingData: n })), e.type === "number" || e.type === "slider" || e.type === "rate")
    t = Cd(t);
  else if (e.type === "select" || e.type === "remote")
    e.defaultProps && (e.defaultProps.mode === "multiple" || e.defaultProps.mode === "tags") ? t = t || [] : t = t || void 0;
  else if (e.type === "tree-select")
    e.defaultProps && (e.defaultProps.multiple === !0 || e.defaultProps.treeCheckable === !0) ? t = t || [] : t = t || void 0;
  else if (e.type === "date" || e.type === "time")
    e.defaultProps && e.defaultProps.type === "range" ? t = t ? [Ba(t[0]), Ba(t[1])] : [] : t = t ? Ba(t) : null;
  else if (e.type === "address")
    t = t || [], ye(t) || (t = Jt(t));
  else if (e.type === "uploader")
    if (e.defaultProps && e.defaultProps.maxNum && e.defaultProps.maxNum > 1)
      t = t || [];
    else {
      const { path: d, url: i } = c.defaultFileItem;
      t = t || { [d]: "", [i]: "" };
    }
  else ["matrix-checkbox", "matrix-radio", "matrix-scale", "rate-radio"].includes(e.type) ? t = t || {} : ["group", "tag", "checkbox", "rate-checkbox"].includes(e.type) && (t = t || []);
  return t;
}, Sl = (e, n) => {
  const o = n[e.key];
  return !(Ke(o) && !Object.keys(o).length || ye(o) && !o.length || o === "" || o === !1 || o === null || o === void 0 || o === 0);
}, me = (e, n) => {
  var c;
  const { t: o, locale: a } = da(), t = a.value === "en-US" ? (c = e.title) == null ? void 0 : c.toLowerCase() : e.title;
  return n === "select" ? e.placeholder || o("form.please-select", { title: t }) : n === "upload" ? e.placeholder || o("form.please-upload", { title: t }) : e.placeholder || o("form.please-input", { title: t });
}, xl = (e, n) => {
  let o = Rt, a = me(e, "select");
  return e.defaultProps && e.defaultProps.type === "range" && (o = Bt, a = se(e.placeholder) ? [e.placeholder, e.placeholder] : [a, a]), u(o, H({
    value: n[e.key],
    "onUpdate:value": (t) => n[e.key] = t,
    allowClear: !0,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    placeholder: a,
    style: e.style || {
      width: Ee(e.width || "200px")
    },
    class: {
      readonly: e.readonly,
      ...e.class
    }
  }, e.defaultProps), {
    ...e.defaultSlots
  });
}, El = (e, n) => {
  let o = Ut, a = me(e, "select");
  return e.defaultProps && e.defaultProps.type === "range" && (o = Vt, a = se(e.placeholder) ? [e.placeholder, e.placeholder] : [a, a]), u(o, H({
    value: n[e.key],
    "onUpdate:value": (t) => n[e.key] = t,
    allowClear: !0,
    placeholder: a,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    style: e.style || {
      width: Ee(e.width || "200px")
    },
    class: {
      readonly: e.readonly,
      ...e.class
    }
  }, e.defaultProps), {
    ...e.defaultSlots
  });
}, Ol = (e, n) => {
  (n[e.key] === null || n[e.key] === "null" || n[e.key] === void 0) && (n[e.key] = ""), n[e.key] = String(n[e.key]);
  let o = {};
  e.defaultProps && (e.defaultProps.prefix && (o.prefix = () => j(e.defaultProps.prefix) ? e.defaultProps.prefix() : e.defaultProps.prefix), e.defaultProps.suffix && (o.suffix = () => j(e.defaultProps.suffix) ? e.defaultProps.suffix() : e.defaultProps.suffix), e.defaultProps.prepend && (o.addonBefore = () => j(e.defaultProps.prepend) ? e.defaultProps.prepend() : e.defaultProps.prepend), e.defaultProps.append && (o.addonAfter = () => j(e.defaultProps.append) ? e.defaultProps.append() : e.defaultProps.append));
  let a = {
    width: Ee(e.width || "200px")
  }, t = Tn;
  return (e.type === "textarea" || e.defaultProps && e.defaultProps.type === "textarea") && (t = Tn.TextArea, a = {
    width: Ee(e.width || "100%")
  }), (e.type === "password" || e.defaultProps && e.defaultProps.type === "password") && (t = Tn.Password), u(t, H({
    value: n[e.key],
    "onUpdate:value": (c) => n[e.key] = c,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    placeholder: me(e),
    style: e.style || a,
    class: {
      readonly: e.readonly,
      ...e.class
    }
  }, e.defaultProps), {
    ...o,
    ...e.defaultSlots
  });
};
function Pl(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Re(e);
}
const _l = (e, n, o) => {
  var c, d, i, r, l;
  Object.keys(o).length || (o.value = null);
  let a = (c = n[e.key]) != null && c.length ? n[e.key].map((m) => u(Oe, {
    key: m,
    closable: !e.disabled,
    style: {
      marginBottom: "10px"
    },
    onClose: () => {
      n[e.key] = n[e.key].filter((g) => g !== m);
    }
  }, Pl(m) ? m : {
    default: () => [m]
  })) : null, t = null;
  return e.disabled || e.readonly ? t = null : ((d = e.defaultProps) == null ? void 0 : d.inputType) === "time" ? t = u(Ut, {
    value: o.value,
    "onUpdate:value": (m) => o.value = m,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    format: ((i = e.defaultProps) == null ? void 0 : i.format) || "HH:mm",
    onChange: (m) => {
      var y;
      if (!m)
        return;
      const g = m.format(((y = e.defaultProps) == null ? void 0 : y.format) || "HH:mm");
      if (n[e.key].indexOf(g) !== -1) {
        ge.warn("时间已存在");
        return;
      }
      n[e.key].push(g), hn(() => {
        o.value = "";
      });
    }
  }, null) : ((r = e.defaultProps) == null ? void 0 : r.inputType) === "time_range" ? t = u(Vt, {
    value: o.value,
    "onUpdate:value": (m) => o.value = m,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    format: ((l = e.defaultProps) == null ? void 0 : l.format) || "HH:mm",
    onChange: (m) => {
      var y, C;
      if (!m)
        return;
      let g = [m[0].format(((y = e.defaultProps) == null ? void 0 : y.format) || "HH:mm"), m[1].format(((C = e.defaultProps) == null ? void 0 : C.format) || "HH:mm")];
      if (g = g.join("至"), n[e.key].indexOf(g) !== -1) {
        ge.warn("时间已存在");
        return;
      }
      n[e.key].push(g), hn(() => {
        o.value = [];
      });
    }
  }, null) : t = u(Tn, {
    value: o.value,
    "onUpdate:value": (m) => o.value = m,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    placeholder: e.placeholder || "按Enter键确认",
    style: e.style || {
      width: Ee(e.width || "200px")
    },
    onPressEnter: Fe((m) => {
      if (m.preventDefault(), m.keyCode === 13 && o.value) {
        if (n[e.key].indexOf(o.value) !== -1) {
          ge.warn("标签已存在");
          return;
        }
        n[e.key].push(o.value), o.value = "";
      }
    }, ["stop"])
  }, {
    prefix: () => u(Xt, null, null)
  }), u("div", {
    class: "newbie-form-tag"
  }, [[a, t]]);
}, Dl = (e, n) => {
  let o = j(e.options) ? e.options(n) : e.options;
  return o = o.map((a) => se(a) || fe(a) ? {
    value: a,
    label: a
  } : a), u(Mn, H({
    value: n[e.key],
    "onUpdate:value": (a) => n[e.key] = a,
    options: o,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    allowClear: !0,
    placeholder: me(e, "select"),
    dropdownMatchSelectWidth: !e.width,
    showSearch: !0,
    optionFilterProp: "label",
    style: e.style || (e.width ? {
      width: Ee(e.width)
    } : {}),
    class: {
      readonly: e.readonly,
      ...e.class
    }
  }, e.defaultProps), {
    ...e.defaultSlots
  });
}, Il = (e, n) => {
  let o = j(e.options) ? e.options(n) : e.options;
  return u(cd, H({
    value: n[e.key],
    "onUpdate:value": (a) => n[e.key] = a,
    treeData: o,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    treeDefaultExpandAll: !0,
    treeNodeFilterProp: "label",
    showSearch: !0,
    allowClear: !0,
    placeholder: me(e, "select"),
    dropdownMatchSelectWidth: !e.width,
    style: e.style || (e.width ? {
      width: Ee(e.width)
    } : {}),
    class: {
      readonly: e.readonly,
      ...e.class
    }
  }, e.defaultProps), {
    ...e.defaultSlots
  });
}, Tl = (e, n, o) => {
  if (Object.keys(o).length || (o.fetcher = {
    loading: !1
  }, o.options = [], o.init = !1), !o.init) {
    o.init = !0;
    let c = [];
    e.options && (c = j(e.options) ? e.options(n) : e.options, c = c.map((d) => se(d) || fe(d) ? {
      value: d,
      label: d
    } : d)), o.options = c;
  }
  const a = e.method || "get";
  if (["get", "post"].indexOf(a) === -1)
    return console.error(`${e.key}: method must be 'get' or 'post' in "remote" type`), null;
  if (!e.url)
    return console.error(`${e.key}: url is required in "remote" type`), null;
  const t = Id(async (c) => {
    if (c = c.trim(), !c)
      return;
    let d = await gn(o.fetcher)[a](e.url, {
      params: {
        [e.keyword || "keyword"]: c,
        ...e.params
      }
    });
    jn(d, () => {
      e.onSearch && (d.result = e.onSearch(d.result)), o.options = d.result;
    });
  }, 1e3);
  return u(Mn, H({
    value: n[e.key],
    "onUpdate:value": (c) => n[e.key] = c,
    options: o.options,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    showSearch: !0,
    allowClear: !0,
    filterOption: !1,
    notFoundContent: o.fetcher.loading ? void 0 : I("common.no-content"),
    placeholder: me(e, "select"),
    dropdownMatchSelectWidth: !e.width,
    style: e.style || (e.width ? {
      width: Ee(e.width)
    } : {}),
    class: {
      readonly: e.readonly,
      ...e.class
    },
    onSearch: t
  }, e.defaultProps), {
    notFoundContent: () => o.fetcher.loading ? u(Ft, null, null) : "",
    ...e.defaultSlots
  });
}, Al = (e, n) => u(Zt, H({
  value: n[e.key],
  "onUpdate:value": (o) => n[e.key] = o,
  disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
  placeholder: me(e, "select"),
  class: {
    readonly: e.readonly,
    ...e.class
  },
  style: e.style || {
    width: Ee(e.width || "200px")
  }
}, e.defaultProps), null), Nl = (e, n) => {
  var a;
  let o = j(e.options) ? e.options(n) : e.options;
  return (fe(n[e.key]) || se(n[e.key])) && (n[e.key] = Sd(o, n[e.key], (a = e.defaultProps) == null ? void 0 : a.fieldNames)), u(ko, H({
    value: n[e.key],
    "onUpdate:value": (t) => n[e.key] = t,
    allowClear: !0,
    options: o,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    changeOnSelect: !0,
    showSearch: {
      filter(t, c) {
        return c.some((d) => d.label && d.label.toLowerCase().indexOf(t.toLowerCase()) > -1);
      }
    },
    placeholder: me(e, "select"),
    style: e.style || {
      width: Ee(e.width || "200px")
    },
    class: {
      readonly: e.readonly,
      ...e.class
    }
  }, e.defaultProps), {
    ...e.defaultSlots
  });
}, $l = (e, n) => (n[e.key] = Number(n[e.key]) || 0, u(ka, H({
  value: n[e.key],
  "onUpdate:value": (o) => n[e.key] = o,
  disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
  placeholder: me(e),
  style: e.style || {
    width: Ee(e.width) || "100px"
  },
  class: {
    readonly: e.readonly,
    ...e.class
  }
}, e.defaultProps), {
  ...e.defaultSlots
}));
function Ml(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Re(e);
}
const jl = (e, n) => {
  let o = {
    checkedChildren: () => {
      var a;
      return ((a = e.options) == null ? void 0 : a[0]) || null;
    },
    unCheckedChildren: () => {
      var a;
      return ((a = e.options) == null ? void 0 : a[1]) || null;
    }
  };
  return u(ta, H({
    checked: n[e.key],
    "onUpdate:checked": (a) => n[e.key] = a,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    style: e.style || {}
  }, e.defaultProps), Ml(o) ? o : {
    default: () => [o]
  });
};
function Ll(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Re(e);
}
const zl = (e, n) => {
  let o, a = j(e.options) ? e.options(n) : e.options;
  return a = a.map((t) => se(t) || fe(t) ? {
    value: t,
    label: t
  } : t), e.readonly ? u("div", {
    style: {
      padding: "0 11px"
    }
  }, [u(Oe, null, Ll(o = Oo(n[e.key], a)) ? o : {
    default: () => [o]
  })]) : u(Aa, H({
    value: n[e.key],
    "onUpdate:value": (t) => n[e.key] = t,
    optionType: "button",
    buttonStyle: "solid",
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    options: a,
    style: e.style || {}
  }, e.defaultProps), {
    ...e.defaultSlots
  });
};
function Rl(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Re(e);
}
const Bl = (e, n) => {
  let o = j(e.options) ? e.options(n) : e.options;
  return o = o.map((a) => se(a) || fe(a) ? {
    value: a,
    label: a
  } : a), e.readonly ? u("div", {
    style: {
      padding: "0 11px"
    }
  }, [Po(o, n[e.key]).map((a) => u(Oe, {
    style: {
      marginRight: "5px"
    }
  }, Rl(a) ? a : {
    default: () => [a]
  }))]) : u(Kt, H({
    value: n[e.key],
    "onUpdate:value": (a) => n[e.key] = a,
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    options: o,
    shape: "square",
    style: e.style || {}
  }, e.defaultProps), {
    ...e.defaultSlots
  });
}, Ul = (e, n) => n[e.key] ? u("div", H({
  style: e.style || {},
  innerHTML: n[e.key]
}, e.defaultProps), null) : null;
function Vl(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var Va = { exports: {} }, ot;
function Fl() {
  return ot || (ot = 1, function(e) {
    (function() {
      var n = function(o) {
        if (!(this instanceof n))
          return new n(o);
        if (this.version = 1, this.support = typeof File < "u" && typeof Blob < "u" && typeof FileList < "u" && (!!Blob.prototype.webkitSlice || !!Blob.prototype.mozSlice || !!Blob.prototype.slice || !1), !this.support) return !1;
        var a = this;
        a.files = [], a.defaults = {
          chunkSize: 1048576,
          forceChunkSize: !1,
          simultaneousUploads: 3,
          fileParameterName: "file",
          chunkNumberParameterName: "resumableChunkNumber",
          chunkSizeParameterName: "resumableChunkSize",
          currentChunkSizeParameterName: "resumableCurrentChunkSize",
          totalSizeParameterName: "resumableTotalSize",
          typeParameterName: "resumableType",
          identifierParameterName: "resumableIdentifier",
          fileNameParameterName: "resumableFilename",
          relativePathParameterName: "resumableRelativePath",
          totalChunksParameterName: "resumableTotalChunks",
          throttleProgressCallbacks: 0.5,
          query: {},
          headers: {},
          preprocess: null,
          method: "multipart",
          uploadMethod: "POST",
          testMethod: "GET",
          prioritizeFirstAndLastChunk: !1,
          target: "/",
          testTarget: null,
          parameterNamespace: "",
          testChunks: !0,
          generateUniqueIdentifier: null,
          getTarget: null,
          maxChunkRetries: 100,
          chunkRetryInterval: void 0,
          permanentErrors: [400, 404, 415, 500, 501],
          maxFiles: void 0,
          withCredentials: !1,
          xhrTimeout: 0,
          clearInput: !0,
          chunkFormat: "blob",
          setChunkTypeFromFile: !1,
          maxFilesErrorCallback: function(f, p) {
            var b = a.getOpt("maxFiles");
            alert("Please upload no more than " + b + " file" + (b === 1 ? "" : "s") + " at a time.");
          },
          minFileSize: 1,
          minFileSizeErrorCallback: function(f, p) {
            alert(f.fileName || f.name + " is too small, please upload files larger than " + t.formatSize(a.getOpt("minFileSize")) + ".");
          },
          maxFileSize: void 0,
          maxFileSizeErrorCallback: function(f, p) {
            alert(f.fileName || f.name + " is too large, please upload files less than " + t.formatSize(a.getOpt("maxFileSize")) + ".");
          },
          fileType: [],
          fileTypeErrorCallback: function(f, p) {
            alert(f.fileName || f.name + " has type not allowed, please upload files of type " + a.getOpt("fileType") + ".");
          }
        }, a.opts = o || {}, a.getOpt = function(f) {
          var p = this;
          if (f instanceof Array) {
            var b = {};
            return t.each(f, function(h) {
              b[h] = p.getOpt(h);
            }), b;
          }
          if (p instanceof C) {
            if (typeof p.opts[f] < "u")
              return p.opts[f];
            p = p.fileObj;
          }
          if (p instanceof y) {
            if (typeof p.opts[f] < "u")
              return p.opts[f];
            p = p.resumableObj;
          }
          if (p instanceof n)
            return typeof p.opts[f] < "u" ? p.opts[f] : p.defaults[f];
        }, a.events = [], a.on = function(f, p) {
          a.events.push(f.toLowerCase(), p);
        }, a.fire = function() {
          for (var f = [], p = 0; p < arguments.length; p++) f.push(arguments[p]);
          for (var b = f[0].toLowerCase(), p = 0; p <= a.events.length; p += 2)
            a.events[p] == b && a.events[p + 1].apply(a, f.slice(1)), a.events[p] == "catchall" && a.events[p + 1].apply(null, f);
          b == "fileerror" && a.fire("error", f[2], f[1]), b == "fileprogress" && a.fire("progress");
        };
        var t = {
          stopEvent: function(f) {
            f.stopPropagation(), f.preventDefault();
          },
          each: function(f, p) {
            if (typeof f.length < "u") {
              for (var b = 0; b < f.length; b++)
                if (p(f[b]) === !1) return;
            } else
              for (b in f)
                if (p(b, f[b]) === !1) return;
          },
          generateUniqueIdentifier: function(f, p) {
            var b = a.getOpt("generateUniqueIdentifier");
            if (typeof b == "function")
              return b(f, p);
            var h = f.webkitRelativePath || f.fileName || f.name, s = f.size;
            return s + "-" + h.replace(/[^0-9a-zA-Z_-]/img, "");
          },
          contains: function(f, p) {
            var b = !1;
            return t.each(f, function(h) {
              return h == p ? (b = !0, !1) : !0;
            }), b;
          },
          formatSize: function(f) {
            return f < 1024 ? f + " bytes" : f < 1024 * 1024 ? (f / 1024).toFixed(0) + " KB" : f < 1024 * 1024 * 1024 ? (f / 1024 / 1024).toFixed(1) + " MB" : (f / 1024 / 1024 / 1024).toFixed(1) + " GB";
          },
          getTarget: function(f, p) {
            var b = a.getOpt("target");
            if (f === "test" && a.getOpt("testTarget") && (b = a.getOpt("testTarget") === "/" ? a.getOpt("target") : a.getOpt("testTarget")), typeof b == "function")
              return b(p);
            var h = b.indexOf("?") < 0 ? "?" : "&", s = p.join("&");
            return b + h + s;
          }
        }, c = function(f) {
          t.stopEvent(f), f.dataTransfer && f.dataTransfer.items ? m(f.dataTransfer.items, f) : f.dataTransfer && f.dataTransfer.files && m(f.dataTransfer.files, f);
        }, d = function(f) {
          f.preventDefault();
        };
        function i(f, p, b, h) {
          var s;
          if (f.isFile)
            return f.file(function(v) {
              v.relativePath = p + v.name, b.push(v), h();
            });
          if (f.isDirectory ? s = f : f instanceof File && b.push(f), typeof f.webkitGetAsEntry == "function" && (s = f.webkitGetAsEntry()), s && s.isDirectory)
            return l(s, p + s.name + "/", b, h);
          typeof f.getAsFile == "function" && (f = f.getAsFile(), f instanceof File && (f.relativePath = p + f.name, b.push(f))), h();
        }
        function r(f, p) {
          if (!f || f.length === 0)
            return p();
          f[0](function() {
            r(f.slice(1), p);
          });
        }
        function l(f, p, b, h) {
          var s = f.createReader();
          s.readEntries(function(v) {
            if (!v.length)
              return h();
            r(
              v.map(function(w) {
                return i.bind(null, w, p, b);
              }),
              h
            );
          });
        }
        function m(f, p) {
          if (f.length) {
            a.fire("beforeAdd");
            var b = [];
            r(
              Array.prototype.map.call(f, function(h) {
                return i.bind(null, h, "", b);
              }),
              function() {
                b.length && g(b, p);
              }
            );
          }
        }
        var g = function(f, p) {
          var b = 0, h = a.getOpt(["maxFiles", "minFileSize", "maxFileSize", "maxFilesErrorCallback", "minFileSizeErrorCallback", "maxFileSizeErrorCallback", "fileType", "fileTypeErrorCallback"]);
          if (typeof h.maxFiles < "u" && h.maxFiles < f.length + a.files.length)
            if (h.maxFiles === 1 && a.files.length === 1 && f.length === 1)
              a.removeFile(a.files[0]);
            else
              return h.maxFilesErrorCallback(f, b++), !1;
          var s = [], v = [], w = f.length, E = function() {
            if (!--w) {
              if (!s.length && !v.length)
                return;
              window.setTimeout(function() {
                a.fire("filesAdded", s, v);
              }, 0);
            }
          };
          t.each(f, function(k) {
            var P = k.name;
            if (h.fileType.length > 0) {
              var O = !1;
              for (var x in h.fileType) {
                var _ = "." + h.fileType[x];
                if (P.toLowerCase().indexOf(_.toLowerCase(), P.length - _.length) !== -1) {
                  O = !0;
                  break;
                }
              }
              if (!O)
                return h.fileTypeErrorCallback(k, b++), !1;
            }
            if (typeof h.minFileSize < "u" && k.size < h.minFileSize)
              return h.minFileSizeErrorCallback(k, b++), !1;
            if (typeof h.maxFileSize < "u" && k.size > h.maxFileSize)
              return h.maxFileSizeErrorCallback(k, b++), !1;
            function D(M) {
              a.getFromUniqueIdentifier(M) ? v.push(k) : function() {
                k.uniqueIdentifier = M;
                var F = new y(a, k, M);
                a.files.push(F), s.push(F), F.container = typeof p < "u" ? p.srcElement : null, window.setTimeout(function() {
                  a.fire("fileAdded", F, p);
                }, 0);
              }(), E();
            }
            var A = t.generateUniqueIdentifier(k, p);
            A && typeof A.then == "function" ? A.then(
              function(M) {
                D(M);
              },
              function() {
                E();
              }
            ) : D(A);
          });
        };
        function y(f, p, b) {
          var h = this;
          h.opts = {}, h.getOpt = f.getOpt, h._prevProgress = 0, h.resumableObj = f, h.file = p, h.fileName = p.fileName || p.name, h.size = p.size, h.relativePath = p.relativePath || p.webkitRelativePath || h.fileName, h.uniqueIdentifier = b, h._pause = !1, h.container = "";
          var s = b !== void 0, v = function(w, E) {
            switch (w) {
              case "progress":
                h.resumableObj.fire("fileProgress", h, E);
                break;
              case "error":
                h.abort(), s = !0, h.chunks = [], h.resumableObj.fire("fileError", h, E);
                break;
              case "success":
                if (s) return;
                h.resumableObj.fire("fileProgress", h), h.isComplete() && h.resumableObj.fire("fileSuccess", h, E);
                break;
              case "retry":
                h.resumableObj.fire("fileRetry", h);
                break;
            }
          };
          return h.chunks = [], h.abort = function() {
            var w = 0;
            t.each(h.chunks, function(E) {
              E.status() == "uploading" && (E.abort(), w++);
            }), w > 0 && h.resumableObj.fire("fileProgress", h);
          }, h.cancel = function() {
            var w = h.chunks;
            h.chunks = [], t.each(w, function(E) {
              E.status() == "uploading" && (E.abort(), h.resumableObj.uploadNextChunk());
            }), h.resumableObj.removeFile(h), h.resumableObj.fire("fileProgress", h);
          }, h.retry = function() {
            h.bootstrap();
            var w = !1;
            h.resumableObj.on("chunkingComplete", function() {
              w || h.resumableObj.upload(), w = !0;
            });
          }, h.bootstrap = function() {
            h.abort(), s = !1, h.chunks = [], h._prevProgress = 0;
            for (var w = h.getOpt("forceChunkSize") ? Math.ceil : Math.floor, E = Math.max(w(h.file.size / h.getOpt("chunkSize")), 1), k = 0; k < E; k++)
              (function(P) {
                window.setTimeout(function() {
                  h.chunks.push(new C(h.resumableObj, h, P, v)), h.resumableObj.fire("chunkingProgress", h, P / E);
                }, 0);
              })(k);
            window.setTimeout(function() {
              h.resumableObj.fire("chunkingComplete", h);
            }, 0);
          }, h.progress = function() {
            if (s) return 1;
            var w = 0, E = !1;
            return t.each(h.chunks, function(k) {
              k.status() == "error" && (E = !0), w += k.progress(!0);
            }), w = E || w > 0.99999 ? 1 : w, w = Math.max(h._prevProgress, w), h._prevProgress = w, w;
          }, h.isUploading = function() {
            var w = !1;
            return t.each(h.chunks, function(E) {
              if (E.status() == "uploading")
                return w = !0, !1;
            }), w;
          }, h.isComplete = function() {
            var w = !1;
            return t.each(h.chunks, function(E) {
              var k = E.status();
              if (k == "pending" || k == "uploading" || E.preprocessState === 1)
                return w = !0, !1;
            }), !w;
          }, h.pause = function(w) {
            typeof w > "u" ? h._pause = !h._pause : h._pause = w;
          }, h.isPaused = function() {
            return h._pause;
          }, h.resumableObj.fire("chunkingStart", h), h.bootstrap(), this;
        }
        function C(f, p, b, h) {
          var s = this;
          s.opts = {}, s.getOpt = f.getOpt, s.resumableObj = f, s.fileObj = p, s.fileObjSize = p.size, s.fileObjType = p.file.type, s.offset = b, s.callback = h, s.lastProgressCallback = /* @__PURE__ */ new Date(), s.tested = !1, s.retries = 0, s.pendingRetry = !1, s.preprocessState = 0;
          var v = s.getOpt("chunkSize");
          return s.loaded = 0, s.startByte = s.offset * v, s.endByte = Math.min(s.fileObjSize, (s.offset + 1) * v), s.fileObjSize - s.endByte < v && !s.getOpt("forceChunkSize") && (s.endByte = s.fileObjSize), s.xhr = null, s.test = function() {
            s.xhr = new XMLHttpRequest();
            var w = function(x) {
              s.tested = !0;
              var _ = s.status();
              _ == "success" ? (s.callback(_, s.message()), s.resumableObj.uploadNextChunk()) : s.send();
            };
            s.xhr.addEventListener("load", w, !1), s.xhr.addEventListener("error", w, !1), s.xhr.addEventListener("timeout", w, !1);
            var E = [], k = s.getOpt("parameterNamespace"), P = s.getOpt("query");
            typeof P == "function" && (P = P(s.fileObj, s)), t.each(P, function(x, _) {
              E.push([encodeURIComponent(k + x), encodeURIComponent(_)].join("="));
            }), E = E.concat(
              [
                // define key/value pairs for additional parameters
                ["chunkNumberParameterName", s.offset + 1],
                ["chunkSizeParameterName", s.getOpt("chunkSize")],
                ["currentChunkSizeParameterName", s.endByte - s.startByte],
                ["totalSizeParameterName", s.fileObjSize],
                ["typeParameterName", s.fileObjType],
                ["identifierParameterName", s.fileObj.uniqueIdentifier],
                ["fileNameParameterName", s.fileObj.fileName],
                ["relativePathParameterName", s.fileObj.relativePath],
                ["totalChunksParameterName", s.fileObj.chunks.length]
              ].filter(function(x) {
                return s.getOpt(x[0]);
              }).map(function(x) {
                return [
                  k + s.getOpt(x[0]),
                  encodeURIComponent(x[1])
                ].join("=");
              })
            ), s.xhr.open(s.getOpt("testMethod"), t.getTarget("test", E)), s.xhr.timeout = s.getOpt("xhrTimeout"), s.xhr.withCredentials = s.getOpt("withCredentials");
            var O = s.getOpt("headers");
            typeof O == "function" && (O = O(s.fileObj, s)), t.each(O, function(x, _) {
              s.xhr.setRequestHeader(x, _);
            }), s.xhr.send(null);
          }, s.preprocessFinished = function() {
            s.preprocessState = 2, s.send();
          }, s.send = function() {
            var w = s.getOpt("preprocess");
            if (typeof w == "function")
              switch (s.preprocessState) {
                case 0:
                  s.preprocessState = 1, w(s);
                  return;
                case 1:
                  return;
              }
            if (s.getOpt("testChunks") && !s.tested) {
              s.test();
              return;
            }
            s.xhr = new XMLHttpRequest(), s.xhr.upload.addEventListener("progress", function(L) {
              /* @__PURE__ */ new Date() - s.lastProgressCallback > s.getOpt("throttleProgressCallbacks") * 1e3 && (s.callback("progress"), s.lastProgressCallback = /* @__PURE__ */ new Date()), s.loaded = L.loaded || 0;
            }, !1), s.loaded = 0, s.pendingRetry = !1, s.callback("progress");
            var E = function(L) {
              var X = s.status();
              if (X == "success" || X == "error")
                s.callback(X, s.message()), s.resumableObj.uploadNextChunk();
              else {
                s.callback("retry", s.message()), s.abort(), s.retries++;
                var ae = s.getOpt("chunkRetryInterval");
                ae !== void 0 ? (s.pendingRetry = !0, setTimeout(s.send, ae)) : s.send();
              }
            };
            s.xhr.addEventListener("load", E, !1), s.xhr.addEventListener("error", E, !1), s.xhr.addEventListener("timeout", E, !1);
            var k = [
              ["chunkNumberParameterName", s.offset + 1],
              ["chunkSizeParameterName", s.getOpt("chunkSize")],
              ["currentChunkSizeParameterName", s.endByte - s.startByte],
              ["totalSizeParameterName", s.fileObjSize],
              ["typeParameterName", s.fileObjType],
              ["identifierParameterName", s.fileObj.uniqueIdentifier],
              ["fileNameParameterName", s.fileObj.fileName],
              ["relativePathParameterName", s.fileObj.relativePath],
              ["totalChunksParameterName", s.fileObj.chunks.length]
            ].filter(function(L) {
              return s.getOpt(L[0]);
            }).reduce(function(L, X) {
              return L[s.getOpt(X[0])] = X[1], L;
            }, {}), P = s.getOpt("query");
            typeof P == "function" && (P = P(s.fileObj, s)), t.each(P, function(L, X) {
              k[L] = X;
            });
            var O = s.fileObj.file.slice ? "slice" : s.fileObj.file.mozSlice ? "mozSlice" : s.fileObj.file.webkitSlice ? "webkitSlice" : "slice", x = s.fileObj.file[O](s.startByte, s.endByte, s.getOpt("setChunkTypeFromFile") ? s.fileObj.file.type : ""), _ = null, D = [], A = s.getOpt("parameterNamespace");
            if (s.getOpt("method") === "octet")
              _ = x, t.each(k, function(L, X) {
                D.push([encodeURIComponent(A + L), encodeURIComponent(X)].join("="));
              });
            else if (_ = new FormData(), t.each(k, function(L, X) {
              _.append(A + L, X), D.push([encodeURIComponent(A + L), encodeURIComponent(X)].join("="));
            }), s.getOpt("chunkFormat") == "blob")
              _.append(A + s.getOpt("fileParameterName"), x, s.fileObj.fileName);
            else if (s.getOpt("chunkFormat") == "base64") {
              var M = new FileReader();
              M.onload = function(L) {
                _.append(A + s.getOpt("fileParameterName"), M.result), s.xhr.send(_);
              }, M.readAsDataURL(x);
            }
            var F = t.getTarget("upload", D), K = s.getOpt("uploadMethod");
            s.xhr.open(K, F), s.getOpt("method") === "octet" && s.xhr.setRequestHeader("Content-Type", "application/octet-stream"), s.xhr.timeout = s.getOpt("xhrTimeout"), s.xhr.withCredentials = s.getOpt("withCredentials");
            var T = s.getOpt("headers");
            typeof T == "function" && (T = T(s.fileObj, s)), t.each(T, function(L, X) {
              s.xhr.setRequestHeader(L, X);
            }), s.getOpt("chunkFormat") == "blob" && s.xhr.send(_);
          }, s.abort = function() {
            s.xhr && s.xhr.abort(), s.xhr = null;
          }, s.status = function() {
            return s.pendingRetry ? "uploading" : s.xhr ? s.xhr.readyState < 4 ? "uploading" : s.xhr.status == 200 || s.xhr.status == 201 ? "success" : t.contains(s.getOpt("permanentErrors"), s.xhr.status) || s.retries >= s.getOpt("maxChunkRetries") ? "error" : (s.abort(), "pending") : "pending";
          }, s.message = function() {
            return s.xhr ? s.xhr.responseText : "";
          }, s.progress = function(w) {
            typeof w > "u" && (w = !1);
            var E = w ? (s.endByte - s.startByte) / s.fileObjSize : 1;
            if (s.pendingRetry) return 0;
            (!s.xhr || !s.xhr.status) && (E *= 0.95);
            var k = s.status();
            switch (k) {
              case "success":
              case "error":
                return 1 * E;
              case "pending":
                return 0 * E;
              default:
                return s.loaded / (s.endByte - s.startByte) * E;
            }
          }, this;
        }
        return a.uploadNextChunk = function() {
          var f = !1;
          if (a.getOpt("prioritizeFirstAndLastChunk") && (t.each(a.files, function(b) {
            if (b.chunks.length && b.chunks[0].status() == "pending" && b.chunks[0].preprocessState === 0)
              return b.chunks[0].send(), f = !0, !1;
            if (b.chunks.length > 1 && b.chunks[b.chunks.length - 1].status() == "pending" && b.chunks[b.chunks.length - 1].preprocessState === 0)
              return b.chunks[b.chunks.length - 1].send(), f = !0, !1;
          }), f) || (t.each(a.files, function(b) {
            if (b.isPaused() === !1 && t.each(b.chunks, function(h) {
              if (h.status() == "pending" && h.preprocessState === 0)
                return h.send(), f = !0, !1;
            }), f) return !1;
          }), f)) return !0;
          var p = !1;
          return t.each(a.files, function(b) {
            if (!b.isComplete())
              return p = !0, !1;
          }), p || a.fire("complete"), !1;
        }, a.assignBrowse = function(f, p) {
          typeof f.length > "u" && (f = [f]), t.each(f, function(b) {
            var h;
            b.tagName === "INPUT" && b.type === "file" ? h = b : (h = document.createElement("input"), h.setAttribute("type", "file"), h.style.display = "none", b.addEventListener("click", function() {
              h.style.opacity = 0, h.style.display = "block", h.focus(), h.click(), h.style.display = "none";
            }, !1), b.appendChild(h));
            var s = a.getOpt("maxFiles");
            typeof s > "u" || s != 1 ? h.setAttribute("multiple", "multiple") : h.removeAttribute("multiple"), p ? h.setAttribute("webkitdirectory", "webkitdirectory") : h.removeAttribute("webkitdirectory");
            var v = a.getOpt("fileType");
            typeof v < "u" && v.length >= 1 ? h.setAttribute("accept", v.map(function(w) {
              return "." + w;
            }).join(",")) : h.removeAttribute("accept"), h.addEventListener("change", function(w) {
              g(w.target.files, w);
              var E = a.getOpt("clearInput");
              E && (w.target.value = "");
            }, !1);
          });
        }, a.assignDrop = function(f) {
          typeof f.length > "u" && (f = [f]), t.each(f, function(p) {
            p.addEventListener("dragover", d, !1), p.addEventListener("dragenter", d, !1), p.addEventListener("drop", c, !1);
          });
        }, a.unAssignDrop = function(f) {
          typeof f.length > "u" && (f = [f]), t.each(f, function(p) {
            p.removeEventListener("dragover", d), p.removeEventListener("dragenter", d), p.removeEventListener("drop", c);
          });
        }, a.isUploading = function() {
          var f = !1;
          return t.each(a.files, function(p) {
            if (p.isUploading())
              return f = !0, !1;
          }), f;
        }, a.upload = function() {
          if (!a.isUploading()) {
            a.fire("uploadStart");
            for (var f = 1; f <= a.getOpt("simultaneousUploads"); f++)
              a.uploadNextChunk();
          }
        }, a.pause = function() {
          t.each(a.files, function(f) {
            f.abort();
          }), a.fire("pause");
        }, a.cancel = function() {
          a.fire("beforeCancel");
          for (var f = a.files.length - 1; f >= 0; f--)
            a.files[f].cancel();
          a.fire("cancel");
        }, a.progress = function() {
          var f = 0, p = 0;
          return t.each(a.files, function(b) {
            f += b.progress() * b.size, p += b.size;
          }), p > 0 ? f / p : 0;
        }, a.addFile = function(f, p) {
          g([f], p);
        }, a.addFiles = function(f, p) {
          g(f, p);
        }, a.removeFile = function(f) {
          for (var p = a.files.length - 1; p >= 0; p--)
            a.files[p] === f && a.files.splice(p, 1);
        }, a.getFromUniqueIdentifier = function(f) {
          var p = !1;
          return t.each(a.files, function(b) {
            b.uniqueIdentifier == f && (p = b);
          }), p;
        }, a.getSize = function() {
          var f = 0;
          return t.each(a.files, function(p) {
            f += p.size;
          }), f;
        }, a.handleDropEvent = function(f) {
          c(f);
        }, a.handleChangeEvent = function(f) {
          g(f.target.files, f), f.target.value = "";
        }, a.updateQuery = function(f) {
          a.opts.query = f;
        }, this;
      };
      e.exports = n;
    })();
  }(Va)), Va.exports;
}
var Kl = Fl();
const Hl = /* @__PURE__ */ Vl(Kl);
function tt(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Re(e);
}
const cc = /* @__PURE__ */ Pe({
  name: "NewbieUploader",
  props: {
    value: {
      type: [Object, Array, String],
      default: () => ({})
    },
    /**
     * 上传文件字段名
     */
    name: {
      type: String,
      default: "file"
    },
    /**
     * 设置上传的请求头部,IE10 以上有效
     */
    headers: {
      type: Object,
      default: () => ({})
    },
    /**
     * 接受上传的文件类型, 详见 [input accept Attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept)
     */
    accept: {
      type: String,
      default: ""
    },
    /**
     * 上传列表的内建样式,支持三种基本样式 text/file, picture 和 picture-card
     *
     * @values text|file, picture, picture-card
     */
    type: {
      type: String,
      default: "file"
    },
    /**
     * 是否禁用
     */
    disabled: {
      type: Boolean,
      default: !1
    },
    /**
     * 单个文件大小上限,单位为 MB
     */
    maxSize: {
      type: Number,
      default: 20
    },
    /**
     * 上传文件个数上限
     */
    maxNum: {
      type: Number,
      default: 1
    },
    /**
     * 是否支持多选文件
     */
    multiple: {
      type: Boolean,
      default: !1
    },
    /**
     * 是否使用分块上传
     */
    multipart: {
      type: Boolean,
      default: !1
    },
    /**
     * 上传文件的服务器地址
     */
    action: {
      type: String,
      default: ""
    },
    /**
     * 上传时的附加参数
     */
    extraData: {
      type: Object,
      default: () => ({})
    },
    /**
     * 上传按钮文本
     */
    uploadText: {
      type: String,
      default: ""
    },
    /**
     * 上传盘符标志,可以灵活配合后台使用
     */
    disk: {
      type: String,
      default: ""
    },
    /**
     * 原生 [Uploader](https://www.antdv.com/components/upload-cn#api) 配置
     */
    uploadProps: {
      type: Object,
      default: () => ({})
    }
  },
  emits: [
    "update:value",
    /**
     * 上传成功时触发
     *
     * @event success
     * @param {Array} fileList 文件列表
     *
     */
    "success"
  ],
  setup(e, {
    emit: n
  }) {
    const {
      STATE_CODE_SUCCESS: o
    } = xd, a = Ta.useInjectFormItemContext(), t = pn(Na, () => ({})), c = t.uploadUrl || "", d = t.defaultFileItem || {}, {
      url: i,
      path: r,
      name: l
    } = d, m = qe({
      fileList: [],
      previewVisible: !1,
      previewCurrent: 0,
      progress: e.multipart ? {
        strokeColor: {
          "0%": "#108ee9",
          "100%": "#87d068"
        },
        strokeWidth: 3,
        format: (P) => `${parseFloat(P.toFixed(2))}%`
      } : null
    }), g = J(() => !e.maxNum || e.maxNum === 1), y = J(() => m.fileList.length >= e.maxNum), C = J(() => e.type === "picture-card" || e.type === "picture"), f = (P) => {
      ye(P) || (P = [P]);
      const O = P.filter((x) => x.done || !!x[r] || !!x[l]).map((x) => ({
        ...to(x, Object.values(d)),
        _type: "file",
        _disk: e.disk
      }));
      return g.value ? O[0] || null : O;
    }, p = (P) => {
      if (!P)
        return [];
      P = ye(P) ? P : [P], m.fileList = P.filter((O) => O[i] || O[l] || O[r]).map((O) => ({
        uid: Td(1, 1e7),
        done: !0,
        name: O[l] || I("form.attachment"),
        url: O[i],
        _type: "file",
        ...O
      })), n("update:value", f(m.fileList));
    };
    tn(() => {
      p(e.value);
    }), oe(() => e.value, (P) => {
      P && !ye(P) && (P = [P]), Ln(Qo(P, r).sort(), Qo(m.fileList, r).sort()) || p(P);
    });
    const b = (P) => {
      m.previewCurrent = m.fileList.findIndex((O) => O.uid === P.uid), m.previewVisible = !0;
    }, h = (P) => {
      let O = f(P);
      n("update:value", O), n("success", O), a.onFieldChange();
    }, s = ({
      file: P,
      fileList: O
    }) => {
      var x, _;
      if (O = O.map((D) => {
        if (D.status === "done" && D.response) {
          const A = D.response;
          A.result[r] ? (D = {
            ...D,
            ...to(A.result, Object.values(d))
          }, D.done = !0) : D.isRemoved = !0;
        } else D.status === "error" && (D.isRemoved = !0);
        return D;
      }).filter((D) => !D.isRemoved), P.status === "removed")
        h(O);
      else if (P.status === "done" && ((x = P.response) == null ? void 0 : x.status) !== o)
        ge.error(((_ = P.response) == null ? void 0 : _.result) || I("form.upload-fail"));
      else if (P.status === "error" && P.error)
        P.error.status === 413 ? ge.error(`${P.error.status}: ${I("form.upload-size-limit")}`) : ge.error(P.error.message || I("form.upload-fail"));
      else if (!P.status) {
        let D = -1;
        O.forEach((A, M) => {
          A.uid === P.uid && (D = M);
        }), D >= 0 && O.splice(D, 1);
      }
      Sn(O, (D) => D.done) && h(O), m.fileList = O;
    }, v = (P) => P.size > e.maxSize * 1024 * 1024 ? (ge.error(I("form.upload-size-max", {
      size: e.maxSize
    })), !1) : y.value ? (ge.error(I("form.upload-num-max", {
      num: e.maxNum
    })), !1) : !0, w = async ({
      action: P,
      data: O,
      file: x,
      filename: _,
      headers: D,
      onError: A,
      onProgress: M,
      onSuccess: F,
      withCredentials: K
    }) => {
      console.log("Using uploadAction");
      const T = new FormData();
      O && Object.keys(O).forEach((L) => {
        T.append(L, O[L]);
      }), T.append(_, x), e.disk && T.append("_disk", e.disk);
      try {
        let L = await gn().post(P, T, {
          withCredentials: K,
          headers: D,
          onUploadProgress: ({
            total: X,
            loaded: ae
          }) => {
            M({
              percent: parseInt(Math.round(ae / X * 100).toFixed(2))
            }, x);
          }
        });
        F(L, x);
      } catch (L) {
        A(L);
      }
      return {
        abort() {
          console.log("upload progress is aborted.");
        }
      };
    }, E = async ({
      action: P,
      data: O,
      file: x,
      headers: _,
      onError: D,
      onProgress: A,
      onSuccess: M
    }) => {
      O = O || {}, e.disk && (O._disk = e.disk);
      const F = new Hl({
        // Use chunk size that is smaller than your maximum limit due a resumable issue
        // https://github.com/23/resumable.js/issues/51
        chunkSize: 1 * 1024 * 1024,
        //https://github.com/23/resumable.js/issues/559#issuecomment-622429803
        forceChunkSize: !1,
        simultaneousUploads: 3,
        testChunks: !1,
        throttleProgressCallbacks: 1,
        // Get the url from data-url tag
        target: P,
        query: O,
        headers: _
      });
      F.on("fileAdded", () => {
        F.upload();
      }), F.on("fileProgress", (K) => {
        A({
          percent: K.progress() * 100
        });
      }), F.on("fileSuccess", (K, T) => {
        M(JSON.parse(T), K);
      }), F.on("fileError", (K) => {
        D(K);
      }), F.addFile(x);
    }, k = () => e.disabled ? null : C.value ? y.value ? null : [u(Zo, null, null), u("div", {
      class: "newbie-upload-text"
    }, [I("form.upload")])] : !C.value && !y.value ? [u(qn, {
      label: e.uploadText || I("form.upload"),
      type: "primary",
      icon: u(Zo, null, null)
    }, null)] : null;
    return () => {
      let P, O;
      return u("div", {
        class: "newbie-uploader"
      }, [u(dd, H({
        fileList: m.fileList,
        "onUpdate:fileList": (x) => m.fileList = x,
        class: `newbie-upload ${C.value ? "is-image" : ""}`,
        name: e.name,
        listType: e.type,
        disabled: e.disabled,
        accept: e.accept,
        action: e.action || c,
        headers: e.headers,
        data: e.extraData,
        multiple: e.multiple,
        progress: m.progress,
        beforeUpload: v,
        customRequest: e.multipart ? E : w,
        onPreview: C.value ? b : null,
        onChange: s
      }, e.uploadProps), tt(P = k()) ? P : {
        default: () => [P]
      }), C.value ? u(ld, {
        preview: {
          visible: m.previewVisible,
          onVisibleChange: (x) => m.previewVisible = x,
          current: m.previewCurrent
        }
      }, tt(O = m.fileList.map((x) => u(Ht, {
        style: {
          display: "none"
        },
        src: x.url
      }, null))) ? O : {
        default: () => [O]
      }) : null]);
    };
  }
}), Wl = (e, n) => u(cc, H({
  value: n[e.key],
  "onUpdate:value": (o) => n[e.key] = o,
  key: e.key,
  disabled: j(e.disabled) ? e.disabled(n) : e.disabled
}, e.defaultProps), {
  ...e.defaultSlots
}), Yl = (e, n) => u(tc, H({
  key: e.key,
  value: n[e.key],
  "onUpdate:value": (o) => n[e.key] = o,
  readonly: e.readonly,
  disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
  placeholder: me(e)
}, e.defaultProps), null), Xl = (e, n) => {
  const o = n[e.key];
  return o ? ye(o) ? o.map((a) => u(Oe, a.defaultProps, {
    default: () => a
  })) : u(Oe, e.defaultProps, {
    default: () => o
  }) : null;
};
function dc(e) {
  return Mt() ? (jt(e), !0) : !1;
}
function Se(e) {
  return typeof e == "function" ? e() : $t(e);
}
const lc = typeof window < "u", vn = () => {
};
function rc(e, n) {
  function o(...a) {
    return new Promise((t, c) => {
      Promise.resolve(e(() => n.apply(this, a), { fn: n, thisArg: this, args: a })).then(t).catch(c);
    });
  }
  return o;
}
function ql(e, n = {}) {
  let o, a, t = vn;
  const c = (i) => {
    clearTimeout(i), t(), t = vn;
  };
  return (i) => {
    const r = Se(e), l = Se(n.maxWait);
    return o && c(o), r <= 0 || l !== void 0 && l <= 0 ? (a && (c(a), a = null), Promise.resolve(i())) : new Promise((m, g) => {
      t = n.rejectOnCancel ? g : m, l && !a && (a = setTimeout(() => {
        o && c(o), a = null, m(i());
      }, l)), o = setTimeout(() => {
        a && c(a), a = null, m(i());
      }, r);
    });
  };
}
function Ql(e, n = !0, o = !0, a = !1) {
  let t = 0, c, d = !0, i = vn, r;
  const l = () => {
    c && (clearTimeout(c), c = void 0, i(), i = vn);
  };
  return (g) => {
    const y = Se(e), C = Date.now() - t, f = () => r = g();
    return l(), y <= 0 ? (t = Date.now(), f()) : (C > y && (o || !d) ? (t = Date.now(), f()) : n && (r = new Promise((p, b) => {
      i = a ? b : p, c = setTimeout(() => {
        t = Date.now(), d = !0, p(f()), l();
      }, Math.max(0, y - C));
    })), !o && !c && (c = setTimeout(() => d = !0, y)), d = !1, r);
  };
}
function Gl(...e) {
  if (e.length !== 1)
    return yo(...e);
  const n = e[0];
  return typeof n == "function" ? Lt(bo(() => ({ get: n, set: vn }))) : z(n);
}
function Zl(e, n = 200, o = {}) {
  return rc(
    ql(n, o),
    e
  );
}
function Jl(e, n = 200, o = !1, a = !0, t = !1) {
  return rc(
    Ql(n, o, a, t),
    e
  );
}
var er = Object.defineProperty, nr = Object.defineProperties, ar = Object.getOwnPropertyDescriptors, ct = Object.getOwnPropertySymbols, or = Object.prototype.hasOwnProperty, tr = Object.prototype.propertyIsEnumerable, dt = (e, n, o) => n in e ? er(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, cr = (e, n) => {
  for (var o in n || (n = {}))
    or.call(n, o) && dt(e, o, n[o]);
  if (ct)
    for (var o of ct(n))
      tr.call(n, o) && dt(e, o, n[o]);
  return e;
}, dr = (e, n) => nr(e, ar(n));
function lr(e) {
  if (!ad(e))
    return od(e);
  const n = Array.isArray(e.value) ? new Array(e.value.length) : {};
  for (const o in e.value)
    n[o] = bo(() => ({
      get() {
        return e.value[o];
      },
      set(a) {
        if (Array.isArray(e.value)) {
          const t = [...e.value];
          t[o] = a, e.value = t;
        } else {
          const t = dr(cr({}, e.value), { [o]: a });
          Object.setPrototypeOf(t, Object.getPrototypeOf(e.value)), e.value = t;
        }
      }
    }));
  return n;
}
function rr(e, n = !0) {
  Nt() ? tn(e) : n ? e() : hn(e);
}
function ir(e) {
  var n;
  const o = Se(e);
  return (n = o == null ? void 0 : o.$el) != null ? n : o;
}
const $a = lc ? window : void 0;
function Nn(...e) {
  let n, o, a, t;
  if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([o, a, t] = e, n = $a) : [n, o, a, t] = e, !n)
    return vn;
  Array.isArray(o) || (o = [o]), Array.isArray(a) || (a = [a]);
  const c = [], d = () => {
    c.forEach((m) => m()), c.length = 0;
  }, i = (m, g, y, C) => (m.addEventListener(g, y, C), () => m.removeEventListener(g, y, C)), r = oe(
    () => [ir(n), Se(t)],
    ([m, g]) => {
      d(), m && c.push(
        ...o.flatMap((y) => a.map((C) => i(m, y, C, g)))
      );
    },
    { immediate: !0, flush: "post" }
  ), l = () => {
    r(), d();
  };
  return dc(l), l;
}
function sr() {
  const e = z(!1);
  return Nt() && tn(() => {
    e.value = !0;
  }), e;
}
function ur(e) {
  const n = sr();
  return J(() => (n.value, !!e()));
}
function mr(e, n = {}) {
  const { window: o = $a } = n, a = ur(() => o && "matchMedia" in o && typeof o.matchMedia == "function");
  let t;
  const c = z(!1), d = () => {
    t && ("removeEventListener" in t ? t.removeEventListener("change", i) : t.removeListener(i));
  }, i = () => {
    a.value && (d(), t = o.matchMedia(Gl(e).value), c.value = !!(t != null && t.matches), t && ("addEventListener" in t ? t.addEventListener("change", i) : t.addListener(i)));
  };
  return vo(i), dc(() => d()), c;
}
var fr = Object.defineProperty, pr = Object.defineProperties, hr = Object.getOwnPropertyDescriptors, lt = Object.getOwnPropertySymbols, gr = Object.prototype.hasOwnProperty, vr = Object.prototype.propertyIsEnumerable, rt = (e, n, o) => n in e ? fr(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, yr = (e, n) => {
  for (var o in n || (n = {}))
    gr.call(n, o) && rt(e, o, n[o]);
  if (lt)
    for (var o of lt(n))
      vr.call(n, o) && rt(e, o, n[o]);
  return e;
}, br = (e, n) => pr(e, hr(n));
function wr(e, n = {}) {
  var o, a;
  const {
    pointerTypes: t,
    preventDefault: c,
    stopPropagation: d,
    exact: i,
    onMove: r,
    onEnd: l,
    onStart: m,
    initialValue: g,
    axis: y = "both",
    draggingElement: C = $a,
    handle: f = e
  } = n, p = z(
    (o = Se(g)) != null ? o : { x: 0, y: 0 }
  ), b = z(), h = (k) => t ? t.includes(k.pointerType) : !0, s = (k) => {
    Se(c) && k.preventDefault(), Se(d) && k.stopPropagation();
  }, v = (k) => {
    if (!h(k) || Se(i) && k.target !== Se(e))
      return;
    const P = Se(e).getBoundingClientRect(), O = {
      x: k.clientX - P.left,
      y: k.clientY - P.top
    };
    (m == null ? void 0 : m(O, k)) !== !1 && (b.value = O, s(k));
  }, w = (k) => {
    if (!h(k) || !b.value)
      return;
    let { x: P, y: O } = p.value;
    (y === "x" || y === "both") && (P = k.clientX - b.value.x), (y === "y" || y === "both") && (O = k.clientY - b.value.y), p.value = {
      x: P,
      y: O
    }, r == null || r(p.value, k), s(k);
  }, E = (k) => {
    h(k) && b.value && (b.value = void 0, l == null || l(p.value, k), s(k));
  };
  if (lc) {
    const k = { capture: (a = n.capture) != null ? a : !0 };
    Nn(f, "pointerdown", v, k), Nn(C, "pointermove", w, k), Nn(C, "pointerup", E, k);
  }
  return br(yr({}, lr(p)), {
    position: p,
    isDragging: J(() => !!b.value),
    style: J(
      () => `left:${p.value.x}px;top:${p.value.y}px;`
    )
  });
}
const it = 1;
function kr(e, n = {}) {
  const {
    throttle: o = 0,
    idle: a = 200,
    onStop: t = vn,
    onScroll: c = vn,
    offset: d = {
      left: 0,
      right: 0,
      top: 0,
      bottom: 0
    },
    eventListenerOptions: i = {
      capture: !1,
      passive: !0
    },
    behavior: r = "auto"
  } = n, l = z(0), m = z(0), g = J({
    get() {
      return l.value;
    },
    set(E) {
      C(E, void 0);
    }
  }), y = J({
    get() {
      return m.value;
    },
    set(E) {
      C(void 0, E);
    }
  });
  function C(E, k) {
    var P, O, x;
    const _ = Se(e);
    _ && ((x = _ instanceof Document ? document.body : _) == null || x.scrollTo({
      top: (P = Se(k)) != null ? P : y.value,
      left: (O = Se(E)) != null ? O : g.value,
      behavior: Se(r)
    }));
  }
  const f = z(!1), p = qe({
    left: !0,
    right: !1,
    top: !0,
    bottom: !1
  }), b = qe({
    left: !1,
    right: !1,
    top: !1,
    bottom: !1
  }), h = (E) => {
    f.value && (f.value = !1, b.left = !1, b.right = !1, b.top = !1, b.bottom = !1, t(E));
  }, s = Zl(h, o + a), v = (E) => {
    const k = E === window ? E.document.documentElement : E === document ? E.documentElement : E, { display: P, flexDirection: O } = getComputedStyle(k), x = k.scrollLeft;
    b.left = x < l.value, b.right = x > l.value;
    const _ = Math.abs(x) <= 0 + (d.left || 0), D = Math.abs(x) + k.clientWidth >= k.scrollWidth - (d.right || 0) - it;
    P === "flex" && O === "row-reverse" ? (p.left = D, p.right = _) : (p.left = _, p.right = D), l.value = x;
    let A = k.scrollTop;
    E === document && !A && (A = document.body.scrollTop), b.top = A < m.value, b.bottom = A > m.value;
    const M = Math.abs(A) <= 0 + (d.top || 0), F = Math.abs(A) + k.clientHeight >= k.scrollHeight - (d.bottom || 0) - it;
    P === "flex" && O === "column-reverse" ? (p.top = F, p.bottom = M) : (p.top = M, p.bottom = F), m.value = A;
  }, w = (E) => {
    const k = E.target === document ? E.target.documentElement : E.target;
    v(k), f.value = !0, s(E), c(E);
  };
  return Nn(
    e,
    "scroll",
    o ? Jl(w, o, !0, !1) : w,
    i
  ), Nn(
    e,
    "scrollend",
    h,
    i
  ), {
    x: g,
    y,
    isScrolling: f,
    arrivedState: p,
    directions: b,
    measure() {
      const E = Se(e);
      E && v(E);
    }
  };
}
function Cr(e = {}) {
  const {
    window: n = $a,
    initialWidth: o = 1 / 0,
    initialHeight: a = 1 / 0,
    listenOrientation: t = !0,
    includeScrollbar: c = !0
  } = e, d = z(o), i = z(a), r = () => {
    n && (c ? (d.value = n.innerWidth, i.value = n.innerHeight) : (d.value = n.document.documentElement.clientWidth, i.value = n.document.documentElement.clientHeight));
  };
  if (r(), rr(r), Nn("resize", r, { passive: !0 }), t) {
    const l = mr("(orientation: portrait)");
    oe(l, () => r());
  }
  return { width: d, height: i };
}
const ic = /* @__PURE__ */ Pe({
  name: "NewbieModal",
  props: {
    /**
     * 弹窗类型
     *
     * @values modal, drawer
     */
    type: {
      type: String,
      default: "modal"
    },
    /**
     * 可见性控制
     * `v-model:visible`
     */
    visible: {
      type: Boolean,
      default: !1
    },
    /**
     * 宽度
     */
    width: {
      type: [Number, String],
      default: 800
    },
    /**
     * 高度,仅当Type为modal时有效
     */
    height: {
      type: [Number, String],
      default: 500
    },
    /**
     * 标题
     */
    title: {
      type: String,
      default: ""
    },
    /**
     * 为 `Function` 时返回 Promise, resolve(true) 正常关闭,resolve(false) 可阻止关闭;
     * 为 `Object` 时参考 [下方配置 beforeclose](#beforeclose)
     */
    beforeClose: {
      type: [Function, Object],
      default: null
    },
    /**
     * 原生 [Modal](https://www.antdv.com/components/modal-cn#api) 或者是 [Drawer](https://www.antdv.com/components/drawer-cn#api) 的配置
     */
    modalProps: {
      type: Object,
      default: () => ({})
    }
  },
  emits: [
    /**
     * @event update:visible
     * @param {boolean} visible 是否可见
     */
    "update:visible",
    /**
     * 关闭弹窗时回调
     *
     * @event close
     */
    "close"
  ],
  setup(e, {
    emit: n,
    slots: o
  }) {
    const a = z(null), t = z(!1), c = z(!1);
    oe(
      () => e.visible,
      (k) => {
        c.value = k;
      },
      {
        immediate: !0
      }
      // 添加 immediate 选项
    );
    const d = async () => {
      if (!(e.beforeClose && j(e.beforeClose) && !await e.beforeClose())) {
        if (e.beforeClose && Ke(e.beforeClose)) {
          const {
            title: k,
            content: P,
            okText: O,
            cancelText: x,
            trigger: _
          } = e.beforeClose;
          if (j(_) ? _() : _) {
            en.confirm({
              title: k || I("common.action-prompt"),
              content: P || I("common.close-confirm"),
              okText: O || I("common.confirm"),
              cancelText: x || I("common.cancel"),
              onOk: () => {
                t.value = !1, n("update:visible", !1), n("close");
              }
            });
            return;
          }
        }
        t.value = !1, n("update:visible", !1), n("close");
      }
    }, {
      x: i,
      y: r,
      isDragging: l
    } = wr(a), m = z(0), g = z(0), y = z(!1), C = z(0), f = z(0), p = z(0), b = z(0), h = z({
      left: 0,
      right: 0,
      top: 0,
      bottom: 0
    });
    oe([i, r], () => {
      if (!y.value) {
        m.value = i.value, g.value = r.value;
        const k = document.body.getBoundingClientRect(), P = a.value.getBoundingClientRect();
        h.value.right = k.width - P.width, h.value.bottom = Math.max(k.height - P.height, 800), p.value = C.value, b.value = f.value;
      }
      y.value = !0;
    }), oe(l, () => {
      l || (y.value = !1);
    }), vo(() => {
      y.value && (C.value = p.value + Math.min(Math.max(h.value.left, i.value), h.value.right) - m.value, f.value = b.value + Math.min(Math.max(h.value.top, r.value), h.value.bottom) - g.value);
    });
    const s = J(() => ({
      transform: `translate(${C.value}px, ${f.value}px)`
    })), v = () => u("div", {
      class: "newbie-modal-header"
    }, [u("span", {
      class: "newbie-modal-title",
      ref: a
    }, [e.title]), u("div", {
      class: "newbie-modal-actions"
    }, [t.value ? u("a", {
      onClick: () => t.value = !1
    }, [u(Md, {
      style: {
        fontSize: "16px"
      }
    }, null)]) : u("a", {
      onClick: () => t.value = !0
    }, [u(jd, {
      style: {
        fontSize: "16px"
      }
    }, null)]), u("a", {
      onClick: d
    }, [u(Jo, {
      style: {
        fontSize: "20px",
        marginTop: "2px"
      }
    }, null)])])]), w = () => u(en, H({
      footer: null,
      wrapStyle: {
        overflow: "hidden"
      },
      wrapClassName: `newbie-modal ${t.value ? "full-modal" : ""}`,
      width: t.value ? "100%" : Ee(e.width),
      open: c.value,
      "onUpdate:open": (k) => c.value = k,
      bodyStyle: {
        maxHeight: e.height ? Ee(e.height) : "600px",
        overflow: "auto"
      },
      closable: !1,
      destroyOnClose: !0,
      maskClosable: !1,
      onCancel: d
    }, e.modalProps), {
      /**
       * @slot 弹窗内容
       */
      default: () => {
        var k;
        return (k = o.default) == null ? void 0 : k.call(o);
      },
      title: () => v(),
      modalRender: ({
        originVNode: k
      }) => u("div", {
        style: s.value
      }, [k])
    }), E = () => u(rd, H({
      title: e.title,
      open: c.value,
      "onUpdate:open": (k) => c.value = k,
      closable: !1,
      destroyOnClose: !0,
      width: Ee(e.width),
      maskClosable: !1,
      onClose: d
    }, e.modalProps), {
      /**
       * @slot 弹窗内容
       */
      default: () => {
        var k;
        return (k = o.default) == null ? void 0 : k.call(o);
      },
      extra: () => u(Jo, {
        onClick: d
      }, null)
    });
    return () => u("div", {
      class: "newbie-modal"
    }, [e.type === "modal" ? w() : E()]);
  }
}), Sr = (e, n, o) => {
  const {
    searchProvider: a
  } = o;
  let t = [{
    label: I("search.equal"),
    value: "equal"
  }, {
    label: I("search.not-equal"),
    value: "notEqual"
  }, {
    label: I("search.include"),
    value: "include"
  }, {
    label: I("search.exclude"),
    value: "exclude"
  }, {
    label: I("search.null"),
    value: "null"
  }, {
    label: I("search.not-null"),
    value: "notNull"
  }];
  e.conditions && e.conditions.length && (t = t.filter((l) => e.conditions.includes(l.value)));
  const c = J(() => n[e.key].value), d = z();
  e.collectItem = () => {
    let l = n[e.key].value || null, m = null;
    const g = ve(t, {
      value: n[e.key].condition
    });
    return g && ["null", "notNull"].includes(g.value) ? (l = null, m = `${e.title}${g == null ? void 0 : g.label}`) : l && (m = `${e.title}${g == null ? void 0 : g.label}: ${l}`), {
      value: l,
      searchLabel: m
    };
  };
  const i = () => {
    var l;
    (l = d.value) == null || l.focus();
  }, r = u(Tn, H({
    ref: d,
    value: n[e.key].value,
    "onUpdate:value": (l) => n[e.key].value = l,
    allowClear: !0,
    disabled: n[e.key].condition === "null" || n[e.key].condition === "notNull",
    class: `${a.inputClass || ""}`,
    style: {
      width: "200px"
    },
    placeholder: `搜索${e.title}`
  }, e.inputProps), null);
  return {
    conditions: t,
    Component: r,
    displayValue: c,
    onComponentOpen: i
  };
}, xr = (e, n, o) => {
  const {
    searchProvider: a
  } = o;
  let t = [{
    label: I("search.equal"),
    value: "equal"
  }, {
    label: I("search.not-equal"),
    value: "notEqual"
  }, {
    label: I("search.less-than"),
    value: "lessThan"
  }, {
    label: I("search.greater-than"),
    value: "greaterThan"
  }, {
    label: I("search.between"),
    value: "between"
  }];
  e.conditions && e.conditions.length && (t = t.filter((m) => e.conditions.includes(m.value)));
  const c = () => {
    if (n[e.key].condition === "between" && n[e.key].value && fe(n[e.key].value[0]) && fe(n[e.key].value[1]) && n[e.key].value[0] > n[e.key].value[1]) {
      const m = n[e.key].value[0];
      n[e.key].value[0] = n[e.key].value[1], n[e.key].value[1] = m;
    }
  }, d = z(null);
  e.collectItem = () => {
    var C;
    let m = null, g = null;
    const y = (C = ve(t, {
      value: n[e.key].condition
    })) == null ? void 0 : C.label;
    return n[e.key].condition === "between" && n[e.key].value && Sn(n[e.key].value, fe) ? (m = n[e.key].value, g = `${e.title}${y}: ${m[0]} - ${m[1]} `) : n[e.key].condition !== "between" && n[e.key].value && fe(n[e.key].value[0]) && (m = n[e.key].value[0], g = `${e.title}${y}: ${m}`), {
      value: m,
      searchLabel: g
    };
  };
  const i = () => {
    var m;
    (m = d.value) == null || m.focus();
  }, r = J(() => n[e.key].condition === "between" && n[e.key].value && Sn(n[e.key].value, fe) ? [u(Oe, {
    style: {
      marginRight: 0
    }
  }, {
    default: () => n[e.key].value[0]
  }), u("span", null, [xe(" - ")]), u(Oe, null, {
    default: () => n[e.key].value[1]
  })] : n[e.key].value[0]);
  let l = [u(ka, H({
    ref: d,
    value: n[e.key].value[0],
    "onUpdate:value": (m) => n[e.key].value[0] = m,
    style: {
      width: "200px"
    },
    class: `${a.inputClass || ""}`,
    placeholder: ze(I("common.search"), e.title),
    onBlur: c
  }, e.inputProps), null)];
  return n[e.key].condition === "between" && (l = u("div", {
    style: {
      display: "flex",
      alignItems: "center"
    }
  }, [l.concat([u("span", {
    style: {
      margin: "0 8px"
    }
  }, [xe("-")]), u(ka, H({
    value: n[e.key].value[1],
    "onUpdate:value": (m) => n[e.key].value[1] = m,
    style: {
      width: "200px"
    },
    class: `${a.inputClass || ""}`,
    placeholder: I("form.please-input"),
    onBlur: c
  }, e.inputProps), null)])])), {
    conditions: t,
    Component: l,
    displayValue: r,
    onComponentOpen: i
  };
}, Er = (e, n, o) => {
  const {
    searchProvider: a
  } = o;
  let t = [{
    label: I("search.equal"),
    value: "equal"
  }, {
    label: I("search.not-equal"),
    value: "notEqual"
  }, {
    label: I("search.include"),
    value: "include"
  }, {
    label: I("search.exclude"),
    value: "exclude"
  }];
  e.conditions && e.conditions.length && (t = t.filter((m) => e.conditions.includes(m.value)));
  let c = j(e.options) ? e.options() : e.options;
  c = c.map((m) => se(m) || fe(m) ? {
    value: m,
    label: m
  } : m);
  const d = J(() => u(An, null, {
    default: () => n[e.key].value.map((m) => u(Oe, null, {
      default: () => {
        var g;
        return (g = ve(c, {
          value: m
        })) == null ? void 0 : g.label;
      }
    }))
  }));
  oe(() => n[e.key].condition, (m) => {
    var g;
    ["equal", "notEqual"].includes(m) && (n[e.key].value = (g = n[e.key].value) != null && g[0] ? [n[e.key].value[0]] : []);
  });
  const i = z(null);
  e.collectItem = () => {
    var C, f, p, b, h, s;
    let m = null, g = null;
    const y = (C = ve(t, {
      value: n[e.key].condition
    })) == null ? void 0 : C.label;
    if (["equal", "notEqual"].includes(n[e.key].condition) && !ne((f = n[e.key].value) == null ? void 0 : f[0]) && !oo((p = n[e.key].value) == null ? void 0 : p[0]))
      m = ((b = n[e.key].value) == null ? void 0 : b[0]) || null, g = `${e.title}${y}: ${(h = ve(c, {
        value: m
      })) == null ? void 0 : h.label}`;
    else if (!["equal", "notEqual"].includes(n[e.key].condition) && Sn(n[e.key].value, (v) => !oo(v) && !ne(v))) {
      m = n[e.key].value;
      const v = (s = m.map((w) => {
        var E;
        return (E = ve(c, {
          value: w
        })) == null ? void 0 : E.label;
      })) == null ? void 0 : s.join(",");
      g = `${e.title}${y}: ${v}`;
    }
    return {
      value: m,
      searchLabel: g
    };
  };
  const r = () => {
  }, l = ["equal", "notEqual"].includes(n[e.key].condition) ? u(Mn, H({
    ref: i,
    value: n[e.key].value[0],
    "onUpdate:value": (m) => n[e.key].value[0] = m,
    allowClear: !0,
    options: c,
    style: {
      width: "200px"
    },
    class: `${a.inputClass || ""}`,
    defaultOpen: !0,
    filterOption: !0,
    showSearch: !0,
    optionFilterProp: "label",
    placeholder: ze(I("common.search"), e.title),
    getPopupContainer: (m) => m.parentNode
  }, e.inputProps), null) : u(Mn, H({
    ref: i,
    value: n[e.key].value,
    "onUpdate:value": (m) => n[e.key].value = m,
    allowClear: !0,
    options: c,
    mode: "multiple",
    class: `${a.inputClass || ""}`,
    style: {
      width: "200px"
    },
    defaultOpen: !0,
    filterOption: !0,
    optionFilterProp: "label",
    placeholder: ze(I("common.search"), e.title),
    getPopupContainer: (m) => m.parentNode
  }, e.inputProps), null);
  return {
    conditions: t,
    Component: l,
    displayValue: d,
    onComponentOpen: r
  };
}, Or = (e, n, o) => {
  const {
    searchProvider: a
  } = o;
  let t = [{
    label: I("search.equal"),
    value: "equal"
  }, {
    label: I("search.exclude"),
    value: "exclude"
  }];
  e.conditions && e.conditions.length && (t = t.filter((l) => e.conditions.includes(l.value)));
  const c = J(() => n[e.key].value && se(n[e.key].value) ? n[e.key].value.trim().split(`
`).join(",") : n[e.key].value && ye(n[e.key].value) ? n[e.key].value.join(",") : ""), d = z(null);
  e.collectItem = () => {
    var y;
    let l = null, m = null;
    const g = (y = ve(t, {
      value: n[e.key].condition
    })) == null ? void 0 : y.label;
    return l = null, n[e.key].value && se(n[e.key].value) ? l = n[e.key].value.trim().split(`
`) : n[e.key].value && ye(n[e.key].value) && (l = n[e.key].value), m = l ? `${e.title}${g}: ${l == null ? void 0 : l.join(",")}` : null, {
      value: l,
      searchLabel: m
    };
  };
  const i = () => {
    var l;
    (l = d.value) == null || l.focus();
  }, r = u(ha, H({
    ref: d,
    value: n[e.key].value,
    "onUpdate:value": (l) => n[e.key].value = l,
    allowClear: !0,
    class: `${a.inputClass || ""}`,
    style: {
      width: "200px"
    },
    autoSize: {
      minRows: 4,
      maxRows: 8
    },
    placeholder: I("search.textarea-placeholder", {
      title: e.title
    })
  }, e.inputProps), null);
  return {
    conditions: t,
    Component: r,
    displayValue: c,
    onComponentOpen: i
  };
}, Pr = (e, n, o) => {
  var C, f;
  const {
    searchProvider: a
  } = o;
  let t = [{
    label: I("search.equal"),
    value: "equal"
  }, {
    label: I("search.less-than"),
    value: "lessThan"
  }, {
    label: I("search.greater-than"),
    value: "greaterThan"
  }, {
    label: I("search.between"),
    value: "between"
  }, {
    label: I("search.null"),
    value: "null"
  }, {
    label: I("search.not-null"),
    value: "notNull"
  }];
  e.conditions && e.conditions.length && (t = t.filter((p) => e.conditions.includes(p.value)));
  const c = z(null), d = ((C = e.inputProps) == null ? void 0 : C.format) || "YYYY-MM-DD", i = ((f = e.inputProps) == null ? void 0 : f.picker) || "date";
  e.collectItem = () => {
    var s;
    let p = null, b = null;
    const h = (s = ve(t, {
      value: n[e.key].condition
    })) == null ? void 0 : s.label;
    return n[e.key].condition === "between" && n[e.key].value && Sn(n[e.key].value, pe.isDayjs) ? (p = n[e.key].value, b = `${e.title}${h}: ${p[0].format(d)} - ${p[1].format(d)} `) : n[e.key].condition !== "between" && pe.isDayjs(n[e.key].value[0]) && (p = n[e.key].value[0], b = `${e.title}${h}: ${p.format(d)}`), {
      value: p,
      searchLabel: b
    };
  };
  const r = () => {
    var p;
    (p = c.value) == null || p.focus();
  }, l = J(() => {
    var p, b;
    return n[e.key].condition === "between" && n[e.key].value && Sn(n[e.key].value, pe.isDayjs) ? [u(Oe, {
      style: {
        marginRight: 0
      }
    }, {
      default: () => {
        var h, s;
        return (s = (h = n[e.key].value) == null ? void 0 : h[0]) == null ? void 0 : s.format(d);
      }
    }), u("span", null, [xe(" - ")]), u(Oe, null, {
      default: () => {
        var h, s;
        return (s = (h = n[e.key].value) == null ? void 0 : h[1]) == null ? void 0 : s.format(d);
      }
    })] : (b = (p = n[e.key].value) == null ? void 0 : p[0]) == null ? void 0 : b.format(d);
  }), m = z([{
    label: I("search.last-week"),
    value: pe().add(-7, "d")
  }, {
    label: I("search.last-month"),
    value: pe().add(-1, "month")
  }]), g = z([{
    label: I("search.past-week"),
    value: [pe().add(-7, "d"), pe()]
  }, {
    label: I("search.past-two-weeks"),
    value: [pe().add(-14, "d"), pe()]
  }, {
    label: I("search.past-days", {
      days: 30
    }),
    value: [pe().add(-30, "d"), pe()]
  }, {
    label: I("search.past-days", {
      days: 90
    }),
    value: [pe().add(-90, "d"), pe()]
  }]);
  let y = n[e.key].condition === "between" ? u(Bt, H({
    ref: c,
    value: n[e.key].value,
    "onUpdate:value": (p) => n[e.key].value = p,
    allowClear: !0,
    inputReadOnly: !0,
    open: !0,
    presets: i === "date" ? g.value : [],
    style: {
      width: "400px"
    },
    class: `${a.inputClass || ""}`,
    placeholder: [I("search.start-time"), I("search.end-time")],
    getPopupContainer: (p) => p == null ? void 0 : p.parentNode
  }, e.inputProps), null) : u(Rt, H({
    ref: c,
    value: n[e.key].value[0],
    "onUpdate:value": (p) => n[e.key].value[0] = p,
    allowClear: !0,
    open: !0,
    inputReadOnly: !0,
    presets: i === "date" ? m.value : [],
    style: {
      width: "200px"
    },
    class: `${a.inputClass || ""}`,
    placeholder: ze(I("common.search"), e.title),
    getPopupContainer: (p) => p == null ? void 0 : p.parentNode
  }, e.inputProps), null);
  return {
    conditions: t,
    Component: y,
    displayValue: l,
    onComponentOpen: r
  };
}, _r = (e, n, o) => {
  const {
    searchProvider: a
  } = o;
  let t = j(e.options) ? e.options() : e.options, c = [{
    label: I("search.equal"),
    value: "equal"
  }, {
    label: I("search.not-equal"),
    value: "notEqual"
  }, {
    label: I("search.include-sub"),
    value: "include"
  }];
  e.conditions && e.conditions.length && (c = c.filter((m) => e.conditions.includes(m.value)));
  const d = J(() => {
    var m;
    return qo(t, n[e.key].value, (m = e.inputProps) == null ? void 0 : m.fieldNames).join("/");
  }), i = z(null);
  e.collectItem = () => {
    var C, f;
    let m = n[e.key].value || null, g = null;
    const y = (C = ve(c, {
      value: n[e.key].condition
    })) == null ? void 0 : C.label;
    return m && (g = `${e.title}${y}: ${qo(t, m, (f = e.inputProps) == null ? void 0 : f.fieldNames).join("/")}`), {
      value: m,
      searchLabel: g
    };
  };
  const r = () => {
    var m;
    (m = i.value) == null || m.focus();
  }, l = u(ko, H({
    ref: i,
    value: n[e.key].value,
    "onUpdate:value": (m) => n[e.key].value = m,
    allowClear: !0,
    open: !0,
    class: `${a.inputClass || ""}`,
    style: {
      width: "200px"
    },
    options: t,
    changeOnSelect: Yt(c, {
      value: "include"
    }) > -1,
    showSearch: !0,
    placeholder: ze(I("common.search"), e.title),
    getPopupContainer: (m) => m == null ? void 0 : m.parentNode
  }, e.inputProps), null);
  return {
    conditions: c,
    Component: l,
    displayValue: d,
    onComponentOpen: r
  };
}, Dr = (e, n, o) => {
  var y, C;
  const {
    searchProvider: a
  } = o, t = "checked", c = "unchecked";
  let d = [{
    label: I("search.equal"),
    value: "equal"
  }];
  e.conditions && e.conditions.length && (d = d.filter((f) => e.conditions.includes(f.value)));
  const i = [{
    value: t,
    label: ((y = e.options) == null ? void 0 : y[0]) || I("common.yes")
  }, {
    value: c,
    label: ((C = e.options) == null ? void 0 : C[1]) || I("common.no")
  }], r = J(() => {
    var f;
    return (f = ve(i, {
      value: n[e.key].value
    })) == null ? void 0 : f.label;
  }), l = z(null);
  e.collectItem = () => {
    var h;
    let f = n[e.key].value === void 0 ? void 0 : n[e.key].value === "checked", p = null;
    const b = ve(d, {
      value: n[e.key].condition
    });
    return f && (p = `${e.title}${b == null ? void 0 : b.label}: ${(h = ve(i, {
      value: n[e.key].value
    })) == null ? void 0 : h.label}`), {
      value: f,
      searchLabel: p
    };
  };
  const m = () => {
  }, g = u(Mn, H({
    ref: l,
    value: n[e.key].value,
    "onUpdate:value": (f) => n[e.key].value = f,
    allowClear: !0,
    options: i,
    style: {
      width: "200px"
    },
    class: `${a.inputClass || ""}`,
    defaultOpen: !0,
    getPopupContainer: (f) => f.parentNode,
    placeholder: ze(I("common.search"), e.title)
  }, e.inputProps), null);
  return {
    conditions: d,
    Component: g,
    displayValue: r,
    onComponentOpen: m
  };
}, Ir = (e, n) => {
  var c;
  let o = j(e.options) ? e.options() : e.options;
  o = o.map((d) => se(d) || fe(d) ? {
    value: d,
    label: d
  } : d);
  const a = z(e.options.map(() => !1));
  (c = n[e.key].value) != null && c.length && n[e.key].value.forEach((d) => {
    const i = o.findIndex((r) => r.value === d);
    i !== -1 && (a.value[i] = !0);
  }), e.expandable === "multiple" && (n[e.key].condition = "include");
  const t = (d) => {
    e.expandable === "multiple" ? n[e.key].value = a.value.map((i, r) => {
      if (i)
        return o[r].value;
    }) : a.value.forEach((i, r) => {
      if (r === d) {
        i ? n[e.key].value = [o[d].value] : n[e.key].value = [];
        return;
      }
      a.value[r] = !1;
    });
  };
  return e.collectItem = () => {
    var r, l, m, g;
    let d = null, i = null;
    if (e.expandable === "multiple")
      if (d = (r = n[e.key].value) == null ? void 0 : r.filter((y) => y), !d || !d.length)
        d = null;
      else {
        const y = (l = d.map((C) => {
          var f;
          return (f = ve(o, {
            value: C
          })) == null ? void 0 : f.label;
        })) == null ? void 0 : l.join(",");
        i = `${ze(e.title, I("search.include"))}: ${y}`;
      }
    else
      d = ((m = n[e.key].value) == null ? void 0 : m[0]) || null, i = `${ze(e.title, I("search.equal"))}: ${(g = ve(o, {
        value: d
      })) == null ? void 0 : g.label}`;
    return {
      value: d,
      searchLabel: i
    };
  }, u("div", {
    class: "newbie-search-expand-item"
  }, [u("div", {
    class: "newbie-search-expand-item-title"
  }, [e.title, xe(":")]), u("div", {
    class: "newbie-search-expand-item-options"
  }, [u(An, {
    size: 20
  }, {
    default: () => o.map((d, i) => u(id, {
      checked: a.value[i],
      "onUpdate:checked": (r) => a.value[i] = r,
      onChange: () => t(i)
    }, {
      default: () => d.label
    }))
  })]), u("div", {
    class: "newbie-search-expand-item-extra"
  }, [e.expandable === "multiple" ? I("search.multiple-choice-available") : ""])]);
};
/**!
 * Sortable 1.14.0
 * @author	RubaXa   <trash@rubaxa.org>
 * @author	owenm    <owen23355@gmail.com>
 * @license MIT
 */
function st(e, n) {
  var o = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var a = Object.getOwnPropertySymbols(e);
    n && (a = a.filter(function(t) {
      return Object.getOwnPropertyDescriptor(e, t).enumerable;
    })), o.push.apply(o, a);
  }
  return o;
}
function Qe(e) {
  for (var n = 1; n < arguments.length; n++) {
    var o = arguments[n] != null ? arguments[n] : {};
    n % 2 ? st(Object(o), !0).forEach(function(a) {
      Tr(e, a, o[a]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : st(Object(o)).forEach(function(a) {
      Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(o, a));
    });
  }
  return e;
}
function ga(e) {
  "@babel/helpers - typeof";
  return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? ga = function(n) {
    return typeof n;
  } : ga = function(n) {
    return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
  }, ga(e);
}
function Tr(e, n, o) {
  return n in e ? Object.defineProperty(e, n, {
    value: o,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[n] = o, e;
}
function on() {
  return on = Object.assign || function(e) {
    for (var n = 1; n < arguments.length; n++) {
      var o = arguments[n];
      for (var a in o)
        Object.prototype.hasOwnProperty.call(o, a) && (e[a] = o[a]);
    }
    return e;
  }, on.apply(this, arguments);
}
function Ar(e, n) {
  if (e == null) return {};
  var o = {}, a = Object.keys(e), t, c;
  for (c = 0; c < a.length; c++)
    t = a[c], !(n.indexOf(t) >= 0) && (o[t] = e[t]);
  return o;
}
function Nr(e, n) {
  if (e == null) return {};
  var o = Ar(e, n), a, t;
  if (Object.getOwnPropertySymbols) {
    var c = Object.getOwnPropertySymbols(e);
    for (t = 0; t < c.length; t++)
      a = c[t], !(n.indexOf(a) >= 0) && Object.prototype.propertyIsEnumerable.call(e, a) && (o[a] = e[a]);
  }
  return o;
}
var $r = "1.14.0";
function nn(e) {
  if (typeof window < "u" && window.navigator)
    return !!/* @__PURE__ */ navigator.userAgent.match(e);
}
var cn = nn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), la = nn(/Edge/i), ut = nn(/firefox/i), Qn = nn(/safari/i) && !nn(/chrome/i) && !nn(/android/i), sc = nn(/iP(ad|od|hone)/i), Mr = nn(/chrome/i) && nn(/android/i), uc = {
  capture: !1,
  passive: !1
};
function G(e, n, o) {
  e.addEventListener(n, o, !cn && uc);
}
function Q(e, n, o) {
  e.removeEventListener(n, o, !cn && uc);
}
function Ea(e, n) {
  if (n) {
    if (n[0] === ">" && (n = n.substring(1)), e)
      try {
        if (e.matches)
          return e.matches(n);
        if (e.msMatchesSelector)
          return e.msMatchesSelector(n);
        if (e.webkitMatchesSelector)
          return e.webkitMatchesSelector(n);
      } catch {
        return !1;
      }
    return !1;
  }
}
function jr(e) {
  return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
}
function Ve(e, n, o, a) {
  if (e) {
    o = o || document;
    do {
      if (n != null && (n[0] === ">" ? e.parentNode === o && Ea(e, n) : Ea(e, n)) || a && e === o)
        return e;
      if (e === o) break;
    } while (e = jr(e));
  }
  return null;
}
var mt = /\s+/g;
function Ie(e, n, o) {
  if (e && n)
    if (e.classList)
      e.classList[o ? "add" : "remove"](n);
    else {
      var a = (" " + e.className + " ").replace(mt, " ").replace(" " + n + " ", " ");
      e.className = (a + (o ? " " + n : "")).replace(mt, " ");
    }
}
function U(e, n, o) {
  var a = e && e.style;
  if (a) {
    if (o === void 0)
      return document.defaultView && document.defaultView.getComputedStyle ? o = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (o = e.currentStyle), n === void 0 ? o : o[n];
    !(n in a) && n.indexOf("webkit") === -1 && (n = "-webkit-" + n), a[n] = o + (typeof o == "string" ? "" : "px");
  }
}
function $n(e, n) {
  var o = "";
  if (typeof e == "string")
    o = e;
  else
    do {
      var a = U(e, "transform");
      a && a !== "none" && (o = a + " " + o);
    } while (!n && (e = e.parentNode));
  var t = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
  return t && new t(o);
}
function mc(e, n, o) {
  if (e) {
    var a = e.getElementsByTagName(n), t = 0, c = a.length;
    if (o)
      for (; t < c; t++)
        o(a[t], t);
    return a;
  }
  return [];
}
function Xe() {
  var e = document.scrollingElement;
  return e || document.documentElement;
}
function he(e, n, o, a, t) {
  if (!(!e.getBoundingClientRect && e !== window)) {
    var c, d, i, r, l, m, g;
    if (e !== window && e.parentNode && e !== Xe() ? (c = e.getBoundingClientRect(), d = c.top, i = c.left, r = c.bottom, l = c.right, m = c.height, g = c.width) : (d = 0, i = 0, r = window.innerHeight, l = window.innerWidth, m = window.innerHeight, g = window.innerWidth), (n || o) && e !== window && (t = t || e.parentNode, !cn))
      do
        if (t && t.getBoundingClientRect && (U(t, "transform") !== "none" || o && U(t, "position") !== "static")) {
          var y = t.getBoundingClientRect();
          d -= y.top + parseInt(U(t, "border-top-width")), i -= y.left + parseInt(U(t, "border-left-width")), r = d + c.height, l = i + c.width;
          break;
        }
      while (t = t.parentNode);
    if (a && e !== window) {
      var C = $n(t || e), f = C && C.a, p = C && C.d;
      C && (d /= p, i /= f, g /= f, m /= p, r = d + m, l = i + g);
    }
    return {
      top: d,
      left: i,
      bottom: r,
      right: l,
      width: g,
      height: m
    };
  }
}
function ft(e, n, o) {
  for (var a = fn(e, !0), t = he(e)[n]; a; ) {
    var c = he(a)[o], d = void 0;
    if (d = t >= c, !d) return a;
    if (a === Xe()) break;
    a = fn(a, !1);
  }
  return !1;
}
function zn(e, n, o, a) {
  for (var t = 0, c = 0, d = e.children; c < d.length; ) {
    if (d[c].style.display !== "none" && d[c] !== V.ghost && (a || d[c] !== V.dragged) && Ve(d[c], o.draggable, e, !1)) {
      if (t === n)
        return d[c];
      t++;
    }
    c++;
  }
  return null;
}
function Io(e, n) {
  for (var o = e.lastElementChild; o && (o === V.ghost || U(o, "display") === "none" || n && !Ea(o, n)); )
    o = o.previousElementSibling;
  return o || null;
}
function Ne(e, n) {
  var o = 0;
  if (!e || !e.parentNode)
    return -1;
  for (; e = e.previousElementSibling; )
    e.nodeName.toUpperCase() !== "TEMPLATE" && e !== V.clone && (!n || Ea(e, n)) && o++;
  return o;
}
function pt(e) {
  var n = 0, o = 0, a = Xe();
  if (e)
    do {
      var t = $n(e), c = t.a, d = t.d;
      n += e.scrollLeft * c, o += e.scrollTop * d;
    } while (e !== a && (e = e.parentNode));
  return [n, o];
}
function Lr(e, n) {
  for (var o in e)
    if (e.hasOwnProperty(o)) {
      for (var a in n)
        if (n.hasOwnProperty(a) && n[a] === e[o][a]) return Number(o);
    }
  return -1;
}
function fn(e, n) {
  if (!e || !e.getBoundingClientRect) return Xe();
  var o = e, a = !1;
  do
    if (o.clientWidth < o.scrollWidth || o.clientHeight < o.scrollHeight) {
      var t = U(o);
      if (o.clientWidth < o.scrollWidth && (t.overflowX == "auto" || t.overflowX == "scroll") || o.clientHeight < o.scrollHeight && (t.overflowY == "auto" || t.overflowY == "scroll")) {
        if (!o.getBoundingClientRect || o === document.body) return Xe();
        if (a || n) return o;
        a = !0;
      }
    }
  while (o = o.parentNode);
  return Xe();
}
function zr(e, n) {
  if (e && n)
    for (var o in n)
      n.hasOwnProperty(o) && (e[o] = n[o]);
  return e;
}
function Fa(e, n) {
  return Math.round(e.top) === Math.round(n.top) && Math.round(e.left) === Math.round(n.left) && Math.round(e.height) === Math.round(n.height) && Math.round(e.width) === Math.round(n.width);
}
var Gn;
function fc(e, n) {
  return function() {
    if (!Gn) {
      var o = arguments, a = this;
      o.length === 1 ? e.call(a, o[0]) : e.apply(a, o), Gn = setTimeout(function() {
        Gn = void 0;
      }, n);
    }
  };
}
function Rr() {
  clearTimeout(Gn), Gn = void 0;
}
function pc(e, n, o) {
  e.scrollLeft += n, e.scrollTop += o;
}
function hc(e) {
  var n = window.Polymer, o = window.jQuery || window.Zepto;
  return n && n.dom ? n.dom(e).cloneNode(!0) : o ? o(e).clone(!0)[0] : e.cloneNode(!0);
}
var Ae = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
function Br() {
  var e = [], n;
  return {
    captureAnimationState: function() {
      if (e = [], !!this.options.animation) {
        var a = [].slice.call(this.el.children);
        a.forEach(function(t) {
          if (!(U(t, "display") === "none" || t === V.ghost)) {
            e.push({
              target: t,
              rect: he(t)
            });
            var c = Qe({}, e[e.length - 1].rect);
            if (t.thisAnimationDuration) {
              var d = $n(t, !0);
              d && (c.top -= d.f, c.left -= d.e);
            }
            t.fromRect = c;
          }
        });
      }
    },
    addAnimationState: function(a) {
      e.push(a);
    },
    removeAnimationState: function(a) {
      e.splice(Lr(e, {
        target: a
      }), 1);
    },
    animateAll: function(a) {
      var t = this;
      if (!this.options.animation) {
        clearTimeout(n), typeof a == "function" && a();
        return;
      }
      var c = !1, d = 0;
      e.forEach(function(i) {
        var r = 0, l = i.target, m = l.fromRect, g = he(l), y = l.prevFromRect, C = l.prevToRect, f = i.rect, p = $n(l, !0);
        p && (g.top -= p.f, g.left -= p.e), l.toRect = g, l.thisAnimationDuration && Fa(y, g) && !Fa(m, g) && // Make sure animatingRect is on line between toRect & fromRect
        (f.top - g.top) / (f.left - g.left) === (m.top - g.top) / (m.left - g.left) && (r = Vr(f, y, C, t.options)), Fa(g, m) || (l.prevFromRect = m, l.prevToRect = g, r || (r = t.options.animation), t.animate(l, f, g, r)), r && (c = !0, d = Math.max(d, r), clearTimeout(l.animationResetTimer), l.animationResetTimer = setTimeout(function() {
          l.animationTime = 0, l.prevFromRect = null, l.fromRect = null, l.prevToRect = null, l.thisAnimationDuration = null;
        }, r), l.thisAnimationDuration = r);
      }), clearTimeout(n), c ? n = setTimeout(function() {
        typeof a == "function" && a();
      }, d) : typeof a == "function" && a(), e = [];
    },
    animate: function(a, t, c, d) {
      if (d) {
        U(a, "transition", ""), U(a, "transform", "");
        var i = $n(this.el), r = i && i.a, l = i && i.d, m = (t.left - c.left) / (r || 1), g = (t.top - c.top) / (l || 1);
        a.animatingX = !!m, a.animatingY = !!g, U(a, "transform", "translate3d(" + m + "px," + g + "px,0)"), this.forRepaintDummy = Ur(a), U(a, "transition", "transform " + d + "ms" + (this.options.easing ? " " + this.options.easing : "")), U(a, "transform", "translate3d(0,0,0)"), typeof a.animated == "number" && clearTimeout(a.animated), a.animated = setTimeout(function() {
          U(a, "transition", ""), U(a, "transform", ""), a.animated = !1, a.animatingX = !1, a.animatingY = !1;
        }, d);
      }
    }
  };
}
function Ur(e) {
  return e.offsetWidth;
}
function Vr(e, n, o, a) {
  return Math.sqrt(Math.pow(n.top - e.top, 2) + Math.pow(n.left - e.left, 2)) / Math.sqrt(Math.pow(n.top - o.top, 2) + Math.pow(n.left - o.left, 2)) * a.animation;
}
var On = [], Ka = {
  initializeByDefault: !0
}, ra = {
  mount: function(n) {
    for (var o in Ka)
      Ka.hasOwnProperty(o) && !(o in n) && (n[o] = Ka[o]);
    On.forEach(function(a) {
      if (a.pluginName === n.pluginName)
        throw "Sortable: Cannot mount plugin ".concat(n.pluginName, " more than once");
    }), On.push(n);
  },
  pluginEvent: function(n, o, a) {
    var t = this;
    this.eventCanceled = !1, a.cancel = function() {
      t.eventCanceled = !0;
    };
    var c = n + "Global";
    On.forEach(function(d) {
      o[d.pluginName] && (o[d.pluginName][c] && o[d.pluginName][c](Qe({
        sortable: o
      }, a)), o.options[d.pluginName] && o[d.pluginName][n] && o[d.pluginName][n](Qe({
        sortable: o
      }, a)));
    });
  },
  initializePlugins: function(n, o, a, t) {
    On.forEach(function(i) {
      var r = i.pluginName;
      if (!(!n.options[r] && !i.initializeByDefault)) {
        var l = new i(n, o, n.options);
        l.sortable = n, l.options = n.options, n[r] = l, on(a, l.defaults);
      }
    });
    for (var c in n.options)
      if (n.options.hasOwnProperty(c)) {
        var d = this.modifyOption(n, c, n.options[c]);
        typeof d < "u" && (n.options[c] = d);
      }
  },
  getEventProperties: function(n, o) {
    var a = {};
    return On.forEach(function(t) {
      typeof t.eventProperties == "function" && on(a, t.eventProperties.call(o[t.pluginName], n));
    }), a;
  },
  modifyOption: function(n, o, a) {
    var t;
    return On.forEach(function(c) {
      n[c.pluginName] && c.optionListeners && typeof c.optionListeners[o] == "function" && (t = c.optionListeners[o].call(n[c.pluginName], a));
    }), t;
  }
};
function Fr(e) {
  var n = e.sortable, o = e.rootEl, a = e.name, t = e.targetEl, c = e.cloneEl, d = e.toEl, i = e.fromEl, r = e.oldIndex, l = e.newIndex, m = e.oldDraggableIndex, g = e.newDraggableIndex, y = e.originalEvent, C = e.putSortable, f = e.extraEventProperties;
  if (n = n || o && o[Ae], !!n) {
    var p, b = n.options, h = "on" + a.charAt(0).toUpperCase() + a.substr(1);
    window.CustomEvent && !cn && !la ? p = new CustomEvent(a, {
      bubbles: !0,
      cancelable: !0
    }) : (p = document.createEvent("Event"), p.initEvent(a, !0, !0)), p.to = d || o, p.from = i || o, p.item = t || o, p.clone = c, p.oldIndex = r, p.newIndex = l, p.oldDraggableIndex = m, p.newDraggableIndex = g, p.originalEvent = y, p.pullMode = C ? C.lastPutMode : void 0;
    var s = Qe(Qe({}, f), ra.getEventProperties(a, n));
    for (var v in s)
      p[v] = s[v];
    o && o.dispatchEvent(p), b[h] && b[h].call(n, p);
  }
}
var Kr = ["evt"], De = function(n, o) {
  var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, t = a.evt, c = Nr(a, Kr);
  ra.pluginEvent.bind(V)(n, o, Qe({
    dragEl: $,
    parentEl: de,
    ghostEl: W,
    rootEl: te,
    nextEl: kn,
    lastDownEl: va,
    cloneEl: le,
    cloneHidden: mn,
    dragStarted: Kn,
    putSortable: we,
    activeSortable: V.active,
    originalEvent: t,
    oldIndex: In,
    oldDraggableIndex: Zn,
    newIndex: Te,
    newDraggableIndex: sn,
    hideGhostForTarget: bc,
    unhideGhostForTarget: wc,
    cloneNowHidden: function() {
      mn = !0;
    },
    cloneNowShown: function() {
      mn = !1;
    },
    dispatchSortableEvent: function(i) {
      _e({
        sortable: o,
        name: i,
        originalEvent: t
      });
    }
  }, c));
};
function _e(e) {
  Fr(Qe({
    putSortable: we,
    cloneEl: le,
    targetEl: $,
    rootEl: te,
    oldIndex: In,
    oldDraggableIndex: Zn,
    newIndex: Te,
    newDraggableIndex: sn
  }, e));
}
var $, de, W, te, kn, va, le, mn, In, Te, Zn, sn, ua, we, _n = !1, Oa = !1, Pa = [], bn, je, Ha, Wa, ht, gt, Kn, Pn, Jn, ea = !1, ma = !1, ya, ke, Ya = [], ro = !1, _a = [], Ma = typeof document < "u", fa = sc, vt = la || cn ? "cssFloat" : "float", Hr = Ma && !Mr && !sc && "draggable" in document.createElement("div"), gc = function() {
  if (Ma) {
    if (cn)
      return !1;
    var e = document.createElement("x");
    return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
  }
}(), vc = function(n, o) {
  var a = U(n), t = parseInt(a.width) - parseInt(a.paddingLeft) - parseInt(a.paddingRight) - parseInt(a.borderLeftWidth) - parseInt(a.borderRightWidth), c = zn(n, 0, o), d = zn(n, 1, o), i = c && U(c), r = d && U(d), l = i && parseInt(i.marginLeft) + parseInt(i.marginRight) + he(c).width, m = r && parseInt(r.marginLeft) + parseInt(r.marginRight) + he(d).width;
  if (a.display === "flex")
    return a.flexDirection === "column" || a.flexDirection === "column-reverse" ? "vertical" : "horizontal";
  if (a.display === "grid")
    return a.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
  if (c && i.float && i.float !== "none") {
    var g = i.float === "left" ? "left" : "right";
    return d && (r.clear === "both" || r.clear === g) ? "vertical" : "horizontal";
  }
  return c && (i.display === "block" || i.display === "flex" || i.display === "table" || i.display === "grid" || l >= t && a[vt] === "none" || d && a[vt] === "none" && l + m > t) ? "vertical" : "horizontal";
}, Wr = function(n, o, a) {
  var t = a ? n.left : n.top, c = a ? n.right : n.bottom, d = a ? n.width : n.height, i = a ? o.left : o.top, r = a ? o.right : o.bottom, l = a ? o.width : o.height;
  return t === i || c === r || t + d / 2 === i + l / 2;
}, Yr = function(n, o) {
  var a;
  return Pa.some(function(t) {
    var c = t[Ae].options.emptyInsertThreshold;
    if (!(!c || Io(t))) {
      var d = he(t), i = n >= d.left - c && n <= d.right + c, r = o >= d.top - c && o <= d.bottom + c;
      if (i && r)
        return a = t;
    }
  }), a;
}, yc = function(n) {
  function o(c, d) {
    return function(i, r, l, m) {
      var g = i.options.group.name && r.options.group.name && i.options.group.name === r.options.group.name;
      if (c == null && (d || g))
        return !0;
      if (c == null || c === !1)
        return !1;
      if (d && c === "clone")
        return c;
      if (typeof c == "function")
        return o(c(i, r, l, m), d)(i, r, l, m);
      var y = (d ? i : r).options.group.name;
      return c === !0 || typeof c == "string" && c === y || c.join && c.indexOf(y) > -1;
    };
  }
  var a = {}, t = n.group;
  (!t || ga(t) != "object") && (t = {
    name: t
  }), a.name = t.name, a.checkPull = o(t.pull, !0), a.checkPut = o(t.put), a.revertClone = t.revertClone, n.group = a;
}, bc = function() {
  !gc && W && U(W, "display", "none");
}, wc = function() {
  !gc && W && U(W, "display", "");
};
Ma && document.addEventListener("click", function(e) {
  if (Oa)
    return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Oa = !1, !1;
}, !0);
var wn = function(n) {
  if ($) {
    n = n.touches ? n.touches[0] : n;
    var o = Yr(n.clientX, n.clientY);
    if (o) {
      var a = {};
      for (var t in n)
        n.hasOwnProperty(t) && (a[t] = n[t]);
      a.target = a.rootEl = o, a.preventDefault = void 0, a.stopPropagation = void 0, o[Ae]._onDragOver(a);
    }
  }
}, Xr = function(n) {
  $ && $.parentNode[Ae]._isOutsideThisEl(n.target);
};
function V(e, n) {
  if (!(e && e.nodeType && e.nodeType === 1))
    throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
  this.el = e, this.options = n = on({}, n), e[Ae] = this;
  var o = {
    group: null,
    sort: !0,
    disabled: !1,
    store: null,
    handle: null,
    draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
    swapThreshold: 1,
    // percentage; 0 <= x <= 1
    invertSwap: !1,
    // invert always
    invertedSwapThreshold: null,
    // will be set to same as swapThreshold if default
    removeCloneOnHide: !0,
    direction: function() {
      return vc(e, this.options);
    },
    ghostClass: "sortable-ghost",
    chosenClass: "sortable-chosen",
    dragClass: "sortable-drag",
    ignore: "a, img",
    filter: null,
    preventOnFilter: !0,
    animation: 0,
    easing: null,
    setData: function(d, i) {
      d.setData("Text", i.textContent);
    },
    dropBubble: !1,
    dragoverBubble: !1,
    dataIdAttr: "data-id",
    delay: 0,
    delayOnTouchOnly: !1,
    touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
    forceFallback: !1,
    fallbackClass: "sortable-fallback",
    fallbackOnBody: !1,
    fallbackTolerance: 0,
    fallbackOffset: {
      x: 0,
      y: 0
    },
    supportPointer: V.supportPointer !== !1 && "PointerEvent" in window && !Qn,
    emptyInsertThreshold: 5
  };
  ra.initializePlugins(this, e, o);
  for (var a in o)
    !(a in n) && (n[a] = o[a]);
  yc(n);
  for (var t in this)
    t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
  this.nativeDraggable = n.forceFallback ? !1 : Hr, this.nativeDraggable && (this.options.touchStartThreshold = 1), n.supportPointer ? G(e, "pointerdown", this._onTapStart) : (G(e, "mousedown", this._onTapStart), G(e, "touchstart", this._onTapStart)), this.nativeDraggable && (G(e, "dragover", this), G(e, "dragenter", this)), Pa.push(this.el), n.store && n.store.get && this.sort(n.store.get(this) || []), on(this, Br());
}
V.prototype = /** @lends Sortable.prototype */
{
  constructor: V,
  _isOutsideThisEl: function(n) {
    !this.el.contains(n) && n !== this.el && (Pn = null);
  },
  _getDirection: function(n, o) {
    return typeof this.options.direction == "function" ? this.options.direction.call(this, n, o, $) : this.options.direction;
  },
  _onTapStart: function(n) {
    if (n.cancelable) {
      var o = this, a = this.el, t = this.options, c = t.preventOnFilter, d = n.type, i = n.touches && n.touches[0] || n.pointerType && n.pointerType === "touch" && n, r = (i || n).target, l = n.target.shadowRoot && (n.path && n.path[0] || n.composedPath && n.composedPath()[0]) || r, m = t.filter;
      if (ai(a), !$ && !(/mousedown|pointerdown/.test(d) && n.button !== 0 || t.disabled) && !l.isContentEditable && !(!this.nativeDraggable && Qn && r && r.tagName.toUpperCase() === "SELECT") && (r = Ve(r, t.draggable, a, !1), !(r && r.animated) && va !== r)) {
        if (In = Ne(r), Zn = Ne(r, t.draggable), typeof m == "function") {
          if (m.call(this, n, r, this)) {
            _e({
              sortable: o,
              rootEl: l,
              name: "filter",
              targetEl: r,
              toEl: a,
              fromEl: a
            }), De("filter", o, {
              evt: n
            }), c && n.cancelable && n.preventDefault();
            return;
          }
        } else if (m && (m = m.split(",").some(function(g) {
          if (g = Ve(l, g.trim(), a, !1), g)
            return _e({
              sortable: o,
              rootEl: g,
              name: "filter",
              targetEl: r,
              fromEl: a,
              toEl: a
            }), De("filter", o, {
              evt: n
            }), !0;
        }), m)) {
          c && n.cancelable && n.preventDefault();
          return;
        }
        t.handle && !Ve(l, t.handle, a, !1) || this._prepareDragStart(n, i, r);
      }
    }
  },
  _prepareDragStart: function(n, o, a) {
    var t = this, c = t.el, d = t.options, i = c.ownerDocument, r;
    if (a && !$ && a.parentNode === c) {
      var l = he(a);
      if (te = c, $ = a, de = $.parentNode, kn = $.nextSibling, va = a, ua = d.group, V.dragged = $, bn = {
        target: $,
        clientX: (o || n).clientX,
        clientY: (o || n).clientY
      }, ht = bn.clientX - l.left, gt = bn.clientY - l.top, this._lastX = (o || n).clientX, this._lastY = (o || n).clientY, $.style["will-change"] = "all", r = function() {
        if (De("delayEnded", t, {
          evt: n
        }), V.eventCanceled) {
          t._onDrop();
          return;
        }
        t._disableDelayedDragEvents(), !ut && t.nativeDraggable && ($.draggable = !0), t._triggerDragStart(n, o), _e({
          sortable: t,
          name: "choose",
          originalEvent: n
        }), Ie($, d.chosenClass, !0);
      }, d.ignore.split(",").forEach(function(m) {
        mc($, m.trim(), Xa);
      }), G(i, "dragover", wn), G(i, "mousemove", wn), G(i, "touchmove", wn), G(i, "mouseup", t._onDrop), G(i, "touchend", t._onDrop), G(i, "touchcancel", t._onDrop), ut && this.nativeDraggable && (this.options.touchStartThreshold = 4, $.draggable = !0), De("delayStart", this, {
        evt: n
      }), d.delay && (!d.delayOnTouchOnly || o) && (!this.nativeDraggable || !(la || cn))) {
        if (V.eventCanceled) {
          this._onDrop();
          return;
        }
        G(i, "mouseup", t._disableDelayedDrag), G(i, "touchend", t._disableDelayedDrag), G(i, "touchcancel", t._disableDelayedDrag), G(i, "mousemove", t._delayedDragTouchMoveHandler), G(i, "touchmove", t._delayedDragTouchMoveHandler), d.supportPointer && G(i, "pointermove", t._delayedDragTouchMoveHandler), t._dragStartTimer = setTimeout(r, d.delay);
      } else
        r();
    }
  },
  _delayedDragTouchMoveHandler: function(n) {
    var o = n.touches ? n.touches[0] : n;
    Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
  },
  _disableDelayedDrag: function() {
    $ && Xa($), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
  },
  _disableDelayedDragEvents: function() {
    var n = this.el.ownerDocument;
    Q(n, "mouseup", this._disableDelayedDrag), Q(n, "touchend", this._disableDelayedDrag), Q(n, "touchcancel", this._disableDelayedDrag), Q(n, "mousemove", this._delayedDragTouchMoveHandler), Q(n, "touchmove", this._delayedDragTouchMoveHandler), Q(n, "pointermove", this._delayedDragTouchMoveHandler);
  },
  _triggerDragStart: function(n, o) {
    o = o || n.pointerType == "touch" && n, !this.nativeDraggable || o ? this.options.supportPointer ? G(document, "pointermove", this._onTouchMove) : o ? G(document, "touchmove", this._onTouchMove) : G(document, "mousemove", this._onTouchMove) : (G($, "dragend", this), G(te, "dragstart", this._onDragStart));
    try {
      document.selection ? ba(function() {
        document.selection.empty();
      }) : window.getSelection().removeAllRanges();
    } catch {
    }
  },
  _dragStarted: function(n, o) {
    if (_n = !1, te && $) {
      De("dragStarted", this, {
        evt: o
      }), this.nativeDraggable && G(document, "dragover", Xr);
      var a = this.options;
      !n && Ie($, a.dragClass, !1), Ie($, a.ghostClass, !0), V.active = this, n && this._appendGhost(), _e({
        sortable: this,
        name: "start",
        originalEvent: o
      });
    } else
      this._nulling();
  },
  _emulateDragOver: function() {
    if (je) {
      this._lastX = je.clientX, this._lastY = je.clientY, bc();
      for (var n = document.elementFromPoint(je.clientX, je.clientY), o = n; n && n.shadowRoot && (n = n.shadowRoot.elementFromPoint(je.clientX, je.clientY), n !== o); )
        o = n;
      if ($.parentNode[Ae]._isOutsideThisEl(n), o)
        do {
          if (o[Ae]) {
            var a = void 0;
            if (a = o[Ae]._onDragOver({
              clientX: je.clientX,
              clientY: je.clientY,
              target: n,
              rootEl: o
            }), a && !this.options.dragoverBubble)
              break;
          }
          n = o;
        } while (o = o.parentNode);
      wc();
    }
  },
  _onTouchMove: function(n) {
    if (bn) {
      var o = this.options, a = o.fallbackTolerance, t = o.fallbackOffset, c = n.touches ? n.touches[0] : n, d = W && $n(W, !0), i = W && d && d.a, r = W && d && d.d, l = fa && ke && pt(ke), m = (c.clientX - bn.clientX + t.x) / (i || 1) + (l ? l[0] - Ya[0] : 0) / (i || 1), g = (c.clientY - bn.clientY + t.y) / (r || 1) + (l ? l[1] - Ya[1] : 0) / (r || 1);
      if (!V.active && !_n) {
        if (a && Math.max(Math.abs(c.clientX - this._lastX), Math.abs(c.clientY - this._lastY)) < a)
          return;
        this._onDragStart(n, !0);
      }
      if (W) {
        d ? (d.e += m - (Ha || 0), d.f += g - (Wa || 0)) : d = {
          a: 1,
          b: 0,
          c: 0,
          d: 1,
          e: m,
          f: g
        };
        var y = "matrix(".concat(d.a, ",").concat(d.b, ",").concat(d.c, ",").concat(d.d, ",").concat(d.e, ",").concat(d.f, ")");
        U(W, "webkitTransform", y), U(W, "mozTransform", y), U(W, "msTransform", y), U(W, "transform", y), Ha = m, Wa = g, je = c;
      }
      n.cancelable && n.preventDefault();
    }
  },
  _appendGhost: function() {
    if (!W) {
      var n = this.options.fallbackOnBody ? document.body : te, o = he($, !0, fa, !0, n), a = this.options;
      if (fa) {
        for (ke = n; U(ke, "position") === "static" && U(ke, "transform") === "none" && ke !== document; )
          ke = ke.parentNode;
        ke !== document.body && ke !== document.documentElement ? (ke === document && (ke = Xe()), o.top += ke.scrollTop, o.left += ke.scrollLeft) : ke = Xe(), Ya = pt(ke);
      }
      W = $.cloneNode(!0), Ie(W, a.ghostClass, !1), Ie(W, a.fallbackClass, !0), Ie(W, a.dragClass, !0), U(W, "transition", ""), U(W, "transform", ""), U(W, "box-sizing", "border-box"), U(W, "margin", 0), U(W, "top", o.top), U(W, "left", o.left), U(W, "width", o.width), U(W, "height", o.height), U(W, "opacity", "0.8"), U(W, "position", fa ? "absolute" : "fixed"), U(W, "zIndex", "100000"), U(W, "pointerEvents", "none"), V.ghost = W, n.appendChild(W), U(W, "transform-origin", ht / parseInt(W.style.width) * 100 + "% " + gt / parseInt(W.style.height) * 100 + "%");
    }
  },
  _onDragStart: function(n, o) {
    var a = this, t = n.dataTransfer, c = a.options;
    if (De("dragStart", this, {
      evt: n
    }), V.eventCanceled) {
      this._onDrop();
      return;
    }
    De("setupClone", this), V.eventCanceled || (le = hc($), le.draggable = !1, le.style["will-change"] = "", this._hideClone(), Ie(le, this.options.chosenClass, !1), V.clone = le), a.cloneId = ba(function() {
      De("clone", a), !V.eventCanceled && (a.options.removeCloneOnHide || te.insertBefore(le, $), a._hideClone(), _e({
        sortable: a,
        name: "clone"
      }));
    }), !o && Ie($, c.dragClass, !0), o ? (Oa = !0, a._loopId = setInterval(a._emulateDragOver, 50)) : (Q(document, "mouseup", a._onDrop), Q(document, "touchend", a._onDrop), Q(document, "touchcancel", a._onDrop), t && (t.effectAllowed = "move", c.setData && c.setData.call(a, t, $)), G(document, "drop", a), U($, "transform", "translateZ(0)")), _n = !0, a._dragStartId = ba(a._dragStarted.bind(a, o, n)), G(document, "selectstart", a), Kn = !0, Qn && U(document.body, "user-select", "none");
  },
  // Returns true - if no further action is needed (either inserted or another condition)
  _onDragOver: function(n) {
    var o = this.el, a = n.target, t, c, d, i = this.options, r = i.group, l = V.active, m = ua === r, g = i.sort, y = we || l, C, f = this, p = !1;
    if (ro) return;
    function b(X, ae) {
      De(X, f, Qe({
        evt: n,
        isOwner: m,
        axis: C ? "vertical" : "horizontal",
        revert: d,
        dragRect: t,
        targetRect: c,
        canSort: g,
        fromSortable: y,
        target: a,
        completed: s,
        onMove: function(Me, Be) {
          return pa(te, o, $, t, Me, he(Me), n, Be);
        },
        changed: v
      }, ae));
    }
    function h() {
      b("dragOverAnimationCapture"), f.captureAnimationState(), f !== y && y.captureAnimationState();
    }
    function s(X) {
      return b("dragOverCompleted", {
        insertion: X
      }), X && (m ? l._hideClone() : l._showClone(f), f !== y && (Ie($, we ? we.options.ghostClass : l.options.ghostClass, !1), Ie($, i.ghostClass, !0)), we !== f && f !== V.active ? we = f : f === V.active && we && (we = null), y === f && (f._ignoreWhileAnimating = a), f.animateAll(function() {
        b("dragOverAnimationComplete"), f._ignoreWhileAnimating = null;
      }), f !== y && (y.animateAll(), y._ignoreWhileAnimating = null)), (a === $ && !$.animated || a === o && !a.animated) && (Pn = null), !i.dragoverBubble && !n.rootEl && a !== document && ($.parentNode[Ae]._isOutsideThisEl(n.target), !X && wn(n)), !i.dragoverBubble && n.stopPropagation && n.stopPropagation(), p = !0;
    }
    function v() {
      Te = Ne($), sn = Ne($, i.draggable), _e({
        sortable: f,
        name: "change",
        toEl: o,
        newIndex: Te,
        newDraggableIndex: sn,
        originalEvent: n
      });
    }
    if (n.preventDefault !== void 0 && n.cancelable && n.preventDefault(), a = Ve(a, i.draggable, o, !0), b("dragOver"), V.eventCanceled) return p;
    if ($.contains(n.target) || a.animated && a.animatingX && a.animatingY || f._ignoreWhileAnimating === a)
      return s(!1);
    if (Oa = !1, l && !i.disabled && (m ? g || (d = de !== te) : we === this || (this.lastPutMode = ua.checkPull(this, l, $, n)) && r.checkPut(this, l, $, n))) {
      if (C = this._getDirection(n, a) === "vertical", t = he($), b("dragOverValid"), V.eventCanceled) return p;
      if (d)
        return de = te, h(), this._hideClone(), b("revert"), V.eventCanceled || (kn ? te.insertBefore($, kn) : te.appendChild($)), s(!0);
      var w = Io(o, i.draggable);
      if (!w || Zr(n, C, this) && !w.animated) {
        if (w === $)
          return s(!1);
        if (w && o === n.target && (a = w), a && (c = he(a)), pa(te, o, $, t, a, c, n, !!a) !== !1)
          return h(), o.appendChild($), de = o, v(), s(!0);
      } else if (w && Gr(n, C, this)) {
        var E = zn(o, 0, i, !0);
        if (E === $)
          return s(!1);
        if (a = E, c = he(a), pa(te, o, $, t, a, c, n, !1) !== !1)
          return h(), o.insertBefore($, E), de = o, v(), s(!0);
      } else if (a.parentNode === o) {
        c = he(a);
        var k = 0, P, O = $.parentNode !== o, x = !Wr($.animated && $.toRect || t, a.animated && a.toRect || c, C), _ = C ? "top" : "left", D = ft(a, "top", "top") || ft($, "top", "top"), A = D ? D.scrollTop : void 0;
        Pn !== a && (P = c[_], ea = !1, ma = !x && i.invertSwap || O), k = Jr(n, a, c, C, x ? 1 : i.swapThreshold, i.invertedSwapThreshold == null ? i.swapThreshold : i.invertedSwapThreshold, ma, Pn === a);
        var M;
        if (k !== 0) {
          var F = Ne($);
          do
            F -= k, M = de.children[F];
          while (M && (U(M, "display") === "none" || M === W));
        }
        if (k === 0 || M === a)
          return s(!1);
        Pn = a, Jn = k;
        var K = a.nextElementSibling, T = !1;
        T = k === 1;
        var L = pa(te, o, $, t, a, c, n, T);
        if (L !== !1)
          return (L === 1 || L === -1) && (T = L === 1), ro = !0, setTimeout(Qr, 30), h(), T && !K ? o.appendChild($) : a.parentNode.insertBefore($, T ? K : a), D && pc(D, 0, A - D.scrollTop), de = $.parentNode, P !== void 0 && !ma && (ya = Math.abs(P - he(a)[_])), v(), s(!0);
      }
      if (o.contains($))
        return s(!1);
    }
    return !1;
  },
  _ignoreWhileAnimating: null,
  _offMoveEvents: function() {
    Q(document, "mousemove", this._onTouchMove), Q(document, "touchmove", this._onTouchMove), Q(document, "pointermove", this._onTouchMove), Q(document, "dragover", wn), Q(document, "mousemove", wn), Q(document, "touchmove", wn);
  },
  _offUpEvents: function() {
    var n = this.el.ownerDocument;
    Q(n, "mouseup", this._onDrop), Q(n, "touchend", this._onDrop), Q(n, "pointerup", this._onDrop), Q(n, "touchcancel", this._onDrop), Q(document, "selectstart", this);
  },
  _onDrop: function(n) {
    var o = this.el, a = this.options;
    if (Te = Ne($), sn = Ne($, a.draggable), De("drop", this, {
      evt: n
    }), de = $ && $.parentNode, Te = Ne($), sn = Ne($, a.draggable), V.eventCanceled) {
      this._nulling();
      return;
    }
    _n = !1, ma = !1, ea = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), io(this.cloneId), io(this._dragStartId), this.nativeDraggable && (Q(document, "drop", this), Q(o, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Qn && U(document.body, "user-select", ""), U($, "transform", ""), n && (Kn && (n.cancelable && n.preventDefault(), !a.dropBubble && n.stopPropagation()), W && W.parentNode && W.parentNode.removeChild(W), (te === de || we && we.lastPutMode !== "clone") && le && le.parentNode && le.parentNode.removeChild(le), $ && (this.nativeDraggable && Q($, "dragend", this), Xa($), $.style["will-change"] = "", Kn && !_n && Ie($, we ? we.options.ghostClass : this.options.ghostClass, !1), Ie($, this.options.chosenClass, !1), _e({
      sortable: this,
      name: "unchoose",
      toEl: de,
      newIndex: null,
      newDraggableIndex: null,
      originalEvent: n
    }), te !== de ? (Te >= 0 && (_e({
      rootEl: de,
      name: "add",
      toEl: de,
      fromEl: te,
      originalEvent: n
    }), _e({
      sortable: this,
      name: "remove",
      toEl: de,
      originalEvent: n
    }), _e({
      rootEl: de,
      name: "sort",
      toEl: de,
      fromEl: te,
      originalEvent: n
    }), _e({
      sortable: this,
      name: "sort",
      toEl: de,
      originalEvent: n
    })), we && we.save()) : Te !== In && Te >= 0 && (_e({
      sortable: this,
      name: "update",
      toEl: de,
      originalEvent: n
    }), _e({
      sortable: this,
      name: "sort",
      toEl: de,
      originalEvent: n
    })), V.active && ((Te == null || Te === -1) && (Te = In, sn = Zn), _e({
      sortable: this,
      name: "end",
      toEl: de,
      originalEvent: n
    }), this.save()))), this._nulling();
  },
  _nulling: function() {
    De("nulling", this), te = $ = de = W = kn = le = va = mn = bn = je = Kn = Te = sn = In = Zn = Pn = Jn = we = ua = V.dragged = V.ghost = V.clone = V.active = null, _a.forEach(function(n) {
      n.checked = !0;
    }), _a.length = Ha = Wa = 0;
  },
  handleEvent: function(n) {
    switch (n.type) {
      case "drop":
      case "dragend":
        this._onDrop(n);
        break;
      case "dragenter":
      case "dragover":
        $ && (this._onDragOver(n), qr(n));
        break;
      case "selectstart":
        n.preventDefault();
        break;
    }
  },
  /**
   * Serializes the item into an array of string.
   * @returns {String[]}
   */
  toArray: function() {
    for (var n = [], o, a = this.el.children, t = 0, c = a.length, d = this.options; t < c; t++)
      o = a[t], Ve(o, d.draggable, this.el, !1) && n.push(o.getAttribute(d.dataIdAttr) || ni(o));
    return n;
  },
  /**
   * Sorts the elements according to the array.
   * @param  {String[]}  order  order of the items
   */
  sort: function(n, o) {
    var a = {}, t = this.el;
    this.toArray().forEach(function(c, d) {
      var i = t.children[d];
      Ve(i, this.options.draggable, t, !1) && (a[c] = i);
    }, this), o && this.captureAnimationState(), n.forEach(function(c) {
      a[c] && (t.removeChild(a[c]), t.appendChild(a[c]));
    }), o && this.animateAll();
  },
  /**
   * Save the current sorting
   */
  save: function() {
    var n = this.options.store;
    n && n.set && n.set(this);
  },
  /**
   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
   * @param   {HTMLElement}  el
   * @param   {String}       [selector]  default: `options.draggable`
   * @returns {HTMLElement|null}
   */
  closest: function(n, o) {
    return Ve(n, o || this.options.draggable, this.el, !1);
  },
  /**
   * Set/get option
   * @param   {string} name
   * @param   {*}      [value]
   * @returns {*}
   */
  option: function(n, o) {
    var a = this.options;
    if (o === void 0)
      return a[n];
    var t = ra.modifyOption(this, n, o);
    typeof t < "u" ? a[n] = t : a[n] = o, n === "group" && yc(a);
  },
  /**
   * Destroy
   */
  destroy: function() {
    De("destroy", this);
    var n = this.el;
    n[Ae] = null, Q(n, "mousedown", this._onTapStart), Q(n, "touchstart", this._onTapStart), Q(n, "pointerdown", this._onTapStart), this.nativeDraggable && (Q(n, "dragover", this), Q(n, "dragenter", this)), Array.prototype.forEach.call(n.querySelectorAll("[draggable]"), function(o) {
      o.removeAttribute("draggable");
    }), this._onDrop(), this._disableDelayedDragEvents(), Pa.splice(Pa.indexOf(this.el), 1), this.el = n = null;
  },
  _hideClone: function() {
    if (!mn) {
      if (De("hideClone", this), V.eventCanceled) return;
      U(le, "display", "none"), this.options.removeCloneOnHide && le.parentNode && le.parentNode.removeChild(le), mn = !0;
    }
  },
  _showClone: function(n) {
    if (n.lastPutMode !== "clone") {
      this._hideClone();
      return;
    }
    if (mn) {
      if (De("showClone", this), V.eventCanceled) return;
      $.parentNode == te && !this.options.group.revertClone ? te.insertBefore(le, $) : kn ? te.insertBefore(le, kn) : te.appendChild(le), this.options.group.revertClone && this.animate($, le), U(le, "display", ""), mn = !1;
    }
  }
};
function qr(e) {
  e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
}
function pa(e, n, o, a, t, c, d, i) {
  var r, l = e[Ae], m = l.options.onMove, g;
  return window.CustomEvent && !cn && !la ? r = new CustomEvent("move", {
    bubbles: !0,
    cancelable: !0
  }) : (r = document.createEvent("Event"), r.initEvent("move", !0, !0)), r.to = n, r.from = e, r.dragged = o, r.draggedRect = a, r.related = t || n, r.relatedRect = c || he(n), r.willInsertAfter = i, r.originalEvent = d, e.dispatchEvent(r), m && (g = m.call(l, r, d)), g;
}
function Xa(e) {
  e.draggable = !1;
}
function Qr() {
  ro = !1;
}
function Gr(e, n, o) {
  var a = he(zn(o.el, 0, o.options, !0)), t = 10;
  return n ? e.clientX < a.left - t || e.clientY < a.top && e.clientX < a.right : e.clientY < a.top - t || e.clientY < a.bottom && e.clientX < a.left;
}
function Zr(e, n, o) {
  var a = he(Io(o.el, o.options.draggable)), t = 10;
  return n ? e.clientX > a.right + t || e.clientX <= a.right && e.clientY > a.bottom && e.clientX >= a.left : e.clientX > a.right && e.clientY > a.top || e.clientX <= a.right && e.clientY > a.bottom + t;
}
function Jr(e, n, o, a, t, c, d, i) {
  var r = a ? e.clientY : e.clientX, l = a ? o.height : o.width, m = a ? o.top : o.left, g = a ? o.bottom : o.right, y = !1;
  if (!d) {
    if (i && ya < l * t) {
      if (!ea && (Jn === 1 ? r > m + l * c / 2 : r < g - l * c / 2) && (ea = !0), ea)
        y = !0;
      else if (Jn === 1 ? r < m + ya : r > g - ya)
        return -Jn;
    } else if (r > m + l * (1 - t) / 2 && r < g - l * (1 - t) / 2)
      return ei(n);
  }
  return y = y || d, y && (r < m + l * c / 2 || r > g - l * c / 2) ? r > m + l / 2 ? 1 : -1 : 0;
}
function ei(e) {
  return Ne($) < Ne(e) ? 1 : -1;
}
function ni(e) {
  for (var n = e.tagName + e.className + e.src + e.href + e.textContent, o = n.length, a = 0; o--; )
    a += n.charCodeAt(o);
  return a.toString(36);
}
function ai(e) {
  _a.length = 0;
  for (var n = e.getElementsByTagName("input"), o = n.length; o--; ) {
    var a = n[o];
    a.checked && _a.push(a);
  }
}
function ba(e) {
  return setTimeout(e, 0);
}
function io(e) {
  return clearTimeout(e);
}
Ma && G(document, "touchmove", function(e) {
  (V.active || _n) && e.cancelable && e.preventDefault();
});
V.utils = {
  on: G,
  off: Q,
  css: U,
  find: mc,
  is: function(n, o) {
    return !!Ve(n, o, n, !1);
  },
  extend: zr,
  throttle: fc,
  closest: Ve,
  toggleClass: Ie,
  clone: hc,
  index: Ne,
  nextTick: ba,
  cancelNextTick: io,
  detectDirection: vc,
  getChild: zn
};
V.get = function(e) {
  return e[Ae];
};
V.mount = function() {
  for (var e = arguments.length, n = new Array(e), o = 0; o < e; o++)
    n[o] = arguments[o];
  n[0].constructor === Array && (n = n[0]), n.forEach(function(a) {
    if (!a.prototype || !a.prototype.constructor)
      throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(a));
    a.utils && (V.utils = Qe(Qe({}, V.utils), a.utils)), ra.mount(a);
  });
};
V.create = function(e, n) {
  return new V(e, n);
};
V.version = $r;
var ue = [], Hn, so, uo = !1, qa, Qa, Da, Wn;
function oi() {
  function e() {
    this.defaults = {
      scroll: !0,
      forceAutoScrollFallback: !1,
      scrollSensitivity: 30,
      scrollSpeed: 10,
      bubbleScroll: !0
    };
    for (var n in this)
      n.charAt(0) === "_" && typeof this[n] == "function" && (this[n] = this[n].bind(this));
  }
  return e.prototype = {
    dragStarted: function(o) {
      var a = o.originalEvent;
      this.sortable.nativeDraggable ? G(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? G(document, "pointermove", this._handleFallbackAutoScroll) : a.touches ? G(document, "touchmove", this._handleFallbackAutoScroll) : G(document, "mousemove", this._handleFallbackAutoScroll);
    },
    dragOverCompleted: function(o) {
      var a = o.originalEvent;
      !this.options.dragOverBubble && !a.rootEl && this._handleAutoScroll(a);
    },
    drop: function() {
      this.sortable.nativeDraggable ? Q(document, "dragover", this._handleAutoScroll) : (Q(document, "pointermove", this._handleFallbackAutoScroll), Q(document, "touchmove", this._handleFallbackAutoScroll), Q(document, "mousemove", this._handleFallbackAutoScroll)), yt(), wa(), Rr();
    },
    nulling: function() {
      Da = so = Hn = uo = Wn = qa = Qa = null, ue.length = 0;
    },
    _handleFallbackAutoScroll: function(o) {
      this._handleAutoScroll(o, !0);
    },
    _handleAutoScroll: function(o, a) {
      var t = this, c = (o.touches ? o.touches[0] : o).clientX, d = (o.touches ? o.touches[0] : o).clientY, i = document.elementFromPoint(c, d);
      if (Da = o, a || this.options.forceAutoScrollFallback || la || cn || Qn) {
        Ga(o, this.options, i, a);
        var r = fn(i, !0);
        uo && (!Wn || c !== qa || d !== Qa) && (Wn && yt(), Wn = setInterval(function() {
          var l = fn(document.elementFromPoint(c, d), !0);
          l !== r && (r = l, wa()), Ga(o, t.options, l, a);
        }, 10), qa = c, Qa = d);
      } else {
        if (!this.options.bubbleScroll || fn(i, !0) === Xe()) {
          wa();
          return;
        }
        Ga(o, this.options, fn(i, !1), !1);
      }
    }
  }, on(e, {
    pluginName: "scroll",
    initializeByDefault: !0
  });
}
function wa() {
  ue.forEach(function(e) {
    clearInterval(e.pid);
  }), ue = [];
}
function yt() {
  clearInterval(Wn);
}
var Ga = fc(function(e, n, o, a) {
  if (n.scroll) {
    var t = (e.touches ? e.touches[0] : e).clientX, c = (e.touches ? e.touches[0] : e).clientY, d = n.scrollSensitivity, i = n.scrollSpeed, r = Xe(), l = !1, m;
    so !== o && (so = o, wa(), Hn = n.scroll, m = n.scrollFn, Hn === !0 && (Hn = fn(o, !0)));
    var g = 0, y = Hn;
    do {
      var C = y, f = he(C), p = f.top, b = f.bottom, h = f.left, s = f.right, v = f.width, w = f.height, E = void 0, k = void 0, P = C.scrollWidth, O = C.scrollHeight, x = U(C), _ = C.scrollLeft, D = C.scrollTop;
      C === r ? (E = v < P && (x.overflowX === "auto" || x.overflowX === "scroll" || x.overflowX === "visible"), k = w < O && (x.overflowY === "auto" || x.overflowY === "scroll" || x.overflowY === "visible")) : (E = v < P && (x.overflowX === "auto" || x.overflowX === "scroll"), k = w < O && (x.overflowY === "auto" || x.overflowY === "scroll"));
      var A = E && (Math.abs(s - t) <= d && _ + v < P) - (Math.abs(h - t) <= d && !!_), M = k && (Math.abs(b - c) <= d && D + w < O) - (Math.abs(p - c) <= d && !!D);
      if (!ue[g])
        for (var F = 0; F <= g; F++)
          ue[F] || (ue[F] = {});
      (ue[g].vx != A || ue[g].vy != M || ue[g].el !== C) && (ue[g].el = C, ue[g].vx = A, ue[g].vy = M, clearInterval(ue[g].pid), (A != 0 || M != 0) && (l = !0, ue[g].pid = setInterval((function() {
        a && this.layer === 0 && V.active._onTouchMove(Da);
        var K = ue[this.layer].vy ? ue[this.layer].vy * i : 0, T = ue[this.layer].vx ? ue[this.layer].vx * i : 0;
        typeof m == "function" && m.call(V.dragged.parentNode[Ae], T, K, e, Da, ue[this.layer].el) !== "continue" || pc(ue[this.layer].el, T, K);
      }).bind({
        layer: g
      }), 24))), g++;
    } while (n.bubbleScroll && y !== r && (y = fn(y, !1)));
    uo = l;
  }
}, 30), kc = function(n) {
  var o = n.originalEvent, a = n.putSortable, t = n.dragEl, c = n.activeSortable, d = n.dispatchSortableEvent, i = n.hideGhostForTarget, r = n.unhideGhostForTarget;
  if (o) {
    var l = a || c;
    i();
    var m = o.changedTouches && o.changedTouches.length ? o.changedTouches[0] : o, g = document.elementFromPoint(m.clientX, m.clientY);
    r(), l && !l.el.contains(g) && (d("spill"), this.onSpill({
      dragEl: t,
      putSortable: a
    }));
  }
};
function To() {
}
To.prototype = {
  startIndex: null,
  dragStart: function(n) {
    var o = n.oldDraggableIndex;
    this.startIndex = o;
  },
  onSpill: function(n) {
    var o = n.dragEl, a = n.putSortable;
    this.sortable.captureAnimationState(), a && a.captureAnimationState();
    var t = zn(this.sortable.el, this.startIndex, this.options);
    t ? this.sortable.el.insertBefore(o, t) : this.sortable.el.appendChild(o), this.sortable.animateAll(), a && a.animateAll();
  },
  drop: kc
};
on(To, {
  pluginName: "revertOnSpill"
});
function Ao() {
}
Ao.prototype = {
  onSpill: function(n) {
    var o = n.dragEl, a = n.putSortable, t = a || this.sortable;
    t.captureAnimationState(), o.parentNode && o.parentNode.removeChild(o), t.animateAll();
  },
  drop: kc
};
on(Ao, {
  pluginName: "removeOnSpill"
});
V.mount(new oi());
V.mount(Ao, To);
function Za(e) {
  e.parentElement !== null && e.parentElement.removeChild(e);
}
function bt(e, n, o) {
  const a = o === 0 ? e.children[0] : e.children[o - 1].nextSibling;
  e.insertBefore(n, a);
}
function ti() {
  return typeof window < "u" ? window.console : global.console;
}
const ci = ti();
function di(e) {
  const n = /* @__PURE__ */ Object.create(null);
  return function(a) {
    return n[a] || (n[a] = e(a));
  };
}
const li = /-(\w)/g, ri = di((e) => e.replace(li, (n, o) => o.toUpperCase())), Cc = ["Start", "Add", "Remove", "Update", "End"], Sc = ["Choose", "Unchoose", "Sort", "Filter", "Clone"], xc = ["Move"], ii = [xc, Cc, Sc].flatMap((e) => e).map((e) => `on${e}`), mo = {
  manage: xc,
  manageAndEmit: Cc,
  emit: Sc
};
function si(e) {
  return ii.indexOf(e) !== -1;
}
const ui = [
  "a",
  "abbr",
  "address",
  "area",
  "article",
  "aside",
  "audio",
  "b",
  "base",
  "bdi",
  "bdo",
  "blockquote",
  "body",
  "br",
  "button",
  "canvas",
  "caption",
  "cite",
  "code",
  "col",
  "colgroup",
  "data",
  "datalist",
  "dd",
  "del",
  "details",
  "dfn",
  "dialog",
  "div",
  "dl",
  "dt",
  "em",
  "embed",
  "fieldset",
  "figcaption",
  "figure",
  "footer",
  "form",
  "h1",
  "h2",
  "h3",
  "h4",
  "h5",
  "h6",
  "head",
  "header",
  "hgroup",
  "hr",
  "html",
  "i",
  "iframe",
  "img",
  "input",
  "ins",
  "kbd",
  "label",
  "legend",
  "li",
  "link",
  "main",
  "map",
  "mark",
  "math",
  "menu",
  "menuitem",
  "meta",
  "meter",
  "nav",
  "noscript",
  "object",
  "ol",
  "optgroup",
  "option",
  "output",
  "p",
  "param",
  "picture",
  "pre",
  "progress",
  "q",
  "rb",
  "rp",
  "rt",
  "rtc",
  "ruby",
  "s",
  "samp",
  "script",
  "section",
  "select",
  "slot",
  "small",
  "source",
  "span",
  "strong",
  "style",
  "sub",
  "summary",
  "sup",
  "svg",
  "table",
  "tbody",
  "td",
  "template",
  "textarea",
  "tfoot",
  "th",
  "thead",
  "time",
  "title",
  "tr",
  "track",
  "u",
  "ul",
  "var",
  "video",
  "wbr"
];
function mi(e) {
  return ui.includes(e);
}
function fi(e) {
  return ["transition-group", "TransitionGroup"].includes(e);
}
function Ec(e) {
  return ["id", "class", "role", "style"].includes(e) || e.startsWith("data-") || e.startsWith("aria-") || e.startsWith("on");
}
function Oc(e) {
  return e.reduce((n, [o, a]) => (n[o] = a, n), {});
}
function pi({ $attrs: e, componentData: n = {} }) {
  return {
    ...Oc(
      Object.entries(e).filter(([a, t]) => Ec(a))
    ),
    ...n
  };
}
function hi({ $attrs: e, callBackBuilder: n }) {
  const o = Oc(Pc(e));
  Object.entries(n).forEach(([t, c]) => {
    mo[t].forEach((d) => {
      o[`on${d}`] = c(d);
    });
  });
  const a = `[data-draggable]${o.draggable || ""}`;
  return {
    ...o,
    draggable: a
  };
}
function Pc(e) {
  return Object.entries(e).filter(([n, o]) => !Ec(n)).map(([n, o]) => [ri(n), o]).filter(([n, o]) => !si(n));
}
const wt = ({ el: e }) => e, gi = (e, n) => e.__draggable_context = n, kt = (e) => e.__draggable_context;
class vi {
  constructor({
    nodes: { header: n, default: o, footer: a },
    root: t,
    realList: c
  }) {
    this.defaultNodes = o, this.children = [...n, ...o, ...a], this.externalComponent = t.externalComponent, this.rootTransition = t.transition, this.tag = t.tag, this.realList = c;
  }
  get _isRootComponent() {
    return this.externalComponent || this.rootTransition;
  }
  render(n, o) {
    const { tag: a, children: t, _isRootComponent: c } = this;
    return n(a, o, c ? { default: () => t } : t);
  }
  updated() {
    const { defaultNodes: n, realList: o } = this;
    n.forEach((a, t) => {
      gi(wt(a), {
        element: o[t],
        index: t
      });
    });
  }
  getUnderlyingVm(n) {
    return kt(n);
  }
  getVmIndexFromDomIndex(n, o) {
    const { defaultNodes: a } = this, { length: t } = a, c = o.children, d = c.item(n);
    if (d === null)
      return t;
    const i = kt(d);
    if (i)
      return i.index;
    if (t === 0)
      return 0;
    const r = wt(a[0]), l = [...c].findIndex(
      (m) => m === r
    );
    return n < l ? 0 : t;
  }
}
function yi(e, n) {
  const o = e[n];
  return o ? o() : [];
}
function bi({ $slots: e, realList: n, getKey: o }) {
  const a = n || [], [t, c] = ["header", "footer"].map(
    (r) => yi(e, r)
  ), { item: d } = e;
  if (!d)
    throw new Error("draggable element must have an item slot");
  const i = a.flatMap(
    (r, l) => d({ element: r, index: l }).map((m) => (m.key = o(r), m.props = { ...m.props || {}, "data-draggable": !0 }, m))
  );
  if (i.length !== a.length)
    throw new Error("Item slot must have only one child");
  return {
    header: t,
    footer: c,
    default: i
  };
}
function wi(e) {
  const n = fi(e), o = !mi(e) && !n;
  return {
    transition: n,
    externalComponent: o,
    tag: o ? wo(e) : n ? zt : e
  };
}
function ki({ $slots: e, tag: n, realList: o, getKey: a }) {
  const t = bi({ $slots: e, realList: o, getKey: a }), c = wi(n);
  return new vi({ nodes: t, root: c, realList: o });
}
function _c(e, n) {
  hn(() => this.$emit(e.toLowerCase(), n));
}
function Dc(e) {
  return (n, o) => {
    if (this.realList !== null)
      return this[`onDrag${e}`](n, o);
  };
}
function Ci(e) {
  const n = Dc.call(this, e);
  return (o, a) => {
    n.call(this, o, a), _c.call(this, e, o);
  };
}
let Ja = null;
const Si = {
  list: {
    type: Array,
    required: !1,
    default: null
  },
  modelValue: {
    type: Array,
    required: !1,
    default: null
  },
  itemKey: {
    type: [String, Function],
    required: !0
  },
  clone: {
    type: Function,
    default: (e) => e
  },
  tag: {
    type: String,
    default: "div"
  },
  move: {
    type: Function,
    default: null
  },
  componentData: {
    type: Object,
    required: !1,
    default: null
  }
}, xi = [
  "update:modelValue",
  "change",
  ...[...mo.manageAndEmit, ...mo.emit].map((e) => e.toLowerCase())
], fo = Pe({
  name: "draggable",
  inheritAttrs: !1,
  props: Si,
  emits: xi,
  data() {
    return {
      error: !1
    };
  },
  render() {
    try {
      this.error = !1;
      const { $slots: e, $attrs: n, tag: o, componentData: a, realList: t, getKey: c } = this, d = ki({
        $slots: e,
        tag: o,
        realList: t,
        getKey: c
      });
      this.componentStructure = d;
      const i = pi({ $attrs: n, componentData: a });
      return d.render(Z, i);
    } catch (e) {
      return this.error = !0, Z("pre", { style: { color: "red" } }, e.stack);
    }
  },
  created() {
    this.list !== null && this.modelValue !== null && ci.error(
      "modelValue and list props are mutually exclusive! Please set one or another."
    );
  },
  mounted() {
    if (this.error)
      return;
    const { $attrs: e, $el: n, componentStructure: o } = this;
    o.updated();
    const a = hi({
      $attrs: e,
      callBackBuilder: {
        manageAndEmit: (c) => Ci.call(this, c),
        emit: (c) => _c.bind(this, c),
        manage: (c) => Dc.call(this, c)
      }
    }), t = n.nodeType === 1 ? n : n.parentElement;
    this._sortable = new V(t, a), this.targetDomElement = t, t.__draggable_component__ = this;
  },
  updated() {
    this.componentStructure.updated();
  },
  beforeUnmount() {
    this._sortable !== void 0 && this._sortable.destroy();
  },
  computed: {
    realList() {
      const { list: e } = this;
      return e || this.modelValue;
    },
    getKey() {
      const { itemKey: e } = this;
      return typeof e == "function" ? e : (n) => n[e];
    }
  },
  watch: {
    $attrs: {
      handler(e) {
        const { _sortable: n } = this;
        n && Pc(e).forEach(([o, a]) => {
          n.option(o, a);
        });
      },
      deep: !0
    }
  },
  methods: {
    getUnderlyingVm(e) {
      return this.componentStructure.getUnderlyingVm(e) || null;
    },
    getUnderlyingPotencialDraggableComponent(e) {
      return e.__draggable_component__;
    },
    emitChanges(e) {
      hn(() => this.$emit("change", e));
    },
    alterList(e) {
      if (this.list) {
        e(this.list);
        return;
      }
      const n = [...this.modelValue];
      e(n), this.$emit("update:modelValue", n);
    },
    spliceList() {
      const e = (n) => n.splice(...arguments);
      this.alterList(e);
    },
    updatePosition(e, n) {
      const o = (a) => a.splice(n, 0, a.splice(e, 1)[0]);
      this.alterList(o);
    },
    getRelatedContextFromMoveEvent({ to: e, related: n }) {
      const o = this.getUnderlyingPotencialDraggableComponent(e);
      if (!o)
        return { component: o };
      const a = o.realList, t = { list: a, component: o };
      return e !== n && a ? { ...o.getUnderlyingVm(n) || {}, ...t } : t;
    },
    getVmIndexFromDomIndex(e) {
      return this.componentStructure.getVmIndexFromDomIndex(
        e,
        this.targetDomElement
      );
    },
    onDragStart(e) {
      this.context = this.getUnderlyingVm(e.item), e.item._underlying_vm_ = this.clone(this.context.element), Ja = e.item;
    },
    onDragAdd(e) {
      const n = e.item._underlying_vm_;
      if (n === void 0)
        return;
      Za(e.item);
      const o = this.getVmIndexFromDomIndex(e.newIndex);
      this.spliceList(o, 0, n);
      const a = { element: n, newIndex: o };
      this.emitChanges({ added: a });
    },
    onDragRemove(e) {
      if (bt(this.$el, e.item, e.oldIndex), e.pullMode === "clone") {
        Za(e.clone);
        return;
      }
      const { index: n, element: o } = this.context;
      this.spliceList(n, 1);
      const a = { element: o, oldIndex: n };
      this.emitChanges({ removed: a });
    },
    onDragUpdate(e) {
      Za(e.item), bt(e.from, e.item, e.oldIndex);
      const n = this.context.index, o = this.getVmIndexFromDomIndex(e.newIndex);
      this.updatePosition(n, o);
      const a = { element: this.context.element, oldIndex: n, newIndex: o };
      this.emitChanges({ moved: a });
    },
    computeFutureIndex(e, n) {
      if (!e.element)
        return 0;
      const o = [...n.to.children].filter(
        (d) => d.style.display !== "none"
      ), a = o.indexOf(n.related), t = e.component.getVmIndexFromDomIndex(
        a
      );
      return o.indexOf(Ja) !== -1 || !n.willInsertAfter ? t : t + 1;
    },
    onDragMove(e, n) {
      const { move: o, realList: a } = this;
      if (!o || !a)
        return !0;
      const t = this.getRelatedContextFromMoveEvent(e), c = this.computeFutureIndex(t, e), d = {
        ...this.context,
        futureIndex: c
      }, i = {
        ...e,
        relatedContext: t,
        draggedContext: d
      };
      return o(i, n);
    },
    onDragEnd() {
      Ja = null;
    }
  }
}), Ei = (e, n) => {
  const o = (a) => {
    const t = n.targetKeys.indexOf(a.key);
    n.targetKeys.splice(t, 1);
  };
  return u(sd, {
    class: "newbie-search-sortable",
    selectedKeys: n.selectedKeys,
    "onUpdate:selectedKeys": (a) => n.selectedKeys = a,
    targetKeys: n.targetKeys,
    "onUpdate:targetKeys": (a) => n.targetKeys = a,
    locale: {
      itemUnit: "",
      //useT("search.item-unit"),
      itemsUnit: "",
      // useT("search.items-unit"),
      notFoundContent: I("common.no-data"),
      searchPlaceholder: I("form.search-placeholder"),
      titles: [I("search.sortable-items"), I("search.sorted-items")]
    },
    listStyle: {
      minWidth: "300px"
    },
    dataSource: e,
    titles: [I("search.sortable-items"), I("search.sorted-items")],
    oneWay: !0,
    render: (a) => a.title
  }, {
    children({
      direction: a,
      filteredItems: t
    }) {
      if (a === "right")
        return t.length ? u(fo, {
          class: "list-group",
          itemKey: "key",
          tag: "div",
          modelValue: n.targetKeys,
          "onUpdate:modelValue": (c) => n.targetKeys = c,
          sort: !0,
          animation: 0,
          group: "sortables",
          ghostClass: "ghost",
          handle: ".drag-handle"
        }, {
          item: ({
            element: c
          }) => {
            const d = ve(e, {
              key: c
            });
            return d.direction || (d.direction = "asc"), u("div", {
              class: "newbie-search-sortable__sortable-item"
            }, [u("span", {
              class: "drag-handle"
            }, [u(Ld, null, null)]), u("div", {
              class: "newbie-search-sortable__sortable-item-content"
            }, [u("span", {
              class: "newbie-search-sortable__sortable-item-title"
            }, [d.title]), u("span", {
              class: "newbie-search-sortable__sortable-item-sorter"
            }, [u(Ye, {
              title: d.direction === "asc" ? I("search.ascending") : I("search.descending"),
              placement: "left"
            }, {
              default: () => [u(re, {
                size: "small",
                type: d.direction === "asc" ? "primary" : "default",
                icon: d.direction === "asc" ? u(qt, null, null) : u(Qt, null, null),
                onClick: () => d.direction = d.direction === "asc" ? "desc" : "asc"
              }, null)]
            })])]), u("span", {
              class: "newbie-search-sortable__sortable-item-delete"
            }, [u(Ye, {
              title: I("search.remove-item"),
              placement: "right"
            }, {
              default: () => [u(re, {
                type: "danger",
                icon: u(co, null, null),
                onClick: () => o(d)
              }, null)]
            })])]);
          }
        }) : u("div", {
          class: "newbie-search-sortable__sortable-empty"
        }, [I("search.select-sorting-item")]);
    }
  });
};
function No(e) {
  return Mt() ? (jt(e), !0) : !1;
}
function Rn(e) {
  return typeof e == "function" ? e() : $t(e);
}
const $o = typeof window < "u", aa = () => {
}, po = /* @__PURE__ */ Oi();
function Oi() {
  var e;
  return $o && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);
}
function Pi(...e) {
  if (e.length !== 1)
    return yo(...e);
  const n = e[0];
  return typeof n == "function" ? Lt(bo(() => ({ get: n, set: aa }))) : z(n);
}
function Yn(e) {
  var n;
  const o = Rn(e);
  return (n = o == null ? void 0 : o.$el) != null ? n : o;
}
const Ic = $o ? window : void 0;
function eo(...e) {
  let n, o, a, t;
  if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([o, a, t] = e, n = Ic) : [n, o, a, t] = e, !n)
    return aa;
  Array.isArray(o) || (o = [o]), Array.isArray(a) || (a = [a]);
  const c = [], d = () => {
    c.forEach((m) => m()), c.length = 0;
  }, i = (m, g, y, C) => (m.addEventListener(g, y, C), () => m.removeEventListener(g, y, C)), r = oe(
    () => [Yn(n), Rn(t)],
    ([m, g]) => {
      d(), m && c.push(
        ...o.flatMap((y) => a.map((C) => i(m, y, C, g)))
      );
    },
    { immediate: !0, flush: "post" }
  ), l = () => {
    r(), d();
  };
  return No(l), l;
}
let Ct = !1;
function _i(e, n, o = {}) {
  const { window: a = Ic, ignore: t = [], capture: c = !0, detectIframe: d = !1 } = o;
  if (!a)
    return;
  po && !Ct && (Ct = !0, Array.from(a.document.body.children).forEach((y) => y.addEventListener("click", aa)), a.document.documentElement.addEventListener("click", aa));
  let i = !0;
  const r = (y) => t.some((C) => {
    if (typeof C == "string")
      return Array.from(a.document.querySelectorAll(C)).some((f) => f === y.target || y.composedPath().includes(f));
    {
      const f = Yn(C);
      return f && (y.target === f || y.composedPath().includes(f));
    }
  }), m = [
    eo(a, "click", (y) => {
      const C = Yn(e);
      if (!(!C || C === y.target || y.composedPath().includes(C))) {
        if (y.detail === 0 && (i = !r(y)), !i) {
          i = !0;
          return;
        }
        n(y);
      }
    }, { passive: !0, capture: c }),
    eo(a, "pointerdown", (y) => {
      const C = Yn(e);
      C && (i = !y.composedPath().includes(C) && !r(y));
    }, { passive: !0 }),
    d && eo(a, "blur", (y) => {
      setTimeout(() => {
        var C;
        const f = Yn(e);
        ((C = a.document.activeElement) == null ? void 0 : C.tagName) === "IFRAME" && !(f != null && f.contains(a.document.activeElement)) && n(y);
      }, 0);
    })
  ].filter(Boolean);
  return () => m.forEach((y) => y());
}
const Di = /* @__PURE__ */ Pe({
  name: "OnClickOutside",
  props: ["as", "options"],
  emits: ["trigger"],
  setup(e, { slots: n, emit: o }) {
    const a = z();
    return _i(a, (t) => {
      o("trigger", t);
    }, e.options), () => {
      if (n.default)
        return Z(e.as || "div", { ref: a }, n.default());
    };
  }
});
function Ii(e) {
  var n;
  const o = Rn(e);
  return (n = o == null ? void 0 : o.$el) != null ? n : o;
}
const Ti = $o ? window : void 0;
function Ai(...e) {
  let n, o, a, t;
  if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([o, a, t] = e, n = Ti) : [n, o, a, t] = e, !n)
    return aa;
  Array.isArray(o) || (o = [o]), Array.isArray(a) || (a = [a]);
  const c = [], d = () => {
    c.forEach((m) => m()), c.length = 0;
  }, i = (m, g, y, C) => (m.addEventListener(g, y, C), () => m.removeEventListener(g, y, C)), r = oe(
    () => [Ii(n), Rn(t)],
    ([m, g]) => {
      d(), m && c.push(
        ...o.flatMap((y) => a.map((C) => i(m, y, C, g)))
      );
    },
    { immediate: !0, flush: "post" }
  ), l = () => {
    r(), d();
  };
  return No(l), l;
}
function Tc(e) {
  const n = window.getComputedStyle(e);
  if (n.overflowX === "scroll" || n.overflowY === "scroll" || n.overflowX === "auto" && e.clientWidth < e.scrollWidth || n.overflowY === "auto" && e.clientHeight < e.scrollHeight)
    return !0;
  {
    const o = e.parentNode;
    return !o || o.tagName === "BODY" ? !1 : Tc(o);
  }
}
function Ni(e) {
  const n = e || window.event, o = n.target;
  return Tc(o) ? !1 : n.touches.length > 1 ? !0 : (n.preventDefault && n.preventDefault(), !1);
}
function $i(e, n = !1) {
  const o = z(n);
  let a = null, t;
  oe(Pi(e), (i) => {
    if (i) {
      const r = i;
      t = r.style.overflow, o.value && (r.style.overflow = "hidden");
    }
  }, {
    immediate: !0
  });
  const c = () => {
    const i = Rn(e);
    !i || o.value || (po && (a = Ai(
      i,
      "touchmove",
      (r) => {
        Ni(r);
      },
      { passive: !1 }
    )), i.style.overflow = "hidden", o.value = !0);
  }, d = () => {
    const i = Rn(e);
    !i || !o.value || (po && (a == null || a()), i.style.overflow = t, o.value = !1);
  };
  return No(d), J({
    get() {
      return o.value;
    },
    set(i) {
      i ? c() : d();
    }
  });
}
function Mi() {
  let e = !1;
  const n = z(!1);
  return (o, a) => {
    if (n.value = a.value, e)
      return;
    e = !0;
    const t = $i(o, a.value);
    oe(n, (c) => t.value = c);
  };
}
Mi();
var Ac = {
  update: null,
  begin: null,
  loopBegin: null,
  changeBegin: null,
  change: null,
  changeComplete: null,
  loopComplete: null,
  complete: null,
  loop: 1,
  direction: "normal",
  autoplay: !0,
  timelineOffset: 0
}, Mo = {
  duration: 1e3,
  delay: 0,
  endDelay: 0,
  easing: "easeOutElastic(1, .5)",
  round: 0
}, ji = ["translateX", "translateY", "translateZ", "rotate", "rotateX", "rotateY", "rotateZ", "scale", "scaleX", "scaleY", "scaleZ", "skew", "skewX", "skewY", "perspective", "matrix", "matrix3d"], Ia = {
  CSS: {},
  springs: {}
};
function He(e, n, o) {
  return Math.min(Math.max(e, n), o);
}
function na(e, n) {
  return e.indexOf(n) > -1;
}
function no(e, n) {
  return e.apply(null, n);
}
var R = {
  arr: function(e) {
    return Array.isArray(e);
  },
  obj: function(e) {
    return na(Object.prototype.toString.call(e), "Object");
  },
  pth: function(e) {
    return R.obj(e) && e.hasOwnProperty("totalLength");
  },
  svg: function(e) {
    return e instanceof SVGElement;
  },
  inp: function(e) {
    return e instanceof HTMLInputElement;
  },
  dom: function(e) {
    return e.nodeType || R.svg(e);
  },
  str: function(e) {
    return typeof e == "string";
  },
  fnc: function(e) {
    return typeof e == "function";
  },
  und: function(e) {
    return typeof e > "u";
  },
  nil: function(e) {
    return R.und(e) || e === null;
  },
  hex: function(e) {
    return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e);
  },
  rgb: function(e) {
    return /^rgb/.test(e);
  },
  hsl: function(e) {
    return /^hsl/.test(e);
  },
  col: function(e) {
    return R.hex(e) || R.rgb(e) || R.hsl(e);
  },
  key: function(e) {
    return !Ac.hasOwnProperty(e) && !Mo.hasOwnProperty(e) && e !== "targets" && e !== "keyframes";
  }
};
function Nc(e) {
  var n = /\(([^)]+)\)/.exec(e);
  return n ? n[1].split(",").map(function(o) {
    return parseFloat(o);
  }) : [];
}
function $c(e, n) {
  var o = Nc(e), a = He(R.und(o[0]) ? 1 : o[0], 0.1, 100), t = He(R.und(o[1]) ? 100 : o[1], 0.1, 100), c = He(R.und(o[2]) ? 10 : o[2], 0.1, 100), d = He(R.und(o[3]) ? 0 : o[3], 0.1, 100), i = Math.sqrt(t / a), r = c / (2 * Math.sqrt(t * a)), l = r < 1 ? i * Math.sqrt(1 - r * r) : 0, m = 1, g = r < 1 ? (r * i + -d) / l : -d + i;
  function y(f) {
    var p = n ? n * f / 1e3 : f;
    return r < 1 ? p = Math.exp(-p * r * i) * (m * Math.cos(l * p) + g * Math.sin(l * p)) : p = (m + g * p) * Math.exp(-p * i), f === 0 || f === 1 ? f : 1 - p;
  }
  function C() {
    var f = Ia.springs[e];
    if (f)
      return f;
    for (var p = 1 / 6, b = 0, h = 0; ; )
      if (b += p, y(b) === 1) {
        if (h++, h >= 16)
          break;
      } else
        h = 0;
    var s = b * p * 1e3;
    return Ia.springs[e] = s, s;
  }
  return n ? y : C;
}
function Li(e) {
  return e === void 0 && (e = 10), function(n) {
    return Math.ceil(He(n, 1e-6, 1) * e) * (1 / e);
  };
}
var zi = function() {
  var e = 11, n = 1 / (e - 1);
  function o(m, g) {
    return 1 - 3 * g + 3 * m;
  }
  function a(m, g) {
    return 3 * g - 6 * m;
  }
  function t(m) {
    return 3 * m;
  }
  function c(m, g, y) {
    return ((o(g, y) * m + a(g, y)) * m + t(g)) * m;
  }
  function d(m, g, y) {
    return 3 * o(g, y) * m * m + 2 * a(g, y) * m + t(g);
  }
  function i(m, g, y, C, f) {
    var p, b, h = 0;
    do
      b = g + (y - g) / 2, p = c(b, C, f) - m, p > 0 ? y = b : g = b;
    while (Math.abs(p) > 1e-7 && ++h < 10);
    return b;
  }
  function r(m, g, y, C) {
    for (var f = 0; f < 4; ++f) {
      var p = d(g, y, C);
      if (p === 0)
        return g;
      var b = c(g, y, C) - m;
      g -= b / p;
    }
    return g;
  }
  function l(m, g, y, C) {
    if (!(0 <= m && m <= 1 && 0 <= y && y <= 1))
      return;
    var f = new Float32Array(e);
    if (m !== g || y !== C)
      for (var p = 0; p < e; ++p)
        f[p] = c(p * n, m, y);
    function b(h) {
      for (var s = 0, v = 1, w = e - 1; v !== w && f[v] <= h; ++v)
        s += n;
      --v;
      var E = (h - f[v]) / (f[v + 1] - f[v]), k = s + E * n, P = d(k, m, y);
      return P >= 1e-3 ? r(h, k, m, y) : P === 0 ? k : i(h, s, s + n, m, y);
    }
    return function(h) {
      return m === g && y === C || h === 0 || h === 1 ? h : c(b(h), g, C);
    };
  }
  return l;
}(), Mc = function() {
  var e = { linear: function() {
    return function(a) {
      return a;
    };
  } }, n = {
    Sine: function() {
      return function(a) {
        return 1 - Math.cos(a * Math.PI / 2);
      };
    },
    Circ: function() {
      return function(a) {
        return 1 - Math.sqrt(1 - a * a);
      };
    },
    Back: function() {
      return function(a) {
        return a * a * (3 * a - 2);
      };
    },
    Bounce: function() {
      return function(a) {
        for (var t, c = 4; a < ((t = Math.pow(2, --c)) - 1) / 11; )
          ;
        return 1 / Math.pow(4, 3 - c) - 7.5625 * Math.pow((t * 3 - 2) / 22 - a, 2);
      };
    },
    Elastic: function(a, t) {
      a === void 0 && (a = 1), t === void 0 && (t = 0.5);
      var c = He(a, 1, 10), d = He(t, 0.1, 2);
      return function(i) {
        return i === 0 || i === 1 ? i : -c * Math.pow(2, 10 * (i - 1)) * Math.sin((i - 1 - d / (Math.PI * 2) * Math.asin(1 / c)) * (Math.PI * 2) / d);
      };
    }
  }, o = ["Quad", "Cubic", "Quart", "Quint", "Expo"];
  return o.forEach(function(a, t) {
    n[a] = function() {
      return function(c) {
        return Math.pow(c, t + 2);
      };
    };
  }), Object.keys(n).forEach(function(a) {
    var t = n[a];
    e["easeIn" + a] = t, e["easeOut" + a] = function(c, d) {
      return function(i) {
        return 1 - t(c, d)(1 - i);
      };
    }, e["easeInOut" + a] = function(c, d) {
      return function(i) {
        return i < 0.5 ? t(c, d)(i * 2) / 2 : 1 - t(c, d)(i * -2 + 2) / 2;
      };
    }, e["easeOutIn" + a] = function(c, d) {
      return function(i) {
        return i < 0.5 ? (1 - t(c, d)(1 - i * 2)) / 2 : (t(c, d)(i * 2 - 1) + 1) / 2;
      };
    };
  }), e;
}();
function jo(e, n) {
  if (R.fnc(e))
    return e;
  var o = e.split("(")[0], a = Mc[o], t = Nc(e);
  switch (o) {
    case "spring":
      return $c(e, n);
    case "cubicBezier":
      return no(zi, t);
    case "steps":
      return no(Li, t);
    default:
      return no(a, t);
  }
}
function jc(e) {
  try {
    var n = document.querySelectorAll(e);
    return n;
  } catch {
    return;
  }
}
function ja(e, n) {
  for (var o = e.length, a = arguments.length >= 2 ? arguments[1] : void 0, t = [], c = 0; c < o; c++)
    if (c in e) {
      var d = e[c];
      n.call(a, d, c, e) && t.push(d);
    }
  return t;
}
function La(e) {
  return e.reduce(function(n, o) {
    return n.concat(R.arr(o) ? La(o) : o);
  }, []);
}
function St(e) {
  return R.arr(e) ? e : (R.str(e) && (e = jc(e) || e), e instanceof NodeList || e instanceof HTMLCollection ? [].slice.call(e) : [e]);
}
function Lo(e, n) {
  return e.some(function(o) {
    return o === n;
  });
}
function zo(e) {
  var n = {};
  for (var o in e)
    n[o] = e[o];
  return n;
}
function ho(e, n) {
  var o = zo(e);
  for (var a in e)
    o[a] = n.hasOwnProperty(a) ? n[a] : e[a];
  return o;
}
function za(e, n) {
  var o = zo(e);
  for (var a in n)
    o[a] = R.und(e[a]) ? n[a] : e[a];
  return o;
}
function Ri(e) {
  var n = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e);
  return n ? "rgba(" + n[1] + ",1)" : e;
}
function Bi(e) {
  var n = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, o = e.replace(n, function(i, r, l, m) {
    return r + r + l + l + m + m;
  }), a = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o), t = parseInt(a[1], 16), c = parseInt(a[2], 16), d = parseInt(a[3], 16);
  return "rgba(" + t + "," + c + "," + d + ",1)";
}
function Ui(e) {
  var n = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e), o = parseInt(n[1], 10) / 360, a = parseInt(n[2], 10) / 100, t = parseInt(n[3], 10) / 100, c = n[4] || 1;
  function d(y, C, f) {
    return f < 0 && (f += 1), f > 1 && (f -= 1), f < 1 / 6 ? y + (C - y) * 6 * f : f < 1 / 2 ? C : f < 2 / 3 ? y + (C - y) * (2 / 3 - f) * 6 : y;
  }
  var i, r, l;
  if (a == 0)
    i = r = l = t;
  else {
    var m = t < 0.5 ? t * (1 + a) : t + a - t * a, g = 2 * t - m;
    i = d(g, m, o + 1 / 3), r = d(g, m, o), l = d(g, m, o - 1 / 3);
  }
  return "rgba(" + i * 255 + "," + r * 255 + "," + l * 255 + "," + c + ")";
}
function Vi(e) {
  if (R.rgb(e))
    return Ri(e);
  if (R.hex(e))
    return Bi(e);
  if (R.hsl(e))
    return Ui(e);
}
function an(e) {
  var n = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);
  if (n)
    return n[1];
}
function Fi(e) {
  if (na(e, "translate") || e === "perspective")
    return "px";
  if (na(e, "rotate") || na(e, "skew"))
    return "deg";
}
function go(e, n) {
  return R.fnc(e) ? e(n.target, n.id, n.total) : e;
}
function We(e, n) {
  return e.getAttribute(n);
}
function Ro(e, n, o) {
  var a = an(n);
  if (Lo([o, "deg", "rad", "turn"], a))
    return n;
  var t = Ia.CSS[n + o];
  if (!R.und(t))
    return t;
  var c = 100, d = document.createElement(e.tagName), i = e.parentNode && e.parentNode !== document ? e.parentNode : document.body;
  i.appendChild(d), d.style.position = "absolute", d.style.width = c + o;
  var r = c / d.offsetWidth;
  i.removeChild(d);
  var l = r * parseFloat(n);
  return Ia.CSS[n + o] = l, l;
}
function Lc(e, n, o) {
  if (n in e.style) {
    var a = n.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), t = e.style[n] || getComputedStyle(e).getPropertyValue(a) || "0";
    return o ? Ro(e, t, o) : t;
  }
}
function Bo(e, n) {
  if (R.dom(e) && !R.inp(e) && (!R.nil(We(e, n)) || R.svg(e) && e[n]))
    return "attribute";
  if (R.dom(e) && Lo(ji, n))
    return "transform";
  if (R.dom(e) && n !== "transform" && Lc(e, n))
    return "css";
  if (e[n] != null)
    return "object";
}
function zc(e) {
  if (R.dom(e)) {
    for (var n = e.style.transform || "", o = /(\w+)\(([^)]*)\)/g, a = /* @__PURE__ */ new Map(), t; t = o.exec(n); )
      a.set(t[1], t[2]);
    return a;
  }
}
function Ki(e, n, o, a) {
  var t = na(n, "scale") ? 1 : 0 + Fi(n), c = zc(e).get(n) || t;
  return o && (o.transforms.list.set(n, c), o.transforms.last = n), a ? Ro(e, c, a) : c;
}
function Uo(e, n, o, a) {
  switch (Bo(e, n)) {
    case "transform":
      return Ki(e, n, a, o);
    case "css":
      return Lc(e, n, o);
    case "attribute":
      return We(e, n);
    default:
      return e[n] || 0;
  }
}
function Vo(e, n) {
  var o = /^(\*=|\+=|-=)/.exec(e);
  if (!o)
    return e;
  var a = an(e) || 0, t = parseFloat(n), c = parseFloat(e.replace(o[0], ""));
  switch (o[0][0]) {
    case "+":
      return t + c + a;
    case "-":
      return t - c + a;
    case "*":
      return t * c + a;
  }
}
function Rc(e, n) {
  if (R.col(e))
    return Vi(e);
  if (/\s/g.test(e))
    return e;
  var o = an(e), a = o ? e.substr(0, e.length - o.length) : e;
  return n ? a + n : a;
}
function Fo(e, n) {
  return Math.sqrt(Math.pow(n.x - e.x, 2) + Math.pow(n.y - e.y, 2));
}
function Hi(e) {
  return Math.PI * 2 * We(e, "r");
}
function Wi(e) {
  return We(e, "width") * 2 + We(e, "height") * 2;
}
function Yi(e) {
  return Fo(
    { x: We(e, "x1"), y: We(e, "y1") },
    { x: We(e, "x2"), y: We(e, "y2") }
  );
}
function Bc(e) {
  for (var n = e.points, o = 0, a, t = 0; t < n.numberOfItems; t++) {
    var c = n.getItem(t);
    t > 0 && (o += Fo(a, c)), a = c;
  }
  return o;
}
function Xi(e) {
  var n = e.points;
  return Bc(e) + Fo(n.getItem(n.numberOfItems - 1), n.getItem(0));
}
function Uc(e) {
  if (e.getTotalLength)
    return e.getTotalLength();
  switch (e.tagName.toLowerCase()) {
    case "circle":
      return Hi(e);
    case "rect":
      return Wi(e);
    case "line":
      return Yi(e);
    case "polyline":
      return Bc(e);
    case "polygon":
      return Xi(e);
  }
}
function qi(e) {
  var n = Uc(e);
  return e.setAttribute("stroke-dasharray", n), n;
}
function Qi(e) {
  for (var n = e.parentNode; R.svg(n) && R.svg(n.parentNode); )
    n = n.parentNode;
  return n;
}
function Vc(e, n) {
  var o = n || {}, a = o.el || Qi(e), t = a.getBoundingClientRect(), c = We(a, "viewBox"), d = t.width, i = t.height, r = o.viewBox || (c ? c.split(" ") : [0, 0, d, i]);
  return {
    el: a,
    viewBox: r,
    x: r[0] / 1,
    y: r[1] / 1,
    w: d,
    h: i,
    vW: r[2],
    vH: r[3]
  };
}
function Gi(e, n) {
  var o = R.str(e) ? jc(e)[0] : e, a = n || 100;
  return function(t) {
    return {
      property: t,
      el: o,
      svg: Vc(o),
      totalLength: Uc(o) * (a / 100)
    };
  };
}
function Zi(e, n, o) {
  function a(m) {
    m === void 0 && (m = 0);
    var g = n + m >= 1 ? n + m : 0;
    return e.el.getPointAtLength(g);
  }
  var t = Vc(e.el, e.svg), c = a(), d = a(-1), i = a(1), r = o ? 1 : t.w / t.vW, l = o ? 1 : t.h / t.vH;
  switch (e.property) {
    case "x":
      return (c.x - t.x) * r;
    case "y":
      return (c.y - t.y) * l;
    case "angle":
      return Math.atan2(i.y - d.y, i.x - d.x) * 180 / Math.PI;
  }
}
function xt(e, n) {
  var o = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g, a = Rc(R.pth(e) ? e.totalLength : e, n) + "";
  return {
    original: a,
    numbers: a.match(o) ? a.match(o).map(Number) : [0],
    strings: R.str(e) || n ? a.split(o) : []
  };
}
function Ko(e) {
  var n = e ? La(R.arr(e) ? e.map(St) : St(e)) : [];
  return ja(n, function(o, a, t) {
    return t.indexOf(o) === a;
  });
}
function Fc(e) {
  var n = Ko(e);
  return n.map(function(o, a) {
    return { target: o, id: a, total: n.length, transforms: { list: zc(o) } };
  });
}
function Ji(e, n) {
  var o = zo(n);
  if (/^spring/.test(o.easing) && (o.duration = $c(o.easing)), R.arr(e)) {
    var a = e.length, t = a === 2 && !R.obj(e[0]);
    t ? e = { value: e } : R.fnc(n.duration) || (o.duration = n.duration / a);
  }
  var c = R.arr(e) ? e : [e];
  return c.map(function(d, i) {
    var r = R.obj(d) && !R.pth(d) ? d : { value: d };
    return R.und(r.delay) && (r.delay = i ? 0 : n.delay), R.und(r.endDelay) && (r.endDelay = i === c.length - 1 ? n.endDelay : 0), r;
  }).map(function(d) {
    return za(d, o);
  });
}
function es(e) {
  for (var n = ja(La(e.map(function(c) {
    return Object.keys(c);
  })), function(c) {
    return R.key(c);
  }).reduce(function(c, d) {
    return c.indexOf(d) < 0 && c.push(d), c;
  }, []), o = {}, a = function(c) {
    var d = n[c];
    o[d] = e.map(function(i) {
      var r = {};
      for (var l in i)
        R.key(l) ? l == d && (r.value = i[l]) : r[l] = i[l];
      return r;
    });
  }, t = 0; t < n.length; t++) a(t);
  return o;
}
function ns(e, n) {
  var o = [], a = n.keyframes;
  a && (n = za(es(a), n));
  for (var t in n)
    R.key(t) && o.push({
      name: t,
      tweens: Ji(n[t], e)
    });
  return o;
}
function as(e, n) {
  var o = {};
  for (var a in e) {
    var t = go(e[a], n);
    R.arr(t) && (t = t.map(function(c) {
      return go(c, n);
    }), t.length === 1 && (t = t[0])), o[a] = t;
  }
  return o.duration = parseFloat(o.duration), o.delay = parseFloat(o.delay), o;
}
function os(e, n) {
  var o;
  return e.tweens.map(function(a) {
    var t = as(a, n), c = t.value, d = R.arr(c) ? c[1] : c, i = an(d), r = Uo(n.target, e.name, i, n), l = o ? o.to.original : r, m = R.arr(c) ? c[0] : l, g = an(m) || an(r), y = i || g;
    return R.und(d) && (d = l), t.from = xt(m, y), t.to = xt(Vo(d, m), y), t.start = o ? o.end : 0, t.end = t.start + t.delay + t.duration + t.endDelay, t.easing = jo(t.easing, t.duration), t.isPath = R.pth(c), t.isPathTargetInsideSVG = t.isPath && R.svg(n.target), t.isColor = R.col(t.from.original), t.isColor && (t.round = 1), o = t, t;
  });
}
var Kc = {
  css: function(e, n, o) {
    return e.style[n] = o;
  },
  attribute: function(e, n, o) {
    return e.setAttribute(n, o);
  },
  object: function(e, n, o) {
    return e[n] = o;
  },
  transform: function(e, n, o, a, t) {
    if (a.list.set(n, o), n === a.last || t) {
      var c = "";
      a.list.forEach(function(d, i) {
        c += i + "(" + d + ") ";
      }), e.style.transform = c;
    }
  }
};
function Hc(e, n) {
  var o = Fc(e);
  o.forEach(function(a) {
    for (var t in n) {
      var c = go(n[t], a), d = a.target, i = an(c), r = Uo(d, t, i, a), l = i || an(r), m = Vo(Rc(c, l), r), g = Bo(d, t);
      Kc[g](d, t, m, a.transforms, !0);
    }
  });
}
function ts(e, n) {
  var o = Bo(e.target, n.name);
  if (o) {
    var a = os(n, e), t = a[a.length - 1];
    return {
      type: o,
      property: n.name,
      animatable: e,
      tweens: a,
      duration: t.end,
      delay: a[0].delay,
      endDelay: t.endDelay
    };
  }
}
function cs(e, n) {
  return ja(La(e.map(function(o) {
    return n.map(function(a) {
      return ts(o, a);
    });
  })), function(o) {
    return !R.und(o);
  });
}
function Wc(e, n) {
  var o = e.length, a = function(c) {
    return c.timelineOffset ? c.timelineOffset : 0;
  }, t = {};
  return t.duration = o ? Math.max.apply(Math, e.map(function(c) {
    return a(c) + c.duration;
  })) : n.duration, t.delay = o ? Math.min.apply(Math, e.map(function(c) {
    return a(c) + c.delay;
  })) : n.delay, t.endDelay = o ? t.duration - Math.max.apply(Math, e.map(function(c) {
    return a(c) + c.duration - c.endDelay;
  })) : n.endDelay, t;
}
var Et = 0;
function ds(e) {
  var n = ho(Ac, e), o = ho(Mo, e), a = ns(o, e), t = Fc(e.targets), c = cs(t, a), d = Wc(c, o), i = Et;
  return Et++, za(n, {
    id: i,
    children: [],
    animatables: t,
    animations: c,
    duration: d.duration,
    delay: d.delay,
    endDelay: d.endDelay
  });
}
var Le = [], Yc = function() {
  var e;
  function n() {
    !e && (!Ot() || !ce.suspendWhenDocumentHidden) && Le.length > 0 && (e = requestAnimationFrame(o));
  }
  function o(t) {
    for (var c = Le.length, d = 0; d < c; ) {
      var i = Le[d];
      i.paused ? (Le.splice(d, 1), c--) : (i.tick(t), d++);
    }
    e = d > 0 ? requestAnimationFrame(o) : void 0;
  }
  function a() {
    ce.suspendWhenDocumentHidden && (Ot() ? e = cancelAnimationFrame(e) : (Le.forEach(
      function(t) {
        return t._onDocumentVisibility();
      }
    ), Yc()));
  }
  return typeof document < "u" && document.addEventListener("visibilitychange", a), n;
}();
function Ot() {
  return !!document && document.hidden;
}
function ce(e) {
  e === void 0 && (e = {});
  var n = 0, o = 0, a = 0, t, c = 0, d = null;
  function i(s) {
    var v = window.Promise && new Promise(function(w) {
      return d = w;
    });
    return s.finished = v, v;
  }
  var r = ds(e);
  i(r);
  function l() {
    var s = r.direction;
    s !== "alternate" && (r.direction = s !== "normal" ? "normal" : "reverse"), r.reversed = !r.reversed, t.forEach(function(v) {
      return v.reversed = r.reversed;
    });
  }
  function m(s) {
    return r.reversed ? r.duration - s : s;
  }
  function g() {
    n = 0, o = m(r.currentTime) * (1 / ce.speed);
  }
  function y(s, v) {
    v && v.seek(s - v.timelineOffset);
  }
  function C(s) {
    if (r.reversePlayback)
      for (var w = c; w--; )
        y(s, t[w]);
    else
      for (var v = 0; v < c; v++)
        y(s, t[v]);
  }
  function f(s) {
    for (var v = 0, w = r.animations, E = w.length; v < E; ) {
      var k = w[v], P = k.animatable, O = k.tweens, x = O.length - 1, _ = O[x];
      x && (_ = ja(O, function(xn) {
        return s < xn.end;
      })[0] || _);
      for (var D = He(s - _.start - _.delay, 0, _.duration) / _.duration, A = isNaN(D) ? 1 : _.easing(D), M = _.to.strings, F = _.round, K = [], T = _.to.numbers.length, L = void 0, X = 0; X < T; X++) {
        var ae = void 0, Ge = _.to.numbers[X], Me = _.from.numbers[X] || 0;
        _.isPath ? ae = Zi(_.value, A * Ge, _.isPathTargetInsideSVG) : ae = Me + A * (Ge - Me), F && (_.isColor && X > 2 || (ae = Math.round(ae * F) / F)), K.push(ae);
      }
      var Be = M.length;
      if (!Be)
        L = K[0];
      else {
        L = M[0];
        for (var Ue = 0; Ue < Be; Ue++) {
          M[Ue];
          var yn = M[Ue + 1], dn = K[Ue];
          isNaN(dn) || (yn ? L += dn + yn : L += dn + " ");
        }
      }
      Kc[k.type](P.target, k.property, L, P.transforms), k.currentValue = L, v++;
    }
  }
  function p(s) {
    r[s] && !r.passThrough && r[s](r);
  }
  function b() {
    r.remaining && r.remaining !== !0 && r.remaining--;
  }
  function h(s) {
    var v = r.duration, w = r.delay, E = v - r.endDelay, k = m(s);
    r.progress = He(k / v * 100, 0, 100), r.reversePlayback = k < r.currentTime, t && C(k), !r.began && r.currentTime > 0 && (r.began = !0, p("begin")), !r.loopBegan && r.currentTime > 0 && (r.loopBegan = !0, p("loopBegin")), k <= w && r.currentTime !== 0 && f(0), (k >= E && r.currentTime !== v || !v) && f(v), k > w && k < E ? (r.changeBegan || (r.changeBegan = !0, r.changeCompleted = !1, p("changeBegin")), p("change"), f(k)) : r.changeBegan && (r.changeCompleted = !0, r.changeBegan = !1, p("changeComplete")), r.currentTime = He(k, 0, v), r.began && p("update"), s >= v && (o = 0, b(), r.remaining ? (n = a, p("loopComplete"), r.loopBegan = !1, r.direction === "alternate" && l()) : (r.paused = !0, r.completed || (r.completed = !0, p("loopComplete"), p("complete"), !r.passThrough && "Promise" in window && (d(), i(r)))));
  }
  return r.reset = function() {
    var s = r.direction;
    r.passThrough = !1, r.currentTime = 0, r.progress = 0, r.paused = !0, r.began = !1, r.loopBegan = !1, r.changeBegan = !1, r.completed = !1, r.changeCompleted = !1, r.reversePlayback = !1, r.reversed = s === "reverse", r.remaining = r.loop, t = r.children, c = t.length;
    for (var v = c; v--; )
      r.children[v].reset();
    (r.reversed && r.loop !== !0 || s === "alternate" && r.loop === 1) && r.remaining++, f(r.reversed ? r.duration : 0);
  }, r._onDocumentVisibility = g, r.set = function(s, v) {
    return Hc(s, v), r;
  }, r.tick = function(s) {
    a = s, n || (n = a), h((a + (o - n)) * ce.speed);
  }, r.seek = function(s) {
    h(m(s));
  }, r.pause = function() {
    r.paused = !0, g();
  }, r.play = function() {
    r.paused && (r.completed && r.reset(), r.paused = !1, Le.push(r), g(), Yc());
  }, r.reverse = function() {
    l(), r.completed = !r.reversed, g();
  }, r.restart = function() {
    r.reset(), r.play();
  }, r.remove = function(s) {
    var v = Ko(s);
    Xc(v, r);
  }, r.reset(), r.autoplay && r.play(), r;
}
function Pt(e, n) {
  for (var o = n.length; o--; )
    Lo(e, n[o].animatable.target) && n.splice(o, 1);
}
function Xc(e, n) {
  var o = n.animations, a = n.children;
  Pt(e, o);
  for (var t = a.length; t--; ) {
    var c = a[t], d = c.animations;
    Pt(e, d), !d.length && !c.children.length && a.splice(t, 1);
  }
  !o.length && !a.length && n.pause();
}
function ls(e) {
  for (var n = Ko(e), o = Le.length; o--; ) {
    var a = Le[o];
    Xc(n, a);
  }
}
function rs(e, n) {
  n === void 0 && (n = {});
  var o = n.direction || "normal", a = n.easing ? jo(n.easing) : null, t = n.grid, c = n.axis, d = n.from || 0, i = d === "first", r = d === "center", l = d === "last", m = R.arr(e), g = parseFloat(m ? e[0] : e), y = m ? parseFloat(e[1]) : 0, C = an(m ? e[1] : e) || 0, f = n.start || 0 + (m ? g : 0), p = [], b = 0;
  return function(h, s, v) {
    if (i && (d = 0), r && (d = (v - 1) / 2), l && (d = v - 1), !p.length) {
      for (var w = 0; w < v; w++) {
        if (!t)
          p.push(Math.abs(d - w));
        else {
          var E = r ? (t[0] - 1) / 2 : d % t[0], k = r ? (t[1] - 1) / 2 : Math.floor(d / t[0]), P = w % t[0], O = Math.floor(w / t[0]), x = E - P, _ = k - O, D = Math.sqrt(x * x + _ * _);
          c === "x" && (D = -x), c === "y" && (D = -_), p.push(D);
        }
        b = Math.max.apply(Math, p);
      }
      a && (p = p.map(function(M) {
        return a(M / b) * b;
      })), o === "reverse" && (p = p.map(function(M) {
        return c ? M < 0 ? M * -1 : -M : Math.abs(b - M);
      }));
    }
    var A = m ? (y - g) / b : g;
    return f + A * (Math.round(p[s] * 100) / 100) + C;
  };
}
function is(e) {
  e === void 0 && (e = {});
  var n = ce(e);
  return n.duration = 0, n.add = function(o, a) {
    var t = Le.indexOf(n), c = n.children;
    t > -1 && Le.splice(t, 1);
    function d(y) {
      y.passThrough = !0;
    }
    for (var i = 0; i < c.length; i++)
      d(c[i]);
    var r = za(o, ho(Mo, e));
    r.targets = r.targets || e.targets;
    var l = n.duration;
    r.autoplay = !1, r.direction = n.direction, r.timelineOffset = R.und(a) ? l : Vo(a, l), d(n), n.seek(r.timelineOffset);
    var m = ce(r);
    d(m), c.push(m);
    var g = Wc(c, e);
    return n.delay = g.delay, n.endDelay = g.endDelay, n.duration = g.duration, n.seek(0), n.reset(), n.autoplay && n.play(), n;
  }, n;
}
ce.version = "3.2.1";
ce.speed = 1;
ce.suspendWhenDocumentHidden = !0;
ce.running = Le;
ce.remove = ls;
ce.get = Uo;
ce.set = Hc;
ce.convertPx = Ro;
ce.path = Gi;
ce.setDashoffset = qi;
ce.stagger = rs;
ce.timeline = is;
ce.easing = jo;
ce.penner = Mc;
ce.random = function(e, n) {
  return Math.floor(Math.random() * (n - e + 1)) + e;
};
const ss = (e, n, o, a) => {
  const {
    searchProvider: t,
    props: c
  } = a, d = z(null);
  let i = {};
  !e.type || e.type === "input" ? i = Sr(e, n, a) : e.type === "number" ? i = xr(e, n, a) : e.type === "select" ? i = Er(e, n, a) : e.type === "textarea" ? i = Or(e, n, a) : e.type === "date" ? i = Pr(e, n, a) : e.type === "cascade" ? i = _r(e, n, a) : e.type === "switch" && (i = Dr(e, n, a));
  const {
    conditions: r,
    Component: l,
    displayValue: m,
    onComponentOpen: g
  } = i, y = (s) => {
    n[e.key].condition = r[s].value;
  }, C = () => {
    o.showPanel && (o.showPanel = !1);
  }, f = () => {
    o.showPanel = !0, hn(() => {
      g && g();
    });
  }, p = {
    onEnter: (s, v) => {
      ce({
        targets: ".newbie-search-input-container",
        padding: "11px",
        translateX: "0",
        translateY: "0",
        duration: 100,
        easing: "linear"
      }), ce({
        targets: ".newbie-search-condition",
        top: "-44px",
        opacity: 1,
        duration: 100,
        easing: "linear"
      }), v();
    }
  }, b = J(() => {
    var s;
    return ((s = ve(r, {
      value: n[e.key].condition
    })) == null ? void 0 : s.label) || I("search.equal");
  }), h = J(() => {
    var s;
    return ((s = ve(r, {
      value: n[e.key].condition
    })) == null ? void 0 : s.label) || I("search.equal");
  });
  return u(Di, {
    onTrigger: C
  }, {
    default: () => [u("div", {
      class: `newbie-search-item ${t.maskClass || ""} ${o.hidden ? "hidden" : ""}`
    }, [u("div", {
      class: "newbie-search-mask",
      onClick: f
    }, [u("div", {
      class: "newbie-search-mask-title"
    }, [e.title]), u("div", {
      class: "newbie-search-mask-content"
    }, [n[e.key].condition !== "equal" ? u("div", {
      class: "newbie-search-mask-condition"
    }, [h.value]) : null, u("div", {
      class: "newbie-search-mask-value"
    }, [m == null ? void 0 : m.value])])]), u(td, {
      css: !1,
      onEnter: p.onEnter
    }, {
      default: () => [o.showPanel ? u("div", {
        class: "newbie-search-popup-panel",
        ref: d
      }, [u("div", {
        class: "newbie-search-condition"
      }, [u("span", {
        class: "newbie-search-condition-title"
      }, [xe("搜索 "), u(ud, {
        code: !0
      }, {
        default: () => e.title
      })]), c.disableConditions || e.disableConditions ? null : u(Co, {
        trigger: ["click"],
        getPopupContainer: () => d.value
      }, {
        default: () => u("a", {
          class: "newbie-search-condition-dropdown-link",
          onClick: Fe(() => {
          }, ["prevent"])
        }, [b.value, xe(" "), u(_o, null, null)]),
        overlay: () => u(So, null, {
          default: () => r.map((s, v) => u(Xn, {
            key: s.value
          }, {
            default: () => u("a", {
              onClick: () => y(v)
            }, [s.label])
          }))
        })
      })]), u("div", {
        class: "newbie-search-input-container"
      }, [l])]) : null]
    })])]
  });
};
function us(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Re(e);
}
const qc = /* @__PURE__ */ Pe({
  name: "NewbieSearch",
  props: {
    /**
     * @typedef {Object} SearchItemConfig 搜索项
     * @property {string} key 搜索项的 key
     * @property {string} title 搜索项的标题
     * @property {string} type 搜索项的类型
     * @property {number} sortOrder 排序,数字越大越靠前,默认为0
     * @property {boolean|Object} [expandable] 搜索项是否展开
     * @property {Array|Function} [options] 搜索项的选项
     * @property {Object} [inputProps] 搜索项的输入框属性
     * @property {boolean} [disableConditions] 是否禁用搜索条件
     * @property {Array} [conditions] 搜索项的条件,可选项为不同类型的内置条件
     * @property {*} [defaultValue] 默认搜索值
     * @property {*} [defaultCondition] 默认搜索条件
     * @property {Function} [collectItem] 收集搜索项的内容[内部使用]
     * */
    /**
     * 搜索项的配置, 详见 [SearchItemConfig](#searchitemconfig-配置)
     */
    filterableColumns: {
      type: [Array, Function],
      default: () => []
    },
    /**
     * 可排序的搜索项
     */
    sortableColumns: {
      type: [Array, Function],
      default: () => []
    },
    /**
     * 是否禁用搜索条件
     */
    disableConditions: {
      type: Boolean,
      default: !1
    },
    /**
     * 是否在搜索条件变化时自动搜索
     */
    autoQuery: {
      type: Boolean,
      default: !1
    },
    /**
     * 搜索项的间距
     */
    gutter: {
      type: [String, Number],
      default: 16
    },
    /**
     * 持久化,传入 localStorage 的 key,如果为 true, 将会以 URL Hash 为 key
     */
    persistence: {
      type: [Boolean, String],
      default: !1
    }
  },
  emits: [
    /**
     * 点击搜索
     * @property queryForm {Object} 搜索栏的值
     */
    "search"
  ],
  setup(e, {
    expose: n,
    emit: o
  }) {
    const a = pn(oc, () => {
    }), t = qe({
      queryForm: {},
      // 搜索表单
      sortForm: {
        selectedKeys: [],
        targetKeys: []
      },
      // 排序表单
      columnKey: {},
      // 自定义列
      searchKey: {},
      // 自定义搜索框
      searchLabels: [],
      // 搜索项展示
      fieldColumns: [],
      //表单搜索项
      expandColumns: [],
      //展开搜索项
      sortColumns: [],
      //可排序搜索项
      openSortable: !1,
      //是否打开排序设置
      isFormExpanded: !1,
      //是否已经展开
      availableSearchItems: 0
      //第一行可展数量
    }), c = z(), {
      width: d
    } = Cr(), i = ["number", "date"], r = ["select", "cascade"], l = {}, m = (O) => e.persistence ? (O = O || "", Sa(e.persistence) ? `newbieSearch_${O}` + Ca(location.href) : `newbieSearch_${O}` + Ca(location.pathname + "_" + e.persistence)) : null, g = () => {
      const O = {}, x = [], _ = [], D = [], A = [], M = e.persistence ? rn(m()).get({}) : {}, F = e.persistence ? rn(m("sort")).get({}) : {};
      e.filterableColumns.forEach((K) => {
        const T = Ce(K);
        ne(T.sortOrder) && (T.sortOrder = 0), l[T.key] || (l[T.key] = qe({
          showPanel: !1
        })), T.type = T.type || "input";
        let L = "", X = "equal";
        if (T.expandable ? L = [] : i.includes(T.type) ? L = [null, null] : r.includes(T.type) && (L = []), ne(M[T.key]))
          ne(T.defaultValue) || (j(T.defaultValue) ? L = T.defaultValue() : L = T.defaultValue);
        else {
          const ae = M[T.key].value;
          (i.includes(T.type) || r.includes(T.type)) && !ye(ae) ? L = [ae] : L = ae;
        }
        if (ne(M[T.key]) ? T.conditions && T.conditions.length === 1 ? X = T.conditions[0] : T.defaultCondition && (j(T.defaultCondition) ? X = T.defaultCondition() : X = T.defaultCondition) : X = M[T.key].condition, T.expandable) {
          if (!T.options) {
            console.error("expandable 为 true 时,必须提供 options 属性");
            return;
          }
          T.type = "select", x.push(T);
        } else
          ne(l[T.key].hidden) && (l[T.key].hidden = !1), _.push(T);
        T.type === "date" && (ye(L) ? L = L.map((ae) => se(ae) ? pe(new Date(ae)) : ae) : se(L) && (L = pe(new Date(L)))), T.type === "switch" && (L = Sa(L) ? L ? "checked" : "unchecked" : void 0), O[T.key] = {
          value: L,
          type: T.type,
          condition: X
        };
      }), e.sortableColumns.forEach((K) => {
        const T = Ce(K);
        ne(F[K.key]) || (A.push(K.key), T.direction = F[K.key]), (K.direction === "asc" || K.direction === "desc") && A.push(K.key), D.push(T);
      }), t.queryForm = O, t.sortColumns = Ua(D, ["sortOrder"], ["desc"]), t.fieldColumns = Ua(_, ["sortOrder"], ["desc"]), t.expandColumns = Ua(x, ["sortOrder"], ["desc"]), t.sortForm.targetKeys = A;
    };
    oe(() => [e.filterableColumns, e.sortableColumns], () => {
      g();
    }, {
      immediate: !0
    });
    const y = J(() => t.fieldColumns.length > t.availableSearchItems), C = () => {
      t.openSortable = !1, o("search", {
        newbieQuery: s(),
        newbieSort: h()
      });
    }, f = () => {
      rn(m()).remove(), rn(m("sort")).remove(), g();
    }, p = () => {
      b({
        show: !t.isFormExpanded
      }), t.isFormExpanded = !t.isFormExpanded;
    }, b = ({
      show: O,
      stand: x
    }) => {
      y.value && !x && t.fieldColumns.forEach((_, D) => {
        l[_.key].hidden = O ? !1 : D >= t.availableSearchItems;
      });
    };
    tn(() => {
      e.persistence && o("search", {
        persistence: !0,
        newbieQuery: s(),
        newbieSort: h()
      }), oe(() => d.value, () => {
        const O = Math.floor(c.value.scrollWidth / (200 + e.gutter));
        t.availableSearchItems !== O && (t.availableSearchItems = O, b({}));
      }, {
        immediate: !0
      });
    });
    const h = () => {
      const O = {};
      if (t.sortForm.targetKeys.forEach((x) => {
        const _ = ve(t.sortColumns, {
          key: x
        });
        O[x] = _.direction, t.searchLabels.push(u(Oe, {
          color: "green"
        }, {
          default: () => [u("span", {
            style: {
              marginRight: "2px"
            }
          }, [_.title]), _.direction === "asc" ? u(qt, null, null) : u(Qt, null, null)]
        }));
      }), e.persistence) {
        const x = m("sort");
        rn(x).set(O);
      }
      return O;
    }, s = () => {
      const O = {}, x = {};
      if (t.searchLabels = [], Ad(t.fieldColumns, t.expandColumns).forEach((_) => {
        var K;
        let {
          value: D,
          searchLabel: A
        } = _.collectItem ? _.collectItem() : {};
        const {
          condition: M,
          type: F
        } = t.queryForm[_.key];
        if (Array.isArray(D) && D.length > 0 || !Array.isArray(D) && D !== null && D !== void 0 && D !== "" || M === "null" || M === "notNull") {
          e.persistence && (x[_.key] = {
            condition: M,
            type: F,
            value: D
          });
          const T = (K = a == null ? void 0 : a.valueFormatter) == null ? void 0 : K[_.type];
          T && j(T) && (D = ye(D) ? D.map((L) => T(L)) : T(D)), O[_.key] = {
            condition: M,
            type: F,
            value: D
          }, t.searchLabels.push(A ? u(Oe, {
            color: "blue"
          }, us(A) ? A : {
            default: () => [A]
          }) : null);
        }
      }), e.persistence) {
        const _ = m();
        rn(_).set(x);
      }
      return O;
    };
    n({
      getQueryForm: s,
      setQueryForm: (O) => {
        Object.keys(O).forEach((x) => {
          t.queryForm[x].value = O[x];
        });
      },
      getSortForm: h,
      getSearch: () => {
        t.searchLabels = [];
        const O = {}, x = s(), _ = h();
        return Object.keys(x).length && (O.newbieQuery = x), Object.keys(_).length && (O.newbieSort = _), O;
      }
    });
    const E = () => t.fieldColumns.map((O) => ss(O, t.queryForm, l[O.key], {
      props: e,
      searchProvider: a
    })), k = () => t.expandColumns.map((O) => Ir(O, t.queryForm)), P = () => t.sortColumns.length ? u(en, {
      title: I("search.sort-setting"),
      open: t.openSortable,
      "onUpdate:open": (O) => t.openSortable = O,
      width: "800px",
      okText: I("common.search"),
      cancelText: I("common.cancel"),
      onOk: () => C()
    }, {
      default: () => Ei(t.sortColumns, t.sortForm)
    }) : null;
    return () => {
      var O, x;
      return u("div", {
        class: "newbie-search"
      }, [u("div", {
        class: "newbie-search-query"
      }, [u("div", {
        class: "newbie-search-form"
      }, [u("div", {
        class: "newbie-search-form-wrapper",
        ref: c
      }, [u(An, {
        size: [e.gutter, 10],
        wrap: !0,
        style: {
          marginBottom: 0
        }
      }, {
        default: () => E()
      })])]), u(An, {
        class: "newbie-search-operation"
      }, {
        default: () => [y.value ? u(Ye, {
          title: I("search.toggle-more")
        }, {
          default: () => u(re, {
            type: "link",
            icon: t.isFormExpanded ? u(zd, null, null) : u(Rd, null, null),
            onClick: p
          }, {
            default: () => t.isFormExpanded ? I("search.collapse") : I("common.more")
          })
        }) : null, u(Ye, {
          title: I("search.clear-all-search-items")
        }, {
          default: () => u(re, {
            type: "dashed",
            icon: u(Bd, null, null),
            onClick: f
          }, {
            default: () => e.sortableColumns.length ? "" : I("common.clear")
          })
        }), e.sortableColumns.length ? u(Ye, {
          title: I("search.sort-setting")
        }, {
          default: () => u(re, {
            type: t.sortForm.targetKeys.length ? "primary" : "default",
            icon: u(Ud, null, null),
            onClick: () => t.openSortable = !0
          }, null)
        }) : null, u(re, {
          type: "primary",
          icon: u(Vd, null, null),
          onClick: C
        }, {
          default: () => I("common.search")
        })]
      })]), (O = t.expandColumns) != null && O.length ? u("div", {
        class: "newbie-search-expand"
      }, [k()]) : null, (x = t.searchLabels) != null && x.length ? u("div", {
        class: "newbie-search-label"
      }, [u("span", {
        class: "newbie-search-label-title"
      }, [I("search.search-items"), xe(":")]), u(An, {
        class: "newbie-search-label-content",
        wrap: !0,
        style: {
          marginBottom: 0
        }
      }, {
        default: () => t.searchLabels
      })]) : null, P()]);
    };
  }
});
function ms(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Re(e);
}
const fs = /* @__PURE__ */ Pe({
  name: "NewbieTable",
  props: {
    /**
     * 表格标题
     */
    title: {
      type: String,
      default: ""
    },
    /**
     * 是否使用表单搜索
     */
    filterable: {
      type: Boolean,
      default: !0
    },
    /**
     *  原生表格属性
     */
    tableProps: {
      type: Object,
      default: () => ({})
    },
    /**
     * 原生表格事件
     */
    tableEvents: {
      type: Object,
      default: () => ({})
    },
    /**
     * 原生 slot
     */
    tableSlots: {
      type: Object,
      default: () => ({})
    },
    /**
     * 是否使用分页,为 Object 时时使用自定义分页
     */
    pagination: {
      type: [Boolean, Object],
      default: !0
    },
    /**
     * 原生翻页事件
     */
    pageEvents: {
      type: Object,
      default: () => ({})
    },
    /**
     * 是否在搜索条件变化时自动搜索
     */
    autoQuery: {
      type: Boolean,
      default: !1
    },
    /**
     * 表格数据请求 URL
     */
    url: {
      type: String,
      default: ""
    },
    /**
     * v1.18
     * 编辑后保存的 URL
     */
    editable: {
      type: Boolean,
      default: !1
    },
    /**
     * v1.18
     * 编辑后保存的 URL
     */
    submitUrl: {
      type: String,
      default: ""
    },
    /**
     * v1.18
     * 单元格编辑提交的前置方法, 返回一个 Promise
     */
    beforeCellSubmit: {
      type: Function,
      default: null
    },
    /**
     * 表格请求方式,默认为 GET
     *
     * @values get, post
     */
    method: {
      type: String,
      default: "get"
    },
    /**
     * 请求数据时额外提交的参数
     */
    extraData: {
      type: Object,
      default: () => ({})
    },
    /**
     * 请求后 Res 的处理方法, 如有 url, 则该方法必须传
     */
    afterFetched: {
      type: Function,
      default: null
    },
    /**
     * @typedef {Object} TableColumnConfig
     * @property {string} title - 列标题
     * @property {string} dataIndex - 列数据在数据项中对应的 key,支持 a.b.c 的嵌套写法
     * @property {string} key - Vue 需要的 key,如果已经设置了唯一的 dataIndex,可以忽略这个属性
     * @property {string} [width] - 列宽度
     * @property {string} [minWidth] - 最小宽度,支持占满其它空位 与 onClick 冲突 v1.18
     * @property {string} [align] - 对齐方式
     * @property {string|Function} [tooltip] - 提示 v1.18
     * @property {Function} [onClick] - 生成链接可点击,有 minWidth 冲突失效  v1.18
     * @property {boolean|TableColumnEditable} [editable] - 是否可编辑,如果是对象,则为编辑配置,为 true 时 `editable.type = 'input'`
     * @property {boolean} [ellipsis] - 是否自动缩略
     * @property {boolean} [fixed] - 列是否固定,可选 true(等效于 left) 'left' 'right'
     * @property {boolean|SearchItemConfig} [filterable] - 是否可过滤,如果是对象,则为过滤配置,为 true 时 `filterable.type = 'input'`
     * @property {boolean} [isOnlyForQuery] - 是否只用于搜索
     */
    /**
     * @typedef {Object} TableColumnEditable
     * @property {string} [type] - 编辑类型, 支持 input(默认), number, select, switch
     * @property {string} [key] - 字段 key, 默认与 dataIndex 一致
     * @property {array} [options] - 选项,当 type 为 select 时必填,如果 type 为 switch, options[0] 为 checked, options[1] 为 unchecked
     * @property {Function} [beforeCellSubmit] - 单元格编辑提交的前置方法, 返回一个 Promise
     * @property {*} [defaultValue] 默认编辑时的值
     * @property {Object} [defaultProps] - 编辑项配置
     * @property {Object} [defaultSlots] - 编辑项 Slot
     */
    /**
     * 表格列定义, [TableColumnConfig ](#tablecolunmconfig-配置)
     */
    columns: {
      type: [Array, Function],
      default: () => []
    },
    /**
     * 选择功能的配置
     */
    rowSelection: {
      type: [Boolean, Object],
      default: () => null
    },
    /**
     *  数据值需要指定 key 值,当启用 `rowSelection` 时一定要指定这个 key
     */
    rowKey: {
      type: [String, Function],
      default: "id"
    },
    /**
     * 表格数据
     */
    dataSource: {
      type: Array,
      default: () => []
    },
    /**
     * 表格数据, alias of `dataSource`
     */
    formData: {
      type: Array,
      default: () => []
    },
    /**
     * 额外的展开行
     */
    expandRender: {
      type: [String, Function],
      default: null
    },
    /**
     * 展开的行
     */
    expandedRowKeys: {
      type: Array,
      default: () => null
    },
    /**
     * 是否显示刷新按钮
     */
    showRefresh: {
      type: Boolean,
      default: !0
    },
    /**
     * 持久化,传入 localStorage 的 key,如果为 true, 将会以 URL Hash 为 key
     */
    persistence: {
      type: [Boolean, String],
      default: !1
    },
    /**
     * v1.18
     * 是否用 `Card` 包裹
     */
    cardWrapper: {
      type: Boolean,
      default: !0
    }
  },
  emits: [
    /**
     * 未传入 `url` 时的手动请求方法
     */
    "fetch",
    /**
     * 行点击 v1.18
     */
    "rowClick",
    /**
     * 单元格编辑 v1.18
     */
    "cellSubmit"
  ],
  setup(e, {
    emit: n,
    slots: o,
    expose: a
  }) {
    var Wo;
    const t = z(), c = z(), d = pn(ac, () => {
    }), i = (S) => e.persistence ? (S = S || "", Sa(e.persistence) ? `newbieTable_${S}` + Ca(location.href) : `newbieTable_${S}` + Ca(location.pathname + "_" + e.persistence)) : null;
    let r = e.persistence ? rn(i()).get({}) : {};
    const l = qe({
      customColumns: [],
      tableColumns: [],
      editingData: {},
      //编辑中的单元格
      editingSwitchData: {},
      //可编辑的 Switch 的值, 因为 Switch 的逻辑与其它类型不同,不能复用editingData
      filterableColumns: [],
      // 可过滤的列
      sortableColumns: [],
      // 可排序的列
      temporary: {},
      // 用于存放一些临时数据
      tableLoading: {
        loading: !1
      },
      // 翻页Loading
      customColumnVisible: !1,
      columnKeyModal: [],
      pagination: {
        // 翻页数据
        totalSize: 0,
        currentPage: r.currentPage || 1,
        pageSize: r.pageSize || ((Wo = e.pagination) == null ? void 0 : Wo.pageSize) || 10
      },
      id: "",
      tableSelection: [],
      // 给外部用
      tableKeySelection: [],
      // 内部用
      items: [],
      // 表格内容
      columnKey: {},
      // 自定义列
      fetchQueue: [],
      // 请示队列,以最后那个为准
      searchFormData: {}
      // 搜索表单数据
    }), m = () => {
      if (!e.persistence)
        return;
      const S = {
        ...l.pagination
      };
      rn(i()).set(S);
    }, g = () => {
      l.columnKeyModal = [], Object.keys(l.columnKey).forEach((S) => {
        l.columnKey[S] && l.columnKeyModal.push(S);
      }), l.customColumnVisible = !0;
    }, y = () => {
      l.columnKeyModal = [];
    }, C = () => {
      y(), Object.keys(l.columnKey).forEach((S) => {
        l.columnKeyModal.push(S);
      });
    }, f = (S, N) => {
      l.tableKeySelection = [].concat(S), l.tableSelection = [].concat(N);
    }, p = (S, N) => {
      N.width = S;
    }, b = () => {
      Object.keys(l.columnKey).forEach((S) => {
        l.columnKey[S] = l.columnKeyModal.indexOf(S) > -1;
      }), l.customColumnVisible = !1;
    }, h = () => {
      let S = {
        ...l.searchFormData,
        ...e.extraData
      };
      return e.pagination && (l.pagination.pageSize && (S[d.pageSizeKey] = l.pagination.pageSize), S[d.pageKey] = l.pagination.currentPage), S;
    }, s = (S) => {
      var N;
      t.value && ((N = t.value) == null || N.setQueryForm(S));
    }, v = async () => {
      let S = {}, N = h();
      const q = (/* @__PURE__ */ new Date()).getTime();
      l.fetchQueue.push(q);
      const B = e.method;
      B === "get" ? S = {
        params: N
      } : B === "post" && (S = {
        ...N
      });
      const Y = await gn(l.tableLoading)[B](e.url, S);
      jn(Y, () => {
        if (!l.fetchQueue.length)
          return;
        l.fetchQueue[l.fetchQueue.length - 1] === q && (l.fetchQueue = []), l.tableKeySelection = [], l.tableSelection = [];
        const Vn = (e.afterFetched || d.afterFetched)(Y);
        e.pagination && (l.pagination.totalSize = Vn.totalSize), l.items = Vn.items;
      });
    }, w = async (S) => {
      S === !0 && (l.pagination.currentPage = 1), e.url ? await v() : n("fetch"), m();
    }, E = (S) => {
      l.searchFormData = S, w(!S.persistence);
    }, k = (S) => S.key ? S.key : ye(S.dataIndex) ? S.dataIndex.join(".") : S.dataIndex, P = (S) => {
      const N = [];
      return S && S.length && S.forEach((q) => {
        const B = Ce(q), Y = k(B);
        if (Y && ne(l.columnKey[Y]) && (l.columnKey[Y] = !0), !B.children)
          (Y && l.columnKey[Y] || !Y) && N.push({
            ...B,
            resizable: !0
          });
        else {
          const ie = P([].concat(B.children));
          ie.length && (B.children = ie, (Y && l.columnKey[Y] || !Y) && N.push(B));
        }
      }), N;
    }, O = (S) => {
      let N = [];
      return S && S.length && S.forEach((q) => {
        const B = Ce(q);
        if (B.checkKey = k(B), !B.children)
          N.push(B);
        else {
          const Y = O(B.children);
          delete B.children, N.push(B), N = N.concat(Y);
        }
      }), N;
    }, x = J(() => {
      let S;
      return j(e.columns) ? S = e.columns() : e.columns.length ? S = e.columns : S = e.tableProps.columns, S.map((N) => (N.minWidth && (N.RC_TABLE_INTERNAL_COL_DEFINE = {
        style: {
          "min-width": `${N.minWidth}px`
        }
      }, N.width = N.minWidth), N.key = k(N), N));
    }), _ = () => {
      const S = x.value.filter((N) => !N.isOnlyForQuery);
      l.customColumns = O([].concat(S)), l.tableColumns = P([].concat(S));
    }, D = () => {
      l.filterableColumns = x.value.filter((S) => S.filterable || S.isOnlyForQuery).map((S) => ({
        title: S.title,
        key: S.dataIndex || S.key,
        options: S.options,
        ...S.filterable
      })), l.sortableColumns = x.value.filter((S) => S.sortable).map((S) => {
        let N = {
          title: S.title,
          key: S.dataIndex || S.key
        };
        return S.sortable === "asc" || S.sortable === "ASC" ? N.direction = "asc" : S.sortable === "desc" || S.sortable === "DESC" ? N.direction = "desc" : N = {
          ...N,
          ...S.sortable
        }, N;
      });
    };
    oe(() => [x, l.columnKey], (S, N) => {
      _(), (!N || !Ln(S[0].value.map((q) => k(q)).sort(), N[0].value.map((q) => k(q)).sort())) && D();
    }, {
      immediate: !0,
      deep: !0
    }), oe(() => l.pagination, (S) => {
      var N;
      S && ((N = c.value) == null || N.classList.add("pagination-adapt"));
    }, {
      deep: !0
    }), oe(() => e.formData, (S, N) => {
      Ln(S, N) || (l.items = S);
    });
    const A = () => {
      var S;
      e.url ? (l.searchFormData = (S = t.value) == null ? void 0 : S.getSearch(), hn(() => v())) : (e.formData.length && (l.items = e.formData), e.dataSource.length && (l.items = e.dataSource), n("fetch"));
    };
    tn(() => {
      e.persistence || A();
    }), a({
      getData: () => [].concat(l.items),
      setData: (S) => {
        l.items = S;
      },
      setPagination: (S, N, q) => {
        ne(S) || (l.pagination.totalSize = S), ne(N) || (l.pagination.currentPage = N), ne(q) || (l.pagination.pageSize = q);
      },
      getPagination: () => l.pagination,
      getSelection: () => [].concat(l.tableSelection),
      getQueryData: h,
      setQueryData: s,
      doFetch: w,
      setTableLoading: (S) => l.tableLoading.loading = S
    });
    const ae = () => o.title ? u("div", {
      class: "newbie-table-title-wrapper"
    }, [o.title()]) : e.title ? u("div", {
      class: "newbie-table-title-wrapper"
    }, [e.title]) : null, Ge = () => o.prepend ? u("div", {
      class: "newbie-table-prepend-wrapper"
    }, [o.prepend()]) : null, Me = () => e.filterable ? [u(qc, {
      ref: t,
      persistence: e.persistence,
      filterableColumns: l.filterableColumns,
      sortableColumns: l.sortableColumns,
      onSearch: E
    }, null), u(Cn, null, null)] : null, Be = () => u("div", {
      class: "newbie-table-functional-wrapper"
    }, [u("div", {
      class: "newbie-table-functional"
    }, [o.functional ? o.functional() : null]), u("div", {
      class: "newbie-table-functional-default"
    }, [e.filterable ? u(re, {
      type: "link",
      style: {
        marginRight: "5px"
      },
      onClick: g
    }, {
      default: () => I("table.custom")
    }) : null, e.showRefresh ? u(re, {
      class: "newbie-table-refresh",
      icon: u(Fd, null, null),
      onClick: () => w(!1)
    }, null) : null])]), Ue = () => ({
      bordered: !0,
      size: "middle",
      scroll: {
        y: 570,
        x: 1e3,
        scrollToFirstRowOnChange: !0
      },
      rowClassName: (S, N) => N % 2 === 1 ? "newbie-table-striped" : null,
      expandedRowRender: e.expandRender,
      expandedRowKeys: e.expandedRowKeys,
      rowKey: e.rowKey,
      customRow: (S, N) => ({
        onClick: (q) => {
          l.editingData[S[e.rowKey]] || n("rowClick", {
            record: S,
            index: N,
            event: q
          });
        }
      }),
      ...e.tableProps
    }), yn = () => {
      let S = e.pagination ? Ke(e.pagination) ? Ce(e.pagination) : {} : !1;
      return Ke(S) && (S = {
        size: "small",
        showQuickJumper: !0,
        showSizeChanger: !0,
        showTotal: (N) => I("table.total", {
          total: N
        }),
        pageSizeOptions: ["10", "30", "50", "100"],
        total: l.pagination.totalSize,
        pageSize: l.pagination.pageSize,
        current: l.pagination.currentPage,
        "onUpdate:current": (N) => {
          l.pagination.currentPage = N;
        },
        "onUpdate:pageSize": (N) => {
          l.pagination.pageSize = N;
        },
        onChange: () => {
          w(!1);
        },
        showSizeChange: () => {
          w(!0);
        },
        ...S
      }), S;
    }, dn = () => {
      let S = e.rowSelection ? Ke(e.rowSelection) ? Ce(e.rowSelection) : {} : null;
      return Ke(S) && (S = {
        selectedRowKeys: l.tableKeySelection,
        preserveSelectedRowKeys: !0,
        columnWidth: 40,
        fixed: !0,
        onChange: f
      }), S;
    }, xn = (S, N, q, B) => {
      l.editingData[N[e.rowKey]] ? l.editingData[N[e.rowKey]][q] = B : l.editingData[N[e.rowKey]] = {
        [q]: B
      };
    }, Un = (S, N) => {
      l.editingData[S[e.rowKey]] && delete l.editingData[S[e.rowKey]][N];
    }, ee = async (S, N, q) => {
      if (!e.submitUrl && !e.beforeCellSubmit)
        return;
      let B = null;
      S.type === "switch" ? B = l.editingSwitchData[N[e.rowKey]][q] : B = l.editingData[N[e.rowKey]][q];
      const Y = {
        [e.rowKey]: N[e.rowKey],
        [q]: B
      };
      if (Un(N, q), S.beforeCellSubmit)
        l.tableLoading.loading = !0, await S.beforeCellSubmit(Y), l.tableLoading.loading = !1;
      else if (e.beforeCellSubmit)
        l.tableLoading.loading = !0, await e.beforeCellSubmit(Y), l.tableLoading.loading = !1;
      else {
        const ie = await gn(l.tableLoading).post(e.submitUrl, Y);
        jn(ie, () => {
          ge.success(I("common.save-success")), n("cellSubmit", {
            record: N,
            key: q,
            value: B
          });
        });
      }
    }, be = (S) => {
      const {
        column: N,
        text: q,
        record: B
      } = S;
      let Y = N.editable;
      N.editable === !0 && (Y = {
        type: "input"
      });
      const ie = Y.key || N.key, Vn = ne(Y.defaultValue) ? q : Y.defaultValue, Yo = l.editingData[B[e.rowKey]] && !ne(l.editingData[B[e.rowKey]][ie]), Zc = Yo ? u("span", {
        class: "table-editable-icon editing"
      }, [u(Fn, {
        class: "check-icon",
        onClick: Fe(() => ee(Y, B, ie), ["stop"])
      }, null), u(Kd, {
        class: "close-icon",
        onClick: Fe(() => Un(B, ie), ["stop"])
      }, null)]) : u("span", {
        class: "table-editable-icon"
      }, [u(lo, {
        class: "edit-icon",
        onClick: Fe(() => xn(Y, B, ie, Vn), ["stop"])
      }, null)]), Jc = () => {
        if (Y.type === "input")
          return u(Tn, H({
            value: l.editingData[B[e.rowKey]][ie],
            "onUpdate:value": (Ze) => l.editingData[B[e.rowKey]][ie] = Ze,
            style: {
              width: "100%"
            }
          }, Y.defaultProps), {
            ...Y.defaultSlots
          });
        if (Y.type === "number")
          return u(ka, H({
            value: l.editingData[B[e.rowKey]][ie],
            "onUpdate:value": (Ze) => l.editingData[B[e.rowKey]][ie] = Ze,
            style: {
              width: "100%"
            }
          }, Y.defaultProps), {
            ...Y.defaultSlots
          });
        if (Y.type === "select")
          return u(Mn, H({
            value: l.editingData[B[e.rowKey]][ie],
            "onUpdate:value": (Ze) => l.editingData[B[e.rowKey]][ie] = Ze,
            options: Y.options,
            style: {
              width: "100%"
            }
          }, Y.defaultProps), {
            ...Y.defaultSlots
          });
      };
      if (Y.type === "switch") {
        let Ze = {
          checkedChildren: () => {
            var Je;
            return ((Je = Y.options) == null ? void 0 : Je[0]) || null;
          },
          unCheckedChildren: () => {
            var Je;
            return ((Je = Y.options) == null ? void 0 : Je[1]) || null;
          }
        };
        return ne(l.editingSwitchData[B[e.rowKey]]) && (l.editingSwitchData[B[e.rowKey]] = {}), ne(l.editingSwitchData[B[e.rowKey]][ie]) && (l.editingSwitchData[B[e.rowKey]][ie] = Vn), u("div", {
          class: "table-editable-wrapper"
        }, [u("div", {
          class: "table-editable-text"
        }, [u(ta, H({
          checked: l.editingSwitchData[B[e.rowKey]][ie],
          "onUpdate:checked": (Je) => l.editingSwitchData[B[e.rowKey]][ie] = Je,
          onClick: (Je, Ra) => Ra.stopPropagation(),
          onChange: (Je, Ra) => {
            Ra.stopPropagation(), ee(Y, B, ie);
          }
        }, Y.defaultProps), ms(Ze) ? Ze : {
          default: () => [Ze]
        })])]);
      } else
        return u("div", {
          class: "table-editable-wrapper"
        }, [u("div", {
          class: "table-editable-text"
        }, [Yo ? Jc() : q]), Zc]);
    }, ia = () => u(ca, H({
      rowSelection: dn(),
      pagination: yn(),
      loading: l.tableLoading.loading,
      dataSource: l.items,
      columns: l.tableColumns,
      onResizeColumn: p
    }, Ue()), {
      headerCell: ({
        column: S
      }) => {
        const N = [u("span", null, [S.title]), S.tooltip ? j(S.tooltip) ? u(Ye, null, {
          default: () => u(et, {
            style: {
              marginLeft: "5px"
            }
          }, null),
          title: S.tooltip
        }) : u(Ye, {
          title: S.tooltip
        }, {
          default: () => u(et, {
            style: {
              marginLeft: "5px"
            }
          }, null)
        }) : null], q = [];
        return e.editable && S.editable && q.push(u("span", {
          class: "newbie-table-header-func"
        }, [I("table.editable")])), u("div", {
          class: `newbie-table-header-wrapper ${q != null && q.length ? "with-func" : ""}`
        }, [u("div", {
          class: "newbie-table-header-title-wrapper"
        }, [N]), u("div", {
          class: "newbie-table-header-func-wrapper"
        }, [q])]);
      },
      bodyCell: ({
        column: S,
        text: N,
        record: q,
        index: B
      }) => e.editable && S.editable ? be({
        column: S,
        text: N,
        record: q
      }) : S.customRender ? S.customRender({
        column: S,
        text: N,
        record: q,
        index: B
      }) : S.onClick ? u("a", {
        href: "javascript:void(0);",
        onClick: Fe(() => S.onClick({
          column: S,
          text: N,
          record: q,
          index: B
        }), ["stop"])
      }, [N]) : u("span", null, [N]),
      ...e.tableSlots
    }), Ho = () => o.append || e.pagination ? u("div", {
      ref: c,
      class: "newbie-table-footer"
    }, [u("div", {
      class: "newbie-table-append-wrapper"
    }, [o.append ? o.append() : null]), u("div", {
      class: "newbie-table-pagination-wrapper"
    }, null)]) : null;
    return () => u("div", {
      class: "newbie-table"
    }, [e.cardWrapper ? u(xo, {
      size: "small",
      class: "newbie-table-card"
    }, {
      title: () => ae(),
      extra: () => o.extra ? o.extra() : null,
      default: () => [Ge(), Me(), Be(), ia(), Ho()]
    }) : [Ge(), Me(), Be(), ia(), Ho()], u(en, {
      open: l.customColumnVisible,
      "onUpdate:open": (S) => l.customColumnVisible = S,
      title: I("table.custom"),
      width: "900px",
      onOk: b
    }, {
      default: () => [u(Kt, {
        value: l.columnKeyModal,
        "onUpdate:value": (S) => l.columnKeyModal = S,
        style: {
          width: "100%"
        }
      }, {
        default: () => u(Dn, {
          gutter: 15
        }, {
          default: () => l.customColumns.map((S) => u(un, {
            span: 6
          }, {
            default: () => u(Eo, {
              style: {
                width: "100%",
                marginBottom: "5px",
                overflow: "hidden"
              },
              value: S.checkKey
            }, {
              default: () => S.title
            })
          }))
        })
      }), u(Cn, null, null), u(re, {
        onClick: C
      }, {
        default: () => I("table.select-all")
      }), u(re, {
        onClick: y,
        style: {
          marginLeft: "5px"
        }
      }, {
        default: () => I("table.unselect-all")
      })]
    })]);
  }
});
function ps(e) {
  if (!e) return null;
  ye(e) || (e = [e]);
  const n = e.map((o) => {
    var i, r, l;
    let a = {
      ...o.props
    }, {
      type: t
    } = o;
    const {
      name: c
    } = o;
    let d = null;
    if ((!t || t === "button") && (d = qn, a.type = a.type || "text"), (t === "a-tag" || t === "tag") && (d = Oe), t === "switch" && (d = ta, o.name && (a.checkedChildren = ((i = o.name) == null ? void 0 : i[0]) || "", a.unCheckedChildren = ((r = o.name) == null ? void 0 : r[1]) || ""), a.checked = o.value, a.disabled = !0), o.action && (a.onClick = Fe(() => o.action(), ["stop"])), o.tooltip) {
      const m = o.tooltip;
      return u(Ye, {
        title: m,
        transfer: !0
      }, {
        default: () => u(d, a, {
          default: () => c
        })
      });
    }
    if ((l = o.children) != null && l.length) {
      const m = o.children;
      return u(Co, {
        placement: "bottom",
        onClick: Fe(() => {
        }, ["stop"])
      }, {
        default: () => u(qn, H({
          type: "text",
          size: "small"
        }, a), {
          default: () => [u(_o, {
            style: {
              fontSize: "12px"
            }
          }, null), c]
        }),
        overlay: () => u(So, null, {
          default: () => m.map((g) => u(Xn, null, {
            default: () => u(qn, H({
              type: "text",
              style: {
                textAlign: "left"
              },
              buttonProps: {
                block: !0
              },
              onClick: Fe(() => g.action(), ["stop"])
            }, g.props), {
              default: () => g.name
            })
          }))
        })
      });
    }
    return u(d, a, {
      default: () => c
    });
  });
  return u("div", {
    class: "table-actions-wrapper"
  }, [n]);
}
function hs(e, n) {
  return e ? (ye(e) || (e = [e]), u(md, {
    gap: "small"
  }, {
    default: () => e.map((o) => {
      const a = o.thumbUrl || o.url || o;
      return u(Ht, {
        src: a,
        preview: {
          src: o.url || o.thumbUrl || o
        },
        width: 48,
        height: 48
      }, null);
    })
  })) : u("span", {
    style: {
      fontSize: "30px"
    }
  }, [n ? u(n, null, null) : u(Hd, null, null)]);
}
function gs(e, n) {
  const {
    DefaultIcon: o,
    placeholder: a = "暂无内容",
    fileName: t
  } = n || {};
  return e ? (ye(e) || (e = [e]), e.map((c, d) => {
    const i = c.url || c, r = t || c.name || (e.length > 1 ? `查看附件${d + 1}` : "查看附件");
    return u("a", {
      href: i,
      style: {
        display: "block"
      },
      target: "_blank"
    }, [u("span", {
      style: {
        fontSize: "14px"
      }
    }, [o ? u(o, null, null) : u(Gt, null, null), xe(" "), r])]);
  })) : u("span", null, [a]);
}
const vs = ps, Qc = hs, ys = gs, bs = $e(fs);
function ws(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Re(e);
}
const ks = (e, n, o, a) => {
  var h;
  const {
    t
  } = da();
  Object.keys(o).length || (o.editFormRef = null, o.showEditModal = !1, o.editIndex = -1, o.editFormData = {});
  const c = yo(o.editFormRef), {
    provider: d
  } = a, i = d.uploaderProvider;
  let r = e.children;
  j(e.children) && (r = e.children({
    submitForm: n
  }));
  const l = r.filter((s) => !s.invisible).map((s) => ({
    dataIndex: s.key,
    title: s.title,
    width: s.width,
    key: s.key,
    item: s,
    // 将子项的配置传递给子组件,用于自定义渲染
    ...s.cellProps
  })), m = {
    title: t("common.actions"),
    dataIndex: "operations",
    align: "center",
    fixed: "right",
    width: 120 + (((h = e.childrenOperations) == null ? void 0 : h.length) || 0) * 60
  }, g = e.disabled || e.readonly ? [...l] : [...l, m], y = J(() => n[e.key] || []), C = (s, v) => {
    if (s)
      o.editFormData = s, o.editIndex = v;
    else {
      let w = {};
      r.forEach((E) => {
        w[E.key] = xa(E, {}, {}, {
          uploaderProvider: i
        });
      }), o.editFormData = w, o.editIndex = -1;
    }
    o.showEditModal = !0;
  }, f = ({
    formatForm: s
  }) => (o.editIndex === -1 ? n[e.key].push(s) : n[e.key][o.editIndex] = s, o.showEditModal = !1, !1), p = () => new Promise((s) => {
    var v;
    (v = c.value) != null && v.isDirty() ? en.confirm({
      content: t("common.cancel-confirm"),
      okText: t("common.confirm"),
      cancelText: t("common.cancel"),
      onOk: () => s(!0),
      onCancel: () => s(!1)
    }) : s(!0);
  }), b = (s) => {
    n[e.key].splice(s, 1);
  };
  return u("div", null, [u(ca, {
    columns: g,
    dataSource: y.value,
    pagination: !1,
    bordered: !0,
    size: "small"
  }, {
    bodyCell: ({
      column: s,
      record: v,
      index: w
    }) => {
      var E, k, P, O, x, _, D, A, M, F, K, T, L, X, ae, Ge, Me, Be, Ue, yn, dn, xn, Un;
      if (((E = s.item) == null ? void 0 : E.type) === "select") {
        let ee = j((k = s.item) == null ? void 0 : k.options) ? s.item.options({
          submitForm: n,
          record: v
        }) : s.item.options;
        return ee = ee.map((be) => se(be) || fe(be) ? {
          value: be,
          label: be
        } : be), u("span", null, [Oo(v[s.item.key], ee)]);
      } else if (((P = s.item) == null ? void 0 : P.type) === "date") {
        if (v[s.item.key]) {
          const ee = pe(v[s.item.key]);
          return (x = (O = s.item) == null ? void 0 : O.defaultProps) != null && x.format ? u("span", null, [ee.format(s.item.defaultProps.format)]) : (D = (_ = s.item) == null ? void 0 : _.defaultProps) != null && D.showTime ? u("span", null, [ee.format("YYYY-MM-DD HH:mm:ss")]) : u("span", null, [ee.format("YYYY-MM-DD")]);
        }
        return null;
      } else if (((A = s.item) == null ? void 0 : A.type) === "switch") {
        const ee = s.item.options || [t("common.yes"), t("common.no")];
        return u(Bn, null, {
          default: () => [u(ta, H({
            checked: v[s.item.key],
            "onUpdate:checked": (be) => v[s.item.key] = be,
            disabled: !0,
            checkedChildren: ee[0],
            unCheckedChildren: ee[1]
          }, s.item.defaultProps), null)]
        });
      } else if (((M = s.item) == null ? void 0 : M.type) === "tree-select") {
        let ee = j((F = s.item) == null ? void 0 : F.options) ? s.item.options({
          submitForm: n,
          record: v
        }) : s.item.options, be = Ce(v[s.item.key]);
        ye(be) || (be = [be]);
        const ia = Po(ee, be, ((T = (K = s.item) == null ? void 0 : K.defaultProps) == null ? void 0 : T.fieldNames) || null);
        return u("span", null, [ia.join(", ")]);
      } else {
        if (((L = s.item) == null ? void 0 : L.type) === "tag")
          return (X = v[s.item.key]) == null ? void 0 : X.map((ee) => u(Oe, {
            color: "blue"
          }, ws(ee) ? ee : {
            default: () => [ee]
          }));
        if (((ae = s.item) == null ? void 0 : ae.type) === "uploader")
          return u("div", {
            class: "flex justify-center"
          }, [Qc(v[s.item.key])]);
        if (((Ge = s.item) == null ? void 0 : Ge.type) === "time" || ((Me = s.item) == null ? void 0 : Me.type) === "date") {
          const ee = ((Ue = (Be = s.item) == null ? void 0 : Be.defaultProps) == null ? void 0 : Ue.format) || (((yn = s.item) == null ? void 0 : yn.type) === "time" ? "HH:mm:ss" : "YYYY-MM-DD");
          return ((xn = (dn = s.item) == null ? void 0 : dn.defaultProps) == null ? void 0 : xn.type) === "range" ? u("span", null, [pe(v[s.item.key][0]).format(ee), xe(" - "), pe(v[s.item.key][1]).format(ee)]) : v[s.item.key] ? u("span", null, [pe(v[s.item.key]).format(ee)]) : u("span", null, null);
        }
      }
      if (s.dataIndex === "operations") {
        const ee = [u(re, {
          type: "text",
          size: "small",
          onClick: () => C(v, w)
        }, {
          default: () => t("common.edit")
        })];
        return (Un = e.childrenOperations) == null || Un.forEach((be) => {
          ee.push(u(re, {
            type: "text",
            size: "small",
            onClick: () => be.action({
              column: s,
              record: v,
              index: w
            })
          }, {
            default: () => be.name
          }));
        }), ee.push(u(hd, {
          title: t("common.delete-confirm"),
          onConfirm: () => b(w)
        }, {
          default: () => u(re, {
            type: "text",
            size: "small"
          }, {
            default: () => t("common.delete")
          })
        })), u("div", {
          class: "table-actions-wrapper"
        }, [xe(" "), ee, xe(" ")]);
      }
    },
    summary: () => e.disabled || e.readonly ? null : u(fd, null, {
      default: () => u(pd, {
        colSpan: g.length
      }, {
        default: () => u(re, {
          icon: u(Xt, null, null),
          block: !0,
          onClick: () => C(!1)
        }, {
          default: () => ze(t("common.add"), e.title)
        })
      })
    })
  }), u(ic, {
    visible: o.showEditModal,
    "onUpdate:visible": (s) => o.showEditModal = s,
    type: "drawer",
    title: ze(t("common.edit"), e.title),
    beforeClose: p
  }, {
    default: () => [u(wo("NewbieForm"), {
      ref: c,
      form: r,
      closable: !1,
      data: o.editFormData,
      beforeSubmit: f,
      onClose: async () => {
        o.showEditModal = !await p();
      }
    }, null)]
  })]);
}, Cs = (e, n) => (n[e.key] = Number(n[e.key]) || 0, u(gd, H({
  value: n[e.key],
  "onUpdate:value": (o) => n[e.key] = o,
  disabled: j(e.disabled) ? e.disabled(n) : e.disabled
}, e.defaultProps), {
  ...e.defaultSlots
})), Ss = (e, n) => {
  const o = j(e.rows) ? e.rows(n) : e.rows;
  let a = j(e.options) ? e.options(n) : e.options;
  a = a.map((c) => se(c) || fe(c) ? {
    value: c,
    label: c
  } : c);
  const t = [{
    title: `${I("form.row-title")}\\${I("form.options")}`,
    dataIndex: "row",
    type: "title"
  }].concat(a.map((c) => ({
    title: c.label,
    dataIndex: c.value,
    align: "center",
    type: "option"
  })));
  return u(ca, {
    pagination: !1,
    bordered: !0,
    columns: t,
    dataSource: o,
    size: "middle"
  }, {
    bodyCell: ({
      index: c,
      column: d
    }) => {
      const i = o[c];
      if (d.type === "title")
        return i;
      if (d.type === "option") {
        const r = `${d.dataIndex}`;
        return u(Bn, null, {
          default: () => u(Aa, {
            value: n[e.key][i],
            "onUpdate:value": (l) => n[e.key][i] = l
          }, {
            default: () => [u(Wt, {
              value: r,
              disabled: j(e.disabled) ? e.disabled(n) : e.disabled
            }, null)]
          })
        });
      }
    }
  });
}, xs = (e, n) => {
  const o = j(e.rows) ? e.rows(n) : e.rows;
  let a = j(e.options) ? e.options(n) : e.options;
  a = a.map((d) => se(d) || fe(d) ? {
    value: d,
    label: d
  } : d);
  const t = [{
    title: `${I("form.row-title")}\\${I("form.options")}`,
    dataIndex: "row",
    type: "title"
  }].concat(a.map((d) => ({
    title: d.label,
    dataIndex: d.value,
    align: "center",
    type: "option"
  }))), c = (d, i) => {
    n[e.key][d] || (n[e.key][d] = []), n[e.key][d].includes(i) ? Nd(n[e.key][d], (r) => r === i) : n[e.key][d].push(i);
  };
  return u(ca, {
    pagination: !1,
    bordered: !0,
    columns: t,
    dataSource: o,
    size: "middle"
  }, {
    bodyCell: ({
      index: d,
      column: i
    }) => {
      const r = o[d];
      if (i.type === "title")
        return r;
      if (i.type === "option") {
        const l = `${i.dataIndex}`;
        return u(Bn, null, {
          default: () => {
            var m;
            return u(Eo, {
              id: `${r}_${l}`,
              checked: (m = n[e.key][r]) == null ? void 0 : m.includes(l),
              onChange: () => c(r, l),
              disabled: j(e.disabled) ? e.disabled(n) : e.disabled
            }, null);
          }
        });
      }
    }
  });
}, Es = (e, n) => {
  var d, i;
  let o = j(e.rows) ? e.rows(n) : Ce(e.rows);
  const a = ((d = e.defaultProps) == null ? void 0 : d.level) || 5;
  let t = j(e.options) ? e.options(n) : e.options || [];
  if (t = t.map((r) => se(r) || fe(r) ? {
    value: r,
    label: r
  } : r), t.length > a)
    t = t.slice(0, a);
  else if (t.length < a)
    for (let r = t.length; r < a; r += 1)
      t.push({
        label: r + 1,
        value: r + 1
      });
  const c = [{
    title: `${I("form.row-title")}\\${I("form.options")}`,
    dataIndex: "row",
    type: "title"
  }].concat(t.map((r) => ({
    title: r.label,
    dataIndex: r.value,
    align: "center",
    type: "option"
  })));
  if (o = o.map((r) => ({
    row: r
  })), (i = e.defaultProps) != null && i.showScale) {
    let r = {
      row: I("form.scale")
    };
    t.forEach((l, m) => r[l.value] = m + 1), o.unshift(r);
  }
  return u(ca, {
    pagination: !1,
    bordered: !0,
    columns: c,
    dataSource: o,
    size: "middle"
  }, {
    bodyCell: ({
      index: r,
      column: l,
      record: m
    }) => {
      var g;
      if (r === 0 && ((g = e.defaultProps) != null && g.showScale))
        return u("span", {
          style: {
            color: "orange",
            fontWeight: "bold"
          }
        }, [m[l.dataIndex]]);
      if (l.type === "option") {
        const {
          row: y
        } = o[r], C = Yt(c, {
          dataIndex: l.dataIndex
        });
        return u(Bn, null, {
          default: () => u(Aa, {
            value: n[e.key][y],
            "onUpdate:value": (f) => n[e.key][y] = f
          }, {
            default: () => [u(Wt, {
              value: C,
              disabled: j(e.disabled) ? e.disabled(n) : e.disabled
            }, null)]
          })
        });
      }
      return m[l.dataIndex];
    }
  });
};
function Os(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Re(e);
}
const Ps = (e, n) => {
  let o, a = j(e.options) ? e.options(n) : e.options;
  a = a.map((c) => {
    if (se(c) || fe(c))
      return {
        value: c,
        label: c,
        rate: 0
      };
    if (Ke(c) && c.value)
      return ne(c.label) && (c.label = c.value), ne(c.rate) && (c.rate = 0), c;
  });
  const t = (c) => {
    var i;
    const {
      value: d
    } = c.target;
    n[e.key].rate = ((i = ve(a, {
      value: d
    })) == null ? void 0 : i.rate) || 0;
  };
  return e.readonly ? u("div", {
    style: {
      padding: "0 11px"
    }
  }, [u(Oe, null, Os(o = Oo(n[e.key].value, a)) ? o : {
    default: () => [o]
  })]) : u(Aa, H({
    value: n[e.key].value,
    "onUpdate:value": (c) => n[e.key].value = c,
    optionType: "button",
    buttonStyle: "solid",
    disabled: j(e.disabled) ? e.disabled(n) : e.disabled,
    options: a,
    style: e.style || {},
    onChange: t
  }, e.defaultProps), {
    ...e.defaultSlots
  });
};
function _s(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Re(e);
}
const Ds = (e, n) => {
  let o = j(e.options) ? e.options(n) : e.options;
  o = o.map((t) => {
    if (se(t) || fe(t))
      return {
        value: t,
        label: t,
        rate: 0
      };
    if (Ke(t) && t.value)
      return ne(t.label) && (t.label = t.value), ne(t.rate) && (t.rate = 0), t;
  });
  const a = (t) => {
    n[e.key] || (n[e.key] = []), n[e.key].filter((c) => c.value === t.value).length ? n[e.key] = n[e.key].filter((c) => c.value !== t.value) : n[e.key].push({
      value: t.value,
      rate: t.rate
    });
  };
  return e.readonly ? u("div", {
    style: {
      padding: "0 11px"
    }
  }, [Po(o, n[e.key].map((t) => t.value)).map((t) => u(Oe, {
    style: {
      marginRight: "5px"
    }
  }, _s(t) ? t : {
    default: () => [t]
  }))]) : u(Bn, null, {
    default: () => o.map((t) => {
      const c = n[e.key].filter((d) => d.value === t.value).length > 0;
      return u(Eo, {
        id: t.value,
        checked: c,
        onChange: () => a(t),
        disabled: j(e.disabled) ? e.disabled(n) : e.disabled
      }, {
        default: () => t.label
      });
    })
  });
}, Is = (e, n) => u("span", {
  style: e.style,
  class: {
    ...e.class
  }
}, [j(e.defaultValue) ? e.defaultValue({
  submitForm: n
}) : e.defaultValue]), Ts = (e, n, o) => {
  const a = e.children;
  return u("div", {
    style: {
      display: "flex",
      gap: "6px",
      ...e.style || {}
    },
    class: {
      ...e.class || {}
    }
  }, [a.map((t) => oa(t, n, o))]);
}, oa = (e, n, {
  props: o,
  slots: a,
  formState: t
}) => {
  var f, p, b;
  const {
    t: c
  } = da(), d = pn(Na, () => ({}));
  pn(Do, () => ({})), ne(n[e.key]) && e.key && (n[e.key] = xa(e, {}, n, {
    uploaderProvider: d
  }));
  let i = null, r = (f = e.rules) != null && f.length ? e.rules.map((h) => h.pattern ? {
    ...h,
    pattern: new RegExp(h.pattern)
  } : {
    ...h
  }) : [], l = {
    required: !0,
    message: e.requiredMessage || me(e, "select")
  };
  e.type = e.type ? e.type.toLowerCase() : e.type;
  const m = j(e.required) ? e.required(n) : e.required;
  if (e.readonly = e.readonly || o.readonly, e.disabled = e.disabled || o.disabled || o.readonly || e.readonly, (e.readonly || e.disabled) && (e.placeholder = "--"), j(e.hidden) && e.hidden(n) || Sa(e.hidden) && e.hidden)
    return null;
  if (e.type === "slot" && a[e.key])
    return a[e.key]({
      submitForm: n,
      item: e
    });
  if (e.customRender) {
    if (i = e.customRender({
      submitForm: n,
      item: e
    }), !i)
      return null;
  } else if (e.match) {
    const h = {
      ...e,
      ...e.match(n),
      match: null
    };
    return oa(h, n, {
      props: o,
      slots: a
    });
  } else
    switch (e.type) {
      case "select":
        i = Dl(e, n);
        break;
      case "remote":
        i = Tl(e, n, t[e.key]);
        break;
      case "tree-select":
        i = Il(e, n);
        break;
      case "date":
        i = xl(e, n);
        break;
      case "time":
        i = El(e, n);
        break;
      case "switch":
        i = jl(e, n);
        break;
      case "radio":
        i = zl(e, n);
        break;
      case "checkbox":
        i = Bl(e, n), l.type = "array";
        break;
      case "tag":
        i = _l(e, n, t[e.key]), l.type = "array";
        break;
      case "address":
        i = Al(e, n), l.type = "array";
        break;
      case "cascade":
        i = Nl(e, n), l.type = "array";
        break;
      case "number":
        i = $l(e, n), l.trigger = "blur", l.type = "number", l.message = e.requiredMessage || me(e);
        break;
      case "html":
        i = Ul(e, n);
        break;
      case "uploader":
        if (i = Wl(e, n), m) {
          if (!Object.keys(d).length) {
            console.error("Please inject NEWBIE_UPLOADER config in root component"), i = null;
            break;
          }
          (p = e.defaultProps) != null && p.maxNum && ((b = e.defaultProps) == null ? void 0 : b.maxNum) > 1 ? (l.type = "array", l.message = e.requiredMessage || me(e, "upload")) : (l.type = "object", l.message = e.requiredMessage || me(e, "upload"), l.fields = {
            [d.defaultFileItem.path]: {
              type: "string",
              required: !0,
              message: me(e, "upload")
            }
          });
        }
        break;
      case "editor":
        i = Yl(e, n), l.message = e.requiredMessage || me(e), l.type = "string";
        break;
      case "text":
        i = Xl(e, n);
        break;
      case "plain":
        i = Is(e, n);
        break;
      case "group":
        i = ks(e, n, t[e.key], {
          provider: {
            uploaderProvider: d
          }
        });
        break;
      case "rate":
        i = Cs(e, n);
        break;
      case "matrix-radio": {
        i = Ss(e, n), l.type = "object", l.message = e.requiredMessage || me(e, "select");
        const h = {};
        e.rows.forEach((s) => {
          h[s] = {
            required: !0,
            message: c("form.please-select", {
              title: s
            })
          };
        }), l.fields = h;
        break;
      }
      case "matrix-checkbox": {
        i = xs(e, n), l.type = "object", l.message = e.requiredMessage || me(e, "select");
        const h = {};
        e.rows.forEach((s) => {
          h[s] = {
            required: !0,
            type: "array",
            message: c("form.please-select", {
              title: s
            })
          };
        }), l.fields = h;
        break;
      }
      case "matrix-scale": {
        i = Es(e, n), l.type = "object", l.message = e.requiredMessage || me(e, "select");
        const h = {};
        e.rows.forEach((s) => {
          h[s] = {
            type: "number",
            required: !0,
            message: c("form.please-select", {
              title: s
            })
          };
        }), l.fields = h;
        break;
      }
      case "rate-radio":
        i = Ps(e, n);
        break;
      case "rate-checkbox":
        i = Ds(e, n), l.type = "array";
        break;
      case "combiner":
        i = Ts(e, n, {
          props: o,
          slots: a
        });
        break;
      default:
        i = Ol(e, n), l.message = e.requiredMessage || me(e), l.trigger = "blur", l.type = "string";
        break;
    }
  m && (r.length ? r[0].required = !0 : r.push(l));
  let g = {
    label: e.title,
    name: e.key,
    validateFirst: !0,
    required: m,
    hasFeedback: (r == null ? void 0 : r.length) > 0,
    rules: r
  };
  g = {
    ...g,
    ...e.formItemProps
  };
  let y = e.formItemSlots || {};
  e.help && (y.extra = () => u("div", {
    class: "newbie-form__form-item-help"
  }, [j(e.help) ? e.help(n) : e.help])), y.label && delete g.label;
  let C = null;
  if (e.optional && !e.readonly) {
    if (ne(e.optionalValue)) {
      const h = Sl(e, n);
      e.optionalValue = z(h);
    }
    C = u("div", {
      class: "newbie-form__optional"
    }, [u(Bn, null, {
      default: () => {
        var h, s;
        return [u(ta, {
          checked: e.optionalValue.value,
          "onUpdate:checked": (v) => e.optionalValue.value = v,
          checkedChildren: ((h = e.optional) == null ? void 0 : h[0]) || "",
          unCheckedChildren: ((s = e.optional) == null ? void 0 : s[1]) || "",
          onChange: (v) => !v && (n[e.key] = null)
        }, null)];
      }
    }), u("div", {
      class: "newbie-form__optional-content"
    }, [e.optionalValue.value ? i : !1])]);
  }
  return u(ao, g, {
    default: () => e.optional && !e.readonly ? C : i,
    ...y
  });
};
function _t(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Re(e);
}
const As = (e, n, o, a) => {
  const {
    props: t,
    slots: c,
    formState: d
  } = a, i = [], r = [];
  e.forEach((b) => {
    b.columnIndex === "fixed" ? i.push(b) : ((b.break || !r.length) && r.push([]), r[r.length - 1].push(b));
  });
  let l = t.columns;
  if ((!l || !ye(l) || !l.length) && (l = [24]), $d(l) !== 24)
    return console.error("NewbieForm columns must sum up to 24"), null;
  const m = r.map(() => l.map(() => []));
  r.forEach((b, h) => {
    b.forEach((s) => {
      var E;
      let v = s.columnIndex || 0;
      v = fe(v) ? Math.min(v, t.columns.length - 1) : v;
      let w = 0;
      if (ye(v)) {
        for (let k = v[0]; k <= v[1] && l[k]; k++)
          w += l[k], k !== v[0] && m[h][k].push("placeholder");
        s.span = w, s.formItemProps = {
          labelCol: {
            span: (((E = t.formProps.labelCol) == null ? void 0 : E.span) || 6) / (v[v.length - 1] - v[0] + 1)
          },
          ...s.formItemProps
        }, m[h][v[0]].push(s);
      } else fe(v) && (s.span = l[v], m[h][v].push(s));
    });
  });
  const g = i.map((b) => oa(b, n, a));
  let y = [];
  const C = (b) => {
    const h = document.getElementById(`collapse_${b.key}`);
    d[b.key].isCollapse ? h.style.height = `${h.scrollHeight}px` : (h.style.height || (h.style.height = `${h.scrollHeight}px`), setTimeout(() => h.style.height = "0px")), hn(() => {
      d[b.key].isCollapse = !d[b.key].isCollapse;
    });
  };
  m.forEach((b, h) => {
    const s = Math.max(...b.map((E) => E.length)), v = [];
    let w = null;
    for (let E = 0; E < s; E++) {
      let k = 0;
      const P = [];
      for (let O = 0; O < m[h].length; O++) {
        let x;
        const _ = m[h][O][E];
        if (!_) {
          k += l[O];
          continue;
        }
        _.break && (w = _), _ !== "placeholder" && (P.push(u(un, {
          span: _.span,
          offset: k
        }, _t(x = oa(_, n, a)) ? x : {
          default: () => [x]
        })), k = 0);
      }
      v.push(u(Dn, {
        gutter: 16
      }, _t(P) ? P : {
        default: () => [P]
      }));
    }
    if (w) {
      if (t.breakMode === "divider")
        v.unshift(u(Cn, t.dividerProps, {
          default: () => se(w.break) ? w.break : ""
        })), y = y.concat(v);
      else if (t.breakMode === "collapse") {
        ne(d[w.key].isCollapse) && (d[w.key].isCollapse = !!h);
        const E = u("div", {
          class: "newbie-form__collapse-wrapper"
        }, [u("div", {
          class: "newbie-form__collapse-header",
          onClick: () => C(w)
        }, [u("span", {
          class: `newbie-form__collapse-icon ${d[w.key].isCollapse ? "" : "open"}`
        }, [u(Wd, null, null)]), u("span", {
          class: "newbie-form__collapse-title"
        }, [w.break])]), u("div", {
          class: `newbie-form__collapse-content-wrapper ${d[w.key].isCollapse ? "collapse" : ""}`,
          id: `collapse_${w.key}`
        }, [u("div", {
          class: "newbie-form__collapse-content"
        }, [v])])]);
        y = y.concat(E);
      }
    } else
      y = y.concat(v);
  });
  const f = () => c.footer ? u("div", {
    class: "newbie-form__footer"
  }, [c.footer()]) : null;
  let p;
  if (g.length) {
    const b = t.disabled || t.readonly || t.hideButtons ? null : u("div", {
      class: "newbie-form__submit-wrapper"
    }, [u(Cn, null, null), u(Dn, null, {
      default: () => [u(un, {
        span: 24,
        offset: 2
      }, {
        default: () => o
      })]
    })]);
    p = u(Dn, {
      gutter: 16
    }, {
      default: () => [u(un, {
        span: 24 - t.fixedColumns
      }, {
        default: () => y
      }), u(un, {
        span: t.fixedColumns
      }, {
        default: () => [u(vd, {
          offsetTop: 20
        }, {
          default: () => [u(xo, {
            style: {
              marginLeft: "20px"
            }
          }, {
            default: () => [g, f(), b]
          })]
        })]
      })]
    });
  } else {
    const b = t.disabled || t.readonly || t.hideButtons ? null : u("div", {
      class: "newbie-form__submit-wrapper"
    }, [u(Cn, null, null), u(Dn, {
      gutter: 16
    }, {
      default: () => [u(un, {
        offset: t.closable ? 9 : 10
      }, {
        default: () => o
      })]
    })]);
    p = [y, f(), b];
  }
  return p;
}, Gc = /* @__PURE__ */ Pe({
  name: "NewbieForm",
  props: {
    /**
     * 表单标题,Card 模式下生效
     */
    title: {
      type: String,
      default: ""
    },
    /**
     * 表单数据,用于初始化表单,并会进行 Watch
     *
     */
    data: {
      type: [Object, String],
      default: ""
    },
    /**
     * 是否自动加载
     * `true` 表示自动加载数据
     * `Array,String` 表示会对 `extraData` 数据中的相关字段进行非空验证,不为空再加载数据
     */
    autoLoad: {
      //自动加载数据,在fetchData里找
      type: [Boolean, Array, String],
      default: !0
    },
    /**
     * 获取表单数据的URL
     */
    fetchUrl: {
      type: String,
      default: ""
    },
    /**
     * 额外的数据,在提交时会合并到表单数据中并一起提交
     */
    extraData: {
      type: Object,
      default: () => ({})
    },
    /**
     * 提交数据URL
     */
    submitUrl: {
      type: String,
      default: ""
    },
    /**
     * 提交按钮文字
     */
    submitButtonText: {
      type: String,
      default: ""
    },
    /**
     * 提交确认提示内容
     */
    submitConfirmText: {
      type: String,
      default: ""
    },
    /**
     * 是否显示关闭按钮
     */
    closable: {
      type: Boolean,
      default: !0
    },
    /**
     * 关闭按钮文字
     */
    closeButtonText: {
      type: String,
      default: ""
    },
    /**
     * 是否将`关闭`按钮放在`提交`按钮前面
     */
    closeButtonFirst: {
      type: Boolean,
      default: !1
    },
    /**
     * 是否隐藏按钮
     */
    hideButtons: {
      type: Boolean,
      default: !1
    },
    /**
     * 是否禁用表单
     */
    disabled: {
      type: Boolean,
      default: !1
    },
    /**
     * 是否只读
     */
    readonly: {
      type: Boolean,
      default: !1
    },
    /**
     * 是否禁用提交按钮
     */
    submitDisabled: {
      type: Boolean,
      default: !1
    },
    /**
     * 分隔类型,默认为 `divider` 分割线
     * @values divider, collapse
     */
    breakMode: {
      type: String,
      default: "divider"
    },
    /**
     * 当 breakMode 为 `divider` 时,divider 的配置[原生分割线配置](https://www.antdv.com/components/divider-cn)
     */
    dividerProps: {
      type: Object,
      default: () => ({})
    },
    /**
     * 表单布局,默认为单列,当为多列时,按 24 栅格布局
     * 如:columns: [12, 12]
     */
    columns: {
      type: Array,
      default: () => [24]
    },
    /**
     * 如有 fixed 列,默认 fixed 列的宽度为 6,可自定义
     */
    fixedColumns: {
      type: Number,
      default: 6
    },
    /**
     * 是否用 `Card` 包裹
     */
    cardWrapper: {
      type: Boolean,
      default: !0
    },
    /**
     * Card 的配置
     */
    cardProps: {
      type: Object,
      default: () => {
      }
    },
    /**
     * Card 的Slots
     */
    cardSlots: {
      type: Object,
      default: () => {
      }
    },
    /**
     *
     * 表单配置
     *
     * @typedef {Object} NewbieFormItemConfig
     * @property {string} key 数据库关联名称
     * @property {string} title 显示的名字
     * @property {string} [type] 类型,默认是input
     * @property {array|Function} [rows] 矩阵组件行标题
     * @property {array|Function} [options] 组件选项
     * @property {string} [placeholder] 组件里的提示
     * @property {string|Function} [help] form item里的提示
     * @property {array} [rules] 验证规则
     * @property {string|number} [width] 组件宽度
     * @property {string} [style] 样式
     * @property {string} [class] 类名
     * @property {boolean|Function} [required] 是否必填,默认是false
     * @property {string} [requiredMessage] 必填项提示消息
     * @property {boolean} [readonly] 是否只读,默认是false
     * @property {boolean|Function} [disabled] 组件不可编辑状态,默认为 false
     * @property {boolean|Function} [hidden] 组件是否隐藏,默认为 false
     * @property {boolean|Array} [optional] 表单项是否开启后才可以输入
     * @property {Function} [init] 初始化函数,用于初始化表单项的值
     * @property {Function} [beforeSubmit] 在提交前修改表单项的值,该函数会在 NewbieForm 的 beforeSubmit 之前调用
     * @property {Function} [match] 支持根据条件返回不同的配置进行动态渲染
     * @property {number|Array|string} [columnIndex] 渲染在哪一列,默认为0,第一列
     * @property {boolean|string} [break] 新起一行,默认为false,如果为 String 则以 Divider 分割
     * @property {Object} [defaultProps] 组件的配置
     * @property {Object} [defaultSlots] 组件的默认插槽
     * @property {Object} [formItemProps] FormItem 的原生配置
     * @property {Object} [formItemSlots] FormItem 的原生Slot配置
     * @property {*} [defaultValue] 默认值,默认是空字符串
     * @property {Array.<NewbieFormItemConfig>|Function} [children] 子表单配置
     * @property {Array} [childrenOperations] 子表单操作
     * @property {Object} [cellProps] 单元格的配置
     */
    /**
     * 表单配置,[见表单项配置](#newbieformitemconfig-表单项配置)
     */
    form: {
      type: [Array, Function],
      default() {
        return [];
      }
    },
    /**
     * fetch 返回数据处理函数
     * @return {Object} 返回处理后的数据,将用于初始化表单
     */
    afterFetched: {
      type: Function,
      default: null
    },
    /**
     *
     * @typedef {Object} ExposedFormData
     * @property {Object} formatForm Format后的表单数据
     * @property {Object} originalForm 原生的表单数据
     *
     *
     * 提交数据处理函数
     * @param {ExposedFormData} data
     * @return {Boolean|Object} return false会阻止提交操作,return Object会替换提交的数据
     *
     */
    beforeSubmit: {
      type: Function,
      default: null
    },
    /**
     * 点击关闭时的动作
     */
    close: {
      type: Function,
      default: null
    },
    /**
     * 提交成功后的回调
     */
    afterSubmit: {
      type: Function,
      default: null
    },
    /**
     * 原生的 [From](https://www.antdv.com/components/form-cn#api) 配置
     */
    formProps: {
      type: Object,
      default: () => ({})
    }
  },
  emits: ["success"],
  setup(e, {
    expose: n,
    slots: o,
    emit: a
  }) {
    const {
      t,
      locale: c
    } = da(), d = z(null), i = qe({
      temporary: {},
      // 用于存放一些临时数据
      submitFetcher: {
        loading: !1
      },
      isInitializing: !0,
      //是否正在初始化
      submitForm: {},
      //提交表单,初始化数据后会生成
      submitFormBackup: {}
      //初始化后的表单数据备份,用于重置表单以及脏数据判断
    }), r = pn(Na, () => ({})), l = pn(Do, () => ({})), m = {}, g = J(() => (j(e.form) ? e.form() : e.form).map((A) => {
      var M;
      return A.type || (A.type = "input"), (M = l == null ? void 0 : l.columns) != null && M[A.type] && (A = {
        ...l.columns[A.type],
        ...A
      }), m[A.key] || (m[A.key] = qe({})), A;
    }));
    oe(() => e.data, (D) => {
      C(D || "");
    });
    const y = () => {
      i.isInitializing = !1, C(e.data || "");
    };
    tn(() => {
      let D = !1;
      e.autoLoad && e.fetchUrl && (D = !0, e.autoLoad && Ke(e.autoLoad) ? D = Sn(Object.values(to(e.extraData, Object.keys(e.autoLoad)))) : e.autoLoad && se(e.autoLoad) && (D = !!e.extraData[e.autoLoad])), D ? f() : y();
    });
    const C = (D) => {
      let A = {}, M = D ? Ce(D) : !1;
      g.value.forEach((F) => {
        F.type === "combiner" ? F.children.forEach((K) => {
          A[K.key] = xa(K, M, i.submitForm, {
            uploaderProvider: r
          });
        }) : A[F.key] = xa(F, M, i.submitForm, {
          uploaderProvider: r
        });
      }), M && (A = {
        ...M,
        ...A
      }), i.submitForm = A, i.submitFormBackup = Ce(A);
    }, f = () => {
      e.fetchUrl && (i.isInitializing = !0, gn().get(e.fetchUrl, {
        params: e.extraData
      }).then((D) => {
        i.isInitializing = !1, jn(D, () => {
          e.afterFetched && j(e.afterFetched) ? D = e.afterFetched(D) : l.afterFetched && j(l.afterFetched) && (D = l.afterFetched(D)), C(D);
        });
      }).finally(() => {
        i.isInitializing = !1;
      }));
    }, p = () => new Promise((D, A) => {
      d.value.validate().then(async () => {
        let M = Ce(i.submitForm);
        const F = g.value.map((T) => T.match ? {
          ...T,
          ...T.match(M)
        } : T).filter((T) => T.beforeSubmit && j(T.beforeSubmit));
        for (const T of F)
          M[T.key] = await T.beforeSubmit({
            value: M[T.key],
            submitForm: M
            //将 form 传出去,这样可以增删 form 里的参数
          });
        if (M = Ed(M, l.format || {}), e.beforeSubmit && j(e.beforeSubmit) && (M = await e.beforeSubmit({
          formatForm: M,
          originalForm: i.submitForm
        }), M === !1))
          return D();
        let K = await gn(i.submitFetcher).post(e.submitUrl, M);
        return i.submitFormBackup = Ce(i.submitForm), e.afterSubmit ? e.afterSubmit(K) : jn(K, () => {
          ge.success(ze(e.submitButtonText || t("common.save"), t("common.success"), {
            locale: c
          })), a("success", K);
        }), D();
      }).catch((M) => (Od(M), A(M)));
    }), b = (D) => {
      i.isInitializing = D;
    }, h = () => {
      d.value.resetFields();
    }, s = () => Ce(i.submitForm);
    n({
      submit: p,
      getForm: s,
      getFormStandalone: s,
      getFormRealtime: () => i.submitForm,
      getField: (D) => Ce(i.submitForm[D]),
      setForm: (D) => {
        Object.keys(D).forEach((A) => {
          i.submitForm[A] = D[A];
        });
      },
      reset: h,
      isDirty: () => !Ln(i.submitForm, i.submitFormBackup),
      isInitializing: b
    });
    const P = () => {
      const D = () => u(re, {
        loading: i.submitFetcher.loading,
        type: "primary",
        htmlType: "submit",
        disabled: e.submitDisabled,
        onClick: () => {
          e.submitConfirmText ? en.confirm({
            content: e.submitConfirmText,
            onOk() {
              p();
            }
          }) : p();
        }
      }, {
        default: () => `${e.submitButtonText || t("common.save")}${i.submitFetcher.loading ? "..." : ""}`
      }), A = () => u(re, {
        type: "default",
        onClick: () => {
          e.close && j(e.close) && e.close();
        }
      }, {
        default: () => e.closeButtonText || t("common.close")
      });
      return u(An, {
        size: "large"
      }, {
        default: () => e.closeButtonFirst ? [e.closable ? A() : null, D()] : [D(), e.closable ? A() : null]
      });
    }, O = () => As(g.value, i.submitForm, P(), {
      props: e,
      slots: o,
      formState: m
    }), x = () => u(Ta, H({
      model: i.submitForm,
      ref: d,
      class: "newbie-form",
      labelCol: {
        span: 6
      },
      scrollToFirstError: !0
    }, e.formProps), {
      default: () => [O()]
    }), _ = () => u(yd, {
      active: !0,
      paragraph: {
        rows: 10
      },
      loading: i.isInitializing
    }, {
      default: () => {
        var D, A;
        return [(D = o.prepend) == null ? void 0 : D.call(o), x(), (A = o.append) == null ? void 0 : A.call(o)];
      }
    });
    return () => u("div", {
      class: "newbie-form-wrapper"
    }, [e.cardWrapper ? u(xo, H(e.cardProps, {
      title: e.title
    }), {
      default: () => _(),
      ...e.cardSlots
    }) : _()]);
  }
}), Ns = $e(Gc), $s = /* @__PURE__ */ Pe({
  name: "NewbieList",
  props: {
    /**
     * 加载数据的URL
     */
    url: {
      type: String,
      default: ""
    },
    /**
     * 请求附带参数
     */
    extraData: {
      type: Object,
      default: () => ({})
    },
    /**
     * 高度
     */
    height: {
      type: Number,
      default: 300
    },
    /**
     * 加载触发距离,滚动条与底部距离小于 offset 时触发 load 事件
     */
    offset: {
      type: Number,
      default: 50
    },
    /**
     * 加完完毕提示文案
     */
    finishedText: {
      type: String,
      default: ""
    },
    /**
     * 是否自动加载
     */
    autoLoad: {
      type: Boolean,
      default: !0
    },
    /**
     * 是否使用 store
     * 如果使用 store, 请确认 store 中定义了 pagination 和 initPagination 方法
     */
    useStore: {
      type: Object,
      default: () => null
    },
    /**
     * 原生 [List](https://www.antdv.com/components/list-cn#api) 参数
     */
    listProps: {
      type: Object,
      default: () => ({})
    }
  },
  setup(e, {
    slots: n,
    expose: o
  }) {
    var m;
    const a = z(null), t = z(null), c = J(() => ({
      ...e.listProps
    }));
    let d;
    (m = e.useStore) != null && m.initPagination ? (e.useStore.initPagination({
      uri: e.url,
      params: e.extraData
    }), d = J(() => e.useStore.pagination)) : d = z({
      uri: e.url,
      params: e.extraData
    });
    const i = (g) => {
      d.value = Pd(d.value, g);
    }, {
      y: r
    } = kr(a);
    return oe(r, async (g) => {
      g + e.height + e.offset >= a.value.scrollHeight && !d.value.loading && !d.value.finished && await i();
    }), e.autoLoad && i(), o({
      loadMore: i,
      items: () => d.value.items || [],
      pagination: d
    }), () => {
      var g;
      return u("div", {
        ref: a,
        class: "newbie-list",
        style: {
          height: `${e.height}px`
        }
      }, [u(bd, H({
        ref: t,
        dataSource: ((g = d.value) == null ? void 0 : g.items) || []
      }, c.value), {
        default: () => {
          var y;
          return (y = n.default) == null ? void 0 : y.call(n);
        },
        renderItem: ({
          item: y,
          index: C
        }) => n.renderItem ? n.renderItem({
          item: y,
          index: C
        }) : null,
        loadMore: () => {
          var y, C;
          return [(y = d.value) != null && y.loading ? u("div", {
            class: "loading-container"
          }, [u(Ft, null, null)]) : null, (C = d.value) != null && C.finished ? u("div", {
            class: "finished-text"
          }, [e.finishedText || I("common.loading-finished")]) : null];
        }
      })]);
    };
  }
}), Ms = $e($s), js = $e(ic), Ls = /* @__PURE__ */ Pe({
  name: "NewbiePassword",
  components: {
    InputPassword: wd
  },
  props: {
    /**
     * 输入框的值
     *
     */
    value: {
      type: String,
      default: ""
    },
    /**
     * 最小长度
     */
    min: {
      type: Number,
      default: 8
    },
    /**
     * 最大长度
     */
    max: {
      type: Number,
      default: 20
    },
    /**
     * 宽度
     */
    width: {
      type: [Number, String],
      default: 300
    }
  },
  emits: [
    /**
     * @event update:modelValue
     */
    "update:value",
    /**
     * 输入框内容变化时的回调
     * @event change
     * @param {Event} event 事件对象
     */
    "change"
  ],
  setup(e, {
    emit: n,
    expose: o
  }) {
    const a = z("");
    oe(() => e.modelValue, () => {
      a.value = e.modelValue;
    });
    const t = J(() => {
      let l = 0;
      return [
        /\d/,
        // 包含数字
        /[a-z]/,
        // 包含小写字母
        /[A-Z]/,
        // 包含大写字母
        /[^a-zA-Z0-9]/
        // 包含特殊符号
      ].forEach((g) => {
        g.test(a.value) && (l += 1);
      }), l;
    }), c = ["", "bad", "weak", "medium", "strong"], d = (l) => {
      const {
        value: m
      } = l.target;
      n("change", l), n("update:value", m);
    }, i = J(() => a.value.length > 0 && a.value.length < e.min || a.value.length > e.max || t.value < 4), r = J(() => a.value.length > 0 && a.value.length < e.min ? `密码长度不能少于${e.min}个字符` : a.value.length > e.max ? `密码长度不能超过${e.max}个字符` : t.value < 4 ? "密码必须包含数字、小写字母、大写字母和特殊符号" : "");
    return o({
      /**
       * 密码强度,0 为最弱,4 为最强
       * @type {ComputedRef<number>}
       */
      strength: t
    }), () => u("div", {
      class: "newbie-password",
      style: {
        width: Ee(e.width)
      }
    }, [u(wo("input-password"), {
      value: a.value,
      "onUpdate:value": (l) => a.value = l,
      onChange: d,
      minlength: e.min,
      maxlength: e.max
    }, null), u("div", {
      class: `strength-indicator-container ${c[t.value]}`
    }, [u("div", {
      class: `strength-indicator ${t.value >= 1 ? "active" : ""}`
    }, null), u("div", {
      class: `strength-indicator ${t.value >= 2 ? "active" : ""}`
    }, null), u("div", {
      class: `strength-indicator ${t.value >= 3 ? "active" : ""}`
    }, null), u("div", {
      class: `strength-indicator ${t.value >= 4 ? "active" : ""}`
    }, null)]), i.value ? u("div", {
      class: "error-message"
    }, [r.value]) : null]);
  }
}), zs = $e(Ls), Rs = $e(kl), Bs = $e(qc), Us = $e(cc);
function Vs(e) {
  return e && e === "quiz" ? [{
    title: "题目类型",
    children: [{
      name: "单选",
      type: "radio",
      icon: () => Z(Fn),
      props: {
        defaultProps: {
          optionType: "outlined"
        },
        options: ["A. 选项一", "B. 选项二", "C. 选项三", "D. 选项四"]
      }
    }, {
      name: "多选",
      type: "checkbox",
      icon: () => Z(sa),
      props: {
        options: ["A. 选项一", "B. 选项二", "C. 选项三", "D. 选项四"]
      }
    }, {
      name: "填空",
      type: "input",
      icon: () => Z(lo),
      props: {
        width: "100%"
      }
    }]
  }] : [{
    title: "选择",
    children: [{
      name: "单选",
      type: "radio",
      icon: () => Z(Fn),
      props: {
        defaultProps: {
          optionType: "outlined"
        },
        options: ["选项一", "选项二"]
      }
    }, {
      name: "多选",
      type: "checkbox",
      icon: () => Z(sa),
      props: {
        options: ["选项一", "选项二"]
      }
    }, {
      name: "下拉选择",
      type: "select",
      icon: () => Z(Yd),
      props: {
        options: ["选项一", "选项二"],
        width: 300
      }
    }, {
      name: "开关",
      icon: () => Z(Xd),
      type: "switch"
    }, {
      name: "图片上传",
      type: "uploader",
      icon: () => Z(qd),
      props: {
        //disabled: true,
        defaultProps: {
          accept: ".png,.jpg,.jpeg"
        }
      }
    }, {
      name: "文件上传",
      type: "uploader",
      icon: () => Z(Gt),
      props: {
        //disabled: true,
        defaultProps: {
          accept: ".doc,.docx,.pdf,.xls,.xlsx,.ppt,.pptx,.png,.jpg,jpeg",
          type: "text"
        }
      }
    }]
  }, {
    title: "填空",
    children: [{
      name: "文本",
      type: "input",
      icon: () => Z(lo),
      props: {
        width: "100%"
      }
    }, {
      name: "多行文本",
      icon: () => Z(Qd),
      type: "textarea"
    }, {
      name: "日期",
      icon: () => Z(nt),
      type: "date"
    }, {
      name: "日期范围",
      type: "date",
      icon: () => Z(nt),
      props: {
        width: 300,
        defaultProps: {
          type: "range"
        }
      }
    }, {
      name: "时间",
      icon: () => Z(at),
      type: "time"
    }, {
      name: "时间范围",
      type: "time",
      icon: () => Z(at),
      props: {
        width: 300,
        defaultProps: {
          type: "range"
        }
      }
    }, {
      name: "数字",
      icon: () => Z(Gd),
      type: "number"
    }]
  }, {
    title: "评分",
    children: [{
      name: "星级评分",
      icon: () => Z(Zd),
      type: "rate"
    }, {
      name: "单选评分",
      type: "rate-radio",
      icon: () => Z(Fn),
      props: {
        defaultProps: {
          optionType: "outlined"
        },
        options: [{
          value: "选项一",
          rate: 1
        }, {
          value: "选项二",
          rate: 2
        }, {
          value: "选项三",
          rate: 3
        }]
      }
    }, {
      name: "多选评分",
      type: "rate-checkbox",
      icon: () => Z(sa),
      props: {
        options: [{
          value: "选项一",
          rate: 1
        }, {
          value: "选项二",
          rate: 2
        }, {
          value: "选项三",
          rate: 3
        }]
      }
    }]
  }, {
    title: "矩阵",
    children: [{
      name: "矩阵单选",
      type: "matrix-radio",
      icon: () => Z(Fn),
      props: {
        options: ["好", "一般", "差"],
        rows: ["质量", "外观"]
      }
    }, {
      name: "矩阵多选",
      type: "matrix-checkbox",
      icon: () => Z(sa),
      props: {
        options: ["好", "一般", "差"],
        rows: ["质量", "外观"]
      }
    }, {
      name: "矩阵量表",
      type: "matrix-scale",
      icon: () => Z(Jd),
      props: {
        defaultProps: {
          showScale: !0
        },
        options: [],
        rows: ["质量", "外观"]
      }
    }]
  }, {
    title: "个人信息",
    children: [{
      name: "姓名",
      type: "input",
      icon: () => Z(el),
      props: {
        title: "您的姓名"
      }
    }, {
      name: "性别",
      type: "radio",
      icon: () => Z(nl),
      props: {
        title: "您的性别",
        options: ["男", "女"]
      }
    }, {
      name: "手机号码",
      type: "input",
      icon: () => Z(al),
      props: {
        title: "请输入您的手机号码",
        rules: [{
          pattern: "^1[3456789]\\d{9}$",
          message: "手机号码格式不正确"
        }]
      }
    }, {
      name: "邮箱",
      type: "input",
      icon: () => Z(ol),
      props: {
        title: "请输入您的邮箱地址",
        rules: [{
          pattern: '^(([^<>()[\\]\\\\.,;:\\s@"]+(\\.[^<>()[\\]\\\\.,;:\\s@"]+)*)|.(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$',
          message: "邮箱地址格式不正确"
        }]
      }
    }, {
      name: "省市区",
      type: "address",
      icon: () => Z(tl),
      props: {
        title: "请选择省份城市与地区"
      }
    }]
  }];
}
const Fs = (e, n) => {
  var a, t;
  let o = [
    {
      title: "标题",
      key: "title",
      required: !0,
      type: "textarea"
    },
    {
      title: "必填",
      key: "required",
      type: "switch",
      defaultValue: !1
    },
    {
      title: "备注/提示",
      key: "help"
    },
    {
      title: "添加分页栏",
      type: "switch",
      key: "break",
      defaultValue: !1
    }
  ];
  return ["input", "select", "textarea"].includes(e.type) && (o = o.concat([
    {
      title: "输入框提示",
      key: "placeholder"
    }
  ])), ["matrix-radio", "matrix-checkbox", "matrix-scale"].includes(e.type) && (o = o.concat([
    {
      title: "行标题",
      key: "rows",
      type: "slot"
    }
  ])), ["radio", "checkbox", "select", "matrix-radio", "matrix-checkbox", "matrix-scale", "rate-radio", "rate-checkbox"].includes(e.type) && (o = o.concat([
    {
      title: "选项",
      key: "options",
      type: "slot"
    }
  ])), e.type === "matrix-scale" && (o = o.concat([
    {
      title: "量表等级",
      type: "number",
      key: "level",
      defaultProps: {
        min: 1,
        max: 10
      },
      defaultValue: 5
    }
  ])), e.type === "rate" && (o = o.concat([
    {
      title: "星星总数",
      type: "number",
      key: "count",
      defaultProps: {
        min: 1,
        max: 10
      },
      defaultValue: 5
    },
    {
      title: "是否允许半选",
      type: "switch",
      key: "allowHalf",
      defaultValue: !1
    }
  ])), e.type === "uploader" && (o = o.concat([
    {
      title: "最大上传数",
      key: "maxNum",
      type: "number",
      defaultValue: 1,
      defaultProps: {
        min: 1,
        max: 9
      }
    },
    {
      title: "文件权限",
      key: "privacy",
      type: "radio",
      options: [
        { label: "公开", value: "public" },
        { label: "隐私", value: "private" }
      ],
      help: "公开:如新闻图片,通知文件等对所有人可见;隐私:如个人照片,私密文件等会进行访问限制",
      defaultValue: "public"
    }
  ])), n && n === "quiz" && (o = o.concat([
    {
      title: "分值",
      key: "quiz_score",
      type: "number",
      required: !0,
      defaultValue: 1
    }
  ]), !e.type || e.type === "input" ? o = o.concat([
    {
      break: !0,
      title: "正确答案",
      key: "__quiz_answer"
    }
  ]) : e.type === "radio" ? o = o.concat([
    {
      break: !0,
      title: "正确答案",
      key: "__quiz_answer",
      type: "select",
      options: (a = e.props.options) == null ? void 0 : a.map((c, d) => String.fromCharCode(65 + d))
    }
  ]) : e.type === "checkbox" && (o = o.concat([
    {
      break: !0,
      title: "正确答案",
      key: "__quiz_answer",
      type: "select",
      options: (t = e.props.options) == null ? void 0 : t.map((c, d) => String.fromCharCode(65 + d)),
      defaultProps: {
        mode: "multiple"
      }
    }
  ])), o = o.concat([
    {
      title: "解析",
      key: "__quiz_analysis",
      type: "textarea"
    }
  ])), o;
}, Ks = (e, n) => {
  var t, c, d, i, r, l;
  const o = e.props, a = {};
  return ["title", "required", "help", "break"].forEach((m) => {
    a[m] = o[m];
  }), n && n === "quiz" && (a.quiz_score = o.quiz_score, a.__quiz_answer = o.__quiz_answer, a.__quiz_analysis = o.__quiz_analysis), ["radio", "checkbox", "select", "rate-radio", "rate-checkbox"].includes(e.type) && (a.options = o.options), ["input", "select", "textarea"].includes(e.type) && (a.placeholder = o.placeholder), e.type === "rate" && (a.count = (t = o.defaultProps) == null ? void 0 : t.count, a.allowHalf = (c = o.defaultProps) == null ? void 0 : c.allowHalf), e.type === "matrix-scale" && (a.level = (d = o.defaultProps) == null ? void 0 : d.level), e.type === "uploader" && (a.maxNum = ((i = o.defaultProps) == null ? void 0 : i.maxNum) || 1, a.privacy = ((l = (r = o.defaultProps) == null ? void 0 : r.extraData) == null ? void 0 : l.type) || "private"), a;
}, Hs = (e, n, o) => {
  if (!n)
    return;
  const a = n.props;
  ["title", "required", "help", "break"].forEach((t) => {
    a[t] = e[t];
  }), o && o === "quiz" && (a.quiz_score = e.quiz_score, a.__quiz_answer = e.__quiz_answer, a.__quiz_analysis = e.__quiz_analysis), ["radio", "checkbox", "select", "rate-radio", "rate-checkbox"].includes(n.type) && (a.options = e.options), ["input", "select", "textarea"].includes(n.type) && (a.placeholder = e.placeholder), n.type === "rate" && (a.defaultProps || (a.defaultProps = {}), a.defaultProps.count = e.count, a.defaultProps.allowHalf = e.allowHalf), n.type === "matrix-scale" && (a.defaultProps || (a.defaultProps = {}), a.defaultProps.level = e.level), n.type === "uploader" && (a.defaultProps || (a.defaultProps = {}), a.defaultProps.extraData || (a.defaultProps.extraData = {}), a.defaultProps.maxNum = e.maxNum, a.defaultProps.extraData.type = e.privacy);
}, Ws = /* @__PURE__ */ Pe({
  name: "NewbieFormDesigner",
  props: {
    /**
     * 标题
     */
    title: {
      type: String,
      default: ""
    },
    /**
     * @typedef {Object} FormDesignerWidget
     * @property {string} name 组件名称
     * @property {string} type 组件实际类型
     * @property {string} [icon] 组件图标
     * @property {Object} [props] 组件的预设配置
     **/
    /**
     *
     * 额外的业务组件
     *
     * @typedef {Object|Array} FormDesignerWidgetGroup
     * @property {string} [title] 分组标题
     * @property {Array.<FormDesignerWidget>} children 组件类型
     */
    widgets: {
      type: Array,
      default: () => []
    },
    /**
     * 表单项
     *
     * @typedef {Object|Array} FormDesignerFormItemConfig
     * @property {string} key 表单项的唯一标识
     * @property {string} type 表单项的类型
     * @property {string} title 表单项的标题
     * @property
     */
    formItems: {
      type: [Array, Function],
      default: () => []
    },
    /**
     * 组件高度
     */
    height: {
      type: [String, Number],
      default: "100%"
    },
    /**
     * 设计类型,默认为表单设置,可选 quiz: 知识竞赛设计(题目带答案和解析)
     */
    mode: {
      type: String,
      default: null
    }
  },
  emits: ["submit"],
  setup(e, {
    emit: n
  }) {
    const o = z(null), a = qe({
      submitForm: {},
      painterItems: [],
      //由于Draggable只能纯粹Copy原来的数据,需要定义另外一个处理后的数组负责渲染
      dragOptions: {
        animation: 200,
        group: "designer",
        disabled: !1,
        ghostClass: "ghost"
      },
      isDragging: !1,
      currentItem: null,
      currentIndex: null,
      propsFormData: {},
      showOptionsModal: !1,
      showValueOptionsModal: !1,
      currentOptionItem: null,
      optionsValue: "",
      rateValue: ""
    }), t = () => {
      let v = [];
      j(e.formItems) ? v = e.formItems() : v = Ce(e.formItems), a.painterItems = v.map((w) => ({
        key: w.key,
        type: w.type,
        name: w.title,
        props: w
      }));
    };
    oe(() => e.formItems, () => t(), {
      deep: !0
    }), t();
    const c = Vs(e.mode).concat(e.widgets).map((v) => (ye(v) && (v = {
      children: v
    }), v)), d = z(c), i = (v) => {
      const w = Ce(v);
      return w.key = Math.random().toString(36).slice(2) + Math.random().toString(36).slice(2), w.props || (w.props = {}), w.props.title = w.props.title || w.name, w.props.key = w.key, w.props.type = w.type, w.props.placeholder = " - ", w;
    }, r = (v) => {
      const w = i(v);
      a.painterItems.push(w), l(a.painterItems.length - 1);
    }, l = (v) => {
      a.currentItem = a.painterItems[v], a.currentIndex = v, a.propsFormData = Ks(a.painterItems[v], e.mode);
    }, m = ({
      newIndex: v
    }) => {
      v === 0 && l(0);
    }, g = (v) => {
      var w;
      a.painterItems[v].key === ((w = a.currentItem) == null ? void 0 : w.key) && (a.currentItem = null, a.currentIndex = null), a.painterItems.splice(v, 1);
    }, y = (v) => {
      var w, E, k;
      if (a.currentOptionItem = v, a.currentItem.type.startsWith("rate-")) {
        let P = "", O = "";
        const x = ((w = a.currentItem) == null ? void 0 : w.props[v.key]) || [];
        x.forEach((_, D) => {
          Ke(_) ? (P += _.value, O += _.rate ? String(_.rate) : "") : P += _, D < x.length - 1 && (P += `
`, O += `
`);
        }), a.optionsValue = P, a.rateValue = O, a.showValueOptionsModal = !0;
      } else
        a.optionsValue = (k = (E = a.currentItem) == null ? void 0 : E.props[v.key]) == null ? void 0 : k.join(`
`), a.showOptionsModal = !0;
    }, C = () => {
      if (!a.optionsValue.trim()) {
        ge.warn("请至少设置一个选项");
        return;
      }
      if (!a.currentOptionItem)
        return;
      let v = a.optionsValue.split(`
`).filter((w) => w.trim());
      if (e.mode === "quiz" && (v = v.map((w, E) => /^[A-Z]\.\s?/.test(w) ? w : `${String.fromCharCode(65 + E)}. ${w}`)), !Ln(v, Go(v))) {
        ge.warn("选项有重复,请检查数据");
        return;
      }
      a.currentItem.props || (a.currentItem.props = {}), a.currentItem.props[a.currentOptionItem.key] = v, a.showOptionsModal = !1;
    }, f = () => {
      if (!a.optionsValue.trim()) {
        ge.warn("请至少设置一个选项");
        return;
      }
      if (!a.currentOptionItem)
        return;
      const v = a.optionsValue.split(`
`).filter((E) => E.trim()), w = a.rateValue.split(`
`);
      if (!Ln(v, Go(v))) {
        ge.warn("选项有重复,请检查数据");
        return;
      }
      a.currentItem.props || (a.currentItem.props = {}), a.currentItem.props[a.currentOptionItem.key] = v.map((E, k) => ({
        label: E,
        value: E,
        rate: w[k] ? String(w[k]).trim() : 0
      })), a.showOptionsModal = !1, a.showValueOptionsModal = !1;
    }, p = (v) => {
      const {
        key: w
      } = v;
      w === "increase" ? a.rateValue = a.optionsValue.split(`
`).map((E, k) => k + 1).join(`
`) : a.rateValue = a.rateValue.split(`
`).map((E) => !isNaN(E) && !isNaN(parseFloat(E)) ? w === "add1" ? Number(E) + 1 : Number(E) - 1 : E).join(`
`);
    }, b = () => {
      en.confirm({
        title: "清空表单",
        content: "清空表单后,所有数据将被清空,是否继续?",
        onOk: () => {
          a.painterItems = [], a.submitForm = {};
        }
      });
    }, h = () => {
      var v;
      n("submit", (v = a.painterItems) != null && v.length ? a.painterItems.map((w) => w.props) : []);
    }, s = J(() => {
      var v;
      return (v = o.value) == null ? void 0 : v.getForm();
    });
    return oe(() => s.value, (v) => {
      Hs(v, a.currentItem, e.mode);
    }, {
      deep: !0
    }), () => {
      const v = () => d.value.map((x) => u("div", {
        class: "widget-list-container"
      }, [u("div", {
        class: "widget-list-title"
      }, [x.title || "默认"]), u(fo, {
        tag: "div",
        list: x.children,
        sort: !1,
        group: {
          name: "designer",
          pull: "clone",
          put: !1
        },
        clone: i,
        handle: ".drag-handle",
        class: "widget-list",
        itemKey: "name"
      }, {
        item: ({
          element: _
        }) => u(re, {
          class: "widget-item drag-handle",
          onClick: () => r(_)
        }, {
          default: () => [_.icon ? u("span", {
            role: "img",
            class: "widget-icon"
          }, [j(_.icon) ? _.icon() : _.icon]) : null, u("span", {
            class: "widget-name"
          }, [_.name])]
        })
      })])), w = () => u("div", {
        class: "newbie-form-designer__widget-container"
      }, [u("div", {
        class: "widget-func-container"
      }, [u(re, {
        type: "primary",
        icon: u(cl, null, null),
        onClick: h
      }, {
        default: () => [xe("保存表单")]
      }), u(Ye, {
        title: "清空表单"
      }, {
        default: () => [u(re, {
          type: "primary",
          danger: !0,
          ghost: !0,
          icon: u(co, null, null),
          onClick: b
        }, null)]
      })]), u(Cn, null, {
        default: () => [xe("组件")]
      }), u("div", {
        class: "widget-container"
      }, [v()])]), E = () => u("div", {
        class: "newbie-form-designer__painter-container"
      }, [u(Ta, {
        labelCol: {
          span: 24
        },
        wrapperCol: {
          span: 24
        },
        model: a.submitForm,
        labelAlign: "left",
        class: "newbie-form"
      }, {
        default: () => [e.title ? u("div", {
          class: "painter-title"
        }, [e.title]) : null, a.painterItems.length ? null : u("div", {
          class: "newbie-form-designer__help-wrapper"
        }, [u("p", null, [u(dl, {
          style: {
            marginRight: "4px"
          }
        }, null), xe("请点击或者拖拽左侧组件至下面区域生成表单")])]), u(zt, null, {
          default: () => [u(fo, H({
            list: a.painterItems,
            class: "painter-wrapper",
            handle: ".painter-item",
            itemKey: "key",
            key: "key"
          }, a.dragOptions, {
            onStart: () => a.isDragging = !0,
            onEnd: () => a.isDragging = !1,
            onAdd: m
          }), {
            item: ({
              element: x,
              index: _
            }) => {
              var A;
              const D = String(_ + 1).padStart(2, "0") + ".";
              return u("div", {
                class: `painter-item ${((A = a.currentItem) == null ? void 0 : A.key) === x.key ? "active" : ""}`,
                key: x.key,
                onClick: () => l(_)
              }, [u("div", {
                class: "drag-handle"
              }, [u(ll, null, null)]), u("div", {
                class: "op-container"
              }, [u("div", {
                class: "op-item",
                onClick: Fe(() => g(_), ["stop"])
              }, [u(Ye, {
                title: "删除"
              }, {
                default: () => [u(co, null, null)]
              })])]), x.props.break ? u(Cn, null, {
                default: () => "分页栏"
              }) : null, oa({
                formItemSlots: {
                  label: () => u("div", {
                    class: "item-label"
                  }, [u("span", {
                    class: "item-index"
                  }, [D]), u("span", {
                    class: "item-name"
                  }, [x.props.title])])
                },
                ...x.props
              }, a.submitForm, {
                props: {}
              })]);
            }
          })]
        })]
      })]), k = () => u("div", {
        class: "newbie-form-designer__props-container"
      }, [a.currentItem ? [u("div", {
        class: "widget-name"
      }, [a.currentItem.icon ? u("span", {
        role: "img",
        class: "widget-icon"
      }, [j(a.currentItem.icon) ? a.currentItem.icon() : a.currentItem.icon]) : null, a.currentItem.name]), u(Gc, {
        ref: o,
        form: () => Fs(a.currentItem, e.mode),
        cardWrapper: !1,
        closable: !1,
        data: a.propsFormData
      }, {
        options: ({
          item: x
        }) => u(ao, {
          label: x.title
        }, {
          default: () => u(re, {
            type: "primary",
            onClick: () => y(x)
          }, {
            default: () => "设置选项"
          })
        }),
        rows: ({
          item: x
        }) => u(ao, {
          label: x.title
        }, {
          default: () => u(re, {
            type: "primary",
            onClick: () => y(x)
          }, {
            default: () => "设置行标题"
          })
        })
      })] : u("div", {
        class: "empty-props"
      }, [u(kd, {
        description: "未选中内容"
      }, null)])]), P = () => u(en, {
        open: a.showOptionsModal,
        "onUpdate:open": (x) => a.showOptionsModal = x,
        title: "选项设置",
        onOk: C
      }, {
        default: () => [u(Xo, {
          message: e.mode === "quiz" ? "每行一个选项,选项不能重复,选项序号A, B, C, D...会自动添加" : "每行一个选项,选项不能重复",
          style: {
            marginBottom: "10px"
          }
        }, null), u(ha, {
          value: a.optionsValue,
          "onUpdate:value": (x) => a.optionsValue = x,
          placeholder: `每行一个选项,如:
选项一
选项二`,
          "auto-size": {
            minRows: 14,
            maxRows: 14
          }
        }, null)]
      }), O = () => u(en, {
        open: a.showValueOptionsModal,
        "onUpdate:open": (x) => a.showValueOptionsModal = x,
        title: "选项设置",
        onOk: f
      }, {
        default: () => [u(Xo, {
          message: "每行一个选项,且选项不能重复",
          style: {
            marginBottom: "10px"
          }
        }, null), u(Dn, {
          gutter: 8
        }, {
          default: () => [u(un, {
            span: 14
          }, {
            default: () => [u("div", null, [xe("选项")]), u(ha, {
              value: a.optionsValue,
              "onUpdate:value": (x) => a.optionsValue = x,
              placeholder: `每行一个选项,如:
选项一
选项二`,
              "auto-size": {
                minRows: 14,
                maxRows: 14
              }
            }, null)]
          }), u(un, {
            span: 10
          }, {
            default: () => [u(Co, null, {
              default: () => u("div", null, [u("a", {
                class: "ant-dropdown-link"
              }, [xe("分值(不填代表0分)"), u(_o, {
                style: {
                  marginLeft: "4px",
                  fontSize: "12px"
                }
              }, null)])]),
              overlay: () => u(So, {
                onClick: p
              }, {
                default: () => [u(Xn, {
                  key: "increase"
                }, {
                  default: () => "分数从 1 开始顺序递增"
                }), u(Xn, {
                  key: "add1"
                }, {
                  default: () => "选项分数全部加 1"
                }), u(Xn, {
                  key: "minus1"
                }, {
                  default: () => "选项分数全部减 1"
                })]
              })
            }), u(ha, {
              value: a.rateValue,
              "onUpdate:value": (x) => a.rateValue = x,
              placeholder: `每行一个对应分值,如:
1
2`,
              "auto-size": {
                minRows: 14,
                maxRows: 14
              }
            }, null)]
          })]
        })]
      });
      return u("div", {
        class: "newbie-form-designer",
        style: {
          height: Ee(e.height)
        }
      }, [w(), E(), k(), P(), O()]);
    };
  }
}), Ys = $e(Ws), Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  NewbieAddress: sl,
  NewbieButton: ul,
  NewbieEditor: Cl,
  NewbieForm: Ns,
  NewbieFormDesigner: Ys,
  NewbieList: Ms,
  NewbieModal: js,
  NewbiePassword: zs,
  NewbieProvider: Rs,
  NewbieSearch: Bs,
  NewbieTable: bs,
  NewbieUploader: Us,
  useAddressFullCode: il,
  useTableActions: vs,
  useTableFile: ys,
  useTableImage: Qc
}, Symbol.toStringTag, { value: "Module" })), Xs = { yes: "是", no: "否", actions: "操作", add: "添加", delete: "删除", edit: "编辑", save: "保存", confirm: "确定", cancel: "取消", close: "关闭", clear: "清除", more: "更多", "action-prompt": "操作提示", "close-confirm": "确定关闭吗?", "delete-confirm": "确定删除吗?", "cancel-confirm": "确定取消吗?", "edit-confirm": "确定编辑吗?", "save-confirm": "确定保存吗?", "save-success": "保存成功", "save-error": "保存失败", "delete-success": "删除成功", "delete-error": "删除失败", success: "成功", error: "错误", fail: "失败", loading: "加载中", "loading-finished": "数据加载完毕", data: "数据", "no-data": "暂无数据", content: "内容", "no-content": "暂无内容", search: "搜索", start: "开始", end: "结束" }, qs = { "please-select": "请选择{title}", "please-input": "请填写{title}", "please-upload": "请上传{title}", "search-placeholder": "请输入搜索内容", upload: "上传", "upload-fail": "上传失败,请稍后再试", "upload-size-limit": "超过服务器上传附件的大小限制", "upload-size-max": "上传文件大小不能超过{size}MB", "upload-num-max": "最多只能上传{num}个文件", options: "选项", title: "标题", "row-title": "行标题", scale: "分值", attachment: "附件" }, Qs = { equal: "等于", "not-equal": "不等于", include: "包含", exclude: "不包含", "include-sub": "包括子级", "less-than": "小于", "greater-than": "大于", between: "介于", null: "为空", "not-null": "不为空", "multiple-choice-available": "可多选", "start-time": "开始时间", "end-time": "结束时间", "last-week": "上周", "last-month": "上个月", "past-week": "过去一周", "past-two-weeks": "过去两周", "past-month": "过去一个月", "past-days": "过去{days}天", "textarea-placeholder": "搜索{title},每行一个", "sort-setting": "排序设置", "toggle-more": "展示/关闭更多搜索选项", collapse: "收起", "clear-all-search-items": "清除所有搜索项", "search-items": "搜索条件", "item-unit": "项", "items-unit": "项", "sortable-items": "可排序项", "sorted-items": "已排序项", "select-sorting-item": "请选择排序项", ascending: "升序排序", descending: "降序排序", "remove-item": "移除当前项" }, Gs = { editable: "可编辑", total: "共 {total} 条", custom: "自定义列", "select-all": "全选", "unselect-all": "取消全选", attachment: "查看附件 {title}" }, Zs = {
  common: Xs,
  form: qs,
  search: Qs,
  table: Gs
}, Js = { yes: "Yes", no: "No", actions: "Actions", add: "Add", delete: "Delete", edit: "Edit", save: "Save", confirm: "Confirm", cancel: "Cancel", close: "Close", clear: "Clear", more: "More", "action-prompt": "Tips", "close-confirm": "Are you sure you want to close?", "delete-confirm": "Are you sure you want to delete this item`?", "cancel-confirm": "Are you sure you want to cancel this action?", "edit-confirm": "Are you sure you want to edit this item?", "save-confirm": "Are you sure you want to save this item?", "save-success": "Save success", "save-error": "Save error", "delete-success": "Delete success", "delete-error": "Delete error", success: "Success", error: "Error", fail: "Fail", loading: "Loading", "loading-finished": "Finished", data: "Data", "no-data": "No data", content: "Content", "no-content": "No content", search: "Search", start: "Start", end: "End" }, e0 = { "please-select": "Please select {title}", "please-input": "Please input {title}", "please-upload": "Please upload {title}", "search-placeholder": "Please enter search content", upload: "Upload", "upload-fail": "Upload fail", "upload-size-limit": "Exceeded the server upload attachment size limit", "upload-size-max": "The maximum file size you can upload is {size}MB", "upload-num-max": "You can only upload up to {num} files", options: "Options", title: "Title", "row-title": "Row title", scale: "Scale", attachment: "Attachment" }, n0 = { equal: "Equal to", "not-equal": "Not equal to", include: "Include", exclude: "Exclude", "include-sub": "Include sub-level", "less-than": "Less than", "greater-than": "Greater than", between: "Between", null: "Null", "not-null": "Not null", "multiple-choice-available": "Multiple choice available", "start-time": "Start time", "end-time": "End time", "last-week": "Last week", "last-month": "Last month", "past-week": "Past week", "past-two-weeks": "Past two weeks", "past-month": "Past month", "past-days": "Past {days} days", "textarea-placeholder": "Search {title},one per line", "sort-setting": "Sort setting", "toggle-more": "Show/Hide More Search Options", collapse: "Collapse", "clear-all-search-items": "Clear all search items", "search-items": "Search", "item-unit": "item", "items-unit": "items", "sortable-items": "Sortable items", "sorted-items": "Sorted items", "select-sorting-item": "Please select sorting items", ascending: "Ascending", descending: "Descending", "remove-item": "Remove sorting item" }, a0 = { editable: "Editable", total: "Total {total}", custom: "Custom", "select-all": "Select all", "unselect-all": "Unselect all", attachment: "Attachment {title}" }, o0 = {
  common: Js,
  form: e0,
  search: n0,
  table: a0
}, t0 = {
  zh_CN: Zs,
  en_US: o0
}, c0 = _d({
  legacy: !1,
  locale: "zh_CN",
  // 默认语言
  fallbackLocale: "zh_CN",
  // 回退语言
  messages: t0
}), f0 = {
  install(e) {
    e.use(c0);
    for (const n in Dt) {
      const o = Dt[n];
      e.use(o);
    }
  },
  /**
   * 用于配置一些全局的工具参数
   * @param httpStatus
   */
  config({ httpStatus: e }) {
    e && Object.keys(e).length && Dd(e);
  }
};
export {
  sl as NewbieAddress,
  ul as NewbieButton,
  Cl as NewbieEditor,
  Ns as NewbieForm,
  Ys as NewbieFormDesigner,
  Ms as NewbieList,
  js as NewbieModal,
  zs as NewbiePassword,
  Rs as NewbieProvider,
  Bs as NewbieSearch,
  bs as NewbieTable,
  Us as NewbieUploader,
  f0 as default,
  il as useAddressFullCode,
  vs as useTableActions,
  ys as useTableFile,
  Qc as useTableImage
};
//# sourceMappingURL=jobsys-newbie.js.map