@lm_fe/pages-mchc 0.1.201 → 0.2.2

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 (477) hide show
  1. package/README.md +11 -7
  2. package/dist/a_chunks/.root.js +266 -826
  3. package/dist/a_chunks/.root10.js +74 -113
  4. package/dist/a_chunks/.root100.js +269 -98
  5. package/dist/a_chunks/.root101.js +90 -99
  6. package/dist/a_chunks/.root102.js +204 -669
  7. package/dist/a_chunks/.root103.js +102 -53
  8. package/dist/a_chunks/.root104.js +97 -52
  9. package/dist/a_chunks/.root105.js +29 -431
  10. package/dist/a_chunks/.root106.js +44 -214
  11. package/dist/a_chunks/.root107.js +61 -106
  12. package/dist/a_chunks/.root108.js +56 -1134
  13. package/dist/a_chunks/.root109.js +137 -197
  14. package/dist/a_chunks/.root11.js +362 -79
  15. package/dist/a_chunks/.root110.js +92 -168
  16. package/dist/a_chunks/.root111.js +160 -29
  17. package/dist/a_chunks/.root112.js +232 -190
  18. package/dist/a_chunks/.root113.js +204 -19
  19. package/dist/a_chunks/.root114.js +486 -1113
  20. package/dist/a_chunks/.root115.js +77 -0
  21. package/dist/a_chunks/.root116.js +57 -0
  22. package/dist/a_chunks/.root117.js +1647 -0
  23. package/dist/a_chunks/.root118.js +159 -0
  24. package/dist/a_chunks/.root119.js +123 -0
  25. package/dist/a_chunks/.root12.js +213 -96
  26. package/dist/a_chunks/.root120.js +192 -0
  27. package/dist/a_chunks/.root121.js +544 -0
  28. package/dist/a_chunks/.root122.js +802 -0
  29. package/dist/a_chunks/.root123.js +82 -0
  30. package/dist/a_chunks/.root124.js +96 -0
  31. package/dist/a_chunks/.root125.js +150 -0
  32. package/dist/a_chunks/.root126.js +102 -0
  33. package/dist/a_chunks/.root127.js +70 -0
  34. package/dist/a_chunks/.root128.js +121 -0
  35. package/dist/a_chunks/.root129.js +120 -0
  36. package/dist/a_chunks/.root13.js +471 -128
  37. package/dist/a_chunks/.root130.js +321 -0
  38. package/dist/a_chunks/.root131.js +462 -0
  39. package/dist/a_chunks/.root132.js +107 -0
  40. package/dist/a_chunks/.root133.js +107 -0
  41. package/dist/a_chunks/.root134.js +101 -0
  42. package/dist/a_chunks/.root135.js +652 -0
  43. package/dist/a_chunks/.root136.js +153 -0
  44. package/dist/a_chunks/.root137.js +71 -0
  45. package/dist/a_chunks/.root138.js +64 -0
  46. package/dist/a_chunks/.root139.js +79 -0
  47. package/dist/a_chunks/.root14.js +174 -131
  48. package/dist/a_chunks/.root140.js +71 -0
  49. package/dist/a_chunks/.root141.js +84 -0
  50. package/dist/a_chunks/.root142.js +12 -0
  51. package/dist/a_chunks/.root143.js +560 -0
  52. package/dist/a_chunks/.root144.js +435 -0
  53. package/dist/a_chunks/.root145.js +25 -0
  54. package/dist/a_chunks/.root146.js +1237 -0
  55. package/dist/a_chunks/.root147.js +304 -0
  56. package/dist/a_chunks/.root148.js +142 -0
  57. package/dist/a_chunks/.root149.js +105 -0
  58. package/dist/a_chunks/.root15.js +341 -124
  59. package/dist/a_chunks/.root150.js +1100 -0
  60. package/dist/a_chunks/.root151.js +168 -0
  61. package/dist/a_chunks/.root152.js +157 -0
  62. package/dist/a_chunks/.root153.js +185 -0
  63. package/dist/a_chunks/.root154.js +29 -0
  64. package/dist/a_chunks/.root155.js +192 -0
  65. package/dist/a_chunks/.root156.js +20 -0
  66. package/dist/a_chunks/.root157.js +107 -0
  67. package/dist/a_chunks/.root158.js +960 -0
  68. package/dist/a_chunks/.root16.js +177 -29
  69. package/dist/a_chunks/.root17.js +113 -159
  70. package/dist/a_chunks/.root18.js +51 -229
  71. package/dist/a_chunks/.root19.js +96 -116
  72. package/dist/a_chunks/.root2.js +384 -98
  73. package/dist/a_chunks/.root20.js +68 -102
  74. package/dist/a_chunks/.root21.js +141 -127
  75. package/dist/a_chunks/.root22.js +24 -35
  76. package/dist/a_chunks/.root23.js +123 -10
  77. package/dist/a_chunks/.root24.js +123 -8
  78. package/dist/a_chunks/.root25.js +106 -10
  79. package/dist/a_chunks/.root26.js +14 -10
  80. package/dist/a_chunks/.root27.js +129 -244
  81. package/dist/a_chunks/.root28.js +219 -5
  82. package/dist/a_chunks/.root29.js +109 -8
  83. package/dist/a_chunks/.root3.js +560 -489
  84. package/dist/a_chunks/.root30.js +104 -69
  85. package/dist/a_chunks/.root31.js +98 -8
  86. package/dist/a_chunks/.root32.js +75 -1645
  87. package/dist/a_chunks/.root33.js +9 -40
  88. package/dist/a_chunks/.root34.js +7 -225
  89. package/dist/a_chunks/.root35.js +10 -141
  90. package/dist/a_chunks/.root36.js +10 -35
  91. package/dist/a_chunks/.root37.js +221 -93
  92. package/dist/a_chunks/.root38.js +4 -179
  93. package/dist/a_chunks/.root39.js +14 -27
  94. package/dist/a_chunks/.root4.js +38 -499
  95. package/dist/a_chunks/.root40.js +57 -190
  96. package/dist/a_chunks/.root41.js +15 -262
  97. package/dist/a_chunks/.root42.js +12 -454
  98. package/dist/a_chunks/.root43.js +24 -28
  99. package/dist/a_chunks/.root44.js +224 -32
  100. package/dist/a_chunks/.root45.js +123 -27
  101. package/dist/a_chunks/.root46.js +9 -26
  102. package/dist/a_chunks/.root47.js +79 -166
  103. package/dist/a_chunks/.root48.js +15 -117
  104. package/dist/a_chunks/.root49.js +10 -173
  105. package/dist/a_chunks/.root5.js +44 -204
  106. package/dist/a_chunks/.root50.js +166 -127
  107. package/dist/a_chunks/.root51.js +174 -52
  108. package/dist/a_chunks/.root52.js +59 -476
  109. package/dist/a_chunks/.root53.js +440 -10
  110. package/dist/a_chunks/.root54.js +16 -9
  111. package/dist/a_chunks/.root55.js +15 -642
  112. package/dist/a_chunks/.root56.js +16 -743
  113. package/dist/a_chunks/.root57.js +14 -197
  114. package/dist/a_chunks/.root58.js +100 -155
  115. package/dist/a_chunks/.root59.js +95 -218
  116. package/dist/a_chunks/.root6.js +36 -411
  117. package/dist/a_chunks/.root60.js +91 -184
  118. package/dist/a_chunks/.root61.js +109 -60
  119. package/dist/a_chunks/.root62.js +53 -170
  120. package/dist/a_chunks/.root63.js +81 -155
  121. package/dist/a_chunks/.root64.js +16 -479
  122. package/dist/a_chunks/.root65.js +15 -519
  123. package/dist/a_chunks/.root66.js +627 -111
  124. package/dist/a_chunks/.root67.js +396 -973
  125. package/dist/a_chunks/.root68.js +22 -5
  126. package/dist/a_chunks/.root69.js +15 -18
  127. package/dist/a_chunks/.root7.js +48 -18532
  128. package/dist/a_chunks/.root70.js +213 -12
  129. package/dist/a_chunks/.root71.js +16 -9
  130. package/dist/a_chunks/.root72.js +53 -8
  131. package/dist/a_chunks/.root73.js +67 -254
  132. package/dist/a_chunks/.root74.js +60 -259
  133. package/dist/a_chunks/.root75.js +153 -64
  134. package/dist/a_chunks/.root76.js +154 -115
  135. package/dist/a_chunks/.root77.js +451 -108
  136. package/dist/a_chunks/.root78.js +456 -508
  137. package/dist/a_chunks/.root79.js +93 -316
  138. package/dist/a_chunks/.root8.js +36 -135
  139. package/dist/a_chunks/.root80.js +108 -470
  140. package/dist/a_chunks/.root81.js +40 -123
  141. package/dist/a_chunks/.root82.js +68 -202
  142. package/dist/a_chunks/.root83.js +17 -423
  143. package/dist/a_chunks/.root84.js +68 -249
  144. package/dist/a_chunks/.root85.js +17 -207
  145. package/dist/a_chunks/.root86.js +15 -574
  146. package/dist/a_chunks/.root87.js +75 -90
  147. package/dist/a_chunks/.root88.js +238 -69
  148. package/dist/a_chunks/.root89.js +46 -1678
  149. package/dist/a_chunks/.root9.js +46 -66
  150. package/dist/a_chunks/.root90.js +247 -174
  151. package/dist/a_chunks/.root91.js +106 -190
  152. package/dist/a_chunks/.root92.js +65 -520
  153. package/dist/a_chunks/.root93.js +517 -819
  154. package/dist/a_chunks/.root94.js +303 -146
  155. package/dist/a_chunks/.root95.js +428 -94
  156. package/dist/a_chunks/.root96.js +110 -71
  157. package/dist/a_chunks/.root97.js +191 -115
  158. package/dist/a_chunks/.root98.js +416 -101
  159. package/dist/a_chunks/.root99.js +359 -483
  160. package/dist/a_chunks/DoctorEnd_FurtherPage.js +377 -511
  161. package/dist/a_chunks/HistoryTable.js +14 -13
  162. package/dist/a_chunks/OpenReferralInEdit.js +44 -0
  163. package/dist/a_chunks/base.js +132 -0
  164. package/dist/a_chunks/common.js +28 -0
  165. package/dist/a_chunks/diagnoses-week.js +20 -29
  166. package/dist/a_chunks/index.js +474 -833
  167. package/dist/a_chunks/index1.js +4 -4
  168. package/dist/a_chunks/index12.js +4 -4
  169. package/dist/a_chunks/index2.js +5 -107
  170. package/dist/a_chunks/index3.js +32 -36
  171. package/dist/a_chunks/index4.js +17 -26
  172. package/dist/a_chunks/index5.js +8 -14
  173. package/dist/a_chunks/request.js +4 -41
  174. package/dist/a_chunks/utils.js +8 -9
  175. package/dist/a_chunks/utils2.js +1 -2
  176. package/dist/a_chunks//344/270/252/344/272/272/345/217/262.js +28 -0
  177. package/dist/a_chunks//345/255/225/344/272/247/345/217/262.js +0 -1
  178. package/dist/a_chunks//351/253/230/345/215/261/347/256/241/347/220/206.js +0 -1
  179. package/dist/index.js +6 -19
  180. package/dist/pages/config-table/panel2/index.d.ts +4 -0
  181. package/dist/pages/config-table/utils.d.ts +2 -2
  182. package/dist/pages/follow-up/questionnaire3/index.d.ts +2 -1
  183. package/dist/pages/gynecological-diseases/women/list/config/table.d.ts +1 -1
  184. package/dist/pages/highrisk-management/list/form_config.d.ts +2 -1
  185. package/dist/pages/knowledge/list/form_config.d.ts +4 -0
  186. package/dist/pages/knowledge/list/index.d.ts +2 -0
  187. package/dist/pages/my-knowledge/components/query.d.ts +1 -1
  188. package/dist/pages/pregnant-school/personal-records/.list/config/table.d.ts +1 -1
  189. package/dist/pages/pregnant-school/personal-records/.list/index.d.ts +3 -3
  190. package/dist/pages/pregnant-school/personal-statistics/.list/index.d.ts +23 -2
  191. package/dist/pages/pregnant-school/statistics/.list/config/table.d.ts +1 -1
  192. package/dist/pages/pregnant-school/statistics/.list/index.d.ts +3 -3
  193. package/dist/pages/prenatal-visit/physical-sign/list/bf_default.d.ts +2 -1
  194. package/dist/pages/prenatal-visit/physical-sign/list/components/Query.d.ts +1 -1
  195. package/dist/pages/prenatal-visit/pregnancy/common.d.ts +2 -0
  196. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.api/curve.d.ts +2 -9
  197. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.api/home.d.ts +3 -3
  198. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.api/image.d.ts +1 -1
  199. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.api/index.d.ts +17 -7
  200. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.api/initial.d.ts +3 -2
  201. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.api/survey.d.ts +1 -1
  202. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.base/Inner.d.ts +0 -2
  203. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.base/husband/form_config.d.ts +3 -2
  204. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.base/pregnancy/form_config.d.ts +3 -2
  205. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.birth-plan/Inner.d.ts +3 -0
  206. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.birth-plan/index.d.ts +3 -0
  207. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.case-report/ComponentPanl.d.ts +12 -0
  208. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.case-report/Inner.d.ts +3 -0
  209. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.case-report/constant_new.d.ts +45 -0
  210. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.case-report/form_config/base.d.ts +2 -0
  211. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.case-report/form_config//344/271/231/350/202/235/346/204/237/346/237/223/345/255/225/344/272/247/345/246/207/345/217/212/346/211/200/347/224/237/346/226/260/347/224/237/345/204/277/344/270/252/346/241/210/347/231/273/350/256/260/345/215/241.d.ts +4 -0
  212. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.case-report/form_config//346/242/205/346/257/222/346/204/237/346/237/223/345/255/225/344/272/247/345/246/207/345/237/272/346/234/254/346/203/205/345/206/265.d.ts +4 -0
  213. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.case-report/form_config//350/211/276/346/273/213/347/227/205/346/204/237/346/237/223/345/246/207/345/245/263/345/237/272/346/234/254/346/203/205/345/206/265.d.ts +4 -0
  214. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.case-report/index.d.ts +3 -0
  215. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.components/Diagnoses/index.d.ts +1 -0
  216. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.components/Diagnoses/template/Inner.d.ts +2 -13
  217. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.components/Diagnoses/template/index.d.ts +3 -1
  218. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/DoctorEnd_FurtherPage.d.ts +1 -8
  219. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/components/FurtherForm/config.d.ts +0 -1
  220. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/components/FurtherForm/form_config/Form.d.ts +3 -1
  221. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/components/FurtherForm/index.d.ts +1 -5
  222. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/components/FurtherSidebar/index.d.ts +0 -5
  223. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/components/FurtherSidebar/management-plan/Inner.d.ts +1 -1
  224. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/components/FurtherTable/index.d.ts +2 -0
  225. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/index.d.ts +1 -1
  226. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/methods/request.d.ts +0 -2
  227. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/BloodGlucose/record/form_config.d.ts +4 -0
  228. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/BloodGlucose/record/index.d.ts +4 -0
  229. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/BloodGlucose/static/form_config.d.ts +4 -0
  230. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/BloodGlucose/static/index.d.ts +3 -0
  231. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/BloodPressure/record/form_config.d.ts +4 -0
  232. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/BloodPressure/record/index.d.ts +4 -0
  233. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/BloodPressure/static/form_config.d.ts +4 -0
  234. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/BloodPressure/static/index.d.ts +3 -0
  235. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/FetalMovement/record/form_config.d.ts +4 -0
  236. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/FetalMovement/record/index.d.ts +4 -0
  237. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/FetalMovement/static/form_config.d.ts +4 -0
  238. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/FetalMovement/static/index.d.ts +3 -0
  239. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/Seg.d.ts +6 -0
  240. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/index.d.ts +2 -12
  241. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/DoctorEnd_Initial.d.ts +2 -13
  242. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/components/JianYanJianCha/index.d.ts +1 -1
  243. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/components/QiTaBingshi/index.d.ts +1 -1
  244. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/components/TiGeJianCha/index.d.ts +1 -1
  245. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/components/YiBanBingShi/index.d.ts +1 -1
  246. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/components/YuChanQi/config.d.ts +4 -0
  247. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/components/YuChanQi/index.d.ts +3 -6
  248. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/components/YunChanShi/index.d.ts +1 -1
  249. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/components/ZhenDuanChuLi/config.d.ts +1 -1
  250. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/components/ZhenDuanChuLi/index.d.ts +4 -12
  251. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/components/ZhuanKeJianCha/index.d.ts +3 -6
  252. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/methods/request.d.ts +2 -4
  253. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.postpartum/DoctorEnd_Postpartum.d.ts +12 -0
  254. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.postpartum/components/FurtherForm/config.d.ts +6 -0
  255. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.postpartum/components/FurtherForm/form_config/Form.d.ts +10 -0
  256. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.postpartum/components/FurtherForm/form_config/default.d.ts +4 -0
  257. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.postpartum/components/FurtherForm/index.d.ts +16 -0
  258. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.postpartum/components/FurtherSidebar/index.d.ts +12 -0
  259. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.postpartum/components/FurtherTable/config.d.ts +3 -0
  260. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.postpartum/components/FurtherTable/index.d.ts +12 -0
  261. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.postpartum/index.d.ts +3 -0
  262. package/dist/pages/prenatal-visit/pregnancy/doctor-end/out.d.ts +11 -7
  263. package/dist/pages/prenatal-visit/pregnancy/list/config/table.d.ts +1 -1
  264. package/dist/pages/prenatal-visit/pregnancy/nurse-end/archival-information/form//344/270/252/344/272/272/345/217/262.d.ts +1 -0
  265. package/dist/pages/prenatal-visit/pregnancy/nurse-end/archival-information/form//346/227/242/345/276/200/345/217/262.d.ts +1 -71
  266. package/dist/pages/prenatal-visit/pregnancy/nurse-end/archival-information/form//346/234/254/346/254/241/345/255/225/344/272/247/344/277/241/346/201/257.d.ts +2 -1
  267. package/dist/pages/prenatal-visit/pregnancy/nurse-end/close-archives/components/Form.d.ts +1 -1
  268. package/dist/pages/prenatal-visit/pregnancy/nurse-end/close-archives/form_config.d.ts +3 -2
  269. package/dist/pages/prenatal-visit/pregnancy/nurse-end/further-visit/config/table copy.d.ts +86 -0
  270. package/dist/pages/prenatal-visit/pregnancy/nurse-end/further-visit/config/table.d.ts +4 -86
  271. package/dist/pages/prenatal-visit/pregnancy/nurse-end/further-visit/index1.d.ts +7 -114
  272. package/dist/pages/prenatal-visit/pregnancy/nurse-end/outercourt-report/components/Table.d.ts +1 -1
  273. package/dist/pages/prenatal-visit/pregnancy/nurse-end/outercourt-report/index1.d.ts +1 -1
  274. package/dist/pages/prenatal-visit/report/list/Inner.d.ts +4 -0
  275. package/dist/pages/prenatal-visit/report/list/form_config.d.ts +4 -0
  276. package/dist/pages/prenatal-visit/report/list/index copy 2.d.ts +10 -0
  277. package/dist/pages/prenatal-visit/report/list/index copy.d.ts +1 -1
  278. package/dist/pages/prenatal-visit/report/list/index.d.ts +2 -9
  279. package/dist/pages/prenatal-visit/report/list/types.d.ts +5 -0
  280. package/dist/pages/referral-management/referral-in/add/index copy.d.ts +11 -0
  281. package/dist/pages/referral-management/referral-in/add/index.d.ts +5 -11
  282. package/dist/pages/referral-management/referral-in/list/OpenReferralInEdit.d.ts +13 -0
  283. package/dist/pages/referral-management/referral-in/list/config/table.d.ts +3 -37
  284. package/dist/pages/referral-management/referral-in/list/index copy.d.ts +26 -0
  285. package/dist/pages/referral-management/referral-in/list/index.d.ts +2 -1
  286. package/dist/pages/referral-management/referral-out/list/config/table.d.ts +19 -1
  287. package/dist/pages/referral-management/referral-out/list/index copy.d.ts +99 -0
  288. package/dist/pages/referral-management/referral-out/list/index.d.ts +2 -1
  289. package/dist/pages/statistics/further-visit/detail/index.d.ts +2 -0
  290. package/dist/pages/statistics/further-visit/detail/serch_config.d.ts +4 -0
  291. package/dist/pages/statistics/further-visit/detail/table_config.d.ts +4 -0
  292. package/dist/pages/statistics/further-visit/list/index.d.ts +2 -0
  293. package/dist/pages/statistics/further-visit/list/serch_config.d.ts +4 -0
  294. package/dist/pages/statistics/further-visit/list/table_config.d.ts +4 -0
  295. package/dist/pages/system/role/components/RolesModal.d.ts +2 -2
  296. package/dist/pages/system/role/config/form.d.ts +4 -2
  297. package/dist/pages/system/role/index.d.ts +1 -1
  298. package/dist/pages/system/user/components/UsersModal.d.ts +2 -2
  299. package/dist/pages/system/user/config/adapter.d.ts +1 -1
  300. package/dist/pages/system/user/config/table.d.ts +1 -1
  301. package/dist/pages/system/user/index.d.ts +3 -3
  302. package/dist/pages/system-config/form_config.d.ts +1 -1
  303. package/dist/pages/task-logs/components/Query.d.ts +1 -1
  304. package/dist/pages/task-logs/config/form.d.ts +2 -2
  305. package/dist/pages/task-logs/config/table.d.ts +2 -2
  306. package/dist/pages/task-logs/index.d.ts +2 -2
  307. package/dist/pages/tasks/list/config/adapter.d.ts +1 -1
  308. package/dist/pages/tasks/list/config/table.d.ts +1 -1
  309. package/dist/pages/tasks/list/form_config.d.ts +4 -0
  310. package/dist/pages/tasks/list/index copy.d.ts +3 -0
  311. package/dist/pages/tasks/list/index.d.ts +2 -57
  312. package/dist/pages/tasks/list/search_config.d.ts +4 -0
  313. package/dist/pages/test/form_config.d.ts +4 -0
  314. package/dist/pages/test/index.d.ts +1 -1
  315. package/dist/pages/visit-management/telephone-followup/form_config.d.ts +4 -0
  316. package/dist/pages/visit-management/telephone-followup/index.d.ts +2 -0
  317. package/dist/routes/index.d.ts +8 -4
  318. package/dist/routes/meta.d.ts +8 -4
  319. package/package.json +30 -13
  320. package/dist/a_chunks/.root.js.map +0 -1
  321. package/dist/a_chunks/.root10.js.map +0 -1
  322. package/dist/a_chunks/.root100.js.map +0 -1
  323. package/dist/a_chunks/.root101.js.map +0 -1
  324. package/dist/a_chunks/.root102.js.map +0 -1
  325. package/dist/a_chunks/.root103.js.map +0 -1
  326. package/dist/a_chunks/.root104.js.map +0 -1
  327. package/dist/a_chunks/.root105.js.map +0 -1
  328. package/dist/a_chunks/.root106.js.map +0 -1
  329. package/dist/a_chunks/.root107.js.map +0 -1
  330. package/dist/a_chunks/.root108.js.map +0 -1
  331. package/dist/a_chunks/.root109.js.map +0 -1
  332. package/dist/a_chunks/.root11.js.map +0 -1
  333. package/dist/a_chunks/.root110.js.map +0 -1
  334. package/dist/a_chunks/.root111.js.map +0 -1
  335. package/dist/a_chunks/.root112.js.map +0 -1
  336. package/dist/a_chunks/.root113.js.map +0 -1
  337. package/dist/a_chunks/.root114.js.map +0 -1
  338. package/dist/a_chunks/.root12.js.map +0 -1
  339. package/dist/a_chunks/.root13.js.map +0 -1
  340. package/dist/a_chunks/.root14.js.map +0 -1
  341. package/dist/a_chunks/.root15.js.map +0 -1
  342. package/dist/a_chunks/.root16.js.map +0 -1
  343. package/dist/a_chunks/.root17.js.map +0 -1
  344. package/dist/a_chunks/.root18.js.map +0 -1
  345. package/dist/a_chunks/.root19.js.map +0 -1
  346. package/dist/a_chunks/.root2.js.map +0 -1
  347. package/dist/a_chunks/.root20.js.map +0 -1
  348. package/dist/a_chunks/.root21.js.map +0 -1
  349. package/dist/a_chunks/.root22.js.map +0 -1
  350. package/dist/a_chunks/.root23.js.map +0 -1
  351. package/dist/a_chunks/.root24.js.map +0 -1
  352. package/dist/a_chunks/.root25.js.map +0 -1
  353. package/dist/a_chunks/.root26.js.map +0 -1
  354. package/dist/a_chunks/.root27.js.map +0 -1
  355. package/dist/a_chunks/.root28.js.map +0 -1
  356. package/dist/a_chunks/.root29.js.map +0 -1
  357. package/dist/a_chunks/.root3.js.map +0 -1
  358. package/dist/a_chunks/.root30.js.map +0 -1
  359. package/dist/a_chunks/.root31.js.map +0 -1
  360. package/dist/a_chunks/.root32.js.map +0 -1
  361. package/dist/a_chunks/.root33.js.map +0 -1
  362. package/dist/a_chunks/.root34.js.map +0 -1
  363. package/dist/a_chunks/.root35.js.map +0 -1
  364. package/dist/a_chunks/.root36.js.map +0 -1
  365. package/dist/a_chunks/.root37.js.map +0 -1
  366. package/dist/a_chunks/.root38.js.map +0 -1
  367. package/dist/a_chunks/.root39.js.map +0 -1
  368. package/dist/a_chunks/.root4.js.map +0 -1
  369. package/dist/a_chunks/.root40.js.map +0 -1
  370. package/dist/a_chunks/.root41.js.map +0 -1
  371. package/dist/a_chunks/.root42.js.map +0 -1
  372. package/dist/a_chunks/.root43.js.map +0 -1
  373. package/dist/a_chunks/.root44.js.map +0 -1
  374. package/dist/a_chunks/.root45.js.map +0 -1
  375. package/dist/a_chunks/.root46.js.map +0 -1
  376. package/dist/a_chunks/.root47.js.map +0 -1
  377. package/dist/a_chunks/.root48.js.map +0 -1
  378. package/dist/a_chunks/.root49.js.map +0 -1
  379. package/dist/a_chunks/.root5.js.map +0 -1
  380. package/dist/a_chunks/.root50.js.map +0 -1
  381. package/dist/a_chunks/.root51.js.map +0 -1
  382. package/dist/a_chunks/.root52.js.map +0 -1
  383. package/dist/a_chunks/.root53.js.map +0 -1
  384. package/dist/a_chunks/.root54.js.map +0 -1
  385. package/dist/a_chunks/.root55.js.map +0 -1
  386. package/dist/a_chunks/.root56.js.map +0 -1
  387. package/dist/a_chunks/.root57.js.map +0 -1
  388. package/dist/a_chunks/.root58.js.map +0 -1
  389. package/dist/a_chunks/.root59.js.map +0 -1
  390. package/dist/a_chunks/.root6.js.map +0 -1
  391. package/dist/a_chunks/.root60.js.map +0 -1
  392. package/dist/a_chunks/.root61.js.map +0 -1
  393. package/dist/a_chunks/.root62.js.map +0 -1
  394. package/dist/a_chunks/.root63.js.map +0 -1
  395. package/dist/a_chunks/.root64.js.map +0 -1
  396. package/dist/a_chunks/.root65.js.map +0 -1
  397. package/dist/a_chunks/.root66.js.map +0 -1
  398. package/dist/a_chunks/.root67.js.map +0 -1
  399. package/dist/a_chunks/.root68.js.map +0 -1
  400. package/dist/a_chunks/.root69.js.map +0 -1
  401. package/dist/a_chunks/.root7.js.map +0 -1
  402. package/dist/a_chunks/.root70.js.map +0 -1
  403. package/dist/a_chunks/.root71.js.map +0 -1
  404. package/dist/a_chunks/.root72.js.map +0 -1
  405. package/dist/a_chunks/.root73.js.map +0 -1
  406. package/dist/a_chunks/.root74.js.map +0 -1
  407. package/dist/a_chunks/.root75.js.map +0 -1
  408. package/dist/a_chunks/.root76.js.map +0 -1
  409. package/dist/a_chunks/.root77.js.map +0 -1
  410. package/dist/a_chunks/.root78.js.map +0 -1
  411. package/dist/a_chunks/.root79.js.map +0 -1
  412. package/dist/a_chunks/.root8.js.map +0 -1
  413. package/dist/a_chunks/.root80.js.map +0 -1
  414. package/dist/a_chunks/.root81.js.map +0 -1
  415. package/dist/a_chunks/.root82.js.map +0 -1
  416. package/dist/a_chunks/.root83.js.map +0 -1
  417. package/dist/a_chunks/.root84.js.map +0 -1
  418. package/dist/a_chunks/.root85.js.map +0 -1
  419. package/dist/a_chunks/.root86.js.map +0 -1
  420. package/dist/a_chunks/.root87.js.map +0 -1
  421. package/dist/a_chunks/.root88.js.map +0 -1
  422. package/dist/a_chunks/.root89.js.map +0 -1
  423. package/dist/a_chunks/.root9.js.map +0 -1
  424. package/dist/a_chunks/.root90.js.map +0 -1
  425. package/dist/a_chunks/.root91.js.map +0 -1
  426. package/dist/a_chunks/.root92.js.map +0 -1
  427. package/dist/a_chunks/.root93.js.map +0 -1
  428. package/dist/a_chunks/.root94.js.map +0 -1
  429. package/dist/a_chunks/.root95.js.map +0 -1
  430. package/dist/a_chunks/.root96.js.map +0 -1
  431. package/dist/a_chunks/.root97.js.map +0 -1
  432. package/dist/a_chunks/.root98.js.map +0 -1
  433. package/dist/a_chunks/.root99.js.map +0 -1
  434. package/dist/a_chunks/DoctorEnd_FurtherPage.js.map +0 -1
  435. package/dist/a_chunks/HistoryTable.js.map +0 -1
  436. package/dist/a_chunks/bindLifecycle.js +0 -234
  437. package/dist/a_chunks/bindLifecycle.js.map +0 -1
  438. package/dist/a_chunks/diagnoses-week.js.map +0 -1
  439. package/dist/a_chunks/extends.js +0 -11
  440. package/dist/a_chunks/extends.js.map +0 -1
  441. package/dist/a_chunks/hoist-non-react-statics.cjs.js +0 -382
  442. package/dist/a_chunks/hoist-non-react-statics.cjs.js.map +0 -1
  443. package/dist/a_chunks/index.js.map +0 -1
  444. package/dist/a_chunks/index1.js.map +0 -1
  445. package/dist/a_chunks/index12.js.map +0 -1
  446. package/dist/a_chunks/index2.js.map +0 -1
  447. package/dist/a_chunks/index3.js.map +0 -1
  448. package/dist/a_chunks/index4.js.map +0 -1
  449. package/dist/a_chunks/index5.js.map +0 -1
  450. package/dist/a_chunks/index6.js +0 -754
  451. package/dist/a_chunks/index6.js.map +0 -1
  452. package/dist/a_chunks/react-router.js +0 -1890
  453. package/dist/a_chunks/react-router.js.map +0 -1
  454. package/dist/a_chunks/request.js.map +0 -1
  455. package/dist/a_chunks/utils.js.map +0 -1
  456. package/dist/a_chunks/utils2.js.map +0 -1
  457. package/dist/a_chunks//345/255/225/344/272/247/345/217/262.js.map +0 -1
  458. package/dist/a_chunks//351/253/230/345/215/261/347/256/241/347/220/206.js.map +0 -1
  459. package/dist/index.js.map +0 -1
  460. package/dist/pages/follow-up/questionnaire3/Inner.d.ts +0 -6
  461. package/dist/pages/follow-up/questionnaire3/create/Step2Right.d.ts +0 -11
  462. package/dist/pages/follow-up/questionnaire3/create/common.d.ts +0 -46
  463. package/dist/pages/follow-up/questionnaire3/create/fakeData.d.ts +0 -6
  464. package/dist/pages/follow-up/questionnaire3/create/question-item.d.ts +0 -14
  465. package/dist/pages/follow-up/questionnaire3/create/step1.d.ts +0 -9
  466. package/dist/pages/follow-up/questionnaire3/create/step2.d.ts +0 -10
  467. package/dist/pages/follow-up/questionnaire3/create/step3.d.ts +0 -8
  468. package/dist/pages/follow-up/questionnaire3/create/step4.d.ts +0 -8
  469. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.components/DiagReminder/index.d.ts +0 -13
  470. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.components/PreventPreeclampsia/index.d.ts +0 -8
  471. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.components/ResultImport/index.d.ts +0 -11
  472. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/components/BloodGlucose/index.d.ts +0 -21
  473. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/components/BloodPressure/index.d.ts +0 -21
  474. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.home-care/components/FetalMovement/index.d.ts +0 -34
  475. package/dist/pages/prenatal-visit/pregnancy/doctor-end/.initial/func.d.ts +0 -33
  476. package/dist/pages/system-config/config.d.ts +0 -12
  477. package/dist/pages/tasks/test/index.d.ts +0 -2
@@ -1,1890 +0,0 @@
1
- import _typeof from "@babel/runtime/helpers/typeof";
2
- import React__default from 'react';
3
- import { r as reactIs } from './hoist-non-react-statics.cjs.js';
4
- import { createLocation, createMemoryHistory, createPath } from 'history';
5
- import { _ as _extends } from './extends.js';
6
- function _setPrototypeOf(t, e) {
7
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
8
- return t.__proto__ = e, t;
9
- }, _setPrototypeOf(t, e);
10
- }
11
- function _inheritsLoose(t, o) {
12
- t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
13
- }
14
- var propTypes = {
15
- exports: {}
16
- };
17
-
18
- /*
19
- object-assign
20
- (c) Sindre Sorhus
21
- @license MIT
22
- */
23
- /* eslint-disable no-unused-vars */
24
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
25
- var hasOwnProperty = Object.prototype.hasOwnProperty;
26
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
27
- function toObject(val) {
28
- if (val === null || val === undefined) {
29
- throw new TypeError('Object.assign cannot be called with null or undefined');
30
- }
31
- return Object(val);
32
- }
33
- function shouldUseNative() {
34
- try {
35
- if (!Object.assign) {
36
- return false;
37
- }
38
-
39
- // Detect buggy property enumeration order in older V8 versions.
40
-
41
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
42
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
43
- test1[5] = 'de';
44
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
45
- return false;
46
- }
47
-
48
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
49
- var test2 = {};
50
- for (var i = 0; i < 10; i++) {
51
- test2['_' + String.fromCharCode(i)] = i;
52
- }
53
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
54
- return test2[n];
55
- });
56
- if (order2.join('') !== '0123456789') {
57
- return false;
58
- }
59
-
60
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
61
- var test3 = {};
62
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
63
- test3[letter] = letter;
64
- });
65
- if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
66
- return false;
67
- }
68
- return true;
69
- } catch (err) {
70
- // We don't expect any of the above to throw, but better to be safe.
71
- return false;
72
- }
73
- }
74
- var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
75
- var from;
76
- var to = toObject(target);
77
- var symbols;
78
- for (var s = 1; s < arguments.length; s++) {
79
- from = Object(arguments[s]);
80
- for (var key in from) {
81
- if (hasOwnProperty.call(from, key)) {
82
- to[key] = from[key];
83
- }
84
- }
85
- if (getOwnPropertySymbols) {
86
- symbols = getOwnPropertySymbols(from);
87
- for (var i = 0; i < symbols.length; i++) {
88
- if (propIsEnumerable.call(from, symbols[i])) {
89
- to[symbols[i]] = from[symbols[i]];
90
- }
91
- }
92
- }
93
- }
94
- return to;
95
- };
96
-
97
- /**
98
- * Copyright (c) 2013-present, Facebook, Inc.
99
- *
100
- * This source code is licensed under the MIT license found in the
101
- * LICENSE file in the root directory of this source tree.
102
- */
103
- var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
104
- var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
105
- var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
106
-
107
- /**
108
- * Copyright (c) 2013-present, Facebook, Inc.
109
- *
110
- * This source code is licensed under the MIT license found in the
111
- * LICENSE file in the root directory of this source tree.
112
- */
113
- var printWarning$1 = function printWarning$1() {};
114
- if (process.env.NODE_ENV !== 'production') {
115
- var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
116
- var loggedTypeFailures = {};
117
- var has$1 = has$2;
118
- printWarning$1 = function printWarning$1(text) {
119
- var message = 'Warning: ' + text;
120
- if (typeof console !== 'undefined') {
121
- console.error(message);
122
- }
123
- try {
124
- // --- Welcome to debugging React ---
125
- // This error was thrown as a convenience so that you can use this stack
126
- // to find the callsite that caused this warning to fire.
127
- throw new Error(message);
128
- } catch (x) {/**/}
129
- };
130
- }
131
-
132
- /**
133
- * Assert that the values match with the type specs.
134
- * Error messages are memorized and will only be shown once.
135
- *
136
- * @param {object} typeSpecs Map of name to a ReactPropType
137
- * @param {object} values Runtime values that need to be type-checked
138
- * @param {string} location e.g. "prop", "context", "child context"
139
- * @param {string} componentName Name of the component for error messages.
140
- * @param {?Function} getStack Returns the component stack.
141
- * @private
142
- */
143
- function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
144
- if (process.env.NODE_ENV !== 'production') {
145
- for (var typeSpecName in typeSpecs) {
146
- if (has$1(typeSpecs, typeSpecName)) {
147
- var error;
148
- // Prop type validation may throw. In case they do, we don't want to
149
- // fail the render phase where it didn't fail before. So we log it.
150
- // After these have been cleaned up, we'll let them throw.
151
- try {
152
- // This is intentionally an invariant that gets caught. It's the same
153
- // behavior as without this statement except with a better message.
154
- if (typeof typeSpecs[typeSpecName] !== 'function') {
155
- var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + _typeof(typeSpecs[typeSpecName]) + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
156
- err.name = 'Invariant Violation';
157
- throw err;
158
- }
159
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
160
- } catch (ex) {
161
- error = ex;
162
- }
163
- if (error && !(error instanceof Error)) {
164
- printWarning$1((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + _typeof(error) + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
165
- }
166
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
167
- // Only monitor this failure once because there tends to be a lot of the
168
- // same error.
169
- loggedTypeFailures[error.message] = true;
170
- var stack = getStack ? getStack() : '';
171
- printWarning$1('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
172
- }
173
- }
174
- }
175
- }
176
- }
177
-
178
- /**
179
- * Resets warning cache when testing.
180
- *
181
- * @private
182
- */
183
- checkPropTypes$1.resetWarningCache = function () {
184
- if (process.env.NODE_ENV !== 'production') {
185
- loggedTypeFailures = {};
186
- }
187
- };
188
- var checkPropTypes_1 = checkPropTypes$1;
189
-
190
- /**
191
- * Copyright (c) 2013-present, Facebook, Inc.
192
- *
193
- * This source code is licensed under the MIT license found in the
194
- * LICENSE file in the root directory of this source tree.
195
- */
196
- var ReactIs$1 = reactIs.exports;
197
- var assign = objectAssign;
198
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
199
- var has = has$2;
200
- var checkPropTypes = checkPropTypes_1;
201
- var printWarning = function printWarning() {};
202
- if (process.env.NODE_ENV !== 'production') {
203
- printWarning = function printWarning(text) {
204
- var message = 'Warning: ' + text;
205
- if (typeof console !== 'undefined') {
206
- console.error(message);
207
- }
208
- try {
209
- // --- Welcome to debugging React ---
210
- // This error was thrown as a convenience so that you can use this stack
211
- // to find the callsite that caused this warning to fire.
212
- throw new Error(message);
213
- } catch (x) {}
214
- };
215
- }
216
- function emptyFunctionThatReturnsNull() {
217
- return null;
218
- }
219
- var factoryWithTypeCheckers = function factoryWithTypeCheckers(isValidElement, throwOnDirectAccess) {
220
- /* global Symbol */
221
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
222
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
223
-
224
- /**
225
- * Returns the iterator method function contained on the iterable object.
226
- *
227
- * Be sure to invoke the function with the iterable as context:
228
- *
229
- * var iteratorFn = getIteratorFn(myIterable);
230
- * if (iteratorFn) {
231
- * var iterator = iteratorFn.call(myIterable);
232
- * ...
233
- * }
234
- *
235
- * @param {?object} maybeIterable
236
- * @return {?function}
237
- */
238
- function getIteratorFn(maybeIterable) {
239
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
240
- if (typeof iteratorFn === 'function') {
241
- return iteratorFn;
242
- }
243
- }
244
-
245
- /**
246
- * Collection of methods that allow declaration and validation of props that are
247
- * supplied to React components. Example usage:
248
- *
249
- * var Props = require('ReactPropTypes');
250
- * var MyArticle = React.createClass({
251
- * propTypes: {
252
- * // An optional string prop named "description".
253
- * description: Props.string,
254
- *
255
- * // A required enum prop named "category".
256
- * category: Props.oneOf(['News','Photos']).isRequired,
257
- *
258
- * // A prop named "dialog" that requires an instance of Dialog.
259
- * dialog: Props.instanceOf(Dialog).isRequired
260
- * },
261
- * render: function() { ... }
262
- * });
263
- *
264
- * A more formal specification of how these methods are used:
265
- *
266
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
267
- * decl := ReactPropTypes.{type}(.isRequired)?
268
- *
269
- * Each and every declaration produces a function with the same signature. This
270
- * allows the creation of custom validation functions. For example:
271
- *
272
- * var MyLink = React.createClass({
273
- * propTypes: {
274
- * // An optional string or URI prop named "href".
275
- * href: function(props, propName, componentName) {
276
- * var propValue = props[propName];
277
- * if (propValue != null && typeof propValue !== 'string' &&
278
- * !(propValue instanceof URI)) {
279
- * return new Error(
280
- * 'Expected a string or an URI for ' + propName + ' in ' +
281
- * componentName
282
- * );
283
- * }
284
- * }
285
- * },
286
- * render: function() {...}
287
- * });
288
- *
289
- * @internal
290
- */
291
-
292
- var ANONYMOUS = '<<anonymous>>';
293
-
294
- // Important!
295
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
296
- var ReactPropTypes = {
297
- array: createPrimitiveTypeChecker('array'),
298
- bigint: createPrimitiveTypeChecker('bigint'),
299
- bool: createPrimitiveTypeChecker('boolean'),
300
- func: createPrimitiveTypeChecker('function'),
301
- number: createPrimitiveTypeChecker('number'),
302
- object: createPrimitiveTypeChecker('object'),
303
- string: createPrimitiveTypeChecker('string'),
304
- symbol: createPrimitiveTypeChecker('symbol'),
305
- any: createAnyTypeChecker(),
306
- arrayOf: createArrayOfTypeChecker,
307
- element: createElementTypeChecker(),
308
- elementType: createElementTypeTypeChecker(),
309
- instanceOf: createInstanceTypeChecker,
310
- node: createNodeChecker(),
311
- objectOf: createObjectOfTypeChecker,
312
- oneOf: createEnumTypeChecker,
313
- oneOfType: createUnionTypeChecker,
314
- shape: createShapeTypeChecker,
315
- exact: createStrictShapeTypeChecker
316
- };
317
-
318
- /**
319
- * inlined Object.is polyfill to avoid requiring consumers ship their own
320
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
321
- */
322
- /*eslint-disable no-self-compare*/
323
- function is(x, y) {
324
- // SameValue algorithm
325
- if (x === y) {
326
- // Steps 1-5, 7-10
327
- // Steps 6.b-6.e: +0 != -0
328
- return x !== 0 || 1 / x === 1 / y;
329
- } else {
330
- // Step 6.a: NaN == NaN
331
- return x !== x && y !== y;
332
- }
333
- }
334
- /*eslint-enable no-self-compare*/
335
-
336
- /**
337
- * We use an Error-like object for backward compatibility as people may call
338
- * PropTypes directly and inspect their output. However, we don't use real
339
- * Errors anymore. We don't inspect their stack anyway, and creating them
340
- * is prohibitively expensive if they are created too often, such as what
341
- * happens in oneOfType() for any type before the one that matched.
342
- */
343
- function PropTypeError(message, data) {
344
- this.message = message;
345
- this.data = data && _typeof(data) === 'object' ? data : {};
346
- this.stack = '';
347
- }
348
- // Make `instanceof Error` still work for returned errors.
349
- PropTypeError.prototype = Error.prototype;
350
- function createChainableTypeChecker(validate) {
351
- if (process.env.NODE_ENV !== 'production') {
352
- var manualPropTypeCallCache = {};
353
- var manualPropTypeWarningCount = 0;
354
- }
355
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
356
- componentName = componentName || ANONYMOUS;
357
- propFullName = propFullName || propName;
358
- if (secret !== ReactPropTypesSecret$1) {
359
- if (throwOnDirectAccess) {
360
- // New behavior only for users of `prop-types` package
361
- var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
362
- err.name = 'Invariant Violation';
363
- throw err;
364
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
365
- // Old behavior for people using React.PropTypes
366
- var cacheKey = componentName + ':' + propName;
367
- if (!manualPropTypeCallCache[cacheKey] &&
368
- // Avoid spamming the console because they are often not actionable except for lib authors
369
- manualPropTypeWarningCount < 3) {
370
- printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');
371
- manualPropTypeCallCache[cacheKey] = true;
372
- manualPropTypeWarningCount++;
373
- }
374
- }
375
- }
376
- if (props[propName] == null) {
377
- if (isRequired) {
378
- if (props[propName] === null) {
379
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
380
- }
381
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
382
- }
383
- return null;
384
- } else {
385
- return validate(props, propName, componentName, location, propFullName);
386
- }
387
- }
388
- var chainedCheckType = checkType.bind(null, false);
389
- chainedCheckType.isRequired = checkType.bind(null, true);
390
- return chainedCheckType;
391
- }
392
- function createPrimitiveTypeChecker(expectedType) {
393
- function validate(props, propName, componentName, location, propFullName, secret) {
394
- var propValue = props[propName];
395
- var propType = getPropType(propValue);
396
- if (propType !== expectedType) {
397
- // `propValue` being instance of, say, date/regexp, pass the 'object'
398
- // check, but we can offer a more precise error message here rather than
399
- // 'of type `object`'.
400
- var preciseType = getPreciseType(propValue);
401
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
402
- expectedType: expectedType
403
- });
404
- }
405
- return null;
406
- }
407
- return createChainableTypeChecker(validate);
408
- }
409
- function createAnyTypeChecker() {
410
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
411
- }
412
- function createArrayOfTypeChecker(typeChecker) {
413
- function validate(props, propName, componentName, location, propFullName) {
414
- if (typeof typeChecker !== 'function') {
415
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
416
- }
417
- var propValue = props[propName];
418
- if (!Array.isArray(propValue)) {
419
- var propType = getPropType(propValue);
420
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
421
- }
422
- for (var i = 0; i < propValue.length; i++) {
423
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret$1);
424
- if (error instanceof Error) {
425
- return error;
426
- }
427
- }
428
- return null;
429
- }
430
- return createChainableTypeChecker(validate);
431
- }
432
- function createElementTypeChecker() {
433
- function validate(props, propName, componentName, location, propFullName) {
434
- var propValue = props[propName];
435
- if (!isValidElement(propValue)) {
436
- var propType = getPropType(propValue);
437
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
438
- }
439
- return null;
440
- }
441
- return createChainableTypeChecker(validate);
442
- }
443
- function createElementTypeTypeChecker() {
444
- function validate(props, propName, componentName, location, propFullName) {
445
- var propValue = props[propName];
446
- if (!ReactIs$1.isValidElementType(propValue)) {
447
- var propType = getPropType(propValue);
448
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
449
- }
450
- return null;
451
- }
452
- return createChainableTypeChecker(validate);
453
- }
454
- function createInstanceTypeChecker(expectedClass) {
455
- function validate(props, propName, componentName, location, propFullName) {
456
- if (!(props[propName] instanceof expectedClass)) {
457
- var expectedClassName = expectedClass.name || ANONYMOUS;
458
- var actualClassName = getClassName(props[propName]);
459
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
460
- }
461
- return null;
462
- }
463
- return createChainableTypeChecker(validate);
464
- }
465
- function createEnumTypeChecker(expectedValues) {
466
- if (!Array.isArray(expectedValues)) {
467
- if (process.env.NODE_ENV !== 'production') {
468
- if (arguments.length > 1) {
469
- printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');
470
- } else {
471
- printWarning('Invalid argument supplied to oneOf, expected an array.');
472
- }
473
- }
474
- return emptyFunctionThatReturnsNull;
475
- }
476
- function validate(props, propName, componentName, location, propFullName) {
477
- var propValue = props[propName];
478
- for (var i = 0; i < expectedValues.length; i++) {
479
- if (is(propValue, expectedValues[i])) {
480
- return null;
481
- }
482
- }
483
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
484
- var type = getPreciseType(value);
485
- if (type === 'symbol') {
486
- return String(value);
487
- }
488
- return value;
489
- });
490
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
491
- }
492
- return createChainableTypeChecker(validate);
493
- }
494
- function createObjectOfTypeChecker(typeChecker) {
495
- function validate(props, propName, componentName, location, propFullName) {
496
- if (typeof typeChecker !== 'function') {
497
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
498
- }
499
- var propValue = props[propName];
500
- var propType = getPropType(propValue);
501
- if (propType !== 'object') {
502
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
503
- }
504
- for (var key in propValue) {
505
- if (has(propValue, key)) {
506
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
507
- if (error instanceof Error) {
508
- return error;
509
- }
510
- }
511
- }
512
- return null;
513
- }
514
- return createChainableTypeChecker(validate);
515
- }
516
- function createUnionTypeChecker(arrayOfTypeCheckers) {
517
- if (!Array.isArray(arrayOfTypeCheckers)) {
518
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
519
- return emptyFunctionThatReturnsNull;
520
- }
521
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
522
- var checker = arrayOfTypeCheckers[i];
523
- if (typeof checker !== 'function') {
524
- printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
525
- return emptyFunctionThatReturnsNull;
526
- }
527
- }
528
- function validate(props, propName, componentName, location, propFullName) {
529
- var expectedTypes = [];
530
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
531
- var checker = arrayOfTypeCheckers[i];
532
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1);
533
- if (checkerResult == null) {
534
- return null;
535
- }
536
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
537
- expectedTypes.push(checkerResult.data.expectedType);
538
- }
539
- }
540
- var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
541
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
542
- }
543
- return createChainableTypeChecker(validate);
544
- }
545
- function createNodeChecker() {
546
- function validate(props, propName, componentName, location, propFullName) {
547
- if (!isNode(props[propName])) {
548
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
549
- }
550
- return null;
551
- }
552
- return createChainableTypeChecker(validate);
553
- }
554
- function invalidValidatorError(componentName, location, propFullName, key, type) {
555
- return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
556
- }
557
- function createShapeTypeChecker(shapeTypes) {
558
- function validate(props, propName, componentName, location, propFullName) {
559
- var propValue = props[propName];
560
- var propType = getPropType(propValue);
561
- if (propType !== 'object') {
562
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
563
- }
564
- for (var key in shapeTypes) {
565
- var checker = shapeTypes[key];
566
- if (typeof checker !== 'function') {
567
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
568
- }
569
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
570
- if (error) {
571
- return error;
572
- }
573
- }
574
- return null;
575
- }
576
- return createChainableTypeChecker(validate);
577
- }
578
- function createStrictShapeTypeChecker(shapeTypes) {
579
- function validate(props, propName, componentName, location, propFullName) {
580
- var propValue = props[propName];
581
- var propType = getPropType(propValue);
582
- if (propType !== 'object') {
583
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
584
- }
585
- // We need to check all keys in case some are required but missing from props.
586
- var allKeys = assign({}, props[propName], shapeTypes);
587
- for (var key in allKeys) {
588
- var checker = shapeTypes[key];
589
- if (has(shapeTypes, key) && typeof checker !== 'function') {
590
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
591
- }
592
- if (!checker) {
593
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
594
- }
595
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
596
- if (error) {
597
- return error;
598
- }
599
- }
600
- return null;
601
- }
602
- return createChainableTypeChecker(validate);
603
- }
604
- function isNode(propValue) {
605
- switch (_typeof(propValue)) {
606
- case 'number':
607
- case 'string':
608
- case 'undefined':
609
- return true;
610
- case 'boolean':
611
- return !propValue;
612
- case 'object':
613
- if (Array.isArray(propValue)) {
614
- return propValue.every(isNode);
615
- }
616
- if (propValue === null || isValidElement(propValue)) {
617
- return true;
618
- }
619
- var iteratorFn = getIteratorFn(propValue);
620
- if (iteratorFn) {
621
- var iterator = iteratorFn.call(propValue);
622
- var step;
623
- if (iteratorFn !== propValue.entries) {
624
- while (!(step = iterator.next()).done) {
625
- if (!isNode(step.value)) {
626
- return false;
627
- }
628
- }
629
- } else {
630
- // Iterator will provide entry [k,v] tuples rather than values.
631
- while (!(step = iterator.next()).done) {
632
- var entry = step.value;
633
- if (entry) {
634
- if (!isNode(entry[1])) {
635
- return false;
636
- }
637
- }
638
- }
639
- }
640
- } else {
641
- return false;
642
- }
643
- return true;
644
- default:
645
- return false;
646
- }
647
- }
648
- function isSymbol(propType, propValue) {
649
- // Native Symbol.
650
- if (propType === 'symbol') {
651
- return true;
652
- }
653
-
654
- // falsy value can't be a Symbol
655
- if (!propValue) {
656
- return false;
657
- }
658
-
659
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
660
- if (propValue['@@toStringTag'] === 'Symbol') {
661
- return true;
662
- }
663
-
664
- // Fallback for non-spec compliant Symbols which are polyfilled.
665
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
666
- return true;
667
- }
668
- return false;
669
- }
670
-
671
- // Equivalent of `typeof` but with special handling for array and regexp.
672
- function getPropType(propValue) {
673
- var propType = _typeof(propValue);
674
- if (Array.isArray(propValue)) {
675
- return 'array';
676
- }
677
- if (propValue instanceof RegExp) {
678
- // Old webkits (at least until Android 4.0) return 'function' rather than
679
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
680
- // passes PropTypes.object.
681
- return 'object';
682
- }
683
- if (isSymbol(propType, propValue)) {
684
- return 'symbol';
685
- }
686
- return propType;
687
- }
688
-
689
- // This handles more types than `getPropType`. Only used for error messages.
690
- // See `createPrimitiveTypeChecker`.
691
- function getPreciseType(propValue) {
692
- if (typeof propValue === 'undefined' || propValue === null) {
693
- return '' + propValue;
694
- }
695
- var propType = getPropType(propValue);
696
- if (propType === 'object') {
697
- if (propValue instanceof Date) {
698
- return 'date';
699
- } else if (propValue instanceof RegExp) {
700
- return 'regexp';
701
- }
702
- }
703
- return propType;
704
- }
705
-
706
- // Returns a string that is postfixed to a warning about an invalid type.
707
- // For example, "undefined" or "of type array"
708
- function getPostfixForTypeWarning(value) {
709
- var type = getPreciseType(value);
710
- switch (type) {
711
- case 'array':
712
- case 'object':
713
- return 'an ' + type;
714
- case 'boolean':
715
- case 'date':
716
- case 'regexp':
717
- return 'a ' + type;
718
- default:
719
- return type;
720
- }
721
- }
722
-
723
- // Returns class name of the object, if any.
724
- function getClassName(propValue) {
725
- if (!propValue.constructor || !propValue.constructor.name) {
726
- return ANONYMOUS;
727
- }
728
- return propValue.constructor.name;
729
- }
730
- ReactPropTypes.checkPropTypes = checkPropTypes;
731
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
732
- ReactPropTypes.PropTypes = ReactPropTypes;
733
- return ReactPropTypes;
734
- };
735
-
736
- /**
737
- * Copyright (c) 2013-present, Facebook, Inc.
738
- *
739
- * This source code is licensed under the MIT license found in the
740
- * LICENSE file in the root directory of this source tree.
741
- */
742
- var ReactPropTypesSecret = ReactPropTypesSecret_1;
743
- function emptyFunction() {}
744
- function emptyFunctionWithReset() {}
745
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
746
- var factoryWithThrowingShims = function factoryWithThrowingShims() {
747
- function shim(props, propName, componentName, location, propFullName, secret) {
748
- if (secret === ReactPropTypesSecret) {
749
- // It is still safe when called from React.
750
- return;
751
- }
752
- var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
753
- err.name = 'Invariant Violation';
754
- throw err;
755
- }
756
- shim.isRequired = shim;
757
- function getShim() {
758
- return shim;
759
- }
760
- // Important!
761
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
762
- var ReactPropTypes = {
763
- array: shim,
764
- bigint: shim,
765
- bool: shim,
766
- func: shim,
767
- number: shim,
768
- object: shim,
769
- string: shim,
770
- symbol: shim,
771
- any: shim,
772
- arrayOf: getShim,
773
- element: shim,
774
- elementType: shim,
775
- instanceOf: getShim,
776
- node: shim,
777
- objectOf: getShim,
778
- oneOf: getShim,
779
- oneOfType: getShim,
780
- shape: getShim,
781
- exact: getShim,
782
- checkPropTypes: emptyFunctionWithReset,
783
- resetWarningCache: emptyFunction
784
- };
785
- ReactPropTypes.PropTypes = ReactPropTypes;
786
- return ReactPropTypes;
787
- };
788
-
789
- /**
790
- * Copyright (c) 2013-present, Facebook, Inc.
791
- *
792
- * This source code is licensed under the MIT license found in the
793
- * LICENSE file in the root directory of this source tree.
794
- */
795
- if (process.env.NODE_ENV !== 'production') {
796
- var ReactIs = reactIs.exports;
797
-
798
- // By explicitly using `prop-types` you are opting into new development behavior.
799
- // http://fb.me/prop-types-in-prod
800
- var throwOnDirectAccess = true;
801
- propTypes.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
802
- } else {
803
- // By explicitly using `prop-types` you are opting into new production behavior.
804
- // http://fb.me/prop-types-in-prod
805
- propTypes.exports = factoryWithThrowingShims();
806
- }
807
- var PropTypes = propTypes.exports;
808
- var isProduction$1 = process.env.NODE_ENV === 'production';
809
- function warning(condition, message) {
810
- if (!isProduction$1) {
811
- if (condition) {
812
- return;
813
- }
814
- var text = "Warning: " + message;
815
- if (typeof console !== 'undefined') {
816
- console.warn(text);
817
- }
818
- try {
819
- throw Error(text);
820
- } catch (x) {}
821
- }
822
- }
823
- var isProduction = process.env.NODE_ENV === 'production';
824
- var prefix = 'Invariant failed';
825
- function invariant(condition, message) {
826
- if (condition) {
827
- return;
828
- }
829
- if (isProduction) {
830
- throw new Error(prefix);
831
- }
832
- var provided = typeof message === 'function' ? message() : message;
833
- var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
834
- throw new Error(value);
835
- }
836
- var pathToRegexp$2 = {
837
- exports: {}
838
- };
839
- var isarray$1 = Array.isArray || function (arr) {
840
- return Object.prototype.toString.call(arr) == '[object Array]';
841
- };
842
- var isarray = isarray$1;
843
-
844
- /**
845
- * Expose `pathToRegexp`.
846
- */
847
- pathToRegexp$2.exports = pathToRegexp;
848
- pathToRegexp$2.exports.parse = parse;
849
- pathToRegexp$2.exports.compile = compile;
850
- pathToRegexp$2.exports.tokensToFunction = tokensToFunction;
851
- pathToRegexp$2.exports.tokensToRegExp = tokensToRegExp;
852
-
853
- /**
854
- * The main path matching regexp utility.
855
- *
856
- * @type {RegExp}
857
- */
858
- var PATH_REGEXP = new RegExp([
859
- // Match escaped characters that would otherwise appear in future matches.
860
- // This allows the user to escape special characters that won't transform.
861
- '(\\\\.)',
862
- // Match Express-style parameters and un-named parameters with a prefix
863
- // and optional suffixes. Matches appear as:
864
- //
865
- // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
866
- // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
867
- // "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
868
- '([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'].join('|'), 'g');
869
-
870
- /**
871
- * Parse a string for the raw tokens.
872
- *
873
- * @param {string} str
874
- * @param {Object=} options
875
- * @return {!Array}
876
- */
877
- function parse(str, options) {
878
- var tokens = [];
879
- var key = 0;
880
- var index = 0;
881
- var path = '';
882
- var defaultDelimiter = options && options.delimiter || '/';
883
- var res;
884
- while ((res = PATH_REGEXP.exec(str)) != null) {
885
- var m = res[0];
886
- var escaped = res[1];
887
- var offset = res.index;
888
- path += str.slice(index, offset);
889
- index = offset + m.length;
890
-
891
- // Ignore already escaped sequences.
892
- if (escaped) {
893
- path += escaped[1];
894
- continue;
895
- }
896
- var next = str[index];
897
- var prefix = res[2];
898
- var name = res[3];
899
- var capture = res[4];
900
- var group = res[5];
901
- var modifier = res[6];
902
- var asterisk = res[7];
903
-
904
- // Push the current path onto the tokens.
905
- if (path) {
906
- tokens.push(path);
907
- path = '';
908
- }
909
- var partial = prefix != null && next != null && next !== prefix;
910
- var repeat = modifier === '+' || modifier === '*';
911
- var optional = modifier === '?' || modifier === '*';
912
- var delimiter = prefix || defaultDelimiter;
913
- var pattern = capture || group;
914
- var prevText = prefix || (typeof tokens[tokens.length - 1] === 'string' ? tokens[tokens.length - 1] : '');
915
- tokens.push({
916
- name: name || key++,
917
- prefix: prefix || '',
918
- delimiter: delimiter,
919
- optional: optional,
920
- repeat: repeat,
921
- partial: partial,
922
- asterisk: !!asterisk,
923
- pattern: pattern ? escapeGroup(pattern) : asterisk ? '.*' : restrictBacktrack(delimiter, prevText)
924
- });
925
- }
926
-
927
- // Match any characters still remaining.
928
- if (index < str.length) {
929
- path += str.substr(index);
930
- }
931
-
932
- // If the path exists, push it onto the end.
933
- if (path) {
934
- tokens.push(path);
935
- }
936
- return tokens;
937
- }
938
- function restrictBacktrack(delimiter, prevText) {
939
- if (!prevText || prevText.indexOf(delimiter) > -1) {
940
- return '[^' + escapeString(delimiter) + ']+?';
941
- }
942
- return escapeString(prevText) + '|(?:(?!' + escapeString(prevText) + ')[^' + escapeString(delimiter) + '])+?';
943
- }
944
-
945
- /**
946
- * Compile a string to a template function for the path.
947
- *
948
- * @param {string} str
949
- * @param {Object=} options
950
- * @return {!function(Object=, Object=)}
951
- */
952
- function compile(str, options) {
953
- return tokensToFunction(parse(str, options), options);
954
- }
955
-
956
- /**
957
- * Prettier encoding of URI path segments.
958
- *
959
- * @param {string}
960
- * @return {string}
961
- */
962
- function encodeURIComponentPretty(str) {
963
- return encodeURI(str).replace(/[\/?#]/g, function (c) {
964
- return '%' + c.charCodeAt(0).toString(16).toUpperCase();
965
- });
966
- }
967
-
968
- /**
969
- * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
970
- *
971
- * @param {string}
972
- * @return {string}
973
- */
974
- function encodeAsterisk(str) {
975
- return encodeURI(str).replace(/[?#]/g, function (c) {
976
- return '%' + c.charCodeAt(0).toString(16).toUpperCase();
977
- });
978
- }
979
-
980
- /**
981
- * Expose a method for transforming tokens into the path function.
982
- */
983
- function tokensToFunction(tokens, options) {
984
- // Compile all the tokens into regexps.
985
- var matches = new Array(tokens.length);
986
-
987
- // Compile all the patterns before compilation.
988
- for (var i = 0; i < tokens.length; i++) {
989
- if (_typeof(tokens[i]) === 'object') {
990
- matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));
991
- }
992
- }
993
- return function (obj, opts) {
994
- var path = '';
995
- var data = obj || {};
996
- var options = opts || {};
997
- var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;
998
- for (var i = 0; i < tokens.length; i++) {
999
- var token = tokens[i];
1000
- if (typeof token === 'string') {
1001
- path += token;
1002
- continue;
1003
- }
1004
- var value = data[token.name];
1005
- var segment;
1006
- if (value == null) {
1007
- if (token.optional) {
1008
- // Prepend partial segment prefixes.
1009
- if (token.partial) {
1010
- path += token.prefix;
1011
- }
1012
- continue;
1013
- } else {
1014
- throw new TypeError('Expected "' + token.name + '" to be defined');
1015
- }
1016
- }
1017
- if (isarray(value)) {
1018
- if (!token.repeat) {
1019
- throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`');
1020
- }
1021
- if (value.length === 0) {
1022
- if (token.optional) {
1023
- continue;
1024
- } else {
1025
- throw new TypeError('Expected "' + token.name + '" to not be empty');
1026
- }
1027
- }
1028
- for (var j = 0; j < value.length; j++) {
1029
- segment = encode(value[j]);
1030
- if (!matches[i].test(segment)) {
1031
- throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`');
1032
- }
1033
- path += (j === 0 ? token.prefix : token.delimiter) + segment;
1034
- }
1035
- continue;
1036
- }
1037
- segment = token.asterisk ? encodeAsterisk(value) : encode(value);
1038
- if (!matches[i].test(segment)) {
1039
- throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"');
1040
- }
1041
- path += token.prefix + segment;
1042
- }
1043
- return path;
1044
- };
1045
- }
1046
-
1047
- /**
1048
- * Escape a regular expression string.
1049
- *
1050
- * @param {string} str
1051
- * @return {string}
1052
- */
1053
- function escapeString(str) {
1054
- return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1');
1055
- }
1056
-
1057
- /**
1058
- * Escape the capturing group by escaping special characters and meaning.
1059
- *
1060
- * @param {string} group
1061
- * @return {string}
1062
- */
1063
- function escapeGroup(group) {
1064
- return group.replace(/([=!:$\/()])/g, '\\$1');
1065
- }
1066
-
1067
- /**
1068
- * Attach the keys as a property of the regexp.
1069
- *
1070
- * @param {!RegExp} re
1071
- * @param {Array} keys
1072
- * @return {!RegExp}
1073
- */
1074
- function attachKeys(re, keys) {
1075
- re.keys = keys;
1076
- return re;
1077
- }
1078
-
1079
- /**
1080
- * Get the flags for a regexp from the options.
1081
- *
1082
- * @param {Object} options
1083
- * @return {string}
1084
- */
1085
- function flags(options) {
1086
- return options && options.sensitive ? '' : 'i';
1087
- }
1088
-
1089
- /**
1090
- * Pull out keys from a regexp.
1091
- *
1092
- * @param {!RegExp} path
1093
- * @param {!Array} keys
1094
- * @return {!RegExp}
1095
- */
1096
- function regexpToRegexp(path, keys) {
1097
- // Use a negative lookahead to match only capturing groups.
1098
- var groups = path.source.match(/\((?!\?)/g);
1099
- if (groups) {
1100
- for (var i = 0; i < groups.length; i++) {
1101
- keys.push({
1102
- name: i,
1103
- prefix: null,
1104
- delimiter: null,
1105
- optional: false,
1106
- repeat: false,
1107
- partial: false,
1108
- asterisk: false,
1109
- pattern: null
1110
- });
1111
- }
1112
- }
1113
- return attachKeys(path, keys);
1114
- }
1115
-
1116
- /**
1117
- * Transform an array into a regexp.
1118
- *
1119
- * @param {!Array} path
1120
- * @param {Array} keys
1121
- * @param {!Object} options
1122
- * @return {!RegExp}
1123
- */
1124
- function arrayToRegexp(path, keys, options) {
1125
- var parts = [];
1126
- for (var i = 0; i < path.length; i++) {
1127
- parts.push(pathToRegexp(path[i], keys, options).source);
1128
- }
1129
- var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));
1130
- return attachKeys(regexp, keys);
1131
- }
1132
-
1133
- /**
1134
- * Create a path regexp from string input.
1135
- *
1136
- * @param {string} path
1137
- * @param {!Array} keys
1138
- * @param {!Object} options
1139
- * @return {!RegExp}
1140
- */
1141
- function stringToRegexp(path, keys, options) {
1142
- return tokensToRegExp(parse(path, options), keys, options);
1143
- }
1144
-
1145
- /**
1146
- * Expose a function for taking tokens and returning a RegExp.
1147
- *
1148
- * @param {!Array} tokens
1149
- * @param {(Array|Object)=} keys
1150
- * @param {Object=} options
1151
- * @return {!RegExp}
1152
- */
1153
- function tokensToRegExp(tokens, keys, options) {
1154
- if (!isarray(keys)) {
1155
- options = /** @type {!Object} */keys || options;
1156
- keys = [];
1157
- }
1158
- options = options || {};
1159
- var strict = options.strict;
1160
- var end = options.end !== false;
1161
- var route = '';
1162
-
1163
- // Iterate over the tokens and create our regexp string.
1164
- for (var i = 0; i < tokens.length; i++) {
1165
- var token = tokens[i];
1166
- if (typeof token === 'string') {
1167
- route += escapeString(token);
1168
- } else {
1169
- var prefix = escapeString(token.prefix);
1170
- var capture = '(?:' + token.pattern + ')';
1171
- keys.push(token);
1172
- if (token.repeat) {
1173
- capture += '(?:' + prefix + capture + ')*';
1174
- }
1175
- if (token.optional) {
1176
- if (!token.partial) {
1177
- capture = '(?:' + prefix + '(' + capture + '))?';
1178
- } else {
1179
- capture = prefix + '(' + capture + ')?';
1180
- }
1181
- } else {
1182
- capture = prefix + '(' + capture + ')';
1183
- }
1184
- route += capture;
1185
- }
1186
- }
1187
- var delimiter = escapeString(options.delimiter || '/');
1188
- var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
1189
-
1190
- // In non-strict mode we allow a slash at the end of match. If the path to
1191
- // match already ends with a slash, we remove it for consistency. The slash
1192
- // is valid at the end of a path match, not in the middle. This is important
1193
- // in non-ending mode, where "/test/" shouldn't match "/test//route".
1194
- if (!strict) {
1195
- route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';
1196
- }
1197
- if (end) {
1198
- route += '$';
1199
- } else {
1200
- // In non-ending mode, we need the capturing groups to match as much as
1201
- // possible by using a positive lookahead to the end or next path segment.
1202
- route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';
1203
- }
1204
- return attachKeys(new RegExp('^' + route, flags(options)), keys);
1205
- }
1206
-
1207
- /**
1208
- * Normalize the given path string, returning a regular expression.
1209
- *
1210
- * An empty array can be passed in for the keys, which will hold the
1211
- * placeholder key descriptions. For example, using `/user/:id`, `keys` will
1212
- * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
1213
- *
1214
- * @param {(string|RegExp|Array)} path
1215
- * @param {(Array|Object)=} keys
1216
- * @param {Object=} options
1217
- * @return {!RegExp}
1218
- */
1219
- function pathToRegexp(path, keys, options) {
1220
- if (!isarray(keys)) {
1221
- options = /** @type {!Object} */keys || options;
1222
- keys = [];
1223
- }
1224
- options = options || {};
1225
- if (path instanceof RegExp) {
1226
- return regexpToRegexp(path, /** @type {!Array} */keys);
1227
- }
1228
- if (isarray(path)) {
1229
- return arrayToRegexp(/** @type {!Array} */path, /** @type {!Array} */keys, options);
1230
- }
1231
- return stringToRegexp(/** @type {string} */path, /** @type {!Array} */keys, options);
1232
- }
1233
- var pathToRegexp$1 = pathToRegexp$2.exports;
1234
- function _objectWithoutPropertiesLoose(r, e) {
1235
- if (null == r) return {};
1236
- var t = {};
1237
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
1238
- if (-1 !== e.indexOf(n)) continue;
1239
- t[n] = r[n];
1240
- }
1241
- return t;
1242
- }
1243
- var MAX_SIGNED_31_BIT_INT = 1073741823;
1244
- var commonjsGlobal = typeof globalThis !== "undefined" // 'global proper'
1245
- ?
1246
- // eslint-disable-next-line no-undef
1247
- globalThis : typeof window !== "undefined" ? window // Browser
1248
- : typeof global !== "undefined" ? global // node.js
1249
- : {};
1250
- function getUniqueId() {
1251
- var key = "__global_unique_id__";
1252
- return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
1253
- } // Inlined Object.is polyfill.
1254
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1255
-
1256
- function objectIs(x, y) {
1257
- if (x === y) {
1258
- return x !== 0 || 1 / x === 1 / y;
1259
- } else {
1260
- // eslint-disable-next-line no-self-compare
1261
- return x !== x && y !== y;
1262
- }
1263
- }
1264
- function createEventEmitter(value) {
1265
- var handlers = [];
1266
- return {
1267
- on: function on(handler) {
1268
- handlers.push(handler);
1269
- },
1270
- off: function off(handler) {
1271
- handlers = handlers.filter(function (h) {
1272
- return h !== handler;
1273
- });
1274
- },
1275
- get: function get() {
1276
- return value;
1277
- },
1278
- set: function set(newValue, changedBits) {
1279
- value = newValue;
1280
- handlers.forEach(function (handler) {
1281
- return handler(value, changedBits);
1282
- });
1283
- }
1284
- };
1285
- }
1286
- function onlyChild(children) {
1287
- return Array.isArray(children) ? children[0] : children;
1288
- }
1289
- function createReactContext(defaultValue, calculateChangedBits) {
1290
- var _Provider$childContex, _Consumer$contextType;
1291
- var contextProp = "__create-react-context-" + getUniqueId() + "__";
1292
- var Provider = /*#__PURE__*/function (_React$Component) {
1293
- _inheritsLoose(Provider, _React$Component);
1294
- function Provider() {
1295
- var _this;
1296
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1297
- args[_key] = arguments[_key];
1298
- }
1299
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
1300
- _this.emitter = createEventEmitter(_this.props.value);
1301
- return _this;
1302
- }
1303
- var _proto = Provider.prototype;
1304
- _proto.getChildContext = function getChildContext() {
1305
- var _ref;
1306
- return _ref = {}, _ref[contextProp] = this.emitter, _ref;
1307
- };
1308
- _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
1309
- if (this.props.value !== nextProps.value) {
1310
- var oldValue = this.props.value;
1311
- var newValue = nextProps.value;
1312
- var changedBits;
1313
- if (objectIs(oldValue, newValue)) {
1314
- changedBits = 0; // No change
1315
- } else {
1316
- changedBits = typeof calculateChangedBits === "function" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
1317
- if (process.env.NODE_ENV !== "production") {
1318
- process.env.NODE_ENV !== "production" ? warning((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, "calculateChangedBits: Expected the return value to be a " + "31-bit integer. Instead received: " + changedBits) : void 0;
1319
- }
1320
- changedBits |= 0;
1321
- if (changedBits !== 0) {
1322
- this.emitter.set(nextProps.value, changedBits);
1323
- }
1324
- }
1325
- }
1326
- };
1327
- _proto.render = function render() {
1328
- return this.props.children;
1329
- };
1330
- return Provider;
1331
- }(React__default.Component);
1332
- Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
1333
- var Consumer = /*#__PURE__*/function (_React$Component2) {
1334
- _inheritsLoose(Consumer, _React$Component2);
1335
- function Consumer() {
1336
- var _this2;
1337
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
1338
- args[_key2] = arguments[_key2];
1339
- }
1340
- _this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;
1341
- _this2.observedBits = void 0;
1342
- _this2.state = {
1343
- value: _this2.getValue()
1344
- };
1345
- _this2.onUpdate = function (newValue, changedBits) {
1346
- var observedBits = _this2.observedBits | 0;
1347
- if ((observedBits & changedBits) !== 0) {
1348
- _this2.setState({
1349
- value: _this2.getValue()
1350
- });
1351
- }
1352
- };
1353
- return _this2;
1354
- }
1355
- var _proto2 = Consumer.prototype;
1356
- _proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
1357
- var observedBits = nextProps.observedBits;
1358
- this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default
1359
- : observedBits;
1360
- };
1361
- _proto2.componentDidMount = function componentDidMount() {
1362
- if (this.context[contextProp]) {
1363
- this.context[contextProp].on(this.onUpdate);
1364
- }
1365
- var observedBits = this.props.observedBits;
1366
- this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default
1367
- : observedBits;
1368
- };
1369
- _proto2.componentWillUnmount = function componentWillUnmount() {
1370
- if (this.context[contextProp]) {
1371
- this.context[contextProp].off(this.onUpdate);
1372
- }
1373
- };
1374
- _proto2.getValue = function getValue() {
1375
- if (this.context[contextProp]) {
1376
- return this.context[contextProp].get();
1377
- } else {
1378
- return defaultValue;
1379
- }
1380
- };
1381
- _proto2.render = function render() {
1382
- return onlyChild(this.props.children)(this.state.value);
1383
- };
1384
- return Consumer;
1385
- }(React__default.Component);
1386
- Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
1387
- return {
1388
- Provider: Provider,
1389
- Consumer: Consumer
1390
- };
1391
- }
1392
-
1393
- // MIT License
1394
- var createContext = React__default.createContext || createReactContext;
1395
-
1396
- // TODO: Replace with React.createContext once we can assume React 16+
1397
-
1398
- var createNamedContext = function createNamedContext(name) {
1399
- var context = createContext();
1400
- context.displayName = name;
1401
- return context;
1402
- };
1403
- var historyContext = /*#__PURE__*/createNamedContext("Router-History");
1404
- var context = /*#__PURE__*/createNamedContext("Router");
1405
-
1406
- /**
1407
- * The public API for putting history on context.
1408
- */
1409
-
1410
- var Router = /*#__PURE__*/function (_React$Component) {
1411
- _inheritsLoose(Router, _React$Component);
1412
- Router.computeRootMatch = function computeRootMatch(pathname) {
1413
- return {
1414
- path: "/",
1415
- url: "/",
1416
- params: {},
1417
- isExact: pathname === "/"
1418
- };
1419
- };
1420
- function Router(props) {
1421
- var _this;
1422
- _this = _React$Component.call(this, props) || this;
1423
- _this.state = {
1424
- location: props.history.location
1425
- }; // This is a bit of a hack. We have to start listening for location
1426
- // changes here in the constructor in case there are any <Redirect>s
1427
- // on the initial render. If there are, they will replace/push when
1428
- // they mount and since cDM fires in children before parents, we may
1429
- // get a new location before the <Router> is mounted.
1430
-
1431
- _this._isMounted = false;
1432
- _this._pendingLocation = null;
1433
- if (!props.staticContext) {
1434
- _this.unlisten = props.history.listen(function (location) {
1435
- _this._pendingLocation = location;
1436
- });
1437
- }
1438
- return _this;
1439
- }
1440
- var _proto = Router.prototype;
1441
- _proto.componentDidMount = function componentDidMount() {
1442
- var _this2 = this;
1443
- this._isMounted = true;
1444
- if (this.unlisten) {
1445
- // Any pre-mount location changes have been captured at
1446
- // this point, so unregister the listener.
1447
- this.unlisten();
1448
- }
1449
- if (!this.props.staticContext) {
1450
- this.unlisten = this.props.history.listen(function (location) {
1451
- if (_this2._isMounted) {
1452
- _this2.setState({
1453
- location: location
1454
- });
1455
- }
1456
- });
1457
- }
1458
- if (this._pendingLocation) {
1459
- this.setState({
1460
- location: this._pendingLocation
1461
- });
1462
- }
1463
- };
1464
- _proto.componentWillUnmount = function componentWillUnmount() {
1465
- if (this.unlisten) {
1466
- this.unlisten();
1467
- this._isMounted = false;
1468
- this._pendingLocation = null;
1469
- }
1470
- };
1471
- _proto.render = function render() {
1472
- return /*#__PURE__*/React__default.createElement(context.Provider, {
1473
- value: {
1474
- history: this.props.history,
1475
- location: this.state.location,
1476
- match: Router.computeRootMatch(this.state.location.pathname),
1477
- staticContext: this.props.staticContext
1478
- }
1479
- }, /*#__PURE__*/React__default.createElement(historyContext.Provider, {
1480
- children: this.props.children || null,
1481
- value: this.props.history
1482
- }));
1483
- };
1484
- return Router;
1485
- }(React__default.Component);
1486
- if (process.env.NODE_ENV !== "production") {
1487
- Router.propTypes = {
1488
- children: PropTypes.node,
1489
- history: PropTypes.object.isRequired,
1490
- staticContext: PropTypes.object
1491
- };
1492
- Router.prototype.componentDidUpdate = function (prevProps) {
1493
- process.env.NODE_ENV !== "production" ? warning(prevProps.history === this.props.history, "You cannot change <Router history>") : void 0;
1494
- };
1495
- }
1496
-
1497
- /**
1498
- * The public API for a <Router> that stores location in memory.
1499
- */
1500
-
1501
- var MemoryRouter = /*#__PURE__*/function (_React$Component) {
1502
- _inheritsLoose(MemoryRouter, _React$Component);
1503
- function MemoryRouter() {
1504
- var _this;
1505
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1506
- args[_key] = arguments[_key];
1507
- }
1508
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
1509
- _this.history = createMemoryHistory(_this.props);
1510
- return _this;
1511
- }
1512
- var _proto = MemoryRouter.prototype;
1513
- _proto.render = function render() {
1514
- return /*#__PURE__*/React__default.createElement(Router, {
1515
- history: this.history,
1516
- children: this.props.children
1517
- });
1518
- };
1519
- return MemoryRouter;
1520
- }(React__default.Component);
1521
- if (process.env.NODE_ENV !== "production") {
1522
- MemoryRouter.propTypes = {
1523
- initialEntries: PropTypes.array,
1524
- initialIndex: PropTypes.number,
1525
- getUserConfirmation: PropTypes.func,
1526
- keyLength: PropTypes.number,
1527
- children: PropTypes.node
1528
- };
1529
- MemoryRouter.prototype.componentDidMount = function () {
1530
- process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<MemoryRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { MemoryRouter as Router }`.") : void 0;
1531
- };
1532
- }
1533
- /*#__PURE__*/
1534
- (function (_React$Component) {
1535
- _inheritsLoose(Lifecycle, _React$Component);
1536
- function Lifecycle() {
1537
- return _React$Component.apply(this, arguments) || this;
1538
- }
1539
- var _proto = Lifecycle.prototype;
1540
- _proto.componentDidMount = function componentDidMount() {
1541
- if (this.props.onMount) this.props.onMount.call(this, this);
1542
- };
1543
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
1544
- if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
1545
- };
1546
- _proto.componentWillUnmount = function componentWillUnmount() {
1547
- if (this.props.onUnmount) this.props.onUnmount.call(this, this);
1548
- };
1549
- _proto.render = function render() {
1550
- return null;
1551
- };
1552
- return Lifecycle;
1553
- })(React__default.Component);
1554
- if (process.env.NODE_ENV !== "production") {
1555
- var messageType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);
1556
- ({
1557
- when: PropTypes.bool,
1558
- message: messageType.isRequired
1559
- });
1560
- }
1561
- if (process.env.NODE_ENV !== "production") {
1562
- ({
1563
- push: PropTypes.bool,
1564
- from: PropTypes.string,
1565
- to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired
1566
- });
1567
- }
1568
- var cache$1 = {};
1569
- var cacheLimit$1 = 10000;
1570
- var cacheCount$1 = 0;
1571
- function compilePath$1(path, options) {
1572
- var cacheKey = "" + options.end + options.strict + options.sensitive;
1573
- var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
1574
- if (pathCache[path]) return pathCache[path];
1575
- var keys = [];
1576
- var regexp = pathToRegexp$1(path, keys, options);
1577
- var result = {
1578
- regexp: regexp,
1579
- keys: keys
1580
- };
1581
- if (cacheCount$1 < cacheLimit$1) {
1582
- pathCache[path] = result;
1583
- cacheCount$1++;
1584
- }
1585
- return result;
1586
- }
1587
- /**
1588
- * Public API for matching a URL pathname to a path.
1589
- */
1590
-
1591
- function matchPath(pathname, options) {
1592
- if (options === void 0) {
1593
- options = {};
1594
- }
1595
- if (typeof options === "string" || Array.isArray(options)) {
1596
- options = {
1597
- path: options
1598
- };
1599
- }
1600
- var _options = options,
1601
- path = _options.path,
1602
- _options$exact = _options.exact,
1603
- exact = _options$exact === void 0 ? false : _options$exact,
1604
- _options$strict = _options.strict,
1605
- strict = _options$strict === void 0 ? false : _options$strict,
1606
- _options$sensitive = _options.sensitive,
1607
- sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
1608
- var paths = [].concat(path);
1609
- return paths.reduce(function (matched, path) {
1610
- if (!path && path !== "") return null;
1611
- if (matched) return matched;
1612
- var _compilePath = compilePath$1(path, {
1613
- end: exact,
1614
- strict: strict,
1615
- sensitive: sensitive
1616
- }),
1617
- regexp = _compilePath.regexp,
1618
- keys = _compilePath.keys;
1619
- var match = regexp.exec(pathname);
1620
- if (!match) return null;
1621
- var url = match[0],
1622
- values = match.slice(1);
1623
- var isExact = pathname === url;
1624
- if (exact && !isExact) return null;
1625
- return {
1626
- path: path,
1627
- // the path used to match
1628
- url: path === "/" && url === "" ? "/" : url,
1629
- // the matched portion of the URL
1630
- isExact: isExact,
1631
- // whether or not we matched exactly
1632
- params: keys.reduce(function (memo, key, index) {
1633
- memo[key.name] = values[index];
1634
- return memo;
1635
- }, {})
1636
- };
1637
- }, null);
1638
- }
1639
- function isEmptyChildren(children) {
1640
- return React__default.Children.count(children) === 0;
1641
- }
1642
- function evalChildrenDev(children, props, path) {
1643
- var value = children(props);
1644
- process.env.NODE_ENV !== "production" ? warning(value !== undefined, "You returned `undefined` from the `children` function of " + ("<Route" + (path ? " path=\"" + path + "\"" : "") + ">, but you ") + "should have returned a React element or `null`") : void 0;
1645
- return value || null;
1646
- }
1647
- /**
1648
- * The public API for matching a single path and rendering.
1649
- */
1650
-
1651
- var Route = /*#__PURE__*/function (_React$Component) {
1652
- _inheritsLoose(Route, _React$Component);
1653
- function Route() {
1654
- return _React$Component.apply(this, arguments) || this;
1655
- }
1656
- var _proto = Route.prototype;
1657
- _proto.render = function render() {
1658
- var _this = this;
1659
- return /*#__PURE__*/React__default.createElement(context.Consumer, null, function (context$1) {
1660
- !context$1 ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <Route> outside a <Router>") : invariant(false) : void 0;
1661
- var location = _this.props.location || context$1.location;
1662
- var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us
1663
- : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
1664
- var props = _extends({}, context$1, {
1665
- location: location,
1666
- match: match
1667
- });
1668
- var _this$props = _this.props,
1669
- children = _this$props.children,
1670
- component = _this$props.component,
1671
- render = _this$props.render; // Preact uses an empty array as children by
1672
- // default, so use null if that's the case.
1673
-
1674
- if (Array.isArray(children) && isEmptyChildren(children)) {
1675
- children = null;
1676
- }
1677
- return /*#__PURE__*/React__default.createElement(context.Provider, {
1678
- value: props
1679
- }, props.match ? children ? typeof children === "function" ? process.env.NODE_ENV !== "production" ? evalChildrenDev(children, props, _this.props.path) : children(props) : children : component ? /*#__PURE__*/React__default.createElement(component, props) : render ? render(props) : null : typeof children === "function" ? process.env.NODE_ENV !== "production" ? evalChildrenDev(children, props, _this.props.path) : children(props) : null);
1680
- });
1681
- };
1682
- return Route;
1683
- }(React__default.Component);
1684
- if (process.env.NODE_ENV !== "production") {
1685
- Route.propTypes = {
1686
- children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
1687
- component: function component(props, propName) {
1688
- if (props[propName] && !reactIs.exports.isValidElementType(props[propName])) {
1689
- return new Error("Invalid prop 'component' supplied to 'Route': the prop is not a valid React component");
1690
- }
1691
- },
1692
- exact: PropTypes.bool,
1693
- location: PropTypes.object,
1694
- path: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
1695
- render: PropTypes.func,
1696
- sensitive: PropTypes.bool,
1697
- strict: PropTypes.bool
1698
- };
1699
- Route.prototype.componentDidMount = function () {
1700
- process.env.NODE_ENV !== "production" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.component), "You should not use <Route component> and <Route children> in the same route; <Route component> will be ignored") : void 0;
1701
- process.env.NODE_ENV !== "production" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.render), "You should not use <Route render> and <Route children> in the same route; <Route render> will be ignored") : void 0;
1702
- process.env.NODE_ENV !== "production" ? warning(!(this.props.component && this.props.render), "You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored") : void 0;
1703
- };
1704
- Route.prototype.componentDidUpdate = function (prevProps) {
1705
- process.env.NODE_ENV !== "production" ? warning(!(this.props.location && !prevProps.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.') : void 0;
1706
- process.env.NODE_ENV !== "production" ? warning(!(!this.props.location && prevProps.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.') : void 0;
1707
- };
1708
- }
1709
- function addLeadingSlash(path) {
1710
- return path.charAt(0) === "/" ? path : "/" + path;
1711
- }
1712
- function addBasename(basename, location) {
1713
- if (!basename) return location;
1714
- return _extends({}, location, {
1715
- pathname: addLeadingSlash(basename) + location.pathname
1716
- });
1717
- }
1718
- function stripBasename(basename, location) {
1719
- if (!basename) return location;
1720
- var base = addLeadingSlash(basename);
1721
- if (location.pathname.indexOf(base) !== 0) return location;
1722
- return _extends({}, location, {
1723
- pathname: location.pathname.substr(base.length)
1724
- });
1725
- }
1726
- function createURL(location) {
1727
- return typeof location === "string" ? location : createPath(location);
1728
- }
1729
- function staticHandler(methodName) {
1730
- return function () {
1731
- process.env.NODE_ENV !== "production" ? invariant(false, "You cannot %s with <StaticRouter>") : invariant(false);
1732
- };
1733
- }
1734
- function noop() {}
1735
- /**
1736
- * The public top-level API for a "static" <Router>, so-called because it
1737
- * can't actually change the current location. Instead, it just records
1738
- * location changes in a context object. Useful mainly in testing and
1739
- * server-rendering scenarios.
1740
- */
1741
-
1742
- var StaticRouter = /*#__PURE__*/function (_React$Component) {
1743
- _inheritsLoose(StaticRouter, _React$Component);
1744
- function StaticRouter() {
1745
- var _this;
1746
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1747
- args[_key] = arguments[_key];
1748
- }
1749
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
1750
- _this.handlePush = function (location) {
1751
- return _this.navigateTo(location, "PUSH");
1752
- };
1753
- _this.handleReplace = function (location) {
1754
- return _this.navigateTo(location, "REPLACE");
1755
- };
1756
- _this.handleListen = function () {
1757
- return noop;
1758
- };
1759
- _this.handleBlock = function () {
1760
- return noop;
1761
- };
1762
- return _this;
1763
- }
1764
- var _proto = StaticRouter.prototype;
1765
- _proto.navigateTo = function navigateTo(location, action) {
1766
- var _this$props = this.props,
1767
- _this$props$basename = _this$props.basename,
1768
- basename = _this$props$basename === void 0 ? "" : _this$props$basename,
1769
- _this$props$context = _this$props.context,
1770
- context = _this$props$context === void 0 ? {} : _this$props$context;
1771
- context.action = action;
1772
- context.location = addBasename(basename, createLocation(location));
1773
- context.url = createURL(context.location);
1774
- };
1775
- _proto.render = function render() {
1776
- var _this$props2 = this.props,
1777
- _this$props2$basename = _this$props2.basename,
1778
- basename = _this$props2$basename === void 0 ? "" : _this$props2$basename,
1779
- _this$props2$context = _this$props2.context,
1780
- context = _this$props2$context === void 0 ? {} : _this$props2$context,
1781
- _this$props2$location = _this$props2.location,
1782
- location = _this$props2$location === void 0 ? "/" : _this$props2$location,
1783
- rest = _objectWithoutPropertiesLoose(_this$props2, ["basename", "context", "location"]);
1784
- var history = {
1785
- createHref: function createHref(path) {
1786
- return addLeadingSlash(basename + createURL(path));
1787
- },
1788
- action: "POP",
1789
- location: stripBasename(basename, createLocation(location)),
1790
- push: this.handlePush,
1791
- replace: this.handleReplace,
1792
- go: staticHandler(),
1793
- goBack: staticHandler(),
1794
- goForward: staticHandler(),
1795
- listen: this.handleListen,
1796
- block: this.handleBlock
1797
- };
1798
- return /*#__PURE__*/React__default.createElement(Router, _extends({}, rest, {
1799
- history: history,
1800
- staticContext: context
1801
- }));
1802
- };
1803
- return StaticRouter;
1804
- }(React__default.Component);
1805
- if (process.env.NODE_ENV !== "production") {
1806
- StaticRouter.propTypes = {
1807
- basename: PropTypes.string,
1808
- context: PropTypes.object,
1809
- location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
1810
- };
1811
- StaticRouter.prototype.componentDidMount = function () {
1812
- process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<StaticRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { StaticRouter as Router }`.") : void 0;
1813
- };
1814
- }
1815
-
1816
- /**
1817
- * The public API for rendering the first <Route> that matches.
1818
- */
1819
-
1820
- var Switch = /*#__PURE__*/function (_React$Component) {
1821
- _inheritsLoose(Switch, _React$Component);
1822
- function Switch() {
1823
- return _React$Component.apply(this, arguments) || this;
1824
- }
1825
- var _proto = Switch.prototype;
1826
- _proto.render = function render() {
1827
- var _this = this;
1828
- return /*#__PURE__*/React__default.createElement(context.Consumer, null, function (context) {
1829
- !context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <Switch> outside a <Router>") : invariant(false) : void 0;
1830
- var location = _this.props.location || context.location;
1831
- var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()
1832
- // here because toArray adds keys to all child elements and we do not want
1833
- // to trigger an unmount/remount for two <Route>s that render the same
1834
- // component at different URLs.
1835
-
1836
- React__default.Children.forEach(_this.props.children, function (child) {
1837
- if (match == null && /*#__PURE__*/React__default.isValidElement(child)) {
1838
- element = child;
1839
- var path = child.props.path || child.props.from;
1840
- match = path ? matchPath(location.pathname, _extends({}, child.props, {
1841
- path: path
1842
- })) : context.match;
1843
- }
1844
- });
1845
- return match ? /*#__PURE__*/React__default.cloneElement(element, {
1846
- location: location,
1847
- computedMatch: match
1848
- }) : null;
1849
- });
1850
- };
1851
- return Switch;
1852
- }(React__default.Component);
1853
- if (process.env.NODE_ENV !== "production") {
1854
- Switch.propTypes = {
1855
- children: PropTypes.node,
1856
- location: PropTypes.object
1857
- };
1858
- Switch.prototype.componentDidUpdate = function (prevProps) {
1859
- process.env.NODE_ENV !== "production" ? warning(!(this.props.location && !prevProps.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.') : void 0;
1860
- process.env.NODE_ENV !== "production" ? warning(!(!this.props.location && prevProps.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.') : void 0;
1861
- };
1862
- }
1863
- var useContext = React__default.useContext;
1864
- function useHistory() {
1865
- if (process.env.NODE_ENV !== "production") {
1866
- !(typeof useContext === "function") ? process.env.NODE_ENV !== "production" ? invariant(false, "You must use React >= 16.8 in order to use useHistory()") : invariant(false) : void 0;
1867
- }
1868
- return useContext(historyContext);
1869
- }
1870
- if (process.env.NODE_ENV !== "production") {
1871
- if (typeof window !== "undefined") {
1872
- var global$1 = window;
1873
- var key = "__react_router_build__";
1874
- var buildNames = {
1875
- cjs: "CommonJS",
1876
- esm: "ES modules",
1877
- umd: "UMD"
1878
- };
1879
- if (global$1[key] && global$1[key] !== "esm") {
1880
- var initialBuildName = buildNames[global$1[key]];
1881
- var secondaryBuildName = buildNames["esm"]; // TODO: Add link to article that explains in detail how to avoid
1882
- // loading 2 different builds.
1883
-
1884
- throw new Error("You are loading the " + secondaryBuildName + " build of React Router " + ("on a page that is already running the " + initialBuildName + " ") + "build, so things won't work right.");
1885
- }
1886
- global$1[key] = "esm";
1887
- }
1888
- }
1889
- export { useHistory as u };
1890
- //# sourceMappingURL=react-router.js.map