adapt-authoring-ui 0.0.1
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/.eslintignore +2 -0
- package/.eslintrc +14 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +55 -0
- package/.github/ISSUE_TEMPLATE/config.yml +1 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +22 -0
- package/.github/dependabot.yml +11 -0
- package/.github/pull_request_template.md +25 -0
- package/.github/workflows/labelled_prs.yml +16 -0
- package/.github/workflows/new.yml +19 -0
- package/adapt-authoring.json +11 -0
- package/app/core/app.js +43 -0
- package/app/core/assets/adapt-learning-logo-outline.png +0 -0
- package/app/core/assets/adapt-learning-logo-white.png +0 -0
- package/app/core/assets/ajax-loader.gif +0 -0
- package/app/core/assets/favicon.png +0 -0
- package/app/core/assets/transparency-light.png +0 -0
- package/app/core/browserStorage.js +45 -0
- package/app/core/collections/apiCollection.js +74 -0
- package/app/core/collections/contentCollection.js +33 -0
- package/app/core/collections/contentPluginCollection.js +24 -0
- package/app/core/collections/tagsCollection.js +4 -0
- package/app/core/constants.js +10 -0
- package/app/core/helpers.js +375 -0
- package/app/core/index.hbs +192 -0
- package/app/core/l10n.js +33 -0
- package/app/core/less/_reset.less +43 -0
- package/app/core/less/app.less +100 -0
- package/app/core/less/buttons.less +268 -0
- package/app/core/less/colourLabels.less +14 -0
- package/app/core/less/colours.less +132 -0
- package/app/core/less/columns.less +190 -0
- package/app/core/less/fonts.less +30 -0
- package/app/core/less/forms.less +77 -0
- package/app/core/less/sharedStyles.less +73 -0
- package/app/core/less/tables.less +29 -0
- package/app/core/less/tags.less +194 -0
- package/app/core/loading.hbs +27 -0
- package/app/core/models/articleModel.js +19 -0
- package/app/core/models/blockModel.js +25 -0
- package/app/core/models/clipboardModel.js +10 -0
- package/app/core/models/componentModel.js +18 -0
- package/app/core/models/configModel.js +22 -0
- package/app/core/models/contentModel.js +26 -0
- package/app/core/models/contentObjectModel.js +19 -0
- package/app/core/models/contentPluginModel.js +10 -0
- package/app/core/models/courseModel.js +24 -0
- package/app/core/models/sessionModel.js +86 -0
- package/app/core/origin.js +189 -0
- package/app/core/router.js +135 -0
- package/app/core/views/originView.js +92 -0
- package/app/libraries/babel-polyfill.min.js +1 -0
- package/app/libraries/backbone-forms-lists.js +669 -0
- package/app/libraries/backbone-forms.js +2604 -0
- package/app/libraries/backbone.js +1581 -0
- package/app/libraries/ckeditor.js +6 -0
- package/app/libraries/handlebars.js +4902 -0
- package/app/libraries/imageReady.js +2 -0
- package/app/libraries/inview.js +140 -0
- package/app/libraries/jquery-ui.min.js +6 -0
- package/app/libraries/jquery.form.js +1277 -0
- package/app/libraries/jquery.js +10346 -0
- package/app/libraries/jquery.tagsinput.min.js +1 -0
- package/app/libraries/moment.min.js +7 -0
- package/app/libraries/polyglot.min.js +2922 -0
- package/app/libraries/require.js +36 -0
- package/app/libraries/scrollTo.js +11 -0
- package/app/libraries/selectize/css/selectize.less +403 -0
- package/app/libraries/selectize/js/selectize.js +4500 -0
- package/app/libraries/spectrum/spectrum.js +2323 -0
- package/app/libraries/spectrum/spectrum.less +507 -0
- package/app/libraries/underscore.js +1692 -0
- package/app/libraries/velocity.js +4773 -0
- package/app/modules/appHeader/assets/top-bar-1080.jpg +0 -0
- package/app/modules/appHeader/assets/top-bar-2560.jpg +0 -0
- package/app/modules/appHeader/index.js +5 -0
- package/app/modules/appHeader/less/appHeader.less +72 -0
- package/app/modules/appHeader/templates/appHeader.hbs +17 -0
- package/app/modules/appHeader/views/appHeaderView.js +63 -0
- package/app/modules/assetManagement/collections/assetCollection.js +16 -0
- package/app/modules/assetManagement/index.js +65 -0
- package/app/modules/assetManagement/less/asset.less +229 -0
- package/app/modules/assetManagement/less/assetManagementModalTags.less +34 -0
- package/app/modules/assetManagement/less/assetManagementNew.less +60 -0
- package/app/modules/assetManagement/models/assetModel.js +11 -0
- package/app/modules/assetManagement/templates/assetManagement.hbs +12 -0
- package/app/modules/assetManagement/templates/assetManagementCollection.hbs +2 -0
- package/app/modules/assetManagement/templates/assetManagementEditAsset.hbs +9 -0
- package/app/modules/assetManagement/templates/assetManagementEditAssetSidebar.hbs +10 -0
- package/app/modules/assetManagement/templates/assetManagementListItem.hbs +35 -0
- package/app/modules/assetManagement/templates/assetManagementModalAutofill.hbs +1 -0
- package/app/modules/assetManagement/templates/assetManagementModalEditAsset.hbs +11 -0
- package/app/modules/assetManagement/templates/assetManagementModalFilters.hbs +16 -0
- package/app/modules/assetManagement/templates/assetManagementModalTags.hbs +26 -0
- package/app/modules/assetManagement/templates/assetManagementPreview.hbs +53 -0
- package/app/modules/assetManagement/templates/assetManagementSidebar.hbs +93 -0
- package/app/modules/assetManagement/templates/assetPicker.hbs +45 -0
- package/app/modules/assetManagement/views/assetManagementCollectionView.js +216 -0
- package/app/modules/assetManagement/views/assetManagementEditAssetSidebarView.js +25 -0
- package/app/modules/assetManagement/views/assetManagementEditAssetView.js +123 -0
- package/app/modules/assetManagement/views/assetManagementItemView.js +68 -0
- package/app/modules/assetManagement/views/assetManagementModalAutofillView.js +51 -0
- package/app/modules/assetManagement/views/assetManagementModalEditAssetView.js +38 -0
- package/app/modules/assetManagement/views/assetManagementModalFiltersView.js +132 -0
- package/app/modules/assetManagement/views/assetManagementModalTagsView.js +169 -0
- package/app/modules/assetManagement/views/assetManagementModalView.js +62 -0
- package/app/modules/assetManagement/views/assetManagementPreviewView.js +69 -0
- package/app/modules/assetManagement/views/assetManagementSidebarView.js +126 -0
- package/app/modules/assetManagement/views/assetManagementView.js +43 -0
- package/app/modules/colorLabel/index.js +48 -0
- package/app/modules/colorLabel/less/colorLabels.less +102 -0
- package/app/modules/colorLabel/models/colors.js +31 -0
- package/app/modules/colorLabel/templates/colorLabelPopUpView.hbs +21 -0
- package/app/modules/colorLabel/views/colorLabelPopupView.js +75 -0
- package/app/modules/contentHeader/index.js +6 -0
- package/app/modules/contentHeader/less/contentHeader.less +152 -0
- package/app/modules/contentHeader/less/options.less +51 -0
- package/app/modules/contentHeader/templates/actionsButton.hbs +3 -0
- package/app/modules/contentHeader/templates/contentHeader.hbs +38 -0
- package/app/modules/contentHeader/templates/contentHeaderToggleButton.hbs +11 -0
- package/app/modules/contentHeader/templates/filterItem.hbs +23 -0
- package/app/modules/contentHeader/templates/options.hbs +14 -0
- package/app/modules/contentHeader/templates/partials/part_headerButtonContent.hbs +2 -0
- package/app/modules/contentHeader/templates/sortItem.hbs +9 -0
- package/app/modules/contentHeader/views/actionsButtonView.js +14 -0
- package/app/modules/contentHeader/views/contentHeaderButtonView.js +42 -0
- package/app/modules/contentHeader/views/contentHeaderToggleButtonView.js +52 -0
- package/app/modules/contentHeader/views/contentHeaderView.js +96 -0
- package/app/modules/contentHeader/views/filtersButtonView.js +31 -0
- package/app/modules/contentHeader/views/optionsView.js +88 -0
- package/app/modules/contentHeader/views/sortsButtonView.js +45 -0
- package/app/modules/contentPane/index.js +20 -0
- package/app/modules/contentPane/less/contentPane.less +8 -0
- package/app/modules/contentPane/templates/contentPane.hbs +2 -0
- package/app/modules/contentPane/views/contentPaneView.js +77 -0
- package/app/modules/contextMenu/index.js +85 -0
- package/app/modules/contextMenu/less/contextMenu.less +54 -0
- package/app/modules/contextMenu/templates/contextMenu.hbs +6 -0
- package/app/modules/contextMenu/templates/contextMenuItem.hbs +8 -0
- package/app/modules/contextMenu/views/contextMenuItemView.js +37 -0
- package/app/modules/contextMenu/views/contextMenuView.js +76 -0
- package/app/modules/editor/article/index.js +18 -0
- package/app/modules/editor/article/templates/editorArticleEdit.hbs +2 -0
- package/app/modules/editor/article/templates/editorArticleEditSidebar.hbs +19 -0
- package/app/modules/editor/article/views/editorArticleEditSidebarView.js +32 -0
- package/app/modules/editor/article/views/editorArticleEditView.js +19 -0
- package/app/modules/editor/block/index.js +18 -0
- package/app/modules/editor/block/templates/editorBlockEdit.hbs +2 -0
- package/app/modules/editor/block/templates/editorBlockEditSidebar.hbs +19 -0
- package/app/modules/editor/block/views/editorBlockEditSidebarView.js +28 -0
- package/app/modules/editor/block/views/editorBlockEditView.js +19 -0
- package/app/modules/editor/component/index.js +22 -0
- package/app/modules/editor/component/templates/editorComponentEdit.hbs +2 -0
- package/app/modules/editor/component/templates/editorComponentEditSidebar.hbs +19 -0
- package/app/modules/editor/component/views/editorComponentEditSidebarView.js +32 -0
- package/app/modules/editor/component/views/editorComponentEditView.js +23 -0
- package/app/modules/editor/config/index.js +15 -0
- package/app/modules/editor/config/templates/editorConfigEdit.hbs +1 -0
- package/app/modules/editor/config/templates/editorConfigEditSidebar.hbs +10 -0
- package/app/modules/editor/config/views/editorConfigEditSidebarView.js +28 -0
- package/app/modules/editor/config/views/editorConfigEditView.js +28 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-accordion.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-assessment.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-blank.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-default.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-gmcq.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-graphic.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-hot-graphic.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-matching.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-mcq.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-media.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-narrative.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-slider.png +0 -0
- package/app/modules/editor/contentObject/assets/component-icons/icon-text.png +0 -0
- package/app/modules/editor/contentObject/index.js +68 -0
- package/app/modules/editor/contentObject/less/editing-overlay-component-list.less +60 -0
- package/app/modules/editor/contentObject/less/editing-overlay-panel.less +25 -0
- package/app/modules/editor/contentObject/less/editorMenu.less +84 -0
- package/app/modules/editor/contentObject/less/editorMenuItem.less +114 -0
- package/app/modules/editor/contentObject/less/editorMenuLayer.less +70 -0
- package/app/modules/editor/contentObject/less/editorPage.less +162 -0
- package/app/modules/editor/contentObject/less/editorPageArticle.less +40 -0
- package/app/modules/editor/contentObject/less/editorPageBlock.less +33 -0
- package/app/modules/editor/contentObject/less/editorPageComponent.less +47 -0
- package/app/modules/editor/contentObject/less/editorPageComponentList.less +234 -0
- package/app/modules/editor/contentObject/templates/editorMenu.hbs +1 -0
- package/app/modules/editor/contentObject/templates/editorMenuItem.hbs +23 -0
- package/app/modules/editor/contentObject/templates/editorMenuLayer.hbs +12 -0
- package/app/modules/editor/contentObject/templates/editorMenuSidebar.hbs +1 -0
- package/app/modules/editor/contentObject/templates/editorPage.hbs +15 -0
- package/app/modules/editor/contentObject/templates/editorPageArticle.hbs +15 -0
- package/app/modules/editor/contentObject/templates/editorPageBlock.hbs +14 -0
- package/app/modules/editor/contentObject/templates/editorPageComponent.hbs +9 -0
- package/app/modules/editor/contentObject/templates/editorPageComponentList.hbs +33 -0
- package/app/modules/editor/contentObject/templates/editorPageComponentListItem.hbs +24 -0
- package/app/modules/editor/contentObject/templates/editorPageComponentPasteZone.hbs +4 -0
- package/app/modules/editor/contentObject/templates/editorPageEdit.hbs +1 -0
- package/app/modules/editor/contentObject/templates/editorPageEditSidebar.hbs +10 -0
- package/app/modules/editor/contentObject/templates/editorPageSidebar.hbs +1 -0
- package/app/modules/editor/contentObject/views/editorMenuItemView.js +174 -0
- package/app/modules/editor/contentObject/views/editorMenuLayerView.js +212 -0
- package/app/modules/editor/contentObject/views/editorMenuSidebarView.js +13 -0
- package/app/modules/editor/contentObject/views/editorMenuView.js +211 -0
- package/app/modules/editor/contentObject/views/editorPageArticleView.js +278 -0
- package/app/modules/editor/contentObject/views/editorPageBlockView.js +280 -0
- package/app/modules/editor/contentObject/views/editorPageComponentListItemView.js +80 -0
- package/app/modules/editor/contentObject/views/editorPageComponentListView.js +131 -0
- package/app/modules/editor/contentObject/views/editorPageComponentPasteZoneView.js +47 -0
- package/app/modules/editor/contentObject/views/editorPageComponentView.js +202 -0
- package/app/modules/editor/contentObject/views/editorPageEditSidebarView.js +28 -0
- package/app/modules/editor/contentObject/views/editorPageEditView.js +19 -0
- package/app/modules/editor/contentObject/views/editorPageSidebarView.js +13 -0
- package/app/modules/editor/contentObject/views/editorPageView.js +183 -0
- package/app/modules/editor/course/index.js +26 -0
- package/app/modules/editor/course/templates/editorCourseEdit.hbs +2 -0
- package/app/modules/editor/course/templates/editorCourseEditSidebar.hbs +19 -0
- package/app/modules/editor/course/views/editorCourseEditSidebarView.js +28 -0
- package/app/modules/editor/course/views/editorCourseEditView.js +56 -0
- package/app/modules/editor/extensions/index.js +26 -0
- package/app/modules/editor/extensions/less/extensions.less +22 -0
- package/app/modules/editor/extensions/templates/editorExtensionsEdit.hbs +85 -0
- package/app/modules/editor/extensions/templates/editorExtensionsEditSidebar.hbs +1 -0
- package/app/modules/editor/extensions/views/editorExtensionsEditSidebarView.js +10 -0
- package/app/modules/editor/extensions/views/editorExtensionsEditView.js +85 -0
- package/app/modules/editor/global/collections/editorCollection.js +24 -0
- package/app/modules/editor/global/editorDataLoader.js +91 -0
- package/app/modules/editor/global/helpers.js +99 -0
- package/app/modules/editor/global/less/colorLabels.less +55 -0
- package/app/modules/editor/global/less/editor.less +204 -0
- package/app/modules/editor/global/templates/editor.hbs +1 -0
- package/app/modules/editor/global/templates/editorPasteZone.hbs +4 -0
- package/app/modules/editor/global/templates/partials/part_editorCommon.hbs +70 -0
- package/app/modules/editor/global/templates/partials/part_editorItemSidebar.hbs +40 -0
- package/app/modules/editor/global/templates/partials/part_editorMenu.hbs +4 -0
- package/app/modules/editor/global/templates/partials/part_settingsGeneral.hbs +27 -0
- package/app/modules/editor/global/views/editorOriginView.js +255 -0
- package/app/modules/editor/global/views/editorPasteZoneView.js +69 -0
- package/app/modules/editor/global/views/editorView.js +288 -0
- package/app/modules/editor/index.js +52 -0
- package/app/modules/editor/menuSettings/index.js +27 -0
- package/app/modules/editor/menuSettings/less/menusettings.less +55 -0
- package/app/modules/editor/menuSettings/templates/editorMenuSettingsEdit.hbs +1 -0
- package/app/modules/editor/menuSettings/templates/editorMenuSettingsEditSidebar.hbs +5 -0
- package/app/modules/editor/menuSettings/templates/editorMenuSettingsItem.hbs +4 -0
- package/app/modules/editor/menuSettings/views/editorMenuSettingsEditSidebarView.js +21 -0
- package/app/modules/editor/menuSettings/views/editorMenuSettingsEditView.js +71 -0
- package/app/modules/editor/menuSettings/views/editorMenuSettingsView.js +44 -0
- package/app/modules/editor/themeEditor/collections/editorPresetCollection.js +13 -0
- package/app/modules/editor/themeEditor/index.js +15 -0
- package/app/modules/editor/themeEditor/less/editorPresetEdit.less +78 -0
- package/app/modules/editor/themeEditor/less/editorTheming.less +73 -0
- package/app/modules/editor/themeEditor/models/editorModel.js +62 -0
- package/app/modules/editor/themeEditor/models/editorPresetModel.js +6 -0
- package/app/modules/editor/themeEditor/templates/editorPresetEdit.hbs +31 -0
- package/app/modules/editor/themeEditor/templates/editorTheming.hbs +35 -0
- package/app/modules/editor/themeEditor/templates/editorThemingSidebar.hbs +23 -0
- package/app/modules/editor/themeEditor/views/editorPresetEditView.js +98 -0
- package/app/modules/editor/themeEditor/views/editorThemingSidebarView.js +62 -0
- package/app/modules/editor/themeEditor/views/editorThemingView.js +304 -0
- package/app/modules/frameworkImport/index.js +32 -0
- package/app/modules/frameworkImport/less/frameworkImport.less +101 -0
- package/app/modules/frameworkImport/templates/frameworkImport.hbs +58 -0
- package/app/modules/frameworkImport/templates/frameworkImportSidebar.hbs +12 -0
- package/app/modules/frameworkImport/templates/frameworkImportSummary.hbs +40 -0
- package/app/modules/frameworkImport/templates/partials/part_frameworkImportButton.hbs +3 -0
- package/app/modules/frameworkImport/templates/partials/part_frameworkImportStatusMessages.hbs +22 -0
- package/app/modules/frameworkImport/views/frameworkImportSidebarView.js +31 -0
- package/app/modules/frameworkImport/views/frameworkImportView.js +109 -0
- package/app/modules/globalMenu/index.js +86 -0
- package/app/modules/globalMenu/less/globalMenu.less +117 -0
- package/app/modules/globalMenu/templates/globalMenu.hbs +6 -0
- package/app/modules/globalMenu/templates/globalMenuItem.hbs +10 -0
- package/app/modules/globalMenu/templates/partials/part_globalMenuButton.hbs +7 -0
- package/app/modules/globalMenu/views/globalMenuItemView.js +108 -0
- package/app/modules/globalMenu/views/globalMenuView.js +45 -0
- package/app/modules/limiteduser/index.js +17 -0
- package/app/modules/limiteduser/less/limitedUser.less +29 -0
- package/app/modules/limiteduser/templates/limitedUser.hbs +8 -0
- package/app/modules/limiteduser/views/limitedUserView.js +12 -0
- package/app/modules/modal/index.js +13 -0
- package/app/modules/modal/less/modal.less +61 -0
- package/app/modules/modal/models/modalModel.js +14 -0
- package/app/modules/modal/templates/modal.hbs +34 -0
- package/app/modules/modal/views/modalView.js +102 -0
- package/app/modules/notify/index.js +32 -0
- package/app/modules/notify/plugins/alert/assets/sweetalert.css +932 -0
- package/app/modules/notify/plugins/alert/index.js +117 -0
- package/app/modules/notify/plugins/alert/less/alert.less +74 -0
- package/app/modules/notify/plugins/alert/sweetalert2-11.1.7.all.min.js +2 -0
- package/app/modules/notify/plugins/console/index.js +18 -0
- package/app/modules/notify/plugins/snackbar/index.js +69 -0
- package/app/modules/notify/plugins/snackbar/less/snackbar.less +40 -0
- package/app/modules/notify/plugins/toast/index.js +70 -0
- package/app/modules/notify/plugins/toast/less/toast.less +62 -0
- package/app/modules/pluginManagement/index.js +36 -0
- package/app/modules/pluginManagement/less/pluginManagement.less +23 -0
- package/app/modules/pluginManagement/less/pluginType.less +25 -0
- package/app/modules/pluginManagement/templates/pluginManagement.hbs +43 -0
- package/app/modules/pluginManagement/templates/pluginManagementSidebar.hbs +40 -0
- package/app/modules/pluginManagement/templates/pluginManagementUpload.hbs +12 -0
- package/app/modules/pluginManagement/templates/pluginManagementUploadSidebar.hbs +13 -0
- package/app/modules/pluginManagement/templates/pluginType.hbs +43 -0
- package/app/modules/pluginManagement/views/pluginManagementSidebarView.js +48 -0
- package/app/modules/pluginManagement/views/pluginManagementUploadSidebarView.js +25 -0
- package/app/modules/pluginManagement/views/pluginManagementUploadView.js +52 -0
- package/app/modules/pluginManagement/views/pluginManagementView.js +104 -0
- package/app/modules/pluginManagement/views/pluginTypeView.js +105 -0
- package/app/modules/projects/assets/origami-project.jpg +0 -0
- package/app/modules/projects/index.js +82 -0
- package/app/modules/projects/less/projects.less +152 -0
- package/app/modules/projects/less/qproject.less +143 -0
- package/app/modules/projects/templates/project.hbs +63 -0
- package/app/modules/projects/templates/projects.hbs +6 -0
- package/app/modules/projects/templates/projectsSidebar.hbs +42 -0
- package/app/modules/projects/views/projectView.js +167 -0
- package/app/modules/projects/views/projectsSidebarView.js +172 -0
- package/app/modules/projects/views/projectsView.js +271 -0
- package/app/modules/scaffold/backboneFormsOverrides.js +284 -0
- package/app/modules/scaffold/index.js +342 -0
- package/app/modules/scaffold/lang/en.json +9 -0
- package/app/modules/scaffold/less/codeEditor.less +6 -0
- package/app/modules/scaffold/less/colourPicker.less +141 -0
- package/app/modules/scaffold/less/displayTitle.less +17 -0
- package/app/modules/scaffold/less/forms.less +174 -0
- package/app/modules/scaffold/less/list.less +35 -0
- package/app/modules/scaffold/less/modal.less +45 -0
- package/app/modules/scaffold/less/scaffoldAsset.less +23 -0
- package/app/modules/scaffold/less/scaffoldAssetItem.less +50 -0
- package/app/modules/scaffold/less/selectize.less +29 -0
- package/app/modules/scaffold/less/textArea.less +9 -0
- package/app/modules/scaffold/less/users.less +6 -0
- package/app/modules/scaffold/templates/field.hbs +25 -0
- package/app/modules/scaffold/templates/fieldset.hbs +10 -0
- package/app/modules/scaffold/templates/form.hbs +6 -0
- package/app/modules/scaffold/templates/list.hbs +4 -0
- package/app/modules/scaffold/templates/listItem.hbs +5 -0
- package/app/modules/scaffold/templates/scaffoldAsset.hbs +65 -0
- package/app/modules/scaffold/templates/scaffoldAssetItem.hbs +35 -0
- package/app/modules/scaffold/templates/scaffoldDisplayTitle.hbs +8 -0
- package/app/modules/scaffold/templates/scaffoldEditHtml.hbs +1 -0
- package/app/modules/scaffold/templates/scaffoldFile.hbs +1 -0
- package/app/modules/scaffold/templates/scaffoldItemsModal.hbs +14 -0
- package/app/modules/scaffold/templates/scaffoldModalOverlay.hbs +1 -0
- package/app/modules/scaffold/templates/scaffoldUsersOption.hbs +8 -0
- package/app/modules/scaffold/views/scaffoldAssetItemView.js +203 -0
- package/app/modules/scaffold/views/scaffoldAssetView.js +157 -0
- package/app/modules/scaffold/views/scaffoldCodeEditorView.js +64 -0
- package/app/modules/scaffold/views/scaffoldColourPickerView.js +70 -0
- package/app/modules/scaffold/views/scaffoldDisplayTitleView.js +112 -0
- package/app/modules/scaffold/views/scaffoldFileView.js +18 -0
- package/app/modules/scaffold/views/scaffoldItemsModalView.js +100 -0
- package/app/modules/scaffold/views/scaffoldListView.js +158 -0
- package/app/modules/scaffold/views/scaffoldTagsView.js +71 -0
- package/app/modules/scaffold/views/scaffoldUsersView.js +89 -0
- package/app/modules/sidebar/index.js +22 -0
- package/app/modules/sidebar/less/sidebar.less +298 -0
- package/app/modules/sidebar/less/sidebarFilter.less +91 -0
- package/app/modules/sidebar/templates/sidebar.hbs +7 -0
- package/app/modules/sidebar/templates/sidebarBreadcrumb.hbs +3 -0
- package/app/modules/sidebar/templates/sidebarDivide.hbs +5 -0
- package/app/modules/sidebar/templates/sidebarFieldsetFilter.hbs +6 -0
- package/app/modules/sidebar/templates/sidebarFilter.hbs +30 -0
- package/app/modules/sidebar/templates/sidebarRowFilter.hbs +4 -0
- package/app/modules/sidebar/templates/sidebarUpdateButton.hbs +3 -0
- package/app/modules/sidebar/views/sidebarFieldsetFilterView.js +43 -0
- package/app/modules/sidebar/views/sidebarFilterView.js +132 -0
- package/app/modules/sidebar/views/sidebarItemView.js +172 -0
- package/app/modules/sidebar/views/sidebarView.js +71 -0
- package/app/modules/user/assets/adapt-learning-logo.png +0 -0
- package/app/modules/user/assets/adapt-logo.png +0 -0
- package/app/modules/user/assets/login_bg.jpg +0 -0
- package/app/modules/user/index.js +75 -0
- package/app/modules/user/less/forgotPassword.less +14 -0
- package/app/modules/user/less/login.less +138 -0
- package/app/modules/user/less/logout.less +3 -0
- package/app/modules/user/less/resetPassword.less +7 -0
- package/app/modules/user/less/userProfile.less +49 -0
- package/app/modules/user/models/userProfileModel.js +32 -0
- package/app/modules/user/templates/forgotPassword.hbs +36 -0
- package/app/modules/user/templates/login.hbs +29 -0
- package/app/modules/user/templates/resetPassword.hbs +29 -0
- package/app/modules/user/templates/userProfile.hbs +71 -0
- package/app/modules/user/templates/userProfileSidebar.hbs +16 -0
- package/app/modules/user/views/forgotPasswordView.js +63 -0
- package/app/modules/user/views/loginView.js +93 -0
- package/app/modules/user/views/resetPasswordView.js +78 -0
- package/app/modules/user/views/userProfileSidebarView.js +32 -0
- package/app/modules/user/views/userProfileView.js +107 -0
- package/app/modules/userManagement/collections/userCollection.js +65 -0
- package/app/modules/userManagement/helpers.js +46 -0
- package/app/modules/userManagement/index.js +67 -0
- package/app/modules/userManagement/less/userManagement.less +268 -0
- package/app/modules/userManagement/models/userModel.js +34 -0
- package/app/modules/userManagement/templates/addUser.hbs +35 -0
- package/app/modules/userManagement/templates/addUserSidebar.hbs +9 -0
- package/app/modules/userManagement/templates/user.hbs +126 -0
- package/app/modules/userManagement/templates/userManagement.hbs +49 -0
- package/app/modules/userManagement/templates/userManagementFilter.hbs +19 -0
- package/app/modules/userManagement/templates/userManagementSidebar.hbs +13 -0
- package/app/modules/userManagement/views/addUserSidebarView.js +25 -0
- package/app/modules/userManagement/views/addUserView.js +85 -0
- package/app/modules/userManagement/views/filterView.js +49 -0
- package/app/modules/userManagement/views/userManagementSidebarView.js +33 -0
- package/app/modules/userManagement/views/userManagementView.js +104 -0
- package/app/modules/userManagement/views/userView.js +324 -0
- package/conf/config.schema.json +18 -0
- package/docs/migrating-from-legacy.md +19 -0
- package/docs/plugins/index-ui.md +17 -0
- package/docs/plugins/uidocs.js +54 -0
- package/docs/ui-extensions.md +15 -0
- package/index.js +1 -0
- package/lib/UiBuild.js +391 -0
- package/lib/UiModule.js +158 -0
- package/npm_hooks/postinstall.js +4 -0
- package/package.json +27 -0
|
@@ -0,0 +1,2922 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build using Browserify from v2.4.2
|
|
3
|
+
*/
|
|
4
|
+
(function (f) { if (typeof exports === "object" && typeof module !== "undefined") { module.exports = f() } else if (typeof define === "function" && define.amd) { define([], f) } else { var g; if (typeof window !== "undefined") { g = window } else if (typeof global !== "undefined") { g = global } else if (typeof self !== "undefined") { g = self } else { g = this } g.moduleName = f() } })(function () {
|
|
5
|
+
var define, module, exports; return (function () { function r(e, n, t) { function o(i, f) { if (!n[i]) { if (!e[i]) { var c = "function" == typeof require && require; if (!f && c) return c(i, !0); if (u) return u(i, !0); var a = new Error("Cannot find module '" + i + "'"); throw a.code = "MODULE_NOT_FOUND", a } var p = n[i] = { exports: {} }; e[i][0].call(p.exports, function (r) { var n = e[i][1][r]; return o(n || r) }, p, p.exports, r, e, n, t) } return n[i].exports } for (var u = "function" == typeof require && require, i = 0; i < t.length; i++)o(t[i]); return o } return r })()({
|
|
6
|
+
1: [function (require, module, exports) {
|
|
7
|
+
|
|
8
|
+
}, {}], 2: [function (require, module, exports) {
|
|
9
|
+
// (c) 2012-2018 Airbnb, Inc.
|
|
10
|
+
//
|
|
11
|
+
// polyglot.js may be freely distributed under the terms of the BSD
|
|
12
|
+
// license. For all licensing information, details, and documentation:
|
|
13
|
+
// http://airbnb.github.com/polyglot.js
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
// Polyglot.js is an I18n helper library written in JavaScript, made to
|
|
17
|
+
// work both in the browser and in Node. It provides a simple solution for
|
|
18
|
+
// interpolation and pluralization, based off of Airbnb's
|
|
19
|
+
// experience adding I18n functionality to its Backbone.js and Node apps.
|
|
20
|
+
//
|
|
21
|
+
// Polylglot is agnostic to your translation backend. It doesn't perform any
|
|
22
|
+
// translation; it simply gives you a way to manage translated phrases from
|
|
23
|
+
// your client- or server-side JavaScript application.
|
|
24
|
+
//
|
|
25
|
+
|
|
26
|
+
'use strict';
|
|
27
|
+
|
|
28
|
+
var forEach = require('array.prototype.foreach');
|
|
29
|
+
var entries = require('object.entries');
|
|
30
|
+
var warning = require('warning');
|
|
31
|
+
var has = require('has');
|
|
32
|
+
var trim = require('string.prototype.trim');
|
|
33
|
+
|
|
34
|
+
var warn = function warn(message) {
|
|
35
|
+
warning(false, message);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var defaultReplace = String.prototype.replace;
|
|
39
|
+
var split = String.prototype.split;
|
|
40
|
+
|
|
41
|
+
// #### Pluralization methods
|
|
42
|
+
// The string that separates the different phrase possibilities.
|
|
43
|
+
var delimiter = '||||';
|
|
44
|
+
|
|
45
|
+
var russianPluralGroups = function (n) {
|
|
46
|
+
var lastTwo = n % 100;
|
|
47
|
+
var end = lastTwo % 10;
|
|
48
|
+
if (lastTwo !== 11 && end === 1) {
|
|
49
|
+
return 0;
|
|
50
|
+
}
|
|
51
|
+
if (2 <= end && end <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) {
|
|
52
|
+
return 1;
|
|
53
|
+
}
|
|
54
|
+
return 2;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var defaultPluralRules = {
|
|
58
|
+
// Mapping from pluralization group plural logic.
|
|
59
|
+
pluralTypes: {
|
|
60
|
+
arabic: function (n) {
|
|
61
|
+
// http://www.arabeyes.org/Plural_Forms
|
|
62
|
+
if (n < 3) { return n; }
|
|
63
|
+
var lastTwo = n % 100;
|
|
64
|
+
if (lastTwo >= 3 && lastTwo <= 10) return 3;
|
|
65
|
+
return lastTwo >= 11 ? 4 : 5;
|
|
66
|
+
},
|
|
67
|
+
bosnian_serbian: russianPluralGroups,
|
|
68
|
+
chinese: function () { return 0; },
|
|
69
|
+
croatian: russianPluralGroups,
|
|
70
|
+
french: function (n) { return n >= 2 ? 1 : 0; },
|
|
71
|
+
german: function (n) { return n !== 1 ? 1 : 0; },
|
|
72
|
+
russian: russianPluralGroups,
|
|
73
|
+
lithuanian: function (n) {
|
|
74
|
+
if (n % 10 === 1 && n % 100 !== 11) { return 0; }
|
|
75
|
+
return n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19) ? 1 : 2;
|
|
76
|
+
},
|
|
77
|
+
czech: function (n) {
|
|
78
|
+
if (n === 1) { return 0; }
|
|
79
|
+
return (n >= 2 && n <= 4) ? 1 : 2;
|
|
80
|
+
},
|
|
81
|
+
polish: function (n) {
|
|
82
|
+
if (n === 1) { return 0; }
|
|
83
|
+
var end = n % 10;
|
|
84
|
+
return 2 <= end && end <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;
|
|
85
|
+
},
|
|
86
|
+
icelandic: function (n) { return (n % 10 !== 1 || n % 100 === 11) ? 1 : 0; },
|
|
87
|
+
slovenian: function (n) {
|
|
88
|
+
var lastTwo = n % 100;
|
|
89
|
+
if (lastTwo === 1) {
|
|
90
|
+
return 0;
|
|
91
|
+
}
|
|
92
|
+
if (lastTwo === 2) {
|
|
93
|
+
return 1;
|
|
94
|
+
}
|
|
95
|
+
if (lastTwo === 3 || lastTwo === 4) {
|
|
96
|
+
return 2;
|
|
97
|
+
}
|
|
98
|
+
return 3;
|
|
99
|
+
},
|
|
100
|
+
romanian: function (n) {
|
|
101
|
+
if (n === 1) { return 0; }
|
|
102
|
+
var lastTwo = n % 100;
|
|
103
|
+
if (n === 0 || (lastTwo >= 2 && lastTwo <= 19)) { return 1; }
|
|
104
|
+
return 2;
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
// Mapping from pluralization group to individual language codes/locales.
|
|
109
|
+
// Will look up based on exact match, if not found and it's a locale will parse the locale
|
|
110
|
+
// for language code, and if that does not exist will default to 'en'
|
|
111
|
+
pluralTypeToLanguages: {
|
|
112
|
+
arabic: ['ar'],
|
|
113
|
+
bosnian_serbian: ['bs-Latn-BA', 'bs-Cyrl-BA', 'srl-RS', 'sr-RS'],
|
|
114
|
+
chinese: ['id', 'id-ID', 'ja', 'ko', 'ko-KR', 'lo', 'ms', 'th', 'th-TH', 'zh'],
|
|
115
|
+
croatian: ['hr', 'hr-HR'],
|
|
116
|
+
german: ['fa', 'da', 'de', 'en', 'es', 'fi', 'el', 'he', 'hi-IN', 'hu', 'hu-HU', 'it', 'nl', 'no', 'pt', 'sv', 'tr'],
|
|
117
|
+
french: ['fr', 'tl', 'pt-br'],
|
|
118
|
+
russian: ['ru', 'ru-RU'],
|
|
119
|
+
lithuanian: ['lt'],
|
|
120
|
+
czech: ['cs', 'cs-CZ', 'sk'],
|
|
121
|
+
polish: ['pl'],
|
|
122
|
+
icelandic: ['is', 'mk'],
|
|
123
|
+
slovenian: ['sl-SL'],
|
|
124
|
+
romanian: ['ro']
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
function langToTypeMap(mapping) {
|
|
129
|
+
var ret = {};
|
|
130
|
+
forEach(entries(mapping), function (entry) {
|
|
131
|
+
var type = entry[0];
|
|
132
|
+
var langs = entry[1];
|
|
133
|
+
forEach(langs, function (lang) {
|
|
134
|
+
ret[lang] = type;
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
return ret;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function pluralTypeName(pluralRules, locale) {
|
|
141
|
+
var langToPluralType = langToTypeMap(pluralRules.pluralTypeToLanguages);
|
|
142
|
+
return langToPluralType[locale]
|
|
143
|
+
|| langToPluralType[split.call(locale, /-/, 1)[0]]
|
|
144
|
+
|| langToPluralType.en;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function pluralTypeIndex(pluralRules, pluralType, count) {
|
|
148
|
+
return pluralRules.pluralTypes[pluralType](count);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function createMemoizedPluralTypeNameSelector() {
|
|
152
|
+
var localePluralTypeStorage = {};
|
|
153
|
+
|
|
154
|
+
return function (pluralRules, locale) {
|
|
155
|
+
var pluralType = localePluralTypeStorage[locale];
|
|
156
|
+
|
|
157
|
+
if (pluralType && !pluralRules.pluralTypes[pluralType]) {
|
|
158
|
+
pluralType = null;
|
|
159
|
+
localePluralTypeStorage[locale] = pluralType;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (!pluralType) {
|
|
163
|
+
pluralType = pluralTypeName(pluralRules, locale);
|
|
164
|
+
|
|
165
|
+
if (pluralType) {
|
|
166
|
+
localePluralTypeStorage[locale] = pluralType;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return pluralType;
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function escape(token) {
|
|
175
|
+
return token.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function constructTokenRegex(opts) {
|
|
179
|
+
var prefix = (opts && opts.prefix) || '%{';
|
|
180
|
+
var suffix = (opts && opts.suffix) || '}';
|
|
181
|
+
|
|
182
|
+
if (prefix === delimiter || suffix === delimiter) {
|
|
183
|
+
throw new RangeError('"' + delimiter + '" token is reserved for pluralization');
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return new RegExp(escape(prefix) + '(.*?)' + escape(suffix), 'g');
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
var memoizedPluralTypeName = createMemoizedPluralTypeNameSelector();
|
|
190
|
+
|
|
191
|
+
var defaultTokenRegex = /%\{(.*?)\}/g;
|
|
192
|
+
|
|
193
|
+
// ### transformPhrase(phrase, substitutions, locale)
|
|
194
|
+
//
|
|
195
|
+
// Takes a phrase string and transforms it by choosing the correct
|
|
196
|
+
// plural form and interpolating it.
|
|
197
|
+
//
|
|
198
|
+
// transformPhrase('Hello, %{name}!', {name: 'Spike'});
|
|
199
|
+
// // "Hello, Spike!"
|
|
200
|
+
//
|
|
201
|
+
// The correct plural form is selected if substitutions.smart_count
|
|
202
|
+
// is set. You can pass in a number instead of an Object as `substitutions`
|
|
203
|
+
// as a shortcut for `smart_count`.
|
|
204
|
+
//
|
|
205
|
+
// transformPhrase('%{smart_count} new messages |||| 1 new message', {smart_count: 1}, 'en');
|
|
206
|
+
// // "1 new message"
|
|
207
|
+
//
|
|
208
|
+
// transformPhrase('%{smart_count} new messages |||| 1 new message', {smart_count: 2}, 'en');
|
|
209
|
+
// // "2 new messages"
|
|
210
|
+
//
|
|
211
|
+
// transformPhrase('%{smart_count} new messages |||| 1 new message', 5, 'en');
|
|
212
|
+
// // "5 new messages"
|
|
213
|
+
//
|
|
214
|
+
// You should pass in a third argument, the locale, to specify the correct plural type.
|
|
215
|
+
// It defaults to `'en'` with 2 plural forms.
|
|
216
|
+
function transformPhrase(
|
|
217
|
+
phrase,
|
|
218
|
+
substitutions,
|
|
219
|
+
locale,
|
|
220
|
+
tokenRegex,
|
|
221
|
+
pluralRules,
|
|
222
|
+
replaceImplementation
|
|
223
|
+
) {
|
|
224
|
+
if (typeof phrase !== 'string') {
|
|
225
|
+
throw new TypeError('Polyglot.transformPhrase expects argument #1 to be string');
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (substitutions == null) {
|
|
229
|
+
return phrase;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
var result = phrase;
|
|
233
|
+
var interpolationRegex = tokenRegex || defaultTokenRegex;
|
|
234
|
+
var replace = replaceImplementation || defaultReplace;
|
|
235
|
+
|
|
236
|
+
// allow number as a pluralization shortcut
|
|
237
|
+
var options = typeof substitutions === 'number' ? { smart_count: substitutions } : substitutions;
|
|
238
|
+
|
|
239
|
+
// Select plural form: based on a phrase text that contains `n`
|
|
240
|
+
// plural forms separated by `delimiter`, a `locale`, and a `substitutions.smart_count`,
|
|
241
|
+
// choose the correct plural form. This is only done if `count` is set.
|
|
242
|
+
if (options.smart_count != null && phrase) {
|
|
243
|
+
var pluralRulesOrDefault = pluralRules || defaultPluralRules;
|
|
244
|
+
var texts = split.call(phrase, delimiter);
|
|
245
|
+
var bestLocale = locale || 'en';
|
|
246
|
+
var pluralType = memoizedPluralTypeName(pluralRulesOrDefault, bestLocale);
|
|
247
|
+
var pluralTypeWithCount = pluralTypeIndex(
|
|
248
|
+
pluralRulesOrDefault,
|
|
249
|
+
pluralType,
|
|
250
|
+
options.smart_count
|
|
251
|
+
);
|
|
252
|
+
|
|
253
|
+
result = trim(texts[pluralTypeWithCount] || texts[0]);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Interpolate: Creates a `RegExp` object for each interpolation placeholder.
|
|
257
|
+
result = replace.call(result, interpolationRegex, function (expression, argument) {
|
|
258
|
+
if (!has(options, argument) || options[argument] == null) { return expression; }
|
|
259
|
+
return options[argument];
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
return result;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// ### Polyglot class constructor
|
|
266
|
+
function Polyglot(options) {
|
|
267
|
+
var opts = options || {};
|
|
268
|
+
this.phrases = {};
|
|
269
|
+
this.extend(opts.phrases || {});
|
|
270
|
+
this.currentLocale = opts.locale || 'en';
|
|
271
|
+
var allowMissing = opts.allowMissing ? transformPhrase : null;
|
|
272
|
+
this.onMissingKey = typeof opts.onMissingKey === 'function' ? opts.onMissingKey : allowMissing;
|
|
273
|
+
this.warn = opts.warn || warn;
|
|
274
|
+
this.replaceImplementation = opts.replace || defaultReplace;
|
|
275
|
+
this.tokenRegex = constructTokenRegex(opts.interpolation);
|
|
276
|
+
this.pluralRules = opts.pluralRules || defaultPluralRules;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// ### polyglot.locale([locale])
|
|
280
|
+
//
|
|
281
|
+
// Get or set locale. Internally, Polyglot only uses locale for pluralization.
|
|
282
|
+
Polyglot.prototype.locale = function (newLocale) {
|
|
283
|
+
if (newLocale) this.currentLocale = newLocale;
|
|
284
|
+
return this.currentLocale;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
// ### polyglot.extend(phrases)
|
|
288
|
+
//
|
|
289
|
+
// Use `extend` to tell Polyglot how to translate a given key.
|
|
290
|
+
//
|
|
291
|
+
// polyglot.extend({
|
|
292
|
+
// "hello": "Hello",
|
|
293
|
+
// "hello_name": "Hello, %{name}"
|
|
294
|
+
// });
|
|
295
|
+
//
|
|
296
|
+
// The key can be any string. Feel free to call `extend` multiple times;
|
|
297
|
+
// it will override any phrases with the same key, but leave existing phrases
|
|
298
|
+
// untouched.
|
|
299
|
+
//
|
|
300
|
+
// It is also possible to pass nested phrase objects, which get flattened
|
|
301
|
+
// into an object with the nested keys concatenated using dot notation.
|
|
302
|
+
//
|
|
303
|
+
// polyglot.extend({
|
|
304
|
+
// "nav": {
|
|
305
|
+
// "hello": "Hello",
|
|
306
|
+
// "hello_name": "Hello, %{name}",
|
|
307
|
+
// "sidebar": {
|
|
308
|
+
// "welcome": "Welcome"
|
|
309
|
+
// }
|
|
310
|
+
// }
|
|
311
|
+
// });
|
|
312
|
+
//
|
|
313
|
+
// console.log(polyglot.phrases);
|
|
314
|
+
// // {
|
|
315
|
+
// // 'nav.hello': 'Hello',
|
|
316
|
+
// // 'nav.hello_name': 'Hello, %{name}',
|
|
317
|
+
// // 'nav.sidebar.welcome': 'Welcome'
|
|
318
|
+
// // }
|
|
319
|
+
//
|
|
320
|
+
// `extend` accepts an optional second argument, `prefix`, which can be used
|
|
321
|
+
// to prefix every key in the phrases object with some string, using dot
|
|
322
|
+
// notation.
|
|
323
|
+
//
|
|
324
|
+
// polyglot.extend({
|
|
325
|
+
// "hello": "Hello",
|
|
326
|
+
// "hello_name": "Hello, %{name}"
|
|
327
|
+
// }, "nav");
|
|
328
|
+
//
|
|
329
|
+
// console.log(polyglot.phrases);
|
|
330
|
+
// // {
|
|
331
|
+
// // 'nav.hello': 'Hello',
|
|
332
|
+
// // 'nav.hello_name': 'Hello, %{name}'
|
|
333
|
+
// // }
|
|
334
|
+
//
|
|
335
|
+
// This feature is used internally to support nested phrase objects.
|
|
336
|
+
Polyglot.prototype.extend = function (morePhrases, prefix) {
|
|
337
|
+
forEach(entries(morePhrases || {}), function (entry) {
|
|
338
|
+
var key = entry[0];
|
|
339
|
+
var phrase = entry[1];
|
|
340
|
+
var prefixedKey = prefix ? prefix + '.' + key : key;
|
|
341
|
+
if (typeof phrase === 'object') {
|
|
342
|
+
this.extend(phrase, prefixedKey);
|
|
343
|
+
} else {
|
|
344
|
+
this.phrases[prefixedKey] = phrase;
|
|
345
|
+
}
|
|
346
|
+
}, this);
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
// ### polyglot.unset(phrases)
|
|
350
|
+
// Use `unset` to selectively remove keys from a polyglot instance.
|
|
351
|
+
//
|
|
352
|
+
// polyglot.unset("some_key");
|
|
353
|
+
// polyglot.unset({
|
|
354
|
+
// "hello": "Hello",
|
|
355
|
+
// "hello_name": "Hello, %{name}"
|
|
356
|
+
// });
|
|
357
|
+
//
|
|
358
|
+
// The unset method can take either a string (for the key), or an object hash with
|
|
359
|
+
// the keys that you would like to unset.
|
|
360
|
+
Polyglot.prototype.unset = function (morePhrases, prefix) {
|
|
361
|
+
if (typeof morePhrases === 'string') {
|
|
362
|
+
delete this.phrases[morePhrases];
|
|
363
|
+
} else {
|
|
364
|
+
forEach(entries(morePhrases || {}), function (entry) {
|
|
365
|
+
var key = entry[0];
|
|
366
|
+
var phrase = entry[1];
|
|
367
|
+
var prefixedKey = prefix ? prefix + '.' + key : key;
|
|
368
|
+
if (typeof phrase === 'object') {
|
|
369
|
+
this.unset(phrase, prefixedKey);
|
|
370
|
+
} else {
|
|
371
|
+
delete this.phrases[prefixedKey];
|
|
372
|
+
}
|
|
373
|
+
}, this);
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
// ### polyglot.clear()
|
|
378
|
+
//
|
|
379
|
+
// Clears all phrases. Useful for special cases, such as freeing
|
|
380
|
+
// up memory if you have lots of phrases but no longer need to
|
|
381
|
+
// perform any translation. Also used internally by `replace`.
|
|
382
|
+
Polyglot.prototype.clear = function () {
|
|
383
|
+
this.phrases = {};
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
// ### polyglot.replace(phrases)
|
|
387
|
+
//
|
|
388
|
+
// Completely replace the existing phrases with a new set of phrases.
|
|
389
|
+
// Normally, just use `extend` to add more phrases, but under certain
|
|
390
|
+
// circumstances, you may want to make sure no old phrases are lying around.
|
|
391
|
+
Polyglot.prototype.replace = function (newPhrases) {
|
|
392
|
+
this.clear();
|
|
393
|
+
this.extend(newPhrases);
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
// ### polyglot.t(key, options)
|
|
397
|
+
//
|
|
398
|
+
// The most-used method. Provide a key, and `t` will return the
|
|
399
|
+
// phrase.
|
|
400
|
+
//
|
|
401
|
+
// polyglot.t("hello");
|
|
402
|
+
// => "Hello"
|
|
403
|
+
//
|
|
404
|
+
// The phrase value is provided first by a call to `polyglot.extend()` or
|
|
405
|
+
// `polyglot.replace()`.
|
|
406
|
+
//
|
|
407
|
+
// Pass in an object as the second argument to perform interpolation.
|
|
408
|
+
//
|
|
409
|
+
// polyglot.t("hello_name", {name: "Spike"});
|
|
410
|
+
// => "Hello, Spike"
|
|
411
|
+
//
|
|
412
|
+
// If you like, you can provide a default value in case the phrase is missing.
|
|
413
|
+
// Use the special option key "_" to specify a default.
|
|
414
|
+
//
|
|
415
|
+
// polyglot.t("i_like_to_write_in_language", {
|
|
416
|
+
// _: "I like to write in %{language}.",
|
|
417
|
+
// language: "JavaScript"
|
|
418
|
+
// });
|
|
419
|
+
// => "I like to write in JavaScript."
|
|
420
|
+
//
|
|
421
|
+
Polyglot.prototype.t = function (key, options) {
|
|
422
|
+
var phrase, result;
|
|
423
|
+
var opts = options == null ? {} : options;
|
|
424
|
+
if (typeof this.phrases[key] === 'string') {
|
|
425
|
+
phrase = this.phrases[key];
|
|
426
|
+
} else if (typeof opts._ === 'string') {
|
|
427
|
+
phrase = opts._;
|
|
428
|
+
} else if (this.onMissingKey) {
|
|
429
|
+
var onMissingKey = this.onMissingKey;
|
|
430
|
+
result = onMissingKey(
|
|
431
|
+
key,
|
|
432
|
+
opts,
|
|
433
|
+
this.currentLocale,
|
|
434
|
+
this.tokenRegex,
|
|
435
|
+
this.pluralRules,
|
|
436
|
+
this.replaceImplementation
|
|
437
|
+
);
|
|
438
|
+
} else {
|
|
439
|
+
this.warn('Missing translation for key: "' + key + '"');
|
|
440
|
+
result = key;
|
|
441
|
+
}
|
|
442
|
+
if (typeof phrase === 'string') {
|
|
443
|
+
result = transformPhrase(
|
|
444
|
+
phrase,
|
|
445
|
+
opts,
|
|
446
|
+
this.currentLocale,
|
|
447
|
+
this.tokenRegex,
|
|
448
|
+
this.pluralRules,
|
|
449
|
+
this.replaceImplementation
|
|
450
|
+
);
|
|
451
|
+
}
|
|
452
|
+
return result;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
// ### polyglot.has(key)
|
|
456
|
+
//
|
|
457
|
+
// Check if polyglot has a translation for given key
|
|
458
|
+
Polyglot.prototype.has = function (key) {
|
|
459
|
+
return has(this.phrases, key);
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
// export transformPhrase
|
|
463
|
+
Polyglot.transformPhrase = function transform(phrase, substitutions, locale) {
|
|
464
|
+
return transformPhrase(phrase, substitutions, locale);
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
module.exports = Polyglot;
|
|
468
|
+
|
|
469
|
+
}, { "array.prototype.foreach": 4, "has": 46, "object.entries": 57, "string.prototype.trim": 62, "warning": 65 }], 3: [function (require, module, exports) {
|
|
470
|
+
'use strict';
|
|
471
|
+
|
|
472
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
473
|
+
var callBound = require('call-bind/callBound');
|
|
474
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
475
|
+
|
|
476
|
+
var Call = require('es-abstract/2022/Call');
|
|
477
|
+
var Get = require('es-abstract/2022/Get');
|
|
478
|
+
var HasProperty = require('es-abstract/2022/HasProperty');
|
|
479
|
+
var IsCallable = require('es-abstract/2022/IsCallable');
|
|
480
|
+
var LengthOfArrayLike = require('es-abstract/2022/LengthOfArrayLike');
|
|
481
|
+
var ToObject = require('es-abstract/2022/ToObject');
|
|
482
|
+
var ToString = require('es-abstract/2022/ToString');
|
|
483
|
+
|
|
484
|
+
var isString = require('is-string');
|
|
485
|
+
|
|
486
|
+
var $split = callBound('String.prototype.split');
|
|
487
|
+
|
|
488
|
+
// Check failure of by-index access of string characters (IE < 9) and failure of `0 in boxedString` (Rhino)
|
|
489
|
+
var boxedString = Object('a');
|
|
490
|
+
var splitString = boxedString[0] !== 'a' || !(0 in boxedString);
|
|
491
|
+
|
|
492
|
+
module.exports = function forEach(callbackfn) {
|
|
493
|
+
var thisO = ToObject(this);
|
|
494
|
+
var O = splitString && isString(this) ? $split(this, '') : thisO;
|
|
495
|
+
|
|
496
|
+
var len = LengthOfArrayLike(O);
|
|
497
|
+
|
|
498
|
+
if (!IsCallable(callbackfn)) {
|
|
499
|
+
throw new $TypeError('Array.prototype.forEach callback must be a function');
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
var thisArg;
|
|
503
|
+
if (arguments.length > 1) {
|
|
504
|
+
thisArg = arguments[1];
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
var k = 0;
|
|
508
|
+
while (k < len) {
|
|
509
|
+
var Pk = ToString(k);
|
|
510
|
+
var kPresent = HasProperty(O, Pk);
|
|
511
|
+
if (kPresent) {
|
|
512
|
+
var kValue = Get(O, Pk);
|
|
513
|
+
Call(callbackfn, thisArg, [kValue, k, O]);
|
|
514
|
+
}
|
|
515
|
+
k += 1;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
return void undefined;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
}, { "call-bind/callBound": 7, "es-abstract/2022/Call": 10, "es-abstract/2022/Get": 11, "es-abstract/2022/HasProperty": 12, "es-abstract/2022/IsCallable": 14, "es-abstract/2022/LengthOfArrayLike": 16, "es-abstract/2022/ToObject": 22, "es-abstract/2022/ToString": 24, "get-intrinsic": 41, "is-string": 50 }], 4: [function (require, module, exports) {
|
|
522
|
+
'use strict';
|
|
523
|
+
|
|
524
|
+
var define = require('define-properties');
|
|
525
|
+
var callBind = require('call-bind');
|
|
526
|
+
var callBound = require('call-bind/callBound');
|
|
527
|
+
var RequireObjectCoercible = require('es-abstract/2022/RequireObjectCoercible');
|
|
528
|
+
|
|
529
|
+
var implementation = require('./implementation');
|
|
530
|
+
var getPolyfill = require('./polyfill');
|
|
531
|
+
var polyfill = getPolyfill();
|
|
532
|
+
var shim = require('./shim');
|
|
533
|
+
|
|
534
|
+
var $slice = callBound('Array.prototype.slice');
|
|
535
|
+
|
|
536
|
+
var bound = callBind.apply(polyfill);
|
|
537
|
+
// eslint-disable-next-line no-unused-vars
|
|
538
|
+
var boundCoercible = function forEach(array, callbackfn) {
|
|
539
|
+
RequireObjectCoercible(array);
|
|
540
|
+
return bound(array, $slice(arguments, 1));
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
define(boundCoercible, {
|
|
544
|
+
getPolyfill: getPolyfill,
|
|
545
|
+
implementation: implementation,
|
|
546
|
+
shim: shim
|
|
547
|
+
});
|
|
548
|
+
|
|
549
|
+
module.exports = boundCoercible;
|
|
550
|
+
|
|
551
|
+
}, { "./implementation": 3, "./polyfill": 5, "./shim": 6, "call-bind": 8, "call-bind/callBound": 7, "define-properties": 9, "es-abstract/2022/RequireObjectCoercible": 17 }], 5: [function (require, module, exports) {
|
|
552
|
+
'use strict';
|
|
553
|
+
|
|
554
|
+
var arrayMethodBoxesProperly = require('es-array-method-boxes-properly');
|
|
555
|
+
|
|
556
|
+
var implementation = require('./implementation');
|
|
557
|
+
|
|
558
|
+
module.exports = function getPolyfill() {
|
|
559
|
+
var method = Array.prototype.forEach;
|
|
560
|
+
return arrayMethodBoxesProperly(method) ? method : implementation;
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
}, { "./implementation": 3, "es-array-method-boxes-properly": 36 }], 6: [function (require, module, exports) {
|
|
564
|
+
'use strict';
|
|
565
|
+
|
|
566
|
+
var define = require('define-properties');
|
|
567
|
+
var getPolyfill = require('./polyfill');
|
|
568
|
+
|
|
569
|
+
module.exports = function shimForEach() {
|
|
570
|
+
var polyfill = getPolyfill();
|
|
571
|
+
define(
|
|
572
|
+
Array.prototype,
|
|
573
|
+
{ forEach: polyfill },
|
|
574
|
+
{ forEach: function () { return Array.prototype.forEach !== polyfill; } }
|
|
575
|
+
);
|
|
576
|
+
return polyfill;
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
}, { "./polyfill": 5, "define-properties": 9 }], 7: [function (require, module, exports) {
|
|
580
|
+
'use strict';
|
|
581
|
+
|
|
582
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
583
|
+
|
|
584
|
+
var callBind = require('./');
|
|
585
|
+
|
|
586
|
+
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
587
|
+
|
|
588
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
589
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
590
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
591
|
+
return callBind(intrinsic);
|
|
592
|
+
}
|
|
593
|
+
return intrinsic;
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
}, { "./": 8, "get-intrinsic": 41 }], 8: [function (require, module, exports) {
|
|
597
|
+
'use strict';
|
|
598
|
+
|
|
599
|
+
var bind = require('function-bind');
|
|
600
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
601
|
+
|
|
602
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
603
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
604
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
605
|
+
|
|
606
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
607
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
608
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
609
|
+
|
|
610
|
+
if ($defineProperty) {
|
|
611
|
+
try {
|
|
612
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
613
|
+
} catch (e) {
|
|
614
|
+
// IE 8 has a broken defineProperty
|
|
615
|
+
$defineProperty = null;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
module.exports = function callBind(originalFunction) {
|
|
620
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
621
|
+
if ($gOPD && $defineProperty) {
|
|
622
|
+
var desc = $gOPD(func, 'length');
|
|
623
|
+
if (desc.configurable) {
|
|
624
|
+
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
625
|
+
$defineProperty(
|
|
626
|
+
func,
|
|
627
|
+
'length',
|
|
628
|
+
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
return func;
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
var applyBind = function applyBind() {
|
|
636
|
+
return $reflectApply(bind, $apply, arguments);
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
if ($defineProperty) {
|
|
640
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
641
|
+
} else {
|
|
642
|
+
module.exports.apply = applyBind;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
}, { "function-bind": 40, "get-intrinsic": 41 }], 9: [function (require, module, exports) {
|
|
646
|
+
'use strict';
|
|
647
|
+
|
|
648
|
+
var keys = require('object-keys');
|
|
649
|
+
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
650
|
+
|
|
651
|
+
var toStr = Object.prototype.toString;
|
|
652
|
+
var concat = Array.prototype.concat;
|
|
653
|
+
var origDefineProperty = Object.defineProperty;
|
|
654
|
+
|
|
655
|
+
var isFunction = function (fn) {
|
|
656
|
+
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
var hasPropertyDescriptors = require('has-property-descriptors')();
|
|
660
|
+
|
|
661
|
+
var supportsDescriptors = origDefineProperty && hasPropertyDescriptors;
|
|
662
|
+
|
|
663
|
+
var defineProperty = function (object, name, value, predicate) {
|
|
664
|
+
if (name in object && (!isFunction(predicate) || !predicate())) {
|
|
665
|
+
return;
|
|
666
|
+
}
|
|
667
|
+
if (supportsDescriptors) {
|
|
668
|
+
origDefineProperty(object, name, {
|
|
669
|
+
configurable: true,
|
|
670
|
+
enumerable: false,
|
|
671
|
+
value: value,
|
|
672
|
+
writable: true
|
|
673
|
+
});
|
|
674
|
+
} else {
|
|
675
|
+
object[name] = value; // eslint-disable-line no-param-reassign
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
var defineProperties = function (object, map) {
|
|
680
|
+
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
681
|
+
var props = keys(map);
|
|
682
|
+
if (hasSymbols) {
|
|
683
|
+
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
684
|
+
}
|
|
685
|
+
for (var i = 0; i < props.length; i += 1) {
|
|
686
|
+
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
|
|
690
|
+
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
|
691
|
+
|
|
692
|
+
module.exports = defineProperties;
|
|
693
|
+
|
|
694
|
+
}, { "has-property-descriptors": 42, "object-keys": 54 }], 10: [function (require, module, exports) {
|
|
695
|
+
'use strict';
|
|
696
|
+
|
|
697
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
698
|
+
var callBound = require('call-bind/callBound');
|
|
699
|
+
|
|
700
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
701
|
+
|
|
702
|
+
var IsArray = require('./IsArray');
|
|
703
|
+
|
|
704
|
+
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('%Function.prototype.apply%');
|
|
705
|
+
|
|
706
|
+
// https://ecma-international.org/ecma-262/6.0/#sec-call
|
|
707
|
+
|
|
708
|
+
module.exports = function Call(F, V) {
|
|
709
|
+
var argumentsList = arguments.length > 2 ? arguments[2] : [];
|
|
710
|
+
if (!IsArray(argumentsList)) {
|
|
711
|
+
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
|
|
712
|
+
}
|
|
713
|
+
return $apply(F, V, argumentsList);
|
|
714
|
+
};
|
|
715
|
+
|
|
716
|
+
}, { "./IsArray": 13, "call-bind/callBound": 7, "get-intrinsic": 41 }], 11: [function (require, module, exports) {
|
|
717
|
+
'use strict';
|
|
718
|
+
|
|
719
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
720
|
+
|
|
721
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
722
|
+
|
|
723
|
+
var inspect = require('object-inspect');
|
|
724
|
+
|
|
725
|
+
var IsPropertyKey = require('./IsPropertyKey');
|
|
726
|
+
var Type = require('./Type');
|
|
727
|
+
|
|
728
|
+
// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p
|
|
729
|
+
|
|
730
|
+
module.exports = function Get(O, P) {
|
|
731
|
+
// 7.3.1.1
|
|
732
|
+
if (Type(O) !== 'Object') {
|
|
733
|
+
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
|
734
|
+
}
|
|
735
|
+
// 7.3.1.2
|
|
736
|
+
if (!IsPropertyKey(P)) {
|
|
737
|
+
throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));
|
|
738
|
+
}
|
|
739
|
+
// 7.3.1.3
|
|
740
|
+
return O[P];
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
}, { "./IsPropertyKey": 15, "./Type": 25, "get-intrinsic": 41, "object-inspect": 52 }], 12: [function (require, module, exports) {
|
|
744
|
+
'use strict';
|
|
745
|
+
|
|
746
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
747
|
+
|
|
748
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
749
|
+
|
|
750
|
+
var IsPropertyKey = require('./IsPropertyKey');
|
|
751
|
+
var Type = require('./Type');
|
|
752
|
+
|
|
753
|
+
// https://ecma-international.org/ecma-262/6.0/#sec-hasproperty
|
|
754
|
+
|
|
755
|
+
module.exports = function HasProperty(O, P) {
|
|
756
|
+
if (Type(O) !== 'Object') {
|
|
757
|
+
throw new $TypeError('Assertion failed: `O` must be an Object');
|
|
758
|
+
}
|
|
759
|
+
if (!IsPropertyKey(P)) {
|
|
760
|
+
throw new $TypeError('Assertion failed: `P` must be a Property Key');
|
|
761
|
+
}
|
|
762
|
+
return P in O;
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
}, { "./IsPropertyKey": 15, "./Type": 25, "get-intrinsic": 41 }], 13: [function (require, module, exports) {
|
|
766
|
+
'use strict';
|
|
767
|
+
|
|
768
|
+
// https://ecma-international.org/ecma-262/6.0/#sec-isarray
|
|
769
|
+
module.exports = require('../helpers/IsArray');
|
|
770
|
+
|
|
771
|
+
}, { "../helpers/IsArray": 30 }], 14: [function (require, module, exports) {
|
|
772
|
+
'use strict';
|
|
773
|
+
|
|
774
|
+
// http://262.ecma-international.org/5.1/#sec-9.11
|
|
775
|
+
|
|
776
|
+
module.exports = require('is-callable');
|
|
777
|
+
|
|
778
|
+
}, { "is-callable": 47 }], 15: [function (require, module, exports) {
|
|
779
|
+
'use strict';
|
|
780
|
+
|
|
781
|
+
// https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey
|
|
782
|
+
|
|
783
|
+
module.exports = function IsPropertyKey(argument) {
|
|
784
|
+
return typeof argument === 'string' || typeof argument === 'symbol';
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
}, {}], 16: [function (require, module, exports) {
|
|
788
|
+
'use strict';
|
|
789
|
+
|
|
790
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
791
|
+
|
|
792
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
793
|
+
|
|
794
|
+
var Get = require('./Get');
|
|
795
|
+
var ToLength = require('./ToLength');
|
|
796
|
+
var Type = require('./Type');
|
|
797
|
+
|
|
798
|
+
// https://262.ecma-international.org/11.0/#sec-lengthofarraylike
|
|
799
|
+
|
|
800
|
+
module.exports = function LengthOfArrayLike(obj) {
|
|
801
|
+
if (Type(obj) !== 'Object') {
|
|
802
|
+
throw new $TypeError('Assertion failed: `obj` must be an Object');
|
|
803
|
+
}
|
|
804
|
+
return ToLength(Get(obj, 'length'));
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
// TODO: use this all over
|
|
808
|
+
|
|
809
|
+
}, { "./Get": 11, "./ToLength": 20, "./Type": 25, "get-intrinsic": 41 }], 17: [function (require, module, exports) {
|
|
810
|
+
'use strict';
|
|
811
|
+
|
|
812
|
+
module.exports = require('../5/CheckObjectCoercible');
|
|
813
|
+
|
|
814
|
+
}, { "../5/CheckObjectCoercible": 28 }], 18: [function (require, module, exports) {
|
|
815
|
+
'use strict';
|
|
816
|
+
|
|
817
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
818
|
+
|
|
819
|
+
var $Number = GetIntrinsic('%Number%');
|
|
820
|
+
var $RegExp = GetIntrinsic('%RegExp%');
|
|
821
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
822
|
+
var $parseInteger = GetIntrinsic('%parseInt%');
|
|
823
|
+
|
|
824
|
+
var callBound = require('call-bind/callBound');
|
|
825
|
+
var regexTester = require('safe-regex-test');
|
|
826
|
+
|
|
827
|
+
var $strSlice = callBound('String.prototype.slice');
|
|
828
|
+
var isBinary = regexTester(/^0b[01]+$/i);
|
|
829
|
+
var isOctal = regexTester(/^0o[0-7]+$/i);
|
|
830
|
+
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
|
|
831
|
+
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
|
|
832
|
+
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
|
|
833
|
+
var hasNonWS = regexTester(nonWSregex);
|
|
834
|
+
|
|
835
|
+
// whitespace from: https://es5.github.io/#x15.5.4.20
|
|
836
|
+
// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324
|
|
837
|
+
var ws = [
|
|
838
|
+
'\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003',
|
|
839
|
+
'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028',
|
|
840
|
+
'\u2029\uFEFF'
|
|
841
|
+
].join('');
|
|
842
|
+
var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g');
|
|
843
|
+
var $replace = callBound('String.prototype.replace');
|
|
844
|
+
var $trim = function (value) {
|
|
845
|
+
return $replace(value, trimRegex, '');
|
|
846
|
+
};
|
|
847
|
+
|
|
848
|
+
var Type = require('./Type');
|
|
849
|
+
|
|
850
|
+
// https://ecma-international.org/ecma-262/13.0/#sec-stringtonumber
|
|
851
|
+
|
|
852
|
+
module.exports = function StringToNumber(argument) {
|
|
853
|
+
if (Type(argument) !== 'String') {
|
|
854
|
+
throw new $TypeError('Assertion failed: `argument` is not a String');
|
|
855
|
+
}
|
|
856
|
+
if (isBinary(argument)) {
|
|
857
|
+
return $Number($parseInteger($strSlice(argument, 2), 2));
|
|
858
|
+
}
|
|
859
|
+
if (isOctal(argument)) {
|
|
860
|
+
return $Number($parseInteger($strSlice(argument, 2), 8));
|
|
861
|
+
}
|
|
862
|
+
if (hasNonWS(argument) || isInvalidHexLiteral(argument)) {
|
|
863
|
+
return NaN;
|
|
864
|
+
}
|
|
865
|
+
var trimmed = $trim(argument);
|
|
866
|
+
if (trimmed !== argument) {
|
|
867
|
+
return StringToNumber(trimmed);
|
|
868
|
+
}
|
|
869
|
+
return $Number(argument);
|
|
870
|
+
};
|
|
871
|
+
|
|
872
|
+
}, { "./Type": 25, "call-bind/callBound": 7, "get-intrinsic": 41, "safe-regex-test": 60 }], 19: [function (require, module, exports) {
|
|
873
|
+
'use strict';
|
|
874
|
+
|
|
875
|
+
var abs = require('./abs');
|
|
876
|
+
var floor = require('./floor');
|
|
877
|
+
var ToNumber = require('./ToNumber');
|
|
878
|
+
|
|
879
|
+
var $isNaN = require('../helpers/isNaN');
|
|
880
|
+
var $isFinite = require('../helpers/isFinite');
|
|
881
|
+
var $sign = require('../helpers/sign');
|
|
882
|
+
|
|
883
|
+
// https://262.ecma-international.org/12.0/#sec-tointegerorinfinity
|
|
884
|
+
|
|
885
|
+
module.exports = function ToIntegerOrInfinity(value) {
|
|
886
|
+
var number = ToNumber(value);
|
|
887
|
+
if ($isNaN(number) || number === 0) { return 0; }
|
|
888
|
+
if (!$isFinite(number)) { return number; }
|
|
889
|
+
var integer = floor(abs(number));
|
|
890
|
+
if (integer === 0) { return 0; }
|
|
891
|
+
return $sign(number) * integer;
|
|
892
|
+
};
|
|
893
|
+
|
|
894
|
+
}, { "../helpers/isFinite": 31, "../helpers/isNaN": 32, "../helpers/sign": 35, "./ToNumber": 21, "./abs": 26, "./floor": 27 }], 20: [function (require, module, exports) {
|
|
895
|
+
'use strict';
|
|
896
|
+
|
|
897
|
+
var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');
|
|
898
|
+
|
|
899
|
+
var ToIntegerOrInfinity = require('./ToIntegerOrInfinity');
|
|
900
|
+
|
|
901
|
+
module.exports = function ToLength(argument) {
|
|
902
|
+
var len = ToIntegerOrInfinity(argument);
|
|
903
|
+
if (len <= 0) { return 0; } // includes converting -0 to +0
|
|
904
|
+
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
|
|
905
|
+
return len;
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
}, { "../helpers/maxSafeInteger": 34, "./ToIntegerOrInfinity": 19 }], 21: [function (require, module, exports) {
|
|
909
|
+
'use strict';
|
|
910
|
+
|
|
911
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
912
|
+
|
|
913
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
914
|
+
var $Number = GetIntrinsic('%Number%');
|
|
915
|
+
var isPrimitive = require('../helpers/isPrimitive');
|
|
916
|
+
|
|
917
|
+
var ToPrimitive = require('./ToPrimitive');
|
|
918
|
+
var StringToNumber = require('./StringToNumber');
|
|
919
|
+
|
|
920
|
+
// https://ecma-international.org/ecma-262/13.0/#sec-tonumber
|
|
921
|
+
|
|
922
|
+
module.exports = function ToNumber(argument) {
|
|
923
|
+
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
|
|
924
|
+
if (typeof value === 'symbol') {
|
|
925
|
+
throw new $TypeError('Cannot convert a Symbol value to a number');
|
|
926
|
+
}
|
|
927
|
+
if (typeof value === 'bigint') {
|
|
928
|
+
throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.');
|
|
929
|
+
}
|
|
930
|
+
if (typeof value === 'string') {
|
|
931
|
+
return StringToNumber(value);
|
|
932
|
+
}
|
|
933
|
+
return $Number(value);
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
}, { "../helpers/isPrimitive": 33, "./StringToNumber": 18, "./ToPrimitive": 23, "get-intrinsic": 41 }], 22: [function (require, module, exports) {
|
|
937
|
+
'use strict';
|
|
938
|
+
|
|
939
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
940
|
+
|
|
941
|
+
var $Object = GetIntrinsic('%Object%');
|
|
942
|
+
|
|
943
|
+
var RequireObjectCoercible = require('./RequireObjectCoercible');
|
|
944
|
+
|
|
945
|
+
// https://ecma-international.org/ecma-262/6.0/#sec-toobject
|
|
946
|
+
|
|
947
|
+
module.exports = function ToObject(value) {
|
|
948
|
+
RequireObjectCoercible(value);
|
|
949
|
+
return $Object(value);
|
|
950
|
+
};
|
|
951
|
+
|
|
952
|
+
}, { "./RequireObjectCoercible": 17, "get-intrinsic": 41 }], 23: [function (require, module, exports) {
|
|
953
|
+
'use strict';
|
|
954
|
+
|
|
955
|
+
var toPrimitive = require('es-to-primitive/es2015');
|
|
956
|
+
|
|
957
|
+
// https://ecma-international.org/ecma-262/6.0/#sec-toprimitive
|
|
958
|
+
|
|
959
|
+
module.exports = function ToPrimitive(input) {
|
|
960
|
+
if (arguments.length > 1) {
|
|
961
|
+
return toPrimitive(input, arguments[1]);
|
|
962
|
+
}
|
|
963
|
+
return toPrimitive(input);
|
|
964
|
+
};
|
|
965
|
+
|
|
966
|
+
}, { "es-to-primitive/es2015": 37 }], 24: [function (require, module, exports) {
|
|
967
|
+
'use strict';
|
|
968
|
+
|
|
969
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
970
|
+
|
|
971
|
+
var $String = GetIntrinsic('%String%');
|
|
972
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
973
|
+
|
|
974
|
+
// https://ecma-international.org/ecma-262/6.0/#sec-tostring
|
|
975
|
+
|
|
976
|
+
module.exports = function ToString(argument) {
|
|
977
|
+
if (typeof argument === 'symbol') {
|
|
978
|
+
throw new $TypeError('Cannot convert a Symbol value to a string');
|
|
979
|
+
}
|
|
980
|
+
return $String(argument);
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
}, { "get-intrinsic": 41 }], 25: [function (require, module, exports) {
|
|
984
|
+
'use strict';
|
|
985
|
+
|
|
986
|
+
var ES5Type = require('../5/Type');
|
|
987
|
+
|
|
988
|
+
// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
|
|
989
|
+
|
|
990
|
+
module.exports = function Type(x) {
|
|
991
|
+
if (typeof x === 'symbol') {
|
|
992
|
+
return 'Symbol';
|
|
993
|
+
}
|
|
994
|
+
if (typeof x === 'bigint') {
|
|
995
|
+
return 'BigInt';
|
|
996
|
+
}
|
|
997
|
+
return ES5Type(x);
|
|
998
|
+
};
|
|
999
|
+
|
|
1000
|
+
}, { "../5/Type": 29 }], 26: [function (require, module, exports) {
|
|
1001
|
+
'use strict';
|
|
1002
|
+
|
|
1003
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
1004
|
+
|
|
1005
|
+
var $abs = GetIntrinsic('%Math.abs%');
|
|
1006
|
+
|
|
1007
|
+
// http://262.ecma-international.org/5.1/#sec-5.2
|
|
1008
|
+
|
|
1009
|
+
module.exports = function abs(x) {
|
|
1010
|
+
return $abs(x);
|
|
1011
|
+
};
|
|
1012
|
+
|
|
1013
|
+
}, { "get-intrinsic": 41 }], 27: [function (require, module, exports) {
|
|
1014
|
+
'use strict';
|
|
1015
|
+
|
|
1016
|
+
var Type = require('./Type');
|
|
1017
|
+
|
|
1018
|
+
// var modulo = require('./modulo');
|
|
1019
|
+
var $floor = Math.floor;
|
|
1020
|
+
|
|
1021
|
+
// http://262.ecma-international.org/11.0/#eqn-floor
|
|
1022
|
+
|
|
1023
|
+
module.exports = function floor(x) {
|
|
1024
|
+
// return x - modulo(x, 1);
|
|
1025
|
+
if (Type(x) === 'BigInt') {
|
|
1026
|
+
return x;
|
|
1027
|
+
}
|
|
1028
|
+
return $floor(x);
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1031
|
+
}, { "./Type": 25 }], 28: [function (require, module, exports) {
|
|
1032
|
+
'use strict';
|
|
1033
|
+
|
|
1034
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
1035
|
+
|
|
1036
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
1037
|
+
|
|
1038
|
+
// http://262.ecma-international.org/5.1/#sec-9.10
|
|
1039
|
+
|
|
1040
|
+
module.exports = function CheckObjectCoercible(value, optMessage) {
|
|
1041
|
+
if (value == null) {
|
|
1042
|
+
throw new $TypeError(optMessage || ('Cannot call method on ' + value));
|
|
1043
|
+
}
|
|
1044
|
+
return value;
|
|
1045
|
+
};
|
|
1046
|
+
|
|
1047
|
+
}, { "get-intrinsic": 41 }], 29: [function (require, module, exports) {
|
|
1048
|
+
'use strict';
|
|
1049
|
+
|
|
1050
|
+
// https://262.ecma-international.org/5.1/#sec-8
|
|
1051
|
+
|
|
1052
|
+
module.exports = function Type(x) {
|
|
1053
|
+
if (x === null) {
|
|
1054
|
+
return 'Null';
|
|
1055
|
+
}
|
|
1056
|
+
if (typeof x === 'undefined') {
|
|
1057
|
+
return 'Undefined';
|
|
1058
|
+
}
|
|
1059
|
+
if (typeof x === 'function' || typeof x === 'object') {
|
|
1060
|
+
return 'Object';
|
|
1061
|
+
}
|
|
1062
|
+
if (typeof x === 'number') {
|
|
1063
|
+
return 'Number';
|
|
1064
|
+
}
|
|
1065
|
+
if (typeof x === 'boolean') {
|
|
1066
|
+
return 'Boolean';
|
|
1067
|
+
}
|
|
1068
|
+
if (typeof x === 'string') {
|
|
1069
|
+
return 'String';
|
|
1070
|
+
}
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
}, {}], 30: [function (require, module, exports) {
|
|
1074
|
+
'use strict';
|
|
1075
|
+
|
|
1076
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
1077
|
+
|
|
1078
|
+
var $Array = GetIntrinsic('%Array%');
|
|
1079
|
+
|
|
1080
|
+
// eslint-disable-next-line global-require
|
|
1081
|
+
var toStr = !$Array.isArray && require('call-bind/callBound')('Object.prototype.toString');
|
|
1082
|
+
|
|
1083
|
+
module.exports = $Array.isArray || function IsArray(argument) {
|
|
1084
|
+
return toStr(argument) === '[object Array]';
|
|
1085
|
+
};
|
|
1086
|
+
|
|
1087
|
+
}, { "call-bind/callBound": 7, "get-intrinsic": 41 }], 31: [function (require, module, exports) {
|
|
1088
|
+
'use strict';
|
|
1089
|
+
|
|
1090
|
+
var $isNaN = require('./isNaN');
|
|
1091
|
+
|
|
1092
|
+
module.exports = function (x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };
|
|
1093
|
+
|
|
1094
|
+
}, { "./isNaN": 32 }], 32: [function (require, module, exports) {
|
|
1095
|
+
'use strict';
|
|
1096
|
+
|
|
1097
|
+
module.exports = Number.isNaN || function isNaN(a) {
|
|
1098
|
+
return a !== a;
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1101
|
+
}, {}], 33: [function (require, module, exports) {
|
|
1102
|
+
'use strict';
|
|
1103
|
+
|
|
1104
|
+
module.exports = function isPrimitive(value) {
|
|
1105
|
+
return value === null || (typeof value !== 'function' && typeof value !== 'object');
|
|
1106
|
+
};
|
|
1107
|
+
|
|
1108
|
+
}, {}], 34: [function (require, module, exports) {
|
|
1109
|
+
'use strict';
|
|
1110
|
+
|
|
1111
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
1112
|
+
|
|
1113
|
+
var $Math = GetIntrinsic('%Math%');
|
|
1114
|
+
var $Number = GetIntrinsic('%Number%');
|
|
1115
|
+
|
|
1116
|
+
module.exports = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1;
|
|
1117
|
+
|
|
1118
|
+
}, { "get-intrinsic": 41 }], 35: [function (require, module, exports) {
|
|
1119
|
+
'use strict';
|
|
1120
|
+
|
|
1121
|
+
module.exports = function sign(number) {
|
|
1122
|
+
return number >= 0 ? 1 : -1;
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
}, {}], 36: [function (require, module, exports) {
|
|
1126
|
+
module.exports = function properlyBoxed(method) {
|
|
1127
|
+
// Check node 0.6.21 bug where third parameter is not boxed
|
|
1128
|
+
var properlyBoxesNonStrict = true;
|
|
1129
|
+
var properlyBoxesStrict = true;
|
|
1130
|
+
var threwException = false;
|
|
1131
|
+
if (typeof method === 'function') {
|
|
1132
|
+
try {
|
|
1133
|
+
// eslint-disable-next-line max-params
|
|
1134
|
+
method.call('f', function (_, __, O) {
|
|
1135
|
+
if (typeof O !== 'object') {
|
|
1136
|
+
properlyBoxesNonStrict = false;
|
|
1137
|
+
}
|
|
1138
|
+
});
|
|
1139
|
+
|
|
1140
|
+
method.call(
|
|
1141
|
+
[null],
|
|
1142
|
+
function () {
|
|
1143
|
+
'use strict';
|
|
1144
|
+
|
|
1145
|
+
properlyBoxesStrict = typeof this === 'string'; // eslint-disable-line no-invalid-this
|
|
1146
|
+
},
|
|
1147
|
+
'x'
|
|
1148
|
+
);
|
|
1149
|
+
} catch (e) {
|
|
1150
|
+
threwException = true;
|
|
1151
|
+
}
|
|
1152
|
+
return !threwException && properlyBoxesNonStrict && properlyBoxesStrict;
|
|
1153
|
+
}
|
|
1154
|
+
return false;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1157
|
+
}, {}], 37: [function (require, module, exports) {
|
|
1158
|
+
'use strict';
|
|
1159
|
+
|
|
1160
|
+
var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
|
|
1161
|
+
|
|
1162
|
+
var isPrimitive = require('./helpers/isPrimitive');
|
|
1163
|
+
var isCallable = require('is-callable');
|
|
1164
|
+
var isDate = require('is-date-object');
|
|
1165
|
+
var isSymbol = require('is-symbol');
|
|
1166
|
+
|
|
1167
|
+
var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {
|
|
1168
|
+
if (typeof O === 'undefined' || O === null) {
|
|
1169
|
+
throw new TypeError('Cannot call method on ' + O);
|
|
1170
|
+
}
|
|
1171
|
+
if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {
|
|
1172
|
+
throw new TypeError('hint must be "string" or "number"');
|
|
1173
|
+
}
|
|
1174
|
+
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
|
|
1175
|
+
var method, result, i;
|
|
1176
|
+
for (i = 0; i < methodNames.length; ++i) {
|
|
1177
|
+
method = O[methodNames[i]];
|
|
1178
|
+
if (isCallable(method)) {
|
|
1179
|
+
result = method.call(O);
|
|
1180
|
+
if (isPrimitive(result)) {
|
|
1181
|
+
return result;
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
throw new TypeError('No default value');
|
|
1186
|
+
};
|
|
1187
|
+
|
|
1188
|
+
var GetMethod = function GetMethod(O, P) {
|
|
1189
|
+
var func = O[P];
|
|
1190
|
+
if (func !== null && typeof func !== 'undefined') {
|
|
1191
|
+
if (!isCallable(func)) {
|
|
1192
|
+
throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');
|
|
1193
|
+
}
|
|
1194
|
+
return func;
|
|
1195
|
+
}
|
|
1196
|
+
return void 0;
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive
|
|
1200
|
+
module.exports = function ToPrimitive(input) {
|
|
1201
|
+
if (isPrimitive(input)) {
|
|
1202
|
+
return input;
|
|
1203
|
+
}
|
|
1204
|
+
var hint = 'default';
|
|
1205
|
+
if (arguments.length > 1) {
|
|
1206
|
+
if (arguments[1] === String) {
|
|
1207
|
+
hint = 'string';
|
|
1208
|
+
} else if (arguments[1] === Number) {
|
|
1209
|
+
hint = 'number';
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
var exoticToPrim;
|
|
1214
|
+
if (hasSymbols) {
|
|
1215
|
+
if (Symbol.toPrimitive) {
|
|
1216
|
+
exoticToPrim = GetMethod(input, Symbol.toPrimitive);
|
|
1217
|
+
} else if (isSymbol(input)) {
|
|
1218
|
+
exoticToPrim = Symbol.prototype.valueOf;
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
if (typeof exoticToPrim !== 'undefined') {
|
|
1222
|
+
var result = exoticToPrim.call(input, hint);
|
|
1223
|
+
if (isPrimitive(result)) {
|
|
1224
|
+
return result;
|
|
1225
|
+
}
|
|
1226
|
+
throw new TypeError('unable to convert exotic object to primitive');
|
|
1227
|
+
}
|
|
1228
|
+
if (hint === 'default' && (isDate(input) || isSymbol(input))) {
|
|
1229
|
+
hint = 'string';
|
|
1230
|
+
}
|
|
1231
|
+
return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);
|
|
1232
|
+
};
|
|
1233
|
+
|
|
1234
|
+
}, { "./helpers/isPrimitive": 38, "is-callable": 47, "is-date-object": 48, "is-symbol": 51 }], 38: [function (require, module, exports) {
|
|
1235
|
+
arguments[4][33][0].apply(exports, arguments)
|
|
1236
|
+
}, { "dup": 33 }], 39: [function (require, module, exports) {
|
|
1237
|
+
'use strict';
|
|
1238
|
+
|
|
1239
|
+
/* eslint no-invalid-this: 1 */
|
|
1240
|
+
|
|
1241
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
1242
|
+
var slice = Array.prototype.slice;
|
|
1243
|
+
var toStr = Object.prototype.toString;
|
|
1244
|
+
var funcType = '[object Function]';
|
|
1245
|
+
|
|
1246
|
+
module.exports = function bind(that) {
|
|
1247
|
+
var target = this;
|
|
1248
|
+
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
|
|
1249
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
1250
|
+
}
|
|
1251
|
+
var args = slice.call(arguments, 1);
|
|
1252
|
+
|
|
1253
|
+
var bound;
|
|
1254
|
+
var binder = function () {
|
|
1255
|
+
if (this instanceof bound) {
|
|
1256
|
+
var result = target.apply(
|
|
1257
|
+
this,
|
|
1258
|
+
args.concat(slice.call(arguments))
|
|
1259
|
+
);
|
|
1260
|
+
if (Object(result) === result) {
|
|
1261
|
+
return result;
|
|
1262
|
+
}
|
|
1263
|
+
return this;
|
|
1264
|
+
} else {
|
|
1265
|
+
return target.apply(
|
|
1266
|
+
that,
|
|
1267
|
+
args.concat(slice.call(arguments))
|
|
1268
|
+
);
|
|
1269
|
+
}
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1272
|
+
var boundLength = Math.max(0, target.length - args.length);
|
|
1273
|
+
var boundArgs = [];
|
|
1274
|
+
for (var i = 0; i < boundLength; i++) {
|
|
1275
|
+
boundArgs.push('$' + i);
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
1279
|
+
|
|
1280
|
+
if (target.prototype) {
|
|
1281
|
+
var Empty = function Empty() { };
|
|
1282
|
+
Empty.prototype = target.prototype;
|
|
1283
|
+
bound.prototype = new Empty();
|
|
1284
|
+
Empty.prototype = null;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
return bound;
|
|
1288
|
+
};
|
|
1289
|
+
|
|
1290
|
+
}, {}], 40: [function (require, module, exports) {
|
|
1291
|
+
'use strict';
|
|
1292
|
+
|
|
1293
|
+
var implementation = require('./implementation');
|
|
1294
|
+
|
|
1295
|
+
module.exports = Function.prototype.bind || implementation;
|
|
1296
|
+
|
|
1297
|
+
}, { "./implementation": 39 }], 41: [function (require, module, exports) {
|
|
1298
|
+
'use strict';
|
|
1299
|
+
|
|
1300
|
+
var undefined;
|
|
1301
|
+
|
|
1302
|
+
var $SyntaxError = SyntaxError;
|
|
1303
|
+
var $Function = Function;
|
|
1304
|
+
var $TypeError = TypeError;
|
|
1305
|
+
|
|
1306
|
+
// eslint-disable-next-line consistent-return
|
|
1307
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
1308
|
+
try {
|
|
1309
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
1310
|
+
} catch (e) { }
|
|
1311
|
+
};
|
|
1312
|
+
|
|
1313
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
1314
|
+
if ($gOPD) {
|
|
1315
|
+
try {
|
|
1316
|
+
$gOPD({}, '');
|
|
1317
|
+
} catch (e) {
|
|
1318
|
+
$gOPD = null; // this is IE 8, which has a broken gOPD
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
var throwTypeError = function () {
|
|
1323
|
+
throw new $TypeError();
|
|
1324
|
+
};
|
|
1325
|
+
var ThrowTypeError = $gOPD
|
|
1326
|
+
? (function () {
|
|
1327
|
+
try {
|
|
1328
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
1329
|
+
arguments.callee; // IE 8 does not throw here
|
|
1330
|
+
return throwTypeError;
|
|
1331
|
+
} catch (calleeThrows) {
|
|
1332
|
+
try {
|
|
1333
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
1334
|
+
return $gOPD(arguments, 'callee').get;
|
|
1335
|
+
} catch (gOPDthrows) {
|
|
1336
|
+
return throwTypeError;
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
}())
|
|
1340
|
+
: throwTypeError;
|
|
1341
|
+
|
|
1342
|
+
var hasSymbols = require('has-symbols')();
|
|
1343
|
+
|
|
1344
|
+
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
|
1345
|
+
|
|
1346
|
+
var needsEval = {};
|
|
1347
|
+
|
|
1348
|
+
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
|
|
1349
|
+
|
|
1350
|
+
var INTRINSICS = {
|
|
1351
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
|
|
1352
|
+
'%Array%': Array,
|
|
1353
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
|
|
1354
|
+
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
|
|
1355
|
+
'%AsyncFromSyncIteratorPrototype%': undefined,
|
|
1356
|
+
'%AsyncFunction%': needsEval,
|
|
1357
|
+
'%AsyncGenerator%': needsEval,
|
|
1358
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
1359
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
1360
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
|
|
1361
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
|
|
1362
|
+
'%Boolean%': Boolean,
|
|
1363
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
|
|
1364
|
+
'%Date%': Date,
|
|
1365
|
+
'%decodeURI%': decodeURI,
|
|
1366
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
1367
|
+
'%encodeURI%': encodeURI,
|
|
1368
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
1369
|
+
'%Error%': Error,
|
|
1370
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
1371
|
+
'%EvalError%': EvalError,
|
|
1372
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
|
|
1373
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
|
|
1374
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
|
|
1375
|
+
'%Function%': $Function,
|
|
1376
|
+
'%GeneratorFunction%': needsEval,
|
|
1377
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
|
|
1378
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
|
|
1379
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
|
|
1380
|
+
'%isFinite%': isFinite,
|
|
1381
|
+
'%isNaN%': isNaN,
|
|
1382
|
+
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
|
1383
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
|
|
1384
|
+
'%Map%': typeof Map === 'undefined' ? undefined : Map,
|
|
1385
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
|
|
1386
|
+
'%Math%': Math,
|
|
1387
|
+
'%Number%': Number,
|
|
1388
|
+
'%Object%': Object,
|
|
1389
|
+
'%parseFloat%': parseFloat,
|
|
1390
|
+
'%parseInt%': parseInt,
|
|
1391
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
|
|
1392
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
|
|
1393
|
+
'%RangeError%': RangeError,
|
|
1394
|
+
'%ReferenceError%': ReferenceError,
|
|
1395
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
|
|
1396
|
+
'%RegExp%': RegExp,
|
|
1397
|
+
'%Set%': typeof Set === 'undefined' ? undefined : Set,
|
|
1398
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
|
|
1399
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
|
|
1400
|
+
'%String%': String,
|
|
1401
|
+
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
|
|
1402
|
+
'%Symbol%': hasSymbols ? Symbol : undefined,
|
|
1403
|
+
'%SyntaxError%': $SyntaxError,
|
|
1404
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
1405
|
+
'%TypedArray%': TypedArray,
|
|
1406
|
+
'%TypeError%': $TypeError,
|
|
1407
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
|
|
1408
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
|
|
1409
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
|
|
1410
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
|
|
1411
|
+
'%URIError%': URIError,
|
|
1412
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
|
|
1413
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
|
|
1414
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
|
|
1415
|
+
};
|
|
1416
|
+
|
|
1417
|
+
var doEval = function doEval(name) {
|
|
1418
|
+
var value;
|
|
1419
|
+
if (name === '%AsyncFunction%') {
|
|
1420
|
+
value = getEvalledConstructor('async function () {}');
|
|
1421
|
+
} else if (name === '%GeneratorFunction%') {
|
|
1422
|
+
value = getEvalledConstructor('function* () {}');
|
|
1423
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
1424
|
+
value = getEvalledConstructor('async function* () {}');
|
|
1425
|
+
} else if (name === '%AsyncGenerator%') {
|
|
1426
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
1427
|
+
if (fn) {
|
|
1428
|
+
value = fn.prototype;
|
|
1429
|
+
}
|
|
1430
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
1431
|
+
var gen = doEval('%AsyncGenerator%');
|
|
1432
|
+
if (gen) {
|
|
1433
|
+
value = getProto(gen.prototype);
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
INTRINSICS[name] = value;
|
|
1438
|
+
|
|
1439
|
+
return value;
|
|
1440
|
+
};
|
|
1441
|
+
|
|
1442
|
+
var LEGACY_ALIASES = {
|
|
1443
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
1444
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
1445
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
1446
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
1447
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
1448
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
1449
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
1450
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
1451
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
1452
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
1453
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
1454
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
1455
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
1456
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
1457
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
1458
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
1459
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
1460
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
1461
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
1462
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
1463
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
1464
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
1465
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
1466
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
1467
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
1468
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
1469
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
1470
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
1471
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
1472
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
1473
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
1474
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
1475
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
1476
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
1477
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
1478
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
1479
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
1480
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
1481
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
1482
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
1483
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
1484
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
1485
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
1486
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
1487
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
1488
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
1489
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
1490
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
1491
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
1492
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
1493
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
1494
|
+
};
|
|
1495
|
+
|
|
1496
|
+
var bind = require('function-bind');
|
|
1497
|
+
var hasOwn = require('has');
|
|
1498
|
+
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
1499
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
1500
|
+
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
1501
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
1502
|
+
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
1503
|
+
|
|
1504
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
1505
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1506
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
1507
|
+
var stringToPath = function stringToPath(string) {
|
|
1508
|
+
var first = $strSlice(string, 0, 1);
|
|
1509
|
+
var last = $strSlice(string, -1);
|
|
1510
|
+
if (first === '%' && last !== '%') {
|
|
1511
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
1512
|
+
} else if (last === '%' && first !== '%') {
|
|
1513
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
1514
|
+
}
|
|
1515
|
+
var result = [];
|
|
1516
|
+
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
1517
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
1518
|
+
});
|
|
1519
|
+
return result;
|
|
1520
|
+
};
|
|
1521
|
+
/* end adaptation */
|
|
1522
|
+
|
|
1523
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
1524
|
+
var intrinsicName = name;
|
|
1525
|
+
var alias;
|
|
1526
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
1527
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
1528
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
1532
|
+
var value = INTRINSICS[intrinsicName];
|
|
1533
|
+
if (value === needsEval) {
|
|
1534
|
+
value = doEval(intrinsicName);
|
|
1535
|
+
}
|
|
1536
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
1537
|
+
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
return {
|
|
1541
|
+
alias: alias,
|
|
1542
|
+
name: intrinsicName,
|
|
1543
|
+
value: value
|
|
1544
|
+
};
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
1548
|
+
};
|
|
1549
|
+
|
|
1550
|
+
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
1551
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
1552
|
+
throw new $TypeError('intrinsic name must be a non-empty string');
|
|
1553
|
+
}
|
|
1554
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
1555
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
1559
|
+
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
1560
|
+
}
|
|
1561
|
+
var parts = stringToPath(name);
|
|
1562
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
1563
|
+
|
|
1564
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
1565
|
+
var intrinsicRealName = intrinsic.name;
|
|
1566
|
+
var value = intrinsic.value;
|
|
1567
|
+
var skipFurtherCaching = false;
|
|
1568
|
+
|
|
1569
|
+
var alias = intrinsic.alias;
|
|
1570
|
+
if (alias) {
|
|
1571
|
+
intrinsicBaseName = alias[0];
|
|
1572
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1576
|
+
var part = parts[i];
|
|
1577
|
+
var first = $strSlice(part, 0, 1);
|
|
1578
|
+
var last = $strSlice(part, -1);
|
|
1579
|
+
if (
|
|
1580
|
+
(
|
|
1581
|
+
(first === '"' || first === "'" || first === '`')
|
|
1582
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
1583
|
+
)
|
|
1584
|
+
&& first !== last
|
|
1585
|
+
) {
|
|
1586
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
1587
|
+
}
|
|
1588
|
+
if (part === 'constructor' || !isOwn) {
|
|
1589
|
+
skipFurtherCaching = true;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
intrinsicBaseName += '.' + part;
|
|
1593
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
1594
|
+
|
|
1595
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
1596
|
+
value = INTRINSICS[intrinsicRealName];
|
|
1597
|
+
} else if (value != null) {
|
|
1598
|
+
if (!(part in value)) {
|
|
1599
|
+
if (!allowMissing) {
|
|
1600
|
+
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
1601
|
+
}
|
|
1602
|
+
return void undefined;
|
|
1603
|
+
}
|
|
1604
|
+
if ($gOPD && (i + 1) >= parts.length) {
|
|
1605
|
+
var desc = $gOPD(value, part);
|
|
1606
|
+
isOwn = !!desc;
|
|
1607
|
+
|
|
1608
|
+
// By convention, when a data property is converted to an accessor
|
|
1609
|
+
// property to emulate a data property that does not suffer from
|
|
1610
|
+
// the override mistake, that accessor's getter is marked with
|
|
1611
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
1612
|
+
// uphold the illusion by pretending to see that original data
|
|
1613
|
+
// property, i.e., returning the value rather than the getter
|
|
1614
|
+
// itself.
|
|
1615
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
1616
|
+
value = desc.get;
|
|
1617
|
+
} else {
|
|
1618
|
+
value = value[part];
|
|
1619
|
+
}
|
|
1620
|
+
} else {
|
|
1621
|
+
isOwn = hasOwn(value, part);
|
|
1622
|
+
value = value[part];
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
if (isOwn && !skipFurtherCaching) {
|
|
1626
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
return value;
|
|
1631
|
+
};
|
|
1632
|
+
|
|
1633
|
+
}, { "function-bind": 40, "has": 46, "has-symbols": 43 }], 42: [function (require, module, exports) {
|
|
1634
|
+
'use strict';
|
|
1635
|
+
|
|
1636
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
1637
|
+
|
|
1638
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
1639
|
+
|
|
1640
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|
1641
|
+
if ($defineProperty) {
|
|
1642
|
+
try {
|
|
1643
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
1644
|
+
return true;
|
|
1645
|
+
} catch (e) {
|
|
1646
|
+
// IE 8 has a broken defineProperty
|
|
1647
|
+
return false;
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
return false;
|
|
1651
|
+
};
|
|
1652
|
+
|
|
1653
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
1654
|
+
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
1655
|
+
if (!hasPropertyDescriptors()) {
|
|
1656
|
+
return null;
|
|
1657
|
+
}
|
|
1658
|
+
try {
|
|
1659
|
+
return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
|
1660
|
+
} catch (e) {
|
|
1661
|
+
// In Firefox 4-22, defining length on an array throws an exception.
|
|
1662
|
+
return true;
|
|
1663
|
+
}
|
|
1664
|
+
};
|
|
1665
|
+
|
|
1666
|
+
module.exports = hasPropertyDescriptors;
|
|
1667
|
+
|
|
1668
|
+
}, { "get-intrinsic": 41 }], 43: [function (require, module, exports) {
|
|
1669
|
+
'use strict';
|
|
1670
|
+
|
|
1671
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
1672
|
+
var hasSymbolSham = require('./shams');
|
|
1673
|
+
|
|
1674
|
+
module.exports = function hasNativeSymbols() {
|
|
1675
|
+
if (typeof origSymbol !== 'function') { return false; }
|
|
1676
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
1677
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
1678
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
1679
|
+
|
|
1680
|
+
return hasSymbolSham();
|
|
1681
|
+
};
|
|
1682
|
+
|
|
1683
|
+
}, { "./shams": 44 }], 44: [function (require, module, exports) {
|
|
1684
|
+
'use strict';
|
|
1685
|
+
|
|
1686
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
1687
|
+
module.exports = function hasSymbols() {
|
|
1688
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
1689
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
1690
|
+
|
|
1691
|
+
var obj = {};
|
|
1692
|
+
var sym = Symbol('test');
|
|
1693
|
+
var symObj = Object(sym);
|
|
1694
|
+
if (typeof sym === 'string') { return false; }
|
|
1695
|
+
|
|
1696
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
1697
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
1698
|
+
|
|
1699
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
1700
|
+
// if (sym instanceof Symbol) { return false; }
|
|
1701
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
1702
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
1703
|
+
|
|
1704
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
1705
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
1706
|
+
|
|
1707
|
+
var symVal = 42;
|
|
1708
|
+
obj[sym] = symVal;
|
|
1709
|
+
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
1710
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
1711
|
+
|
|
1712
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
1713
|
+
|
|
1714
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
1715
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
1716
|
+
|
|
1717
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
1718
|
+
|
|
1719
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
1720
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
1721
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
return true;
|
|
1725
|
+
};
|
|
1726
|
+
|
|
1727
|
+
}, {}], 45: [function (require, module, exports) {
|
|
1728
|
+
'use strict';
|
|
1729
|
+
|
|
1730
|
+
var hasSymbols = require('has-symbols/shams');
|
|
1731
|
+
|
|
1732
|
+
module.exports = function hasToStringTagShams() {
|
|
1733
|
+
return hasSymbols() && !!Symbol.toStringTag;
|
|
1734
|
+
};
|
|
1735
|
+
|
|
1736
|
+
}, { "has-symbols/shams": 44 }], 46: [function (require, module, exports) {
|
|
1737
|
+
'use strict';
|
|
1738
|
+
|
|
1739
|
+
var bind = require('function-bind');
|
|
1740
|
+
|
|
1741
|
+
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
|
|
1742
|
+
|
|
1743
|
+
}, { "function-bind": 40 }], 47: [function (require, module, exports) {
|
|
1744
|
+
'use strict';
|
|
1745
|
+
|
|
1746
|
+
var fnToStr = Function.prototype.toString;
|
|
1747
|
+
var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
|
|
1748
|
+
var badArrayLike;
|
|
1749
|
+
var isCallableMarker;
|
|
1750
|
+
if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
|
|
1751
|
+
try {
|
|
1752
|
+
badArrayLike = Object.defineProperty({}, 'length', {
|
|
1753
|
+
get: function () {
|
|
1754
|
+
throw isCallableMarker;
|
|
1755
|
+
}
|
|
1756
|
+
});
|
|
1757
|
+
isCallableMarker = {};
|
|
1758
|
+
// eslint-disable-next-line no-throw-literal
|
|
1759
|
+
reflectApply(function () { throw 42; }, null, badArrayLike);
|
|
1760
|
+
} catch (_) {
|
|
1761
|
+
if (_ !== isCallableMarker) {
|
|
1762
|
+
reflectApply = null;
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
} else {
|
|
1766
|
+
reflectApply = null;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
var constructorRegex = /^\s*class\b/;
|
|
1770
|
+
var isES6ClassFn = function isES6ClassFunction(value) {
|
|
1771
|
+
try {
|
|
1772
|
+
var fnStr = fnToStr.call(value);
|
|
1773
|
+
return constructorRegex.test(fnStr);
|
|
1774
|
+
} catch (e) {
|
|
1775
|
+
return false; // not a function
|
|
1776
|
+
}
|
|
1777
|
+
};
|
|
1778
|
+
|
|
1779
|
+
var tryFunctionObject = function tryFunctionToStr(value) {
|
|
1780
|
+
try {
|
|
1781
|
+
if (isES6ClassFn(value)) { return false; }
|
|
1782
|
+
fnToStr.call(value);
|
|
1783
|
+
return true;
|
|
1784
|
+
} catch (e) {
|
|
1785
|
+
return false;
|
|
1786
|
+
}
|
|
1787
|
+
};
|
|
1788
|
+
var toStr = Object.prototype.toString;
|
|
1789
|
+
var objectClass = '[object Object]';
|
|
1790
|
+
var fnClass = '[object Function]';
|
|
1791
|
+
var genClass = '[object GeneratorFunction]';
|
|
1792
|
+
var ddaClass = '[object HTMLAllCollection]'; // IE 11
|
|
1793
|
+
var ddaClass2 = '[object HTML document.all class]';
|
|
1794
|
+
var ddaClass3 = '[object HTMLCollection]'; // IE 9-10
|
|
1795
|
+
var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
|
|
1796
|
+
|
|
1797
|
+
var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing
|
|
1798
|
+
|
|
1799
|
+
var isDDA = function isDocumentDotAll() { return false; };
|
|
1800
|
+
if (typeof document === 'object') {
|
|
1801
|
+
// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly
|
|
1802
|
+
var all = document.all;
|
|
1803
|
+
if (toStr.call(all) === toStr.call(document.all)) {
|
|
1804
|
+
isDDA = function isDocumentDotAll(value) {
|
|
1805
|
+
/* globals document: false */
|
|
1806
|
+
// in IE 6-8, typeof document.all is "object" and it's truthy
|
|
1807
|
+
if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {
|
|
1808
|
+
try {
|
|
1809
|
+
var str = toStr.call(value);
|
|
1810
|
+
return (
|
|
1811
|
+
str === ddaClass
|
|
1812
|
+
|| str === ddaClass2
|
|
1813
|
+
|| str === ddaClass3 // opera 12.16
|
|
1814
|
+
|| str === objectClass // IE 6-8
|
|
1815
|
+
) && value('') == null; // eslint-disable-line eqeqeq
|
|
1816
|
+
} catch (e) { /**/ }
|
|
1817
|
+
}
|
|
1818
|
+
return false;
|
|
1819
|
+
};
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
module.exports = reflectApply
|
|
1824
|
+
? function isCallable(value) {
|
|
1825
|
+
if (isDDA(value)) { return true; }
|
|
1826
|
+
if (!value) { return false; }
|
|
1827
|
+
if (typeof value !== 'function' && typeof value !== 'object') { return false; }
|
|
1828
|
+
try {
|
|
1829
|
+
reflectApply(value, null, badArrayLike);
|
|
1830
|
+
} catch (e) {
|
|
1831
|
+
if (e !== isCallableMarker) { return false; }
|
|
1832
|
+
}
|
|
1833
|
+
return !isES6ClassFn(value) && tryFunctionObject(value);
|
|
1834
|
+
}
|
|
1835
|
+
: function isCallable(value) {
|
|
1836
|
+
if (isDDA(value)) { return true; }
|
|
1837
|
+
if (!value) { return false; }
|
|
1838
|
+
if (typeof value !== 'function' && typeof value !== 'object') { return false; }
|
|
1839
|
+
if (hasToStringTag) { return tryFunctionObject(value); }
|
|
1840
|
+
if (isES6ClassFn(value)) { return false; }
|
|
1841
|
+
var strClass = toStr.call(value);
|
|
1842
|
+
if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; }
|
|
1843
|
+
return tryFunctionObject(value);
|
|
1844
|
+
};
|
|
1845
|
+
|
|
1846
|
+
}, {}], 48: [function (require, module, exports) {
|
|
1847
|
+
'use strict';
|
|
1848
|
+
|
|
1849
|
+
var getDay = Date.prototype.getDay;
|
|
1850
|
+
var tryDateObject = function tryDateGetDayCall(value) {
|
|
1851
|
+
try {
|
|
1852
|
+
getDay.call(value);
|
|
1853
|
+
return true;
|
|
1854
|
+
} catch (e) {
|
|
1855
|
+
return false;
|
|
1856
|
+
}
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1859
|
+
var toStr = Object.prototype.toString;
|
|
1860
|
+
var dateClass = '[object Date]';
|
|
1861
|
+
var hasToStringTag = require('has-tostringtag/shams')();
|
|
1862
|
+
|
|
1863
|
+
module.exports = function isDateObject(value) {
|
|
1864
|
+
if (typeof value !== 'object' || value === null) {
|
|
1865
|
+
return false;
|
|
1866
|
+
}
|
|
1867
|
+
return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
|
|
1868
|
+
};
|
|
1869
|
+
|
|
1870
|
+
}, { "has-tostringtag/shams": 45 }], 49: [function (require, module, exports) {
|
|
1871
|
+
'use strict';
|
|
1872
|
+
|
|
1873
|
+
var callBound = require('call-bind/callBound');
|
|
1874
|
+
var hasToStringTag = require('has-tostringtag/shams')();
|
|
1875
|
+
var has;
|
|
1876
|
+
var $exec;
|
|
1877
|
+
var isRegexMarker;
|
|
1878
|
+
var badStringifier;
|
|
1879
|
+
|
|
1880
|
+
if (hasToStringTag) {
|
|
1881
|
+
has = callBound('Object.prototype.hasOwnProperty');
|
|
1882
|
+
$exec = callBound('RegExp.prototype.exec');
|
|
1883
|
+
isRegexMarker = {};
|
|
1884
|
+
|
|
1885
|
+
var throwRegexMarker = function () {
|
|
1886
|
+
throw isRegexMarker;
|
|
1887
|
+
};
|
|
1888
|
+
badStringifier = {
|
|
1889
|
+
toString: throwRegexMarker,
|
|
1890
|
+
valueOf: throwRegexMarker
|
|
1891
|
+
};
|
|
1892
|
+
|
|
1893
|
+
if (typeof Symbol.toPrimitive === 'symbol') {
|
|
1894
|
+
badStringifier[Symbol.toPrimitive] = throwRegexMarker;
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
var $toString = callBound('Object.prototype.toString');
|
|
1899
|
+
var gOPD = Object.getOwnPropertyDescriptor;
|
|
1900
|
+
var regexClass = '[object RegExp]';
|
|
1901
|
+
|
|
1902
|
+
module.exports = hasToStringTag
|
|
1903
|
+
// eslint-disable-next-line consistent-return
|
|
1904
|
+
? function isRegex(value) {
|
|
1905
|
+
if (!value || typeof value !== 'object') {
|
|
1906
|
+
return false;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
var descriptor = gOPD(value, 'lastIndex');
|
|
1910
|
+
var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
|
|
1911
|
+
if (!hasLastIndexDataProperty) {
|
|
1912
|
+
return false;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
try {
|
|
1916
|
+
$exec(value, badStringifier);
|
|
1917
|
+
} catch (e) {
|
|
1918
|
+
return e === isRegexMarker;
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
: function isRegex(value) {
|
|
1922
|
+
// In older browsers, typeof regex incorrectly returns 'function'
|
|
1923
|
+
if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
|
|
1924
|
+
return false;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
return $toString(value) === regexClass;
|
|
1928
|
+
};
|
|
1929
|
+
|
|
1930
|
+
}, { "call-bind/callBound": 7, "has-tostringtag/shams": 45 }], 50: [function (require, module, exports) {
|
|
1931
|
+
'use strict';
|
|
1932
|
+
|
|
1933
|
+
var strValue = String.prototype.valueOf;
|
|
1934
|
+
var tryStringObject = function tryStringObject(value) {
|
|
1935
|
+
try {
|
|
1936
|
+
strValue.call(value);
|
|
1937
|
+
return true;
|
|
1938
|
+
} catch (e) {
|
|
1939
|
+
return false;
|
|
1940
|
+
}
|
|
1941
|
+
};
|
|
1942
|
+
var toStr = Object.prototype.toString;
|
|
1943
|
+
var strClass = '[object String]';
|
|
1944
|
+
var hasToStringTag = require('has-tostringtag/shams')();
|
|
1945
|
+
|
|
1946
|
+
module.exports = function isString(value) {
|
|
1947
|
+
if (typeof value === 'string') {
|
|
1948
|
+
return true;
|
|
1949
|
+
}
|
|
1950
|
+
if (typeof value !== 'object') {
|
|
1951
|
+
return false;
|
|
1952
|
+
}
|
|
1953
|
+
return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;
|
|
1954
|
+
};
|
|
1955
|
+
|
|
1956
|
+
}, { "has-tostringtag/shams": 45 }], 51: [function (require, module, exports) {
|
|
1957
|
+
'use strict';
|
|
1958
|
+
|
|
1959
|
+
var toStr = Object.prototype.toString;
|
|
1960
|
+
var hasSymbols = require('has-symbols')();
|
|
1961
|
+
|
|
1962
|
+
if (hasSymbols) {
|
|
1963
|
+
var symToStr = Symbol.prototype.toString;
|
|
1964
|
+
var symStringRegex = /^Symbol\(.*\)$/;
|
|
1965
|
+
var isSymbolObject = function isRealSymbolObject(value) {
|
|
1966
|
+
if (typeof value.valueOf() !== 'symbol') {
|
|
1967
|
+
return false;
|
|
1968
|
+
}
|
|
1969
|
+
return symStringRegex.test(symToStr.call(value));
|
|
1970
|
+
};
|
|
1971
|
+
|
|
1972
|
+
module.exports = function isSymbol(value) {
|
|
1973
|
+
if (typeof value === 'symbol') {
|
|
1974
|
+
return true;
|
|
1975
|
+
}
|
|
1976
|
+
if (toStr.call(value) !== '[object Symbol]') {
|
|
1977
|
+
return false;
|
|
1978
|
+
}
|
|
1979
|
+
try {
|
|
1980
|
+
return isSymbolObject(value);
|
|
1981
|
+
} catch (e) {
|
|
1982
|
+
return false;
|
|
1983
|
+
}
|
|
1984
|
+
};
|
|
1985
|
+
} else {
|
|
1986
|
+
|
|
1987
|
+
module.exports = function isSymbol(value) {
|
|
1988
|
+
// this environment does not support Symbols.
|
|
1989
|
+
return false && value;
|
|
1990
|
+
};
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
}, { "has-symbols": 43 }], 52: [function (require, module, exports) {
|
|
1994
|
+
var hasMap = typeof Map === 'function' && Map.prototype;
|
|
1995
|
+
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
1996
|
+
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
1997
|
+
var mapForEach = hasMap && Map.prototype.forEach;
|
|
1998
|
+
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
1999
|
+
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
2000
|
+
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
2001
|
+
var setForEach = hasSet && Set.prototype.forEach;
|
|
2002
|
+
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
2003
|
+
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
2004
|
+
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
2005
|
+
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
2006
|
+
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
2007
|
+
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
2008
|
+
var booleanValueOf = Boolean.prototype.valueOf;
|
|
2009
|
+
var objectToString = Object.prototype.toString;
|
|
2010
|
+
var functionToString = Function.prototype.toString;
|
|
2011
|
+
var $match = String.prototype.match;
|
|
2012
|
+
var $slice = String.prototype.slice;
|
|
2013
|
+
var $replace = String.prototype.replace;
|
|
2014
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
2015
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
2016
|
+
var $test = RegExp.prototype.test;
|
|
2017
|
+
var $concat = Array.prototype.concat;
|
|
2018
|
+
var $join = Array.prototype.join;
|
|
2019
|
+
var $arrSlice = Array.prototype.slice;
|
|
2020
|
+
var $floor = Math.floor;
|
|
2021
|
+
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
2022
|
+
var gOPS = Object.getOwnPropertySymbols;
|
|
2023
|
+
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
2024
|
+
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
2025
|
+
// ie, `has-tostringtag/shams
|
|
2026
|
+
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
2027
|
+
? Symbol.toStringTag
|
|
2028
|
+
: null;
|
|
2029
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
2030
|
+
|
|
2031
|
+
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
2032
|
+
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
2033
|
+
? function (O) {
|
|
2034
|
+
return O.__proto__; // eslint-disable-line no-proto
|
|
2035
|
+
}
|
|
2036
|
+
: null
|
|
2037
|
+
);
|
|
2038
|
+
|
|
2039
|
+
function addNumericSeparator(num, str) {
|
|
2040
|
+
if (
|
|
2041
|
+
num === Infinity
|
|
2042
|
+
|| num === -Infinity
|
|
2043
|
+
|| num !== num
|
|
2044
|
+
|| (num && num > -1000 && num < 1000)
|
|
2045
|
+
|| $test.call(/e/, str)
|
|
2046
|
+
) {
|
|
2047
|
+
return str;
|
|
2048
|
+
}
|
|
2049
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
2050
|
+
if (typeof num === 'number') {
|
|
2051
|
+
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
2052
|
+
if (int !== num) {
|
|
2053
|
+
var intStr = String(int);
|
|
2054
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
2055
|
+
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
return $replace.call(str, sepRegex, '$&_');
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
var utilInspect = require('./util.inspect');
|
|
2062
|
+
var inspectCustom = utilInspect.custom;
|
|
2063
|
+
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
2064
|
+
|
|
2065
|
+
module.exports = function inspect_(obj, options, depth, seen) {
|
|
2066
|
+
var opts = options || {};
|
|
2067
|
+
|
|
2068
|
+
if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
|
|
2069
|
+
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
2070
|
+
}
|
|
2071
|
+
if (
|
|
2072
|
+
has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
2073
|
+
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
2074
|
+
: opts.maxStringLength !== null
|
|
2075
|
+
)
|
|
2076
|
+
) {
|
|
2077
|
+
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
2078
|
+
}
|
|
2079
|
+
var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
|
|
2080
|
+
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
2081
|
+
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
if (
|
|
2085
|
+
has(opts, 'indent')
|
|
2086
|
+
&& opts.indent !== null
|
|
2087
|
+
&& opts.indent !== '\t'
|
|
2088
|
+
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
2089
|
+
) {
|
|
2090
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
2091
|
+
}
|
|
2092
|
+
if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
2093
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
2094
|
+
}
|
|
2095
|
+
var numericSeparator = opts.numericSeparator;
|
|
2096
|
+
|
|
2097
|
+
if (typeof obj === 'undefined') {
|
|
2098
|
+
return 'undefined';
|
|
2099
|
+
}
|
|
2100
|
+
if (obj === null) {
|
|
2101
|
+
return 'null';
|
|
2102
|
+
}
|
|
2103
|
+
if (typeof obj === 'boolean') {
|
|
2104
|
+
return obj ? 'true' : 'false';
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
if (typeof obj === 'string') {
|
|
2108
|
+
return inspectString(obj, opts);
|
|
2109
|
+
}
|
|
2110
|
+
if (typeof obj === 'number') {
|
|
2111
|
+
if (obj === 0) {
|
|
2112
|
+
return Infinity / obj > 0 ? '0' : '-0';
|
|
2113
|
+
}
|
|
2114
|
+
var str = String(obj);
|
|
2115
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
2116
|
+
}
|
|
2117
|
+
if (typeof obj === 'bigint') {
|
|
2118
|
+
var bigIntStr = String(obj) + 'n';
|
|
2119
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
2123
|
+
if (typeof depth === 'undefined') { depth = 0; }
|
|
2124
|
+
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
2125
|
+
return isArray(obj) ? '[Array]' : '[Object]';
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
var indent = getIndent(opts, depth);
|
|
2129
|
+
|
|
2130
|
+
if (typeof seen === 'undefined') {
|
|
2131
|
+
seen = [];
|
|
2132
|
+
} else if (indexOf(seen, obj) >= 0) {
|
|
2133
|
+
return '[Circular]';
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
function inspect(value, from, noIndent) {
|
|
2137
|
+
if (from) {
|
|
2138
|
+
seen = $arrSlice.call(seen);
|
|
2139
|
+
seen.push(from);
|
|
2140
|
+
}
|
|
2141
|
+
if (noIndent) {
|
|
2142
|
+
var newOpts = {
|
|
2143
|
+
depth: opts.depth
|
|
2144
|
+
};
|
|
2145
|
+
if (has(opts, 'quoteStyle')) {
|
|
2146
|
+
newOpts.quoteStyle = opts.quoteStyle;
|
|
2147
|
+
}
|
|
2148
|
+
return inspect_(value, newOpts, depth + 1, seen);
|
|
2149
|
+
}
|
|
2150
|
+
return inspect_(value, opts, depth + 1, seen);
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
|
|
2154
|
+
var name = nameOf(obj);
|
|
2155
|
+
var keys = arrObjKeys(obj, inspect);
|
|
2156
|
+
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
2157
|
+
}
|
|
2158
|
+
if (isSymbol(obj)) {
|
|
2159
|
+
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
2160
|
+
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
2161
|
+
}
|
|
2162
|
+
if (isElement(obj)) {
|
|
2163
|
+
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
2164
|
+
var attrs = obj.attributes || [];
|
|
2165
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
2166
|
+
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
2167
|
+
}
|
|
2168
|
+
s += '>';
|
|
2169
|
+
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
2170
|
+
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
2171
|
+
return s;
|
|
2172
|
+
}
|
|
2173
|
+
if (isArray(obj)) {
|
|
2174
|
+
if (obj.length === 0) { return '[]'; }
|
|
2175
|
+
var xs = arrObjKeys(obj, inspect);
|
|
2176
|
+
if (indent && !singleLineValues(xs)) {
|
|
2177
|
+
return '[' + indentedJoin(xs, indent) + ']';
|
|
2178
|
+
}
|
|
2179
|
+
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
2180
|
+
}
|
|
2181
|
+
if (isError(obj)) {
|
|
2182
|
+
var parts = arrObjKeys(obj, inspect);
|
|
2183
|
+
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
2184
|
+
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
2185
|
+
}
|
|
2186
|
+
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
2187
|
+
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
2188
|
+
}
|
|
2189
|
+
if (typeof obj === 'object' && customInspect) {
|
|
2190
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
|
2191
|
+
return utilInspect(obj, { depth: maxDepth - depth });
|
|
2192
|
+
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
2193
|
+
return obj.inspect();
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
if (isMap(obj)) {
|
|
2197
|
+
var mapParts = [];
|
|
2198
|
+
if (mapForEach) {
|
|
2199
|
+
mapForEach.call(obj, function (value, key) {
|
|
2200
|
+
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
2201
|
+
});
|
|
2202
|
+
}
|
|
2203
|
+
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
2204
|
+
}
|
|
2205
|
+
if (isSet(obj)) {
|
|
2206
|
+
var setParts = [];
|
|
2207
|
+
if (setForEach) {
|
|
2208
|
+
setForEach.call(obj, function (value) {
|
|
2209
|
+
setParts.push(inspect(value, obj));
|
|
2210
|
+
});
|
|
2211
|
+
}
|
|
2212
|
+
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
2213
|
+
}
|
|
2214
|
+
if (isWeakMap(obj)) {
|
|
2215
|
+
return weakCollectionOf('WeakMap');
|
|
2216
|
+
}
|
|
2217
|
+
if (isWeakSet(obj)) {
|
|
2218
|
+
return weakCollectionOf('WeakSet');
|
|
2219
|
+
}
|
|
2220
|
+
if (isWeakRef(obj)) {
|
|
2221
|
+
return weakCollectionOf('WeakRef');
|
|
2222
|
+
}
|
|
2223
|
+
if (isNumber(obj)) {
|
|
2224
|
+
return markBoxed(inspect(Number(obj)));
|
|
2225
|
+
}
|
|
2226
|
+
if (isBigInt(obj)) {
|
|
2227
|
+
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
2228
|
+
}
|
|
2229
|
+
if (isBoolean(obj)) {
|
|
2230
|
+
return markBoxed(booleanValueOf.call(obj));
|
|
2231
|
+
}
|
|
2232
|
+
if (isString(obj)) {
|
|
2233
|
+
return markBoxed(inspect(String(obj)));
|
|
2234
|
+
}
|
|
2235
|
+
if (!isDate(obj) && !isRegExp(obj)) {
|
|
2236
|
+
var ys = arrObjKeys(obj, inspect);
|
|
2237
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
2238
|
+
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
2239
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
2240
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
2241
|
+
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
2242
|
+
if (ys.length === 0) { return tag + '{}'; }
|
|
2243
|
+
if (indent) {
|
|
2244
|
+
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
2245
|
+
}
|
|
2246
|
+
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
2247
|
+
}
|
|
2248
|
+
return String(obj);
|
|
2249
|
+
};
|
|
2250
|
+
|
|
2251
|
+
function wrapQuotes(s, defaultStyle, opts) {
|
|
2252
|
+
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
|
|
2253
|
+
return quoteChar + s + quoteChar;
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
function quote(s) {
|
|
2257
|
+
return $replace.call(String(s), /"/g, '"');
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2261
|
+
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2262
|
+
function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2263
|
+
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2264
|
+
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2265
|
+
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2266
|
+
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2267
|
+
|
|
2268
|
+
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
2269
|
+
function isSymbol(obj) {
|
|
2270
|
+
if (hasShammedSymbols) {
|
|
2271
|
+
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
|
2272
|
+
}
|
|
2273
|
+
if (typeof obj === 'symbol') {
|
|
2274
|
+
return true;
|
|
2275
|
+
}
|
|
2276
|
+
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
2277
|
+
return false;
|
|
2278
|
+
}
|
|
2279
|
+
try {
|
|
2280
|
+
symToString.call(obj);
|
|
2281
|
+
return true;
|
|
2282
|
+
} catch (e) { }
|
|
2283
|
+
return false;
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
function isBigInt(obj) {
|
|
2287
|
+
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
|
|
2288
|
+
return false;
|
|
2289
|
+
}
|
|
2290
|
+
try {
|
|
2291
|
+
bigIntValueOf.call(obj);
|
|
2292
|
+
return true;
|
|
2293
|
+
} catch (e) { }
|
|
2294
|
+
return false;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
|
|
2298
|
+
function has(obj, key) {
|
|
2299
|
+
return hasOwn.call(obj, key);
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
function toStr(obj) {
|
|
2303
|
+
return objectToString.call(obj);
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
function nameOf(f) {
|
|
2307
|
+
if (f.name) { return f.name; }
|
|
2308
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
2309
|
+
if (m) { return m[1]; }
|
|
2310
|
+
return null;
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
function indexOf(xs, x) {
|
|
2314
|
+
if (xs.indexOf) { return xs.indexOf(x); }
|
|
2315
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
2316
|
+
if (xs[i] === x) { return i; }
|
|
2317
|
+
}
|
|
2318
|
+
return -1;
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
function isMap(x) {
|
|
2322
|
+
if (!mapSize || !x || typeof x !== 'object') {
|
|
2323
|
+
return false;
|
|
2324
|
+
}
|
|
2325
|
+
try {
|
|
2326
|
+
mapSize.call(x);
|
|
2327
|
+
try {
|
|
2328
|
+
setSize.call(x);
|
|
2329
|
+
} catch (s) {
|
|
2330
|
+
return true;
|
|
2331
|
+
}
|
|
2332
|
+
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
2333
|
+
} catch (e) { }
|
|
2334
|
+
return false;
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
function isWeakMap(x) {
|
|
2338
|
+
if (!weakMapHas || !x || typeof x !== 'object') {
|
|
2339
|
+
return false;
|
|
2340
|
+
}
|
|
2341
|
+
try {
|
|
2342
|
+
weakMapHas.call(x, weakMapHas);
|
|
2343
|
+
try {
|
|
2344
|
+
weakSetHas.call(x, weakSetHas);
|
|
2345
|
+
} catch (s) {
|
|
2346
|
+
return true;
|
|
2347
|
+
}
|
|
2348
|
+
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
2349
|
+
} catch (e) { }
|
|
2350
|
+
return false;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
function isWeakRef(x) {
|
|
2354
|
+
if (!weakRefDeref || !x || typeof x !== 'object') {
|
|
2355
|
+
return false;
|
|
2356
|
+
}
|
|
2357
|
+
try {
|
|
2358
|
+
weakRefDeref.call(x);
|
|
2359
|
+
return true;
|
|
2360
|
+
} catch (e) { }
|
|
2361
|
+
return false;
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
function isSet(x) {
|
|
2365
|
+
if (!setSize || !x || typeof x !== 'object') {
|
|
2366
|
+
return false;
|
|
2367
|
+
}
|
|
2368
|
+
try {
|
|
2369
|
+
setSize.call(x);
|
|
2370
|
+
try {
|
|
2371
|
+
mapSize.call(x);
|
|
2372
|
+
} catch (m) {
|
|
2373
|
+
return true;
|
|
2374
|
+
}
|
|
2375
|
+
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
2376
|
+
} catch (e) { }
|
|
2377
|
+
return false;
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
function isWeakSet(x) {
|
|
2381
|
+
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
2382
|
+
return false;
|
|
2383
|
+
}
|
|
2384
|
+
try {
|
|
2385
|
+
weakSetHas.call(x, weakSetHas);
|
|
2386
|
+
try {
|
|
2387
|
+
weakMapHas.call(x, weakMapHas);
|
|
2388
|
+
} catch (s) {
|
|
2389
|
+
return true;
|
|
2390
|
+
}
|
|
2391
|
+
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
2392
|
+
} catch (e) { }
|
|
2393
|
+
return false;
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
function isElement(x) {
|
|
2397
|
+
if (!x || typeof x !== 'object') { return false; }
|
|
2398
|
+
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
2399
|
+
return true;
|
|
2400
|
+
}
|
|
2401
|
+
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
function inspectString(str, opts) {
|
|
2405
|
+
if (str.length > opts.maxStringLength) {
|
|
2406
|
+
var remaining = str.length - opts.maxStringLength;
|
|
2407
|
+
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
2408
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
2409
|
+
}
|
|
2410
|
+
// eslint-disable-next-line no-control-regex
|
|
2411
|
+
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
2412
|
+
return wrapQuotes(s, 'single', opts);
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
function lowbyte(c) {
|
|
2416
|
+
var n = c.charCodeAt(0);
|
|
2417
|
+
var x = {
|
|
2418
|
+
8: 'b',
|
|
2419
|
+
9: 't',
|
|
2420
|
+
10: 'n',
|
|
2421
|
+
12: 'f',
|
|
2422
|
+
13: 'r'
|
|
2423
|
+
}[n];
|
|
2424
|
+
if (x) { return '\\' + x; }
|
|
2425
|
+
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
function markBoxed(str) {
|
|
2429
|
+
return 'Object(' + str + ')';
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
function weakCollectionOf(type) {
|
|
2433
|
+
return type + ' { ? }';
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
function collectionOf(type, size, entries, indent) {
|
|
2437
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
2438
|
+
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
function singleLineValues(xs) {
|
|
2442
|
+
for (var i = 0; i < xs.length; i++) {
|
|
2443
|
+
if (indexOf(xs[i], '\n') >= 0) {
|
|
2444
|
+
return false;
|
|
2445
|
+
}
|
|
2446
|
+
}
|
|
2447
|
+
return true;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
function getIndent(opts, depth) {
|
|
2451
|
+
var baseIndent;
|
|
2452
|
+
if (opts.indent === '\t') {
|
|
2453
|
+
baseIndent = '\t';
|
|
2454
|
+
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
2455
|
+
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
2456
|
+
} else {
|
|
2457
|
+
return null;
|
|
2458
|
+
}
|
|
2459
|
+
return {
|
|
2460
|
+
base: baseIndent,
|
|
2461
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
2462
|
+
};
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
function indentedJoin(xs, indent) {
|
|
2466
|
+
if (xs.length === 0) { return ''; }
|
|
2467
|
+
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
2468
|
+
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2471
|
+
function arrObjKeys(obj, inspect) {
|
|
2472
|
+
var isArr = isArray(obj);
|
|
2473
|
+
var xs = [];
|
|
2474
|
+
if (isArr) {
|
|
2475
|
+
xs.length = obj.length;
|
|
2476
|
+
for (var i = 0; i < obj.length; i++) {
|
|
2477
|
+
xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
|
|
2478
|
+
}
|
|
2479
|
+
}
|
|
2480
|
+
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
2481
|
+
var symMap;
|
|
2482
|
+
if (hasShammedSymbols) {
|
|
2483
|
+
symMap = {};
|
|
2484
|
+
for (var k = 0; k < syms.length; k++) {
|
|
2485
|
+
symMap['$' + syms[k]] = syms[k];
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
|
2490
|
+
if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
2491
|
+
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
2492
|
+
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
2493
|
+
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
2494
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
2495
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
2496
|
+
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
2497
|
+
} else {
|
|
2498
|
+
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
if (typeof gOPS === 'function') {
|
|
2502
|
+
for (var j = 0; j < syms.length; j++) {
|
|
2503
|
+
if (isEnumerable.call(obj, syms[j])) {
|
|
2504
|
+
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
return xs;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
}, { "./util.inspect": 1 }], 53: [function (require, module, exports) {
|
|
2512
|
+
'use strict';
|
|
2513
|
+
|
|
2514
|
+
var keysShim;
|
|
2515
|
+
if (!Object.keys) {
|
|
2516
|
+
// modified from https://github.com/es-shims/es5-shim
|
|
2517
|
+
var has = Object.prototype.hasOwnProperty;
|
|
2518
|
+
var toStr = Object.prototype.toString;
|
|
2519
|
+
var isArgs = require('./isArguments'); // eslint-disable-line global-require
|
|
2520
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
2521
|
+
var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
|
|
2522
|
+
var hasProtoEnumBug = isEnumerable.call(function () { }, 'prototype');
|
|
2523
|
+
var dontEnums = [
|
|
2524
|
+
'toString',
|
|
2525
|
+
'toLocaleString',
|
|
2526
|
+
'valueOf',
|
|
2527
|
+
'hasOwnProperty',
|
|
2528
|
+
'isPrototypeOf',
|
|
2529
|
+
'propertyIsEnumerable',
|
|
2530
|
+
'constructor'
|
|
2531
|
+
];
|
|
2532
|
+
var equalsConstructorPrototype = function (o) {
|
|
2533
|
+
var ctor = o.constructor;
|
|
2534
|
+
return ctor && ctor.prototype === o;
|
|
2535
|
+
};
|
|
2536
|
+
var excludedKeys = {
|
|
2537
|
+
$applicationCache: true,
|
|
2538
|
+
$console: true,
|
|
2539
|
+
$external: true,
|
|
2540
|
+
$frame: true,
|
|
2541
|
+
$frameElement: true,
|
|
2542
|
+
$frames: true,
|
|
2543
|
+
$innerHeight: true,
|
|
2544
|
+
$innerWidth: true,
|
|
2545
|
+
$onmozfullscreenchange: true,
|
|
2546
|
+
$onmozfullscreenerror: true,
|
|
2547
|
+
$outerHeight: true,
|
|
2548
|
+
$outerWidth: true,
|
|
2549
|
+
$pageXOffset: true,
|
|
2550
|
+
$pageYOffset: true,
|
|
2551
|
+
$parent: true,
|
|
2552
|
+
$scrollLeft: true,
|
|
2553
|
+
$scrollTop: true,
|
|
2554
|
+
$scrollX: true,
|
|
2555
|
+
$scrollY: true,
|
|
2556
|
+
$self: true,
|
|
2557
|
+
$webkitIndexedDB: true,
|
|
2558
|
+
$webkitStorageInfo: true,
|
|
2559
|
+
$window: true
|
|
2560
|
+
};
|
|
2561
|
+
var hasAutomationEqualityBug = (function () {
|
|
2562
|
+
/* global window */
|
|
2563
|
+
if (typeof window === 'undefined') { return false; }
|
|
2564
|
+
for (var k in window) {
|
|
2565
|
+
try {
|
|
2566
|
+
if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
|
|
2567
|
+
try {
|
|
2568
|
+
equalsConstructorPrototype(window[k]);
|
|
2569
|
+
} catch (e) {
|
|
2570
|
+
return true;
|
|
2571
|
+
}
|
|
2572
|
+
}
|
|
2573
|
+
} catch (e) {
|
|
2574
|
+
return true;
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
return false;
|
|
2578
|
+
}());
|
|
2579
|
+
var equalsConstructorPrototypeIfNotBuggy = function (o) {
|
|
2580
|
+
/* global window */
|
|
2581
|
+
if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
|
|
2582
|
+
return equalsConstructorPrototype(o);
|
|
2583
|
+
}
|
|
2584
|
+
try {
|
|
2585
|
+
return equalsConstructorPrototype(o);
|
|
2586
|
+
} catch (e) {
|
|
2587
|
+
return false;
|
|
2588
|
+
}
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2591
|
+
keysShim = function keys(object) {
|
|
2592
|
+
var isObject = object !== null && typeof object === 'object';
|
|
2593
|
+
var isFunction = toStr.call(object) === '[object Function]';
|
|
2594
|
+
var isArguments = isArgs(object);
|
|
2595
|
+
var isString = isObject && toStr.call(object) === '[object String]';
|
|
2596
|
+
var theKeys = [];
|
|
2597
|
+
|
|
2598
|
+
if (!isObject && !isFunction && !isArguments) {
|
|
2599
|
+
throw new TypeError('Object.keys called on a non-object');
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
var skipProto = hasProtoEnumBug && isFunction;
|
|
2603
|
+
if (isString && object.length > 0 && !has.call(object, 0)) {
|
|
2604
|
+
for (var i = 0; i < object.length; ++i) {
|
|
2605
|
+
theKeys.push(String(i));
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2609
|
+
if (isArguments && object.length > 0) {
|
|
2610
|
+
for (var j = 0; j < object.length; ++j) {
|
|
2611
|
+
theKeys.push(String(j));
|
|
2612
|
+
}
|
|
2613
|
+
} else {
|
|
2614
|
+
for (var name in object) {
|
|
2615
|
+
if (!(skipProto && name === 'prototype') && has.call(object, name)) {
|
|
2616
|
+
theKeys.push(String(name));
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2621
|
+
if (hasDontEnumBug) {
|
|
2622
|
+
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
|
|
2623
|
+
|
|
2624
|
+
for (var k = 0; k < dontEnums.length; ++k) {
|
|
2625
|
+
if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
|
|
2626
|
+
theKeys.push(dontEnums[k]);
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
return theKeys;
|
|
2631
|
+
};
|
|
2632
|
+
}
|
|
2633
|
+
module.exports = keysShim;
|
|
2634
|
+
|
|
2635
|
+
}, { "./isArguments": 55 }], 54: [function (require, module, exports) {
|
|
2636
|
+
'use strict';
|
|
2637
|
+
|
|
2638
|
+
var slice = Array.prototype.slice;
|
|
2639
|
+
var isArgs = require('./isArguments');
|
|
2640
|
+
|
|
2641
|
+
var origKeys = Object.keys;
|
|
2642
|
+
var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');
|
|
2643
|
+
|
|
2644
|
+
var originalKeys = Object.keys;
|
|
2645
|
+
|
|
2646
|
+
keysShim.shim = function shimObjectKeys() {
|
|
2647
|
+
if (Object.keys) {
|
|
2648
|
+
var keysWorksWithArguments = (function () {
|
|
2649
|
+
// Safari 5.0 bug
|
|
2650
|
+
var args = Object.keys(arguments);
|
|
2651
|
+
return args && args.length === arguments.length;
|
|
2652
|
+
}(1, 2));
|
|
2653
|
+
if (!keysWorksWithArguments) {
|
|
2654
|
+
Object.keys = function keys(object) { // eslint-disable-line func-name-matching
|
|
2655
|
+
if (isArgs(object)) {
|
|
2656
|
+
return originalKeys(slice.call(object));
|
|
2657
|
+
}
|
|
2658
|
+
return originalKeys(object);
|
|
2659
|
+
};
|
|
2660
|
+
}
|
|
2661
|
+
} else {
|
|
2662
|
+
Object.keys = keysShim;
|
|
2663
|
+
}
|
|
2664
|
+
return Object.keys || keysShim;
|
|
2665
|
+
};
|
|
2666
|
+
|
|
2667
|
+
module.exports = keysShim;
|
|
2668
|
+
|
|
2669
|
+
}, { "./implementation": 53, "./isArguments": 55 }], 55: [function (require, module, exports) {
|
|
2670
|
+
'use strict';
|
|
2671
|
+
|
|
2672
|
+
var toStr = Object.prototype.toString;
|
|
2673
|
+
|
|
2674
|
+
module.exports = function isArguments(value) {
|
|
2675
|
+
var str = toStr.call(value);
|
|
2676
|
+
var isArgs = str === '[object Arguments]';
|
|
2677
|
+
if (!isArgs) {
|
|
2678
|
+
isArgs = str !== '[object Array]' &&
|
|
2679
|
+
value !== null &&
|
|
2680
|
+
typeof value === 'object' &&
|
|
2681
|
+
typeof value.length === 'number' &&
|
|
2682
|
+
value.length >= 0 &&
|
|
2683
|
+
toStr.call(value.callee) === '[object Function]';
|
|
2684
|
+
}
|
|
2685
|
+
return isArgs;
|
|
2686
|
+
};
|
|
2687
|
+
|
|
2688
|
+
}, {}], 56: [function (require, module, exports) {
|
|
2689
|
+
'use strict';
|
|
2690
|
+
|
|
2691
|
+
var RequireObjectCoercible = require('es-abstract/2022/RequireObjectCoercible');
|
|
2692
|
+
var callBound = require('call-bind/callBound');
|
|
2693
|
+
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
|
|
2694
|
+
var $push = callBound('Array.prototype.push');
|
|
2695
|
+
|
|
2696
|
+
module.exports = function entries(O) {
|
|
2697
|
+
var obj = RequireObjectCoercible(O);
|
|
2698
|
+
var entrys = [];
|
|
2699
|
+
for (var key in obj) {
|
|
2700
|
+
if ($isEnumerable(obj, key)) { // checks own-ness as well
|
|
2701
|
+
$push(entrys, [key, obj[key]]);
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
return entrys;
|
|
2705
|
+
};
|
|
2706
|
+
|
|
2707
|
+
}, { "call-bind/callBound": 7, "es-abstract/2022/RequireObjectCoercible": 17 }], 57: [function (require, module, exports) {
|
|
2708
|
+
'use strict';
|
|
2709
|
+
|
|
2710
|
+
var define = require('define-properties');
|
|
2711
|
+
var callBind = require('call-bind');
|
|
2712
|
+
|
|
2713
|
+
var implementation = require('./implementation');
|
|
2714
|
+
var getPolyfill = require('./polyfill');
|
|
2715
|
+
var shim = require('./shim');
|
|
2716
|
+
|
|
2717
|
+
var polyfill = callBind(getPolyfill(), Object);
|
|
2718
|
+
|
|
2719
|
+
define(polyfill, {
|
|
2720
|
+
getPolyfill: getPolyfill,
|
|
2721
|
+
implementation: implementation,
|
|
2722
|
+
shim: shim
|
|
2723
|
+
});
|
|
2724
|
+
|
|
2725
|
+
module.exports = polyfill;
|
|
2726
|
+
|
|
2727
|
+
}, { "./implementation": 56, "./polyfill": 58, "./shim": 59, "call-bind": 8, "define-properties": 9 }], 58: [function (require, module, exports) {
|
|
2728
|
+
'use strict';
|
|
2729
|
+
|
|
2730
|
+
var implementation = require('./implementation');
|
|
2731
|
+
|
|
2732
|
+
module.exports = function getPolyfill() {
|
|
2733
|
+
return typeof Object.entries === 'function' ? Object.entries : implementation;
|
|
2734
|
+
};
|
|
2735
|
+
|
|
2736
|
+
}, { "./implementation": 56 }], 59: [function (require, module, exports) {
|
|
2737
|
+
'use strict';
|
|
2738
|
+
|
|
2739
|
+
var getPolyfill = require('./polyfill');
|
|
2740
|
+
var define = require('define-properties');
|
|
2741
|
+
|
|
2742
|
+
module.exports = function shimEntries() {
|
|
2743
|
+
var polyfill = getPolyfill();
|
|
2744
|
+
define(Object, { entries: polyfill }, {
|
|
2745
|
+
entries: function testEntries() {
|
|
2746
|
+
return Object.entries !== polyfill;
|
|
2747
|
+
}
|
|
2748
|
+
});
|
|
2749
|
+
return polyfill;
|
|
2750
|
+
};
|
|
2751
|
+
|
|
2752
|
+
}, { "./polyfill": 58, "define-properties": 9 }], 60: [function (require, module, exports) {
|
|
2753
|
+
'use strict';
|
|
2754
|
+
|
|
2755
|
+
var callBound = require('call-bind/callBound');
|
|
2756
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
2757
|
+
var isRegex = require('is-regex');
|
|
2758
|
+
|
|
2759
|
+
var $exec = callBound('RegExp.prototype.exec');
|
|
2760
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
2761
|
+
|
|
2762
|
+
module.exports = function regexTester(regex) {
|
|
2763
|
+
if (!isRegex(regex)) {
|
|
2764
|
+
throw new $TypeError('`regex` must be a RegExp');
|
|
2765
|
+
}
|
|
2766
|
+
return function test(s) {
|
|
2767
|
+
return $exec(regex, s) !== null;
|
|
2768
|
+
};
|
|
2769
|
+
};
|
|
2770
|
+
|
|
2771
|
+
}, { "call-bind/callBound": 7, "get-intrinsic": 41, "is-regex": 49 }], 61: [function (require, module, exports) {
|
|
2772
|
+
'use strict';
|
|
2773
|
+
|
|
2774
|
+
var RequireObjectCoercible = require('es-abstract/2022/RequireObjectCoercible');
|
|
2775
|
+
var ToString = require('es-abstract/2022/ToString');
|
|
2776
|
+
var callBound = require('call-bind/callBound');
|
|
2777
|
+
var $replace = callBound('String.prototype.replace');
|
|
2778
|
+
|
|
2779
|
+
var mvsIsWS = (/^\s$/).test('\u180E');
|
|
2780
|
+
/* eslint-disable no-control-regex */
|
|
2781
|
+
var leftWhitespace = mvsIsWS
|
|
2782
|
+
? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/
|
|
2783
|
+
: /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/;
|
|
2784
|
+
var rightWhitespace = mvsIsWS
|
|
2785
|
+
? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/
|
|
2786
|
+
: /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;
|
|
2787
|
+
/* eslint-enable no-control-regex */
|
|
2788
|
+
|
|
2789
|
+
module.exports = function trim() {
|
|
2790
|
+
var S = ToString(RequireObjectCoercible(this));
|
|
2791
|
+
return $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');
|
|
2792
|
+
};
|
|
2793
|
+
|
|
2794
|
+
}, { "call-bind/callBound": 7, "es-abstract/2022/RequireObjectCoercible": 17, "es-abstract/2022/ToString": 24 }], 62: [function (require, module, exports) {
|
|
2795
|
+
'use strict';
|
|
2796
|
+
|
|
2797
|
+
var callBind = require('call-bind');
|
|
2798
|
+
var define = require('define-properties');
|
|
2799
|
+
var RequireObjectCoercible = require('es-abstract/2022/RequireObjectCoercible');
|
|
2800
|
+
|
|
2801
|
+
var implementation = require('./implementation');
|
|
2802
|
+
var getPolyfill = require('./polyfill');
|
|
2803
|
+
var shim = require('./shim');
|
|
2804
|
+
|
|
2805
|
+
var bound = callBind(getPolyfill());
|
|
2806
|
+
var boundMethod = function trim(receiver) {
|
|
2807
|
+
RequireObjectCoercible(receiver);
|
|
2808
|
+
return bound(receiver);
|
|
2809
|
+
};
|
|
2810
|
+
|
|
2811
|
+
define(boundMethod, {
|
|
2812
|
+
getPolyfill: getPolyfill,
|
|
2813
|
+
implementation: implementation,
|
|
2814
|
+
shim: shim
|
|
2815
|
+
});
|
|
2816
|
+
|
|
2817
|
+
module.exports = boundMethod;
|
|
2818
|
+
|
|
2819
|
+
}, { "./implementation": 61, "./polyfill": 63, "./shim": 64, "call-bind": 8, "define-properties": 9, "es-abstract/2022/RequireObjectCoercible": 17 }], 63: [function (require, module, exports) {
|
|
2820
|
+
'use strict';
|
|
2821
|
+
|
|
2822
|
+
var implementation = require('./implementation');
|
|
2823
|
+
|
|
2824
|
+
var zeroWidthSpace = '\u200b';
|
|
2825
|
+
var mongolianVowelSeparator = '\u180E';
|
|
2826
|
+
|
|
2827
|
+
module.exports = function getPolyfill() {
|
|
2828
|
+
if (
|
|
2829
|
+
String.prototype.trim
|
|
2830
|
+
&& zeroWidthSpace.trim() === zeroWidthSpace
|
|
2831
|
+
&& mongolianVowelSeparator.trim() === mongolianVowelSeparator
|
|
2832
|
+
&& ('_' + mongolianVowelSeparator).trim() === ('_' + mongolianVowelSeparator)
|
|
2833
|
+
&& (mongolianVowelSeparator + '_').trim() === (mongolianVowelSeparator + '_')
|
|
2834
|
+
) {
|
|
2835
|
+
return String.prototype.trim;
|
|
2836
|
+
}
|
|
2837
|
+
return implementation;
|
|
2838
|
+
};
|
|
2839
|
+
|
|
2840
|
+
}, { "./implementation": 61 }], 64: [function (require, module, exports) {
|
|
2841
|
+
'use strict';
|
|
2842
|
+
|
|
2843
|
+
var define = require('define-properties');
|
|
2844
|
+
var getPolyfill = require('./polyfill');
|
|
2845
|
+
|
|
2846
|
+
module.exports = function shimStringTrim() {
|
|
2847
|
+
var polyfill = getPolyfill();
|
|
2848
|
+
define(String.prototype, { trim: polyfill }, {
|
|
2849
|
+
trim: function testTrim() {
|
|
2850
|
+
return String.prototype.trim !== polyfill;
|
|
2851
|
+
}
|
|
2852
|
+
});
|
|
2853
|
+
return polyfill;
|
|
2854
|
+
};
|
|
2855
|
+
|
|
2856
|
+
}, { "./polyfill": 63, "define-properties": 9 }], 65: [function (require, module, exports) {
|
|
2857
|
+
/**
|
|
2858
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
|
2859
|
+
*
|
|
2860
|
+
* This source code is licensed under the MIT license found in the
|
|
2861
|
+
* LICENSE file in the root directory of this source tree.
|
|
2862
|
+
*/
|
|
2863
|
+
|
|
2864
|
+
'use strict';
|
|
2865
|
+
|
|
2866
|
+
/**
|
|
2867
|
+
* Similar to invariant but only logs a warning if the condition is not met.
|
|
2868
|
+
* This can be used to log issues in development environments in critical
|
|
2869
|
+
* paths. Removing the logging code for production environments will keep the
|
|
2870
|
+
* same logic and follow the same code paths.
|
|
2871
|
+
*/
|
|
2872
|
+
|
|
2873
|
+
var __DEV__ = false;
|
|
2874
|
+
|
|
2875
|
+
var warning = function () { };
|
|
2876
|
+
|
|
2877
|
+
if (__DEV__) {
|
|
2878
|
+
var printWarning = function printWarning(format, args) {
|
|
2879
|
+
var len = arguments.length;
|
|
2880
|
+
args = new Array(len > 1 ? len - 1 : 0);
|
|
2881
|
+
for (var key = 1; key < len; key++) {
|
|
2882
|
+
args[key - 1] = arguments[key];
|
|
2883
|
+
}
|
|
2884
|
+
var argIndex = 0;
|
|
2885
|
+
var message = 'Warning: ' +
|
|
2886
|
+
format.replace(/%s/g, function () {
|
|
2887
|
+
return args[argIndex++];
|
|
2888
|
+
});
|
|
2889
|
+
if (typeof console !== 'undefined') {
|
|
2890
|
+
console.error(message);
|
|
2891
|
+
}
|
|
2892
|
+
try {
|
|
2893
|
+
// --- Welcome to debugging React ---
|
|
2894
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
2895
|
+
// to find the callsite that caused this warning to fire.
|
|
2896
|
+
throw new Error(message);
|
|
2897
|
+
} catch (x) { }
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
warning = function (condition, format, args) {
|
|
2901
|
+
var len = arguments.length;
|
|
2902
|
+
args = new Array(len > 2 ? len - 2 : 0);
|
|
2903
|
+
for (var key = 2; key < len; key++) {
|
|
2904
|
+
args[key - 2] = arguments[key];
|
|
2905
|
+
}
|
|
2906
|
+
if (format === undefined) {
|
|
2907
|
+
throw new Error(
|
|
2908
|
+
'`warning(condition, format, ...args)` requires a warning ' +
|
|
2909
|
+
'message argument'
|
|
2910
|
+
);
|
|
2911
|
+
}
|
|
2912
|
+
if (!condition) {
|
|
2913
|
+
printWarning.apply(null, [format].concat(args));
|
|
2914
|
+
}
|
|
2915
|
+
};
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
module.exports = warning;
|
|
2919
|
+
|
|
2920
|
+
}, {}]
|
|
2921
|
+
}, {}, [2])(2)
|
|
2922
|
+
});
|