chunk-7256PFPA.js 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963
  1. import {
  2. n
  3. } from "./chunk-Y3WMVFTW.js";
  4. import {
  5. t
  6. } from "./chunk-WSRBH7BF.js";
  7. import {
  8. s
  9. } from "./chunk-EMJ4ZSM2.js";
  10. // node_modules/@esri/arcgis-html-sanitizer/dist/esm/index.js
  11. var objectTag = "[object Object]";
  12. function isHostObject(value) {
  13. var result = false;
  14. if (value != null && typeof value.toString != "function") {
  15. try {
  16. result = !!(value + "");
  17. } catch (e3) {
  18. }
  19. }
  20. return result;
  21. }
  22. function overArg(func, transform) {
  23. return function(arg) {
  24. return func(transform(arg));
  25. };
  26. }
  27. var funcProto = Function.prototype;
  28. var objectProto = Object.prototype;
  29. var funcToString = funcProto.toString;
  30. var hasOwnProperty = objectProto.hasOwnProperty;
  31. var objectCtorString = funcToString.call(Object);
  32. var objectToString = objectProto.toString;
  33. var getPrototype = overArg(Object.getPrototypeOf, Object);
  34. function isObjectLike(value) {
  35. return !!value && typeof value == "object";
  36. }
  37. function isPlainObject(value) {
  38. if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) {
  39. return false;
  40. }
  41. var proto = getPrototype(value);
  42. if (proto === null) {
  43. return true;
  44. }
  45. var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
  46. return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
  47. }
  48. var lodash_isplainobject = isPlainObject;
  49. var lib$1 = { exports: {} };
  50. var _default$1 = {};
  51. var lib = { exports: {} };
  52. var _default = {};
  53. function getDefaultWhiteList$1() {
  54. var whiteList = {};
  55. whiteList["align-content"] = false;
  56. whiteList["align-items"] = false;
  57. whiteList["align-self"] = false;
  58. whiteList["alignment-adjust"] = false;
  59. whiteList["alignment-baseline"] = false;
  60. whiteList["all"] = false;
  61. whiteList["anchor-point"] = false;
  62. whiteList["animation"] = false;
  63. whiteList["animation-delay"] = false;
  64. whiteList["animation-direction"] = false;
  65. whiteList["animation-duration"] = false;
  66. whiteList["animation-fill-mode"] = false;
  67. whiteList["animation-iteration-count"] = false;
  68. whiteList["animation-name"] = false;
  69. whiteList["animation-play-state"] = false;
  70. whiteList["animation-timing-function"] = false;
  71. whiteList["azimuth"] = false;
  72. whiteList["backface-visibility"] = false;
  73. whiteList["background"] = true;
  74. whiteList["background-attachment"] = true;
  75. whiteList["background-clip"] = true;
  76. whiteList["background-color"] = true;
  77. whiteList["background-image"] = true;
  78. whiteList["background-origin"] = true;
  79. whiteList["background-position"] = true;
  80. whiteList["background-repeat"] = true;
  81. whiteList["background-size"] = true;
  82. whiteList["baseline-shift"] = false;
  83. whiteList["binding"] = false;
  84. whiteList["bleed"] = false;
  85. whiteList["bookmark-label"] = false;
  86. whiteList["bookmark-level"] = false;
  87. whiteList["bookmark-state"] = false;
  88. whiteList["border"] = true;
  89. whiteList["border-bottom"] = true;
  90. whiteList["border-bottom-color"] = true;
  91. whiteList["border-bottom-left-radius"] = true;
  92. whiteList["border-bottom-right-radius"] = true;
  93. whiteList["border-bottom-style"] = true;
  94. whiteList["border-bottom-width"] = true;
  95. whiteList["border-collapse"] = true;
  96. whiteList["border-color"] = true;
  97. whiteList["border-image"] = true;
  98. whiteList["border-image-outset"] = true;
  99. whiteList["border-image-repeat"] = true;
  100. whiteList["border-image-slice"] = true;
  101. whiteList["border-image-source"] = true;
  102. whiteList["border-image-width"] = true;
  103. whiteList["border-left"] = true;
  104. whiteList["border-left-color"] = true;
  105. whiteList["border-left-style"] = true;
  106. whiteList["border-left-width"] = true;
  107. whiteList["border-radius"] = true;
  108. whiteList["border-right"] = true;
  109. whiteList["border-right-color"] = true;
  110. whiteList["border-right-style"] = true;
  111. whiteList["border-right-width"] = true;
  112. whiteList["border-spacing"] = true;
  113. whiteList["border-style"] = true;
  114. whiteList["border-top"] = true;
  115. whiteList["border-top-color"] = true;
  116. whiteList["border-top-left-radius"] = true;
  117. whiteList["border-top-right-radius"] = true;
  118. whiteList["border-top-style"] = true;
  119. whiteList["border-top-width"] = true;
  120. whiteList["border-width"] = true;
  121. whiteList["bottom"] = false;
  122. whiteList["box-decoration-break"] = true;
  123. whiteList["box-shadow"] = true;
  124. whiteList["box-sizing"] = true;
  125. whiteList["box-snap"] = true;
  126. whiteList["box-suppress"] = true;
  127. whiteList["break-after"] = true;
  128. whiteList["break-before"] = true;
  129. whiteList["break-inside"] = true;
  130. whiteList["caption-side"] = false;
  131. whiteList["chains"] = false;
  132. whiteList["clear"] = true;
  133. whiteList["clip"] = false;
  134. whiteList["clip-path"] = false;
  135. whiteList["clip-rule"] = false;
  136. whiteList["color"] = true;
  137. whiteList["color-interpolation-filters"] = true;
  138. whiteList["column-count"] = false;
  139. whiteList["column-fill"] = false;
  140. whiteList["column-gap"] = false;
  141. whiteList["column-rule"] = false;
  142. whiteList["column-rule-color"] = false;
  143. whiteList["column-rule-style"] = false;
  144. whiteList["column-rule-width"] = false;
  145. whiteList["column-span"] = false;
  146. whiteList["column-width"] = false;
  147. whiteList["columns"] = false;
  148. whiteList["contain"] = false;
  149. whiteList["content"] = false;
  150. whiteList["counter-increment"] = false;
  151. whiteList["counter-reset"] = false;
  152. whiteList["counter-set"] = false;
  153. whiteList["crop"] = false;
  154. whiteList["cue"] = false;
  155. whiteList["cue-after"] = false;
  156. whiteList["cue-before"] = false;
  157. whiteList["cursor"] = false;
  158. whiteList["direction"] = false;
  159. whiteList["display"] = true;
  160. whiteList["display-inside"] = true;
  161. whiteList["display-list"] = true;
  162. whiteList["display-outside"] = true;
  163. whiteList["dominant-baseline"] = false;
  164. whiteList["elevation"] = false;
  165. whiteList["empty-cells"] = false;
  166. whiteList["filter"] = false;
  167. whiteList["flex"] = false;
  168. whiteList["flex-basis"] = false;
  169. whiteList["flex-direction"] = false;
  170. whiteList["flex-flow"] = false;
  171. whiteList["flex-grow"] = false;
  172. whiteList["flex-shrink"] = false;
  173. whiteList["flex-wrap"] = false;
  174. whiteList["float"] = false;
  175. whiteList["float-offset"] = false;
  176. whiteList["flood-color"] = false;
  177. whiteList["flood-opacity"] = false;
  178. whiteList["flow-from"] = false;
  179. whiteList["flow-into"] = false;
  180. whiteList["font"] = true;
  181. whiteList["font-family"] = true;
  182. whiteList["font-feature-settings"] = true;
  183. whiteList["font-kerning"] = true;
  184. whiteList["font-language-override"] = true;
  185. whiteList["font-size"] = true;
  186. whiteList["font-size-adjust"] = true;
  187. whiteList["font-stretch"] = true;
  188. whiteList["font-style"] = true;
  189. whiteList["font-synthesis"] = true;
  190. whiteList["font-variant"] = true;
  191. whiteList["font-variant-alternates"] = true;
  192. whiteList["font-variant-caps"] = true;
  193. whiteList["font-variant-east-asian"] = true;
  194. whiteList["font-variant-ligatures"] = true;
  195. whiteList["font-variant-numeric"] = true;
  196. whiteList["font-variant-position"] = true;
  197. whiteList["font-weight"] = true;
  198. whiteList["grid"] = false;
  199. whiteList["grid-area"] = false;
  200. whiteList["grid-auto-columns"] = false;
  201. whiteList["grid-auto-flow"] = false;
  202. whiteList["grid-auto-rows"] = false;
  203. whiteList["grid-column"] = false;
  204. whiteList["grid-column-end"] = false;
  205. whiteList["grid-column-start"] = false;
  206. whiteList["grid-row"] = false;
  207. whiteList["grid-row-end"] = false;
  208. whiteList["grid-row-start"] = false;
  209. whiteList["grid-template"] = false;
  210. whiteList["grid-template-areas"] = false;
  211. whiteList["grid-template-columns"] = false;
  212. whiteList["grid-template-rows"] = false;
  213. whiteList["hanging-punctuation"] = false;
  214. whiteList["height"] = true;
  215. whiteList["hyphens"] = false;
  216. whiteList["icon"] = false;
  217. whiteList["image-orientation"] = false;
  218. whiteList["image-resolution"] = false;
  219. whiteList["ime-mode"] = false;
  220. whiteList["initial-letters"] = false;
  221. whiteList["inline-box-align"] = false;
  222. whiteList["justify-content"] = false;
  223. whiteList["justify-items"] = false;
  224. whiteList["justify-self"] = false;
  225. whiteList["left"] = false;
  226. whiteList["letter-spacing"] = true;
  227. whiteList["lighting-color"] = true;
  228. whiteList["line-box-contain"] = false;
  229. whiteList["line-break"] = false;
  230. whiteList["line-grid"] = false;
  231. whiteList["line-height"] = false;
  232. whiteList["line-snap"] = false;
  233. whiteList["line-stacking"] = false;
  234. whiteList["line-stacking-ruby"] = false;
  235. whiteList["line-stacking-shift"] = false;
  236. whiteList["line-stacking-strategy"] = false;
  237. whiteList["list-style"] = true;
  238. whiteList["list-style-image"] = true;
  239. whiteList["list-style-position"] = true;
  240. whiteList["list-style-type"] = true;
  241. whiteList["margin"] = true;
  242. whiteList["margin-bottom"] = true;
  243. whiteList["margin-left"] = true;
  244. whiteList["margin-right"] = true;
  245. whiteList["margin-top"] = true;
  246. whiteList["marker-offset"] = false;
  247. whiteList["marker-side"] = false;
  248. whiteList["marks"] = false;
  249. whiteList["mask"] = false;
  250. whiteList["mask-box"] = false;
  251. whiteList["mask-box-outset"] = false;
  252. whiteList["mask-box-repeat"] = false;
  253. whiteList["mask-box-slice"] = false;
  254. whiteList["mask-box-source"] = false;
  255. whiteList["mask-box-width"] = false;
  256. whiteList["mask-clip"] = false;
  257. whiteList["mask-image"] = false;
  258. whiteList["mask-origin"] = false;
  259. whiteList["mask-position"] = false;
  260. whiteList["mask-repeat"] = false;
  261. whiteList["mask-size"] = false;
  262. whiteList["mask-source-type"] = false;
  263. whiteList["mask-type"] = false;
  264. whiteList["max-height"] = true;
  265. whiteList["max-lines"] = false;
  266. whiteList["max-width"] = true;
  267. whiteList["min-height"] = true;
  268. whiteList["min-width"] = true;
  269. whiteList["move-to"] = false;
  270. whiteList["nav-down"] = false;
  271. whiteList["nav-index"] = false;
  272. whiteList["nav-left"] = false;
  273. whiteList["nav-right"] = false;
  274. whiteList["nav-up"] = false;
  275. whiteList["object-fit"] = false;
  276. whiteList["object-position"] = false;
  277. whiteList["opacity"] = false;
  278. whiteList["order"] = false;
  279. whiteList["orphans"] = false;
  280. whiteList["outline"] = false;
  281. whiteList["outline-color"] = false;
  282. whiteList["outline-offset"] = false;
  283. whiteList["outline-style"] = false;
  284. whiteList["outline-width"] = false;
  285. whiteList["overflow"] = false;
  286. whiteList["overflow-wrap"] = false;
  287. whiteList["overflow-x"] = false;
  288. whiteList["overflow-y"] = false;
  289. whiteList["padding"] = true;
  290. whiteList["padding-bottom"] = true;
  291. whiteList["padding-left"] = true;
  292. whiteList["padding-right"] = true;
  293. whiteList["padding-top"] = true;
  294. whiteList["page"] = false;
  295. whiteList["page-break-after"] = false;
  296. whiteList["page-break-before"] = false;
  297. whiteList["page-break-inside"] = false;
  298. whiteList["page-policy"] = false;
  299. whiteList["pause"] = false;
  300. whiteList["pause-after"] = false;
  301. whiteList["pause-before"] = false;
  302. whiteList["perspective"] = false;
  303. whiteList["perspective-origin"] = false;
  304. whiteList["pitch"] = false;
  305. whiteList["pitch-range"] = false;
  306. whiteList["play-during"] = false;
  307. whiteList["position"] = false;
  308. whiteList["presentation-level"] = false;
  309. whiteList["quotes"] = false;
  310. whiteList["region-fragment"] = false;
  311. whiteList["resize"] = false;
  312. whiteList["rest"] = false;
  313. whiteList["rest-after"] = false;
  314. whiteList["rest-before"] = false;
  315. whiteList["richness"] = false;
  316. whiteList["right"] = false;
  317. whiteList["rotation"] = false;
  318. whiteList["rotation-point"] = false;
  319. whiteList["ruby-align"] = false;
  320. whiteList["ruby-merge"] = false;
  321. whiteList["ruby-position"] = false;
  322. whiteList["shape-image-threshold"] = false;
  323. whiteList["shape-outside"] = false;
  324. whiteList["shape-margin"] = false;
  325. whiteList["size"] = false;
  326. whiteList["speak"] = false;
  327. whiteList["speak-as"] = false;
  328. whiteList["speak-header"] = false;
  329. whiteList["speak-numeral"] = false;
  330. whiteList["speak-punctuation"] = false;
  331. whiteList["speech-rate"] = false;
  332. whiteList["stress"] = false;
  333. whiteList["string-set"] = false;
  334. whiteList["tab-size"] = false;
  335. whiteList["table-layout"] = false;
  336. whiteList["text-align"] = true;
  337. whiteList["text-align-last"] = true;
  338. whiteList["text-combine-upright"] = true;
  339. whiteList["text-decoration"] = true;
  340. whiteList["text-decoration-color"] = true;
  341. whiteList["text-decoration-line"] = true;
  342. whiteList["text-decoration-skip"] = true;
  343. whiteList["text-decoration-style"] = true;
  344. whiteList["text-emphasis"] = true;
  345. whiteList["text-emphasis-color"] = true;
  346. whiteList["text-emphasis-position"] = true;
  347. whiteList["text-emphasis-style"] = true;
  348. whiteList["text-height"] = true;
  349. whiteList["text-indent"] = true;
  350. whiteList["text-justify"] = true;
  351. whiteList["text-orientation"] = true;
  352. whiteList["text-overflow"] = true;
  353. whiteList["text-shadow"] = true;
  354. whiteList["text-space-collapse"] = true;
  355. whiteList["text-transform"] = true;
  356. whiteList["text-underline-position"] = true;
  357. whiteList["text-wrap"] = true;
  358. whiteList["top"] = false;
  359. whiteList["transform"] = false;
  360. whiteList["transform-origin"] = false;
  361. whiteList["transform-style"] = false;
  362. whiteList["transition"] = false;
  363. whiteList["transition-delay"] = false;
  364. whiteList["transition-duration"] = false;
  365. whiteList["transition-property"] = false;
  366. whiteList["transition-timing-function"] = false;
  367. whiteList["unicode-bidi"] = false;
  368. whiteList["vertical-align"] = false;
  369. whiteList["visibility"] = false;
  370. whiteList["voice-balance"] = false;
  371. whiteList["voice-duration"] = false;
  372. whiteList["voice-family"] = false;
  373. whiteList["voice-pitch"] = false;
  374. whiteList["voice-range"] = false;
  375. whiteList["voice-rate"] = false;
  376. whiteList["voice-stress"] = false;
  377. whiteList["voice-volume"] = false;
  378. whiteList["volume"] = false;
  379. whiteList["white-space"] = false;
  380. whiteList["widows"] = false;
  381. whiteList["width"] = true;
  382. whiteList["will-change"] = false;
  383. whiteList["word-break"] = true;
  384. whiteList["word-spacing"] = true;
  385. whiteList["word-wrap"] = true;
  386. whiteList["wrap-flow"] = false;
  387. whiteList["wrap-through"] = false;
  388. whiteList["writing-mode"] = false;
  389. whiteList["z-index"] = false;
  390. return whiteList;
  391. }
  392. function onAttr(name, value, options) {
  393. }
  394. function onIgnoreAttr(name, value, options) {
  395. }
  396. var REGEXP_URL_JAVASCRIPT = /javascript\s*\:/img;
  397. function safeAttrValue$1(name, value) {
  398. if (REGEXP_URL_JAVASCRIPT.test(value))
  399. return "";
  400. return value;
  401. }
  402. _default.whiteList = getDefaultWhiteList$1();
  403. _default.getDefaultWhiteList = getDefaultWhiteList$1;
  404. _default.onAttr = onAttr;
  405. _default.onIgnoreAttr = onIgnoreAttr;
  406. _default.safeAttrValue = safeAttrValue$1;
  407. var util$1 = {
  408. indexOf: function(arr, item) {
  409. var i4, j;
  410. if (Array.prototype.indexOf) {
  411. return arr.indexOf(item);
  412. }
  413. for (i4 = 0, j = arr.length; i4 < j; i4++) {
  414. if (arr[i4] === item) {
  415. return i4;
  416. }
  417. }
  418. return -1;
  419. },
  420. forEach: function(arr, fn, scope) {
  421. var i4, j;
  422. if (Array.prototype.forEach) {
  423. return arr.forEach(fn, scope);
  424. }
  425. for (i4 = 0, j = arr.length; i4 < j; i4++) {
  426. fn.call(scope, arr[i4], i4, arr);
  427. }
  428. },
  429. trim: function(str) {
  430. if (String.prototype.trim) {
  431. return str.trim();
  432. }
  433. return str.replace(/(^\s*)|(\s*$)/g, "");
  434. },
  435. trimRight: function(str) {
  436. if (String.prototype.trimRight) {
  437. return str.trimRight();
  438. }
  439. return str.replace(/(\s*$)/g, "");
  440. }
  441. };
  442. var _$3 = util$1;
  443. function parseStyle$1(css2, onAttr2) {
  444. css2 = _$3.trimRight(css2);
  445. if (css2[css2.length - 1] !== ";")
  446. css2 += ";";
  447. var cssLength = css2.length;
  448. var isParenthesisOpen = false;
  449. var lastPos = 0;
  450. var i4 = 0;
  451. var retCSS = "";
  452. function addNewAttr() {
  453. if (!isParenthesisOpen) {
  454. var source = _$3.trim(css2.slice(lastPos, i4));
  455. var j2 = source.indexOf(":");
  456. if (j2 !== -1) {
  457. var name = _$3.trim(source.slice(0, j2));
  458. var value = _$3.trim(source.slice(j2 + 1));
  459. if (name) {
  460. var ret = onAttr2(lastPos, retCSS.length, name, value, source);
  461. if (ret)
  462. retCSS += ret + "; ";
  463. }
  464. }
  465. }
  466. lastPos = i4 + 1;
  467. }
  468. for (; i4 < cssLength; i4++) {
  469. var c5 = css2[i4];
  470. if (c5 === "/" && css2[i4 + 1] === "*") {
  471. var j = css2.indexOf("*/", i4 + 2);
  472. if (j === -1)
  473. break;
  474. i4 = j + 1;
  475. lastPos = i4 + 1;
  476. isParenthesisOpen = false;
  477. } else if (c5 === "(") {
  478. isParenthesisOpen = true;
  479. } else if (c5 === ")") {
  480. isParenthesisOpen = false;
  481. } else if (c5 === ";") {
  482. if (isParenthesisOpen)
  483. ;
  484. else {
  485. addNewAttr();
  486. }
  487. } else if (c5 === "\n") {
  488. addNewAttr();
  489. }
  490. }
  491. return _$3.trim(retCSS);
  492. }
  493. var parser$2 = parseStyle$1;
  494. var DEFAULT$1 = _default;
  495. var parseStyle = parser$2;
  496. function isNull$1(obj) {
  497. return obj === void 0 || obj === null;
  498. }
  499. function shallowCopyObject$1(obj) {
  500. var ret = {};
  501. for (var i4 in obj) {
  502. ret[i4] = obj[i4];
  503. }
  504. return ret;
  505. }
  506. function FilterCSS$2(options) {
  507. options = shallowCopyObject$1(options || {});
  508. options.whiteList = options.whiteList || DEFAULT$1.whiteList;
  509. options.onAttr = options.onAttr || DEFAULT$1.onAttr;
  510. options.onIgnoreAttr = options.onIgnoreAttr || DEFAULT$1.onIgnoreAttr;
  511. options.safeAttrValue = options.safeAttrValue || DEFAULT$1.safeAttrValue;
  512. this.options = options;
  513. }
  514. FilterCSS$2.prototype.process = function(css2) {
  515. css2 = css2 || "";
  516. css2 = css2.toString();
  517. if (!css2)
  518. return "";
  519. var me = this;
  520. var options = me.options;
  521. var whiteList = options.whiteList;
  522. var onAttr2 = options.onAttr;
  523. var onIgnoreAttr2 = options.onIgnoreAttr;
  524. var safeAttrValue2 = options.safeAttrValue;
  525. var retCSS = parseStyle(css2, function(sourcePosition, position, name, value, source) {
  526. var check = whiteList[name];
  527. var isWhite = false;
  528. if (check === true)
  529. isWhite = check;
  530. else if (typeof check === "function")
  531. isWhite = check(value);
  532. else if (check instanceof RegExp)
  533. isWhite = check.test(value);
  534. if (isWhite !== true)
  535. isWhite = false;
  536. value = safeAttrValue2(name, value);
  537. if (!value)
  538. return;
  539. var opts = {
  540. position,
  541. sourcePosition,
  542. source,
  543. isWhite
  544. };
  545. if (isWhite) {
  546. var ret = onAttr2(name, value, opts);
  547. if (isNull$1(ret)) {
  548. return name + ":" + value;
  549. } else {
  550. return ret;
  551. }
  552. } else {
  553. var ret = onIgnoreAttr2(name, value, opts);
  554. if (!isNull$1(ret)) {
  555. return ret;
  556. }
  557. }
  558. });
  559. return retCSS;
  560. };
  561. var css = FilterCSS$2;
  562. (function(module, exports) {
  563. var DEFAULT2 = _default;
  564. var FilterCSS2 = css;
  565. function filterCSS(html, options) {
  566. var xss2 = new FilterCSS2(options);
  567. return xss2.process(html);
  568. }
  569. exports = module.exports = filterCSS;
  570. exports.FilterCSS = FilterCSS2;
  571. for (var i4 in DEFAULT2)
  572. exports[i4] = DEFAULT2[i4];
  573. })(lib, lib.exports);
  574. var util = {
  575. indexOf: function(arr, item) {
  576. var i4, j;
  577. if (Array.prototype.indexOf) {
  578. return arr.indexOf(item);
  579. }
  580. for (i4 = 0, j = arr.length; i4 < j; i4++) {
  581. if (arr[i4] === item) {
  582. return i4;
  583. }
  584. }
  585. return -1;
  586. },
  587. forEach: function(arr, fn, scope) {
  588. var i4, j;
  589. if (Array.prototype.forEach) {
  590. return arr.forEach(fn, scope);
  591. }
  592. for (i4 = 0, j = arr.length; i4 < j; i4++) {
  593. fn.call(scope, arr[i4], i4, arr);
  594. }
  595. },
  596. trim: function(str) {
  597. if (String.prototype.trim) {
  598. return str.trim();
  599. }
  600. return str.replace(/(^\s*)|(\s*$)/g, "");
  601. },
  602. spaceIndex: function(str) {
  603. var reg = /\s|\n|\t/;
  604. var match = reg.exec(str);
  605. return match ? match.index : -1;
  606. }
  607. };
  608. var FilterCSS$1 = lib.exports.FilterCSS;
  609. var getDefaultCSSWhiteList = lib.exports.getDefaultWhiteList;
  610. var _$2 = util;
  611. function getDefaultWhiteList() {
  612. return {
  613. a: ["target", "href", "title"],
  614. abbr: ["title"],
  615. address: [],
  616. area: ["shape", "coords", "href", "alt"],
  617. article: [],
  618. aside: [],
  619. audio: [
  620. "autoplay",
  621. "controls",
  622. "crossorigin",
  623. "loop",
  624. "muted",
  625. "preload",
  626. "src"
  627. ],
  628. b: [],
  629. bdi: ["dir"],
  630. bdo: ["dir"],
  631. big: [],
  632. blockquote: ["cite"],
  633. br: [],
  634. caption: [],
  635. center: [],
  636. cite: [],
  637. code: [],
  638. col: ["align", "valign", "span", "width"],
  639. colgroup: ["align", "valign", "span", "width"],
  640. dd: [],
  641. del: ["datetime"],
  642. details: ["open"],
  643. div: [],
  644. dl: [],
  645. dt: [],
  646. em: [],
  647. figcaption: [],
  648. figure: [],
  649. font: ["color", "size", "face"],
  650. footer: [],
  651. h1: [],
  652. h2: [],
  653. h3: [],
  654. h4: [],
  655. h5: [],
  656. h6: [],
  657. header: [],
  658. hr: [],
  659. i: [],
  660. img: ["src", "alt", "title", "width", "height"],
  661. ins: ["datetime"],
  662. li: [],
  663. mark: [],
  664. nav: [],
  665. ol: [],
  666. p: [],
  667. pre: [],
  668. s: [],
  669. section: [],
  670. small: [],
  671. span: [],
  672. sub: [],
  673. summary: [],
  674. sup: [],
  675. strong: [],
  676. strike: [],
  677. table: ["width", "border", "align", "valign"],
  678. tbody: ["align", "valign"],
  679. td: ["width", "rowspan", "colspan", "align", "valign"],
  680. tfoot: ["align", "valign"],
  681. th: ["width", "rowspan", "colspan", "align", "valign"],
  682. thead: ["align", "valign"],
  683. tr: ["rowspan", "align", "valign"],
  684. tt: [],
  685. u: [],
  686. ul: [],
  687. video: [
  688. "autoplay",
  689. "controls",
  690. "crossorigin",
  691. "loop",
  692. "muted",
  693. "playsinline",
  694. "poster",
  695. "preload",
  696. "src",
  697. "height",
  698. "width"
  699. ]
  700. };
  701. }
  702. var defaultCSSFilter = new FilterCSS$1();
  703. function onTag(tag, html, options) {
  704. }
  705. function onIgnoreTag(tag, html, options) {
  706. }
  707. function onTagAttr(tag, name, value) {
  708. }
  709. function onIgnoreTagAttr(tag, name, value) {
  710. }
  711. function escapeHtml(html) {
  712. return html.replace(REGEXP_LT, "&lt;").replace(REGEXP_GT, "&gt;");
  713. }
  714. function safeAttrValue(tag, name, value, cssFilter) {
  715. value = friendlyAttrValue(value);
  716. if (name === "href" || name === "src") {
  717. value = _$2.trim(value);
  718. if (value === "#")
  719. return "#";
  720. if (!(value.substr(0, 7) === "http://" || value.substr(0, 8) === "https://" || value.substr(0, 7) === "mailto:" || value.substr(0, 4) === "tel:" || value.substr(0, 11) === "data:image/" || value.substr(0, 6) === "ftp://" || value.substr(0, 2) === "./" || value.substr(0, 3) === "../" || value[0] === "#" || value[0] === "/")) {
  721. return "";
  722. }
  723. } else if (name === "background") {
  724. REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
  725. if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
  726. return "";
  727. }
  728. } else if (name === "style") {
  729. REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex = 0;
  730. if (REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value)) {
  731. return "";
  732. }
  733. REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex = 0;
  734. if (REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)) {
  735. REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
  736. if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
  737. return "";
  738. }
  739. }
  740. if (cssFilter !== false) {
  741. cssFilter = cssFilter || defaultCSSFilter;
  742. value = cssFilter.process(value);
  743. }
  744. }
  745. value = escapeAttrValue(value);
  746. return value;
  747. }
  748. var REGEXP_LT = /</g;
  749. var REGEXP_GT = />/g;
  750. var REGEXP_QUOTE = /"/g;
  751. var REGEXP_QUOTE_2 = /&quot;/g;
  752. var REGEXP_ATTR_VALUE_1 = /&#([a-zA-Z0-9]*);?/gim;
  753. var REGEXP_ATTR_VALUE_COLON = /&colon;?/gim;
  754. var REGEXP_ATTR_VALUE_NEWLINE = /&newline;?/gim;
  755. var REGEXP_DEFAULT_ON_TAG_ATTR_4 = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi;
  756. var REGEXP_DEFAULT_ON_TAG_ATTR_7 = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi;
  757. var REGEXP_DEFAULT_ON_TAG_ATTR_8 = /u\s*r\s*l\s*\(.*/gi;
  758. function escapeQuote(str) {
  759. return str.replace(REGEXP_QUOTE, "&quot;");
  760. }
  761. function unescapeQuote(str) {
  762. return str.replace(REGEXP_QUOTE_2, '"');
  763. }
  764. function escapeHtmlEntities(str) {
  765. return str.replace(REGEXP_ATTR_VALUE_1, function replaceUnicode(str2, code) {
  766. return code[0] === "x" || code[0] === "X" ? String.fromCharCode(parseInt(code.substr(1), 16)) : String.fromCharCode(parseInt(code, 10));
  767. });
  768. }
  769. function escapeDangerHtml5Entities(str) {
  770. return str.replace(REGEXP_ATTR_VALUE_COLON, ":").replace(REGEXP_ATTR_VALUE_NEWLINE, " ");
  771. }
  772. function clearNonPrintableCharacter(str) {
  773. var str2 = "";
  774. for (var i4 = 0, len = str.length; i4 < len; i4++) {
  775. str2 += str.charCodeAt(i4) < 32 ? " " : str.charAt(i4);
  776. }
  777. return _$2.trim(str2);
  778. }
  779. function friendlyAttrValue(str) {
  780. str = unescapeQuote(str);
  781. str = escapeHtmlEntities(str);
  782. str = escapeDangerHtml5Entities(str);
  783. str = clearNonPrintableCharacter(str);
  784. return str;
  785. }
  786. function escapeAttrValue(str) {
  787. str = escapeQuote(str);
  788. str = escapeHtml(str);
  789. return str;
  790. }
  791. function onIgnoreTagStripAll() {
  792. return "";
  793. }
  794. function StripTagBody(tags, next) {
  795. if (typeof next !== "function") {
  796. next = function() {
  797. };
  798. }
  799. var isRemoveAllTag = !Array.isArray(tags);
  800. function isRemoveTag(tag) {
  801. if (isRemoveAllTag)
  802. return true;
  803. return _$2.indexOf(tags, tag) !== -1;
  804. }
  805. var removeList = [];
  806. var posStart = false;
  807. return {
  808. onIgnoreTag: function(tag, html, options) {
  809. if (isRemoveTag(tag)) {
  810. if (options.isClosing) {
  811. var ret = "[/removed]";
  812. var end = options.position + ret.length;
  813. removeList.push([
  814. posStart !== false ? posStart : options.position,
  815. end
  816. ]);
  817. posStart = false;
  818. return ret;
  819. } else {
  820. if (!posStart) {
  821. posStart = options.position;
  822. }
  823. return "[removed]";
  824. }
  825. } else {
  826. return next(tag, html, options);
  827. }
  828. },
  829. remove: function(html) {
  830. var rethtml = "";
  831. var lastPos = 0;
  832. _$2.forEach(removeList, function(pos) {
  833. rethtml += html.slice(lastPos, pos[0]);
  834. lastPos = pos[1];
  835. });
  836. rethtml += html.slice(lastPos);
  837. return rethtml;
  838. }
  839. };
  840. }
  841. function stripCommentTag(html) {
  842. var retHtml = "";
  843. var lastPos = 0;
  844. while (lastPos < html.length) {
  845. var i4 = html.indexOf("<!--", lastPos);
  846. if (i4 === -1) {
  847. retHtml += html.slice(lastPos);
  848. break;
  849. }
  850. retHtml += html.slice(lastPos, i4);
  851. var j = html.indexOf("-->", i4);
  852. if (j === -1) {
  853. break;
  854. }
  855. lastPos = j + 3;
  856. }
  857. return retHtml;
  858. }
  859. function stripBlankChar(html) {
  860. var chars = html.split("");
  861. chars = chars.filter(function(char) {
  862. var c5 = char.charCodeAt(0);
  863. if (c5 === 127)
  864. return false;
  865. if (c5 <= 31) {
  866. if (c5 === 10 || c5 === 13)
  867. return true;
  868. return false;
  869. }
  870. return true;
  871. });
  872. return chars.join("");
  873. }
  874. _default$1.whiteList = getDefaultWhiteList();
  875. _default$1.getDefaultWhiteList = getDefaultWhiteList;
  876. _default$1.onTag = onTag;
  877. _default$1.onIgnoreTag = onIgnoreTag;
  878. _default$1.onTagAttr = onTagAttr;
  879. _default$1.onIgnoreTagAttr = onIgnoreTagAttr;
  880. _default$1.safeAttrValue = safeAttrValue;
  881. _default$1.escapeHtml = escapeHtml;
  882. _default$1.escapeQuote = escapeQuote;
  883. _default$1.unescapeQuote = unescapeQuote;
  884. _default$1.escapeHtmlEntities = escapeHtmlEntities;
  885. _default$1.escapeDangerHtml5Entities = escapeDangerHtml5Entities;
  886. _default$1.clearNonPrintableCharacter = clearNonPrintableCharacter;
  887. _default$1.friendlyAttrValue = friendlyAttrValue;
  888. _default$1.escapeAttrValue = escapeAttrValue;
  889. _default$1.onIgnoreTagStripAll = onIgnoreTagStripAll;
  890. _default$1.StripTagBody = StripTagBody;
  891. _default$1.stripCommentTag = stripCommentTag;
  892. _default$1.stripBlankChar = stripBlankChar;
  893. _default$1.cssFilter = defaultCSSFilter;
  894. _default$1.getDefaultCSSWhiteList = getDefaultCSSWhiteList;
  895. var parser$1 = {};
  896. var _$1 = util;
  897. function getTagName(html) {
  898. var i4 = _$1.spaceIndex(html);
  899. if (i4 === -1) {
  900. var tagName = html.slice(1, -1);
  901. } else {
  902. var tagName = html.slice(1, i4 + 1);
  903. }
  904. tagName = _$1.trim(tagName).toLowerCase();
  905. if (tagName.slice(0, 1) === "/")
  906. tagName = tagName.slice(1);
  907. if (tagName.slice(-1) === "/")
  908. tagName = tagName.slice(0, -1);
  909. return tagName;
  910. }
  911. function isClosing(html) {
  912. return html.slice(0, 2) === "</";
  913. }
  914. function parseTag$1(html, onTag2, escapeHtml2) {
  915. var rethtml = "";
  916. var lastPos = 0;
  917. var tagStart = false;
  918. var quoteStart = false;
  919. var currentPos = 0;
  920. var len = html.length;
  921. var currentTagName = "";
  922. var currentHtml = "";
  923. chariterator:
  924. for (currentPos = 0; currentPos < len; currentPos++) {
  925. var c5 = html.charAt(currentPos);
  926. if (tagStart === false) {
  927. if (c5 === "<") {
  928. tagStart = currentPos;
  929. continue;
  930. }
  931. } else {
  932. if (quoteStart === false) {
  933. if (c5 === "<") {
  934. rethtml += escapeHtml2(html.slice(lastPos, currentPos));
  935. tagStart = currentPos;
  936. lastPos = currentPos;
  937. continue;
  938. }
  939. if (c5 === ">") {
  940. rethtml += escapeHtml2(html.slice(lastPos, tagStart));
  941. currentHtml = html.slice(tagStart, currentPos + 1);
  942. currentTagName = getTagName(currentHtml);
  943. rethtml += onTag2(tagStart, rethtml.length, currentTagName, currentHtml, isClosing(currentHtml));
  944. lastPos = currentPos + 1;
  945. tagStart = false;
  946. continue;
  947. }
  948. if (c5 === '"' || c5 === "'") {
  949. var i4 = 1;
  950. var ic = html.charAt(currentPos - i4);
  951. while (ic.trim() === "" || ic === "=") {
  952. if (ic === "=") {
  953. quoteStart = c5;
  954. continue chariterator;
  955. }
  956. ic = html.charAt(currentPos - ++i4);
  957. }
  958. }
  959. } else {
  960. if (c5 === quoteStart) {
  961. quoteStart = false;
  962. continue;
  963. }
  964. }
  965. }
  966. }
  967. if (lastPos < html.length) {
  968. rethtml += escapeHtml2(html.substr(lastPos));
  969. }
  970. return rethtml;
  971. }
  972. var REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9_:\.\-]/gim;
  973. function parseAttr$1(html, onAttr2) {
  974. var lastPos = 0;
  975. var retAttrs = [];
  976. var tmpName = false;
  977. var len = html.length;
  978. function addAttr(name, value) {
  979. name = _$1.trim(name);
  980. name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, "").toLowerCase();
  981. if (name.length < 1)
  982. return;
  983. var ret = onAttr2(name, value || "");
  984. if (ret)
  985. retAttrs.push(ret);
  986. }
  987. for (var i4 = 0; i4 < len; i4++) {
  988. var c5 = html.charAt(i4);
  989. var v3, j;
  990. if (tmpName === false && c5 === "=") {
  991. tmpName = html.slice(lastPos, i4);
  992. lastPos = i4 + 1;
  993. continue;
  994. }
  995. if (tmpName !== false) {
  996. if (i4 === lastPos && (c5 === '"' || c5 === "'") && html.charAt(i4 - 1) === "=") {
  997. j = html.indexOf(c5, i4 + 1);
  998. if (j === -1) {
  999. break;
  1000. } else {
  1001. v3 = _$1.trim(html.slice(lastPos + 1, j));
  1002. addAttr(tmpName, v3);
  1003. tmpName = false;
  1004. i4 = j;
  1005. lastPos = i4 + 1;
  1006. continue;
  1007. }
  1008. }
  1009. }
  1010. if (/\s|\n|\t/.test(c5)) {
  1011. html = html.replace(/\s|\n|\t/g, " ");
  1012. if (tmpName === false) {
  1013. j = findNextEqual(html, i4);
  1014. if (j === -1) {
  1015. v3 = _$1.trim(html.slice(lastPos, i4));
  1016. addAttr(v3);
  1017. tmpName = false;
  1018. lastPos = i4 + 1;
  1019. continue;
  1020. } else {
  1021. i4 = j - 1;
  1022. continue;
  1023. }
  1024. } else {
  1025. j = findBeforeEqual(html, i4 - 1);
  1026. if (j === -1) {
  1027. v3 = _$1.trim(html.slice(lastPos, i4));
  1028. v3 = stripQuoteWrap(v3);
  1029. addAttr(tmpName, v3);
  1030. tmpName = false;
  1031. lastPos = i4 + 1;
  1032. continue;
  1033. } else {
  1034. continue;
  1035. }
  1036. }
  1037. }
  1038. }
  1039. if (lastPos < html.length) {
  1040. if (tmpName === false) {
  1041. addAttr(html.slice(lastPos));
  1042. } else {
  1043. addAttr(tmpName, stripQuoteWrap(_$1.trim(html.slice(lastPos))));
  1044. }
  1045. }
  1046. return _$1.trim(retAttrs.join(" "));
  1047. }
  1048. function findNextEqual(str, i4) {
  1049. for (; i4 < str.length; i4++) {
  1050. var c5 = str[i4];
  1051. if (c5 === " ")
  1052. continue;
  1053. if (c5 === "=")
  1054. return i4;
  1055. return -1;
  1056. }
  1057. }
  1058. function findBeforeEqual(str, i4) {
  1059. for (; i4 > 0; i4--) {
  1060. var c5 = str[i4];
  1061. if (c5 === " ")
  1062. continue;
  1063. if (c5 === "=")
  1064. return i4;
  1065. return -1;
  1066. }
  1067. }
  1068. function isQuoteWrapString(text) {
  1069. if (text[0] === '"' && text[text.length - 1] === '"' || text[0] === "'" && text[text.length - 1] === "'") {
  1070. return true;
  1071. } else {
  1072. return false;
  1073. }
  1074. }
  1075. function stripQuoteWrap(text) {
  1076. if (isQuoteWrapString(text)) {
  1077. return text.substr(1, text.length - 2);
  1078. } else {
  1079. return text;
  1080. }
  1081. }
  1082. parser$1.parseTag = parseTag$1;
  1083. parser$1.parseAttr = parseAttr$1;
  1084. var FilterCSS = lib.exports.FilterCSS;
  1085. var DEFAULT = _default$1;
  1086. var parser = parser$1;
  1087. var parseTag = parser.parseTag;
  1088. var parseAttr = parser.parseAttr;
  1089. var _ = util;
  1090. function isNull(obj) {
  1091. return obj === void 0 || obj === null;
  1092. }
  1093. function getAttrs(html) {
  1094. var i4 = _.spaceIndex(html);
  1095. if (i4 === -1) {
  1096. return {
  1097. html: "",
  1098. closing: html[html.length - 2] === "/"
  1099. };
  1100. }
  1101. html = _.trim(html.slice(i4 + 1, -1));
  1102. var isClosing2 = html[html.length - 1] === "/";
  1103. if (isClosing2)
  1104. html = _.trim(html.slice(0, -1));
  1105. return {
  1106. html,
  1107. closing: isClosing2
  1108. };
  1109. }
  1110. function shallowCopyObject(obj) {
  1111. var ret = {};
  1112. for (var i4 in obj) {
  1113. ret[i4] = obj[i4];
  1114. }
  1115. return ret;
  1116. }
  1117. function FilterXSS(options) {
  1118. options = shallowCopyObject(options || {});
  1119. if (options.stripIgnoreTag) {
  1120. if (options.onIgnoreTag) {
  1121. console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time');
  1122. }
  1123. options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;
  1124. }
  1125. options.whiteList = options.whiteList || options.allowList || DEFAULT.whiteList;
  1126. options.onTag = options.onTag || DEFAULT.onTag;
  1127. options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;
  1128. options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;
  1129. options.onIgnoreTagAttr = options.onIgnoreTagAttr || DEFAULT.onIgnoreTagAttr;
  1130. options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
  1131. options.escapeHtml = options.escapeHtml || DEFAULT.escapeHtml;
  1132. this.options = options;
  1133. if (options.css === false) {
  1134. this.cssFilter = false;
  1135. } else {
  1136. options.css = options.css || {};
  1137. this.cssFilter = new FilterCSS(options.css);
  1138. }
  1139. }
  1140. FilterXSS.prototype.process = function(html) {
  1141. html = html || "";
  1142. html = html.toString();
  1143. if (!html)
  1144. return "";
  1145. var me = this;
  1146. var options = me.options;
  1147. var whiteList = options.whiteList;
  1148. var onTag2 = options.onTag;
  1149. var onIgnoreTag2 = options.onIgnoreTag;
  1150. var onTagAttr2 = options.onTagAttr;
  1151. var onIgnoreTagAttr2 = options.onIgnoreTagAttr;
  1152. var safeAttrValue2 = options.safeAttrValue;
  1153. var escapeHtml2 = options.escapeHtml;
  1154. var cssFilter = me.cssFilter;
  1155. if (options.stripBlankChar) {
  1156. html = DEFAULT.stripBlankChar(html);
  1157. }
  1158. if (!options.allowCommentTag) {
  1159. html = DEFAULT.stripCommentTag(html);
  1160. }
  1161. var stripIgnoreTagBody = false;
  1162. if (options.stripIgnoreTagBody) {
  1163. var stripIgnoreTagBody = DEFAULT.StripTagBody(options.stripIgnoreTagBody, onIgnoreTag2);
  1164. onIgnoreTag2 = stripIgnoreTagBody.onIgnoreTag;
  1165. }
  1166. var retHtml = parseTag(html, function(sourcePosition, position, tag, html2, isClosing2) {
  1167. var info = {
  1168. sourcePosition,
  1169. position,
  1170. isClosing: isClosing2,
  1171. isWhite: whiteList.hasOwnProperty(tag)
  1172. };
  1173. var ret = onTag2(tag, html2, info);
  1174. if (!isNull(ret))
  1175. return ret;
  1176. if (info.isWhite) {
  1177. if (info.isClosing) {
  1178. return "</" + tag + ">";
  1179. }
  1180. var attrs = getAttrs(html2);
  1181. var whiteAttrList = whiteList[tag];
  1182. var attrsHtml = parseAttr(attrs.html, function(name, value) {
  1183. var isWhiteAttr = _.indexOf(whiteAttrList, name) !== -1;
  1184. var ret2 = onTagAttr2(tag, name, value, isWhiteAttr);
  1185. if (!isNull(ret2))
  1186. return ret2;
  1187. if (isWhiteAttr) {
  1188. value = safeAttrValue2(tag, name, value, cssFilter);
  1189. if (value) {
  1190. return name + '="' + value + '"';
  1191. } else {
  1192. return name;
  1193. }
  1194. } else {
  1195. var ret2 = onIgnoreTagAttr2(tag, name, value, isWhiteAttr);
  1196. if (!isNull(ret2))
  1197. return ret2;
  1198. return;
  1199. }
  1200. });
  1201. var html2 = "<" + tag;
  1202. if (attrsHtml)
  1203. html2 += " " + attrsHtml;
  1204. if (attrs.closing)
  1205. html2 += " /";
  1206. html2 += ">";
  1207. return html2;
  1208. } else {
  1209. var ret = onIgnoreTag2(tag, html2, info);
  1210. if (!isNull(ret))
  1211. return ret;
  1212. return escapeHtml2(html2);
  1213. }
  1214. }, escapeHtml2);
  1215. if (stripIgnoreTagBody) {
  1216. retHtml = stripIgnoreTagBody.remove(retHtml);
  1217. }
  1218. return retHtml;
  1219. };
  1220. var xss = FilterXSS;
  1221. (function(module, exports) {
  1222. var DEFAULT2 = _default$1;
  1223. var parser2 = parser$1;
  1224. var FilterXSS2 = xss;
  1225. function filterXSS(html, options) {
  1226. var xss2 = new FilterXSS2(options);
  1227. return xss2.process(html);
  1228. }
  1229. exports = module.exports = filterXSS;
  1230. exports.filterXSS = filterXSS;
  1231. exports.FilterXSS = FilterXSS2;
  1232. for (var i4 in DEFAULT2)
  1233. exports[i4] = DEFAULT2[i4];
  1234. for (var i4 in parser2)
  1235. exports[i4] = parser2[i4];
  1236. function isWorkerEnv() {
  1237. return typeof self !== "undefined" && typeof DedicatedWorkerGlobalScope !== "undefined" && self instanceof DedicatedWorkerGlobalScope;
  1238. }
  1239. if (isWorkerEnv()) {
  1240. self.filterXSS = module.exports;
  1241. }
  1242. })(lib$1, lib$1.exports);
  1243. var Sanitizer = function() {
  1244. function Sanitizer2(filterOptions, extendDefaults) {
  1245. var _this = this;
  1246. this.arcgisWhiteList = {
  1247. a: ["href", "style", "target"],
  1248. abbr: ["title"],
  1249. audio: ["autoplay", "controls", "loop", "muted", "preload"],
  1250. b: [],
  1251. br: [],
  1252. dd: ["style"],
  1253. div: ["align", "style"],
  1254. dl: ["style"],
  1255. dt: ["style"],
  1256. em: [],
  1257. figcaption: ["style"],
  1258. figure: ["style"],
  1259. font: ["color", "face", "size", "style"],
  1260. h1: ["style"],
  1261. h2: ["style"],
  1262. h3: ["style"],
  1263. h4: ["style"],
  1264. h5: ["style"],
  1265. h6: ["style"],
  1266. hr: [],
  1267. i: [],
  1268. img: ["alt", "border", "height", "src", "style", "width"],
  1269. li: [],
  1270. ol: [],
  1271. p: ["style"],
  1272. source: ["media", "src", "type"],
  1273. span: ["style"],
  1274. strong: [],
  1275. sub: ["style"],
  1276. sup: ["style"],
  1277. table: ["border", "cellpadding", "cellspacing", "height", "style", "width"],
  1278. tbody: [],
  1279. tr: ["align", "height", "style", "valign"],
  1280. td: [
  1281. "align",
  1282. "colspan",
  1283. "height",
  1284. "nowrap",
  1285. "rowspan",
  1286. "style",
  1287. "valign",
  1288. "width"
  1289. ],
  1290. th: [
  1291. "align",
  1292. "colspan",
  1293. "height",
  1294. "nowrap",
  1295. "rowspan",
  1296. "style",
  1297. "valign",
  1298. "width"
  1299. ],
  1300. u: [],
  1301. ul: [],
  1302. video: [
  1303. "autoplay",
  1304. "controls",
  1305. "height",
  1306. "loop",
  1307. "muted",
  1308. "poster",
  1309. "preload",
  1310. "width"
  1311. ]
  1312. };
  1313. this.allowedProtocols = [
  1314. "http",
  1315. "https",
  1316. "mailto",
  1317. "iform",
  1318. "tel",
  1319. "flow",
  1320. "lfmobile",
  1321. "arcgis-navigator",
  1322. "arcgis-appstudio-player",
  1323. "arcgis-survey123",
  1324. "arcgis-collector",
  1325. "arcgis-workforce",
  1326. "arcgis-explorer",
  1327. "arcgis-trek2there",
  1328. "arcgis-quickcapture",
  1329. "mspbi",
  1330. "comgooglemaps",
  1331. "pdfefile",
  1332. "pdfehttp",
  1333. "pdfehttps",
  1334. "boxapp",
  1335. "boxemm",
  1336. "awb",
  1337. "awbs",
  1338. "gropen",
  1339. "radarscope"
  1340. ];
  1341. this.arcgisFilterOptions = {
  1342. allowCommentTag: true,
  1343. safeAttrValue: function(tag, name, value, cssFilter) {
  1344. if (tag === "a" && name === "href" || (tag === "img" || tag === "source") && name === "src") {
  1345. return _this.sanitizeUrl(value);
  1346. }
  1347. return lib$1.exports.safeAttrValue(tag, name, value, cssFilter);
  1348. }
  1349. };
  1350. var xssFilterOptions;
  1351. if (filterOptions && !extendDefaults) {
  1352. xssFilterOptions = filterOptions;
  1353. } else if (filterOptions && extendDefaults) {
  1354. xssFilterOptions = Object.create(this.arcgisFilterOptions);
  1355. Object.keys(filterOptions).forEach(function(key) {
  1356. if (key === "whiteList") {
  1357. xssFilterOptions.whiteList = _this._extendObjectOfArrays([
  1358. _this.arcgisWhiteList,
  1359. filterOptions.whiteList || {}
  1360. ]);
  1361. } else {
  1362. xssFilterOptions[key] = filterOptions[key];
  1363. }
  1364. });
  1365. } else {
  1366. xssFilterOptions = Object.create(this.arcgisFilterOptions);
  1367. xssFilterOptions.whiteList = this.arcgisWhiteList;
  1368. }
  1369. this.xssFilterOptions = xssFilterOptions;
  1370. this._xssFilter = new lib$1.exports.FilterXSS(xssFilterOptions);
  1371. }
  1372. Sanitizer2.prototype.sanitize = function(value, options) {
  1373. if (options === void 0) {
  1374. options = {};
  1375. }
  1376. switch (typeof value) {
  1377. case "number":
  1378. if (isNaN(value) || !isFinite(value)) {
  1379. return null;
  1380. }
  1381. return value;
  1382. case "boolean":
  1383. return value;
  1384. case "string":
  1385. return this._xssFilter.process(value);
  1386. case "object":
  1387. return this._iterateOverObject(value, options);
  1388. default:
  1389. if (options.allowUndefined && typeof value === "undefined") {
  1390. return;
  1391. }
  1392. return null;
  1393. }
  1394. };
  1395. Sanitizer2.prototype.sanitizeUrl = function(value, options) {
  1396. var _a = (options !== null && options !== void 0 ? options : {}).isProtocolRequired, isProtocolRequired = _a === void 0 ? true : _a;
  1397. var protocol = this._trim(value.substring(0, value.indexOf(":")));
  1398. var isRootUrl = value === "/";
  1399. var isUrlFragment = /^#/.test(value);
  1400. var isValidProtocol = protocol && this.allowedProtocols.indexOf(protocol.toLowerCase()) > -1;
  1401. if (isRootUrl || isUrlFragment || isValidProtocol) {
  1402. return lib$1.exports.escapeAttrValue(value);
  1403. }
  1404. if (!protocol && !isProtocolRequired) {
  1405. return lib$1.exports.escapeAttrValue("https://".concat(value));
  1406. }
  1407. return "";
  1408. };
  1409. Sanitizer2.prototype.sanitizeHTMLAttribute = function(tag, attribute, value, cssFilter) {
  1410. if (typeof this.xssFilterOptions.safeAttrValue === "function") {
  1411. return this.xssFilterOptions.safeAttrValue(tag, attribute, value, cssFilter);
  1412. }
  1413. return lib$1.exports.safeAttrValue(tag, attribute, value, cssFilter);
  1414. };
  1415. Sanitizer2.prototype.validate = function(value, options) {
  1416. if (options === void 0) {
  1417. options = {};
  1418. }
  1419. var sanitized = this.sanitize(value, options);
  1420. return {
  1421. isValid: value === sanitized,
  1422. sanitized
  1423. };
  1424. };
  1425. Sanitizer2.prototype._extendObjectOfArrays = function(objects) {
  1426. var finalObj = {};
  1427. objects.forEach(function(obj) {
  1428. Object.keys(obj).forEach(function(key) {
  1429. if (Array.isArray(obj[key]) && Array.isArray(finalObj[key])) {
  1430. finalObj[key] = finalObj[key].concat(obj[key]);
  1431. } else {
  1432. finalObj[key] = obj[key];
  1433. }
  1434. });
  1435. });
  1436. return finalObj;
  1437. };
  1438. Sanitizer2.prototype._iterateOverObject = function(obj, options) {
  1439. var _this = this;
  1440. if (options === void 0) {
  1441. options = {};
  1442. }
  1443. try {
  1444. var hasChanged_1 = false;
  1445. var changedObj = void 0;
  1446. if (Array.isArray(obj)) {
  1447. changedObj = obj.reduce(function(prev, value) {
  1448. var validation = _this.validate(value, options);
  1449. if (validation.isValid) {
  1450. return prev.concat([value]);
  1451. } else {
  1452. hasChanged_1 = true;
  1453. return prev.concat([validation.sanitized]);
  1454. }
  1455. }, []);
  1456. } else if (!lodash_isplainobject(obj)) {
  1457. if (options.allowUndefined && typeof obj === "undefined") {
  1458. return;
  1459. }
  1460. return null;
  1461. } else {
  1462. var keys = Object.keys(obj);
  1463. changedObj = keys.reduce(function(prev, key) {
  1464. var value = obj[key];
  1465. var validation = _this.validate(value, options);
  1466. if (validation.isValid) {
  1467. prev[key] = value;
  1468. } else {
  1469. hasChanged_1 = true;
  1470. prev[key] = validation.sanitized;
  1471. }
  1472. return prev;
  1473. }, {});
  1474. }
  1475. if (hasChanged_1) {
  1476. return changedObj;
  1477. }
  1478. return obj;
  1479. } catch (err) {
  1480. return null;
  1481. }
  1482. };
  1483. Sanitizer2.prototype._trim = function(val) {
  1484. return String.prototype.trim ? val.trim() : val.replace(/(^\s*)|(\s*$)/g, "");
  1485. };
  1486. return Sanitizer2;
  1487. }();
  1488. // node_modules/@arcgis/core/widgets/support/vnodeCache.js
  1489. var n2 = new Map();
  1490. function t2() {
  1491. n2.clear();
  1492. }
  1493. function e(t7) {
  1494. return n2.get(t7);
  1495. }
  1496. function c(t7, e3) {
  1497. n2.set(t7, e3);
  1498. }
  1499. function o(t7) {
  1500. n2.delete(t7);
  1501. }
  1502. // node_modules/@arcgis/core/widgets/support/widgetUtils.js
  1503. var o2;
  1504. var s2;
  1505. var a = function(e3) {
  1506. if ("WebkitTransition" in e3.style)
  1507. o2 = "webkitTransitionEnd", s2 = "webkitAnimationEnd";
  1508. else {
  1509. if (!("transition" in e3.style))
  1510. throw new Error("Your browser is not supported!");
  1511. o2 = "transitionend", s2 = "animationend";
  1512. }
  1513. };
  1514. var c2 = function(e3) {
  1515. o2 || a(e3);
  1516. };
  1517. var l = function(e3, t7) {
  1518. return t7 === void 0 && (t7 = e3 + "-active"), function(n8) {
  1519. c2(n8);
  1520. var r3 = false, i4 = function(a4) {
  1521. r3 || (r3 = true, n8.removeEventListener(o2, i4), n8.removeEventListener(s2, i4), n8.classList.remove(e3), n8.classList.remove(t7));
  1522. };
  1523. n8.classList.add(e3), n8.addEventListener(o2, i4), n8.addEventListener(s2, i4), requestAnimationFrame(function() {
  1524. n8.classList.add(t7);
  1525. });
  1526. };
  1527. };
  1528. var d = function(e3, t7) {
  1529. return t7 === void 0 && (t7 = e3 + "-active"), function(n8, r3) {
  1530. c2(n8);
  1531. var i4 = false, a4 = function(e4) {
  1532. i4 || (i4 = true, n8.removeEventListener(o2, a4), n8.removeEventListener(s2, a4), r3());
  1533. };
  1534. n8.classList.add(e3), n8.addEventListener(o2, a4), n8.addEventListener(s2, a4), requestAnimationFrame(function() {
  1535. n8.classList.add(t7);
  1536. });
  1537. };
  1538. };
  1539. var u = s.getLogger("esri.widgets.support.widgetUtils");
  1540. function p(e3) {
  1541. const n8 = t.acquire();
  1542. for (let t7 = 0; t7 < arguments.length; t7++) {
  1543. const e4 = arguments[t7], r4 = typeof e4;
  1544. if (r4 === "string")
  1545. n8.push(e4);
  1546. else if (Array.isArray(e4))
  1547. n8.push.apply(n8, e4);
  1548. else if (r4 === "object")
  1549. for (const t8 in e4)
  1550. e4[t8] && n8.push(t8);
  1551. }
  1552. const r3 = n8.join(" ");
  1553. return t.release(n8), r3;
  1554. }
  1555. var g = (() => {
  1556. const e3 = new Map(), t7 = new ResizeObserver((t8) => {
  1557. t2();
  1558. for (const n8 of t8)
  1559. e3.get(n8.target)(n8);
  1560. });
  1561. return (r3, i4, o7) => (e3.has(r3) && u.error("Already observing element", r3), e3.set(r3, i4), t7.observe(r3, o7), n(() => {
  1562. t7.unobserve(r3), e3.delete(r3);
  1563. }));
  1564. })();
  1565. function f(e3) {
  1566. const t7 = e3?.closest("[dir]");
  1567. return t7 !== null && t7 instanceof HTMLElement && t7.dir === "rtl" || document.dir === "rtl";
  1568. }
  1569. function h(e3) {
  1570. const t7 = "data-node-ref";
  1571. this[e3.getAttribute(t7)] = null;
  1572. }
  1573. function v(e3) {
  1574. const t7 = "data-node-ref";
  1575. this[e3.getAttribute(t7)] = e3;
  1576. }
  1577. function w(e3, t7) {
  1578. return (e3 === "enter" ? l : d)(t7);
  1579. }
  1580. var L = ["dd", "dl", "dt", "h1", "h2", "h3", "h4", "h5", "h6", "sub", "sup", ...["animate", "animatetransform", "circle", "clippath", "defs", "ellipse", "g", "image", "line", "lineargradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "svg", "switch", "symbol", "text", "textpath", "tspan", "use"]];
  1581. var b = L.reduce((e3, t7) => (e3[t7] = [], e3), {});
  1582. var y = ["align", "alink", "alt", "bgcolor", "border", "cellpadding", "cellspacing", "class", "color", "cols", "colspan", "coords", "d", "dir", "face", "height", "hspace", "ismap", "lang", "marginheight", "marginwidth", "multiple", "nohref", "noresize", "noshade", "nowrap", "ref", "rel", "rev", "rows", "rowspan", "scrolling", "shape", "span", "summary", "tabindex", "title", "usemap", "valign", "value", "vlink", "vspace", "width"];
  1583. var E = new Sanitizer({ whiteList: b, onTagAttr: (e3, t7, n8) => {
  1584. const r3 = `${t7}="${n8}"`;
  1585. if (y.includes(t7))
  1586. return r3;
  1587. }, stripIgnoreTag: true, stripIgnoreTagBody: ["script", "style"] }, true);
  1588. function k(e3) {
  1589. return e3 === "Enter" || e3 === " ";
  1590. }
  1591. // node_modules/@arcgis/core/libs/maquette/projection.js
  1592. var t3 = "http://www.w3.org/";
  1593. var r = `${t3}2000/svg`;
  1594. var o3 = `${t3}1999/xlink`;
  1595. var i;
  1596. var l2 = [];
  1597. var n3 = (e3, t7) => {
  1598. let r3 = {};
  1599. return Object.keys(e3).forEach((t8) => {
  1600. r3[t8] = e3[t8];
  1601. }), t7 && Object.keys(t7).forEach((e4) => {
  1602. r3[e4] = t7[e4];
  1603. }), r3;
  1604. };
  1605. var s3 = (e3, t7) => e3.vnodeSelector === t7.vnodeSelector && (e3.properties && t7.properties ? e3.properties.key === t7.properties.key && e3.properties.bind === t7.properties.bind : !e3.properties && !t7.properties);
  1606. var p2 = (e3) => {
  1607. if (typeof e3 != "string")
  1608. throw new Error("Style values must be strings");
  1609. };
  1610. var d2 = (e3, t7, r3) => {
  1611. if (t7.vnodeSelector !== "") {
  1612. for (let o7 = r3; o7 < e3.length; o7++)
  1613. if (s3(e3[o7], t7))
  1614. return o7;
  1615. }
  1616. return -1;
  1617. };
  1618. var a2 = (e3, t7, r3, o7) => {
  1619. let i4 = e3[t7];
  1620. if (i4.vnodeSelector === "")
  1621. return;
  1622. let l3 = i4.properties;
  1623. if (!(l3 ? l3.key === void 0 ? l3.bind : l3.key : void 0)) {
  1624. for (let n8 = 0; n8 < e3.length; n8++)
  1625. if (n8 !== t7) {
  1626. let t8 = e3[n8];
  1627. if (s3(t8, i4))
  1628. throw new Error(`${r3.vnodeSelector} had a ${i4.vnodeSelector} child ${o7 === "added" ? o7 : "removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`);
  1629. }
  1630. }
  1631. };
  1632. var f2 = (e3) => {
  1633. if (e3.properties) {
  1634. let t7 = e3.properties.enterAnimation;
  1635. t7 && t7(e3.domNode, e3.properties);
  1636. }
  1637. };
  1638. var c3 = [];
  1639. var u2 = false;
  1640. var h2 = (e3) => {
  1641. (e3.children || []).forEach(h2), e3.properties && e3.properties.afterRemoved && e3.properties.afterRemoved.apply(e3.properties.bind || e3.properties, [e3.domNode]);
  1642. };
  1643. var m = () => {
  1644. u2 = false, c3.forEach(h2), c3.length = 0;
  1645. };
  1646. var v2 = (e3) => {
  1647. c3.push(e3), u2 || (u2 = true, typeof window != "undefined" && "requestIdleCallback" in window ? window.requestIdleCallback(m, { timeout: 16 }) : setTimeout(m, 16));
  1648. };
  1649. var y2 = (e3) => {
  1650. let t7 = e3.domNode;
  1651. if (e3.properties) {
  1652. let r3 = e3.properties.exitAnimation;
  1653. if (r3) {
  1654. t7.style.pointerEvents = "none";
  1655. let o7 = () => {
  1656. t7.parentNode && (t7.parentNode.removeChild(t7), v2(e3));
  1657. };
  1658. return void r3(t7, o7, e3.properties);
  1659. }
  1660. }
  1661. t7.parentNode && (t7.parentNode.removeChild(t7), v2(e3));
  1662. };
  1663. var g2 = (t7, i4, l3) => {
  1664. if (!i4)
  1665. return;
  1666. let n8 = l3.eventHandlerInterceptor, s5 = Object.keys(i4), d6 = s5.length;
  1667. for (let a4 = 0; a4 < d6; a4++) {
  1668. let d7 = s5[a4], f3 = i4[d7];
  1669. if (d7 === "className")
  1670. throw new Error('Property "className" is not supported, use "class".');
  1671. if (d7 === "class")
  1672. x(t7, f3, true);
  1673. else if (d7 === "classes") {
  1674. let e3 = Object.keys(f3), r3 = e3.length;
  1675. for (let o7 = 0; o7 < r3; o7++) {
  1676. let r4 = e3[o7];
  1677. f3[r4] && t7.classList.add(r4);
  1678. }
  1679. } else if (d7 === "styles") {
  1680. let e3 = Object.keys(f3), r3 = e3.length;
  1681. for (let o7 = 0; o7 < r3; o7++) {
  1682. let r4 = e3[o7], i5 = f3[r4];
  1683. i5 && (p2(i5), l3.styleApplyer(t7, r4, i5));
  1684. }
  1685. } else if (d7 !== "key" && f3 != null) {
  1686. let s6 = typeof f3;
  1687. s6 === "function" ? (d7.lastIndexOf("on", 0) === 0 && (n8 && (f3 = n8(d7, f3, t7, i4)), d7 === "oninput" && function() {
  1688. let e3 = f3;
  1689. f3 = function(t8) {
  1690. e3.apply(this, [t8]), t8.target["oninput-value"] = t8.target.value;
  1691. };
  1692. }()), t7[d7] = f3) : l3.namespace === r ? d7 === "href" ? t7.setAttributeNS(o3, d7, f3) : t7.setAttribute(d7, f3) : s6 === "string" && d7 !== "value" ? d7 === "innerHTML" ? t7[d7] = E.sanitize(f3) : t7.setAttribute(d7, f3) : t7[d7] = f3;
  1693. }
  1694. }
  1695. };
  1696. var b2 = (e3, t7, r3) => {
  1697. if (t7)
  1698. for (let o7 of t7)
  1699. w2(o7, e3, void 0, r3);
  1700. };
  1701. var N = (e3, t7, r3) => {
  1702. b2(e3, t7.children, r3), t7.text && (e3.textContent = t7.text), g2(e3, t7.properties, r3), t7.properties && t7.properties.afterCreate && t7.properties.afterCreate.apply(t7.properties.bind || t7.properties, [e3, r3, t7.vnodeSelector, t7.properties, t7.children]);
  1703. };
  1704. var w2 = (e3, t7, o7, i4) => {
  1705. let l3, s5 = 0, p4 = e3.vnodeSelector, d6 = t7.ownerDocument;
  1706. if (p4 === "")
  1707. l3 = e3.domNode = d6.createTextNode(e3.text), o7 !== void 0 ? t7.insertBefore(l3, o7) : t7.appendChild(l3);
  1708. else {
  1709. for (let a4 = 0; a4 <= p4.length; ++a4) {
  1710. let f3 = p4.charAt(a4);
  1711. if (a4 === p4.length || f3 === "." || f3 === "#") {
  1712. let f4 = p4.charAt(s5 - 1), c5 = p4.slice(s5, a4);
  1713. f4 === "." ? l3.classList.add(c5) : f4 === "#" ? l3.id = c5 : (c5 === "svg" && (i4 = n3(i4, { namespace: r })), i4.namespace !== void 0 ? l3 = e3.domNode = d6.createElementNS(i4.namespace, c5) : (l3 = e3.domNode = e3.domNode || d6.createElement(c5), c5 === "input" && e3.properties && e3.properties.type !== void 0 && l3.setAttribute("type", e3.properties.type)), o7 !== void 0 ? t7.insertBefore(l3, o7) : l3.parentNode !== t7 && t7.appendChild(l3)), s5 = a4 + 1;
  1714. }
  1715. }
  1716. N(l3, e3, i4);
  1717. }
  1718. };
  1719. var x = (e3, t7, r3) => {
  1720. t7 && t7.split(" ").forEach((t8) => {
  1721. t8 && e3.classList.toggle(t8, r3);
  1722. });
  1723. };
  1724. var k2 = (t7, i4, l3, n8) => {
  1725. if (!l3)
  1726. return;
  1727. let s5 = false, d6 = Object.keys(l3), a4 = d6.length;
  1728. for (let f3 = 0; f3 < a4; f3++) {
  1729. let a5 = d6[f3], c5 = l3[a5], u3 = i4[a5];
  1730. if (a5 === "class")
  1731. u3 !== c5 && (x(t7, u3, false), x(t7, c5, true));
  1732. else if (a5 === "classes") {
  1733. let e3 = t7.classList, r3 = Object.keys(c5), o7 = r3.length;
  1734. for (let t8 = 0; t8 < o7; t8++) {
  1735. let o8 = r3[t8], i5 = !!c5[o8];
  1736. i5 !== !!u3[o8] && (s5 = true, i5 ? e3.add(o8) : e3.remove(o8));
  1737. }
  1738. } else if (a5 === "styles") {
  1739. let e3 = Object.keys(c5), r3 = e3.length;
  1740. for (let o7 = 0; o7 < r3; o7++) {
  1741. let r4 = e3[o7], i5 = c5[r4];
  1742. i5 !== u3[r4] && (s5 = true, i5 ? (p2(i5), n8.styleApplyer(t7, r4, i5)) : n8.styleApplyer(t7, r4, ""));
  1743. }
  1744. } else if (c5 || typeof u3 != "string" || (c5 = ""), a5 === "value") {
  1745. let e3 = t7[a5];
  1746. e3 !== c5 && (t7["oninput-value"] ? e3 === t7["oninput-value"] : c5 !== u3) && (t7[a5] = c5, t7["oninput-value"] = void 0), c5 !== u3 && (s5 = true);
  1747. } else if (c5 !== u3) {
  1748. let i5 = typeof c5;
  1749. i5 === "function" && n8.eventHandlerInterceptor || (n8.namespace === r ? a5 === "href" ? t7.setAttributeNS(o3, a5, c5) : t7.setAttribute(a5, c5) : i5 === "string" ? a5 === "innerHTML" ? t7[a5] = E.sanitize(c5) : a5 === "role" && c5 === "" ? t7.removeAttribute(a5) : t7.setAttribute(a5, c5) : t7[a5] !== c5 && (t7[a5] = c5), s5 = true);
  1750. }
  1751. }
  1752. return s5;
  1753. };
  1754. var A = (e3, t7, r3, o7, n8) => {
  1755. if (r3 === o7)
  1756. return false;
  1757. o7 = o7 || l2;
  1758. let p4, c5 = (r3 = r3 || l2).length, u3 = o7.length, h3 = 0, m2 = 0, v3 = false;
  1759. for (; m2 < u3; ) {
  1760. let l3 = h3 < c5 ? r3[h3] : void 0, u4 = o7[m2];
  1761. if (l3 !== void 0 && s3(l3, u4))
  1762. v3 = i(l3, u4, n8) || v3, h3++;
  1763. else {
  1764. let l4 = d2(r3, u4, h3 + 1);
  1765. if (l4 >= 0) {
  1766. for (p4 = h3; p4 < l4; p4++)
  1767. y2(r3[p4]), a2(r3, p4, e3, "removed");
  1768. v3 = i(r3[l4], u4, n8) || v3, h3 = l4 + 1;
  1769. } else
  1770. w2(u4, t7, h3 < c5 ? r3[h3].domNode : void 0, n8), f2(u4), a2(o7, m2, e3, "added");
  1771. }
  1772. m2++;
  1773. }
  1774. if (c5 > h3)
  1775. for (p4 = h3; p4 < c5; p4++)
  1776. y2(r3[p4]), a2(r3, p4, e3, "removed");
  1777. return v3;
  1778. };
  1779. i = (e3, t7, o7) => {
  1780. let i4 = e3.domNode, l3 = false;
  1781. if (e3 === t7)
  1782. return false;
  1783. let s5 = false;
  1784. if (t7.vnodeSelector === "") {
  1785. if (t7.text !== e3.text) {
  1786. let e4 = i4.ownerDocument.createTextNode(t7.text);
  1787. return i4.parentNode.replaceChild(e4, i4), t7.domNode = e4, l3 = true, l3;
  1788. }
  1789. t7.domNode = i4;
  1790. } else
  1791. t7.vnodeSelector.lastIndexOf("svg", 0) === 0 && (o7 = n3(o7, { namespace: r })), e3.text !== t7.text && (s5 = true, t7.text === void 0 ? i4.removeChild(i4.firstChild) : i4.textContent = t7.text), t7.domNode = i4, s5 = A(t7, i4, e3.children, t7.children, o7) || s5, s5 = k2(i4, e3.properties, t7.properties, o7) || s5, t7.properties && t7.properties.afterUpdate && t7.properties.afterUpdate.apply(t7.properties.bind || t7.properties, [i4, o7, t7.vnodeSelector, t7.properties, t7.children]);
  1792. return s5 && t7.properties && t7.properties.updateAnimation && t7.properties.updateAnimation(i4, t7.properties, e3.properties), l3;
  1793. };
  1794. var S = (e3, t7) => ({ getLastRender: () => e3, update: (r3) => {
  1795. if (e3.vnodeSelector !== r3.vnodeSelector)
  1796. throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");
  1797. let o7 = e3;
  1798. e3 = r3, i(o7, r3, t7);
  1799. }, domNode: e3.domNode });
  1800. // node_modules/@arcgis/core/libs/maquette/dom.js
  1801. var p3 = { namespace: void 0, performanceLogger: () => {
  1802. }, eventHandlerInterceptor: void 0, styleApplyer: (e3, r3, o7) => {
  1803. r3.charAt(0) === "-" ? e3.style.setProperty(r3, o7) : e3.style[r3] = o7;
  1804. } };
  1805. var d3 = (r3) => n3(p3, r3);
  1806. var n4 = { create: (e3, t7) => (t7 = d3(t7), w2(e3, document.createElement("div"), void 0, t7), S(e3, t7)), append: (e3, t7, p4) => (p4 = d3(p4), w2(t7, e3, void 0, p4), S(t7, p4)), insertBefore: (e3, t7, p4) => (p4 = d3(p4), w2(t7, e3.parentNode, e3, p4), S(t7, p4)), merge: (e3, r3, p4) => (p4 = d3(p4), r3.domNode = e3, N(e3, r3, p4), S(r3, p4)), replace: (e3, t7, p4) => (p4 = d3(p4), w2(t7, e3.parentNode, e3, p4), e3.parentNode.removeChild(e3), S(t7, p4)) };
  1807. // node_modules/@arcgis/core/libs/maquette/projector.js
  1808. var t4;
  1809. var n5 = (e3, r3) => {
  1810. let t7 = [];
  1811. for (; e3 && e3 !== r3; )
  1812. t7.push(e3), e3 = e3.parentNode;
  1813. return t7;
  1814. };
  1815. t4 = Array.prototype.find ? (e3, r3) => e3.find(r3) : (e3, r3) => e3.filter(r3)[0];
  1816. var o4 = (e3, r3) => {
  1817. let n8 = e3;
  1818. return r3.forEach((e4) => {
  1819. n8 = n8 && n8.children ? t4(n8.children, (r4) => r4.domNode === e4) : void 0;
  1820. }), n8;
  1821. };
  1822. var d4 = (e3, r3, t7) => {
  1823. let d6 = function(d7) {
  1824. t7("domEvent", d7);
  1825. let i4 = r3(), p4 = n5(d7.currentTarget, i4.domNode);
  1826. p4.reverse();
  1827. let l3, a4 = o4(i4.getLastRender(), p4);
  1828. return e3.scheduleRender(), a4 && (l3 = a4.properties[`on${d7.type}`].apply(a4.properties.bind || this, arguments)), t7("domEventProcessed", d7), l3;
  1829. };
  1830. return (e4, r4, t8, n8) => d6;
  1831. };
  1832. var i2 = (t7) => {
  1833. let n8, o7, i4 = d3(t7), p4 = i4.performanceLogger, l3 = true, a4 = false, s5 = [], c5 = [], u3 = (e3, r3, t8) => {
  1834. let o8, l4 = () => o8;
  1835. i4.eventHandlerInterceptor = d4(n8, l4, p4), o8 = e3(r3, t8(), i4), s5.push(o8), c5.push(t8);
  1836. }, f3 = () => {
  1837. if (o7 = void 0, l3) {
  1838. l3 = false, p4("renderStart", void 0);
  1839. for (let e3 = 0; e3 < s5.length; e3++) {
  1840. let r3 = c5[e3]();
  1841. p4("rendered", void 0), s5[e3].update(r3), p4("patched", void 0);
  1842. }
  1843. p4("renderDone", void 0), l3 = true;
  1844. }
  1845. };
  1846. return n8 = { renderNow: f3, scheduleRender: () => {
  1847. o7 || a4 || (o7 = requestAnimationFrame(f3));
  1848. }, stop: () => {
  1849. o7 && (cancelAnimationFrame(o7), o7 = void 0), a4 = true;
  1850. }, resume: () => {
  1851. a4 = false, l3 = true, n8.scheduleRender();
  1852. }, append: (e3, t8) => {
  1853. u3(n4.append, e3, t8);
  1854. }, insertBefore: (e3, t8) => {
  1855. u3(n4.insertBefore, e3, t8);
  1856. }, merge: (e3, t8) => {
  1857. u3(n4.merge, e3, t8);
  1858. }, replace: (e3, t8) => {
  1859. u3(n4.replace, e3, t8);
  1860. }, detach: (e3) => {
  1861. for (let r3 = 0; r3 < c5.length; r3++)
  1862. if (c5[r3] === e3)
  1863. return c5.splice(r3, 1), s5.splice(r3, 1)[0];
  1864. throw new Error("renderFunction was not found");
  1865. } }, n8;
  1866. };
  1867. // node_modules/@arcgis/core/widgets/support/jsxWidgetSupport.js
  1868. var t5 = Symbol("widget");
  1869. var r2 = [];
  1870. var n6 = {};
  1871. var o5 = new WeakMap();
  1872. function i3(e3, t7) {
  1873. let o7 = t7.children;
  1874. if (o7 && o7.length)
  1875. for (let r3 = 0; r3 < o7.length; ++r3)
  1876. o7[r3] = i3(e3, o7[r3]);
  1877. else
  1878. o7 = r2;
  1879. const l3 = t7.vnodeSelector;
  1880. if (a3(l3)) {
  1881. const r3 = t7.properties || n6, i4 = r3.key || l3;
  1882. return { vnodeSelector: "div", properties: { key: i4, afterCreate: d5, afterUpdate: c4, afterRemoved: s4, parentWidget: e3, widgetConstructor: l3, widgetProperties: { ...r3, key: i4, children: o7 } }, children: void 0, text: void 0, domNode: null };
  1883. }
  1884. return t7;
  1885. }
  1886. function d5(t7, r3, n8, { parentWidget: i4, widgetConstructor: d6, widgetProperties: c5 }) {
  1887. const a4 = new d6(c5);
  1888. a4.container = t7, o5.set(t7, a4), a4.afterCreate?.(a4, t7), i4._internalHandles.add(n(() => s4(t7)));
  1889. }
  1890. function c4(e3, t7, r3, { widgetProperties: n8 }) {
  1891. const i4 = o5.get(e3);
  1892. i4 && (i4.set(n8), i4.afterUpdate?.(i4, e3));
  1893. }
  1894. function s4(e3) {
  1895. const t7 = o5.get(e3);
  1896. t7 && (t7.destroy(), o5.delete(e3));
  1897. }
  1898. function a3(e3) {
  1899. return typeof e3 == "function" && e3[t5];
  1900. }
  1901. // node_modules/@arcgis/core/widgets/support/jsxFactory.js
  1902. var e2 = function(r3) {
  1903. return { vnodeSelector: "", properties: void 0, children: void 0, text: r3.toString(), domNode: null };
  1904. };
  1905. var o6 = function(r3, t7) {
  1906. for (var n8 = 0, i4 = r3.length; n8 < i4; n8++) {
  1907. var d6 = r3[n8];
  1908. Array.isArray(d6) ? o6(d6, t7) : d6 != null && d6 !== false && (d6.hasOwnProperty("vnodeSelector") || (d6 = e2(d6)), t7.push(d6));
  1909. }
  1910. };
  1911. var t6 = function(r3, e3) {
  1912. for (var t7 = [], n8 = 2; n8 < arguments.length; n8++)
  1913. t7[n8 - 2] = arguments[n8];
  1914. if (t7.length === 1 && typeof t7[0] == "string")
  1915. return { vnodeSelector: r3, properties: e3 || void 0, children: void 0, text: t7[0], domNode: null };
  1916. var i4 = [];
  1917. return o6(t7, i4), { vnodeSelector: r3, properties: e3 || void 0, children: i4, text: void 0, domNode: null };
  1918. };
  1919. function n7(e3, o7, ...n8) {
  1920. return typeof e3 != "function" || a3(e3) ? t6(e3, o7, ...n8) : e3(o7, ...n8);
  1921. }
  1922. export {
  1923. t2 as t,
  1924. e,
  1925. c,
  1926. o,
  1927. p,
  1928. f,
  1929. h,
  1930. v,
  1931. w,
  1932. k,
  1933. n4 as n,
  1934. i2 as i,
  1935. t5 as t2,
  1936. i3 as i2,
  1937. a3 as a,
  1938. n7 as n2
  1939. };
  1940. /*!
  1941. * @esri/arcgis-html-sanitizer - v2.10.0 - Tue Mar 15 2022 16:38:25 GMT-0400 (Eastern Daylight Time)
  1942. * Copyright (c) 2022 - Environmental Systems Research Institute, Inc.
  1943. * Apache-2.0
  1944. *
  1945. * js-xss
  1946. * Copyright (c) 2012-2017 Zongmin Lei(雷宗民) <leizongmin@gmail.com>
  1947. * http://ucdok.com
  1948. * MIT License, see https://github.com/leizongmin/js-xss/blob/master/LICENSE for details
  1949. *
  1950. * Lodash/isPlainObject
  1951. * Copyright (c) JS Foundation and other contributors <https://js.foundation/>
  1952. * MIT License, see https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/LICENSE for details
  1953. */
  1954. //# sourceMappingURL=chunk-7256PFPA.js.map