jmash-region 0.0.2 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{edit-BBgaXo7r.mjs → edit-DTkFVHk1.mjs} +1 -1
  2. package/dist/{edit.vue_vue_type_script_setup_true_lang-C4FJ1dMZ.mjs → edit.vue_vue_type_script_setup_true_lang-70FNJkv4.mjs} +196 -196
  3. package/dist/index-CxRWNkUU.mjs +422 -0
  4. package/dist/{index-BuYbOeq6.mjs → index-DQQestCN.mjs} +14 -15
  5. package/dist/index-NeklU2VV.mjs +1674 -0
  6. package/dist/index.mjs +6 -1428
  7. package/dts/{index.d.ts → src/index.d.ts} +3 -2
  8. package/dts/{utils → src/utils}/index.d.ts +0 -1
  9. package/package.json +12 -11
  10. package/dist/index-C0q1Spk1.mjs +0 -4
  11. package/dist/index-CYXjL9hA.mjs +0 -4
  12. package/dist/index-DWUZrsjg.mjs +0 -550
  13. package/dist/index-S5ZXIciD.mjs +0 -12
  14. package/dist/index.vue_vue_type_script_setup_true_lang-BKzkVa9A.mjs +0 -63
  15. package/dist/index.vue_vue_type_script_setup_true_lang-DTmt2AA1.mjs +0 -58
  16. package/dts/components/JmashTable/index.vue.d.ts +0 -47
  17. /package/dts/{App.vue.d.ts → src/App.vue.d.ts} +0 -0
  18. /package/dts/{api → src/api}/region/dict.d.ts +0 -0
  19. /package/dts/{api → src/api}/region/index.d.ts +0 -0
  20. /package/dts/{api → src/api}/region/os-dict-region/index.d.ts +0 -0
  21. /package/dts/{api → src/api}/region/os-dict-region/types.d.ts +0 -0
  22. /package/dts/{components → src/components}/JmashRegionCascader/index.vue.d.ts +0 -0
  23. /package/dts/{components → src/components}/JmashRegionTree/index.vue.d.ts +0 -0
  24. /package/dts/{constant.d.ts → src/constant.d.ts} +0 -0
  25. /package/dts/{lang → src/lang}/index.d.ts +0 -0
  26. /package/dts/{lang → src/lang}/region/en.d.ts +0 -0
  27. /package/dts/{lang → src/lang}/region/zh-cn.d.ts +0 -0
  28. /package/dts/{main.d.ts → src/main.d.ts} +0 -0
  29. /package/dts/{permission.d.ts → src/permission.d.ts} +0 -0
  30. /package/dts/{views → src/views}/region/os-dict-region/edit.vue.d.ts +0 -0
  31. /package/dts/{views → src/views}/region/os-dict-region/index.vue.d.ts +0 -0
  32. /package/dts/{views → src/views}/region/os-region-component/index.vue.d.ts +0 -0
@@ -1,12 +1,11 @@
1
1
  var Tn = Object.defineProperty;
2
2
  var Dn = (n, i, g) => i in n ? Tn(n, i, { enumerable: !0, configurable: !0, writable: !0, value: g }) : n[i] = g;
3
3
  var q = (n, i, g) => Dn(n, typeof i != "symbol" ? i + "" : i, g);
4
- import { ref as D, reactive as E, defineComponent as En, mergeModels as W, useModel as Nn, resolveComponent as k, openBlock as S, createBlock as A, withCtx as j, createElementVNode as Mn, createVNode as c, createTextVNode as Y, toDisplayString as H, unref as b, createElementBlock as Q, Fragment as J, renderList as X } from "vue";
4
+ import { ref as D, reactive as E, defineComponent as En, mergeModels as W, useModel as Nn, resolveComponent as k, createBlock as A, openBlock as S, withCtx as j, createVNode as t, unref as b, createElementBlock as Y, Fragment as H, renderList as Q, createElementVNode as Mn, createTextVNode as J, toDisplayString as X } from "vue";
5
5
  import { ElMessage as nn } from "element-plus";
6
6
  import { EnumDict as gn } from "jmash-core";
7
- import { dictRegionApi as I } from "./index.mjs";
8
- import { useI18n as Rn } from "vue-i18n";
9
- import { e as Zn } from "./index-S5ZXIciD.mjs";
7
+ import { d as I, e as Rn } from "./index-NeklU2VV.mjs";
8
+ import { useI18n as Zn } from "vue-i18n";
10
9
  class p {
11
10
  }
12
11
  // 模块
@@ -62,8 +61,8 @@ function M(n) {
62
61
  const i = [];
63
62
  let g = 0;
64
63
  for (; g < n.length; ) {
65
- const h = n[g];
66
- An.test(h) && Un.test(n[g + 1]) ? (i.push(n.substring(g, g + 2)), g += 2) : (i.push(h), g += 1);
64
+ const u = n[g];
65
+ An.test(u) && Un.test(n[g + 1]) ? (i.push(n.substring(g, g + 2)), g += 2) : (i.push(u), g += 1);
67
66
  }
68
67
  return i;
69
68
  }
@@ -83,8 +82,8 @@ class fn {
83
82
  if (i.length > 1)
84
83
  this.StringDICT.set(i, g);
85
84
  else {
86
- const h = i.charCodeAt(0);
87
- this.NumberDICT[h] = g;
85
+ const u = i.charCodeAt(0);
86
+ this.NumberDICT[u] = g;
88
87
  }
89
88
  }
90
89
  clear() {
@@ -18885,8 +18884,8 @@ function Kn() {
18885
18884
  };
18886
18885
  for (let i in sn)
18887
18886
  for (let g in on) {
18888
- const h = `${i}${g}`, u = `${sn[i]} ${on[g]}`;
18889
- n[h] = u;
18887
+ const u = `${i}${g}`, h = `${sn[i]} ${on[g]}`;
18888
+ n[u] = h;
18890
18889
  }
18891
18890
  return n;
18892
18891
  }
@@ -18917,11 +18916,11 @@ function Qn(n, i, g) {
18917
18916
  if (i === g && i && v(i) !== i)
18918
18917
  return Z(v(n));
18919
18918
  if (g && !Yn[n].includes(g)) {
18920
- const h = v(g);
18921
- if (h !== g) {
18922
- const u = V(h), o = wn[n];
18919
+ const u = v(g);
18920
+ if (u !== g) {
18921
+ const h = V(u), o = wn[n];
18923
18922
  for (let s in o)
18924
- if (o[s].indexOf(Number(u)) !== -1)
18923
+ if (o[s].indexOf(Number(h)) !== -1)
18925
18924
  return s;
18926
18925
  }
18927
18926
  }
@@ -21601,7 +21600,7 @@ const $ = {
21601
21600
  length: 2,
21602
21601
  priority: f.Normal,
21603
21602
  dict: Symbol("dict2")
21604
- })), tn = {
21603
+ })), cn = {
21605
21604
  为什么: "wèi shén me",
21606
21605
  实际上: "shí jì shang",
21607
21606
  检察长: "jiǎn chá zhǎng",
@@ -21927,14 +21926,14 @@ const $ = {
21927
21926
  干哪行: "gàn nǎ háng",
21928
21927
  干一行: "gàn yì háng",
21929
21928
  曲别针: "qū bié zhēn"
21930
- }, gi = Object.keys(tn).map((n) => ({
21929
+ }, gi = Object.keys(cn).map((n) => ({
21931
21930
  zh: n,
21932
- pinyin: tn[n],
21931
+ pinyin: cn[n],
21933
21932
  probability: 2e-8,
21934
21933
  length: 3,
21935
21934
  priority: f.Normal,
21936
21935
  dict: Symbol("dict3")
21937
- })), cn = {
21936
+ })), tn = {
21938
21937
  成吉思汗: "chéng jí sī hán",
21939
21938
  四通八达: "sì tōng bā dá",
21940
21939
  一模一样: "yì mú yí yàng",
@@ -23530,9 +23529,9 @@ const $ = {
23530
23529
  曲意逢迎: "qū yì féng yíng",
23531
23530
  一行不行: "yì háng bù xíng",
23532
23531
  行行不行: "háng háng bù xíng"
23533
- }, hi = Object.keys(cn).map((n) => ({
23532
+ }, hi = Object.keys(tn).map((n) => ({
23534
23533
  zh: n,
23535
- pinyin: cn[n],
23534
+ pinyin: tn[n],
23536
23535
  probability: 2e-8,
23537
23536
  length: 4,
23538
23537
  priority: f.Normal,
@@ -23572,17 +23571,17 @@ function si(n) {
23572
23571
  }
23573
23572
  function oi(n, i) {
23574
23573
  const g = [];
23575
- let h = n.length - 1, u = n[h];
23574
+ let u = n.length - 1, h = n[u];
23576
23575
  for (let o = i - 1; o >= 0; o--) {
23577
23576
  const s = o + 1 >= i ? { probability: 1, decimal: 0, patterns: [] } : g[o + 1];
23578
- for (; u && u.index + u.length - 1 === o; ) {
23579
- const y = u.index, z = {
23580
- probability: u.probability * s.probability,
23581
- decimal: s.decimal + si(u),
23577
+ for (; h && h.index + h.length - 1 === o; ) {
23578
+ const y = h.index, z = {
23579
+ probability: h.probability * s.probability,
23580
+ decimal: s.decimal + si(h),
23582
23581
  patterns: s.patterns,
23583
- concatPattern: u
23582
+ concatPattern: h
23584
23583
  };
23585
- jn(z), g[y] = en(g[y], z), u = n[--h];
23584
+ jn(z), g[y] = en(g[y], z), h = n[--u];
23586
23585
  }
23587
23586
  const l = {
23588
23587
  probability: 1e-13 * s.probability,
@@ -23601,16 +23600,16 @@ function li(n) {
23601
23600
  }
23602
23601
  function zi(n, i) {
23603
23602
  const g = [];
23604
- let h = n.length - 1, u = n[h];
23603
+ let u = n.length - 1, h = n[u];
23605
23604
  for (let o = i - 1; o >= 0; o--) {
23606
23605
  const s = o + 1 >= i ? { count: 0, patterns: [] } : g[o + 1];
23607
- for (; u && u.index + u.length - 1 === o; ) {
23608
- const y = u.index, z = {
23609
- count: li(u) + s.count,
23606
+ for (; h && h.index + h.length - 1 === o; ) {
23607
+ const y = h.index, z = {
23608
+ count: li(h) + s.count,
23610
23609
  patterns: s.patterns,
23611
- concatPattern: u
23610
+ concatPattern: h
23612
23611
  };
23613
- g[y] = rn(g[y], z), u = n[--h];
23612
+ g[y] = rn(g[y], z), h = n[--u];
23614
23613
  }
23615
23614
  const l = {
23616
23615
  count: 1 + s.count,
@@ -23623,14 +23622,14 @@ function zi(n, i) {
23623
23622
  function yi(n, i) {
23624
23623
  return !(i.index + i.length <= n.index || i.priority > n.priority || i.priority === n.priority && i.length > n.length);
23625
23624
  }
23626
- function ti(n) {
23625
+ function ci(n) {
23627
23626
  const i = [];
23628
23627
  for (let g = n.length - 1; g >= 0; ) {
23629
- const { index: h } = n[g];
23630
- let u = g - 1;
23631
- for (; u >= 0 && yi(n[g], n[u]); )
23632
- u--;
23633
- (u < 0 || n[u].index + n[u].length <= h) && i.push(n[g]), g = u;
23628
+ const { index: u } = n[g];
23629
+ let h = g - 1;
23630
+ for (; h >= 0 && yi(n[g], n[h]); )
23631
+ h--;
23632
+ (h < 0 || n[h].index + n[h].length <= u) && i.push(n[g]), g = h;
23634
23633
  }
23635
23634
  return i.reverse();
23636
23635
  }
@@ -23639,11 +23638,11 @@ var bn;
23639
23638
  n[n.ReverseMaxMatch = 1] = "ReverseMaxMatch", n[n.MaxProbability = 2] = "MaxProbability", n[n.MinTokenization = 3] = "MinTokenization";
23640
23639
  })(bn || (bn = {}));
23641
23640
  class xn {
23642
- constructor(i, g = "", h = "") {
23643
- this.children = /* @__PURE__ */ new Map(), this.fail = null, this.patterns = [], this.parent = i, this.prefix = g, this.key = h;
23641
+ constructor(i, g = "", u = "") {
23642
+ this.children = /* @__PURE__ */ new Map(), this.fail = null, this.patterns = [], this.parent = i, this.prefix = g, this.key = u;
23644
23643
  }
23645
23644
  }
23646
- class ci {
23645
+ class ti {
23647
23646
  constructor() {
23648
23647
  this.dictMap = /* @__PURE__ */ new Map(), this.queues = [], this.root = new xn(null);
23649
23648
  }
@@ -23653,29 +23652,29 @@ class ci {
23653
23652
  // 构建 trie 树
23654
23653
  buildTrie(i) {
23655
23654
  for (let g of i) {
23656
- const h = M(g.zh);
23657
- let u = this.root;
23658
- for (let o = 0; o < h.length; o++) {
23659
- let s = h[o];
23660
- if (!u.children.has(s)) {
23661
- const l = new xn(u, h.slice(0, o).join(""), s);
23662
- u.children.set(s, l), this.addNodeToQueues(l);
23655
+ const u = M(g.zh);
23656
+ let h = this.root;
23657
+ for (let o = 0; o < u.length; o++) {
23658
+ let s = u[o];
23659
+ if (!h.children.has(s)) {
23660
+ const l = new xn(h, u.slice(0, o).join(""), s);
23661
+ h.children.set(s, l), this.addNodeToQueues(l);
23663
23662
  }
23664
- u = u.children.get(s);
23663
+ h = h.children.get(s);
23665
23664
  }
23666
- this.insertPattern(u.patterns, g), g.node = u, this.addPatternToDictMap(g);
23665
+ this.insertPattern(h.patterns, g), g.node = h, this.addPatternToDictMap(g);
23667
23666
  }
23668
23667
  }
23669
23668
  // 构建失败指针
23670
23669
  buildFailPointer() {
23671
23670
  let i = [], g = 0;
23672
- for (this.queues.forEach((h) => {
23673
- i = i.concat(h);
23671
+ for (this.queues.forEach((u) => {
23672
+ i = i.concat(u);
23674
23673
  }), this.queues = []; i.length > g; ) {
23675
- let h = i[g++], u = h.parent && h.parent.fail, o = h.key;
23676
- for (; u && !u.children.has(o); )
23677
- u = u.fail;
23678
- u ? h.fail = u.children.get(o) : h.fail = this.root;
23674
+ let u = i[g++], h = u.parent && u.parent.fail, o = u.key;
23675
+ for (; h && !h.children.has(o); )
23676
+ h = h.fail;
23677
+ h ? u.fail = h.children.get(o) : u.fail = this.root;
23679
23678
  }
23680
23679
  }
23681
23680
  // 将 pattern 添加到 dictMap 中
@@ -23687,50 +23686,50 @@ class ci {
23687
23686
  }
23688
23687
  // 按照优先级插入 pattern
23689
23688
  insertPattern(i, g) {
23690
- for (let h = i.length - 1; h >= 0; h--) {
23691
- const u = i[h];
23692
- if (g.priority === u.priority && g.probability >= u.probability)
23693
- i[h + 1] = u;
23694
- else if (g.priority > u.priority)
23695
- i[h + 1] = u;
23689
+ for (let u = i.length - 1; u >= 0; u--) {
23690
+ const h = i[u];
23691
+ if (g.priority === h.priority && g.probability >= h.probability)
23692
+ i[u + 1] = h;
23693
+ else if (g.priority > h.priority)
23694
+ i[u + 1] = h;
23696
23695
  else {
23697
- i[h + 1] = g;
23696
+ i[u + 1] = g;
23698
23697
  return;
23699
23698
  }
23700
23699
  }
23701
23700
  i[0] = g;
23702
23701
  }
23703
23702
  removeDict(i) {
23704
- this.dictMap.has(i) && (this.dictMap.get(i).forEach((h) => {
23705
- h.node.patterns = h.node.patterns.filter((u) => u !== h);
23703
+ this.dictMap.has(i) && (this.dictMap.get(i).forEach((u) => {
23704
+ u.node.patterns = u.node.patterns.filter((h) => h !== u);
23706
23705
  }), this.dictMap.delete(i));
23707
23706
  }
23708
23707
  // 搜索字符串返回匹配的模式串
23709
23708
  match(i, g) {
23710
- let h = this.root, u = [];
23709
+ let u = this.root, h = [];
23711
23710
  const o = M(i);
23712
23711
  for (let s = 0; s < o.length; s++) {
23713
23712
  let l = o[s];
23714
- for (; h !== null && !h.children.has(l); )
23715
- h = h.fail;
23716
- if (h === null)
23717
- h = this.root;
23713
+ for (; u !== null && !u.children.has(l); )
23714
+ u = u.fail;
23715
+ if (u === null)
23716
+ u = this.root;
23718
23717
  else {
23719
- h = h.children.get(l);
23720
- const y = h.patterns.find((r) => g === "off" ? r.priority !== f.Surname : g === "head" ? r.length - 1 - s === 0 : !0);
23721
- y && u.push(Object.assign(Object.assign({}, y), { index: s - y.length + 1 }));
23722
- let z = h.fail;
23718
+ u = u.children.get(l);
23719
+ const y = u.patterns.find((r) => g === "off" ? r.priority !== f.Surname : g === "head" ? r.length - 1 - s === 0 : !0);
23720
+ y && h.push(Object.assign(Object.assign({}, y), { index: s - y.length + 1 }));
23721
+ let z = u.fail;
23723
23722
  for (; z !== null; ) {
23724
23723
  const r = z.patterns.find((m) => g === "off" ? m.priority !== f.Surname : g === "head" ? m.length - 1 - s === 0 : !0);
23725
- r && u.push(Object.assign(Object.assign({}, r), { index: s - r.length + 1 })), z = z.fail;
23724
+ r && h.push(Object.assign(Object.assign({}, r), { index: s - r.length + 1 })), z = z.fail;
23726
23725
  }
23727
23726
  }
23728
23727
  }
23729
- return u;
23728
+ return h;
23730
23729
  }
23731
- search(i, g, h = 2) {
23732
- const u = this.match(i, g);
23733
- return h === 1 ? ti(u) : h === 3 ? zi(u, a(i)) : oi(u, a(i));
23730
+ search(i, g, u = 2) {
23731
+ const h = this.match(i, g);
23732
+ return u === 1 ? ci(h) : u === 3 ? zi(h, a(i)) : oi(h, a(i));
23734
23733
  }
23735
23734
  }
23736
23735
  const di = [
@@ -23740,17 +23739,17 @@ const di = [
23740
23739
  ...ii,
23741
23740
  ...Wn,
23742
23741
  ...ni
23743
- ], qn = new ci();
23742
+ ], qn = new ti();
23744
23743
  qn.build(di);
23745
23744
  const ei = new fn(), ji = () => ei, v = (n) => {
23746
23745
  const i = _.get(n);
23747
23746
  return i ? i.split(" ")[0] : n;
23748
- }, ri = (n, i, g, h) => {
23749
- const u = qn.search(n, g, h);
23747
+ }, ri = (n, i, g, u) => {
23748
+ const h = qn.search(n, g, u);
23750
23749
  let o = 0;
23751
23750
  const s = M(n);
23752
23751
  for (let l = 0; l < s.length; ) {
23753
- const y = u[o];
23752
+ const y = h[o];
23754
23753
  if (y && l === y.index) {
23755
23754
  if (y.length === 1 && y.priority <= f.Normal) {
23756
23755
  const m = s[l];
@@ -23786,24 +23785,24 @@ const ei = new fn(), ji = () => ei, v = (n) => {
23786
23785
  }, l++;
23787
23786
  }
23788
23787
  }
23789
- return { list: i, matches: u };
23788
+ return { list: i, matches: h };
23790
23789
  }, Z = (n) => n.replace(/(ā|á|ǎ|à)/g, "a").replace(/(ō|ó|ǒ|ò)/g, "o").replace(/(ē|é|ě|è)/g, "e").replace(/(ī|í|ǐ|ì)/g, "i").replace(/(ū|ú|ǔ|ù)/g, "u").replace(/(ǖ|ǘ|ǚ|ǜ)/g, "ü").replace(/(n̄|ń|ň|ǹ)/g, "n").replace(/(m̄|ḿ|m̌|m̀)/g, "m").replace(/(ê̄|ế|ê̌|ề)/g, "ê"), pn = (n, i = "off") => {
23791
23790
  const g = ji();
23792
- let h = _.get(n) ? _.get(n).split(" ") : [];
23791
+ let u = _.get(n) ? _.get(n).split(" ") : [];
23793
23792
  if (g.get(n))
23794
- h = g.get(n).split(" ");
23793
+ u = g.get(n).split(" ");
23795
23794
  else if (i !== "off") {
23796
- const u = $[n];
23797
- u && (h = [u].concat(h.filter((o) => o !== u)));
23795
+ const h = $[n];
23796
+ h && (u = [h].concat(u.filter((o) => o !== h)));
23798
23797
  }
23799
- return h;
23798
+ return u;
23800
23799
  }, bi = (n, i = "off") => {
23801
23800
  let g = pn(n, i);
23802
- return g.length > 0 ? g.map((h) => ({
23801
+ return g.length > 0 ? g.map((u) => ({
23803
23802
  origin: n,
23804
- result: h,
23803
+ result: u,
23805
23804
  isZh: !0,
23806
- originPinyin: h
23805
+ originPinyin: u
23807
23806
  })) : [
23808
23807
  {
23809
23808
  origin: n,
@@ -23813,38 +23812,38 @@ const ei = new fn(), ji = () => ei, v = (n) => {
23813
23812
  }
23814
23813
  ];
23815
23814
  }, R = (n) => {
23816
- const i = n.split(" "), g = [], h = [];
23817
- for (let u of i)
23815
+ const i = n.split(" "), g = [], u = [];
23816
+ for (let h of i)
23818
23817
  for (let o of On)
23819
- if (u.startsWith(o)) {
23820
- let s = u.slice(o.length);
23821
- Ln.indexOf(o) !== -1 && Bn.indexOf(s) !== -1 && (s = Fn[s]), g.push(o), h.push(s);
23818
+ if (h.startsWith(o)) {
23819
+ let s = h.slice(o.length);
23820
+ Ln.indexOf(o) !== -1 && Bn.indexOf(s) !== -1 && (s = Fn[s]), g.push(o), u.push(s);
23822
23821
  break;
23823
23822
  }
23824
23823
  return {
23825
- final: h.join(" "),
23824
+ final: u.join(" "),
23826
23825
  initial: g.join(" ")
23827
23826
  // 声母
23828
23827
  };
23829
23828
  }, N = (n) => {
23830
23829
  const { final: i } = R(n);
23831
- let g = "", h = "", u = "";
23832
- return Gn.indexOf(Z(i)) !== -1 ? (g = i[0], h = i[1], u = i.slice(2)) : (h = i[0] || "", u = i.slice(1) || ""), { head: g, body: h, tail: u };
23830
+ let g = "", u = "", h = "";
23831
+ return Gn.indexOf(Z(i)) !== -1 ? (g = i[0], u = i[1], h = i.slice(2)) : (u = i[0] || "", h = i.slice(1) || ""), { head: g, body: u, tail: h };
23833
23832
  }, V = (n) => {
23834
- const i = /(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/, g = /(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/, h = /(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/, u = /(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/, o = /(a|o|e|i|u|ü|ê)/, s = /(n|m)$/, l = [];
23833
+ const i = /(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/, g = /(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/, u = /(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/, h = /(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/, o = /(a|o|e|i|u|ü|ê)/, s = /(n|m)$/, l = [];
23835
23834
  return n.split(" ").forEach((z) => {
23836
- i.test(z) ? l.push("1") : g.test(z) ? l.push("2") : h.test(z) ? l.push("3") : u.test(z) ? l.push("4") : o.test(z) || s.test(z) ? l.push("0") : l.push("");
23835
+ i.test(z) ? l.push("1") : g.test(z) ? l.push("2") : u.test(z) ? l.push("3") : h.test(z) ? l.push("4") : o.test(z) || s.test(z) ? l.push("0") : l.push("");
23837
23836
  }), l.join(" ");
23838
23837
  }, xi = (n, i) => {
23839
- const g = Z(n).split(" "), h = V(i).split(" "), u = [];
23838
+ const g = Z(n).split(" "), u = V(i).split(" "), h = [];
23840
23839
  return g.forEach((o, s) => {
23841
- u.push(`${o}${h[s]}`);
23842
- }), u.join(" ");
23843
- }, an = (n) => {
23844
- const i = [];
23840
+ h.push(`${o}${u[s]}`);
23841
+ }), h.join(" ");
23842
+ }, an = (n, i) => {
23843
+ const g = [];
23845
23844
  return n.split(" ").forEach((h) => {
23846
- i.push(h[0]);
23847
- }), i.join(" ");
23845
+ g.push(i ? h[0] : h);
23846
+ }), g.join(" ");
23848
23847
  }, mi = (n) => typeof n != "string" ? (console.error("The first param of pinyin is error: " + n + ' is not assignable to type "string".'), !1) : !0;
23849
23848
  function U(n, i) {
23850
23849
  return i instanceof RegExp ? i.test(n) : !0;
@@ -23852,13 +23851,13 @@ function U(n, i) {
23852
23851
  const fi = (n, i) => {
23853
23852
  let g = i.nonZh;
23854
23853
  if (g === "removed")
23855
- return n.filter((h) => h.isZh || !U(h.origin, i.nonZhScope));
23854
+ return n.filter((u) => u.isZh || !U(u.origin, i.nonZhScope));
23856
23855
  if (g === "consecutive") {
23857
- for (let h = n.length - 2; h >= 0; h--) {
23858
- const u = n[h], o = n[h + 1];
23859
- !u.isZh && !o.isZh && U(u.origin, i.nonZhScope) && U(o.origin, i.nonZhScope) && (u.origin += o.origin, u.result += o.result, o.delete = !0);
23856
+ for (let u = n.length - 2; u >= 0; u--) {
23857
+ const h = n[u], o = n[u + 1];
23858
+ !h.isZh && !o.isZh && U(h.origin, i.nonZhScope) && U(o.origin, i.nonZhScope) && (h.origin += o.origin, h.result += o.result, o.delete = !0);
23860
23859
  }
23861
- return n.filter((h) => !h.delete);
23860
+ return n.filter((u) => !u.delete);
23862
23861
  } else
23863
23862
  return n;
23864
23863
  }, mn = (n, i) => a(n) === 1 && i.multiple ? bi(n, i.surname) : !1, wi = (n, i) => {
@@ -23882,7 +23881,7 @@ const fi = (n, i) => {
23882
23881
  break;
23883
23882
  case "first":
23884
23883
  n.forEach((g) => {
23885
- g.result = an(g.result);
23884
+ g.result = an(g.result, g.isZh);
23886
23885
  });
23887
23886
  break;
23888
23887
  case "finalHead":
@@ -23923,31 +23922,31 @@ const fi = (n, i) => {
23923
23922
  });
23924
23923
  }, ai = (n, i, g) => {
23925
23924
  if (i.multiple && a(g) === 1) {
23926
- let h = "";
23927
- n = n.filter((u) => {
23928
- const o = u.result !== h;
23929
- return h = u.result, o;
23925
+ let u = "";
23926
+ n = n.filter((h) => {
23927
+ const o = h.result !== u;
23928
+ return u = h.result, o;
23930
23929
  });
23931
23930
  }
23932
- return i.type === "array" ? n.map((h) => h.result) : i.type === "all" ? n.map((h) => {
23933
- const u = h.isZh ? h.result : "", { initial: o, final: s } = R(u), { head: l, body: y, tail: z } = N(u);
23931
+ return i.type === "array" ? n.map((u) => u.result) : i.type === "all" ? n.map((u) => {
23932
+ const h = u.isZh ? u.result : "", { initial: o, final: s } = R(h), { head: l, body: y, tail: z } = N(h);
23934
23933
  let r = [];
23935
- return u !== "" && (r = [u].concat(pn(h.origin, i.surname).filter((m) => m !== u))), {
23936
- origin: h.origin,
23937
- pinyin: u,
23934
+ return h !== "" && (r = [h].concat(pn(u.origin, i.surname).filter((m) => m !== h))), {
23935
+ origin: u.origin,
23936
+ pinyin: h,
23938
23937
  initial: o,
23939
23938
  final: s,
23940
- first: h.isZh ? an(h.result) : "",
23939
+ first: an(u.result, u.isZh),
23941
23940
  finalHead: l,
23942
23941
  finalBody: y,
23943
23942
  finalTail: z,
23944
- num: Number(V(h.originPinyin)),
23945
- isZh: h.isZh,
23943
+ num: Number(V(u.originPinyin)),
23944
+ isZh: u.isZh,
23946
23945
  polyphonic: r,
23947
- inZhRange: !!_.get(h.origin),
23948
- result: h.result
23946
+ inZhRange: !!_.get(u.origin),
23947
+ result: u.result
23949
23948
  };
23950
- }) : n.map((h) => h.result).join(i.separator);
23949
+ }) : n.map((u) => u.result).join(i.separator);
23951
23950
  }, ki = (n, i) => (i === !1 && n.forEach((g) => {
23952
23951
  g.origin === "一" ? g.result = g.originPinyin = "yī" : g.origin === "不" && (g.result = g.originPinyin = "bù");
23953
23952
  }), n), Pi = {
@@ -23969,15 +23968,15 @@ function _i(n, i) {
23969
23968
  if (n === "")
23970
23969
  return i.type === "array" || i.type === "all" ? [] : "";
23971
23970
  i.surname === void 0 && (i.mode === "surname" ? i.surname = "all" : i.surname = "off"), i.type === "all" && (i.pattern = "pinyin"), i.pattern === "num" && (i.toneType = "none"), i.removeNonZh && (i.nonZh = "removed");
23972
- let h = Array(a(n)), { list: u } = ri(n, h, i.surname, i.segmentit);
23973
- return u = ki(u, i.toneSandhi), u = fi(u, i), mn(n, i) && (u = mn(n, i)), wi(u, i), qi(u, i), pi(u, i), ai(u, i, n);
23971
+ let u = Array(a(n)), { list: h } = ri(n, u, i.surname, i.segmentit);
23972
+ return h = ki(h, i.toneSandhi), h = fi(h, i), mn(n, i) && (h = mn(n, i)), wi(h, i), qi(h, i), pi(h, i), ai(h, i, n);
23974
23973
  }
23975
23974
  var O;
23976
23975
  (function(n) {
23977
23976
  n[n.AllSegment = 1] = "AllSegment", n[n.AllArray = 2] = "AllArray", n[n.AllString = 3] = "AllString", n[n.PinyinSegment = 4] = "PinyinSegment", n[n.PinyinArray = 5] = "PinyinArray", n[n.PinyinString = 6] = "PinyinString", n[n.ZhSegment = 7] = "ZhSegment", n[n.ZhArray = 8] = "ZhArray", n[n.ZhString = 9] = "ZhString";
23978
23977
  })(O || (O = {}));
23979
23978
  O.AllSegment;
23980
- const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
23979
+ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
23981
23980
  __name: "edit",
23982
23981
  props: /* @__PURE__ */ W({
23983
23982
  entityKey: {
@@ -23995,7 +23994,7 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
23995
23994
  }),
23996
23995
  emits: /* @__PURE__ */ W(["refresh", "reload"], ["update:modelValue"]),
23997
23996
  setup(n, { emit: i }) {
23998
- const { t: g } = Rn(), h = D(), u = Nn(n, "modelValue"), o = i;
23997
+ const { t: g } = Zn(), u = D(), h = Nn(n, "modelValue"), o = i;
23999
23998
  let s = E({
24000
23999
  requestId: Math.random() * 10 + "",
24001
24000
  updateMask: "parentId,regionCode,regionName,regionPinyin,regionType,regionCategory,description",
@@ -24038,28 +24037,28 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24038
24037
  }
24039
24038
  ]
24040
24039
  }), y = n;
24041
- s.parentId = y.parentId, s.parentId && I.findById({ regionId: s.parentId }).then(({ data: t }) => {
24042
- r(t.regionCode);
24040
+ s.parentId = y.parentId, s.parentId && I.findById({ regionId: s.parentId }).then(({ data: c }) => {
24041
+ r(c.regionCode);
24043
24042
  });
24044
- const z = D([]), r = (t) => {
24045
- I.findByCode({ regionCode: t }).then(({ data: e }) => {
24046
- const x = Zn(e);
24043
+ const z = D([]), r = (c) => {
24044
+ I.findByCode({ regionCode: c }).then(({ data: e }) => {
24045
+ const x = Rn(e);
24047
24046
  z.value = x.regionIds;
24048
24047
  });
24049
24048
  }, m = Object.keys(y.entityKey), P = D(m.length >= 1), L = E({});
24050
- P.value && I.findById(y.entityKey).then(({ data: t }) => {
24051
- Object.assign(s, t), Object.assign(L, t), s.parentId === p.DEFAULT_ID && (s.parentId = ""), r(s.regionCode);
24049
+ P.value && I.findById(y.entityKey).then(({ data: c }) => {
24050
+ Object.assign(s, c), Object.assign(L, c), s.parentId === p.DEFAULT_ID && (s.parentId = ""), r(s.regionCode);
24052
24051
  });
24053
24052
  const kn = () => {
24054
- var t;
24055
- (t = h.value) == null || t.validate((e) => {
24053
+ var c;
24054
+ (c = u.value) == null || c.validate((e) => {
24056
24055
  if (e) {
24057
24056
  if (P.value) {
24058
24057
  I.update(s).then((x) => {
24059
24058
  x.status === 200 && (nn({
24060
24059
  message: g("common.submitSuccess"),
24061
24060
  type: "success"
24062
- }), u.value && (u.value = !1), o("refresh", x.status === 200), o("reload", L, x.data));
24061
+ }), h.value && (h.value = !1), o("refresh", x.status === 200), o("reload", L, x.data));
24063
24062
  });
24064
24063
  return;
24065
24064
  }
@@ -24067,7 +24066,7 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24067
24066
  x.status === 200 && (nn({
24068
24067
  message: g("common.submitSuccess"),
24069
24068
  type: "success"
24070
- }), u.value && (u.value = !1), o("refresh", x.status === 200, s), o("reload", x.data));
24069
+ }), h.value && (h.value = !1), o("refresh", x.status === 200), o("reload", x.data));
24071
24070
  });
24072
24071
  }
24073
24072
  });
@@ -24081,10 +24080,10 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24081
24080
  separator: ""
24082
24081
  }).toUpperCase();
24083
24082
  }, B = () => {
24084
- u.value && (u.value = !1);
24085
- }, _n = (t, e) => {
24083
+ h.value && (h.value = !1);
24084
+ }, _n = (c, e) => {
24086
24085
  I.findList({
24087
- parentId: t.data.regionId,
24086
+ parentId: c.data.regionId,
24088
24087
  excludeId: y.entityKey.regionId
24089
24088
  }).then(({ data: x }) => {
24090
24089
  e(
@@ -24092,54 +24091,54 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24092
24091
  );
24093
24092
  });
24094
24093
  };
24095
- return (t, e) => {
24094
+ return (c, e) => {
24096
24095
  const x = k("el-input"), w = k("el-form-item"), C = k("el-col"), F = k("el-radio"), G = k("el-radio-group"), Cn = k("el-tree-select"), In = k("el-row"), Sn = k("el-form"), K = k("el-button"), vn = k("el-dialog");
24097
24096
  return S(), A(vn, {
24098
- modelValue: u.value,
24099
- "onUpdate:modelValue": e[7] || (e[7] = (d) => u.value = d),
24097
+ modelValue: h.value,
24098
+ "onUpdate:modelValue": e[7] || (e[7] = (d) => h.value = d),
24100
24099
  onClose: B
24101
24100
  }, {
24102
24101
  footer: j(() => [
24103
24102
  Mn("div", Ci, [
24104
- c(K, { onClick: B }, {
24103
+ t(K, { onClick: B }, {
24105
24104
  default: j(() => [
24106
- Y(H(t.$t("common.cancel")), 1)
24105
+ J(X(c.$t("common.cancel")), 1)
24107
24106
  ]),
24108
24107
  _: 1
24109
24108
  }),
24110
- c(K, {
24109
+ t(K, {
24111
24110
  type: "primary",
24112
24111
  onClick: kn
24113
24112
  }, {
24114
24113
  default: j(() => [
24115
- Y(H(t.$t("common.confirm")), 1)
24114
+ J(X(c.$t("common.confirm")), 1)
24116
24115
  ]),
24117
24116
  _: 1
24118
24117
  })
24119
24118
  ])
24120
24119
  ]),
24121
24120
  default: j(() => [
24122
- c(Sn, {
24121
+ t(Sn, {
24123
24122
  ref_key: "dictRegionFormRef",
24124
- ref: h,
24123
+ ref: u,
24125
24124
  model: b(s),
24126
24125
  "label-width": "120px",
24127
24126
  rules: l
24128
24127
  }, {
24129
24128
  default: j(() => [
24130
- c(In, null, {
24129
+ t(In, null, {
24131
24130
  default: j(() => [
24132
- c(C, { span: 24 }, {
24131
+ t(C, { span: 24 }, {
24133
24132
  default: j(() => [
24134
- c(w, {
24135
- label: t.$t("dictRegion.regionCode"),
24133
+ t(w, {
24134
+ label: c.$t("dictRegion.regionCode"),
24136
24135
  prop: "regionCode"
24137
24136
  }, {
24138
24137
  default: j(() => [
24139
- c(x, {
24138
+ t(x, {
24140
24139
  modelValue: b(s).regionCode,
24141
24140
  "onUpdate:modelValue": e[0] || (e[0] = (d) => b(s).regionCode = d),
24142
- placeholder: t.$t("dictRegion.regionCodePlaceholder"),
24141
+ placeholder: c.$t("dictRegion.regionCodePlaceholder"),
24143
24142
  maxlength: "15",
24144
24143
  "show-word-limit": "",
24145
24144
  clearable: ""
@@ -24150,17 +24149,17 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24150
24149
  ]),
24151
24150
  _: 1
24152
24151
  }),
24153
- c(C, { span: 24 }, {
24152
+ t(C, { span: 24 }, {
24154
24153
  default: j(() => [
24155
- c(w, {
24156
- label: t.$t("dictRegion.regionName"),
24154
+ t(w, {
24155
+ label: c.$t("dictRegion.regionName"),
24157
24156
  prop: "regionName"
24158
24157
  }, {
24159
24158
  default: j(() => [
24160
- c(x, {
24159
+ t(x, {
24161
24160
  modelValue: b(s).regionName,
24162
24161
  "onUpdate:modelValue": e[1] || (e[1] = (d) => b(s).regionName = d),
24163
- placeholder: t.$t("dictRegion.regionNamePlaceholder"),
24162
+ placeholder: c.$t("dictRegion.regionNamePlaceholder"),
24164
24163
  maxlength: "60",
24165
24164
  "show-word-limit": "",
24166
24165
  onBlur: Pn,
@@ -24172,18 +24171,18 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24172
24171
  ]),
24173
24172
  _: 1
24174
24173
  }),
24175
- c(C, { span: 24 }, {
24174
+ t(C, { span: 24 }, {
24176
24175
  default: j(() => [
24177
- c(w, {
24178
- label: t.$t("dictRegion.regionPinyin"),
24176
+ t(w, {
24177
+ label: c.$t("dictRegion.regionPinyin"),
24179
24178
  prop: "regionPinyin"
24180
24179
  }, {
24181
24180
  default: j(() => [
24182
- c(x, {
24181
+ t(x, {
24183
24182
  modelValue: b(s).regionPinyin,
24184
24183
  "onUpdate:modelValue": e[2] || (e[2] = (d) => b(s).regionPinyin = d),
24185
- placeholder: t.$t("dictRegion.regionPinyinPlaceholder"),
24186
- maxlength: "15",
24184
+ placeholder: c.$t("dictRegion.regionPinyinPlaceholder"),
24185
+ maxlength: "60",
24187
24186
  "show-word-limit": "",
24188
24187
  clearable: ""
24189
24188
  }, null, 8, ["modelValue", "placeholder"])
@@ -24193,19 +24192,19 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24193
24192
  ]),
24194
24193
  _: 1
24195
24194
  }),
24196
- c(C, { span: 24 }, {
24195
+ t(C, { span: 24 }, {
24197
24196
  default: j(() => [
24198
- c(w, {
24199
- label: t.$t("dictRegion.regionType"),
24197
+ t(w, {
24198
+ label: c.$t("dictRegion.regionType"),
24200
24199
  prop: "regionType"
24201
24200
  }, {
24202
24201
  default: j(() => [
24203
- c(G, {
24202
+ t(G, {
24204
24203
  modelValue: b(s).regionType,
24205
24204
  "onUpdate:modelValue": e[3] || (e[3] = (d) => b(s).regionType = d)
24206
24205
  }, {
24207
24206
  default: j(() => [
24208
- (S(!0), Q(J, null, X(b(T).regionTypeEnum.values, (d) => (S(), A(F, {
24207
+ (S(!0), Y(H, null, Q(b(T).regionTypeEnum.values, (d) => (S(), A(F, {
24209
24208
  key: d.key,
24210
24209
  value: d.key,
24211
24210
  label: d.value
@@ -24219,19 +24218,19 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24219
24218
  ]),
24220
24219
  _: 1
24221
24220
  }),
24222
- c(C, { span: 24 }, {
24221
+ t(C, { span: 24 }, {
24223
24222
  default: j(() => [
24224
- c(w, {
24225
- label: t.$t("dictRegion.regionCategory"),
24223
+ t(w, {
24224
+ label: c.$t("dictRegion.regionCategory"),
24226
24225
  prop: "regionCategory"
24227
24226
  }, {
24228
24227
  default: j(() => [
24229
- c(G, {
24228
+ t(G, {
24230
24229
  modelValue: b(s).regionCategory,
24231
24230
  "onUpdate:modelValue": e[4] || (e[4] = (d) => b(s).regionCategory = d)
24232
24231
  }, {
24233
24232
  default: j(() => [
24234
- (S(!0), Q(J, null, X(b(T).regionCategoryEnum.values, (d) => (S(), A(F, {
24233
+ (S(!0), Y(H, null, Q(b(T).regionCategoryEnum.values, (d) => (S(), A(F, {
24235
24234
  key: d.key,
24236
24235
  value: d.key,
24237
24236
  label: d.value
@@ -24245,22 +24244,23 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24245
24244
  ]),
24246
24245
  _: 1
24247
24246
  }),
24248
- c(C, { span: 24 }, {
24247
+ t(C, { span: 24 }, {
24249
24248
  default: j(() => [
24250
- c(w, {
24251
- label: t.$t("dictRegion.parentId"),
24249
+ t(w, {
24250
+ label: c.$t("dictRegion.parentId"),
24252
24251
  prop: "parentId"
24253
24252
  }, {
24254
24253
  default: j(() => [
24255
- c(Cn, {
24254
+ t(Cn, {
24256
24255
  "node-key": "regionId",
24257
24256
  lazy: "",
24258
24257
  modelValue: b(s).parentId,
24259
24258
  "onUpdate:modelValue": e[5] || (e[5] = (d) => b(s).parentId = d),
24260
- placeholder: t.$t("dictRegion.parentIdPlaceholder"),
24259
+ placeholder: c.$t("dictRegion.parentIdPlaceholder"),
24261
24260
  load: _n,
24262
24261
  "default-expanded-keys": z.value,
24263
24262
  "check-strictly": "",
24263
+ clearable: "",
24264
24264
  props: {
24265
24265
  value: "regionId",
24266
24266
  label: "regionName",
@@ -24274,17 +24274,17 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24274
24274
  ]),
24275
24275
  _: 1
24276
24276
  }),
24277
- c(C, { span: 24 }, {
24277
+ t(C, { span: 24 }, {
24278
24278
  default: j(() => [
24279
- c(w, {
24280
- label: t.$t("dictRegion.description"),
24279
+ t(w, {
24280
+ label: c.$t("dictRegion.description"),
24281
24281
  prop: "description"
24282
24282
  }, {
24283
24283
  default: j(() => [
24284
- c(x, {
24284
+ t(x, {
24285
24285
  modelValue: b(s).description,
24286
24286
  "onUpdate:modelValue": e[6] || (e[6] = (d) => b(s).description = d),
24287
- placeholder: t.$t("dictRegion.descriptionPlaceholder"),
24287
+ placeholder: c.$t("dictRegion.descriptionPlaceholder"),
24288
24288
  maxlength: "120",
24289
24289
  "show-word-limit": "",
24290
24290
  clearable: "",
@@ -24312,5 +24312,5 @@ const Ci = { class: "dialog-footer" }, Mi = /* @__PURE__ */ En({
24312
24312
  export {
24313
24313
  p as C,
24314
24314
  T as D,
24315
- Mi as _
24315
+ Ni as _
24316
24316
  };