@signalwire/web-components 4.0.0-beta.11 → 4.0.0-beta.13
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.
- package/README.md +48 -55
- package/dist/_virtual/_commonjsHelpers.js +9 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/prism-python.js +28 -0
- package/dist/_virtual/prism-python.js.map +1 -0
- package/dist/_virtual/prism-python2.js +5 -0
- package/dist/_virtual/prism-python2.js.map +1 -0
- package/dist/_virtual/prism-typescript.js +28 -0
- package/dist/_virtual/prism-typescript.js.map +1 -0
- package/dist/_virtual/prism-typescript2.js +5 -0
- package/dist/_virtual/prism-typescript2.js.map +1 -0
- package/dist/_virtual/prism.js +28 -0
- package/dist/_virtual/prism.js.map +1 -0
- package/dist/_virtual/prism2.js +5 -0
- package/dist/_virtual/prism2.js.map +1 -0
- package/dist/assets/sw_background.webp.js +5 -0
- package/dist/assets/sw_background.webp.js.map +1 -0
- package/dist/components/UI/DEFAULT_BACKGROUND.d.ts +4 -0
- package/dist/components/UI/DEFAULT_BACKGROUND.d.ts.map +1 -0
- package/dist/components/UI/DEFAULT_BACKGROUND.js +5 -0
- package/dist/components/UI/DEFAULT_BACKGROUND.js.map +1 -0
- package/dist/components/UI/controls/sw-ui-control-bar.d.ts +114 -0
- package/dist/components/UI/controls/sw-ui-control-bar.d.ts.map +1 -0
- package/dist/components/UI/controls/sw-ui-control-bar.js +324 -0
- package/dist/components/UI/controls/sw-ui-control-bar.js.map +1 -0
- package/dist/components/UI/controls/sw-ui-dialpad.d.ts +67 -0
- package/dist/components/UI/controls/sw-ui-dialpad.d.ts.map +1 -0
- package/dist/components/UI/controls/sw-ui-dialpad.js +360 -0
- package/dist/components/UI/controls/sw-ui-dialpad.js.map +1 -0
- package/dist/components/UI/controls/sw-ui-dropup.d.ts +42 -0
- package/dist/components/UI/controls/sw-ui-dropup.d.ts.map +1 -0
- package/dist/components/UI/controls/sw-ui-dropup.js +138 -0
- package/dist/components/UI/controls/sw-ui-dropup.js.map +1 -0
- package/dist/components/UI/controls/sw-ui-split-button.d.ts +44 -0
- package/dist/components/UI/controls/sw-ui-split-button.d.ts.map +1 -0
- package/dist/components/UI/controls/sw-ui-split-button.js +178 -0
- package/dist/components/UI/controls/sw-ui-split-button.js.map +1 -0
- package/dist/components/UI/host-reset.d.ts +16 -0
- package/dist/components/UI/host-reset.d.ts.map +1 -0
- package/dist/components/UI/host-reset.js +20 -0
- package/dist/components/UI/host-reset.js.map +1 -0
- package/dist/components/UI/icons/backspace.svg.js +10 -0
- package/dist/components/UI/icons/backspace.svg.js.map +1 -0
- package/dist/components/UI/icons/camera-off.svg.js +8 -0
- package/dist/components/UI/icons/camera-off.svg.js.map +1 -0
- package/dist/components/UI/icons/camera-on.svg.js +8 -0
- package/dist/components/UI/icons/camera-on.svg.js.map +1 -0
- package/dist/components/UI/icons/check-circle.svg.js +6 -0
- package/dist/components/UI/icons/check-circle.svg.js.map +1 -0
- package/dist/components/UI/icons/chevron-up.svg.js +8 -0
- package/dist/components/UI/icons/chevron-up.svg.js.map +1 -0
- package/dist/components/UI/icons/close.svg.js +6 -0
- package/dist/components/UI/icons/close.svg.js.map +1 -0
- package/dist/components/UI/icons/copy.svg.js +6 -0
- package/dist/components/UI/icons/copy.svg.js.map +1 -0
- package/dist/components/UI/icons/download.svg.js +6 -0
- package/dist/components/UI/icons/download.svg.js.map +1 -0
- package/dist/components/UI/icons/fullscreen-exit.svg.js +8 -0
- package/dist/components/UI/icons/fullscreen-exit.svg.js.map +1 -0
- package/dist/components/UI/icons/fullscreen.svg.js +8 -0
- package/dist/components/UI/icons/fullscreen.svg.js.map +1 -0
- package/dist/components/UI/icons/hand-raise.svg.js +6 -0
- package/dist/components/UI/icons/hand-raise.svg.js.map +1 -0
- package/dist/components/UI/icons/icons.d.ts +31 -0
- package/dist/components/UI/icons/icons.d.ts.map +1 -0
- package/dist/components/UI/icons/icons.js +60 -0
- package/dist/components/UI/icons/icons.js.map +1 -0
- package/dist/components/UI/icons/index.d.ts +4 -0
- package/dist/components/UI/icons/index.d.ts.map +1 -0
- package/dist/components/UI/icons/info-circle.svg.js +6 -0
- package/dist/components/UI/icons/info-circle.svg.js.map +1 -0
- package/dist/components/UI/icons/mic-off.svg.js +8 -0
- package/dist/components/UI/icons/mic-off.svg.js.map +1 -0
- package/dist/components/UI/icons/mic-on.svg.js +8 -0
- package/dist/components/UI/icons/mic-on.svg.js.map +1 -0
- package/dist/components/UI/icons/person.svg.js +8 -0
- package/dist/components/UI/icons/person.svg.js.map +1 -0
- package/dist/components/UI/icons/phone-call.svg.js +8 -0
- package/dist/components/UI/icons/phone-call.svg.js.map +1 -0
- package/dist/components/UI/icons/phone-end.svg.js +8 -0
- package/dist/components/UI/icons/phone-end.svg.js.map +1 -0
- package/dist/components/UI/icons/room.svg.js +8 -0
- package/dist/components/UI/icons/room.svg.js.map +1 -0
- package/dist/components/UI/icons/screen-share-off.svg.js +9 -0
- package/dist/components/UI/icons/screen-share-off.svg.js.map +1 -0
- package/dist/components/UI/icons/screen-share.svg.js +9 -0
- package/dist/components/UI/icons/screen-share.svg.js.map +1 -0
- package/dist/components/UI/icons/sendIcon.svg.js +9 -0
- package/dist/components/UI/icons/sendIcon.svg.js.map +1 -0
- package/dist/components/UI/icons/settings.svg.js +8 -0
- package/dist/components/UI/icons/settings.svg.js.map +1 -0
- package/dist/components/UI/icons/speaker-off.svg.js +8 -0
- package/dist/components/UI/icons/speaker-off.svg.js.map +1 -0
- package/dist/components/UI/icons/speaker-on.svg.js +8 -0
- package/dist/components/UI/icons/speaker-on.svg.js.map +1 -0
- package/dist/components/UI/icons/spinner.svg.js +9 -0
- package/dist/components/UI/icons/spinner.svg.js.map +1 -0
- package/dist/components/UI/icons/sw-logo.svg.js +11 -0
- package/dist/components/UI/icons/sw-logo.svg.js.map +1 -0
- package/dist/components/UI/icons/sw-ui-icon.d.ts +28 -0
- package/dist/components/UI/icons/sw-ui-icon.d.ts.map +1 -0
- package/dist/components/UI/icons/sw-ui-icon.js +47 -0
- package/dist/components/UI/icons/sw-ui-icon.js.map +1 -0
- package/dist/components/UI/icons/transcript.svg.js +10 -0
- package/dist/components/UI/icons/transcript.svg.js.map +1 -0
- package/dist/components/UI/index.d.ts +18 -0
- package/dist/components/UI/index.d.ts.map +1 -0
- package/dist/components/UI/layout/sw-ui-background.d.ts +33 -0
- package/dist/components/UI/layout/sw-ui-background.d.ts.map +1 -0
- package/dist/components/UI/layout/sw-ui-background.js +106 -0
- package/dist/components/UI/layout/sw-ui-background.js.map +1 -0
- package/dist/components/UI/layout/sw-ui-call-layout.d.ts +69 -0
- package/dist/components/UI/layout/sw-ui-call-layout.d.ts.map +1 -0
- package/dist/components/UI/layout/sw-ui-call-layout.js +278 -0
- package/dist/components/UI/layout/sw-ui-call-layout.js.map +1 -0
- package/dist/components/UI/layout/sw-ui-content-drawer.d.ts +50 -0
- package/dist/components/UI/layout/sw-ui-content-drawer.d.ts.map +1 -0
- package/dist/components/UI/layout/sw-ui-content-drawer.js +413 -0
- package/dist/components/UI/layout/sw-ui-content-drawer.js.map +1 -0
- package/dist/components/UI/layout/sw-ui-modal.d.ts +31 -0
- package/dist/components/UI/layout/sw-ui-modal.d.ts.map +1 -0
- package/dist/components/UI/layout/sw-ui-modal.js +150 -0
- package/dist/components/UI/layout/sw-ui-modal.js.map +1 -0
- package/dist/components/UI/layout/sw-ui-responsive-container.d.ts +15 -0
- package/dist/components/UI/layout/sw-ui-responsive-container.d.ts.map +1 -0
- package/dist/components/UI/layout/sw-ui-responsive-container.js +78 -0
- package/dist/components/UI/layout/sw-ui-responsive-container.js.map +1 -0
- package/dist/components/UI/sw-ui-alert.d.ts +37 -0
- package/dist/components/UI/sw-ui-alert.d.ts.map +1 -0
- package/dist/components/UI/sw-ui-alert.js +127 -0
- package/dist/components/UI/sw-ui-alert.js.map +1 -0
- package/dist/components/UI/sw-ui-transcript-view.d.ts +56 -0
- package/dist/components/UI/sw-ui-transcript-view.d.ts.map +1 -0
- package/dist/components/UI/sw-ui-transcript-view.js +342 -0
- package/dist/components/UI/sw-ui-transcript-view.js.map +1 -0
- package/dist/components/{audio-level.d.ts → sw-audio-level.d.ts} +39 -7
- package/dist/components/sw-audio-level.d.ts.map +1 -0
- package/dist/components/sw-audio-level.js +252 -0
- package/dist/components/sw-audio-level.js.map +1 -0
- package/dist/components/sw-call-controls.d.ts +58 -0
- package/dist/components/sw-call-controls.d.ts.map +1 -0
- package/dist/components/sw-call-controls.js +186 -0
- package/dist/components/sw-call-controls.js.map +1 -0
- package/dist/components/sw-call-dialpad.d.ts +52 -0
- package/dist/components/sw-call-dialpad.d.ts.map +1 -0
- package/dist/components/sw-call-dialpad.js +70 -0
- package/dist/components/sw-call-dialpad.js.map +1 -0
- package/dist/components/sw-call-media.d.ts +59 -0
- package/dist/components/sw-call-media.d.ts.map +1 -0
- package/dist/components/sw-call-media.js +178 -0
- package/dist/components/sw-call-media.js.map +1 -0
- package/dist/components/sw-call-provider.d.ts +41 -0
- package/dist/components/sw-call-provider.d.ts.map +1 -0
- package/dist/components/sw-call-provider.js +37 -0
- package/dist/components/sw-call-provider.js.map +1 -0
- package/dist/components/sw-call-status.d.ts +50 -0
- package/dist/components/sw-call-status.d.ts.map +1 -0
- package/dist/components/sw-call-status.js +204 -0
- package/dist/components/sw-call-status.js.map +1 -0
- package/dist/components/sw-call-widget/client-factory.d.ts +6 -0
- package/dist/components/sw-call-widget/client-factory.d.ts.map +1 -0
- package/dist/components/sw-call-widget/client-factory.js +25 -0
- package/dist/components/sw-call-widget/client-factory.js.map +1 -0
- package/dist/components/sw-call-widget/sw-call-widget.d.ts +110 -0
- package/dist/components/sw-call-widget/sw-call-widget.d.ts.map +1 -0
- package/dist/components/sw-call-widget/sw-call-widget.js +251 -0
- package/dist/components/sw-call-widget/sw-call-widget.js.map +1 -0
- package/dist/components/sw-call-widget/sw-call-widget.templates.d.ts +17 -0
- package/dist/components/sw-call-widget/sw-call-widget.templates.d.ts.map +1 -0
- package/dist/components/sw-call-widget/sw-call-widget.templates.js +80 -0
- package/dist/components/sw-call-widget/sw-call-widget.templates.js.map +1 -0
- package/dist/components/sw-click-to-call.d.ts +39 -0
- package/dist/components/sw-click-to-call.d.ts.map +1 -0
- package/dist/components/sw-click-to-call.js +88 -0
- package/dist/components/sw-click-to-call.js.map +1 -0
- package/dist/components/sw-device-selector/index.d.ts +2 -0
- package/dist/components/sw-device-selector/index.d.ts.map +1 -0
- package/dist/components/sw-device-selector/sw-device-selector.d.ts +69 -0
- package/dist/components/sw-device-selector/sw-device-selector.d.ts.map +1 -0
- package/dist/components/sw-device-selector/sw-device-selector.js +278 -0
- package/dist/components/sw-device-selector/sw-device-selector.js.map +1 -0
- package/dist/components/sw-device-selector/sw-device-selector.styles.d.ts +2 -0
- package/dist/components/sw-device-selector/sw-device-selector.styles.d.ts.map +1 -0
- package/dist/components/sw-device-selector/sw-device-selector.styles.js +238 -0
- package/dist/components/sw-device-selector/sw-device-selector.styles.js.map +1 -0
- package/dist/components/{directory.d.ts → sw-directory.d.ts} +14 -22
- package/dist/components/sw-directory.d.ts.map +1 -0
- package/dist/components/sw-directory.js +435 -0
- package/dist/components/sw-directory.js.map +1 -0
- package/dist/components/sw-local-camera.d.ts +53 -0
- package/dist/components/sw-local-camera.d.ts.map +1 -0
- package/dist/components/sw-local-camera.js +147 -0
- package/dist/components/sw-local-camera.js.map +1 -0
- package/dist/components/sw-participant-controls.d.ts +58 -0
- package/dist/components/sw-participant-controls.d.ts.map +1 -0
- package/dist/components/sw-participant-controls.js +306 -0
- package/dist/components/sw-participant-controls.js.map +1 -0
- package/dist/components/sw-participants.d.ts +55 -0
- package/dist/components/sw-participants.d.ts.map +1 -0
- package/dist/components/sw-participants.js +320 -0
- package/dist/components/sw-participants.js.map +1 -0
- package/dist/components/sw-self-media.d.ts +46 -0
- package/dist/components/sw-self-media.d.ts.map +1 -0
- package/dist/components/sw-self-media.js +106 -0
- package/dist/components/sw-self-media.js.map +1 -0
- package/dist/context/CallStateContextController.d.ts +31 -0
- package/dist/context/CallStateContextController.d.ts.map +1 -0
- package/dist/context/CallStateContextController.js +125 -0
- package/dist/context/CallStateContextController.js.map +1 -0
- package/dist/context/DevicesContextController.d.ts +38 -0
- package/dist/context/DevicesContextController.d.ts.map +1 -0
- package/dist/context/DevicesContextController.js +124 -0
- package/dist/context/DevicesContextController.js.map +1 -0
- package/dist/context/TranscriptController.d.ts +32 -0
- package/dist/context/TranscriptController.d.ts.map +1 -0
- package/dist/context/TranscriptController.js +113 -0
- package/dist/context/TranscriptController.js.map +1 -0
- package/dist/context/UserEventController.d.ts +26 -0
- package/dist/context/UserEventController.d.ts.map +1 -0
- package/dist/context/UserEventController.js +55 -0
- package/dist/context/UserEventController.js.map +1 -0
- package/dist/context/call-state-context.d.ts +75 -0
- package/dist/context/call-state-context.d.ts.map +1 -0
- package/dist/context/call-state-context.js +39 -0
- package/dist/context/call-state-context.js.map +1 -0
- package/dist/context/chat-state.d.ts +41 -0
- package/dist/context/chat-state.d.ts.map +1 -0
- package/dist/context/chat-state.js +61 -0
- package/dist/context/chat-state.js.map +1 -0
- package/dist/context/devices-context.d.ts +28 -0
- package/dist/context/devices-context.d.ts.map +1 -0
- package/dist/context/devices-context.js +6 -0
- package/dist/context/devices-context.js.map +1 -0
- package/dist/context/index.d.ts +9 -1
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/transcript-context.d.ts +9 -0
- package/dist/context/transcript-context.d.ts.map +1 -0
- package/dist/context/transcript-context.js +6 -0
- package/dist/context/transcript-context.js.map +1 -0
- package/dist/context/types.d.ts +9 -0
- package/dist/context/types.d.ts.map +1 -0
- package/dist/embed/signalwire-web-components-embed.iife.js +3238 -0
- package/dist/embed/signalwire-web-components-embed.iife.js.map +1 -0
- package/dist/embed/signalwire-web-components-embed.umd.cjs +3238 -0
- package/dist/embed/signalwire-web-components-embed.umd.cjs.map +1 -0
- package/dist/embed.d.ts +20 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/index.d.ts +18 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +84 -35
- package/dist/index.js.map +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.js +866 -0
- package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -0
- package/dist/node_modules/marked/lib/marked.esm.js +1475 -0
- package/dist/node_modules/marked/lib/marked.esm.js.map +1 -0
- package/dist/node_modules/prismjs/components/prism-bash.js +220 -0
- package/dist/node_modules/prismjs/components/prism-bash.js.map +1 -0
- package/dist/node_modules/prismjs/components/prism-css.js +56 -0
- package/dist/node_modules/prismjs/components/prism-css.js.map +1 -0
- package/dist/node_modules/prismjs/components/prism-javascript.js +138 -0
- package/dist/node_modules/prismjs/components/prism-javascript.js.map +1 -0
- package/dist/node_modules/prismjs/components/prism-json.js +26 -0
- package/dist/node_modules/prismjs/components/prism-json.js.map +1 -0
- package/dist/node_modules/prismjs/components/prism-markdown.js +301 -0
- package/dist/node_modules/prismjs/components/prism-markdown.js.map +1 -0
- package/dist/node_modules/prismjs/components/prism-python.js +69 -0
- package/dist/node_modules/prismjs/components/prism-python.js.map +1 -0
- package/dist/node_modules/prismjs/components/prism-sql.js +34 -0
- package/dist/node_modules/prismjs/components/prism-sql.js.map +1 -0
- package/dist/node_modules/prismjs/components/prism-typescript.js +53 -0
- package/dist/node_modules/prismjs/components/prism-typescript.js.map +1 -0
- package/dist/node_modules/prismjs/components/prism-yaml.js +67 -0
- package/dist/node_modules/prismjs/components/prism-yaml.js.map +1 -0
- package/dist/node_modules/prismjs/prism.js +1165 -0
- package/dist/node_modules/prismjs/prism.js.map +1 -0
- package/dist/react.d.ts +55 -26
- package/dist/theme.css +451 -0
- package/dist/theme.css.js +5 -0
- package/dist/theme.css.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/prism.d.ts +4 -0
- package/dist/utils/prism.d.ts.map +1 -0
- package/dist/utils/prism.js +34 -0
- package/dist/utils/prism.js.map +1 -0
- package/dist/utils/theme-loader.d.ts +11 -0
- package/dist/utils/theme-loader.d.ts.map +1 -0
- package/dist/utils/theme-loader.js +17 -0
- package/dist/utils/theme-loader.js.map +1 -0
- package/dist/utils/transcriptToMarkdown.d.ts +14 -0
- package/dist/utils/transcriptToMarkdown.d.ts.map +1 -0
- package/dist/utils/transcriptToMarkdown.js +59 -0
- package/dist/utils/transcriptToMarkdown.js.map +1 -0
- package/dist/utils/use-google-font.d.ts +18 -0
- package/dist/utils/use-google-font.d.ts.map +1 -0
- package/dist/utils/use-google-font.js +12 -0
- package/dist/utils/use-google-font.js.map +1 -0
- package/dist/utils/user-variables.d.ts +20 -0
- package/dist/utils/user-variables.d.ts.map +1 -0
- package/dist/utils/user-variables.js +37 -0
- package/dist/utils/user-variables.js.map +1 -0
- package/dist/utils/video.js +6 -21
- package/dist/utils/video.js.map +1 -1
- package/package.json +107 -43
- package/dist/components/audio-level.d.ts.map +0 -1
- package/dist/components/audio-level.js +0 -203
- package/dist/components/audio-level.js.map +0 -1
- package/dist/components/call-controls.d.ts +0 -183
- package/dist/components/call-controls.d.ts.map +0 -1
- package/dist/components/call-controls.js +0 -606
- package/dist/components/call-controls.js.map +0 -1
- package/dist/components/call-media.d.ts +0 -118
- package/dist/components/call-media.d.ts.map +0 -1
- package/dist/components/call-media.js +0 -219
- package/dist/components/call-media.js.map +0 -1
- package/dist/components/call-status.d.ts +0 -83
- package/dist/components/call-status.d.ts.map +0 -1
- package/dist/components/call-status.js +0 -255
- package/dist/components/call-status.js.map +0 -1
- package/dist/components/click-to-call.d.ts +0 -151
- package/dist/components/click-to-call.d.ts.map +0 -1
- package/dist/components/click-to-call.js +0 -428
- package/dist/components/click-to-call.js.map +0 -1
- package/dist/components/device-selector.d.ts +0 -238
- package/dist/components/device-selector.d.ts.map +0 -1
- package/dist/components/device-selector.js +0 -685
- package/dist/components/device-selector.js.map +0 -1
- package/dist/components/dialpad.d.ts +0 -74
- package/dist/components/dialpad.d.ts.map +0 -1
- package/dist/components/dialpad.js +0 -372
- package/dist/components/dialpad.js.map +0 -1
- package/dist/components/directory.d.ts.map +0 -1
- package/dist/components/directory.js +0 -503
- package/dist/components/directory.js.map +0 -1
- package/dist/components/example-button.d.ts +0 -21
- package/dist/components/example-button.d.ts.map +0 -1
- package/dist/components/example-button.js +0 -74
- package/dist/components/example-button.js.map +0 -1
- package/dist/components/participant-controls.d.ts +0 -123
- package/dist/components/participant-controls.d.ts.map +0 -1
- package/dist/components/participant-controls.js +0 -468
- package/dist/components/participant-controls.js.map +0 -1
- package/dist/components/participants.d.ts +0 -120
- package/dist/components/participants.d.ts.map +0 -1
- package/dist/components/participants.js +0 -394
- package/dist/components/participants.js.map +0 -1
- package/dist/components/self-media.d.ts +0 -78
- package/dist/components/self-media.d.ts.map +0 -1
- package/dist/components/self-media.js +0 -129
- package/dist/components/self-media.js.map +0 -1
- package/dist/constants.js +0 -5
- package/dist/constants.js.map +0 -1
- package/dist/context/call-context.d.ts +0 -13
- package/dist/context/call-context.d.ts.map +0 -1
- package/dist/context/call-context.js +0 -6
- package/dist/context/call-context.js.map +0 -1
- package/dist/types/index.js +0 -12
- package/dist/types/index.js.map +0 -1
- package/dist/utils/debounce.js +0 -13
- package/dist/utils/debounce.js.map +0 -1
|
@@ -0,0 +1,866 @@
|
|
|
1
|
+
/*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */
|
|
2
|
+
function Pe(o, i) {
|
|
3
|
+
(i == null || i > o.length) && (i = o.length);
|
|
4
|
+
for (var s = 0, c = Array(i); s < i; s++) c[s] = o[s];
|
|
5
|
+
return c;
|
|
6
|
+
}
|
|
7
|
+
function Dn(o) {
|
|
8
|
+
if (Array.isArray(o)) return o;
|
|
9
|
+
}
|
|
10
|
+
function Ln(o, i) {
|
|
11
|
+
var s = o == null ? null : typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
|
|
12
|
+
if (s != null) {
|
|
13
|
+
var c, f, m, R, ct = [], M = !0, ut = !1;
|
|
14
|
+
try {
|
|
15
|
+
if (m = (s = s.call(o)).next, i !== 0) for (; !(M = (c = m.call(s)).done) && (ct.push(c.value), ct.length !== i); M = !0) ;
|
|
16
|
+
} catch (Lt) {
|
|
17
|
+
ut = !0, f = Lt;
|
|
18
|
+
} finally {
|
|
19
|
+
try {
|
|
20
|
+
if (!M && s.return != null && (R = s.return(), Object(R) !== R)) return;
|
|
21
|
+
} finally {
|
|
22
|
+
if (ut) throw f;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return ct;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function wn() {
|
|
29
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
30
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
31
|
+
}
|
|
32
|
+
function Cn(o, i) {
|
|
33
|
+
return Dn(o) || Ln(o, i) || Mn(o, i) || wn();
|
|
34
|
+
}
|
|
35
|
+
function Mn(o, i) {
|
|
36
|
+
if (o) {
|
|
37
|
+
if (typeof o == "string") return Pe(o, i);
|
|
38
|
+
var s = {}.toString.call(o).slice(8, -1);
|
|
39
|
+
return s === "Object" && o.constructor && (s = o.constructor.name), s === "Map" || s === "Set" ? Array.from(o) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? Pe(o, i) : void 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const Ve = Object.entries, xe = Object.setPrototypeOf, Pn = Object.isFrozen, xn = Object.getPrototypeOf, kn = Object.getOwnPropertyDescriptor;
|
|
43
|
+
let b = Object.freeze, O = Object.seal, lt = Object.create, qe = typeof Reflect < "u" && Reflect, ne = qe.apply, oe = qe.construct;
|
|
44
|
+
b || (b = function(i) {
|
|
45
|
+
return i;
|
|
46
|
+
});
|
|
47
|
+
O || (O = function(i) {
|
|
48
|
+
return i;
|
|
49
|
+
});
|
|
50
|
+
ne || (ne = function(i, s) {
|
|
51
|
+
for (var c = arguments.length, f = new Array(c > 2 ? c - 2 : 0), m = 2; m < c; m++)
|
|
52
|
+
f[m - 2] = arguments[m];
|
|
53
|
+
return i.apply(s, f);
|
|
54
|
+
});
|
|
55
|
+
oe || (oe = function(i) {
|
|
56
|
+
for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), f = 1; f < s; f++)
|
|
57
|
+
c[f - 1] = arguments[f];
|
|
58
|
+
return new i(...c);
|
|
59
|
+
});
|
|
60
|
+
const at = A(Array.prototype.forEach), vn = A(Array.prototype.lastIndexOf), ke = A(Array.prototype.pop), st = A(Array.prototype.push), Un = A(Array.prototype.splice), $ = Array.isArray, _t = A(String.prototype.toLowerCase), Zt = A(String.prototype.toString), ve = A(String.prototype.match), Tt = A(String.prototype.replace), Ue = A(String.prototype.indexOf), Fn = A(String.prototype.trim), zn = A(Number.prototype.toString), Hn = A(Boolean.prototype.toString), Fe = typeof BigInt > "u" ? null : A(BigInt.prototype.toString), ze = typeof Symbol > "u" ? null : A(Symbol.prototype.toString), S = A(Object.prototype.hasOwnProperty), ht = A(Object.prototype.toString), y = A(RegExp.prototype.test), J = Gn(TypeError);
|
|
61
|
+
function A(o) {
|
|
62
|
+
return function(i) {
|
|
63
|
+
i instanceof RegExp && (i.lastIndex = 0);
|
|
64
|
+
for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), f = 1; f < s; f++)
|
|
65
|
+
c[f - 1] = arguments[f];
|
|
66
|
+
return ne(o, i, c);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function Gn(o) {
|
|
70
|
+
return function() {
|
|
71
|
+
for (var i = arguments.length, s = new Array(i), c = 0; c < i; c++)
|
|
72
|
+
s[c] = arguments[c];
|
|
73
|
+
return oe(o, s);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function p(o, i) {
|
|
77
|
+
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _t;
|
|
78
|
+
if (xe && xe(o, null), !$(i))
|
|
79
|
+
return o;
|
|
80
|
+
let c = i.length;
|
|
81
|
+
for (; c--; ) {
|
|
82
|
+
let f = i[c];
|
|
83
|
+
if (typeof f == "string") {
|
|
84
|
+
const m = s(f);
|
|
85
|
+
m !== f && (Pn(i) || (i[c] = m), f = m);
|
|
86
|
+
}
|
|
87
|
+
o[f] = !0;
|
|
88
|
+
}
|
|
89
|
+
return o;
|
|
90
|
+
}
|
|
91
|
+
function Bn(o) {
|
|
92
|
+
for (let i = 0; i < o.length; i++)
|
|
93
|
+
S(o, i) || (o[i] = null);
|
|
94
|
+
return o;
|
|
95
|
+
}
|
|
96
|
+
function L(o) {
|
|
97
|
+
const i = lt(null);
|
|
98
|
+
for (const c of Ve(o)) {
|
|
99
|
+
var s = Cn(c, 2);
|
|
100
|
+
const f = s[0], m = s[1];
|
|
101
|
+
S(o, f) && ($(m) ? i[f] = Bn(m) : m && typeof m == "object" && m.constructor === Object ? i[f] = L(m) : i[f] = m);
|
|
102
|
+
}
|
|
103
|
+
return i;
|
|
104
|
+
}
|
|
105
|
+
function Wn(o) {
|
|
106
|
+
switch (typeof o) {
|
|
107
|
+
case "string":
|
|
108
|
+
return o;
|
|
109
|
+
case "number":
|
|
110
|
+
return zn(o);
|
|
111
|
+
case "boolean":
|
|
112
|
+
return Hn(o);
|
|
113
|
+
case "bigint":
|
|
114
|
+
return Fe ? Fe(o) : "0";
|
|
115
|
+
case "symbol":
|
|
116
|
+
return ze ? ze(o) : "Symbol()";
|
|
117
|
+
case "undefined":
|
|
118
|
+
return ht(o);
|
|
119
|
+
case "function":
|
|
120
|
+
case "object": {
|
|
121
|
+
if (o === null)
|
|
122
|
+
return ht(o);
|
|
123
|
+
const i = o, s = H(i, "toString");
|
|
124
|
+
if (typeof s == "function") {
|
|
125
|
+
const c = s(i);
|
|
126
|
+
return typeof c == "string" ? c : ht(c);
|
|
127
|
+
}
|
|
128
|
+
return ht(o);
|
|
129
|
+
}
|
|
130
|
+
default:
|
|
131
|
+
return ht(o);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function H(o, i) {
|
|
135
|
+
for (; o !== null; ) {
|
|
136
|
+
const c = kn(o, i);
|
|
137
|
+
if (c) {
|
|
138
|
+
if (c.get)
|
|
139
|
+
return A(c.get);
|
|
140
|
+
if (typeof c.value == "function")
|
|
141
|
+
return A(c.value);
|
|
142
|
+
}
|
|
143
|
+
o = xn(o);
|
|
144
|
+
}
|
|
145
|
+
function s() {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
return s;
|
|
149
|
+
}
|
|
150
|
+
function Yn(o) {
|
|
151
|
+
try {
|
|
152
|
+
return y(o, ""), !0;
|
|
153
|
+
} catch {
|
|
154
|
+
return !1;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const He = b(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Jt = b(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Qt = b(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), jn = b(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), te = b(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), $n = b(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ge = b(["#text"]), Be = b(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), ee = b(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), We = b(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Dt = b(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Xn = O(/{{[\w\W]*|^[\w\W]*}}/g), Vn = O(/<%[\w\W]*|^[\w\W]*%>/g), qn = O(/\${[\w\W]*/g), Kn = O(/^data-[\-\w.\u00B7-\uFFFF]+$/), Zn = O(/^aria-[\-\w]+$/), Ye = O(
|
|
158
|
+
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
159
|
+
// eslint-disable-line no-useless-escape
|
|
160
|
+
), Jn = O(/^(?:\w+script|data):/i), Qn = O(
|
|
161
|
+
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
162
|
+
// eslint-disable-line no-control-regex
|
|
163
|
+
), to = O(/^html$/i), eo = O(/^[a-z][.\w]*(-[.\w]+)+$/i), je = O(/<[/\w!]/g), $e = O(/<[/\w]/g), no = O(/<\/no(script|embed|frames)/i), oo = O(/\/>/i), P = {
|
|
164
|
+
element: 1,
|
|
165
|
+
attribute: 2,
|
|
166
|
+
text: 3,
|
|
167
|
+
cdataSection: 4,
|
|
168
|
+
entityReference: 5,
|
|
169
|
+
// Deprecated
|
|
170
|
+
entityNode: 6,
|
|
171
|
+
// Deprecated
|
|
172
|
+
processingInstruction: 7,
|
|
173
|
+
comment: 8,
|
|
174
|
+
document: 9,
|
|
175
|
+
documentType: 10,
|
|
176
|
+
documentFragment: 11,
|
|
177
|
+
notation: 12
|
|
178
|
+
// Deprecated
|
|
179
|
+
}, ro = function() {
|
|
180
|
+
return typeof window > "u" ? null : window;
|
|
181
|
+
}, io = function(i, s) {
|
|
182
|
+
if (typeof i != "object" || typeof i.createPolicy != "function")
|
|
183
|
+
return null;
|
|
184
|
+
let c = null;
|
|
185
|
+
const f = "data-tt-policy-suffix";
|
|
186
|
+
s && s.hasAttribute(f) && (c = s.getAttribute(f));
|
|
187
|
+
const m = "dompurify" + (c ? "#" + c : "");
|
|
188
|
+
try {
|
|
189
|
+
return i.createPolicy(m, {
|
|
190
|
+
createHTML(R) {
|
|
191
|
+
return R;
|
|
192
|
+
},
|
|
193
|
+
createScriptURL(R) {
|
|
194
|
+
return R;
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
} catch {
|
|
198
|
+
return console.warn("TrustedTypes policy " + m + " could not be created."), null;
|
|
199
|
+
}
|
|
200
|
+
}, Xe = function() {
|
|
201
|
+
return {
|
|
202
|
+
afterSanitizeAttributes: [],
|
|
203
|
+
afterSanitizeElements: [],
|
|
204
|
+
afterSanitizeShadowDOM: [],
|
|
205
|
+
beforeSanitizeAttributes: [],
|
|
206
|
+
beforeSanitizeElements: [],
|
|
207
|
+
beforeSanitizeShadowDOM: [],
|
|
208
|
+
uponSanitizeAttribute: [],
|
|
209
|
+
uponSanitizeElement: [],
|
|
210
|
+
uponSanitizeShadowNode: []
|
|
211
|
+
};
|
|
212
|
+
}, j = function(i, s, c, f) {
|
|
213
|
+
return S(i, s) && $(i[s]) ? p(f.base ? L(f.base) : {}, i[s], f.transform) : c;
|
|
214
|
+
};
|
|
215
|
+
function Ke() {
|
|
216
|
+
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ro();
|
|
217
|
+
const i = (r) => Ke(r);
|
|
218
|
+
if (i.version = "3.4.12", i.removed = [], !o || !o.document || o.document.nodeType !== P.document || !o.Element)
|
|
219
|
+
return i.isSupported = !1, i;
|
|
220
|
+
let s = o.document;
|
|
221
|
+
const c = s, f = c.currentScript;
|
|
222
|
+
o.DocumentFragment;
|
|
223
|
+
const m = o.HTMLTemplateElement, R = o.Node, ct = o.Element, M = o.NodeFilter, ut = o.NamedNodeMap;
|
|
224
|
+
ut === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
|
|
225
|
+
const Lt = o.DOMParser, gt = o.trustedTypes, X = ct.prototype, Ze = H(X, "cloneNode"), wt = H(X, "remove"), Je = H(X, "nextSibling"), Q = H(X, "childNodes"), V = H(X, "parentNode"), re = H(X, "shadowRoot"), Ct = H(X, "attributes"), I = R && R.prototype ? H(R.prototype, "nodeType") : null, v = R && R.prototype ? H(R.prototype, "nodeName") : null;
|
|
226
|
+
if (typeof m == "function") {
|
|
227
|
+
const r = s.createElement("template");
|
|
228
|
+
r.content && r.content.ownerDocument && (s = r.content.ownerDocument);
|
|
229
|
+
}
|
|
230
|
+
let w, q = "", Mt, ie = !1, ft = 0;
|
|
231
|
+
const ae = function() {
|
|
232
|
+
if (ft > 0)
|
|
233
|
+
throw J('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
|
|
234
|
+
}, tt = function(t) {
|
|
235
|
+
ae(), ft++;
|
|
236
|
+
try {
|
|
237
|
+
return w.createHTML(t);
|
|
238
|
+
} finally {
|
|
239
|
+
ft--;
|
|
240
|
+
}
|
|
241
|
+
}, Qe = function(t) {
|
|
242
|
+
ae(), ft++;
|
|
243
|
+
try {
|
|
244
|
+
return w.createScriptURL(t);
|
|
245
|
+
} finally {
|
|
246
|
+
ft--;
|
|
247
|
+
}
|
|
248
|
+
}, tn = function() {
|
|
249
|
+
return ie || (Mt = io(gt, f), ie = !0), Mt;
|
|
250
|
+
}, Et = s, Pt = Et.implementation, se = Et.createNodeIterator, en = Et.createDocumentFragment, nn = Et.getElementsByTagName, on = c.importNode;
|
|
251
|
+
let T = Xe();
|
|
252
|
+
i.isSupported = typeof Ve == "function" && typeof V == "function" && Pt && Pt.createHTMLDocument !== void 0;
|
|
253
|
+
const rn = Xn, an = Vn, sn = qn, ln = Kn, cn = Zn, un = Jn, le = Qn, fn = eo;
|
|
254
|
+
let ce = Ye, h = null;
|
|
255
|
+
const ue = p({}, [...He, ...Jt, ...Qt, ...te, ...Ge]);
|
|
256
|
+
let _ = null;
|
|
257
|
+
const fe = p({}, [...Be, ...ee, ...We, ...Dt]);
|
|
258
|
+
let g = Object.seal(lt(null, {
|
|
259
|
+
tagNameCheck: {
|
|
260
|
+
writable: !0,
|
|
261
|
+
configurable: !1,
|
|
262
|
+
enumerable: !0,
|
|
263
|
+
value: null
|
|
264
|
+
},
|
|
265
|
+
attributeNameCheck: {
|
|
266
|
+
writable: !0,
|
|
267
|
+
configurable: !1,
|
|
268
|
+
enumerable: !0,
|
|
269
|
+
value: null
|
|
270
|
+
},
|
|
271
|
+
allowCustomizedBuiltInElements: {
|
|
272
|
+
writable: !0,
|
|
273
|
+
configurable: !1,
|
|
274
|
+
enumerable: !0,
|
|
275
|
+
value: !1
|
|
276
|
+
}
|
|
277
|
+
})), pt = null, pe = null;
|
|
278
|
+
const G = Object.seal(lt(null, {
|
|
279
|
+
tagCheck: {
|
|
280
|
+
writable: !0,
|
|
281
|
+
configurable: !1,
|
|
282
|
+
enumerable: !0,
|
|
283
|
+
value: null
|
|
284
|
+
},
|
|
285
|
+
attributeCheck: {
|
|
286
|
+
writable: !0,
|
|
287
|
+
configurable: !1,
|
|
288
|
+
enumerable: !0,
|
|
289
|
+
value: null
|
|
290
|
+
}
|
|
291
|
+
}));
|
|
292
|
+
let me = !0, xt = !0, de = !1, Te = !0, B = !1, W = !0, K = !1, kt = !1, vt = null, Ut = null, Ft = !1, et = !1, At = !1, yt = !1, he = !0, _e = !1;
|
|
293
|
+
const ge = "user-content-";
|
|
294
|
+
let zt = !0, Ht = !1, nt = {}, U = null;
|
|
295
|
+
const Gt = p({}, [
|
|
296
|
+
"annotation-xml",
|
|
297
|
+
"audio",
|
|
298
|
+
"colgroup",
|
|
299
|
+
"desc",
|
|
300
|
+
"foreignobject",
|
|
301
|
+
"head",
|
|
302
|
+
"iframe",
|
|
303
|
+
"math",
|
|
304
|
+
"mi",
|
|
305
|
+
"mn",
|
|
306
|
+
"mo",
|
|
307
|
+
"ms",
|
|
308
|
+
"mtext",
|
|
309
|
+
"noembed",
|
|
310
|
+
"noframes",
|
|
311
|
+
"noscript",
|
|
312
|
+
"plaintext",
|
|
313
|
+
"script",
|
|
314
|
+
// <selectedcontent> mirrors the selected <option>'s subtree, cloned by
|
|
315
|
+
// the UA (customizable <select>) — including any on* handlers — and the
|
|
316
|
+
// engine re-mirrors synchronously whenever a removal changes which
|
|
317
|
+
// option/selectedcontent is current, even inside DOMPurify's inert
|
|
318
|
+
// DOMParser document. Hoisting its children on removal re-inserts a fresh
|
|
319
|
+
// mirror target ahead of the walk, which the engine refills, looping
|
|
320
|
+
// forever (DoS) and amplifying output. Dropping its content on removal
|
|
321
|
+
// (rather than hoisting) breaks that cascade; the content is a duplicate
|
|
322
|
+
// of the option, which is sanitized on its own. See campaign-3 F1/F6.
|
|
323
|
+
"selectedcontent",
|
|
324
|
+
"style",
|
|
325
|
+
"svg",
|
|
326
|
+
"template",
|
|
327
|
+
"thead",
|
|
328
|
+
"title",
|
|
329
|
+
"video",
|
|
330
|
+
"xmp"
|
|
331
|
+
]);
|
|
332
|
+
let Ee = null;
|
|
333
|
+
const Ae = p({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
334
|
+
let Bt = null;
|
|
335
|
+
const ye = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), St = "http://www.w3.org/1998/Math/MathML", bt = "http://www.w3.org/2000/svg", F = "http://www.w3.org/1999/xhtml";
|
|
336
|
+
let ot = F, Wt = !1, Yt = null;
|
|
337
|
+
const pn = p({}, [St, bt, F], Zt), Se = b(["mi", "mo", "mn", "ms", "mtext"]);
|
|
338
|
+
let jt = p({}, Se);
|
|
339
|
+
const be = b(["annotation-xml"]);
|
|
340
|
+
let $t = p({}, be);
|
|
341
|
+
const mn = p({}, ["title", "style", "font", "a", "script"]);
|
|
342
|
+
let mt = null;
|
|
343
|
+
const dn = ["application/xhtml+xml", "text/html"], Tn = "text/html";
|
|
344
|
+
let d = null, rt = null;
|
|
345
|
+
const hn = s.createElement("form"), Oe = function(t) {
|
|
346
|
+
return t instanceof RegExp || t instanceof Function;
|
|
347
|
+
}, Xt = function() {
|
|
348
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
349
|
+
if (rt && rt === t)
|
|
350
|
+
return;
|
|
351
|
+
(!t || typeof t != "object") && (t = {}), t = L(t), mt = // eslint-disable-next-line unicorn/prefer-includes
|
|
352
|
+
dn.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Tn : t.PARSER_MEDIA_TYPE, d = mt === "application/xhtml+xml" ? Zt : _t, h = j(t, "ALLOWED_TAGS", ue, {
|
|
353
|
+
transform: d
|
|
354
|
+
}), _ = j(t, "ALLOWED_ATTR", fe, {
|
|
355
|
+
transform: d
|
|
356
|
+
}), Yt = j(t, "ALLOWED_NAMESPACES", pn, {
|
|
357
|
+
transform: Zt
|
|
358
|
+
}), Bt = j(t, "ADD_URI_SAFE_ATTR", ye, {
|
|
359
|
+
transform: d,
|
|
360
|
+
base: ye
|
|
361
|
+
}), Ee = j(t, "ADD_DATA_URI_TAGS", Ae, {
|
|
362
|
+
transform: d,
|
|
363
|
+
base: Ae
|
|
364
|
+
}), U = j(t, "FORBID_CONTENTS", Gt, {
|
|
365
|
+
transform: d
|
|
366
|
+
}), pt = j(t, "FORBID_TAGS", L({}), {
|
|
367
|
+
transform: d
|
|
368
|
+
}), pe = j(t, "FORBID_ATTR", L({}), {
|
|
369
|
+
transform: d
|
|
370
|
+
}), nt = S(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? L(t.USE_PROFILES) : t.USE_PROFILES : !1, me = t.ALLOW_ARIA_ATTR !== !1, xt = t.ALLOW_DATA_ATTR !== !1, de = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Te = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, B = t.SAFE_FOR_TEMPLATES || !1, W = t.SAFE_FOR_XML !== !1, K = t.WHOLE_DOCUMENT || !1, et = t.RETURN_DOM || !1, At = t.RETURN_DOM_FRAGMENT || !1, yt = t.RETURN_TRUSTED_TYPE || !1, Ft = t.FORCE_BODY || !1, he = t.SANITIZE_DOM !== !1, _e = t.SANITIZE_NAMED_PROPS || !1, zt = t.KEEP_CONTENT !== !1, Ht = t.IN_PLACE || !1, ce = Yn(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : Ye, ot = typeof t.NAMESPACE == "string" ? t.NAMESPACE : F, jt = S(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? L(t.MATHML_TEXT_INTEGRATION_POINTS) : p({}, Se), $t = S(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? L(t.HTML_INTEGRATION_POINTS) : p({}, be);
|
|
371
|
+
const e = S(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? L(t.CUSTOM_ELEMENT_HANDLING) : lt(null);
|
|
372
|
+
if (g = lt(null), S(e, "tagNameCheck") && Oe(e.tagNameCheck) && (g.tagNameCheck = e.tagNameCheck), S(e, "attributeNameCheck") && Oe(e.attributeNameCheck) && (g.attributeNameCheck = e.attributeNameCheck), S(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (g.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), O(g), B && (xt = !1), At && (et = !0), nt && (h = p({}, Ge), _ = lt(null), nt.html === !0 && (p(h, He), p(_, Be)), nt.svg === !0 && (p(h, Jt), p(_, ee), p(_, Dt)), nt.svgFilters === !0 && (p(h, Qt), p(_, ee), p(_, Dt)), nt.mathMl === !0 && (p(h, te), p(_, We), p(_, Dt))), G.tagCheck = null, G.attributeCheck = null, S(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? G.tagCheck = t.ADD_TAGS : $(t.ADD_TAGS) && (h === ue && (h = L(h)), p(h, t.ADD_TAGS, d))), S(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? G.attributeCheck = t.ADD_ATTR : $(t.ADD_ATTR) && (_ === fe && (_ = L(_)), p(_, t.ADD_ATTR, d))), S(t, "ADD_URI_SAFE_ATTR") && $(t.ADD_URI_SAFE_ATTR) && p(Bt, t.ADD_URI_SAFE_ATTR, d), S(t, "FORBID_CONTENTS") && $(t.FORBID_CONTENTS) && (U === Gt && (U = L(U)), p(U, t.FORBID_CONTENTS, d)), S(t, "ADD_FORBID_CONTENTS") && $(t.ADD_FORBID_CONTENTS) && (U === Gt && (U = L(U)), p(U, t.ADD_FORBID_CONTENTS, d)), zt && (h["#text"] = !0), K && p(h, ["html", "head", "body"]), h.table && (p(h, ["tbody"]), delete pt.tbody), t.TRUSTED_TYPES_POLICY) {
|
|
373
|
+
if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
374
|
+
throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
375
|
+
if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
376
|
+
throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
377
|
+
const n = w;
|
|
378
|
+
w = t.TRUSTED_TYPES_POLICY;
|
|
379
|
+
try {
|
|
380
|
+
q = tt("");
|
|
381
|
+
} catch (a) {
|
|
382
|
+
throw w = n, a;
|
|
383
|
+
}
|
|
384
|
+
} else t.TRUSTED_TYPES_POLICY === null ? (w = void 0, q = "") : (w === void 0 && (w = tn()), w && typeof q == "string" && (q = tt("")));
|
|
385
|
+
b && b(t), rt = t;
|
|
386
|
+
}, Re = p({}, [...Jt, ...Qt, ...jn]), Ne = p({}, [...te, ...$n]), _n = function(t, e, n) {
|
|
387
|
+
return e.namespaceURI === F ? t === "svg" : e.namespaceURI === St ? t === "svg" && (n === "annotation-xml" || jt[n]) : !!Re[t];
|
|
388
|
+
}, gn = function(t, e, n) {
|
|
389
|
+
return e.namespaceURI === F ? t === "math" : e.namespaceURI === bt ? t === "math" && $t[n] : !!Ne[t];
|
|
390
|
+
}, En = function(t, e, n) {
|
|
391
|
+
return e.namespaceURI === bt && !$t[n] || e.namespaceURI === St && !jt[n] ? !1 : !Ne[t] && (mn[t] || !Re[t]);
|
|
392
|
+
}, An = function(t) {
|
|
393
|
+
let e = V(t);
|
|
394
|
+
(!e || !e.tagName) && (e = {
|
|
395
|
+
namespaceURI: ot,
|
|
396
|
+
tagName: "template"
|
|
397
|
+
});
|
|
398
|
+
const n = _t(t.tagName), a = _t(e.tagName);
|
|
399
|
+
return Yt[t.namespaceURI] ? t.namespaceURI === bt ? _n(n, e, a) : t.namespaceURI === St ? gn(n, e, a) : t.namespaceURI === F ? En(n, e, a) : !!(mt === "application/xhtml+xml" && Yt[t.namespaceURI]) : !1;
|
|
400
|
+
}, Y = function(t) {
|
|
401
|
+
st(i.removed, {
|
|
402
|
+
element: t
|
|
403
|
+
});
|
|
404
|
+
try {
|
|
405
|
+
V(t).removeChild(t);
|
|
406
|
+
} catch {
|
|
407
|
+
if (wt(t), !V(t))
|
|
408
|
+
throw J("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
409
|
+
}
|
|
410
|
+
}, Ot = function(t) {
|
|
411
|
+
Vt(t);
|
|
412
|
+
const e = Q(t);
|
|
413
|
+
if (e) {
|
|
414
|
+
const a = [];
|
|
415
|
+
at(e, (l) => {
|
|
416
|
+
st(a, l);
|
|
417
|
+
}), at(a, (l) => {
|
|
418
|
+
try {
|
|
419
|
+
wt(l);
|
|
420
|
+
} catch {
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
const n = Ct(t);
|
|
425
|
+
if (n)
|
|
426
|
+
for (let a = n.length - 1; a >= 0; --a) {
|
|
427
|
+
const l = n[a], u = l && l.name;
|
|
428
|
+
if (typeof u == "string")
|
|
429
|
+
try {
|
|
430
|
+
t.removeAttribute(u);
|
|
431
|
+
} catch {
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}, Z = function(t, e) {
|
|
435
|
+
try {
|
|
436
|
+
st(i.removed, {
|
|
437
|
+
attribute: e.getAttributeNode(t),
|
|
438
|
+
from: e
|
|
439
|
+
});
|
|
440
|
+
} catch {
|
|
441
|
+
st(i.removed, {
|
|
442
|
+
attribute: null,
|
|
443
|
+
from: e
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
if (e.removeAttribute(t), t === "is")
|
|
447
|
+
if (et || At)
|
|
448
|
+
try {
|
|
449
|
+
Y(e);
|
|
450
|
+
} catch {
|
|
451
|
+
}
|
|
452
|
+
else
|
|
453
|
+
try {
|
|
454
|
+
e.setAttribute(t, "");
|
|
455
|
+
} catch {
|
|
456
|
+
}
|
|
457
|
+
}, yn = function(t) {
|
|
458
|
+
const e = Ct(t);
|
|
459
|
+
if (e)
|
|
460
|
+
for (let n = e.length - 1; n >= 0; --n) {
|
|
461
|
+
const a = e[n], l = a && a.name;
|
|
462
|
+
if (!(typeof l != "string" || _[d(l)]))
|
|
463
|
+
try {
|
|
464
|
+
t.removeAttribute(l);
|
|
465
|
+
} catch {
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}, Vt = function(t) {
|
|
469
|
+
const e = [t];
|
|
470
|
+
for (; e.length > 0; ) {
|
|
471
|
+
const n = e.pop();
|
|
472
|
+
(I ? I(n) : n.nodeType) === P.element && yn(n);
|
|
473
|
+
const l = Q(n);
|
|
474
|
+
if (l)
|
|
475
|
+
for (let u = l.length - 1; u >= 0; --u)
|
|
476
|
+
e.push(l[u]);
|
|
477
|
+
}
|
|
478
|
+
}, Sn = function(t) {
|
|
479
|
+
if (!W)
|
|
480
|
+
return;
|
|
481
|
+
const e = [t];
|
|
482
|
+
for (; e.length > 0; ) {
|
|
483
|
+
const n = e.pop(), a = I ? I(n) : n.nodeType;
|
|
484
|
+
if (a === P.processingInstruction || a === P.comment && y($e, n.data)) {
|
|
485
|
+
try {
|
|
486
|
+
wt(n);
|
|
487
|
+
} catch {
|
|
488
|
+
}
|
|
489
|
+
continue;
|
|
490
|
+
}
|
|
491
|
+
if (a === P.element) {
|
|
492
|
+
const u = n, E = d(v ? v(n) : n.nodeName);
|
|
493
|
+
try {
|
|
494
|
+
u.hasAttribute && u.hasAttribute("patchsrc") && u.removeAttribute("patchsrc"), u.hasAttribute && u.hasAttribute("for") && E !== "label" && E !== "output" && u.removeAttribute("for");
|
|
495
|
+
} catch {
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
const l = Q(n);
|
|
499
|
+
if (l)
|
|
500
|
+
for (let u = l.length - 1; u >= 0; --u)
|
|
501
|
+
e.push(l[u]);
|
|
502
|
+
}
|
|
503
|
+
}, Ie = function(t) {
|
|
504
|
+
let e = null, n = null;
|
|
505
|
+
if (Ft)
|
|
506
|
+
t = "<remove></remove>" + t;
|
|
507
|
+
else {
|
|
508
|
+
const u = ve(t, /^[\r\n\t ]+/);
|
|
509
|
+
n = u && u[0];
|
|
510
|
+
}
|
|
511
|
+
mt === "application/xhtml+xml" && ot === F && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
|
|
512
|
+
const a = w ? tt(t) : t;
|
|
513
|
+
if (ot === F)
|
|
514
|
+
try {
|
|
515
|
+
e = new Lt().parseFromString(a, mt);
|
|
516
|
+
} catch {
|
|
517
|
+
}
|
|
518
|
+
if (!e || !e.documentElement) {
|
|
519
|
+
e = Pt.createDocument(ot, "template", null);
|
|
520
|
+
try {
|
|
521
|
+
e.documentElement.innerHTML = Wt ? q : a;
|
|
522
|
+
} catch {
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
const l = e.body || e.documentElement;
|
|
526
|
+
return t && n && l.insertBefore(s.createTextNode(n), l.childNodes[0] || null), ot === F ? nn.call(e, K ? "html" : "body")[0] : K ? e.documentElement : l;
|
|
527
|
+
}, De = function(t) {
|
|
528
|
+
return se.call(
|
|
529
|
+
t.ownerDocument || t,
|
|
530
|
+
t,
|
|
531
|
+
// eslint-disable-next-line no-bitwise
|
|
532
|
+
M.SHOW_ELEMENT | M.SHOW_COMMENT | M.SHOW_TEXT | M.SHOW_PROCESSING_INSTRUCTION | M.SHOW_CDATA_SECTION,
|
|
533
|
+
null
|
|
534
|
+
);
|
|
535
|
+
}, Rt = function(t) {
|
|
536
|
+
return t = Tt(t, rn, " "), t = Tt(t, an, " "), t = Tt(t, sn, " "), t;
|
|
537
|
+
}, qt = function(t) {
|
|
538
|
+
var e;
|
|
539
|
+
t.normalize();
|
|
540
|
+
const n = se.call(
|
|
541
|
+
t.ownerDocument || t,
|
|
542
|
+
t,
|
|
543
|
+
// eslint-disable-next-line no-bitwise
|
|
544
|
+
M.SHOW_TEXT | M.SHOW_COMMENT | M.SHOW_CDATA_SECTION | M.SHOW_PROCESSING_INSTRUCTION,
|
|
545
|
+
null
|
|
546
|
+
);
|
|
547
|
+
let a = n.nextNode();
|
|
548
|
+
for (; a; )
|
|
549
|
+
a.data = Rt(a.data), a = n.nextNode();
|
|
550
|
+
const l = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
|
|
551
|
+
l && at(l, (u) => {
|
|
552
|
+
it(u.content) && qt(u.content);
|
|
553
|
+
});
|
|
554
|
+
}, Nt = function(t) {
|
|
555
|
+
const e = v ? v(t) : null;
|
|
556
|
+
return typeof e != "string" || d(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
|
|
557
|
+
// prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
|
|
558
|
+
// makes the direct read diverge from the cached read; a clean form
|
|
559
|
+
// (same-realm OR foreign-realm) has both reads pointing at the same
|
|
560
|
+
// canonical NamedNodeMap.
|
|
561
|
+
t.attributes !== Ct(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
|
|
562
|
+
// returns the integer 1 for any Element regardless of realm; direct
|
|
563
|
+
// read on a clobbered form (e.g. <input name="nodeType">) returns
|
|
564
|
+
// the named child element. Cheap addition — nodeType is read from
|
|
565
|
+
// an internal slot, no serialization cost — and removes a residual
|
|
566
|
+
// clobbering surface used by several mXSS / PI / comment branches
|
|
567
|
+
// in _sanitizeElements that compare currentNode.nodeType directly.
|
|
568
|
+
t.nodeType !== I(t) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
|
|
569
|
+
// "childNodes" shadows the prototype getter. Direct reads of
|
|
570
|
+
// form.childNodes from a clobbered form return the named child
|
|
571
|
+
// instead of the real NodeList, so any walk that reads it directly
|
|
572
|
+
// skips the form's real children. Compare the direct read to the
|
|
573
|
+
// cached Node.prototype getter — when the form's named-property
|
|
574
|
+
// getter intercepts the read, the two values differ and we flag
|
|
575
|
+
// the form. This catches every clobbering child type (input,
|
|
576
|
+
// select, etc.) regardless of whether the named child happens to
|
|
577
|
+
// carry a numeric .length, which a typeof-based probe would miss
|
|
578
|
+
// (e.g. HTMLSelectElement.length is a defined unsigned-long).
|
|
579
|
+
t.childNodes !== Q(t);
|
|
580
|
+
}, it = function(t) {
|
|
581
|
+
if (!I || typeof t != "object" || t === null)
|
|
582
|
+
return !1;
|
|
583
|
+
try {
|
|
584
|
+
return I(t) === P.documentFragment;
|
|
585
|
+
} catch {
|
|
586
|
+
return !1;
|
|
587
|
+
}
|
|
588
|
+
}, dt = function(t) {
|
|
589
|
+
if (!I || typeof t != "object" || t === null)
|
|
590
|
+
return !1;
|
|
591
|
+
try {
|
|
592
|
+
return typeof I(t) == "number";
|
|
593
|
+
} catch {
|
|
594
|
+
return !1;
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
function z(r, t, e) {
|
|
598
|
+
r.length !== 0 && at(r, (n) => {
|
|
599
|
+
n.call(i, t, e, rt);
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
const bn = function(t, e) {
|
|
603
|
+
return !!(W && t.hasChildNodes() && !dt(t.firstElementChild) && y(je, t.textContent) && y(je, t.innerHTML) || W && t.namespaceURI === F && e === "style" && dt(t.firstElementChild) || t.nodeType === P.processingInstruction || W && t.nodeType === P.comment && y($e, t.data));
|
|
604
|
+
}, On = function(t, e) {
|
|
605
|
+
if (!pt[e] && Ce(e) && (g.tagNameCheck instanceof RegExp && y(g.tagNameCheck, e) || g.tagNameCheck instanceof Function && g.tagNameCheck(e)))
|
|
606
|
+
return !1;
|
|
607
|
+
if (zt && !U[e]) {
|
|
608
|
+
const n = V(t), a = Q(t);
|
|
609
|
+
if (a && n) {
|
|
610
|
+
const l = a.length;
|
|
611
|
+
for (let u = l - 1; u >= 0; --u) {
|
|
612
|
+
const E = Ht ? a[u] : Ze(a[u], !0);
|
|
613
|
+
n.insertBefore(E, Je(t));
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
return Y(t), !0;
|
|
618
|
+
}, Le = function(t, e) {
|
|
619
|
+
if (z(T.beforeSanitizeElements, t, null), t !== e && V(t) === null)
|
|
620
|
+
return !0;
|
|
621
|
+
if (Nt(t))
|
|
622
|
+
return Y(t), !0;
|
|
623
|
+
const n = d(v ? v(t) : t.nodeName);
|
|
624
|
+
if (z(T.uponSanitizeElement, t, {
|
|
625
|
+
tagName: n,
|
|
626
|
+
allowedTags: h
|
|
627
|
+
}), t !== e && V(t) === null)
|
|
628
|
+
return !0;
|
|
629
|
+
if (bn(t, n))
|
|
630
|
+
return Y(t), !0;
|
|
631
|
+
if (pt[n] || !(G.tagCheck instanceof Function && G.tagCheck(n)) && !h[n]) {
|
|
632
|
+
const l = On(t, n);
|
|
633
|
+
return l === !1 && z(T.afterSanitizeElements, t, null), l;
|
|
634
|
+
}
|
|
635
|
+
if ((I ? I(t) : t.nodeType) === P.element && !An(t) || (n === "noscript" || n === "noembed" || n === "noframes") && y(no, t.innerHTML))
|
|
636
|
+
return Y(t), !0;
|
|
637
|
+
if (B && t.nodeType === P.text) {
|
|
638
|
+
const l = Rt(t.textContent);
|
|
639
|
+
t.textContent !== l && (st(i.removed, {
|
|
640
|
+
element: t.cloneNode()
|
|
641
|
+
}), t.textContent = l);
|
|
642
|
+
}
|
|
643
|
+
return z(T.afterSanitizeElements, t, null), !1;
|
|
644
|
+
}, we = function(t, e, n) {
|
|
645
|
+
if (pe[e] || W && e === "patchsrc" || W && e === "for" && t !== "label" && t !== "output" || he && (e === "id" || e === "name") && (n in s || n in hn))
|
|
646
|
+
return !1;
|
|
647
|
+
const a = _[e] || G.attributeCheck instanceof Function && G.attributeCheck(e, t);
|
|
648
|
+
if (!(xt && y(ln, e))) {
|
|
649
|
+
if (!(me && y(cn, e))) {
|
|
650
|
+
if (a) {
|
|
651
|
+
if (!Bt[e]) {
|
|
652
|
+
if (!y(ce, Tt(n, le, ""))) {
|
|
653
|
+
if (!((e === "src" || e === "xlink:href" || e === "href") && t !== "script" && Ue(n, "data:") === 0 && Ee[t])) {
|
|
654
|
+
if (!(de && !y(un, Tt(n, le, "")))) {
|
|
655
|
+
if (n)
|
|
656
|
+
return !1;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
} else if (
|
|
662
|
+
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
663
|
+
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
664
|
+
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
665
|
+
!(Ce(t) && (g.tagNameCheck instanceof RegExp && y(g.tagNameCheck, t) || g.tagNameCheck instanceof Function && g.tagNameCheck(t)) && (g.attributeNameCheck instanceof RegExp && y(g.attributeNameCheck, e) || g.attributeNameCheck instanceof Function && g.attributeNameCheck(e, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
666
|
+
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
667
|
+
e === "is" && g.allowCustomizedBuiltInElements && (g.tagNameCheck instanceof RegExp && y(g.tagNameCheck, n) || g.tagNameCheck instanceof Function && g.tagNameCheck(n)))
|
|
668
|
+
) return !1;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
return !0;
|
|
672
|
+
}, Rn = p({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), Ce = function(t) {
|
|
673
|
+
return !Rn[_t(t)] && y(fn, t);
|
|
674
|
+
}, Nn = function(t, e, n, a) {
|
|
675
|
+
if (w && typeof gt == "object" && typeof gt.getAttributeType == "function" && !n)
|
|
676
|
+
switch (gt.getAttributeType(t, e)) {
|
|
677
|
+
case "TrustedHTML":
|
|
678
|
+
return tt(a);
|
|
679
|
+
case "TrustedScriptURL":
|
|
680
|
+
return Qe(a);
|
|
681
|
+
}
|
|
682
|
+
return a;
|
|
683
|
+
}, In = function(t, e, n, a) {
|
|
684
|
+
try {
|
|
685
|
+
n ? t.setAttributeNS(n, e, a) : t.setAttribute(e, a), Nt(t) ? Y(t) : ke(i.removed);
|
|
686
|
+
} catch {
|
|
687
|
+
Z(e, t);
|
|
688
|
+
}
|
|
689
|
+
}, Me = function(t) {
|
|
690
|
+
z(T.beforeSanitizeAttributes, t, null);
|
|
691
|
+
const e = t.attributes;
|
|
692
|
+
if (!e || Nt(t))
|
|
693
|
+
return;
|
|
694
|
+
const n = {
|
|
695
|
+
attrName: "",
|
|
696
|
+
attrValue: "",
|
|
697
|
+
keepAttr: !0,
|
|
698
|
+
allowedAttributes: _,
|
|
699
|
+
forceKeepAttr: void 0
|
|
700
|
+
};
|
|
701
|
+
let a = e.length;
|
|
702
|
+
const l = d(t.nodeName);
|
|
703
|
+
for (; a--; ) {
|
|
704
|
+
const u = e[a], E = u.name, N = u.namespaceURI, x = u.value, C = d(E), k = x;
|
|
705
|
+
let D = E === "value" ? k : Fn(k);
|
|
706
|
+
if (n.attrName = C, n.attrValue = D, n.keepAttr = !0, n.forceKeepAttr = void 0, z(T.uponSanitizeAttribute, t, n), D = n.attrValue, _e && (C === "id" || C === "name") && Ue(D, ge) !== 0 && (Z(E, t), D = ge + D), W && y(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, D)) {
|
|
707
|
+
Z(E, t);
|
|
708
|
+
continue;
|
|
709
|
+
}
|
|
710
|
+
if (C === "attributename" && ve(D, "href")) {
|
|
711
|
+
Z(E, t);
|
|
712
|
+
continue;
|
|
713
|
+
}
|
|
714
|
+
if (!n.forceKeepAttr) {
|
|
715
|
+
if (!n.keepAttr) {
|
|
716
|
+
Z(E, t);
|
|
717
|
+
continue;
|
|
718
|
+
}
|
|
719
|
+
if (!Te && y(oo, D)) {
|
|
720
|
+
Z(E, t);
|
|
721
|
+
continue;
|
|
722
|
+
}
|
|
723
|
+
if (B && (D = Rt(D)), !we(l, C, D)) {
|
|
724
|
+
Z(E, t);
|
|
725
|
+
continue;
|
|
726
|
+
}
|
|
727
|
+
D = Nn(l, C, N, D), D !== k && In(t, E, N, D);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
z(T.afterSanitizeAttributes, t, null);
|
|
731
|
+
}, It = function(t) {
|
|
732
|
+
let e = null;
|
|
733
|
+
const n = De(t);
|
|
734
|
+
for (z(T.beforeSanitizeShadowDOM, t, null); e = n.nextNode(); )
|
|
735
|
+
if (z(T.uponSanitizeShadowNode, e, null), Le(e, t), Me(e), it(e.content) && It(e.content), (I ? I(e) : e.nodeType) === P.element) {
|
|
736
|
+
const l = re(e);
|
|
737
|
+
it(l) && (Kt(l), It(l));
|
|
738
|
+
}
|
|
739
|
+
z(T.afterSanitizeShadowDOM, t, null);
|
|
740
|
+
}, Kt = function(t) {
|
|
741
|
+
const e = [{
|
|
742
|
+
node: t,
|
|
743
|
+
shadow: null
|
|
744
|
+
}];
|
|
745
|
+
for (; e.length > 0; ) {
|
|
746
|
+
const n = e.pop();
|
|
747
|
+
if (n.shadow) {
|
|
748
|
+
It(n.shadow);
|
|
749
|
+
continue;
|
|
750
|
+
}
|
|
751
|
+
const a = n.node, u = (I ? I(a) : a.nodeType) === P.element, E = Q(a);
|
|
752
|
+
if (E)
|
|
753
|
+
for (let N = E.length - 1; N >= 0; --N)
|
|
754
|
+
e.push({
|
|
755
|
+
node: E[N],
|
|
756
|
+
shadow: null
|
|
757
|
+
});
|
|
758
|
+
if (u) {
|
|
759
|
+
const N = v ? v(a) : null;
|
|
760
|
+
if (typeof N == "string" && d(N) === "template") {
|
|
761
|
+
const x = a.content;
|
|
762
|
+
it(x) && e.push({
|
|
763
|
+
node: x,
|
|
764
|
+
shadow: null
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
if (u) {
|
|
769
|
+
const N = re(a);
|
|
770
|
+
it(N) && e.push({
|
|
771
|
+
node: null,
|
|
772
|
+
shadow: N
|
|
773
|
+
}, {
|
|
774
|
+
node: N,
|
|
775
|
+
shadow: null
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
};
|
|
780
|
+
return i.sanitize = function(r) {
|
|
781
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, n = null, a = null, l = null;
|
|
782
|
+
if (Wt = !r, Wt && (r = "<!-->"), typeof r != "string" && !dt(r) && (r = Wn(r), typeof r != "string"))
|
|
783
|
+
throw J("dirty is not a string, aborting");
|
|
784
|
+
if (!i.isSupported)
|
|
785
|
+
return r;
|
|
786
|
+
kt ? (h = vt, _ = Ut) : Xt(t), (T.uponSanitizeElement.length > 0 || T.uponSanitizeAttribute.length > 0) && (h = L(h)), T.uponSanitizeAttribute.length > 0 && (_ = L(_)), i.removed = [];
|
|
787
|
+
const u = Ht && typeof r != "string" && dt(r);
|
|
788
|
+
if (u) {
|
|
789
|
+
Sn(r);
|
|
790
|
+
const C = v ? v(r) : r.nodeName;
|
|
791
|
+
if (typeof C == "string") {
|
|
792
|
+
const k = d(C);
|
|
793
|
+
if (!h[k] || pt[k])
|
|
794
|
+
throw Ot(r), J("root node is forbidden and cannot be sanitized in-place");
|
|
795
|
+
}
|
|
796
|
+
if (Nt(r))
|
|
797
|
+
throw Ot(r), J("root node is clobbered and cannot be sanitized in-place");
|
|
798
|
+
try {
|
|
799
|
+
Kt(r);
|
|
800
|
+
} catch (k) {
|
|
801
|
+
throw Ot(r), k;
|
|
802
|
+
}
|
|
803
|
+
} else if (dt(r))
|
|
804
|
+
e = Ie("<!---->"), n = e.ownerDocument.importNode(r, !0), n.nodeType === P.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? e = n : e.appendChild(n), Kt(n);
|
|
805
|
+
else {
|
|
806
|
+
if (!et && !B && !K && // eslint-disable-next-line unicorn/prefer-includes
|
|
807
|
+
r.indexOf("<") === -1)
|
|
808
|
+
return w && yt ? tt(r) : r;
|
|
809
|
+
if (e = Ie(r), !e)
|
|
810
|
+
return et ? null : yt ? q : "";
|
|
811
|
+
}
|
|
812
|
+
e && Ft && Y(e.firstChild);
|
|
813
|
+
const E = u ? r : e, N = De(E);
|
|
814
|
+
try {
|
|
815
|
+
for (; a = N.nextNode(); )
|
|
816
|
+
Le(a, E), Me(a), it(a.content) && It(a.content);
|
|
817
|
+
} catch (C) {
|
|
818
|
+
throw u && (Ot(r), at(i.removed, (k) => {
|
|
819
|
+
k.element && Vt(k.element);
|
|
820
|
+
})), C;
|
|
821
|
+
}
|
|
822
|
+
if (u)
|
|
823
|
+
return at(i.removed, (C) => {
|
|
824
|
+
C.element && Vt(C.element);
|
|
825
|
+
}), B && qt(r), r;
|
|
826
|
+
if (et) {
|
|
827
|
+
if (B && qt(e), At)
|
|
828
|
+
for (l = en.call(e.ownerDocument); e.firstChild; )
|
|
829
|
+
l.appendChild(e.firstChild);
|
|
830
|
+
else
|
|
831
|
+
l = e;
|
|
832
|
+
return (_.shadowroot || _.shadowrootmode) && (l = on.call(c, l, !0)), l;
|
|
833
|
+
}
|
|
834
|
+
let x = K ? e.outerHTML : e.innerHTML;
|
|
835
|
+
return K && h["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && y(to, e.ownerDocument.doctype.name) && (x = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
|
|
836
|
+
` + x), B && (x = Rt(x)), w && yt ? tt(x) : x;
|
|
837
|
+
}, i.setConfig = function() {
|
|
838
|
+
let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
839
|
+
Xt(r), kt = !0, vt = h, Ut = _;
|
|
840
|
+
}, i.clearConfig = function() {
|
|
841
|
+
rt = null, kt = !1, vt = null, Ut = null, w = Mt, q = "";
|
|
842
|
+
}, i.isValidAttribute = function(r, t, e) {
|
|
843
|
+
rt || Xt({});
|
|
844
|
+
const n = d(r), a = d(t);
|
|
845
|
+
return we(n, a, e);
|
|
846
|
+
}, i.addHook = function(r, t) {
|
|
847
|
+
typeof t == "function" && S(T, r) && st(T[r], t);
|
|
848
|
+
}, i.removeHook = function(r, t) {
|
|
849
|
+
if (S(T, r)) {
|
|
850
|
+
if (t !== void 0) {
|
|
851
|
+
const e = vn(T[r], t);
|
|
852
|
+
return e === -1 ? void 0 : Un(T[r], e, 1)[0];
|
|
853
|
+
}
|
|
854
|
+
return ke(T[r]);
|
|
855
|
+
}
|
|
856
|
+
}, i.removeHooks = function(r) {
|
|
857
|
+
S(T, r) && (T[r] = []);
|
|
858
|
+
}, i.removeAllHooks = function() {
|
|
859
|
+
T = Xe();
|
|
860
|
+
}, i;
|
|
861
|
+
}
|
|
862
|
+
var ao = Ke();
|
|
863
|
+
export {
|
|
864
|
+
ao as default
|
|
865
|
+
};
|
|
866
|
+
//# sourceMappingURL=purify.es.js.map
|