@123usmanhaider321/ui 0.1.6 → 1.0.0
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 +416 -31
- package/dist/images/icon/1LINK.svg +50 -0
- package/dist/images/icon/CreditCard.svg +83 -0
- package/dist/images/icon/Easypaisa.png +0 -0
- package/dist/images/icon/MobileWallet.png +0 -0
- package/dist/images/icon/Raast-Logo.png +0 -0
- package/dist/images/icon/VISA.png +0 -0
- package/dist/images/icon/add-circle-1.svg +5 -0
- package/dist/images/icon/check-circle-broken.svg +3 -0
- package/dist/images/icon/close-circle.svg +5 -0
- package/dist/images/icon/jazzcash.png +0 -0
- package/dist/images/icon/loading_icon.json +3347 -0
- package/dist/images/icon/mastercard-logo.webp +0 -0
- package/dist/images/icon/paymo.jpeg +0 -0
- package/dist/images/icon/preview-svgrepo-com.svg +36 -0
- package/dist/images/icon/trash.svg +7 -0
- package/dist/images/icon/unionpay-logo.svg +9 -0
- package/dist/index-87FQZHOs.js +11119 -0
- package/dist/index-87FQZHOs.js.map +1 -0
- package/dist/index-Tl9g213f.js +60475 -0
- package/dist/index-Tl9g213f.js.map +1 -0
- package/dist/index.d.ts +1 -10
- package/dist/index.es-CpgTaa1Y.js +16734 -0
- package/dist/index.es-CpgTaa1Y.js.map +1 -0
- package/dist/index.js +40 -12
- package/dist/index.js.map +1 -1
- package/dist/loading_icon-n5H5dQBl.js +3375 -0
- package/dist/loading_icon-n5H5dQBl.js.map +1 -0
- package/dist/src/components/Alert/ErrorAlert.d.ts +6 -0
- package/dist/src/components/Alert/SuccessAlert.d.ts +6 -0
- package/dist/{components → src/components}/FormBuilder/DiscountInput.d.ts +3 -6
- package/dist/{components → src/components}/FormBuilder/FormBuilder.d.ts +2 -11
- package/dist/{components → src/components}/FormBuilder/QuestionCard.d.ts +0 -5
- package/dist/{components → src/components}/FormBuilder/QuestionEditor.d.ts +0 -5
- package/dist/{components → src/components}/FormBuilder/SortableQuestionList.d.ts +0 -5
- package/dist/src/components/FormBuilder/questionIcons.d.ts +5 -0
- package/dist/{components/EventAddForm → src/components/NewAddEvent}/AddEventLayout.d.ts +2 -1
- package/dist/{components/EventAddForm → src/components/NewAddEvent}/AddEventStepper.d.ts +2 -2
- package/dist/{components/EventAddForm → src/components/NewAddEvent}/common/ConfirmationModal.d.ts +1 -1
- package/dist/src/components/NewAddEvent/components/EventSubmissionConfirmationModal.d.ts +14 -0
- package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/StepTwo/TicketTierSection.d.ts +1 -1
- package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/TicketTierForm.d.ts +1 -1
- package/dist/{components/EventAddForm → src/components/NewAddEvent}/hooks/useStepperForm.d.ts +22 -22
- package/dist/{components/EventAddForm → src/components/NewAddEvent}/hooks/useTicketTierForm.d.ts +63 -15
- package/dist/src/components/NewAddEvent/schemas/step1.d.ts +211 -0
- package/dist/src/components/NewAddEvent/schemas/step2.d.ts +411 -0
- package/dist/{components/EventAddForm → src/components/NewAddEvent}/schemas/utils.d.ts +8 -2
- package/dist/{components/EventAddForm → src/components/NewAddEvent}/steps/IndividualFormStep.d.ts +1 -1
- package/dist/{components/EventAddForm → src/components/NewAddEvent}/steps/SocialProfilesStep.d.ts +1 -1
- package/dist/{components/EventAddForm → src/components/NewAddEvent}/steps/TeamFormStep.d.ts +1 -1
- package/dist/src/components/Spinner/spinner.d.ts +4 -0
- package/dist/src/components/TicketlyUIProvider.d.ts +35 -0
- package/dist/src/components/common/Loader/index.d.ts +8 -0
- package/dist/src/components/common/Modals/ConfirmationModal.d.ts +7 -0
- package/dist/{components/FormInput → src/components/ui}/FormInput.d.ts +1 -1
- package/dist/src/components/ui/Loader.d.ts +4 -0
- package/dist/{components/Button/Button.d.ts → src/components/ui/button.d.ts} +1 -1
- package/dist/src/index.d.ts +10 -0
- package/dist/{lib → src/lib}/actions.d.ts +0 -126
- package/dist/src/lib/dom-utils.d.ts +2 -0
- package/dist/src/lib/storage-utils.d.ts +5 -0
- package/dist/src/lib/types.d.ts +258 -0
- package/dist/src/redux/baseQuery.d.ts +16 -0
- package/dist/{services → src/redux/features}/eventApi.d.ts +1053 -1745
- package/dist/src/redux/features/globalSlice.d.ts +17 -0
- package/dist/{services → src/redux/features/single-event}/single-event-api.d.ts +856 -1190
- package/dist/src/redux/types.d.ts +2 -0
- package/dist/src/services/library-services.d.ts +15 -0
- package/dist/src/services/remote-config.d.ts +27 -0
- package/dist/{services → src/services}/utils.d.ts +1 -1
- package/dist/src/theme/colors.d.ts +127 -0
- package/dist/src/theme/typography.d.ts +13 -0
- package/dist/src/types/api.d.ts +18 -0
- package/dist/style.css +2984 -0
- package/dist/styles.css +3758 -3636
- package/package.json +78 -68
- package/dist/_virtual/_commonjsHelpers.js +0 -9
- package/dist/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/_virtual/customParseFormat.js +0 -5
- package/dist/_virtual/customParseFormat.js.map +0 -1
- package/dist/_virtual/dayjs.min.js +0 -5
- package/dist/_virtual/dayjs.min.js.map +0 -1
- package/dist/_virtual/duration.js +0 -5
- package/dist/_virtual/duration.js.map +0 -1
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/index.js.map +0 -1
- package/dist/_virtual/isBetween.js +0 -5
- package/dist/_virtual/isBetween.js.map +0 -1
- package/dist/_virtual/relativeTime.js +0 -5
- package/dist/_virtual/relativeTime.js.map +0 -1
- package/dist/_virtual/use-sync-external-store-shim.development.js +0 -5
- package/dist/_virtual/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/_virtual/use-sync-external-store-shim.production.js +0 -5
- package/dist/_virtual/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/_virtual/with-selector.development.js +0 -5
- package/dist/_virtual/with-selector.development.js.map +0 -1
- package/dist/_virtual/with-selector.js +0 -5
- package/dist/_virtual/with-selector.js.map +0 -1
- package/dist/_virtual/with-selector.production.js +0 -5
- package/dist/_virtual/with-selector.production.js.map +0 -1
- package/dist/components/Alert/Alert.js +0 -51
- package/dist/components/Alert/Alert.js.map +0 -1
- package/dist/components/Button/Button.js +0 -52
- package/dist/components/Button/Button.js.map +0 -1
- package/dist/components/Button/Button.test.d.ts +0 -1
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.js +0 -50
- package/dist/components/Checkbox/Checkbox.js.map +0 -1
- package/dist/components/Checkbox/Checkbox.test.d.ts +0 -1
- package/dist/components/Checkbox/index.d.ts +0 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +0 -25
- package/dist/components/CheckboxGroup/CheckboxGroup.js +0 -99
- package/dist/components/CheckboxGroup/CheckboxGroup.js.map +0 -1
- package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +0 -15
- package/dist/components/ConfirmationModal/ConfirmationModal.js +0 -136
- package/dist/components/ConfirmationModal/ConfirmationModal.js.map +0 -1
- package/dist/components/ConfirmationModal/index.d.ts +0 -2
- package/dist/components/CustomSelect/CustomSelect.js +0 -259
- package/dist/components/CustomSelect/CustomSelect.js.map +0 -1
- package/dist/components/EventAddForm/AddEventLayout.js +0 -227
- package/dist/components/EventAddForm/AddEventLayout.js.map +0 -1
- package/dist/components/EventAddForm/AddEventStepper.js +0 -719
- package/dist/components/EventAddForm/AddEventStepper.js.map +0 -1
- package/dist/components/EventAddForm/common/ConfirmationModal.js +0 -136
- package/dist/components/EventAddForm/common/ConfirmationModal.js.map +0 -1
- package/dist/components/EventAddForm/common/DescriptionModal.js +0 -70
- package/dist/components/EventAddForm/common/DescriptionModal.js.map +0 -1
- package/dist/components/EventAddForm/components/AnimatedBackground.d.ts +0 -8
- package/dist/components/EventAddForm/components/ApprovalConfirmationModal.d.ts +0 -7
- package/dist/components/EventAddForm/components/CheckboxGroup.js +0 -92
- package/dist/components/EventAddForm/components/CheckboxGroup.js.map +0 -1
- package/dist/components/EventAddForm/components/CustomMeetingForm.js +0 -237
- package/dist/components/EventAddForm/components/CustomMeetingForm.js.map +0 -1
- package/dist/components/EventAddForm/components/DateTimeField.js +0 -173
- package/dist/components/EventAddForm/components/DateTimeField.js.map +0 -1
- package/dist/components/EventAddForm/components/EventSubmissionConfirmationModal.d.ts +0 -33
- package/dist/components/EventAddForm/components/EventSubmissionConfirmationModal.js +0 -366
- package/dist/components/EventAddForm/components/EventSubmissionConfirmationModal.js.map +0 -1
- package/dist/components/EventAddForm/components/FileUpload.js +0 -412
- package/dist/components/EventAddForm/components/FileUpload.js.map +0 -1
- package/dist/components/EventAddForm/components/FormBuilderProceedModal.js +0 -197
- package/dist/components/EventAddForm/components/FormBuilderProceedModal.js.map +0 -1
- package/dist/components/EventAddForm/components/GoogleMapsAutocompleteInput.js +0 -1179
- package/dist/components/EventAddForm/components/GoogleMapsAutocompleteInput.js.map +0 -1
- package/dist/components/EventAddForm/components/InputField.d.ts +0 -15
- package/dist/components/EventAddForm/components/RadioGroupButton.d.ts +0 -14
- package/dist/components/EventAddForm/components/SelectField.d.ts +0 -19
- package/dist/components/EventAddForm/components/SingleDateTimeInput.js +0 -102
- package/dist/components/EventAddForm/components/SingleDateTimeInput.js.map +0 -1
- package/dist/components/EventAddForm/components/StepTwo/CustomFormSection.js +0 -277
- package/dist/components/EventAddForm/components/StepTwo/CustomFormSection.js.map +0 -1
- package/dist/components/EventAddForm/components/StepTwo/TicketTierSection.js +0 -148
- package/dist/components/EventAddForm/components/StepTwo/TicketTierSection.js.map +0 -1
- package/dist/components/EventAddForm/components/TicketTierForm.js +0 -418
- package/dist/components/EventAddForm/components/TicketTierForm.js.map +0 -1
- package/dist/components/EventAddForm/components/TicketTypeSelection.js +0 -93
- package/dist/components/EventAddForm/components/TicketTypeSelection.js.map +0 -1
- package/dist/components/EventAddForm/hooks/useStepperForm.js +0 -371
- package/dist/components/EventAddForm/hooks/useStepperForm.js.map +0 -1
- package/dist/components/EventAddForm/hooks/useTicketTierForm.js +0 -237
- package/dist/components/EventAddForm/hooks/useTicketTierForm.js.map +0 -1
- package/dist/components/EventAddForm/index.d.ts +0 -3
- package/dist/components/EventAddForm/index.js +0 -41
- package/dist/components/EventAddForm/index.js.map +0 -1
- package/dist/components/EventAddForm/schemas/index.d.ts +0 -2
- package/dist/components/EventAddForm/schemas/step1.d.ts +0 -47
- package/dist/components/EventAddForm/schemas/step1.js +0 -135
- package/dist/components/EventAddForm/schemas/step1.js.map +0 -1
- package/dist/components/EventAddForm/schemas/step2.d.ts +0 -138
- package/dist/components/EventAddForm/schemas/step2.js +0 -94
- package/dist/components/EventAddForm/schemas/step2.js.map +0 -1
- package/dist/components/EventAddForm/schemas/utils.js +0 -28
- package/dist/components/EventAddForm/schemas/utils.js.map +0 -1
- package/dist/components/EventAddForm/steps/IndividualFormStep.js +0 -85
- package/dist/components/EventAddForm/steps/IndividualFormStep.js.map +0 -1
- package/dist/components/EventAddForm/steps/SocialProfilesStep.js +0 -123
- package/dist/components/EventAddForm/steps/SocialProfilesStep.js.map +0 -1
- package/dist/components/EventAddForm/steps/StepOne.js +0 -462
- package/dist/components/EventAddForm/steps/StepOne.js.map +0 -1
- package/dist/components/EventAddForm/steps/StepTwo.js +0 -173
- package/dist/components/EventAddForm/steps/StepTwo.js.map +0 -1
- package/dist/components/EventAddForm/steps/TeamFormStep.js +0 -13
- package/dist/components/EventAddForm/steps/TeamFormStep.js.map +0 -1
- package/dist/components/FormBuilder/CategoryList.js +0 -242
- package/dist/components/FormBuilder/CategoryList.js.map +0 -1
- package/dist/components/FormBuilder/DiscountInput.js +0 -366
- package/dist/components/FormBuilder/DiscountInput.js.map +0 -1
- package/dist/components/FormBuilder/FormBuilder.js +0 -918
- package/dist/components/FormBuilder/FormBuilder.js.map +0 -1
- package/dist/components/FormBuilder/OptionList.js +0 -120
- package/dist/components/FormBuilder/OptionList.js.map +0 -1
- package/dist/components/FormBuilder/PaymentPreview.d.ts +0 -12
- package/dist/components/FormBuilder/PaymentPreview.js +0 -70
- package/dist/components/FormBuilder/PaymentPreview.js.map +0 -1
- package/dist/components/FormBuilder/PreviewInput.d.ts +0 -10
- package/dist/components/FormBuilder/PreviewInput.js +0 -143
- package/dist/components/FormBuilder/PreviewInput.js.map +0 -1
- package/dist/components/FormBuilder/QuestionCard.js +0 -252
- package/dist/components/FormBuilder/QuestionCard.js.map +0 -1
- package/dist/components/FormBuilder/QuestionEditor.js +0 -166
- package/dist/components/FormBuilder/QuestionEditor.js.map +0 -1
- package/dist/components/FormBuilder/RequiredToggle.js +0 -43
- package/dist/components/FormBuilder/RequiredToggle.js.map +0 -1
- package/dist/components/FormBuilder/SortableQuestionList.js +0 -137
- package/dist/components/FormBuilder/SortableQuestionList.js.map +0 -1
- package/dist/components/FormBuilder/index.d.ts +0 -4
- package/dist/components/FormBuilder/utils.js +0 -229
- package/dist/components/FormBuilder/utils.js.map +0 -1
- package/dist/components/FormInput/FormInput.js +0 -126
- package/dist/components/FormInput/FormInput.js.map +0 -1
- package/dist/components/FormInput/FormInput.test.d.ts +0 -1
- package/dist/components/FormInput/index.d.ts +0 -2
- package/dist/components/ImageCropModal/index.js +0 -464
- package/dist/components/ImageCropModal/index.js.map +0 -1
- package/dist/components/InformationPopover/InformationPopover.d.ts +0 -7
- package/dist/components/InformationPopover/InformationPopover.js +0 -19
- package/dist/components/InformationPopover/InformationPopover.js.map +0 -1
- package/dist/components/InformationPopover.js +0 -19
- package/dist/components/InformationPopover.js.map +0 -1
- package/dist/components/InputErrorMessage/InputErrorMessage.js +0 -21
- package/dist/components/InputErrorMessage/InputErrorMessage.js.map +0 -1
- package/dist/components/Modal/Modal.d.ts +0 -15
- package/dist/components/Modal/Modal.js +0 -73
- package/dist/components/Modal/Modal.js.map +0 -1
- package/dist/components/Radio/Radio.js +0 -35
- package/dist/components/Radio/Radio.js.map +0 -1
- package/dist/components/Spinner/spinner.d.ts +0 -2
- package/dist/components/Spinner/spinner.js +0 -22
- package/dist/components/Spinner/spinner.js.map +0 -1
- package/dist/components/Toggle/Toggle.d.ts +0 -16
- package/dist/components/Toggle/index.d.ts +0 -2
- package/dist/components/Tooltip/Tooltip.d.ts +0 -12
- package/dist/components/Tooltip/Tooltip.js +0 -134
- package/dist/components/Tooltip/Tooltip.js.map +0 -1
- package/dist/components/common/FallbackImage.js +0 -47
- package/dist/components/common/FallbackImage.js.map +0 -1
- package/dist/components/ui/Calendar/calendar-utils.js +0 -51
- package/dist/components/ui/Calendar/calendar-utils.js.map +0 -1
- package/dist/components/ui/Calendar/index.js +0 -142
- package/dist/components/ui/Calendar/index.js.map +0 -1
- package/dist/components/ui/Checkbox.d.ts +0 -9
- package/dist/components/ui/Checkbox.js +0 -50
- package/dist/components/ui/Checkbox.js.map +0 -1
- package/dist/components/ui/DatePicker/index.js +0 -188
- package/dist/components/ui/DatePicker/index.js.map +0 -1
- package/dist/components/ui/FormInput.js +0 -129
- package/dist/components/ui/FormInput.js.map +0 -1
- package/dist/components/ui/InputErrorMessage.d.ts +0 -7
- package/dist/components/ui/InputErrorMessage.js +0 -21
- package/dist/components/ui/InputErrorMessage.js.map +0 -1
- package/dist/components/ui/Modal/index.js +0 -73
- package/dist/components/ui/Modal/index.js.map +0 -1
- package/dist/components/ui/Radio.d.ts +0 -6
- package/dist/components/ui/Radio.js +0 -35
- package/dist/components/ui/Radio.js.map +0 -1
- package/dist/components/ui/RichTextEditor.js +0 -242
- package/dist/components/ui/RichTextEditor.js.map +0 -1
- package/dist/components/ui/TimePicker/index.js +0 -215
- package/dist/components/ui/TimePicker/index.js.map +0 -1
- package/dist/components/ui/TimeSelector/index.js +0 -138
- package/dist/components/ui/TimeSelector/index.js.map +0 -1
- package/dist/components/ui/Tooltip.d.ts +0 -12
- package/dist/components/ui/Tooltip.js +0 -136
- package/dist/components/ui/Tooltip.js.map +0 -1
- package/dist/hooks/useDropdownPosition.d.ts +0 -11
- package/dist/hooks/useFirebaseAuthState.d.ts +0 -6
- package/dist/hooks/useFirebaseAuthState.js +0 -23
- package/dist/hooks/useFirebaseAuthState.js.map +0 -1
- package/dist/hooks/useTicketTierForm.d.ts +0 -61
- package/dist/lib/actions.js +0 -32
- package/dist/lib/actions.js.map +0 -1
- package/dist/lib/cropImage.js +0 -113
- package/dist/lib/cropImage.js.map +0 -1
- package/dist/lib/imageAnalysis.js +0 -58
- package/dist/lib/imageAnalysis.js.map +0 -1
- package/dist/lib/utils.js +0 -9
- package/dist/lib/utils.js.map +0 -1
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +0 -60
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js.map +0 -1
- package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +0 -3458
- package/dist/node_modules/@dnd-kit/core/dist/core.esm.js.map +0 -1
- package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +0 -593
- package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js.map +0 -1
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +0 -302
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js.map +0 -1
- package/dist/node_modules/@firebase/app/dist/esm/index.esm.js +0 -768
- package/dist/node_modules/@firebase/app/dist/esm/index.esm.js.map +0 -1
- package/dist/node_modules/@firebase/component/dist/esm/index.esm.js +0 -340
- package/dist/node_modules/@firebase/component/dist/esm/index.esm.js.map +0 -1
- package/dist/node_modules/@firebase/logger/dist/esm/index.esm.js +0 -123
- package/dist/node_modules/@firebase/logger/dist/esm/index.esm.js.map +0 -1
- package/dist/node_modules/@firebase/storage/dist/index.esm.js +0 -2623
- package/dist/node_modules/@firebase/storage/dist/index.esm.js.map +0 -1
- package/dist/node_modules/@firebase/util/dist/index.esm.js +0 -658
- package/dist/node_modules/@firebase/util/dist/index.esm.js.map +0 -1
- package/dist/node_modules/@firebase/util/dist/postinstall.js +0 -5
- package/dist/node_modules/@firebase/util/dist/postinstall.js.map +0 -1
- package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.js +0 -3179
- package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.js.map +0 -1
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/index.js +0 -60
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/index.js.map +0 -1
- package/dist/node_modules/@fortawesome/react-fontawesome/dist/index.js +0 -400
- package/dist/node_modules/@fortawesome/react-fontawesome/dist/index.js.map +0 -1
- package/dist/node_modules/@heroicons/react/20/solid/esm/CheckIcon.js +0 -27
- package/dist/node_modules/@heroicons/react/20/solid/esm/CheckIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/20/solid/esm/ChevronDownIcon.js +0 -27
- package/dist/node_modules/@heroicons/react/20/solid/esm/ChevronDownIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowRightIcon.js +0 -29
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowRightIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/ClockIcon.js +0 -29
- package/dist/node_modules/@heroicons/react/24/outline/esm/ClockIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentDuplicateIcon.js +0 -29
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentDuplicateIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/InformationCircleIcon.js +0 -29
- package/dist/node_modules/@heroicons/react/24/outline/esm/InformationCircleIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/LinkIcon.js +0 -29
- package/dist/node_modules/@heroicons/react/24/outline/esm/LinkIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/MagnifyingGlassIcon.js +0 -29
- package/dist/node_modules/@heroicons/react/24/outline/esm/MagnifyingGlassIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/MapPinIcon.js +0 -33
- package/dist/node_modules/@heroicons/react/24/outline/esm/MapPinIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/VideoCameraIcon.js +0 -29
- package/dist/node_modules/@heroicons/react/24/outline/esm/VideoCameraIcon.js.map +0 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/XMarkIcon.js +0 -29
- package/dist/node_modules/@heroicons/react/24/outline/esm/XMarkIcon.js.map +0 -1
- package/dist/node_modules/@tiptap/core/dist/index.js +0 -5446
- package/dist/node_modules/@tiptap/core/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -21
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -78
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +0 -100
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +0 -70
- package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +0 -317
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +0 -16
- package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -66
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +0 -86
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -80
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +0 -98
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +0 -423
- package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +0 -1039
- package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -61
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +0 -7
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +0 -79
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +0 -16
- package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js +0 -76
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extensions/dist/index.js +0 -376
- package/dist/node_modules/@tiptap/extensions/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/react/dist/index.js +0 -650
- package/dist/node_modules/@tiptap/react/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +0 -97
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +0 -1
- package/dist/node_modules/dayjs/dayjs.min.js +0 -283
- package/dist/node_modules/dayjs/dayjs.min.js.map +0 -1
- package/dist/node_modules/dayjs/plugin/customParseFormat.js +0 -130
- package/dist/node_modules/dayjs/plugin/customParseFormat.js.map +0 -1
- package/dist/node_modules/dayjs/plugin/duration.js +0 -137
- package/dist/node_modules/dayjs/plugin/duration.js.map +0 -1
- package/dist/node_modules/dayjs/plugin/isBetween.js +0 -20
- package/dist/node_modules/dayjs/plugin/isBetween.js.map +0 -1
- package/dist/node_modules/dayjs/plugin/relativeTime.js +0 -49
- package/dist/node_modules/dayjs/plugin/relativeTime.js.map +0 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +0 -442
- package/dist/node_modules/fast-equals/dist/es/index.js.map +0 -1
- package/dist/node_modules/idb/build/index.js +0 -70
- package/dist/node_modules/idb/build/index.js.map +0 -1
- package/dist/node_modules/idb/build/wrap-idb-value.js +0 -149
- package/dist/node_modules/idb/build/wrap-idb-value.js.map +0 -1
- package/dist/node_modules/linkifyjs/dist/linkify.js +0 -1159
- package/dist/node_modules/linkifyjs/dist/linkify.js.map +0 -1
- package/dist/node_modules/orderedmap/dist/index.js +0 -120
- package/dist/node_modules/orderedmap/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-commands/dist/index.js +0 -527
- package/dist/node_modules/prosemirror-commands/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +0 -137
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +0 -221
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-history/dist/index.js +0 -357
- package/dist/node_modules/prosemirror-history/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-keymap/dist/index.js +0 -84
- package/dist/node_modules/prosemirror-keymap/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-model/dist/index.js +0 -3209
- package/dist/node_modules/prosemirror-model/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +0 -131
- package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-state/dist/index.js +0 -936
- package/dist/node_modules/prosemirror-state/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-transform/dist/index.js +0 -1881
- package/dist/node_modules/prosemirror-transform/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-view/dist/index.js +0 -5232
- package/dist/node_modules/prosemirror-view/dist/index.js.map +0 -1
- package/dist/node_modules/rope-sequence/dist/index.js +0 -184
- package/dist/node_modules/rope-sequence/dist/index.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -82
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -78
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -78
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -63
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +0 -13
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js +0 -13
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
- package/dist/node_modules/w3c-keyname/index.js +0 -106
- package/dist/node_modules/w3c-keyname/index.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/coerce.js +0 -10
- package/dist/node_modules/zod/v4/classic/coerce.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/compat.js +0 -8
- package/dist/node_modules/zod/v4/classic/compat.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/errors.js +0 -45
- package/dist/node_modules/zod/v4/classic/errors.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/iso.js +0 -44
- package/dist/node_modules/zod/v4/classic/iso.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/parse.js +0 -30
- package/dist/node_modules/zod/v4/classic/parse.js.map +0 -1
- package/dist/node_modules/zod/v4/classic/schemas.js +0 -711
- package/dist/node_modules/zod/v4/classic/schemas.js.map +0 -1
- package/dist/node_modules/zod/v4/core/api.js +0 -588
- package/dist/node_modules/zod/v4/core/api.js.map +0 -1
- package/dist/node_modules/zod/v4/core/checks.js +0 -411
- package/dist/node_modules/zod/v4/core/checks.js.map +0 -1
- package/dist/node_modules/zod/v4/core/core.js +0 -75
- package/dist/node_modules/zod/v4/core/core.js.map +0 -1
- package/dist/node_modules/zod/v4/core/doc.js +0 -38
- package/dist/node_modules/zod/v4/core/doc.js.map +0 -1
- package/dist/node_modules/zod/v4/core/errors.js +0 -73
- package/dist/node_modules/zod/v4/core/errors.js.map +0 -1
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -359
- package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +0 -1
- package/dist/node_modules/zod/v4/core/parse.js +0 -96
- package/dist/node_modules/zod/v4/core/parse.js.map +0 -1
- package/dist/node_modules/zod/v4/core/regexes.js +0 -84
- package/dist/node_modules/zod/v4/core/regexes.js.map +0 -1
- package/dist/node_modules/zod/v4/core/registries.js +0 -52
- package/dist/node_modules/zod/v4/core/registries.js.map +0 -1
- package/dist/node_modules/zod/v4/core/schemas.js +0 -1391
- package/dist/node_modules/zod/v4/core/schemas.js.map +0 -1
- package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -363
- package/dist/node_modules/zod/v4/core/to-json-schema.js.map +0 -1
- package/dist/node_modules/zod/v4/core/util.js +0 -431
- package/dist/node_modules/zod/v4/core/util.js.map +0 -1
- package/dist/node_modules/zod/v4/core/versions.js +0 -9
- package/dist/node_modules/zod/v4/core/versions.js.map +0 -1
- package/dist/redux/baseQuery.d.ts +0 -1
- package/dist/redux/baseQuery.js +0 -24
- package/dist/redux/baseQuery.js.map +0 -1
- package/dist/services/eventApi.js +0 -411
- package/dist/services/eventApi.js.map +0 -1
- package/dist/services/helpers.js +0 -115
- package/dist/services/helpers.js.map +0 -1
- package/dist/services/initialize-firebase.d.ts +0 -2
- package/dist/services/initialize-firebase.js +0 -20
- package/dist/services/initialize-firebase.js.map +0 -1
- package/dist/services/process-image-on-server.js +0 -30
- package/dist/services/process-image-on-server.js.map +0 -1
- package/dist/services/remote-config.d.ts +0 -5
- package/dist/services/remote-config.js +0 -9
- package/dist/services/remote-config.js.map +0 -1
- package/dist/services/single-event-api.js +0 -301
- package/dist/services/single-event-api.js.map +0 -1
- package/dist/services/utils.js +0 -107
- package/dist/services/utils.js.map +0 -1
- package/dist/setupTests.d.ts +0 -1
- package/dist/stories/Alert.stories.d.ts +0 -10
- package/dist/stories/Button.stories.d.ts +0 -13
- package/dist/types/redux-types.d.ts +0 -15
- package/dist/types/types.d.ts +0 -60
- package/dist/types/types.js +0 -10
- package/dist/types/types.js.map +0 -1
- package/dist/utils/cn.d.ts +0 -6
- package/dist/utils/cn.js +0 -9
- package/dist/utils/cn.js.map +0 -1
- package/dist/utils/date-range.d.ts +0 -4
- package/dist/utils/date-range.js +0 -13
- package/dist/utils/date-range.js.map +0 -1
- package/dist/utils/single-event-helpers.d.ts +0 -50
- package/dist/utils/single-event-helpers.js +0 -18
- package/dist/utils/single-event-helpers.js.map +0 -1
- package/dist/utils/social-validation.js +0 -42
- package/dist/utils/social-validation.js.map +0 -1
- package/dist/utils/utils.js +0 -20
- package/dist/utils/utils.js.map +0 -1
- /package/dist/{components/Alert/Alert.d.ts → src/components/Alert/index.d.ts} +0 -0
- /package/dist/{components → src/components}/FormBuilder/CategoryList.d.ts +0 -0
- /package/dist/{components → src/components}/FormBuilder/OptionList.d.ts +0 -0
- /package/dist/{components → src/components}/FormBuilder/RequiredToggle.d.ts +0 -0
- /package/dist/{components → src/components}/FormBuilder/types.d.ts +0 -0
- /package/dist/{components → src/components}/FormBuilder/utils.d.ts +0 -0
- /package/dist/{components → src/components}/ImageCropModal/index.d.ts +0 -0
- /package/dist/{components → src/components}/InformationPopover.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/common/DescriptionModal.d.ts +0 -0
- /package/dist/{components/ui/FormInput.d.ts → src/components/NewAddEvent/components/AddEventFormInput.d.ts} +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/CheckboxGroup.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/CustomMeetingForm.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/DateTimeField.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/FileUpload.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/FormBuilderProceedModal.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/GoogleMapsAutocompleteInput.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/SingleDateTimeInput.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/StepTwo/CustomFormSection.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/components/TicketTypeSelection.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/steps/StepOne.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/steps/StepTwo.d.ts +0 -0
- /package/dist/{components/EventAddForm → src/components/NewAddEvent}/types.d.ts +0 -0
- /package/dist/{components → src/components}/common/FallbackImage.d.ts +0 -0
- /package/dist/{components → src/components}/ui/Calendar/calendar-utils.d.ts +0 -0
- /package/dist/{components → src/components}/ui/Calendar/index.d.ts +0 -0
- /package/dist/{components/Checkbox → src/components/ui}/Checkbox.d.ts +0 -0
- /package/dist/{components/CustomSelect → src/components/ui}/CustomSelect.d.ts +0 -0
- /package/dist/{components → src/components}/ui/DatePicker/index.d.ts +0 -0
- /package/dist/{components/InputErrorMessage → src/components/ui}/InputErrorMessage.d.ts +0 -0
- /package/dist/{components → src/components}/ui/Modal/index.d.ts +0 -0
- /package/dist/{components/Radio → src/components/ui}/Radio.d.ts +0 -0
- /package/dist/{components → src/components}/ui/RichTextEditor.d.ts +0 -0
- /package/dist/{components → src/components}/ui/TimePicker/index.d.ts +0 -0
- /package/dist/{components → src/components}/ui/TimeSelector/index.d.ts +0 -0
- /package/dist/{components → src/components}/ui/Tooltip/index.d.ts +0 -0
- /package/dist/{lib → src/lib}/constants.d.ts +0 -0
- /package/dist/{lib → src/lib}/cropImage.d.ts +0 -0
- /package/dist/{lib → src/lib}/imageAnalysis.d.ts +0 -0
- /package/dist/{utils → src/lib}/social-validation.d.ts +0 -0
- /package/dist/{lib/utils.d.ts → src/lib/tailwind-merge.d.ts} +0 -0
- /package/dist/{utils → src/lib}/utils.d.ts +0 -0
- /package/dist/{services → src/redux/features/single-event}/helpers.d.ts +0 -0
- /package/dist/{services → src/services}/process-image-on-server.d.ts +0 -0
- /package/dist/{types → src/types}/events.d.ts +0 -0
- /package/dist/{types → src/types}/question.d.ts +0 -0
|
@@ -1,1159 +0,0 @@
|
|
|
1
|
-
const encodedTlds = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";
|
|
2
|
-
const encodedUtlds = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2";
|
|
3
|
-
const numeric = "numeric";
|
|
4
|
-
const ascii = "ascii";
|
|
5
|
-
const alpha = "alpha";
|
|
6
|
-
const asciinumeric = "asciinumeric";
|
|
7
|
-
const alphanumeric = "alphanumeric";
|
|
8
|
-
const domain = "domain";
|
|
9
|
-
const emoji = "emoji";
|
|
10
|
-
const scheme = "scheme";
|
|
11
|
-
const slashscheme = "slashscheme";
|
|
12
|
-
const whitespace = "whitespace";
|
|
13
|
-
function registerGroup(name, groups) {
|
|
14
|
-
if (!(name in groups)) {
|
|
15
|
-
groups[name] = [];
|
|
16
|
-
}
|
|
17
|
-
return groups[name];
|
|
18
|
-
}
|
|
19
|
-
function addToGroups(t, flags, groups) {
|
|
20
|
-
if (flags[numeric]) {
|
|
21
|
-
flags[asciinumeric] = true;
|
|
22
|
-
flags[alphanumeric] = true;
|
|
23
|
-
}
|
|
24
|
-
if (flags[ascii]) {
|
|
25
|
-
flags[asciinumeric] = true;
|
|
26
|
-
flags[alpha] = true;
|
|
27
|
-
}
|
|
28
|
-
if (flags[asciinumeric]) {
|
|
29
|
-
flags[alphanumeric] = true;
|
|
30
|
-
}
|
|
31
|
-
if (flags[alpha]) {
|
|
32
|
-
flags[alphanumeric] = true;
|
|
33
|
-
}
|
|
34
|
-
if (flags[alphanumeric]) {
|
|
35
|
-
flags[domain] = true;
|
|
36
|
-
}
|
|
37
|
-
if (flags[emoji]) {
|
|
38
|
-
flags[domain] = true;
|
|
39
|
-
}
|
|
40
|
-
for (const k in flags) {
|
|
41
|
-
const group = registerGroup(k, groups);
|
|
42
|
-
if (group.indexOf(t) < 0) {
|
|
43
|
-
group.push(t);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function flagsForToken(t, groups) {
|
|
48
|
-
const result = {};
|
|
49
|
-
for (const c in groups) {
|
|
50
|
-
if (groups[c].indexOf(t) >= 0) {
|
|
51
|
-
result[c] = true;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return result;
|
|
55
|
-
}
|
|
56
|
-
function State(token = null) {
|
|
57
|
-
this.j = {};
|
|
58
|
-
this.jr = [];
|
|
59
|
-
this.jd = null;
|
|
60
|
-
this.t = token;
|
|
61
|
-
}
|
|
62
|
-
State.groups = {};
|
|
63
|
-
State.prototype = {
|
|
64
|
-
accepts() {
|
|
65
|
-
return !!this.t;
|
|
66
|
-
},
|
|
67
|
-
/**
|
|
68
|
-
* Follow an existing transition from the given input to the next state.
|
|
69
|
-
* Does not mutate.
|
|
70
|
-
* @param {string} input character or token type to transition on
|
|
71
|
-
* @returns {?State<T>} the next state, if any
|
|
72
|
-
*/
|
|
73
|
-
go(input) {
|
|
74
|
-
const state = this;
|
|
75
|
-
const nextState = state.j[input];
|
|
76
|
-
if (nextState) {
|
|
77
|
-
return nextState;
|
|
78
|
-
}
|
|
79
|
-
for (let i = 0; i < state.jr.length; i++) {
|
|
80
|
-
const regex = state.jr[i][0];
|
|
81
|
-
const nextState2 = state.jr[i][1];
|
|
82
|
-
if (nextState2 && regex.test(input)) {
|
|
83
|
-
return nextState2;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return state.jd;
|
|
87
|
-
},
|
|
88
|
-
/**
|
|
89
|
-
* Whether the state has a transition for the given input. Set the second
|
|
90
|
-
* argument to true to only look for an exact match (and not a default or
|
|
91
|
-
* regular-expression-based transition)
|
|
92
|
-
* @param {string} input
|
|
93
|
-
* @param {boolean} exactOnly
|
|
94
|
-
*/
|
|
95
|
-
has(input, exactOnly = false) {
|
|
96
|
-
return exactOnly ? input in this.j : !!this.go(input);
|
|
97
|
-
},
|
|
98
|
-
/**
|
|
99
|
-
* Short for "transition all"; create a transition from the array of items
|
|
100
|
-
* in the given list to the same final resulting state.
|
|
101
|
-
* @param {string | string[]} inputs Group of inputs to transition on
|
|
102
|
-
* @param {Transition<T> | State<T>} [next] Transition options
|
|
103
|
-
* @param {Flags} [flags] Collections flags to add token to
|
|
104
|
-
* @param {Collections<T>} [groups] Master list of token groups
|
|
105
|
-
*/
|
|
106
|
-
ta(inputs, next, flags, groups) {
|
|
107
|
-
for (let i = 0; i < inputs.length; i++) {
|
|
108
|
-
this.tt(inputs[i], next, flags, groups);
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
/**
|
|
112
|
-
* Short for "take regexp transition"; defines a transition for this state
|
|
113
|
-
* when it encounters a token which matches the given regular expression
|
|
114
|
-
* @param {RegExp} regexp Regular expression transition (populate first)
|
|
115
|
-
* @param {T | State<T>} [next] Transition options
|
|
116
|
-
* @param {Flags} [flags] Collections flags to add token to
|
|
117
|
-
* @param {Collections<T>} [groups] Master list of token groups
|
|
118
|
-
* @returns {State<T>} taken after the given input
|
|
119
|
-
*/
|
|
120
|
-
tr(regexp, next, flags, groups) {
|
|
121
|
-
groups = groups || State.groups;
|
|
122
|
-
let nextState;
|
|
123
|
-
if (next && next.j) {
|
|
124
|
-
nextState = next;
|
|
125
|
-
} else {
|
|
126
|
-
nextState = new State(next);
|
|
127
|
-
if (flags && groups) {
|
|
128
|
-
addToGroups(next, flags, groups);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
this.jr.push([regexp, nextState]);
|
|
132
|
-
return nextState;
|
|
133
|
-
},
|
|
134
|
-
/**
|
|
135
|
-
* Short for "take transitions", will take as many sequential transitions as
|
|
136
|
-
* the length of the given input and returns the
|
|
137
|
-
* resulting final state.
|
|
138
|
-
* @param {string | string[]} input
|
|
139
|
-
* @param {T | State<T>} [next] Transition options
|
|
140
|
-
* @param {Flags} [flags] Collections flags to add token to
|
|
141
|
-
* @param {Collections<T>} [groups] Master list of token groups
|
|
142
|
-
* @returns {State<T>} taken after the given input
|
|
143
|
-
*/
|
|
144
|
-
ts(input, next, flags, groups) {
|
|
145
|
-
let state = this;
|
|
146
|
-
const len = input.length;
|
|
147
|
-
if (!len) {
|
|
148
|
-
return state;
|
|
149
|
-
}
|
|
150
|
-
for (let i = 0; i < len - 1; i++) {
|
|
151
|
-
state = state.tt(input[i]);
|
|
152
|
-
}
|
|
153
|
-
return state.tt(input[len - 1], next, flags, groups);
|
|
154
|
-
},
|
|
155
|
-
/**
|
|
156
|
-
* Short for "take transition", this is a method for building/working with
|
|
157
|
-
* state machines.
|
|
158
|
-
*
|
|
159
|
-
* If a state already exists for the given input, returns it.
|
|
160
|
-
*
|
|
161
|
-
* If a token is specified, that state will emit that token when reached by
|
|
162
|
-
* the linkify engine.
|
|
163
|
-
*
|
|
164
|
-
* If no state exists, it will be initialized with some default transitions
|
|
165
|
-
* that resemble existing default transitions.
|
|
166
|
-
*
|
|
167
|
-
* If a state is given for the second argument, that state will be
|
|
168
|
-
* transitioned to on the given input regardless of what that input
|
|
169
|
-
* previously did.
|
|
170
|
-
*
|
|
171
|
-
* Specify a token group flags to define groups that this token belongs to.
|
|
172
|
-
* The token will be added to corresponding entires in the given groups
|
|
173
|
-
* object.
|
|
174
|
-
*
|
|
175
|
-
* @param {string} input character, token type to transition on
|
|
176
|
-
* @param {T | State<T>} [next] Transition options
|
|
177
|
-
* @param {Flags} [flags] Collections flags to add token to
|
|
178
|
-
* @param {Collections<T>} [groups] Master list of groups
|
|
179
|
-
* @returns {State<T>} taken after the given input
|
|
180
|
-
*/
|
|
181
|
-
tt(input, next, flags, groups) {
|
|
182
|
-
groups = groups || State.groups;
|
|
183
|
-
const state = this;
|
|
184
|
-
if (next && next.j) {
|
|
185
|
-
state.j[input] = next;
|
|
186
|
-
return next;
|
|
187
|
-
}
|
|
188
|
-
const t = next;
|
|
189
|
-
let nextState, templateState = state.go(input);
|
|
190
|
-
if (templateState) {
|
|
191
|
-
nextState = new State();
|
|
192
|
-
Object.assign(nextState.j, templateState.j);
|
|
193
|
-
nextState.jr.push.apply(nextState.jr, templateState.jr);
|
|
194
|
-
nextState.jd = templateState.jd;
|
|
195
|
-
nextState.t = templateState.t;
|
|
196
|
-
} else {
|
|
197
|
-
nextState = new State();
|
|
198
|
-
}
|
|
199
|
-
if (t) {
|
|
200
|
-
if (groups) {
|
|
201
|
-
if (nextState.t && typeof nextState.t === "string") {
|
|
202
|
-
const allFlags = Object.assign(flagsForToken(nextState.t, groups), flags);
|
|
203
|
-
addToGroups(t, allFlags, groups);
|
|
204
|
-
} else if (flags) {
|
|
205
|
-
addToGroups(t, flags, groups);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
nextState.t = t;
|
|
209
|
-
}
|
|
210
|
-
state.j[input] = nextState;
|
|
211
|
-
return nextState;
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
const ta = (state, input, next, flags, groups) => state.ta(input, next, flags, groups);
|
|
215
|
-
const tr = (state, regexp, next, flags, groups) => state.tr(regexp, next, flags, groups);
|
|
216
|
-
const ts = (state, input, next, flags, groups) => state.ts(input, next, flags, groups);
|
|
217
|
-
const tt = (state, input, next, flags, groups) => state.tt(input, next, flags, groups);
|
|
218
|
-
const WORD = "WORD";
|
|
219
|
-
const UWORD = "UWORD";
|
|
220
|
-
const ASCIINUMERICAL = "ASCIINUMERICAL";
|
|
221
|
-
const ALPHANUMERICAL = "ALPHANUMERICAL";
|
|
222
|
-
const LOCALHOST = "LOCALHOST";
|
|
223
|
-
const TLD = "TLD";
|
|
224
|
-
const UTLD = "UTLD";
|
|
225
|
-
const SCHEME = "SCHEME";
|
|
226
|
-
const SLASH_SCHEME = "SLASH_SCHEME";
|
|
227
|
-
const NUM = "NUM";
|
|
228
|
-
const WS = "WS";
|
|
229
|
-
const NL = "NL";
|
|
230
|
-
const OPENBRACE = "OPENBRACE";
|
|
231
|
-
const CLOSEBRACE = "CLOSEBRACE";
|
|
232
|
-
const OPENBRACKET = "OPENBRACKET";
|
|
233
|
-
const CLOSEBRACKET = "CLOSEBRACKET";
|
|
234
|
-
const OPENPAREN = "OPENPAREN";
|
|
235
|
-
const CLOSEPAREN = "CLOSEPAREN";
|
|
236
|
-
const OPENANGLEBRACKET = "OPENANGLEBRACKET";
|
|
237
|
-
const CLOSEANGLEBRACKET = "CLOSEANGLEBRACKET";
|
|
238
|
-
const FULLWIDTHLEFTPAREN = "FULLWIDTHLEFTPAREN";
|
|
239
|
-
const FULLWIDTHRIGHTPAREN = "FULLWIDTHRIGHTPAREN";
|
|
240
|
-
const LEFTCORNERBRACKET = "LEFTCORNERBRACKET";
|
|
241
|
-
const RIGHTCORNERBRACKET = "RIGHTCORNERBRACKET";
|
|
242
|
-
const LEFTWHITECORNERBRACKET = "LEFTWHITECORNERBRACKET";
|
|
243
|
-
const RIGHTWHITECORNERBRACKET = "RIGHTWHITECORNERBRACKET";
|
|
244
|
-
const FULLWIDTHLESSTHAN = "FULLWIDTHLESSTHAN";
|
|
245
|
-
const FULLWIDTHGREATERTHAN = "FULLWIDTHGREATERTHAN";
|
|
246
|
-
const AMPERSAND = "AMPERSAND";
|
|
247
|
-
const APOSTROPHE = "APOSTROPHE";
|
|
248
|
-
const ASTERISK = "ASTERISK";
|
|
249
|
-
const AT = "AT";
|
|
250
|
-
const BACKSLASH = "BACKSLASH";
|
|
251
|
-
const BACKTICK = "BACKTICK";
|
|
252
|
-
const CARET = "CARET";
|
|
253
|
-
const COLON = "COLON";
|
|
254
|
-
const COMMA = "COMMA";
|
|
255
|
-
const DOLLAR = "DOLLAR";
|
|
256
|
-
const DOT = "DOT";
|
|
257
|
-
const EQUALS = "EQUALS";
|
|
258
|
-
const EXCLAMATION = "EXCLAMATION";
|
|
259
|
-
const HYPHEN = "HYPHEN";
|
|
260
|
-
const PERCENT = "PERCENT";
|
|
261
|
-
const PIPE = "PIPE";
|
|
262
|
-
const PLUS = "PLUS";
|
|
263
|
-
const POUND = "POUND";
|
|
264
|
-
const QUERY = "QUERY";
|
|
265
|
-
const QUOTE = "QUOTE";
|
|
266
|
-
const FULLWIDTHMIDDLEDOT = "FULLWIDTHMIDDLEDOT";
|
|
267
|
-
const SEMI = "SEMI";
|
|
268
|
-
const SLASH = "SLASH";
|
|
269
|
-
const TILDE = "TILDE";
|
|
270
|
-
const UNDERSCORE = "UNDERSCORE";
|
|
271
|
-
const EMOJI$1 = "EMOJI";
|
|
272
|
-
const SYM = "SYM";
|
|
273
|
-
var tk = /* @__PURE__ */ Object.freeze({
|
|
274
|
-
__proto__: null,
|
|
275
|
-
ALPHANUMERICAL,
|
|
276
|
-
AMPERSAND,
|
|
277
|
-
APOSTROPHE,
|
|
278
|
-
ASCIINUMERICAL,
|
|
279
|
-
ASTERISK,
|
|
280
|
-
AT,
|
|
281
|
-
BACKSLASH,
|
|
282
|
-
BACKTICK,
|
|
283
|
-
CARET,
|
|
284
|
-
CLOSEANGLEBRACKET,
|
|
285
|
-
CLOSEBRACE,
|
|
286
|
-
CLOSEBRACKET,
|
|
287
|
-
CLOSEPAREN,
|
|
288
|
-
COLON,
|
|
289
|
-
COMMA,
|
|
290
|
-
DOLLAR,
|
|
291
|
-
DOT,
|
|
292
|
-
EMOJI: EMOJI$1,
|
|
293
|
-
EQUALS,
|
|
294
|
-
EXCLAMATION,
|
|
295
|
-
FULLWIDTHGREATERTHAN,
|
|
296
|
-
FULLWIDTHLEFTPAREN,
|
|
297
|
-
FULLWIDTHLESSTHAN,
|
|
298
|
-
FULLWIDTHMIDDLEDOT,
|
|
299
|
-
FULLWIDTHRIGHTPAREN,
|
|
300
|
-
HYPHEN,
|
|
301
|
-
LEFTCORNERBRACKET,
|
|
302
|
-
LEFTWHITECORNERBRACKET,
|
|
303
|
-
LOCALHOST,
|
|
304
|
-
NL,
|
|
305
|
-
NUM,
|
|
306
|
-
OPENANGLEBRACKET,
|
|
307
|
-
OPENBRACE,
|
|
308
|
-
OPENBRACKET,
|
|
309
|
-
OPENPAREN,
|
|
310
|
-
PERCENT,
|
|
311
|
-
PIPE,
|
|
312
|
-
PLUS,
|
|
313
|
-
POUND,
|
|
314
|
-
QUERY,
|
|
315
|
-
QUOTE,
|
|
316
|
-
RIGHTCORNERBRACKET,
|
|
317
|
-
RIGHTWHITECORNERBRACKET,
|
|
318
|
-
SCHEME,
|
|
319
|
-
SEMI,
|
|
320
|
-
SLASH,
|
|
321
|
-
SLASH_SCHEME,
|
|
322
|
-
SYM,
|
|
323
|
-
TILDE,
|
|
324
|
-
TLD,
|
|
325
|
-
UNDERSCORE,
|
|
326
|
-
UTLD,
|
|
327
|
-
UWORD,
|
|
328
|
-
WORD,
|
|
329
|
-
WS
|
|
330
|
-
});
|
|
331
|
-
const ASCII_LETTER = /[a-z]/;
|
|
332
|
-
const LETTER = new RegExp("\\p{L}", "u");
|
|
333
|
-
const EMOJI = new RegExp("\\p{Emoji}", "u");
|
|
334
|
-
const DIGIT = /\d/;
|
|
335
|
-
const SPACE = /\s/;
|
|
336
|
-
const CR = "\r";
|
|
337
|
-
const LF = "\n";
|
|
338
|
-
const EMOJI_VARIATION = "️";
|
|
339
|
-
const EMOJI_JOINER = "";
|
|
340
|
-
const OBJECT_REPLACEMENT = "";
|
|
341
|
-
let tlds = null, utlds = null;
|
|
342
|
-
function init$2(customSchemes = []) {
|
|
343
|
-
const groups = {};
|
|
344
|
-
State.groups = groups;
|
|
345
|
-
const Start = new State();
|
|
346
|
-
if (tlds == null) {
|
|
347
|
-
tlds = decodeTlds(encodedTlds);
|
|
348
|
-
}
|
|
349
|
-
if (utlds == null) {
|
|
350
|
-
utlds = decodeTlds(encodedUtlds);
|
|
351
|
-
}
|
|
352
|
-
tt(Start, "'", APOSTROPHE);
|
|
353
|
-
tt(Start, "{", OPENBRACE);
|
|
354
|
-
tt(Start, "}", CLOSEBRACE);
|
|
355
|
-
tt(Start, "[", OPENBRACKET);
|
|
356
|
-
tt(Start, "]", CLOSEBRACKET);
|
|
357
|
-
tt(Start, "(", OPENPAREN);
|
|
358
|
-
tt(Start, ")", CLOSEPAREN);
|
|
359
|
-
tt(Start, "<", OPENANGLEBRACKET);
|
|
360
|
-
tt(Start, ">", CLOSEANGLEBRACKET);
|
|
361
|
-
tt(Start, "(", FULLWIDTHLEFTPAREN);
|
|
362
|
-
tt(Start, ")", FULLWIDTHRIGHTPAREN);
|
|
363
|
-
tt(Start, "「", LEFTCORNERBRACKET);
|
|
364
|
-
tt(Start, "」", RIGHTCORNERBRACKET);
|
|
365
|
-
tt(Start, "『", LEFTWHITECORNERBRACKET);
|
|
366
|
-
tt(Start, "』", RIGHTWHITECORNERBRACKET);
|
|
367
|
-
tt(Start, "<", FULLWIDTHLESSTHAN);
|
|
368
|
-
tt(Start, ">", FULLWIDTHGREATERTHAN);
|
|
369
|
-
tt(Start, "&", AMPERSAND);
|
|
370
|
-
tt(Start, "*", ASTERISK);
|
|
371
|
-
tt(Start, "@", AT);
|
|
372
|
-
tt(Start, "`", BACKTICK);
|
|
373
|
-
tt(Start, "^", CARET);
|
|
374
|
-
tt(Start, ":", COLON);
|
|
375
|
-
tt(Start, ",", COMMA);
|
|
376
|
-
tt(Start, "$", DOLLAR);
|
|
377
|
-
tt(Start, ".", DOT);
|
|
378
|
-
tt(Start, "=", EQUALS);
|
|
379
|
-
tt(Start, "!", EXCLAMATION);
|
|
380
|
-
tt(Start, "-", HYPHEN);
|
|
381
|
-
tt(Start, "%", PERCENT);
|
|
382
|
-
tt(Start, "|", PIPE);
|
|
383
|
-
tt(Start, "+", PLUS);
|
|
384
|
-
tt(Start, "#", POUND);
|
|
385
|
-
tt(Start, "?", QUERY);
|
|
386
|
-
tt(Start, '"', QUOTE);
|
|
387
|
-
tt(Start, "/", SLASH);
|
|
388
|
-
tt(Start, ";", SEMI);
|
|
389
|
-
tt(Start, "~", TILDE);
|
|
390
|
-
tt(Start, "_", UNDERSCORE);
|
|
391
|
-
tt(Start, "\\", BACKSLASH);
|
|
392
|
-
tt(Start, "・", FULLWIDTHMIDDLEDOT);
|
|
393
|
-
const Num = tr(Start, DIGIT, NUM, {
|
|
394
|
-
[numeric]: true
|
|
395
|
-
});
|
|
396
|
-
tr(Num, DIGIT, Num);
|
|
397
|
-
const Asciinumeric = tr(Num, ASCII_LETTER, ASCIINUMERICAL, {
|
|
398
|
-
[asciinumeric]: true
|
|
399
|
-
});
|
|
400
|
-
const Alphanumeric = tr(Num, LETTER, ALPHANUMERICAL, {
|
|
401
|
-
[alphanumeric]: true
|
|
402
|
-
});
|
|
403
|
-
const Word = tr(Start, ASCII_LETTER, WORD, {
|
|
404
|
-
[ascii]: true
|
|
405
|
-
});
|
|
406
|
-
tr(Word, DIGIT, Asciinumeric);
|
|
407
|
-
tr(Word, ASCII_LETTER, Word);
|
|
408
|
-
tr(Asciinumeric, DIGIT, Asciinumeric);
|
|
409
|
-
tr(Asciinumeric, ASCII_LETTER, Asciinumeric);
|
|
410
|
-
const UWord = tr(Start, LETTER, UWORD, {
|
|
411
|
-
[alpha]: true
|
|
412
|
-
});
|
|
413
|
-
tr(UWord, ASCII_LETTER);
|
|
414
|
-
tr(UWord, DIGIT, Alphanumeric);
|
|
415
|
-
tr(UWord, LETTER, UWord);
|
|
416
|
-
tr(Alphanumeric, DIGIT, Alphanumeric);
|
|
417
|
-
tr(Alphanumeric, ASCII_LETTER);
|
|
418
|
-
tr(Alphanumeric, LETTER, Alphanumeric);
|
|
419
|
-
const Nl2 = tt(Start, LF, NL, {
|
|
420
|
-
[whitespace]: true
|
|
421
|
-
});
|
|
422
|
-
const Cr = tt(Start, CR, WS, {
|
|
423
|
-
[whitespace]: true
|
|
424
|
-
});
|
|
425
|
-
const Ws = tr(Start, SPACE, WS, {
|
|
426
|
-
[whitespace]: true
|
|
427
|
-
});
|
|
428
|
-
tt(Start, OBJECT_REPLACEMENT, Ws);
|
|
429
|
-
tt(Cr, LF, Nl2);
|
|
430
|
-
tt(Cr, OBJECT_REPLACEMENT, Ws);
|
|
431
|
-
tr(Cr, SPACE, Ws);
|
|
432
|
-
tt(Ws, CR);
|
|
433
|
-
tt(Ws, LF);
|
|
434
|
-
tr(Ws, SPACE, Ws);
|
|
435
|
-
tt(Ws, OBJECT_REPLACEMENT, Ws);
|
|
436
|
-
const Emoji = tr(Start, EMOJI, EMOJI$1, {
|
|
437
|
-
[emoji]: true
|
|
438
|
-
});
|
|
439
|
-
tt(Emoji, "#");
|
|
440
|
-
tr(Emoji, EMOJI, Emoji);
|
|
441
|
-
tt(Emoji, EMOJI_VARIATION, Emoji);
|
|
442
|
-
const EmojiJoiner = tt(Emoji, EMOJI_JOINER);
|
|
443
|
-
tt(EmojiJoiner, "#");
|
|
444
|
-
tr(EmojiJoiner, EMOJI, Emoji);
|
|
445
|
-
const wordjr = [[ASCII_LETTER, Word], [DIGIT, Asciinumeric]];
|
|
446
|
-
const uwordjr = [[ASCII_LETTER, null], [LETTER, UWord], [DIGIT, Alphanumeric]];
|
|
447
|
-
for (let i = 0; i < tlds.length; i++) {
|
|
448
|
-
fastts(Start, tlds[i], TLD, WORD, wordjr);
|
|
449
|
-
}
|
|
450
|
-
for (let i = 0; i < utlds.length; i++) {
|
|
451
|
-
fastts(Start, utlds[i], UTLD, UWORD, uwordjr);
|
|
452
|
-
}
|
|
453
|
-
addToGroups(TLD, {
|
|
454
|
-
tld: true,
|
|
455
|
-
ascii: true
|
|
456
|
-
}, groups);
|
|
457
|
-
addToGroups(UTLD, {
|
|
458
|
-
utld: true,
|
|
459
|
-
alpha: true
|
|
460
|
-
}, groups);
|
|
461
|
-
fastts(Start, "file", SCHEME, WORD, wordjr);
|
|
462
|
-
fastts(Start, "mailto", SCHEME, WORD, wordjr);
|
|
463
|
-
fastts(Start, "http", SLASH_SCHEME, WORD, wordjr);
|
|
464
|
-
fastts(Start, "https", SLASH_SCHEME, WORD, wordjr);
|
|
465
|
-
fastts(Start, "ftp", SLASH_SCHEME, WORD, wordjr);
|
|
466
|
-
fastts(Start, "ftps", SLASH_SCHEME, WORD, wordjr);
|
|
467
|
-
addToGroups(SCHEME, {
|
|
468
|
-
scheme: true,
|
|
469
|
-
ascii: true
|
|
470
|
-
}, groups);
|
|
471
|
-
addToGroups(SLASH_SCHEME, {
|
|
472
|
-
slashscheme: true,
|
|
473
|
-
ascii: true
|
|
474
|
-
}, groups);
|
|
475
|
-
customSchemes = customSchemes.sort((a, b) => a[0] > b[0] ? 1 : -1);
|
|
476
|
-
for (let i = 0; i < customSchemes.length; i++) {
|
|
477
|
-
const sch = customSchemes[i][0];
|
|
478
|
-
const optionalSlashSlash = customSchemes[i][1];
|
|
479
|
-
const flags = optionalSlashSlash ? {
|
|
480
|
-
[scheme]: true
|
|
481
|
-
} : {
|
|
482
|
-
[slashscheme]: true
|
|
483
|
-
};
|
|
484
|
-
if (sch.indexOf("-") >= 0) {
|
|
485
|
-
flags[domain] = true;
|
|
486
|
-
} else if (!ASCII_LETTER.test(sch)) {
|
|
487
|
-
flags[numeric] = true;
|
|
488
|
-
} else if (DIGIT.test(sch)) {
|
|
489
|
-
flags[asciinumeric] = true;
|
|
490
|
-
} else {
|
|
491
|
-
flags[ascii] = true;
|
|
492
|
-
}
|
|
493
|
-
ts(Start, sch, sch, flags);
|
|
494
|
-
}
|
|
495
|
-
ts(Start, "localhost", LOCALHOST, {
|
|
496
|
-
ascii: true
|
|
497
|
-
});
|
|
498
|
-
Start.jd = new State(SYM);
|
|
499
|
-
return {
|
|
500
|
-
start: Start,
|
|
501
|
-
tokens: Object.assign({
|
|
502
|
-
groups
|
|
503
|
-
}, tk)
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
function run$1(start, str) {
|
|
507
|
-
const iterable = stringToArray(str.replace(/[A-Z]/g, (c) => c.toLowerCase()));
|
|
508
|
-
const charCount = iterable.length;
|
|
509
|
-
const tokens = [];
|
|
510
|
-
let cursor = 0;
|
|
511
|
-
let charCursor = 0;
|
|
512
|
-
while (charCursor < charCount) {
|
|
513
|
-
let state = start;
|
|
514
|
-
let nextState = null;
|
|
515
|
-
let tokenLength = 0;
|
|
516
|
-
let latestAccepting = null;
|
|
517
|
-
let sinceAccepts = -1;
|
|
518
|
-
let charsSinceAccepts = -1;
|
|
519
|
-
while (charCursor < charCount && (nextState = state.go(iterable[charCursor]))) {
|
|
520
|
-
state = nextState;
|
|
521
|
-
if (state.accepts()) {
|
|
522
|
-
sinceAccepts = 0;
|
|
523
|
-
charsSinceAccepts = 0;
|
|
524
|
-
latestAccepting = state;
|
|
525
|
-
} else if (sinceAccepts >= 0) {
|
|
526
|
-
sinceAccepts += iterable[charCursor].length;
|
|
527
|
-
charsSinceAccepts++;
|
|
528
|
-
}
|
|
529
|
-
tokenLength += iterable[charCursor].length;
|
|
530
|
-
cursor += iterable[charCursor].length;
|
|
531
|
-
charCursor++;
|
|
532
|
-
}
|
|
533
|
-
cursor -= sinceAccepts;
|
|
534
|
-
charCursor -= charsSinceAccepts;
|
|
535
|
-
tokenLength -= sinceAccepts;
|
|
536
|
-
tokens.push({
|
|
537
|
-
t: latestAccepting.t,
|
|
538
|
-
// token type/name
|
|
539
|
-
v: str.slice(cursor - tokenLength, cursor),
|
|
540
|
-
// string value
|
|
541
|
-
s: cursor - tokenLength,
|
|
542
|
-
// start index
|
|
543
|
-
e: cursor
|
|
544
|
-
// end index (excluding)
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
return tokens;
|
|
548
|
-
}
|
|
549
|
-
function stringToArray(str) {
|
|
550
|
-
const result = [];
|
|
551
|
-
const len = str.length;
|
|
552
|
-
let index = 0;
|
|
553
|
-
while (index < len) {
|
|
554
|
-
let first = str.charCodeAt(index);
|
|
555
|
-
let second;
|
|
556
|
-
let char = first < 55296 || first > 56319 || index + 1 === len || (second = str.charCodeAt(index + 1)) < 56320 || second > 57343 ? str[index] : str.slice(index, index + 2);
|
|
557
|
-
result.push(char);
|
|
558
|
-
index += char.length;
|
|
559
|
-
}
|
|
560
|
-
return result;
|
|
561
|
-
}
|
|
562
|
-
function fastts(state, input, t, defaultt, jr) {
|
|
563
|
-
let next;
|
|
564
|
-
const len = input.length;
|
|
565
|
-
for (let i = 0; i < len - 1; i++) {
|
|
566
|
-
const char = input[i];
|
|
567
|
-
if (state.j[char]) {
|
|
568
|
-
next = state.j[char];
|
|
569
|
-
} else {
|
|
570
|
-
next = new State(defaultt);
|
|
571
|
-
next.jr = jr.slice();
|
|
572
|
-
state.j[char] = next;
|
|
573
|
-
}
|
|
574
|
-
state = next;
|
|
575
|
-
}
|
|
576
|
-
next = new State(t);
|
|
577
|
-
next.jr = jr.slice();
|
|
578
|
-
state.j[input[len - 1]] = next;
|
|
579
|
-
return next;
|
|
580
|
-
}
|
|
581
|
-
function decodeTlds(encoded) {
|
|
582
|
-
const words = [];
|
|
583
|
-
const stack = [];
|
|
584
|
-
let i = 0;
|
|
585
|
-
let digits = "0123456789";
|
|
586
|
-
while (i < encoded.length) {
|
|
587
|
-
let popDigitCount = 0;
|
|
588
|
-
while (digits.indexOf(encoded[i + popDigitCount]) >= 0) {
|
|
589
|
-
popDigitCount++;
|
|
590
|
-
}
|
|
591
|
-
if (popDigitCount > 0) {
|
|
592
|
-
words.push(stack.join(""));
|
|
593
|
-
for (let popCount = parseInt(encoded.substring(i, i + popDigitCount), 10); popCount > 0; popCount--) {
|
|
594
|
-
stack.pop();
|
|
595
|
-
}
|
|
596
|
-
i += popDigitCount;
|
|
597
|
-
} else {
|
|
598
|
-
stack.push(encoded[i]);
|
|
599
|
-
i++;
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
return words;
|
|
603
|
-
}
|
|
604
|
-
const defaults = {
|
|
605
|
-
defaultProtocol: "http",
|
|
606
|
-
events: null,
|
|
607
|
-
format: noop,
|
|
608
|
-
formatHref: noop,
|
|
609
|
-
nl2br: false,
|
|
610
|
-
tagName: "a",
|
|
611
|
-
target: null,
|
|
612
|
-
rel: null,
|
|
613
|
-
validate: true,
|
|
614
|
-
truncate: Infinity,
|
|
615
|
-
className: null,
|
|
616
|
-
attributes: null,
|
|
617
|
-
ignoreTags: [],
|
|
618
|
-
render: null
|
|
619
|
-
};
|
|
620
|
-
function Options(opts, defaultRender = null) {
|
|
621
|
-
let o = Object.assign({}, defaults);
|
|
622
|
-
if (opts) {
|
|
623
|
-
o = Object.assign(o, opts instanceof Options ? opts.o : opts);
|
|
624
|
-
}
|
|
625
|
-
const ignoredTags = o.ignoreTags;
|
|
626
|
-
const uppercaseIgnoredTags = [];
|
|
627
|
-
for (let i = 0; i < ignoredTags.length; i++) {
|
|
628
|
-
uppercaseIgnoredTags.push(ignoredTags[i].toUpperCase());
|
|
629
|
-
}
|
|
630
|
-
this.o = o;
|
|
631
|
-
if (defaultRender) {
|
|
632
|
-
this.defaultRender = defaultRender;
|
|
633
|
-
}
|
|
634
|
-
this.ignoreTags = uppercaseIgnoredTags;
|
|
635
|
-
}
|
|
636
|
-
Options.prototype = {
|
|
637
|
-
o: defaults,
|
|
638
|
-
/**
|
|
639
|
-
* @type string[]
|
|
640
|
-
*/
|
|
641
|
-
ignoreTags: [],
|
|
642
|
-
/**
|
|
643
|
-
* @param {IntermediateRepresentation} ir
|
|
644
|
-
* @returns {any}
|
|
645
|
-
*/
|
|
646
|
-
defaultRender(ir) {
|
|
647
|
-
return ir;
|
|
648
|
-
},
|
|
649
|
-
/**
|
|
650
|
-
* Returns true or false based on whether a token should be displayed as a
|
|
651
|
-
* link based on the user options.
|
|
652
|
-
* @param {MultiToken} token
|
|
653
|
-
* @returns {boolean}
|
|
654
|
-
*/
|
|
655
|
-
check(token) {
|
|
656
|
-
return this.get("validate", token.toString(), token);
|
|
657
|
-
},
|
|
658
|
-
// Private methods
|
|
659
|
-
/**
|
|
660
|
-
* Resolve an option's value based on the value of the option and the given
|
|
661
|
-
* params. If operator and token are specified and the target option is
|
|
662
|
-
* callable, automatically calls the function with the given argument.
|
|
663
|
-
* @template {keyof Opts} K
|
|
664
|
-
* @param {K} key Name of option to use
|
|
665
|
-
* @param {string} [operator] will be passed to the target option if it's a
|
|
666
|
-
* function. If not specified, RAW function value gets returned
|
|
667
|
-
* @param {MultiToken} [token] The token from linkify.tokenize
|
|
668
|
-
* @returns {Opts[K] | any}
|
|
669
|
-
*/
|
|
670
|
-
get(key, operator, token) {
|
|
671
|
-
const isCallable = operator != null;
|
|
672
|
-
let option = this.o[key];
|
|
673
|
-
if (!option) {
|
|
674
|
-
return option;
|
|
675
|
-
}
|
|
676
|
-
if (typeof option === "object") {
|
|
677
|
-
option = token.t in option ? option[token.t] : defaults[key];
|
|
678
|
-
if (typeof option === "function" && isCallable) {
|
|
679
|
-
option = option(operator, token);
|
|
680
|
-
}
|
|
681
|
-
} else if (typeof option === "function" && isCallable) {
|
|
682
|
-
option = option(operator, token.t, token);
|
|
683
|
-
}
|
|
684
|
-
return option;
|
|
685
|
-
},
|
|
686
|
-
/**
|
|
687
|
-
* @template {keyof Opts} L
|
|
688
|
-
* @param {L} key Name of options object to use
|
|
689
|
-
* @param {string} [operator]
|
|
690
|
-
* @param {MultiToken} [token]
|
|
691
|
-
* @returns {Opts[L] | any}
|
|
692
|
-
*/
|
|
693
|
-
getObj(key, operator, token) {
|
|
694
|
-
let obj = this.o[key];
|
|
695
|
-
if (typeof obj === "function" && operator != null) {
|
|
696
|
-
obj = obj(operator, token.t, token);
|
|
697
|
-
}
|
|
698
|
-
return obj;
|
|
699
|
-
},
|
|
700
|
-
/**
|
|
701
|
-
* Convert the given token to a rendered element that may be added to the
|
|
702
|
-
* calling-interface's DOM
|
|
703
|
-
* @param {MultiToken} token Token to render to an HTML element
|
|
704
|
-
* @returns {any} Render result; e.g., HTML string, DOM element, React
|
|
705
|
-
* Component, etc.
|
|
706
|
-
*/
|
|
707
|
-
render(token) {
|
|
708
|
-
const ir = token.render(this);
|
|
709
|
-
const renderFn = this.get("render", null, token) || this.defaultRender;
|
|
710
|
-
return renderFn(ir, token.t, token);
|
|
711
|
-
}
|
|
712
|
-
};
|
|
713
|
-
function noop(val) {
|
|
714
|
-
return val;
|
|
715
|
-
}
|
|
716
|
-
function MultiToken(value, tokens) {
|
|
717
|
-
this.t = "token";
|
|
718
|
-
this.v = value;
|
|
719
|
-
this.tk = tokens;
|
|
720
|
-
}
|
|
721
|
-
MultiToken.prototype = {
|
|
722
|
-
isLink: false,
|
|
723
|
-
/**
|
|
724
|
-
* Return the string this token represents.
|
|
725
|
-
* @return {string}
|
|
726
|
-
*/
|
|
727
|
-
toString() {
|
|
728
|
-
return this.v;
|
|
729
|
-
},
|
|
730
|
-
/**
|
|
731
|
-
* What should the value for this token be in the `href` HTML attribute?
|
|
732
|
-
* Returns the `.toString` value by default.
|
|
733
|
-
* @param {string} [scheme]
|
|
734
|
-
* @return {string}
|
|
735
|
-
*/
|
|
736
|
-
toHref(scheme2) {
|
|
737
|
-
return this.toString();
|
|
738
|
-
},
|
|
739
|
-
/**
|
|
740
|
-
* @param {Options} options Formatting options
|
|
741
|
-
* @returns {string}
|
|
742
|
-
*/
|
|
743
|
-
toFormattedString(options) {
|
|
744
|
-
const val = this.toString();
|
|
745
|
-
const truncate = options.get("truncate", val, this);
|
|
746
|
-
const formatted = options.get("format", val, this);
|
|
747
|
-
return truncate && formatted.length > truncate ? formatted.substring(0, truncate) + "…" : formatted;
|
|
748
|
-
},
|
|
749
|
-
/**
|
|
750
|
-
*
|
|
751
|
-
* @param {Options} options
|
|
752
|
-
* @returns {string}
|
|
753
|
-
*/
|
|
754
|
-
toFormattedHref(options) {
|
|
755
|
-
return options.get("formatHref", this.toHref(options.get("defaultProtocol")), this);
|
|
756
|
-
},
|
|
757
|
-
/**
|
|
758
|
-
* The start index of this token in the original input string
|
|
759
|
-
* @returns {number}
|
|
760
|
-
*/
|
|
761
|
-
startIndex() {
|
|
762
|
-
return this.tk[0].s;
|
|
763
|
-
},
|
|
764
|
-
/**
|
|
765
|
-
* The end index of this token in the original input string (up to this
|
|
766
|
-
* index but not including it)
|
|
767
|
-
* @returns {number}
|
|
768
|
-
*/
|
|
769
|
-
endIndex() {
|
|
770
|
-
return this.tk[this.tk.length - 1].e;
|
|
771
|
-
},
|
|
772
|
-
/**
|
|
773
|
-
Returns an object of relevant values for this token, which includes keys
|
|
774
|
-
* type - Kind of token ('url', 'email', etc.)
|
|
775
|
-
* value - Original text
|
|
776
|
-
* href - The value that should be added to the anchor tag's href
|
|
777
|
-
attribute
|
|
778
|
-
@method toObject
|
|
779
|
-
@param {string} [protocol] `'http'` by default
|
|
780
|
-
*/
|
|
781
|
-
toObject(protocol = defaults.defaultProtocol) {
|
|
782
|
-
return {
|
|
783
|
-
type: this.t,
|
|
784
|
-
value: this.toString(),
|
|
785
|
-
isLink: this.isLink,
|
|
786
|
-
href: this.toHref(protocol),
|
|
787
|
-
start: this.startIndex(),
|
|
788
|
-
end: this.endIndex()
|
|
789
|
-
};
|
|
790
|
-
},
|
|
791
|
-
/**
|
|
792
|
-
*
|
|
793
|
-
* @param {Options} options Formatting option
|
|
794
|
-
*/
|
|
795
|
-
toFormattedObject(options) {
|
|
796
|
-
return {
|
|
797
|
-
type: this.t,
|
|
798
|
-
value: this.toFormattedString(options),
|
|
799
|
-
isLink: this.isLink,
|
|
800
|
-
href: this.toFormattedHref(options),
|
|
801
|
-
start: this.startIndex(),
|
|
802
|
-
end: this.endIndex()
|
|
803
|
-
};
|
|
804
|
-
},
|
|
805
|
-
/**
|
|
806
|
-
* Whether this token should be rendered as a link according to the given options
|
|
807
|
-
* @param {Options} options
|
|
808
|
-
* @returns {boolean}
|
|
809
|
-
*/
|
|
810
|
-
validate(options) {
|
|
811
|
-
return options.get("validate", this.toString(), this);
|
|
812
|
-
},
|
|
813
|
-
/**
|
|
814
|
-
* Return an object that represents how this link should be rendered.
|
|
815
|
-
* @param {Options} options Formattinng options
|
|
816
|
-
*/
|
|
817
|
-
render(options) {
|
|
818
|
-
const token = this;
|
|
819
|
-
const href = this.toHref(options.get("defaultProtocol"));
|
|
820
|
-
const formattedHref = options.get("formatHref", href, this);
|
|
821
|
-
const tagName = options.get("tagName", href, token);
|
|
822
|
-
const content = this.toFormattedString(options);
|
|
823
|
-
const attributes = {};
|
|
824
|
-
const className = options.get("className", href, token);
|
|
825
|
-
const target = options.get("target", href, token);
|
|
826
|
-
const rel = options.get("rel", href, token);
|
|
827
|
-
const attrs = options.getObj("attributes", href, token);
|
|
828
|
-
const eventListeners = options.getObj("events", href, token);
|
|
829
|
-
attributes.href = formattedHref;
|
|
830
|
-
if (className) {
|
|
831
|
-
attributes.class = className;
|
|
832
|
-
}
|
|
833
|
-
if (target) {
|
|
834
|
-
attributes.target = target;
|
|
835
|
-
}
|
|
836
|
-
if (rel) {
|
|
837
|
-
attributes.rel = rel;
|
|
838
|
-
}
|
|
839
|
-
if (attrs) {
|
|
840
|
-
Object.assign(attributes, attrs);
|
|
841
|
-
}
|
|
842
|
-
return {
|
|
843
|
-
tagName,
|
|
844
|
-
attributes,
|
|
845
|
-
content,
|
|
846
|
-
eventListeners
|
|
847
|
-
};
|
|
848
|
-
}
|
|
849
|
-
};
|
|
850
|
-
function createTokenClass(type, props) {
|
|
851
|
-
class Token extends MultiToken {
|
|
852
|
-
constructor(value, tokens) {
|
|
853
|
-
super(value, tokens);
|
|
854
|
-
this.t = type;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
for (const p in props) {
|
|
858
|
-
Token.prototype[p] = props[p];
|
|
859
|
-
}
|
|
860
|
-
Token.t = type;
|
|
861
|
-
return Token;
|
|
862
|
-
}
|
|
863
|
-
const Email = createTokenClass("email", {
|
|
864
|
-
isLink: true,
|
|
865
|
-
toHref() {
|
|
866
|
-
return "mailto:" + this.toString();
|
|
867
|
-
}
|
|
868
|
-
});
|
|
869
|
-
const Text = createTokenClass("text");
|
|
870
|
-
const Nl = createTokenClass("nl");
|
|
871
|
-
const Url = createTokenClass("url", {
|
|
872
|
-
isLink: true,
|
|
873
|
-
/**
|
|
874
|
-
Lowercases relevant parts of the domain and adds the protocol if
|
|
875
|
-
required. Note that this will not escape unsafe HTML characters in the
|
|
876
|
-
URL.
|
|
877
|
-
@param {string} [scheme] default scheme (e.g., 'https')
|
|
878
|
-
@return {string} the full href
|
|
879
|
-
*/
|
|
880
|
-
toHref(scheme2 = defaults.defaultProtocol) {
|
|
881
|
-
return this.hasProtocol() ? this.v : `${scheme2}://${this.v}`;
|
|
882
|
-
},
|
|
883
|
-
/**
|
|
884
|
-
* Check whether this URL token has a protocol
|
|
885
|
-
* @return {boolean}
|
|
886
|
-
*/
|
|
887
|
-
hasProtocol() {
|
|
888
|
-
const tokens = this.tk;
|
|
889
|
-
return tokens.length >= 2 && tokens[0].t !== LOCALHOST && tokens[1].t === COLON;
|
|
890
|
-
}
|
|
891
|
-
});
|
|
892
|
-
const makeState = (arg) => new State(arg);
|
|
893
|
-
function init$1({
|
|
894
|
-
groups
|
|
895
|
-
}) {
|
|
896
|
-
const qsAccepting = groups.domain.concat([AMPERSAND, ASTERISK, AT, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, NUM, PERCENT, PIPE, PLUS, POUND, SLASH, SYM, TILDE, UNDERSCORE]);
|
|
897
|
-
const qsNonAccepting = [APOSTROPHE, COLON, COMMA, DOT, EXCLAMATION, PERCENT, QUERY, QUOTE, SEMI, OPENANGLEBRACKET, CLOSEANGLEBRACKET, OPENBRACE, CLOSEBRACE, CLOSEBRACKET, OPENBRACKET, OPENPAREN, CLOSEPAREN, FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN, LEFTCORNERBRACKET, RIGHTCORNERBRACKET, LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET, FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN];
|
|
898
|
-
const localpartAccepting = [AMPERSAND, APOSTROPHE, ASTERISK, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, OPENBRACE, CLOSEBRACE, PERCENT, PIPE, PLUS, POUND, QUERY, SLASH, SYM, TILDE, UNDERSCORE];
|
|
899
|
-
const Start = makeState();
|
|
900
|
-
const Localpart = tt(Start, TILDE);
|
|
901
|
-
ta(Localpart, localpartAccepting, Localpart);
|
|
902
|
-
ta(Localpart, groups.domain, Localpart);
|
|
903
|
-
const Domain = makeState(), Scheme = makeState(), SlashScheme = makeState();
|
|
904
|
-
ta(Start, groups.domain, Domain);
|
|
905
|
-
ta(Start, groups.scheme, Scheme);
|
|
906
|
-
ta(Start, groups.slashscheme, SlashScheme);
|
|
907
|
-
ta(Domain, localpartAccepting, Localpart);
|
|
908
|
-
ta(Domain, groups.domain, Domain);
|
|
909
|
-
const LocalpartAt = tt(Domain, AT);
|
|
910
|
-
tt(Localpart, AT, LocalpartAt);
|
|
911
|
-
tt(Scheme, AT, LocalpartAt);
|
|
912
|
-
tt(SlashScheme, AT, LocalpartAt);
|
|
913
|
-
const LocalpartDot = tt(Localpart, DOT);
|
|
914
|
-
ta(LocalpartDot, localpartAccepting, Localpart);
|
|
915
|
-
ta(LocalpartDot, groups.domain, Localpart);
|
|
916
|
-
const EmailDomain = makeState();
|
|
917
|
-
ta(LocalpartAt, groups.domain, EmailDomain);
|
|
918
|
-
ta(EmailDomain, groups.domain, EmailDomain);
|
|
919
|
-
const EmailDomainDot = tt(EmailDomain, DOT);
|
|
920
|
-
ta(EmailDomainDot, groups.domain, EmailDomain);
|
|
921
|
-
const Email$1 = makeState(Email);
|
|
922
|
-
ta(EmailDomainDot, groups.tld, Email$1);
|
|
923
|
-
ta(EmailDomainDot, groups.utld, Email$1);
|
|
924
|
-
tt(LocalpartAt, LOCALHOST, Email$1);
|
|
925
|
-
const EmailDomainHyphen = tt(EmailDomain, HYPHEN);
|
|
926
|
-
tt(EmailDomainHyphen, HYPHEN, EmailDomainHyphen);
|
|
927
|
-
ta(EmailDomainHyphen, groups.domain, EmailDomain);
|
|
928
|
-
ta(Email$1, groups.domain, EmailDomain);
|
|
929
|
-
tt(Email$1, DOT, EmailDomainDot);
|
|
930
|
-
tt(Email$1, HYPHEN, EmailDomainHyphen);
|
|
931
|
-
const EmailColon = tt(Email$1, COLON);
|
|
932
|
-
ta(EmailColon, groups.numeric, Email);
|
|
933
|
-
const DomainHyphen = tt(Domain, HYPHEN);
|
|
934
|
-
const DomainDot = tt(Domain, DOT);
|
|
935
|
-
tt(DomainHyphen, HYPHEN, DomainHyphen);
|
|
936
|
-
ta(DomainHyphen, groups.domain, Domain);
|
|
937
|
-
ta(DomainDot, localpartAccepting, Localpart);
|
|
938
|
-
ta(DomainDot, groups.domain, Domain);
|
|
939
|
-
const DomainDotTld = makeState(Url);
|
|
940
|
-
ta(DomainDot, groups.tld, DomainDotTld);
|
|
941
|
-
ta(DomainDot, groups.utld, DomainDotTld);
|
|
942
|
-
ta(DomainDotTld, groups.domain, Domain);
|
|
943
|
-
ta(DomainDotTld, localpartAccepting, Localpart);
|
|
944
|
-
tt(DomainDotTld, DOT, DomainDot);
|
|
945
|
-
tt(DomainDotTld, HYPHEN, DomainHyphen);
|
|
946
|
-
tt(DomainDotTld, AT, LocalpartAt);
|
|
947
|
-
const DomainDotTldColon = tt(DomainDotTld, COLON);
|
|
948
|
-
const DomainDotTldColonPort = makeState(Url);
|
|
949
|
-
ta(DomainDotTldColon, groups.numeric, DomainDotTldColonPort);
|
|
950
|
-
const Url$1 = makeState(Url);
|
|
951
|
-
const UrlNonaccept = makeState();
|
|
952
|
-
ta(Url$1, qsAccepting, Url$1);
|
|
953
|
-
ta(Url$1, qsNonAccepting, UrlNonaccept);
|
|
954
|
-
ta(UrlNonaccept, qsAccepting, Url$1);
|
|
955
|
-
ta(UrlNonaccept, qsNonAccepting, UrlNonaccept);
|
|
956
|
-
tt(DomainDotTld, SLASH, Url$1);
|
|
957
|
-
tt(DomainDotTldColonPort, SLASH, Url$1);
|
|
958
|
-
const SchemeColon = tt(Scheme, COLON);
|
|
959
|
-
const SlashSchemeColon = tt(SlashScheme, COLON);
|
|
960
|
-
const SlashSchemeColonSlash = tt(SlashSchemeColon, SLASH);
|
|
961
|
-
const UriPrefix = tt(SlashSchemeColonSlash, SLASH);
|
|
962
|
-
ta(Scheme, groups.domain, Domain);
|
|
963
|
-
tt(Scheme, DOT, DomainDot);
|
|
964
|
-
tt(Scheme, HYPHEN, DomainHyphen);
|
|
965
|
-
ta(SlashScheme, groups.domain, Domain);
|
|
966
|
-
tt(SlashScheme, DOT, DomainDot);
|
|
967
|
-
tt(SlashScheme, HYPHEN, DomainHyphen);
|
|
968
|
-
ta(SchemeColon, groups.domain, Url$1);
|
|
969
|
-
tt(SchemeColon, SLASH, Url$1);
|
|
970
|
-
tt(SchemeColon, QUERY, Url$1);
|
|
971
|
-
ta(UriPrefix, groups.domain, Url$1);
|
|
972
|
-
ta(UriPrefix, qsAccepting, Url$1);
|
|
973
|
-
tt(UriPrefix, SLASH, Url$1);
|
|
974
|
-
const bracketPairs = [
|
|
975
|
-
[OPENBRACE, CLOSEBRACE],
|
|
976
|
-
// {}
|
|
977
|
-
[OPENBRACKET, CLOSEBRACKET],
|
|
978
|
-
// []
|
|
979
|
-
[OPENPAREN, CLOSEPAREN],
|
|
980
|
-
// ()
|
|
981
|
-
[OPENANGLEBRACKET, CLOSEANGLEBRACKET],
|
|
982
|
-
// <>
|
|
983
|
-
[FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN],
|
|
984
|
-
// ()
|
|
985
|
-
[LEFTCORNERBRACKET, RIGHTCORNERBRACKET],
|
|
986
|
-
// 「」
|
|
987
|
-
[LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET],
|
|
988
|
-
// 『』
|
|
989
|
-
[FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN]
|
|
990
|
-
// <>
|
|
991
|
-
];
|
|
992
|
-
for (let i = 0; i < bracketPairs.length; i++) {
|
|
993
|
-
const [OPEN, CLOSE] = bracketPairs[i];
|
|
994
|
-
const UrlOpen = tt(Url$1, OPEN);
|
|
995
|
-
tt(UrlNonaccept, OPEN, UrlOpen);
|
|
996
|
-
tt(UrlOpen, CLOSE, Url$1);
|
|
997
|
-
const UrlOpenQ = makeState(Url);
|
|
998
|
-
ta(UrlOpen, qsAccepting, UrlOpenQ);
|
|
999
|
-
const UrlOpenSyms = makeState();
|
|
1000
|
-
ta(UrlOpen, qsNonAccepting);
|
|
1001
|
-
ta(UrlOpenQ, qsAccepting, UrlOpenQ);
|
|
1002
|
-
ta(UrlOpenQ, qsNonAccepting, UrlOpenSyms);
|
|
1003
|
-
ta(UrlOpenSyms, qsAccepting, UrlOpenQ);
|
|
1004
|
-
ta(UrlOpenSyms, qsNonAccepting, UrlOpenSyms);
|
|
1005
|
-
tt(UrlOpenQ, CLOSE, Url$1);
|
|
1006
|
-
tt(UrlOpenSyms, CLOSE, Url$1);
|
|
1007
|
-
}
|
|
1008
|
-
tt(Start, LOCALHOST, DomainDotTld);
|
|
1009
|
-
tt(Start, NL, Nl);
|
|
1010
|
-
return {
|
|
1011
|
-
start: Start,
|
|
1012
|
-
tokens: tk
|
|
1013
|
-
};
|
|
1014
|
-
}
|
|
1015
|
-
function run(start, input, tokens) {
|
|
1016
|
-
let len = tokens.length;
|
|
1017
|
-
let cursor = 0;
|
|
1018
|
-
let multis = [];
|
|
1019
|
-
let textTokens = [];
|
|
1020
|
-
while (cursor < len) {
|
|
1021
|
-
let state = start;
|
|
1022
|
-
let secondState = null;
|
|
1023
|
-
let nextState = null;
|
|
1024
|
-
let multiLength = 0;
|
|
1025
|
-
let latestAccepting = null;
|
|
1026
|
-
let sinceAccepts = -1;
|
|
1027
|
-
while (cursor < len && !(secondState = state.go(tokens[cursor].t))) {
|
|
1028
|
-
textTokens.push(tokens[cursor++]);
|
|
1029
|
-
}
|
|
1030
|
-
while (cursor < len && (nextState = secondState || state.go(tokens[cursor].t))) {
|
|
1031
|
-
secondState = null;
|
|
1032
|
-
state = nextState;
|
|
1033
|
-
if (state.accepts()) {
|
|
1034
|
-
sinceAccepts = 0;
|
|
1035
|
-
latestAccepting = state;
|
|
1036
|
-
} else if (sinceAccepts >= 0) {
|
|
1037
|
-
sinceAccepts++;
|
|
1038
|
-
}
|
|
1039
|
-
cursor++;
|
|
1040
|
-
multiLength++;
|
|
1041
|
-
}
|
|
1042
|
-
if (sinceAccepts < 0) {
|
|
1043
|
-
cursor -= multiLength;
|
|
1044
|
-
if (cursor < len) {
|
|
1045
|
-
textTokens.push(tokens[cursor]);
|
|
1046
|
-
cursor++;
|
|
1047
|
-
}
|
|
1048
|
-
} else {
|
|
1049
|
-
if (textTokens.length > 0) {
|
|
1050
|
-
multis.push(initMultiToken(Text, input, textTokens));
|
|
1051
|
-
textTokens = [];
|
|
1052
|
-
}
|
|
1053
|
-
cursor -= sinceAccepts;
|
|
1054
|
-
multiLength -= sinceAccepts;
|
|
1055
|
-
const Multi = latestAccepting.t;
|
|
1056
|
-
const subtokens = tokens.slice(cursor - multiLength, cursor);
|
|
1057
|
-
multis.push(initMultiToken(Multi, input, subtokens));
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
if (textTokens.length > 0) {
|
|
1061
|
-
multis.push(initMultiToken(Text, input, textTokens));
|
|
1062
|
-
}
|
|
1063
|
-
return multis;
|
|
1064
|
-
}
|
|
1065
|
-
function initMultiToken(Multi, input, tokens) {
|
|
1066
|
-
const startIdx = tokens[0].s;
|
|
1067
|
-
const endIdx = tokens[tokens.length - 1].e;
|
|
1068
|
-
const value = input.slice(startIdx, endIdx);
|
|
1069
|
-
return new Multi(value, tokens);
|
|
1070
|
-
}
|
|
1071
|
-
const warn = typeof console !== "undefined" && console && console.warn || (() => {
|
|
1072
|
-
});
|
|
1073
|
-
const warnAdvice = "until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.";
|
|
1074
|
-
const INIT = {
|
|
1075
|
-
scanner: null,
|
|
1076
|
-
parser: null,
|
|
1077
|
-
tokenQueue: [],
|
|
1078
|
-
pluginQueue: [],
|
|
1079
|
-
customSchemes: [],
|
|
1080
|
-
initialized: false
|
|
1081
|
-
};
|
|
1082
|
-
function reset() {
|
|
1083
|
-
State.groups = {};
|
|
1084
|
-
INIT.scanner = null;
|
|
1085
|
-
INIT.parser = null;
|
|
1086
|
-
INIT.tokenQueue = [];
|
|
1087
|
-
INIT.pluginQueue = [];
|
|
1088
|
-
INIT.customSchemes = [];
|
|
1089
|
-
INIT.initialized = false;
|
|
1090
|
-
return INIT;
|
|
1091
|
-
}
|
|
1092
|
-
function registerCustomProtocol(scheme2, optionalSlashSlash = false) {
|
|
1093
|
-
if (INIT.initialized) {
|
|
1094
|
-
warn(`linkifyjs: already initialized - will not register custom scheme "${scheme2}" ${warnAdvice}`);
|
|
1095
|
-
}
|
|
1096
|
-
if (!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(scheme2)) {
|
|
1097
|
-
throw new Error(`linkifyjs: incorrect scheme format.
|
|
1098
|
-
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
1099
|
-
2. Cannot start or end with "-"
|
|
1100
|
-
3. "-" cannot repeat`);
|
|
1101
|
-
}
|
|
1102
|
-
INIT.customSchemes.push([scheme2, optionalSlashSlash]);
|
|
1103
|
-
}
|
|
1104
|
-
function init() {
|
|
1105
|
-
INIT.scanner = init$2(INIT.customSchemes);
|
|
1106
|
-
for (let i = 0; i < INIT.tokenQueue.length; i++) {
|
|
1107
|
-
INIT.tokenQueue[i][1]({
|
|
1108
|
-
scanner: INIT.scanner
|
|
1109
|
-
});
|
|
1110
|
-
}
|
|
1111
|
-
INIT.parser = init$1(INIT.scanner.tokens);
|
|
1112
|
-
for (let i = 0; i < INIT.pluginQueue.length; i++) {
|
|
1113
|
-
INIT.pluginQueue[i][1]({
|
|
1114
|
-
scanner: INIT.scanner,
|
|
1115
|
-
parser: INIT.parser
|
|
1116
|
-
});
|
|
1117
|
-
}
|
|
1118
|
-
INIT.initialized = true;
|
|
1119
|
-
return INIT;
|
|
1120
|
-
}
|
|
1121
|
-
function tokenize(str) {
|
|
1122
|
-
if (!INIT.initialized) {
|
|
1123
|
-
init();
|
|
1124
|
-
}
|
|
1125
|
-
return run(INIT.parser.start, str, run$1(INIT.scanner.start, str));
|
|
1126
|
-
}
|
|
1127
|
-
tokenize.scan = run$1;
|
|
1128
|
-
function find(str, type = null, opts = null) {
|
|
1129
|
-
if (type && typeof type === "object") {
|
|
1130
|
-
if (opts) {
|
|
1131
|
-
throw Error(`linkifyjs: Invalid link type ${type}; must be a string`);
|
|
1132
|
-
}
|
|
1133
|
-
opts = type;
|
|
1134
|
-
type = null;
|
|
1135
|
-
}
|
|
1136
|
-
const options = new Options(opts);
|
|
1137
|
-
const tokens = tokenize(str);
|
|
1138
|
-
const filtered = [];
|
|
1139
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
1140
|
-
const token = tokens[i];
|
|
1141
|
-
if (token.isLink && (!type || token.t === type) && options.check(token)) {
|
|
1142
|
-
filtered.push(token.toFormattedObject(options));
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
return filtered;
|
|
1146
|
-
}
|
|
1147
|
-
export {
|
|
1148
|
-
MultiToken,
|
|
1149
|
-
Options,
|
|
1150
|
-
State,
|
|
1151
|
-
createTokenClass,
|
|
1152
|
-
find,
|
|
1153
|
-
init,
|
|
1154
|
-
registerCustomProtocol,
|
|
1155
|
-
reset,
|
|
1156
|
-
stringToArray,
|
|
1157
|
-
tokenize
|
|
1158
|
-
};
|
|
1159
|
-
//# sourceMappingURL=linkify.js.map
|