@adyen/adyen-web 6.43.0 → 6.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +26 -27
- package/dist/es/components/Card/Card.js +1 -1
- package/dist/es/components/Card/Card.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/CardInput.js +1 -1
- package/dist/es/components/Card/components/CardInput/CardInput.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CVC.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/CVC.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/CardFields.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/CardFields.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/DualBrandSelector.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/DualBrandSelector.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/components/StoredCardFields.js +1 -1
- package/dist/es/components/Card/components/CardInput/components/StoredCardFields.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/types.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/useSRPanelForCardInputErrors.js +1 -1
- package/dist/es/components/Card/components/CardInput/useSRPanelForCardInputErrors.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/utils.js +1 -1
- package/dist/es/components/Card/components/CardInput/utils.js.map +1 -1
- package/dist/es/components/CustomCard/CustomCard.js +1 -1
- package/dist/es/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es/components/CustomCard/CustomCardInput/CustomCardInput.js +1 -1
- package/dist/es/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
- package/dist/es/components/Dropin/Dropin.js +1 -1
- package/dist/es/components/Dropin/Dropin.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js.map +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
- package/dist/es/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
- package/dist/es/components/Giftcard/Giftcard.js +1 -1
- package/dist/es/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js.map +1 -1
- package/dist/es/components/internal/Address/Address.js +1 -1
- package/dist/es/components/internal/Address/Address.js.map +1 -1
- package/dist/es/components/internal/Address/validate.js.map +1 -1
- package/dist/es/components/internal/BaseElement/BaseElement.js +1 -1
- package/dist/es/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es/components/internal/Button/Button.js +1 -1
- package/dist/es/components/internal/Button/Button.js.map +1 -1
- package/dist/es/components/internal/Button/CopyButton.js +1 -1
- package/dist/es/components/internal/Button/CopyButton.js.map +1 -1
- package/dist/es/components/internal/Button/CopyIconButton.js +1 -1
- package/dist/es/components/internal/Button/CopyIconButton.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/ClickToPayComponent.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPSection.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
- package/dist/es/components/internal/FormFields/InputBase.js +1 -1
- package/dist/es/components/internal/FormFields/InputBase.js.map +1 -1
- package/dist/es/components/internal/FormFields/Select/Select.js +1 -1
- package/dist/es/components/internal/FormFields/Select/Select.js.map +1 -1
- package/dist/es/components/internal/LoadingWrapper/LoadingWrapper.js +1 -1
- package/dist/es/components/internal/LoadingWrapper/LoadingWrapper.js.map +1 -1
- package/dist/es/components/internal/Modal/Modal.js +1 -1
- package/dist/es/components/internal/Modal/Modal.js.map +1 -1
- package/dist/es/components/internal/QRLoader/QRLoader.js +1 -1
- package/dist/es/components/internal/QRLoader/QRLoader.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRFinalState.js +1 -1
- package/dist/es/components/internal/QRLoader/components/QRFinalState.js.map +1 -1
- package/dist/es/components/internal/QRLoader/components/QRLoaderPendingState.js +2 -0
- package/dist/es/components/internal/QRLoader/components/QRLoaderPendingState.js.map +1 -0
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/defaultProps.js +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/defaultProps.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/constants.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/constants.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/SecuredField.js +1 -1
- package/dist/es/components/internal/SecuredFields/lib/securedField/SecuredField.js.map +1 -1
- package/dist/es/components/internal/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/es/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es/core/Errors/SRMessages.js +1 -1
- package/dist/es/core/Errors/SRMessages.js.map +1 -1
- package/dist/es/core/Errors/SRPanel.js.map +1 -1
- package/dist/es/core/Errors/SRPanelProvider.js.map +1 -1
- package/dist/es/core/Errors/constants.js +1 -1
- package/dist/es/core/Errors/constants.js.map +1 -1
- package/dist/es/core/Errors/useA11yReporter.js +1 -1
- package/dist/es/core/Errors/useA11yReporter.js.map +1 -1
- package/dist/es/core/Errors/useLoadingA11yReporter.js +2 -0
- package/dist/es/core/Errors/useLoadingA11yReporter.js.map +1 -0
- package/dist/es/core/Errors/utils.js +1 -1
- package/dist/es/core/Errors/utils.js.map +1 -1
- package/dist/es/core/config.js +1 -1
- package/dist/es/external/preact/compat/dist/compat.js +1 -1
- package/dist/es/external/preact/compat/dist/compat.js.map +1 -1
- package/dist/es/external/preact/dist/preact.js +1 -1
- package/dist/es/external/preact/dist/preact.js.map +1 -1
- package/dist/es/external/preact/hooks/dist/hooks.js +1 -1
- package/dist/es/external/preact/hooks/dist/hooks.js.map +1 -1
- package/dist/es/index.d.ts +26 -27
- package/dist/es/packages/server/translations/en-US.json.js +1 -1
- package/dist/es/utils/useForm/useForm.js +1 -1
- package/dist/es/utils/useForm/useForm.js.map +1 -1
- package/dist/es-legacy/components/Card/Card.js +1 -1
- package/dist/es-legacy/components/Card/Card.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/CardInput.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/CardInput.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CVC.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CVC.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CardFields.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/CardFields.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/DualBrandSelector.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/DualBrandSelector.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFields.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFields.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/types.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/useSRPanelForCardInputErrors.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/useSRPanelForCardInputErrors.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/utils.js +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/utils.js.map +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCard.js +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
- package/dist/es-legacy/components/Dropin/Dropin.js +1 -1
- package/dist/es-legacy/components/Dropin/Dropin.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/OrderPaymentMethods.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
- package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/components/Challenge/DoChallenge3DS2.js.map +1 -1
- package/dist/es-legacy/components/internal/Address/Address.js +1 -1
- package/dist/es-legacy/components/internal/Address/Address.js.map +1 -1
- package/dist/es-legacy/components/internal/Address/validate.js.map +1 -1
- package/dist/es-legacy/components/internal/BaseElement/BaseElement.js +1 -1
- package/dist/es-legacy/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es-legacy/components/internal/Button/Button.js +1 -1
- package/dist/es-legacy/components/internal/Button/Button.js.map +1 -1
- package/dist/es-legacy/components/internal/Button/CopyButton.js +1 -1
- package/dist/es-legacy/components/internal/Button/CopyButton.js.map +1 -1
- package/dist/es-legacy/components/internal/Button/CopyIconButton.js +1 -1
- package/dist/es-legacy/components/internal/Button/CopyIconButton.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/ClickToPayComponent.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPSection.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPSection/CtPSection.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/InputBase.js +1 -1
- package/dist/es-legacy/components/internal/FormFields/InputBase.js.map +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/Select.js +1 -1
- package/dist/es-legacy/components/internal/FormFields/Select/Select.js.map +1 -1
- package/dist/es-legacy/components/internal/LoadingWrapper/LoadingWrapper.js +1 -1
- package/dist/es-legacy/components/internal/LoadingWrapper/LoadingWrapper.js.map +1 -1
- package/dist/es-legacy/components/internal/Modal/Modal.js +1 -1
- package/dist/es-legacy/components/internal/Modal/Modal.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/QRLoader.js +1 -1
- package/dist/es-legacy/components/internal/QRLoader/QRLoader.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRFinalState.js +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRFinalState.js.map +1 -1
- package/dist/es-legacy/components/internal/QRLoader/components/QRLoaderPendingState.js +2 -0
- package/dist/es-legacy/components/internal/QRLoader/components/QRLoaderPendingState.js.map +1 -0
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/defaultProps.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/defaultProps.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/constants.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/constants.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.js +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.js.map +1 -1
- package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/es-legacy/components/internal/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es-legacy/core/Errors/SRMessages.js +1 -1
- package/dist/es-legacy/core/Errors/SRMessages.js.map +1 -1
- package/dist/es-legacy/core/Errors/SRPanel.js.map +1 -1
- package/dist/es-legacy/core/Errors/SRPanelProvider.js.map +1 -1
- package/dist/es-legacy/core/Errors/constants.js +1 -1
- package/dist/es-legacy/core/Errors/constants.js.map +1 -1
- package/dist/es-legacy/core/Errors/useA11yReporter.js +1 -1
- package/dist/es-legacy/core/Errors/useA11yReporter.js.map +1 -1
- package/dist/es-legacy/core/Errors/useLoadingA11yReporter.js +2 -0
- package/dist/es-legacy/core/Errors/useLoadingA11yReporter.js.map +1 -0
- package/dist/es-legacy/core/Errors/utils.js +1 -1
- package/dist/es-legacy/core/Errors/utils.js.map +1 -1
- package/dist/es-legacy/core/config.js +1 -1
- package/dist/es-legacy/external/preact/compat/dist/compat.js +1 -1
- package/dist/es-legacy/external/preact/compat/dist/compat.js.map +1 -1
- package/dist/es-legacy/external/preact/dist/preact.js +1 -1
- package/dist/es-legacy/external/preact/dist/preact.js.map +1 -1
- package/dist/es-legacy/external/preact/hooks/dist/hooks.js +1 -1
- package/dist/es-legacy/external/preact/hooks/dist/hooks.js.map +1 -1
- package/dist/es-legacy/packages/server/translations/en-US.json.js +1 -1
- package/dist/es-legacy/utils/useForm/useForm.js +1 -1
- package/dist/es-legacy/utils/useForm/useForm.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createElement as e,Fragment as t}from"../../external/preact/dist/preact.js";import{useRef as
|
|
1
|
+
import{createElement as e,Fragment as t}from"../../external/preact/dist/preact.js";import{useRef as n,useState as r}from"../../external/preact/hooks/dist/hooks.js";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c({setComponentRef:c}){const l=n({});Object.keys(l.current).length||null==c||c(l.current);const[u,s]=r(null),a=n(null),i=n(0),[f,p]=r(0);return l.current.setMessages=e=>{const t=a.current;!!(null==e?void 0:e.length)&&(null==t?void 0:t.length)===e.length&&t.every((t,n)=>t===e[n])&&(i.current+=1,p(i.current)),s(e)},a.current=u,u?e(t,null,u.map(t=>e("div",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){o(e,t,n[t])})}return e}({key:`${f}-${t}`,className:"adyen-checkout-sr-panel__msg"},!1),t))):null}export{c as SRMessages};
|
|
2
2
|
//# sourceMappingURL=SRMessages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SRMessages.js","sources":["../../../../src/core/Errors/SRMessages.tsx"],"sourcesContent":["import { h, Fragment } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport { SRMessagesProps } from './types';\n\n// An interface for the members exposed by SRMessages to its parent\nexport interface SRMessagesRef {\n setMessages?: (
|
|
1
|
+
{"version":3,"file":"SRMessages.js","sources":["../../../../src/core/Errors/SRMessages.tsx"],"sourcesContent":["import { h, Fragment } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport { SRMessagesProps } from './types';\n\n// An interface for the members exposed by SRMessages to its parent\nexport interface SRMessagesRef {\n setMessages?: (messages: string[] | null) => void;\n}\n\nexport function SRMessages({ setComponentRef }: Readonly<SRMessagesProps>) {\n const messagesRef = useRef<SRMessagesRef>({});\n // Just call once to create the object by which we expose the members expected by the parent comp\n if (!Object.keys(messagesRef.current).length) {\n setComponentRef?.(messagesRef.current);\n }\n\n const [messages, setMessages] = useState<string[] | null>(null);\n\n // Pairs with \"never clear\": if the panel is never emptied, re-writing the message that is\n // already displayed would diff to nothing and the AT would stay silent. Bumping the key\n // remounts the nodes so the change is observable.\n //\n // Only bump when the incoming messages are identical to what is rendered, so a partial\n // change (one validation error replaced by another) still diffs granularly and announces\n // just the new entry instead of re-reading the whole list.\n const renderedRef = useRef<string[] | null>(null);\n const versionRef = useRef(0);\n const [version, setVersion] = useState(0);\n\n // Expose method expected by parent\n messagesRef.current.setMessages = (msgs: string[] | null) => {\n const rendered = renderedRef.current;\n const isDuplicate = !!msgs?.length && rendered?.length === msgs.length && rendered.every((m, i) => m === msgs[i]);\n\n if (isDuplicate) {\n versionRef.current += 1;\n setVersion(versionRef.current);\n }\n\n setMessages(msgs);\n };\n\n // Track what is committed to the DOM rather than the latest pending state: a clear followed\n // by a re-set in the same tick batches into one render, which would hide the duplicate.\n renderedRef.current = messages;\n\n return messages ? (\n <Fragment>\n {messages.map(msg => {\n return (\n <div\n key={`${version}-${msg}`}\n className=\"adyen-checkout-sr-panel__msg\"\n {...(process.env.NODE_ENV !== 'production' && { 'data-testid': msg })}\n >\n {msg}\n </div>\n );\n })}\n </Fragment>\n ) : null;\n}\n"],"names":["SRMessages","setComponentRef","messagesRef","useRef","Object","keys","current","length","messages","setMessages","useState","renderedRef","versionRef","version","setVersion","msgs","rendered","every","m","i","h","Fragment","map","msg","div","key","className"],"mappings":"4RASO,SAASA,GAAWC,gBAAEA,IACzB,MAAMC,EAAcC,EAAsB,IAErCC,OAAOC,KAAKH,EAAYI,SAASC,QAClCN,SAAAA,EAAkBC,EAAYI,SAGlC,MAAOE,EAAUC,GAAeC,EAA0B,MASpDC,EAAcR,EAAwB,MACtCS,EAAaT,EAAO,IACnBU,EAASC,GAAcJ,EAAS,GAmBvC,OAhBAR,EAAYI,QAAQG,YAAeM,IAC/B,MAAMC,EAAWL,EAAYL,WACPS,aAAAA,EAAAA,EAAMR,UAAUS,aAAAA,EAAAA,EAAUT,UAAWQ,EAAKR,QAAUS,EAASC,MAAM,CAACC,EAAGC,IAAMD,IAAMH,EAAKI,MAG1GP,EAAWN,SAAW,EACtBQ,EAAWF,EAAWN,UAG1BG,EAAYM,IAKhBJ,EAAYL,QAAUE,EAEfA,EACHY,EAACC,EAAAA,KACIb,EAASc,IAAIC,GAENH,EAACI,wUAAAA,CAAAA,CACGC,IAAK,GAAGZ,KAAWU,IACnBG,UAAU,iCACL,GAEJH,KAKjB,IACR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SRPanel.js","sources":["../../../../src/core/Errors/SRPanel.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { AriaAttributes, SRPanelProps } from './types';\nimport BaseElement from '../../components/internal/BaseElement/BaseElement';\nimport { SRMessages, SRMessagesRef } from './SRMessages';\nimport type { ICore } from '../types';\nimport './SRPanel.scss';\n\n/**\n * A panel meant to hold messages that will be read out by ScreenReaders on an aria-live=\"polite\" basis\n * Expects a string or string array of message to add to the panel to be read out\n * For testing purposes can be made visible\n */\nexport class SRPanel extends BaseElement<SRPanelProps> {\n public static readonly type = 'srPanel';\n\n public static readonly defaultProps: Partial<SRPanelProps> = {\n enabled: true,\n node: 'body',\n showPanel: false,\n id: 'ariaLiveSRPanel',\n ariaAttributes: {\n 'aria-relevant': 'all',\n 'aria-live': 'polite',\n 'aria-atomic': 'true'\n }\n };\n\n private readonly srPanelContainer = null;\n\n private readonly id;\n private readonly showPanel;\n private readonly _enabled: boolean;\n private readonly _moveFocus: boolean;\n\n private componentRef: SRMessagesRef;\n\n constructor(checkout: ICore, props?: SRPanelProps) {\n super(checkout, props);\n\n this.id = this.props.id;\n this.showPanel = process.env.NODE_ENV !== 'production' ? this.props.showPanel : false;\n this._enabled = false;\n this._moveFocus = this.props.moveFocus ?? true;\n\n if (this.props.enabled) {\n this._enabled = true;\n\n const panelParent = document.querySelector(this.props.node);\n\n if (panelParent) {\n const preExistingSRPanel = document.getElementById(this.id);\n if (preExistingSRPanel) {\n panelParent.removeChild(preExistingSRPanel);\n }\n\n this.srPanelContainer = document.createElement('div');\n this.srPanelContainer.className = 'sr-panel-holder';\n this.srPanelContainer.id = this.id;\n\n panelParent.appendChild(this.srPanelContainer);\n\n this.mount(this.srPanelContainer);\n } else {\n throw new Error('Component could not mount. Root node was not found.');\n }\n }\n }\n\n public setComponentRef = ref => {\n this.componentRef = ref;\n };\n\n public get enabled() {\n return this._enabled;\n }\n\n public get moveFocus() {\n return this._moveFocus;\n }\n\n public setAriaProps(ariaAttributes: AriaAttributes): void {\n if (!this.props.enabled) return;\n\n const firstPanel = document.querySelector('[class^=\"adyen-checkout-sr-panel\"]');\n\n if (!firstPanel) {\n console.error('SRPanel: Failed to set aria props because no panel was found');\n return;\n }\n\n for (const [key, value] of Object.entries(ariaAttributes)) {\n firstPanel.setAttribute(key, value);\n }\n this.props = { ...this.props, ariaAttributes: { ...this.props.ariaAttributes, ...ariaAttributes } };\n }\n\n // A method we can expose to allow comps to set messages in this panel\n public setMessages = (messages: string[] | string): void => {\n if (!this.props.enabled) return;\n\n let panelMessages = null;\n if (messages) {\n // Ensure panelMessages is an array\n panelMessages = Array.isArray(messages) ? messages : [messages];\n }\n\n this.componentRef.setMessages(panelMessages);\n };\n\n render() {\n if (!this.props.enabled) return null;\n return (\n <div\n className={this.showPanel ? 'adyen-checkout-sr-panel' : 'adyen-checkout-sr-panel--sr-only'}\n role={'log'}\n {...this.props.ariaAttributes}\n {...(process.env.NODE_ENV !== 'production' && { 'data-testid': this.id })}\n >\n <SRMessages setComponentRef={this.setComponentRef} />\n </div>\n );\n }\n}\n"],"names":["SRPanel","BaseElement","enabled","this","_enabled","moveFocus","_moveFocus","setAriaProps","ariaAttributes","props","firstPanel","document","querySelector","key","value","Object","entries","setAttribute","_object_spread_props","_object_spread","console","error","render","h","div","className","showPanel","role","SRMessages","setComponentRef","constructor","checkout","_this_props_moveFocus","super","_define_property","srPanelContainer","id","componentRef","ref","setMessages","messages","panelMessages","Array","isArray","panelParent","node","Error","preExistingSRPanel","getElementById","removeChild","createElement","appendChild","mount","type","defaultProps"],"mappings":"+9BAYO,MAAMA,UAAgBC,EA4DzB,WAAWC,GACP,OAAOC,KAAKC,QAChB,CAEA,aAAWC,GACP,OAAOF,KAAKG,UAChB,CAEOC,YAAAA,CAAaC,GAChB,IAAKL,KAAKM,MAAMP,QAAS,OAEzB,MAAMQ,EAAaC,SAASC,cAAc,sCAE1C,GAAKF,EAAL,CAKA,IAAK,MAAOG,EAAKC,KAAUC,OAAOC,QAAQR,GACtCE,EAAWO,aAAaJ,EAAKC,GAEjCX,KAAKM,MAAQS,EAAAC,EAAA,CAAA,EAAKhB,KAAKM,OAAK,CAAED,eAAgBW,KAAKhB,KAAKM,MAAMD,eAAmBA,IALjF,MAFIY,QAAQC,MAAM,+DAQtB,CAeAC,MAAAA,GACI,OAAKnB,KAAKM,MAAMP,QAEZqB,EAACC,MAAAA,EAAAA,CACGC,UAAWtB,KAAKuB,UAAY,0BAA4B,mCACxDC,KAAM,OACFxB,KAAKM,MAAMD,gBACV,GAELe,EAACK,EAAAA,CAAWC,gBAAiB1B,KAAK0B,mBARV,IAWpC,CArFA,WAAAC,CAAYC,EAAiBtB,GAMP,IAAAuB,EAElB,GAPAC,MAAMF,EAAUtB,GAVpByB,EAAA/B,KAAiBgC,mBAAmB,MAEpCD,EAAA/B,KAAiBiC,aACjBF,EAAA/B,KAAiBuB,oBACjBQ,EAAA/B,KAAiBC,mBACjB8B,EAAA/B,KAAiBG,qBAEjB4B,EAAA/B,KAAQkC,uBAkCRH,EAAA/B,KAAO0B,kBAAkBS,IACrBnC,KAAKkC,aAAeC,IA4BxBJ,EAAA/B,KAAOoC,cAAeC,IAClB,IAAKrC,KAAKM,MAAMP,QAAS,OAEzB,IAAIuC,EAAgB,KAChBD,IAEAC,EAAgBC,MAAMC,QAAQH,GAAYA,EAAW,CAACA,IAG1DrC,KAAKkC,aAAaE,YAAYE,KAnE9BtC,KAAKiC,GAAKjC,KAAKM,MAAM2B,GACrBjC,KAAKuB,WAA2E,EAChFvB,KAAKC,UAAW,EAChBD,KAAKG,WAAiC,QAApB0B,EAAA7B,KAAKM,MAAMJ,iBAAX,IAAA2B,GAAAA,EAEd7B,KAAKM,MAAMP,QAAS,CACpBC,KAAKC,UAAW,EAEhB,MAAMwC,EAAcjC,SAASC,cAAcT,KAAKM,MAAMoC,MAEtD,IAAID,EAcA,MAAM,IAAIE,MAAM,uDAdH,CACb,MAAMC,EAAqBpC,SAASqC,eAAe7C,KAAKiC,IACpDW,GACAH,EAAYK,YAAYF,GAG5B5C,KAAKgC,iBAAmBxB,SAASuC,cAAc,OAC/C/C,KAAKgC,iBAAiBV,UAAY,kBAClCtB,KAAKgC,iBAAiBC,GAAKjC,KAAKiC,GAEhCQ,EAAYO,YAAYhD,KAAKgC,kBAE7BhC,KAAKiD,MAAMjD,KAAKgC,iBACpB,CAGJ,CACJ,EArDAD,EADSlC,EACcqD,OAAO,WAE9BnB,EAHSlC,EAGcsD,eAAsC,CACzDpD,SAAS,EACT2C,KAAM,OACNnB,WAAW,EACXU,GAAI,kBACJ5B,eAAgB,CACZ,gBAAiB,MACjB,YAAa,SACb,cAAe"}
|
|
1
|
+
{"version":3,"file":"SRPanel.js","sources":["../../../../src/core/Errors/SRPanel.tsx"],"sourcesContent":["import { h } from 'preact';\nimport { AriaAttributes, SRPanelProps } from './types';\nimport BaseElement from '../../components/internal/BaseElement/BaseElement';\nimport { SRMessages, SRMessagesRef } from './SRMessages';\nimport type { ICore } from '../types';\nimport './SRPanel.scss';\n\n/**\n * A panel meant to hold messages that will be read out by ScreenReaders on an aria-live=\"polite\" basis\n * Expects a string or string array of message to add to the panel to be read out\n * For testing purposes can be made visible\n */\nexport class SRPanel extends BaseElement<SRPanelProps> {\n public static readonly type = 'srPanel';\n\n public static readonly defaultProps: Partial<SRPanelProps> = {\n enabled: true,\n node: 'body',\n showPanel: false,\n id: 'ariaLiveSRPanel',\n ariaAttributes: {\n 'aria-relevant': 'all',\n 'aria-live': 'polite',\n 'aria-atomic': 'true'\n }\n };\n\n private readonly srPanelContainer = null;\n\n private readonly id;\n private readonly showPanel;\n private readonly _enabled: boolean;\n private readonly _moveFocus: boolean;\n\n private componentRef: SRMessagesRef;\n\n constructor(checkout: ICore, props?: SRPanelProps) {\n super(checkout, props);\n\n this.id = this.props.id;\n this.showPanel = process.env.NODE_ENV !== 'production' ? this.props.showPanel : false;\n this._enabled = false;\n this._moveFocus = this.props.moveFocus ?? true;\n\n if (this.props.enabled) {\n this._enabled = true;\n\n const panelParent = document.querySelector(this.props.node);\n\n if (panelParent) {\n const preExistingSRPanel = document.getElementById(this.id);\n if (preExistingSRPanel) {\n panelParent.removeChild(preExistingSRPanel);\n }\n\n this.srPanelContainer = document.createElement('div');\n this.srPanelContainer.className = 'sr-panel-holder';\n this.srPanelContainer.id = this.id;\n\n panelParent.appendChild(this.srPanelContainer);\n\n this.mount(this.srPanelContainer);\n } else {\n throw new Error('Component could not mount. Root node was not found.');\n }\n }\n }\n\n public setComponentRef = ref => {\n this.componentRef = ref;\n };\n\n public get enabled() {\n return this._enabled;\n }\n\n public get moveFocus() {\n return this._moveFocus;\n }\n\n public setAriaProps(ariaAttributes: AriaAttributes): void {\n if (!this.props.enabled) return;\n\n const firstPanel = document.querySelector('[class^=\"adyen-checkout-sr-panel\"]');\n\n if (!firstPanel) {\n console.error('SRPanel: Failed to set aria props because no panel was found');\n return;\n }\n\n for (const [key, value] of Object.entries(ariaAttributes)) {\n firstPanel.setAttribute(key, value);\n }\n this.props = { ...this.props, ariaAttributes: { ...this.props.ariaAttributes, ...ariaAttributes } };\n }\n\n // A method we can expose to allow comps to set messages in this panel\n public setMessages = (messages: string[] | string | null): void => {\n if (!this.props.enabled) return;\n\n let panelMessages = null;\n if (messages) {\n // Ensure panelMessages is an array\n panelMessages = Array.isArray(messages) ? messages : [messages];\n }\n\n this.componentRef.setMessages(panelMessages);\n };\n\n render() {\n if (!this.props.enabled) return null;\n return (\n <div\n className={this.showPanel ? 'adyen-checkout-sr-panel' : 'adyen-checkout-sr-panel--sr-only'}\n role={'log'}\n {...this.props.ariaAttributes}\n {...(process.env.NODE_ENV !== 'production' && { 'data-testid': this.id })}\n >\n <SRMessages setComponentRef={this.setComponentRef} />\n </div>\n );\n }\n}\n"],"names":["SRPanel","BaseElement","enabled","this","_enabled","moveFocus","_moveFocus","setAriaProps","ariaAttributes","props","firstPanel","document","querySelector","key","value","Object","entries","setAttribute","_object_spread_props","_object_spread","console","error","render","h","div","className","showPanel","role","SRMessages","setComponentRef","constructor","checkout","_this_props_moveFocus","super","_define_property","srPanelContainer","id","componentRef","ref","setMessages","messages","panelMessages","Array","isArray","panelParent","node","Error","preExistingSRPanel","getElementById","removeChild","createElement","appendChild","mount","type","defaultProps"],"mappings":"+9BAYO,MAAMA,UAAgBC,EA4DzB,WAAWC,GACP,OAAOC,KAAKC,QAChB,CAEA,aAAWC,GACP,OAAOF,KAAKG,UAChB,CAEOC,YAAAA,CAAaC,GAChB,IAAKL,KAAKM,MAAMP,QAAS,OAEzB,MAAMQ,EAAaC,SAASC,cAAc,sCAE1C,GAAKF,EAAL,CAKA,IAAK,MAAOG,EAAKC,KAAUC,OAAOC,QAAQR,GACtCE,EAAWO,aAAaJ,EAAKC,GAEjCX,KAAKM,MAAQS,EAAAC,EAAA,CAAA,EAAKhB,KAAKM,OAAK,CAAED,eAAgBW,KAAKhB,KAAKM,MAAMD,eAAmBA,IALjF,MAFIY,QAAQC,MAAM,+DAQtB,CAeAC,MAAAA,GACI,OAAKnB,KAAKM,MAAMP,QAEZqB,EAACC,MAAAA,EAAAA,CACG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cqD,OAAO,WAE9BnB,EAHSlC,EAGcsD,eAAsC,CACzDpD,SAAS,EACT2C,KAAM,OACNnB,WAAW,EACXU,GAAI,kBACJ5B,eAAgB,CACZ,gBAAiB,MACjB,YAAa,SACb,cAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SRPanelProvider.js","sources":["../../../../src/core/Errors/SRPanelProvider.tsx"],"sourcesContent":["import { h, ComponentChildren } from 'preact';\nimport { SRPanelContext } from './SRPanelContext';\nimport { useCoreContext } from '../Context/CoreProvider';\nimport { partial } from '../../components/internal/SecuredFields/lib/utilities/commonUtils';\nimport { setSRMessagesFromErrors } from './utils';\nimport { SRPanel } from './SRPanel';\nimport { SetSRMessagesReturnObject } from './types';\nimport { StringObject } from '../../components/internal/Address/types';\n\ntype SRPanelProviderProps = {\n srPanel: SRPanel;\n children: ComponentChildren;\n};\n\ninterface SetSRMessagesReturnFnProps {\n errors: {\n [key: string]: any;\n };\n isValidating: boolean;\n layout?: string[];\n countrySpecificLabels?: StringObject;\n}\n\nexport type SetSRMessagesReturnFn = (props: SetSRMessagesReturnFnProps) => SetSRMessagesReturnObject;\n\nconst SRPanelProvider = ({ srPanel, children }: Readonly<SRPanelProviderProps>) => {\n const { i18n } = useCoreContext();\n\n // Helper fns\n const setSRMessagesFromObjects = ({ fieldTypeMappingFn }): SetSRMessagesReturnFn => {\n return partial(setSRMessagesFromErrors, {\n SRPanelRef: srPanel,\n i18n,\n fieldTypeMappingFn\n });\n };\n\n const setSRMessagesFromStrings = strs => {\n srPanel.setMessages(strs);\n };\n\n const clearSRPanel = () => {\n srPanel.setMessages(null);\n };\n\n const shouldMoveFocusSR = srPanel.moveFocus;\n\n return (\n <SRPanelContext.Provider value={{ srPanel, setSRMessagesFromObjects, setSRMessagesFromStrings, clearSRPanel, shouldMoveFocusSR }}>\n {children}\n </SRPanelContext.Provider>\n );\n};\n\nexport default SRPanelProvider;\n"],"names":["SRPanelProvider","srPanel","children","i18n","useCoreContext","shouldMoveFocusSR","moveFocus","h","SRPanelContext","Provider","value","setSRMessagesFromObjects","fieldTypeMappingFn","partial","setSRMessagesFromErrors","SRPanelRef","setSRMessagesFromStrings","strs","setMessages","clearSRPanel"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SRPanelProvider.js","sources":["../../../../src/core/Errors/SRPanelProvider.tsx"],"sourcesContent":["import { h, ComponentChildren } from 'preact';\nimport { SRPanelContext } from './SRPanelContext';\nimport { useCoreContext } from '../Context/CoreProvider';\nimport { partial } from '../../components/internal/SecuredFields/lib/utilities/commonUtils';\nimport { setSRMessagesFromErrors } from './utils';\nimport { SRPanel } from './SRPanel';\nimport { SetSRMessagesReturnObject } from './types';\nimport { StringObject } from '../../components/internal/Address/types';\n\ntype SRPanelProviderProps = {\n srPanel: SRPanel;\n children: ComponentChildren;\n};\n\ninterface SetSRMessagesReturnFnProps {\n errors: {\n [key: string]: any;\n };\n isValidating: boolean;\n layout?: string[];\n countrySpecificLabels?: StringObject;\n /**\n * Whether this form currently has errors of its own on display. The SR panel is shared with\n * status reporters (loading, await, countdown), so a form must not clear it when it has\n * nothing of its own to clear. Defaults to true to preserve existing caller behaviour.\n */\n hasDisplayedErrors?: boolean;\n}\n\nexport type SetSRMessagesReturnFn = (props: SetSRMessagesReturnFnProps) => SetSRMessagesReturnObject;\n\nconst SRPanelProvider = ({ srPanel, children }: Readonly<SRPanelProviderProps>) => {\n const { i18n } = useCoreContext();\n\n // Helper fns\n const setSRMessagesFromObjects = ({ fieldTypeMappingFn }): SetSRMessagesReturnFn => {\n return partial(setSRMessagesFromErrors, {\n SRPanelRef: srPanel,\n i18n,\n fieldTypeMappingFn\n });\n };\n\n const setSRMessagesFromStrings = strs => {\n srPanel.setMessages(strs);\n };\n\n const clearSRPanel = () => {\n srPanel.setMessages(null);\n };\n\n const shouldMoveFocusSR = srPanel.moveFocus;\n\n return (\n <SRPanelContext.Provider value={{ srPanel, setSRMessagesFromObjects, setSRMessagesFromStrings, clearSRPanel, shouldMoveFocusSR }}>\n {children}\n </SRPanelContext.Provider>\n );\n};\n\nexport default SRPanelProvider;\n"],"names":["SRPanelProvider","srPanel","children","i18n","useCoreContext","shouldMoveFocusSR","moveFocus","h","SRPanelContext","Provider","value","setSRMessagesFromObjects","fieldTypeMappingFn","partial","setSRMessagesFromErrors","SRPanelRef","setSRMessagesFromStrings","strs","setMessages","clearSRPanel"],"mappings":"0UA+BA,MAAMA,EAAkB,EAAGC,UAASC,eAChC,MAAMC,KAAEA,GAASC,IAmBXC,EAAoBJ,EAAQK,UAElC,OACIC,EAACC,EAAeC,SAAQ,CAACC,MAAO,CAAET,UAASU,yBAnBd,EAAGC,wBACzBC,EAAQC,EAAyB,CACpCC,WAAYd,EACZE,OACAS,uBAeiEI,yBAXxCC,IAC7BhB,EAAQiB,YAAYD,IAU2EE,aAP9E,KACjBlB,EAAQiB,YAAY,OAMyFb,sBACxGH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ENCRYPTED_PWD_FIELD as
|
|
1
|
+
import{ENCRYPTED_PWD_FIELD as _,ENCRYPTED_SECURITY_CODE as R,ENCRYPTED_EXPIRY_YEAR as c,ENCRYPTED_EXPIRY_MONTH as E,ENCRYPTED_EXPIRY_DATE as C,ENCRYPTED_CARD_NUMBER as r}from"../../components/internal/SecuredFields/lib/constants.js";const O="-ariaError",e="-ariaContext",t="focusField",M="notValidating:blurScenario",n="field.error.required",a="field.error.invalid",i="invalid.format.expects",d="creditCard.holderName.invalid",S="creditCard.taxNumber.invalid",L="boleto.socialSecurityNumber.invalid";var T=function(_){return _.CC_NUM="cc.num",_.CC_DAT="cc.dat",_.CC_MTH="cc.mth",_.CC_YR="cc.yr",_.CC_CVC="cc.cvc",_.KCP_PWD="kcp.pwd",_}({}),D=function(_){return _.ERROR_MSG_INCOMPLETE_FIELD="err.gen.9100",_.ERROR_MSG_INVALID_FIELD="err.gen.9101",_.ERROR_MSG_LUHN_CHECK_FAILED="cc.num.902",_.ERROR_MSG_EMPTY_PAN="cc.num.900",_.ERROR_MSG_UNSUPPORTED_CARD_ENTERED="cc.num.903",_.ERROR_MSG_INCORRECTLY_FILLED_PAN="cc.num.901",_.ERROR_MSG_CARD_TOO_OLD="cc.dat.912",_.ERROR_MSG_CARD_TOO_FAR_IN_FUTURE="cc.dat.913",_.ERROR_MSG_CARD_EXPIRES_TOO_SOON="cc.dat.914",_.ERROR_MSG_EMPTY_DATE="cc.dat.910",_.ERROR_MSG_INCORRECTLY_FILLED__DATE="cc.dat.911",_.ERROR_MSG_EMPTY_YEAR="cc.yr.917",_.ERROR_MSG_INCORRECTLY_FILLED_YEAR="cc.yr.918",_.ERROR_MSG_EMPTY_MONTH="cc.mth.915",_.ERROR_MSG_EMPTY_CVC="cc.cvc.920",_.ERROR_MSG_INCORRECTLY_FILLED_CVC="cc.cvc.921",_.ERROR_MSG_EMPTY_CVC_AMEX="cc.cvc.920.amex",_.ERROR_MSG_INCORRECTLY_FILLED_CVC_AMEX="cc.cvc.921.amex",_.ERROR_MSG_EMPTY_KCP_PWD="kcp.pwd.940",_.ERROR_MSG_INCORRECTLY_FILLED_KCP_PWD="kcp.pwd.941",_}({});const o={[r]:"cc.num.900",[C]:"cc.dat.910",[E]:"cc.mth.915",[c]:"cc.yr.917",[R]:"cc.cvc.920",[_]:"kcp.pwd.940"};export{e as ARIA_CONTEXT_SUFFIX,O as ARIA_ERROR_SUFFIX,L as BOLETO_SOCIAL_SECURITY_NUMBER_INVALID,d as CREDITCARD_HOLDER_NAME_INVALID,S as CREDITCARD_TAX_NUMBER_INVALID,o as EMPTY_FIELD_ERROR_MESSAGES,M as ERROR_ACTION_BLUR_SCENARIO,t as ERROR_ACTION_FOCUS_FIELD,a as ERROR_FIELD_INVALID,n as ERROR_FIELD_REQUIRED,i as ERROR_INVALID_FORMAT_EXPECTS,T as ErrorCodePrefixes,D as SF_ErrorCodes};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/core/Errors/constants.ts"],"sourcesContent":["import {\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR,\n ENCRYPTED_PWD_FIELD,\n ENCRYPTED_SECURITY_CODE\n} from '../../components/internal/SecuredFields/lib/constants';\n\nexport const ARIA_ERROR_SUFFIX = '-ariaError';\nexport const ARIA_CONTEXT_SUFFIX = '-ariaContext';\n\nexport const ERROR_ACTION_FOCUS_FIELD = 'focusField';\nexport const ERROR_ACTION_BLUR_SCENARIO = 'notValidating:blurScenario';\nexport const ERROR_FIELD_REQUIRED = 'field.error.required';\nexport const ERROR_FIELD_INVALID = 'field.error.invalid';\n\nexport const ERROR_INVALID_FORMAT_EXPECTS = 'invalid.format.expects';\nexport const CREDITCARD_HOLDER_NAME_INVALID = 'creditCard.holderName.invalid';\nexport const CREDITCARD_TAX_NUMBER_INVALID = 'creditCard.taxNumber.invalid';\nexport const BOLETO_SOCIAL_SECURITY_NUMBER_INVALID = 'boleto.socialSecurityNumber.invalid';\n\nexport enum ErrorCodePrefixes {\n CC_NUM = 'cc.num',\n CC_DAT = 'cc.dat',\n CC_MTH = 'cc.mth',\n CC_YR = 'cc.yr',\n CC_CVC = 'cc.cvc',\n KCP_PWD = 'kcp.pwd'\n}\n\n/**\n * For SecuredFields\n * Human readable error strings mapped to the codes, used as keys, in the translations files\n */\nexport enum SF_ErrorCodes {\n ERROR_MSG_INCOMPLETE_FIELD = 'err.gen.9100',\n ERROR_MSG_INVALID_FIELD = 'err.gen.9101',\n\n ERROR_MSG_LUHN_CHECK_FAILED = `${ErrorCodePrefixes.CC_NUM}.902`,\n ERROR_MSG_EMPTY_PAN = `${ErrorCodePrefixes.CC_NUM}.900`,\n ERROR_MSG_UNSUPPORTED_CARD_ENTERED = `${ErrorCodePrefixes.CC_NUM}.903`,\n ERROR_MSG_INCORRECTLY_FILLED_PAN = `${ErrorCodePrefixes.CC_NUM}.901`, // 'Enter the complete card number'\n\n ERROR_MSG_CARD_TOO_OLD = `${ErrorCodePrefixes.CC_DAT}.912`,\n ERROR_MSG_CARD_TOO_FAR_IN_FUTURE = `${ErrorCodePrefixes.CC_DAT}.913`,\n ERROR_MSG_CARD_EXPIRES_TOO_SOON = `${ErrorCodePrefixes.CC_DAT}.914`,\n ERROR_MSG_EMPTY_DATE = `${ErrorCodePrefixes.CC_DAT}.910`,\n ERROR_MSG_INCORRECTLY_FILLED__DATE = `${ErrorCodePrefixes.CC_DAT}.911`,\n\n ERROR_MSG_EMPTY_YEAR = `${ErrorCodePrefixes.CC_YR}.917`,\n ERROR_MSG_INCORRECTLY_FILLED_YEAR = `${ErrorCodePrefixes.CC_YR}.918`,\n\n // ERROR_MSG_INCORRECTLY_FILLED_MONTH= `cc.mth.916`,\n ERROR_MSG_EMPTY_MONTH = `${ErrorCodePrefixes.CC_MTH}.915`,\n\n ERROR_MSG_EMPTY_CVC = `${ErrorCodePrefixes.CC_CVC}.920`,\n ERROR_MSG_INCORRECTLY_FILLED_CVC = `${ErrorCodePrefixes.CC_CVC}.921`,\n\n ERROR_MSG_EMPTY_KCP_PWD = `${ErrorCodePrefixes.KCP_PWD}.940`,\n ERROR_MSG_INCORRECTLY_FILLED_KCP_PWD = `${ErrorCodePrefixes.KCP_PWD}.941`\n}\n\nexport const EMPTY_FIELD_ERROR_MESSAGES = {\n [ENCRYPTED_CARD_NUMBER]: SF_ErrorCodes.ERROR_MSG_EMPTY_PAN,\n [ENCRYPTED_EXPIRY_DATE]: SF_ErrorCodes.ERROR_MSG_EMPTY_DATE,\n [ENCRYPTED_EXPIRY_MONTH]: SF_ErrorCodes.ERROR_MSG_EMPTY_MONTH,\n [ENCRYPTED_EXPIRY_YEAR]: SF_ErrorCodes.ERROR_MSG_EMPTY_YEAR,\n [ENCRYPTED_SECURITY_CODE]: SF_ErrorCodes.ERROR_MSG_EMPTY_CVC,\n [ENCRYPTED_PWD_FIELD]: SF_ErrorCodes.ERROR_MSG_EMPTY_KCP_PWD\n};\n"],"names":["ARIA_ERROR_SUFFIX","ARIA_CONTEXT_SUFFIX","ERROR_ACTION_FOCUS_FIELD","ERROR_ACTION_BLUR_SCENARIO","ERROR_FIELD_REQUIRED","ERROR_FIELD_INVALID","ERROR_INVALID_FORMAT_EXPECTS","CREDITCARD_HOLDER_NAME_INVALID","CREDITCARD_TAX_NUMBER_INVALID","BOLETO_SOCIAL_SECURITY_NUMBER_INVALID","ErrorCodePrefixes","SF_ErrorCodes","EMPTY_FIELD_ERROR_MESSAGES","ENCRYPTED_CARD_NUMBER","ENCRYPTED_EXPIRY_DATE","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","ENCRYPTED_SECURITY_CODE","ENCRYPTED_PWD_FIELD"],"mappings":"yOASO,MAAMA,EAAoB,aACpBC,EAAsB,eAEtBC,EAA2B,aAC3BC,EAA6B,6BAC7BC,EAAuB,uBACvBC,EAAsB,sBAEtBC,EAA+B,yBAC/BC,EAAiC,gCACjCC,EAAgC,+BAChCC,EAAwC,sCAE9C,IAAAC,EAAKA,SAAAA,GAAAA,mHAAAA,CAOX,CAPWA,CAOX,CAAA,GAMWC,EAAAA,SAAAA,GAAAA
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/core/Errors/constants.ts"],"sourcesContent":["import {\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR,\n ENCRYPTED_PWD_FIELD,\n ENCRYPTED_SECURITY_CODE\n} from '../../components/internal/SecuredFields/lib/constants';\n\nexport const ARIA_ERROR_SUFFIX = '-ariaError';\nexport const ARIA_CONTEXT_SUFFIX = '-ariaContext';\n\nexport const ERROR_ACTION_FOCUS_FIELD = 'focusField';\nexport const ERROR_ACTION_BLUR_SCENARIO = 'notValidating:blurScenario';\nexport const ERROR_FIELD_REQUIRED = 'field.error.required';\nexport const ERROR_FIELD_INVALID = 'field.error.invalid';\n\nexport const ERROR_INVALID_FORMAT_EXPECTS = 'invalid.format.expects';\nexport const CREDITCARD_HOLDER_NAME_INVALID = 'creditCard.holderName.invalid';\nexport const CREDITCARD_TAX_NUMBER_INVALID = 'creditCard.taxNumber.invalid';\nexport const BOLETO_SOCIAL_SECURITY_NUMBER_INVALID = 'boleto.socialSecurityNumber.invalid';\n\nexport enum ErrorCodePrefixes {\n CC_NUM = 'cc.num',\n CC_DAT = 'cc.dat',\n CC_MTH = 'cc.mth',\n CC_YR = 'cc.yr',\n CC_CVC = 'cc.cvc',\n KCP_PWD = 'kcp.pwd'\n}\n\n/**\n * For SecuredFields\n * Human readable error strings mapped to the codes, used as keys, in the translations files\n */\nexport enum SF_ErrorCodes {\n ERROR_MSG_INCOMPLETE_FIELD = 'err.gen.9100',\n ERROR_MSG_INVALID_FIELD = 'err.gen.9101',\n\n ERROR_MSG_LUHN_CHECK_FAILED = `${ErrorCodePrefixes.CC_NUM}.902`,\n ERROR_MSG_EMPTY_PAN = `${ErrorCodePrefixes.CC_NUM}.900`,\n ERROR_MSG_UNSUPPORTED_CARD_ENTERED = `${ErrorCodePrefixes.CC_NUM}.903`,\n ERROR_MSG_INCORRECTLY_FILLED_PAN = `${ErrorCodePrefixes.CC_NUM}.901`, // 'Enter the complete card number'\n\n ERROR_MSG_CARD_TOO_OLD = `${ErrorCodePrefixes.CC_DAT}.912`,\n ERROR_MSG_CARD_TOO_FAR_IN_FUTURE = `${ErrorCodePrefixes.CC_DAT}.913`,\n ERROR_MSG_CARD_EXPIRES_TOO_SOON = `${ErrorCodePrefixes.CC_DAT}.914`,\n ERROR_MSG_EMPTY_DATE = `${ErrorCodePrefixes.CC_DAT}.910`,\n ERROR_MSG_INCORRECTLY_FILLED__DATE = `${ErrorCodePrefixes.CC_DAT}.911`,\n\n ERROR_MSG_EMPTY_YEAR = `${ErrorCodePrefixes.CC_YR}.917`,\n ERROR_MSG_INCORRECTLY_FILLED_YEAR = `${ErrorCodePrefixes.CC_YR}.918`,\n\n // ERROR_MSG_INCORRECTLY_FILLED_MONTH= `cc.mth.916`,\n ERROR_MSG_EMPTY_MONTH = `${ErrorCodePrefixes.CC_MTH}.915`,\n\n ERROR_MSG_EMPTY_CVC = `${ErrorCodePrefixes.CC_CVC}.920`,\n ERROR_MSG_INCORRECTLY_FILLED_CVC = `${ErrorCodePrefixes.CC_CVC}.921`,\n\n ERROR_MSG_EMPTY_CVC_AMEX = `${ErrorCodePrefixes.CC_CVC}.920.amex`,\n ERROR_MSG_INCORRECTLY_FILLED_CVC_AMEX = `${ErrorCodePrefixes.CC_CVC}.921.amex`,\n\n ERROR_MSG_EMPTY_KCP_PWD = `${ErrorCodePrefixes.KCP_PWD}.940`,\n ERROR_MSG_INCORRECTLY_FILLED_KCP_PWD = `${ErrorCodePrefixes.KCP_PWD}.941`\n}\n\nexport const EMPTY_FIELD_ERROR_MESSAGES = {\n [ENCRYPTED_CARD_NUMBER]: SF_ErrorCodes.ERROR_MSG_EMPTY_PAN,\n [ENCRYPTED_EXPIRY_DATE]: SF_ErrorCodes.ERROR_MSG_EMPTY_DATE,\n [ENCRYPTED_EXPIRY_MONTH]: SF_ErrorCodes.ERROR_MSG_EMPTY_MONTH,\n [ENCRYPTED_EXPIRY_YEAR]: SF_ErrorCodes.ERROR_MSG_EMPTY_YEAR,\n [ENCRYPTED_SECURITY_CODE]: SF_ErrorCodes.ERROR_MSG_EMPTY_CVC,\n [ENCRYPTED_PWD_FIELD]: SF_ErrorCodes.ERROR_MSG_EMPTY_KCP_PWD\n};\n"],"names":["ARIA_ERROR_SUFFIX","ARIA_CONTEXT_SUFFIX","ERROR_ACTION_FOCUS_FIELD","ERROR_ACTION_BLUR_SCENARIO","ERROR_FIELD_REQUIRED","ERROR_FIELD_INVALID","ERROR_INVALID_FORMAT_EXPECTS","CREDITCARD_HOLDER_NAME_INVALID","CREDITCARD_TAX_NUMBER_INVALID","BOLETO_SOCIAL_SECURITY_NUMBER_INVALID","ErrorCodePrefixes","SF_ErrorCodes","EMPTY_FIELD_ERROR_MESSAGES","ENCRYPTED_CARD_NUMBER","ENCRYPTED_EXPIRY_DATE","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","ENCRYPTED_SECURITY_CODE","ENCRYPTED_PWD_FIELD"],"mappings":"yOASO,MAAMA,EAAoB,aACpBC,EAAsB,eAEtBC,EAA2B,aAC3BC,EAA6B,6BAC7BC,EAAuB,uBACvBC,EAAsB,sBAEtBC,EAA+B,yBAC/BC,EAAiC,gCACjCC,EAAgC,+BAChCC,EAAwC,sCAE9C,IAAAC,EAAKA,SAAAA,GAAAA,mHAAAA,CAOX,CAPWA,CAOX,CAAA,GAMWC,EAAAA,SAAAA,GAAAA,s3BAAAA,CA6BX,CA7BWA,CA6BX,CAAA,SAEYC,EAA6B,CACtCC,CAACA,GAAsB,aACvBC,CAACA,GAAsB,aACvBC,CAACA,GAAuB,aACxBC,CAACA,GAAsB,YACvBC,CAACA,GAAwB,aACzBC,CAACA,GAAoB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useEffect as
|
|
1
|
+
import{useEffect as t}from"../../external/preact/hooks/dist/hooks.js";import e from"./useSRPanelContext.js";const r=r=>{const{srPanel:s}=e();t(()=>{if(s)return s.setAriaProps({"aria-relevant":"additions text"}),()=>{s.setAriaProps({"aria-relevant":s.constructor.defaultProps.ariaAttributes["aria-relevant"]})}},[s]),t(()=>{s&&void 0!==r&&s.setMessages(r)},[s,r])};export{r as useA11yReporter};
|
|
2
2
|
//# sourceMappingURL=useA11yReporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useA11yReporter.js","sources":["../../../../src/core/Errors/useA11yReporter.ts"],"sourcesContent":["import { useEffect } from 'preact/hooks';\nimport useSRPanelContext from './useSRPanelContext';\n\nexport const useA11yReporter = (statusMessage): void => {\n const { srPanel } = useSRPanelContext();\n\n useEffect(() => {\n srPanel.setAriaProps({ 'aria-relevant': 'additions text' });\n return () => {\n
|
|
1
|
+
{"version":3,"file":"useA11yReporter.js","sources":["../../../../src/core/Errors/useA11yReporter.ts"],"sourcesContent":["import { useEffect } from 'preact/hooks';\nimport useSRPanelContext from './useSRPanelContext';\n\nexport const useA11yReporter = (statusMessage?: string | null): void => {\n const { srPanel } = useSRPanelContext();\n\n useEffect(() => {\n if (!srPanel) return;\n srPanel.setAriaProps({ 'aria-relevant': 'additions text' });\n return () => {\n // Deliberately does not clear the panel. The panel is shared, so clearing on unmount\n // destroys whatever is on display -- often a message another component just wrote --\n // and truncates our own message before a screen reader has had time to read it.\n // A status message stays until something supersedes it.\n srPanel.setAriaProps({ 'aria-relevant': srPanel.constructor['defaultProps'].ariaAttributes['aria-relevant'] });\n };\n }, [srPanel]);\n\n useEffect(() => {\n if (!srPanel || statusMessage === undefined) return;\n srPanel.setMessages(statusMessage);\n }, [srPanel, statusMessage]);\n};\n"],"names":["useA11yReporter","statusMessage","srPanel","useSRPanelContext","useEffect","setAriaProps","constructor","ariaAttributes","undefined","setMessages"],"mappings":"4GAGO,MAAMA,EAAmBC,IAC5B,MAAMC,QAAEA,GAAYC,IAEpBC,EAAU,KACN,GAAKF,EAEL,OADAA,EAAQG,aAAa,CAAE,gBAAiB,mBACjC,KAKHH,EAAQG,aAAa,CAAE,gBAAiBH,EAAQI,yBAA4BC,eAAe,qBAEhG,CAACL,IAEJE,EAAU,KACDF,QAA6BM,IAAlBP,GAChBC,EAAQO,YAAYR,IACrB,CAACC,EAASD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useRef as o}from"../../external/preact/hooks/dist/hooks.js";import{useCoreContext as r}from"../Context/CoreProvider.js";import{useA11yReporter as e}from"./useA11yReporter.js";const t=(t,s)=>{const{i18n:n}=r(),i=o(t);t&&(i.current=!0);const c=t?n.get("loading"):null!=s?s:i.current?n.get("loaded"):void 0;e(c)};export{t as useLoadingA11yReporter};
|
|
2
|
+
//# sourceMappingURL=useLoadingA11yReporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLoadingA11yReporter.js","sources":["../../../../src/core/Errors/useLoadingA11yReporter.ts"],"sourcesContent":["import { useRef } from 'preact/hooks';\n\nimport { useCoreContext } from '../Context/CoreProvider';\nimport { useA11yReporter } from './useA11yReporter';\n\n/**\n * Announces loading transitions to screen readers, for components whose spinner has no\n * accessible name of its own.\n *\n * The terminal message is required rather than cosmetic: the SR panel is shared and is\n * deliberately not cleared when a reporter unmounts, so without something to supersede it the\n * \"loading\" announcement would be left on display after loading has finished.\n *\n * Call this from a component that stays mounted across the whole transition. Calling it from a\n * component that only exists while loading cannot work, because it unmounts before it is able\n * to announce the terminal message.\n *\n * @param isLoading - whether the component is currently loading\n * @param finalMessage - announced instead of the generic \"loaded\" once loading ends, e.g. a payment result\n */\nexport const useLoadingA11yReporter = (isLoading: boolean, finalMessage?: string): void => {\n const { i18n } = useCoreContext();\n const hasStartedLoading = useRef(isLoading);\n\n if (isLoading) {\n hasStartedLoading.current = true;\n }\n\n const statusMessage = isLoading ? i18n.get('loading') : (finalMessage ?? (hasStartedLoading.current ? i18n.get('loaded') : undefined));\n useA11yReporter(statusMessage);\n};\n"],"names":["useLoadingA11yReporter","isLoading","finalMessage","i18n","useCoreContext","hasStartedLoading","useRef","current","statusMessage","get","undefined","useA11yReporter"],"mappings":"sLAoBO,MAAMA,EAAyB,CAACC,EAAoBC,KACvD,MAAMC,KAAEA,GAASC,IACXC,EAAoBC,EAAOL,GAE7BA,IACAI,EAAkBE,SAAU,GAGhC,MAAMC,EAAgBP,EAAYE,EAAKM,IAAI,WAAcP,QAAAA,EAAiBG,EAAkBE,QAAUJ,EAAKM,IAAI,eAAYC,EAC3HC,EAAgBH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{SF_ErrorCodes as e,ERROR_ACTION_FOCUS_FIELD as r,ERROR_ACTION_BLUR_SCENARIO as t,ErrorCodePrefixes as n}from"./constants.js";import{ENCRYPTED_PWD_FIELD as o,ENCRYPTED_SECURITY_CODE as s,ENCRYPTED_EXPIRY_YEAR as a,ENCRYPTED_EXPIRY_MONTH as i,ENCRYPTED_EXPIRY_DATE as c,ENCRYPTED_CARD_NUMBER as l}from"../../components/internal/SecuredFields/lib/constants.js";function u(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const f=(r,t)=>Object.values(e).reduce((e,n)=>(n.includes(t)&&(e[n]=r.get(n)),e),{}),b=(e,r,t)=>{const n=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){u(e,r,t[r])})}return e}({},e),o=y(t);return n.error=f(r,o),n},p=(e,r)=>{let t=e;for(const[n,o]of Object.entries(r))if(o===e){t=n;break}return null==t?void 0:t.toLowerCase().replace(/[_.\s]/g,"-")},y=e=>{let r;switch(e){case l:r=n.CC_NUM;break;case c:r=n.CC_DAT;break;case i:r=n.CC_MTH;break;case a:r=n.CC_YR;break;case s:r=n.CC_CVC;break;case o:r=n.KCP_PWD}return r},
|
|
1
|
+
import{SF_ErrorCodes as e,ERROR_ACTION_FOCUS_FIELD as r,ERROR_ACTION_BLUR_SCENARIO as t,ErrorCodePrefixes as n}from"./constants.js";import{ENCRYPTED_PWD_FIELD as o,ENCRYPTED_SECURITY_CODE as s,ENCRYPTED_EXPIRY_YEAR as a,ENCRYPTED_EXPIRY_MONTH as i,ENCRYPTED_EXPIRY_DATE as c,ENCRYPTED_CARD_NUMBER as l}from"../../components/internal/SecuredFields/lib/constants.js";function u(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const f=(r,t)=>Object.values(e).reduce((e,n)=>(n.includes(t)&&(e[n]=r.get(n)),e),{}),b=(e,r,t)=>{const n=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){u(e,r,t[r])})}return e}({},e),o=y(t);return n.error=f(r,o),n},p=(e,r)=>{let t=e;for(const[n,o]of Object.entries(r))if(o===e){t=n;break}return null==t?void 0:t.toLowerCase().replace(/[_.\s]/g,"-")},y=e=>{let r;switch(e){case l:r=n.CC_NUM;break;case c:r=n.CC_DAT;break;case i:r=n.CC_MTH;break;case a:r=n.CC_YR;break;case s:r=n.CC_CVC;break;case o:r=n.KCP_PWD}return r},d=({errors:e,i18n:r,layout:t,countrySpecificLabels:n,fieldTypeMappingFn:o})=>Object.entries(e).reduce((s,[a,i])=>{if(i){const i=e[a],c="errorI18n"in i&&"rootNode"in i,l="object"==typeof i.errorMessage;let u,f;if(u=c?i.error:l?i.errorMessage.translationKey:i.errorMessage,c&&"errorI18n"in i)f=i.errorI18n+"";else{const e=o?o(a,r,n):"";if(l){const t=i.errorMessage.translationKey,n=i.errorMessage.translationObject.values.format;f=`${r.get(t,{values:{label:e,format:n}})}`}else f=r.get(i.errorMessage,{values:{label:e}})+""}s.push({field:a,errorMessage:f,errorCode:u}),t&&s.sort((e,r)=>t.indexOf(e.field)-t.indexOf(r.field))}return s},[]),g=({i18n:e,fieldTypeMappingFn:n,SRPanelRef:o},{errors:s,isValidating:a,layout:i,countrySpecificLabels:c,hasDisplayedErrors:l=!0})=>{const u=d({errors:s,i18n:e,fieldTypeMappingFn:n,countrySpecificLabels:c,layout:i});if(u.length){if(a){const e=u.map(e=>e.errorMessage);o.setMessages(e);const t=u.map(e=>e.field);return{currentErrorsSortedByLayout:u,action:r,fieldToFocus:t[0]}}return null==o||o.setMessages(null),{currentErrorsSortedByLayout:u,action:t}}return l&&(null==o||o.setMessages(null)),{currentErrorsSortedByLayout:u,action:"none"}},M=(e,r)=>{if(!e)return null;return Object.entries(e).reduce((e,[t,n])=>{if(n){e[`${r}${t}`]=n}return e},{})};export{b as addErrorTranslationsToObject,M as enhanceErrorObjectKeys,p as getErrorMessageFromCode,f as getTranslatedErrors,g as setSRMessagesFromErrors,d as sortErrorsByLayout};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../src/core/Errors/utils.ts"],"sourcesContent":["import { ERROR_ACTION_BLUR_SCENARIO, ERROR_ACTION_FOCUS_FIELD, ErrorCodePrefixes, SF_ErrorCodes } from './constants';\nimport { SFError } from '../../components/Card/components/CardInput/types';\nimport { SortErrorsObj, SortedErrorObject, GenericError, SetSRMessagesReturnObject } from './types';\nimport { ValidationRuleResult } from '../../utils/Validator/ValidationRuleResult';\nimport { ErrorMessageObject } from '../../utils/Validator/types';\nimport {\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR,\n ENCRYPTED_PWD_FIELD,\n ENCRYPTED_SECURITY_CODE\n} from '../../components/internal/SecuredFields/lib/constants';\nimport { AriaConfigObject } from '../../components/internal/SecuredFields/lib/types';\nimport type Language from '../../language';\n\n/**\n * Extract and translate all the errorCodes related to a specific securedField\n * @param i18n\n * @param errorCodeIdentifier - the identifier for which type of errorCodes we need to collect e.g. 'cc-num'\n */\nexport const getTranslatedErrors = (i18n: Language, errorCodeIdentifier: string): Record<SF_ErrorCodes, string> => {\n const transObj = Object.values(SF_ErrorCodes).reduce((acc, value) => {\n // Limit to errors related to specific sf\n if (value.includes(errorCodeIdentifier)) {\n acc[value] = i18n.get(value);\n }\n return acc;\n }, {}) as Record<SF_ErrorCodes, string>;\n\n return transObj;\n};\n\n/**\n * Adds a new error property to an object.\n * This error property is an object containing the translated errors, stored by code, that relate to the securedFields\n * @param originalObject - object we want to duplicate and enhance\n * @param i18n - an i18n object to use to get translations\n * @returns a duplicate of the original object with a new property: \"error\" whose value is a object containing the translated errors\n */\nexport const addErrorTranslationsToObject = (originalObj: AriaConfigObject, i18n: Language, fieldType: string): AriaConfigObject => {\n const nuObj: AriaConfigObject = { ...originalObj };\n\n const errorCodeIdentifier = fieldTypeToErrorCodeIdentifier(fieldType);\n nuObj.error = getTranslatedErrors(i18n, errorCodeIdentifier);\n\n return nuObj;\n};\n\nexport const getErrorMessageFromCode = (errorCode: string, codeMap: Record<string, string>): string => {\n let errMsg = errorCode;\n for (const [key, value] of Object.entries(codeMap)) {\n if (value === errorCode) {\n errMsg = key;\n break;\n }\n }\n return errMsg?.toLowerCase().replace(/[_.\\s]/g, '-');\n};\n\n/**\n * errorCodeIdentifiers must match the prefixes to the numbers in ERROR_CODES (Errors/constants.ts)\n * (Which in turn must match the keys in the translations files)\n */\nconst fieldTypeToErrorCodeIdentifier = (fieldType: string): string => {\n let errorCodeIdentifier;\n switch (fieldType) {\n case ENCRYPTED_CARD_NUMBER:\n errorCodeIdentifier = ErrorCodePrefixes.CC_NUM;\n break;\n case ENCRYPTED_EXPIRY_DATE:\n errorCodeIdentifier = ErrorCodePrefixes.CC_DAT;\n break;\n case ENCRYPTED_EXPIRY_MONTH:\n errorCodeIdentifier = ErrorCodePrefixes.CC_MTH;\n break;\n case ENCRYPTED_EXPIRY_YEAR:\n errorCodeIdentifier = ErrorCodePrefixes.CC_YR;\n break;\n case ENCRYPTED_SECURITY_CODE:\n errorCodeIdentifier = ErrorCodePrefixes.CC_CVC;\n break;\n case ENCRYPTED_PWD_FIELD:\n errorCodeIdentifier = ErrorCodePrefixes.KCP_PWD;\n break;\n default:\n }\n return errorCodeIdentifier;\n};\n\n/**\n * sortErrorsByLayout - takes a list of errors and a layout, and returns a sorted array of error objects with translated error messages\n *\n * @param errors - an object containing errors, referenced by field type\n * @param layout - a string[] controlling how the output error objects will be ordered. Required when it is known that the way the error object is populated can vary e.g. Card comp, &/or anything with a country selector\n * @param i18n - our internal Language mechanism\n * @param countrySpecificLabels - some errors are region specific, e.g. in the US \"postal code\" = \"zip code\", so map the fieldType value accordingly (if it is being added to the errorMessage string)\n * @param fieldTypeMappingFn - a component specific lookup function that will tell us both if we need to prepend the field type to the SR panel message, and, if so, will retrieve the correct translation for the field type\n */\nexport const sortErrorsByLayout = ({ errors, i18n, layout, countrySpecificLabels, fieldTypeMappingFn }: SortErrorsObj): SortedErrorObject[] => {\n const SR_INDICATOR_PREFIX = process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'test' ? '' : '-sr'; // Useful for testing whether SR is reading out aria-live errors (sr) or aria-describedby ones\n\n // Create array of error objects, sorted by layout\n const sortedErrors: SortedErrorObject[] = Object.entries(errors).reduce((acc, [key, value]) => {\n if (value) {\n const errObj: ValidationRuleResult | SFError | GenericError = errors[key];\n\n const TREAT_AS_SF_ERROR = 'errorI18n' in errObj && `rootNode` in errObj; // look for expected props, unique to an SFError\n\n // Some ValidationRuleResults can be passed an object in the 'errorMessage' prop (to give country specific errors)\n const ERROR_MSG_IS_OBJECT = typeof errObj.errorMessage === 'object';\n\n /**\n * Get error codes - these are used if we need to distinguish between showValidation & onBlur errors\n * - For a ValidationRuleResult or GenericError the error \"code\" is contained in the errorMessage prop.\n * - For an SFError the error \"code\" is contained in the error prop.\n */\n let errorCode: string;\n if (TREAT_AS_SF_ERROR) {\n errorCode = errObj.error;\n } else {\n /** Special handling for Address~postalCode (where the errorMessage is an object) */\n if (ERROR_MSG_IS_OBJECT) {\n /** is ValidationRuleResult w. country specific error */\n errorCode = (errObj.errorMessage as ErrorMessageObject).translationKey;\n } else {\n /** is ValidationRuleResult || GenericError || an as yet incorrectly formed error */\n errorCode = errObj.errorMessage as string;\n }\n }\n\n /**\n * Get corresponding error msg - a translated string we can place into the SRPanel\n * NOTE: the error object for a secured field already contains the error in a translated form (errorI18n).\n * For other fields we still need to translate it, so we use the errObj.errorMessage prop as a translation key\n */\n let errorMsg: string;\n if (TREAT_AS_SF_ERROR && 'errorI18n' in errObj) {\n errorMsg = errObj.errorI18n + SR_INDICATOR_PREFIX;\n } else {\n /**\n * For some fields, for a11y reasons (when the translated error msg doesn't contain a reference to the field it refers to), we need to\n * add the field type into the translated error message.\n *\n * This happens with generic errors\n * e.g. \"field.error.required\": \"Enter the %{label}\"\n * or \"invalid.format.expects\": \"%{label} Invalid format. Expected format: %{format}\"\n */\n const mappedLabel = fieldTypeMappingFn ? fieldTypeMappingFn(key, i18n, countrySpecificLabels) : ''; // Retrieve the translated field name, if required\n\n /** Special handling for Address~postalCode where the errorMessage object contains the details of the country specific format that should have been used for the postcode */\n if (ERROR_MSG_IS_OBJECT) {\n /** is ValidationRuleResult w. country specific error */\n const translationKey = (errObj.errorMessage as ErrorMessageObject).translationKey;\n const countrySpecificFormat = (errObj.errorMessage as ErrorMessageObject).translationObject.values.format;\n\n errorMsg = `${i18n.get(translationKey, { values: { label: mappedLabel, format: countrySpecificFormat } })}${SR_INDICATOR_PREFIX}`;\n } else {\n /** is ValidationRuleResult || GenericError || an as yet incorrectly formed error */\n errorMsg = i18n.get(errObj.errorMessage as string, { values: { label: mappedLabel } }) + SR_INDICATOR_PREFIX;\n }\n }\n\n acc.push({ field: key, errorMessage: errorMsg, errorCode });\n\n if (layout) acc.sort((a, b) => layout.indexOf(a.field) - layout.indexOf(b.field));\n }\n return acc;\n }, []);\n\n return sortedErrors;\n};\n\n/**\n * Implemented as a partial, with an object containing the first 6 arguments; then the final argument, errors, is passed to the partial\n *\n * NOTE: using this generic error setting fny is only suitable when errors for the SRPanel are *only* generated by showValidation().\n * When errors are also generated onBlur, as the user leaves the input, the SR message generation becomes more complex - see CardInput as an example\n */\nexport const setSRMessagesFromErrors = (\n { i18n, fieldTypeMappingFn, SRPanelRef },\n { errors, isValidating, layout, countrySpecificLabels }\n): SetSRMessagesReturnObject => {\n const currentErrorsSortedByLayout = sortErrorsByLayout({\n errors,\n i18n,\n fieldTypeMappingFn,\n countrySpecificLabels,\n layout\n });\n\n const doLog = false;\n\n if (doLog) console.log('### setSRMessagesFromErrors::currentErrorsSortedByLayout:: ', currentErrorsSortedByLayout);\n\n if (currentErrorsSortedByLayout.length) {\n /** If validating i.e. \"on submit\" type event - then display all errors in the SR panel */\n if (isValidating) {\n const errorMsgArr: string[] = currentErrorsSortedByLayout.map(errObj => errObj.errorMessage);\n if (doLog) console.log('### setSRMessagesFromErrors:: #1 multiple errors:: (validating) errorMsgArr=', errorMsgArr);\n SRPanelRef.setMessages(errorMsgArr);\n\n const fieldListArr: string[] = currentErrorsSortedByLayout.map(errObj => errObj.field);\n return { currentErrorsSortedByLayout, action: ERROR_ACTION_FOCUS_FIELD, fieldToFocus: fieldListArr[0] };\n } else {\n // prettier-ignore\n if (doLog) console.log('### setSRMessagesFromErrors:: #3 on blur scenario:: not validating but there might be an error, either to set or to clear');\n SRPanelRef?.setMessages(null);\n\n return { currentErrorsSortedByLayout, action: ERROR_ACTION_BLUR_SCENARIO }; // on blur scenario: not validating but there might be an error, either to set or to clear\n }\n } else {\n if (doLog) console.log('### setSRMessagesFromErrors::componentDidUpdate:: #4 clearing errors:: NO currentErrorsSortedByLayout');\n SRPanelRef?.setMessages(null); // no errors - so clear SR panel\n return { currentErrorsSortedByLayout, action: 'none' };\n }\n};\n\nexport const enhanceErrorObjectKeys = (errorObj, keyPrefix) => {\n if (!errorObj) return null;\n const enhancedObj = Object.entries(errorObj).reduce((acc, [key, value]) => {\n if (value) {\n const newKey = `${keyPrefix}${key}`;\n acc[newKey] = value;\n }\n return acc;\n }, {});\n\n return enhancedObj;\n};\n"],"names":["getTranslatedErrors","i18n","errorCodeIdentifier","Object","values","SF_ErrorCodes","reduce","acc","value","includes","get","addErrorTranslationsToObject","originalObj","fieldType","nuObj","_object_spread","fieldTypeToErrorCodeIdentifier","error","getErrorMessageFromCode","errorCode","codeMap","errMsg","key","entries","toLowerCase","replace","ENCRYPTED_CARD_NUMBER","ErrorCodePrefixes","CC_NUM","ENCRYPTED_EXPIRY_DATE","CC_DAT","ENCRYPTED_EXPIRY_MONTH","CC_MTH","ENCRYPTED_EXPIRY_YEAR","CC_YR","ENCRYPTED_SECURITY_CODE","CC_CVC","ENCRYPTED_PWD_FIELD","KCP_PWD","sortErrorsByLayout","errors","layout","countrySpecificLabels","fieldTypeMappingFn","errObj","TREAT_AS_SF_ERROR","ERROR_MSG_IS_OBJECT","errorMessage","errorMsg","translationKey","errorI18n","mappedLabel","countrySpecificFormat","translationObject","format","label","push","field","sort","a","b","indexOf","setSRMessagesFromErrors","SRPanelRef","isValidating","currentErrorsSortedByLayout","length","errorMsgArr","map","setMessages","fieldListArr","action","ERROR_ACTION_FOCUS_FIELD","fieldToFocus","ERROR_ACTION_BLUR_SCENARIO","enhanceErrorObjectKeys","errorObj","keyPrefix"],"mappings":"qeAqBO,MAAMA,EAAsB,CAACC,EAAgBC,IAC/BC,OAAOC,OAAOC,GAAeC,OAAO,CAACC,EAAKC,KAEnDA,EAAMC,SAASP,KACfK,EAAIC,GAASP,EAAKS,IAAIF,IAEnBD,GACR,CAAA,GAYMI,EAA+B,CAACC,EAA+BX,EAAgBY,KACxF,MAAMC,oUAA0BC,CAAA,CAAA,EAAKH,GAE/BV,EAAsBc,EAA+BH,GAG3D,OAFAC,EAAMG,MAAQjB,EAAoBC,EAAMC,GAEjCY,GAGEI,EAA0B,CAACC,EAAmBC,KACvD,IAAIC,EAASF,EACb,IAAK,MAAOG,EAAKd,KAAUL,OAAOoB,QAAQH,GACtC,GAAIZ,IAAUW,EAAW,CACrBE,EAASC,EACT,KACJ,CAEJ,OAAOD,aAAAA,EAAAA,EAAQG,cAAcC,QAAQ,UAAW,MAO9CT,EAAkCH,IACpC,IAAIX,EACJ,OAAQW,GACJ,KAAKa,EACDxB,EAAsByB,EAAkBC,OACxC,MACJ,KAAKC,EACD3B,EAAsByB,EAAkBG,OACxC,MACJ,KAAKC,EACD7B,EAAsByB,EAAkBK,OACxC,MACJ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OACA0C,qBACAD,wBACAD,WAOJ,GAAIwB,EAA4BC,OAAQ,CAEpC,GAAIF,EAAc,CACd,MAAMG,EAAwBF,EAA4BG,IAAIxB,GAAUA,EAAOG,cAE/EgB,EAAWM,YAAYF,GAEvB,MAAMG,EAAyBL,EAA4BG,IAAIxB,GAAUA,EAAOa,OAChF,MAAO,CAAEQ,8BAA6BM,OAAQC,EAA0BC,aAAcH,EAAa,GACvG,CAKI,OAFAP,SAAAA,EAAYM,YAAY,MAEjB,CAAEJ,8BAA6BM,OAAQG,EAEtD,CAGI,OADAX,SAAAA,EAAYM,YAAY,MACjB,CAAEJ,8BAA6BM,OAAQ,SAIzCI,EAAyB,CAACC,EAAUC,KAC7C,IAAKD,EAAU,OAAO,KAStB,OARoBzE,OAAOoB,QAAQqD,GAAUtE,OAAO,CAACC,GAAMe,EAAKd,MAC5D,GAAIA,EAAO,CAEPD,EADe,GAAGsE,IAAYvD,KAChBd,CAClB,CACA,OAAOD,GACR,CAAA"}
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/core/Errors/utils.ts"],"sourcesContent":["import { ERROR_ACTION_BLUR_SCENARIO, ERROR_ACTION_FOCUS_FIELD, ErrorCodePrefixes, SF_ErrorCodes } from './constants';\nimport { SFError } from '../../components/Card/components/CardInput/types';\nimport { SortErrorsObj, SortedErrorObject, GenericError, SetSRMessagesReturnObject } from './types';\nimport { ValidationRuleResult } from '../../utils/Validator/ValidationRuleResult';\nimport { ErrorMessageObject } from '../../utils/Validator/types';\nimport {\n ENCRYPTED_CARD_NUMBER,\n ENCRYPTED_EXPIRY_DATE,\n ENCRYPTED_EXPIRY_MONTH,\n ENCRYPTED_EXPIRY_YEAR,\n ENCRYPTED_PWD_FIELD,\n ENCRYPTED_SECURITY_CODE\n} from '../../components/internal/SecuredFields/lib/constants';\nimport { AriaConfigObject } from '../../components/internal/SecuredFields/lib/types';\nimport type Language from '../../language';\n\n/**\n * Extract and translate all the errorCodes related to a specific securedField\n * @param i18n\n * @param errorCodeIdentifier - the identifier for which type of errorCodes we need to collect e.g. 'cc-num'\n */\nexport const getTranslatedErrors = (i18n: Language, errorCodeIdentifier: string): Record<SF_ErrorCodes, string> => {\n const transObj = Object.values(SF_ErrorCodes).reduce((acc, value) => {\n // Limit to errors related to specific sf\n if (value.includes(errorCodeIdentifier)) {\n acc[value] = i18n.get(value);\n }\n return acc;\n }, {}) as Record<SF_ErrorCodes, string>;\n\n return transObj;\n};\n\n/**\n * Adds a new error property to an object.\n * This error property is an object containing the translated errors, stored by code, that relate to the securedFields\n * @param originalObject - object we want to duplicate and enhance\n * @param i18n - an i18n object to use to get translations\n * @returns a duplicate of the original object with a new property: \"error\" whose value is a object containing the translated errors\n */\nexport const addErrorTranslationsToObject = (originalObj: AriaConfigObject, i18n: Language, fieldType: string): AriaConfigObject => {\n const nuObj: AriaConfigObject = { ...originalObj };\n\n const errorCodeIdentifier = fieldTypeToErrorCodeIdentifier(fieldType);\n nuObj.error = getTranslatedErrors(i18n, errorCodeIdentifier);\n\n return nuObj;\n};\n\nexport const getErrorMessageFromCode = (errorCode: string, codeMap: Record<string, string>): string => {\n let errMsg = errorCode;\n for (const [key, value] of Object.entries(codeMap)) {\n if (value === errorCode) {\n errMsg = key;\n break;\n }\n }\n return errMsg?.toLowerCase().replace(/[_.\\s]/g, '-');\n};\n\n/**\n * errorCodeIdentifiers must match the prefixes to the numbers in ERROR_CODES (Errors/constants.ts)\n * (Which in turn must match the keys in the translations files)\n */\nconst fieldTypeToErrorCodeIdentifier = (fieldType: string): string => {\n let errorCodeIdentifier;\n switch (fieldType) {\n case ENCRYPTED_CARD_NUMBER:\n errorCodeIdentifier = ErrorCodePrefixes.CC_NUM;\n break;\n case ENCRYPTED_EXPIRY_DATE:\n errorCodeIdentifier = ErrorCodePrefixes.CC_DAT;\n break;\n case ENCRYPTED_EXPIRY_MONTH:\n errorCodeIdentifier = ErrorCodePrefixes.CC_MTH;\n break;\n case ENCRYPTED_EXPIRY_YEAR:\n errorCodeIdentifier = ErrorCodePrefixes.CC_YR;\n break;\n case ENCRYPTED_SECURITY_CODE:\n errorCodeIdentifier = ErrorCodePrefixes.CC_CVC;\n break;\n case ENCRYPTED_PWD_FIELD:\n errorCodeIdentifier = ErrorCodePrefixes.KCP_PWD;\n break;\n default:\n }\n return errorCodeIdentifier;\n};\n\n/**\n * sortErrorsByLayout - takes a list of errors and a layout, and returns a sorted array of error objects with translated error messages\n *\n * @param errors - an object containing errors, referenced by field type\n * @param layout - a string[] controlling how the output error objects will be ordered. Required when it is known that the way the error object is populated can vary e.g. Card comp, &/or anything with a country selector\n * @param i18n - our internal Language mechanism\n * @param countrySpecificLabels - some errors are region specific, e.g. in the US \"postal code\" = \"zip code\", so map the fieldType value accordingly (if it is being added to the errorMessage string)\n * @param fieldTypeMappingFn - a component specific lookup function that will tell us both if we need to prepend the field type to the SR panel message, and, if so, will retrieve the correct translation for the field type\n */\nexport const sortErrorsByLayout = ({ errors, i18n, layout, countrySpecificLabels, fieldTypeMappingFn }: SortErrorsObj): SortedErrorObject[] => {\n const SR_INDICATOR_PREFIX = process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'test' ? '' : '-sr'; // Useful for testing whether SR is reading out aria-live errors (sr) or aria-describedby ones\n\n // Create array of error objects, sorted by layout\n const sortedErrors: SortedErrorObject[] = Object.entries(errors).reduce((acc, [key, value]) => {\n if (value) {\n const errObj: ValidationRuleResult | SFError | GenericError = errors[key];\n\n const TREAT_AS_SF_ERROR = 'errorI18n' in errObj && `rootNode` in errObj; // look for expected props, unique to an SFError\n\n // Some ValidationRuleResults can be passed an object in the 'errorMessage' prop (to give country specific errors)\n const ERROR_MSG_IS_OBJECT = typeof errObj.errorMessage === 'object';\n\n /**\n * Get error codes - these are used if we need to distinguish between showValidation & onBlur errors\n * - For a ValidationRuleResult or GenericError the error \"code\" is contained in the errorMessage prop.\n * - For an SFError the error \"code\" is contained in the error prop.\n */\n let errorCode: string;\n if (TREAT_AS_SF_ERROR) {\n errorCode = errObj.error;\n } else {\n /** Special handling for Address~postalCode (where the errorMessage is an object) */\n if (ERROR_MSG_IS_OBJECT) {\n /** is ValidationRuleResult w. country specific error */\n errorCode = (errObj.errorMessage as ErrorMessageObject).translationKey;\n } else {\n /** is ValidationRuleResult || GenericError || an as yet incorrectly formed error */\n errorCode = errObj.errorMessage as string;\n }\n }\n\n /**\n * Get corresponding error msg - a translated string we can place into the SRPanel\n * NOTE: the error object for a secured field already contains the error in a translated form (errorI18n).\n * For other fields we still need to translate it, so we use the errObj.errorMessage prop as a translation key\n */\n let errorMsg: string;\n if (TREAT_AS_SF_ERROR && 'errorI18n' in errObj) {\n errorMsg = errObj.errorI18n + SR_INDICATOR_PREFIX;\n } else {\n /**\n * For some fields, for a11y reasons (when the translated error msg doesn't contain a reference to the field it refers to), we need to\n * add the field type into the translated error message.\n *\n * This happens with generic errors\n * e.g. \"field.error.required\": \"Enter the %{label}\"\n * or \"invalid.format.expects\": \"%{label} Invalid format. Expected format: %{format}\"\n */\n const mappedLabel = fieldTypeMappingFn ? fieldTypeMappingFn(key, i18n, countrySpecificLabels) : ''; // Retrieve the translated field name, if required\n\n /** Special handling for Address~postalCode where the errorMessage object contains the details of the country specific format that should have been used for the postcode */\n if (ERROR_MSG_IS_OBJECT) {\n /** is ValidationRuleResult w. country specific error */\n const translationKey = (errObj.errorMessage as ErrorMessageObject).translationKey;\n const countrySpecificFormat = (errObj.errorMessage as ErrorMessageObject).translationObject.values.format;\n\n errorMsg = `${i18n.get(translationKey, { values: { label: mappedLabel, format: countrySpecificFormat } })}${SR_INDICATOR_PREFIX}`;\n } else {\n /** is ValidationRuleResult || GenericError || an as yet incorrectly formed error */\n errorMsg = i18n.get(errObj.errorMessage as string, { values: { label: mappedLabel } }) + SR_INDICATOR_PREFIX;\n }\n }\n\n acc.push({ field: key, errorMessage: errorMsg, errorCode });\n\n if (layout) acc.sort((a, b) => layout.indexOf(a.field) - layout.indexOf(b.field));\n }\n return acc;\n }, []);\n\n return sortedErrors;\n};\n\n/**\n * Implemented as a partial, with an object containing the first 6 arguments; then the final argument, errors, is passed to the partial\n *\n * NOTE: using this generic error setting fny is only suitable when errors for the SRPanel are *only* generated by showValidation().\n * When errors are also generated onBlur, as the user leaves the input, the SR message generation becomes more complex - see CardInput as an example\n */\nexport const setSRMessagesFromErrors = (\n { i18n, fieldTypeMappingFn, SRPanelRef },\n { errors, isValidating, layout, countrySpecificLabels, hasDisplayedErrors = true }\n): SetSRMessagesReturnObject => {\n const currentErrorsSortedByLayout = sortErrorsByLayout({\n errors,\n i18n,\n fieldTypeMappingFn,\n countrySpecificLabels,\n layout\n });\n\n const doLog = false;\n\n if (doLog) console.log('### setSRMessagesFromErrors::currentErrorsSortedByLayout:: ', currentErrorsSortedByLayout);\n\n if (currentErrorsSortedByLayout.length) {\n /** If validating i.e. \"on submit\" type event - then display all errors in the SR panel */\n if (isValidating) {\n const errorMsgArr: string[] = currentErrorsSortedByLayout.map(errObj => errObj.errorMessage);\n if (doLog) console.log('### setSRMessagesFromErrors:: #1 multiple errors:: (validating) errorMsgArr=', errorMsgArr);\n SRPanelRef.setMessages(errorMsgArr);\n\n const fieldListArr: string[] = currentErrorsSortedByLayout.map(errObj => errObj.field);\n return { currentErrorsSortedByLayout, action: ERROR_ACTION_FOCUS_FIELD, fieldToFocus: fieldListArr[0] };\n } else {\n // prettier-ignore\n if (doLog) console.log('### setSRMessagesFromErrors:: #3 on blur scenario:: not validating but there might be an error, either to set or to clear');\n SRPanelRef?.setMessages(null);\n\n return { currentErrorsSortedByLayout, action: ERROR_ACTION_BLUR_SCENARIO }; // on blur scenario: not validating but there might be an error, either to set or to clear\n }\n } else {\n if (doLog) console.log('### setSRMessagesFromErrors::componentDidUpdate:: #4 clearing errors:: NO currentErrorsSortedByLayout');\n /**\n * Only clear if we actually have errors on display to clear. The SR panel is shared with\n * status reporters (loading, await, countdown); clearing it when this form has never shown\n * an error wipes their messages instead - see PR #4098.\n */\n if (hasDisplayedErrors) {\n SRPanelRef?.setMessages(null); // no errors - so clear SR panel\n }\n return { currentErrorsSortedByLayout, action: 'none' };\n }\n};\n\nexport const enhanceErrorObjectKeys = (errorObj, keyPrefix) => {\n if (!errorObj) return null;\n const enhancedObj = Object.entries(errorObj).reduce((acc, [key, value]) => {\n if (value) {\n const newKey = `${keyPrefix}${key}`;\n acc[newKey] = value;\n }\n return acc;\n }, {});\n\n return enhancedObj;\n};\n"],"names":["getTranslatedErrors","i18n","errorCodeIdentifier","Object","values","SF_ErrorCodes","reduce","acc","value","includes","get","addErrorTranslationsToObject","originalObj","fieldType","nuObj","_object_spread","fieldTypeToErrorCodeIdentifier","error","getErrorMessageFromCode","errorCode","codeMap","errMsg","key","entries","toLowerCase","replace","ENCRYPTED_CARD_NUMBER","ErrorCodePrefixes","CC_NUM","ENCRYPTED_EXPIRY_DATE","CC_DAT","ENCRYPTED_EXPIRY_MONTH","CC_MTH","ENCRYPTED_EXPIRY_YEAR","CC_YR","ENCRYPTED_SECURITY_CODE","CC_CVC","ENCRYPTED_PWD_FIELD","KCP_PWD","sortErrorsByLayout","errors","layout","countrySpecificLabels","fieldTypeMappingFn","errObj","TREAT_AS_SF_ERROR","ERROR_MSG_IS_OBJECT","errorMessage","errorMsg","translationKey","errorI18n","mappedLabel","countrySpecificFormat","translationObject","format","label","push","field","sort","a","b","indexOf","setSRMessagesFromErrors","SRPanelRef","isValidating","hasDisplayedErrors","currentErrorsSortedByLayout","length","errorMsgArr","map","setMessages","fieldListArr","action","ERROR_ACTION_FOCUS_FIELD","fieldToFocus","ERROR_ACTION_BLUR_SCENARIO","enhanceErrorObjectKeys","errorObj","keyPrefix"],"mappings":"qeAqBO,MAAMA,EAAsB,CAACC,EAAgBC,IAC/BC,OAAOC,OAAOC,GAAeC,OAAO,CAACC,EAAKC,KAEnDA,EAAMC,SAASP,KACfK,EAAIC,GAASP,EAAKS,IAAIF,IAEnBD,GACR,CAAA,GAYMI,EAA+B,CAACC,EAA+BX,EAAgBY,KACxF,MAAMC,oUAA0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|
|
1
|
+
function e(e,n){if(null==e)throw new Error(n);return e}const n="https://checkoutshopper-live.adyen.com/checkoutshopper/",o=e("6.44.0","LIBRARY_VERSION is not defined"),t=e("eslegacy","BUNDLE_TYPE is not defined"),r=["amount","secondaryAmount","countryCode","environment","_environmentUrls","loadingContext","i18n","modules","order","session","clientKey","showPayButton","redirectFromTopWhenInIframe","donation","onPaymentCompleted","onPaymentFailed","beforeRedirect","beforeSubmit","onSubmit","onActionHandled","onAdditionalDetails","onChange","onEnterKeyPressed","onError","onBalanceCheck","onOrderCancel","onOrderRequest","onOrderUpdated","onPaymentMethodsRequest"],i=6e4;var d=function(e){return e.WEB="web",e}({});const a="web";var c=function(e){return e.NATIVE="nativeComponent",e.GENERIC="genericComponent",e}({});export{d as CHANNEL,i as DEFAULT_HTTP_TIMEOUT,n as FALLBACK_CONTEXT,r as GENERIC_OPTIONS,t as LIBRARY_BUNDLE_TYPE,o as LIBRARY_VERSION,c as PAYMENT_METHOD_BEHAVIOR,a as PLATFORM};
|
|
2
2
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Component as e,options as t,createElement as n,Fragment as o,toChildArray as r,render as _}from"../../dist/preact.js";export{createContext,createRef}from"../../dist/preact.js";export{useCallback,useContext,useEffect,useImperativeHandle,useLayoutEffect,useMemo,useReducer,useRef,useState}from"../../hooks/dist/hooks.js";function i(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var o in t)if("__source"!==o&&e[o]!==t[o])return!0;return!1}function u(e,t){this.props=e,this.context=t}function a(e,t){function o(e){var n=this.props.ref;return n!=e.ref&&n&&("function"==typeof n?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:i(this.props,e)}function r(t){return this.shouldComponentUpdate=o,n(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.__f=r.prototype.isReactComponent=!0,r.type=e,r}(u.prototype=new e).isPureReactComponent=!0,u.prototype.shouldComponentUpdate=function(e,t){return i(this.props,e)||i(this.state,t)};var l=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),l&&l(e)};var c=t.__e;t.__e=function(e,t,n,o){if(e.then)for(var r,_=t;_=_.__;)if((r=_.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);c(e,t,n,o)};var s=t.unmount;function p(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return p(e,t,n)})),e}function f(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return f(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function v(){this.__u=0,this.o=null,this.__b=null}function d(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function h(){this.i=null,this.l=null}t.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),s&&s(e)},(v.prototype=new e).__c=function(e,t){var n=t.__c,o=this;null==o.o&&(o.o=[]),o.o.push(n);var r=d(o.__v),_=!1,i=function(){_||o.__z||(_=!0,n.__R=null,r?r(a):a())};n.__R=i;var u=n.__P;n.__P=null;var a=function(){if(! --o.__u){if(o.state.__a){var e=o.state.__a;o.__v.__k[0]=f(e,e.__c.__P,e.__c.__O)}var t;for(o.setState({__a:o.__b=null});t=o.o.pop();)t.__P=u,t.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(i,i)},v.prototype.componentWillUnmount=function(){this.o=[]},v.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),_=this.__v.__k[0].__c;this.__v.__k[0]=p(this.__b,r,_.__O=_.__P)}this.__b=null}var i=t.__a&&n(o,null,e.fallback);return i&&(i.__u&=-33),[n(o,null,t.__a?null:e.children),i]};var m=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function y(e){return this.getChildContext=function(){return e.context},e.children}function b(e){var t=this,o=e.h;if(t.componentWillUnmount=function(){_(null,t.v),t.v=null,t.h=null},t.h&&t.h!==o&&t.componentWillUnmount(),!t.v){for(var r=t.__v;null!==r&&!r.__m&&null!==r.__;)r=r.__;t.h=o,t.v={nodeType:1,parentNode:o,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:o.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}_(n(y,{context:t.context},e.__v),t.v)}function k(e,t){var o=n(b,{__v:e,h:t});return o.containerInfo=t,o}(h.prototype=new e).__a=function(e){var t=this,n=d(t.__v),o=t.l.get(e);return o[0]++,function(r){var _=function(){t.props.revealOrder?(o.push(r),m(t,e,o)):r()};n?n(_):_()}},h.prototype.render=function(e){this.i=null,this.l=new Map;var t=r(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},h.prototype.componentDidUpdate=h.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){m(e,n,t)})};var g="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,C=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,P=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,x=/[A-Z0-9]/g,N="undefined"!=typeof document,O=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};e.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(e.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var R=t.event;t.event=function(e){return R&&(e=R(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var S={configurable:!0,get:function(){return this.class}},U=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,o={},_=-1==n.indexOf("-");for(var i in t){var u=t[i];if(!("value"===i&&"defaultValue"in t&&null==u||N&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===u?u="":"translate"===a&&"no"===u?u=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||O(t.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":P.test(i)&&(i=a):a=i="oninput":_&&C.test(i)?i=i.replace(x,"-$&").toLowerCase():null===u&&(u=void 0),"oninput"===a&&o[i=a]&&(i="oninputCapture"),o[i]=u}}"select"==n&&(o.multiple&&Array.isArray(o.value)&&(o.value=r(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),null!=o.defaultValue&&(o.value=r(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",S)):t.className&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=g,U&&U(e)};var E=t.__r;t.__r=function(e){E&&E(e),e.__c};var w=t.diffed;t.diffed=function(e){w&&w(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};export{e as Component,o as Fragment,u as PureComponent,o as StrictMode,v as Suspense,h as SuspenseList,n as createElement,k as createPortal,a as memo};
|
|
1
|
+
import{Component as e,options as t,createElement as n,Fragment as o,toChildArray as r,render as _}from"../../dist/preact.js";export{createContext,createRef}from"../../dist/preact.js";export{useCallback,useContext,useEffect,useImperativeHandle,useLayoutEffect,useMemo,useReducer,useRef,useState}from"../../hooks/dist/hooks.js";function i(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var o in t)if("__source"!==o&&e[o]!==t[o])return!0;return!1}function u(e,t){this.props=e,this.context=t}function a(e,t){function o(e){var n=this.props.ref;return n!=e.ref&&n&&("function"==typeof n?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:i(this.props,e)}function r(t){return this.shouldComponentUpdate=o,n(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.__f=r.prototype.isReactComponent=!0,r.type=e,r}(u.prototype=new e).isPureReactComponent=!0,u.prototype.shouldComponentUpdate=function(e,t){return i(this.props,e)||i(this.state,t)};var l=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),l&&l(e)};var c=t.__e;t.__e=function(e,t,n,o){if(e.then)for(var r,_=t;_=_.__;)if((r=_.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k||[]),r.__c(e,t);c(e,t,n,o)};var s=t.unmount;function p(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return p(e,t,n)})),e}function f(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return f(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function v(){this.__u=0,this.o=null,this.__b=null}function d(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function h(){this.i=null,this.l=null}t.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),s&&s(e)},(v.prototype=new e).__c=function(e,t){var n=t.__c,o=this;null==o.o&&(o.o=[]),o.o.push(n);var r=d(o.__v),_=!1,i=function(){_||o.__z||(_=!0,n.__R=null,r?r(a):a())};n.__R=i;var u=n.__P;n.__P=null;var a=function(){if(! --o.__u){if(o.state.__a){var e=o.state.__a;o.__v.__k[0]=f(e,e.__c.__P,e.__c.__O)}var t;for(o.setState({__a:o.__b=null});t=o.o.pop();)t.__P=u,t.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(i,i)},v.prototype.componentWillUnmount=function(){this.o=[]},v.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),_=this.__v.__k[0].__c;this.__v.__k[0]=p(this.__b,r,_.__O=_.__P)}this.__b=null}var i=t.__a&&n(o,null,e.fallback);return i&&(i.__u&=-33),[n(o,null,t.__a?null:e.children),i]};var m=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function y(e){return this.getChildContext=function(){return e.context},e.children}function b(e){var t=this,o=e.h;if(t.componentWillUnmount=function(){_(null,t.v),t.v=null,t.h=null},t.h&&t.h!==o&&t.componentWillUnmount(),!t.v){for(var r=t.__v;null!==r&&!r.__m&&null!==r.__;)r=r.__;t.h=o,t.v={nodeType:1,parentNode:o,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:o.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}_(n(y,{context:t.context},e.__v),t.v)}function k(e,t){var o=n(b,{__v:e,h:t});return o.containerInfo=t,o}(h.prototype=new e).__a=function(e){var t=this,n=d(t.__v),o=t.l.get(e);return o[0]++,function(r){var _=function(){t.props.revealOrder?(o.push(r),m(t,e,o)):r()};n?n(_):_()}},h.prototype.render=function(e){this.i=null,this.l=new Map;var t=r(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},h.prototype.componentDidUpdate=h.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){m(e,n,t)})};var g="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,C=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,P=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,x=/[A-Z0-9]/g,N="undefined"!=typeof document,O=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};e.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(e.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var R=t.event;t.event=function(e){return R&&(e=R(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var S={configurable:!0,get:function(){return this.class}},U=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,o={},_=-1==n.indexOf("-");for(var i in t){var u=t[i];if(!("value"===i&&"defaultValue"in t&&null==u||N&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===u?u="":"translate"===a&&"no"===u?u=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||O(t.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":P.test(i)&&(i=a):a=i="oninput":_&&C.test(i)?i=i.replace(x,"-$&").toLowerCase():null===u&&(u=void 0),"oninput"===a&&o[i=a]&&(i="oninputCapture"),o[i]=u}}"select"==n&&(o.multiple&&Array.isArray(o.value)&&(o.value=r(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),null!=o.defaultValue&&(o.value=r(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",S)):t.className&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=g,U&&U(e)};var E=t.__r;t.__r=function(e){E&&E(e),e.__c};var w=t.diffed;t.diffed=function(e){w&&w(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};export{e as Component,o as Fragment,u as PureComponent,o as StrictMode,v as Suspense,h as SuspenseList,n as createElement,k as createPortal,a as memo};
|
|
2
2
|
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","sources":["../../../../../../../../node_modules/preact/compat/dist/compat.mjs"],"sourcesContent":["import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as l,createRef as c,cloneElement as f}from\"preact\";export{Component,Fragment,Fragment as StrictMode,createContext,createElement,createRef}from\"preact\";import{useState as a,useLayoutEffect as s,useEffect as h,useCallback as v,useContext as d,useDebugValue as m,useId as p,useImperativeHandle as y,useMemo as _,useReducer as b,useRef as S}from\"preact/hooks\";export*from\"preact/hooks\";function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function C(n,t){var e=t(),r=a({t:{__:e,u:t}}),u=r[0].t,o=r[1];return s(function(){u.__=e,u.u=t,R(u)&&o({t:u})},[n,e,t]),h(function(){return R(u)&&o({t:u}),n(function(){R(u)&&o({t:u})})},[n]),e}function R(n){try{return!((t=n.__)===(e=n.u())&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}var t,e}function x(n){n()}function w(n){return n}function k(){return[!1,x]}var I=s;function M(n,t){this.props=n,this.context=t}function N(n,e){function r(n){var t=this.props.ref;return t!=n.ref&&t&&(\"function\"==typeof t?t(null):t.current=null),e?!e(this.props,n)||t!=n.ref:E(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",u.__f=u.prototype.isReactComponent=!0,u.type=n,u}(M.prototype=new n).isPureReactComponent=!0,M.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var T=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),T&&T(n)};var A=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function D(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=A,t.render=n,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var F=function(n,t){return null==n?null:r(r(n).map(t))},L={map:F,forEach:F,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:r},O=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);O(n,t,e,r)};var U=e.unmount;function V(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return V(n,t,e)})),n}function W(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return W(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function P(){this.__u=0,this.o=null,this.__b=null}function j(n){var t=n.__&&n.__.__c;return t&&t.__a&&t.__a(n)}function z(n){var e,r,u,o=null;function i(i){if(e||(e=n()).then(function(n){n&&(o=n.default||n),u=!0},function(n){r=n,u=!0}),r)throw r;if(!u)throw e;return o?t(o,i):null}return i.displayName=\"Lazy\",i.__f=!0,i}function B(){this.i=null,this.l=null}e.unmount=function(n){var t=n.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),U&&U(n)},(P.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(e);var u=j(r.__v),o=!1,i=function(){o||r.__z||(o=!0,e.__R=null,u?u(c):c())};e.__R=i;var l=e.__P;e.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=W(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=l,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},P.prototype.componentWillUnmount=function(){this.o=[]},P.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement(\"div\"),o=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var H=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.i=e=e[2]}};function Z(n){return this.getChildContext=function(){return n.context},n.children}function Y(n){var e=this,r=n.h;if(e.componentWillUnmount=function(){o(null,e.v),e.v=null,e.h=null},e.h&&e.h!==r&&e.componentWillUnmount(),!e.v){for(var u=e.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;e.h=r,e.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:u.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(n,t){this.childNodes.push(n),e.h.insertBefore(n,t)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.h.removeChild(n)}}}o(t(Z,{context:e.context},n.__v),e.v)}function $(n,e){var r=t(Y,{__v:n,h:e});return r.containerInfo=e,r}(B.prototype=new n).__a=function(n){var t=this,e=j(t.__v),r=t.l.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),H(t,n,r)):u()};e?e(o):o()}},B.prototype.render=function(n){this.i=null,this.l=new Map;var t=r(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return n.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){H(n,e,t)})};var q=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,G=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K=/[A-Z0-9]/g,Q=\"undefined\"!=typeof document,X=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function nn(n,t,e){return null==t.__k&&(t.textContent=\"\"),o(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function tn(n,t,e){return i(n,t),\"function\"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent=!0,[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this[\"UNSAFE_\"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var en=e.event;e.event=function(n){return en&&(n=en(n)),n.persist=function(){},n.isPropagationStopped=function(){return this.cancelBubble},n.isDefaultPrevented=function(){return this.defaultPrevented},n.nativeEvent=n};var rn,un={configurable:!0,get:function(){return this.class}},on=e.vnode;e.vnode=function(n){\"string\"==typeof n.type&&function(n){var t=n.props,e=n.type,u={},o=-1==e.indexOf(\"-\");for(var i in t){var l=t[i];if(!(\"value\"===i&&\"defaultValue\"in t&&null==l||Q&&\"children\"===i&&\"noscript\"===e||\"class\"===i||\"className\"===i)){var c=i.toLowerCase();\"defaultValue\"===i&&\"value\"in t&&null==t.value?i=\"value\":\"download\"===i&&!0===l?l=\"\":\"translate\"===c&&\"no\"===l?l=!1:\"o\"===c[0]&&\"n\"===c[1]?\"ondoubleclick\"===c?i=\"ondblclick\":\"onchange\"!==c||\"input\"!==e&&\"textarea\"!==e||X(t.type)?\"onfocus\"===c?i=\"onfocusin\":\"onblur\"===c?i=\"onfocusout\":J.test(i)&&(i=c):c=i=\"oninput\":o&&G.test(i)?i=i.replace(K,\"-$&\").toLowerCase():null===l&&(l=void 0),\"oninput\"===c&&u[i=c]&&(i=\"oninputCapture\"),u[i]=l}}\"select\"==e&&(u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value}))),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,\"className\",un)):t.className&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=q,on&&on(n)};var ln=e.__r;e.__r=function(n){ln&&ln(n),rn=n.__c};var cn=e.diffed;e.diffed=function(n){cn&&cn(n);var t=n.props,e=n.__e;null!=e&&\"textarea\"===n.type&&\"value\"in t&&t.value!==e.value&&(e.value=null==t.value?\"\":t.value),rn=null};var fn={ReactCurrentDispatcher:{current:{readContext:function(n){return rn.__n[n.__c].props.value},useCallback:v,useContext:d,useDebugValue:m,useDeferredValue:w,useEffect:h,useId:p,useImperativeHandle:y,useInsertionEffect:I,useLayoutEffect:s,useMemo:_,useReducer:b,useRef:S,useState:a,useSyncExternalStore:C,useTransition:k}}},an=\"18.3.1\";function sn(n){return t.bind(null,n)}function hn(n){return!!n&&n.$$typeof===q}function vn(n){return hn(n)&&n.type===u}function dn(n){return!!n&&\"string\"==typeof n.displayName&&0==n.displayName.indexOf(\"Memo(\")}function mn(n){return hn(n)?f.apply(null,arguments):n}function pn(n){return!!n.__k&&(o(null,n),!0)}function yn(n){return n&&(n.base||1===n.nodeType&&n)||null}var _n=function(n,t){return n(t)},bn=function(n,t){var r=e.debounceRendering;e.debounceRendering=function(n){return n()};var u=n(t);return e.debounceRendering=r,u},Sn=hn,gn={useState:a,useId:p,useReducer:b,useEffect:h,useLayoutEffect:s,useInsertionEffect:I,useTransition:k,useDeferredValue:w,useSyncExternalStore:C,startTransition:x,useRef:S,useImperativeHandle:y,useMemo:_,useCallback:v,useContext:d,useDebugValue:m,version:\"18.3.1\",Children:L,render:nn,hydrate:tn,unmountComponentAtNode:pn,createPortal:$,createElement:t,createContext:l,createFactory:sn,cloneElement:mn,createRef:c,Fragment:u,isValidElement:hn,isElement:Sn,isFragment:vn,isMemo:dn,findDOMNode:yn,Component:n,PureComponent:M,memo:N,forwardRef:D,flushSync:bn,unstable_batchedUpdates:_n,StrictMode:u,Suspense:P,SuspenseList:B,lazy:z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:fn};export{L as Children,M as PureComponent,P as Suspense,B as SuspenseList,fn as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,mn as cloneElement,sn as createFactory,$ as createPortal,gn as default,yn as findDOMNode,bn as flushSync,D as forwardRef,tn as hydrate,Sn as isElement,vn as isFragment,dn as isMemo,hn as isValidElement,z as lazy,N as memo,nn as render,x as startTransition,pn as unmountComponentAtNode,_n as unstable_batchedUpdates,w as useDeferredValue,I as useInsertionEffect,C as useSyncExternalStore,k as useTransition,an as version};\n//# sourceMappingURL=compat.module.js.map\n"],"names":["E","n","t","e","r","M","this","props","context","N","ref","current","u","shouldComponentUpdate","displayName","name","__f","prototype","isReactComponent","type","isPureReactComponent","state","T","__b","O","__e","then","o","__","__c","__k","U","unmount","V","__H","forEach","g","__P","map","W","__v","appendChild","P","__u","j","__a","B","i","l","__z","__R","push","c","__O","setState","pop","forceUpdate","componentWillUnmount","render","document","createElement","fallback","children","H","delete","revealOrder","size","length","Z","getChildContext","Y","h","v","__m","nodeType","parentNode","childNodes","contains","namespaceURI","insertBefore","removeChild","splice","indexOf","$","containerInfo","get","Map","reverse","set","componentDidUpdate","componentDidMount","q","Symbol","for","G","J","K","Q","X","test","Object","defineProperty","configurable","writable","value","en","event","persist","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","nativeEvent","un","class","on","vnode","toLowerCase","replace","multiple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G,MAAM,MAAMtG,EAAEsG,MAAM,GAAGtG,EAAEsG,MAAc","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"compat.js","sources":["../../../../../../../../node_modules/preact/compat/dist/compat.mjs"],"sourcesContent":["import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as l,createRef as c,cloneElement as f}from\"preact\";export{Component,Fragment,Fragment as StrictMode,createContext,createElement,createRef}from\"preact\";import{useState as a,useLayoutEffect as s,useEffect as h,useCallback as v,useContext as d,useDebugValue as m,useId as p,useImperativeHandle as y,useMemo as _,useReducer as b,useRef as S}from\"preact/hooks\";export*from\"preact/hooks\";function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function C(n,t){var e=t(),r=a({t:{__:e,u:t}}),u=r[0].t,o=r[1];return s(function(){u.__=e,u.u=t,R(u)&&o({t:u})},[n,e,t]),h(function(){return R(u)&&o({t:u}),n(function(){R(u)&&o({t:u})})},[n]),e}function R(n){try{return!((t=n.__)===(e=n.u())&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}var t,e}function x(n){n()}function w(n){return n}function k(){return[!1,x]}var I=s;function M(n,t){this.props=n,this.context=t}function N(n,e){function r(n){var t=this.props.ref;return t!=n.ref&&t&&(\"function\"==typeof t?t(null):t.current=null),e?!e(this.props,n)||t!=n.ref:E(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",u.__f=u.prototype.isReactComponent=!0,u.type=n,u}(M.prototype=new n).isPureReactComponent=!0,M.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var T=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),T&&T(n)};var A=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function D(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=A,t.render=n,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var F=function(n,t){return null==n?null:r(r(n).map(t))},L={map:F,forEach:F,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:r},O=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k||[]),u.__c(n,t);O(n,t,e,r)};var U=e.unmount;function V(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return V(n,t,e)})),n}function W(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return W(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function P(){this.__u=0,this.o=null,this.__b=null}function j(n){var t=n.__&&n.__.__c;return t&&t.__a&&t.__a(n)}function z(n){var e,r,u,o=null;function i(i){if(e||(e=n()).then(function(n){n&&(o=n.default||n),u=!0},function(n){r=n,u=!0}),r)throw r;if(!u)throw e;return o?t(o,i):null}return i.displayName=\"Lazy\",i.__f=!0,i}function B(){this.i=null,this.l=null}e.unmount=function(n){var t=n.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),U&&U(n)},(P.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(e);var u=j(r.__v),o=!1,i=function(){o||r.__z||(o=!0,e.__R=null,u?u(c):c())};e.__R=i;var l=e.__P;e.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=W(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=l,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},P.prototype.componentWillUnmount=function(){this.o=[]},P.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement(\"div\"),o=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var H=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.i=e=e[2]}};function Z(n){return this.getChildContext=function(){return n.context},n.children}function Y(n){var e=this,r=n.h;if(e.componentWillUnmount=function(){o(null,e.v),e.v=null,e.h=null},e.h&&e.h!==r&&e.componentWillUnmount(),!e.v){for(var u=e.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;e.h=r,e.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:u.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(n,t){this.childNodes.push(n),e.h.insertBefore(n,t)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.h.removeChild(n)}}}o(t(Z,{context:e.context},n.__v),e.v)}function $(n,e){var r=t(Y,{__v:n,h:e});return r.containerInfo=e,r}(B.prototype=new n).__a=function(n){var t=this,e=j(t.__v),r=t.l.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),H(t,n,r)):u()};e?e(o):o()}},B.prototype.render=function(n){this.i=null,this.l=new Map;var t=r(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return n.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){H(n,e,t)})};var q=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,G=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K=/[A-Z0-9]/g,Q=\"undefined\"!=typeof document,X=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function nn(n,t,e){return null==t.__k&&(t.textContent=\"\"),o(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function tn(n,t,e){return i(n,t),\"function\"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent=!0,[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this[\"UNSAFE_\"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var en=e.event;e.event=function(n){return en&&(n=en(n)),n.persist=function(){},n.isPropagationStopped=function(){return this.cancelBubble},n.isDefaultPrevented=function(){return this.defaultPrevented},n.nativeEvent=n};var rn,un={configurable:!0,get:function(){return this.class}},on=e.vnode;e.vnode=function(n){\"string\"==typeof n.type&&function(n){var t=n.props,e=n.type,u={},o=-1==e.indexOf(\"-\");for(var i in t){var l=t[i];if(!(\"value\"===i&&\"defaultValue\"in t&&null==l||Q&&\"children\"===i&&\"noscript\"===e||\"class\"===i||\"className\"===i)){var c=i.toLowerCase();\"defaultValue\"===i&&\"value\"in t&&null==t.value?i=\"value\":\"download\"===i&&!0===l?l=\"\":\"translate\"===c&&\"no\"===l?l=!1:\"o\"===c[0]&&\"n\"===c[1]?\"ondoubleclick\"===c?i=\"ondblclick\":\"onchange\"!==c||\"input\"!==e&&\"textarea\"!==e||X(t.type)?\"onfocus\"===c?i=\"onfocusin\":\"onblur\"===c?i=\"onfocusout\":J.test(i)&&(i=c):c=i=\"oninput\":o&&G.test(i)?i=i.replace(K,\"-$&\").toLowerCase():null===l&&(l=void 0),\"oninput\"===c&&u[i=c]&&(i=\"oninputCapture\"),u[i]=l}}\"select\"==e&&(u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value}))),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,\"className\",un)):t.className&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=q,on&&on(n)};var ln=e.__r;e.__r=function(n){ln&&ln(n),rn=n.__c};var cn=e.diffed;e.diffed=function(n){cn&&cn(n);var t=n.props,e=n.__e;null!=e&&\"textarea\"===n.type&&\"value\"in t&&t.value!==e.value&&(e.value=null==t.value?\"\":t.value),rn=null};var fn={ReactCurrentDispatcher:{current:{readContext:function(n){return rn.__n[n.__c].props.value},useCallback:v,useContext:d,useDebugValue:m,useDeferredValue:w,useEffect:h,useId:p,useImperativeHandle:y,useInsertionEffect:I,useLayoutEffect:s,useMemo:_,useReducer:b,useRef:S,useState:a,useSyncExternalStore:C,useTransition:k}}},an=\"18.3.1\";function sn(n){return t.bind(null,n)}function hn(n){return!!n&&n.$$typeof===q}function vn(n){return hn(n)&&n.type===u}function dn(n){return!!n&&\"string\"==typeof n.displayName&&0==n.displayName.indexOf(\"Memo(\")}function mn(n){return hn(n)?f.apply(null,arguments):n}function pn(n){return!!n.__k&&(o(null,n),!0)}function yn(n){return n&&(n.base||1===n.nodeType&&n)||null}var _n=function(n,t){return n(t)},bn=function(n,t){var r=e.debounceRendering;e.debounceRendering=function(n){return n()};var u=n(t);return e.debounceRendering=r,u},Sn=hn,gn={useState:a,useId:p,useReducer:b,useEffect:h,useLayoutEffect:s,useInsertionEffect:I,useTransition:k,useDeferredValue:w,useSyncExternalStore:C,startTransition:x,useRef:S,useImperativeHandle:y,useMemo:_,useCallback:v,useContext:d,useDebugValue:m,version:\"18.3.1\",Children:L,render:nn,hydrate:tn,unmountComponentAtNode:pn,createPortal:$,createElement:t,createContext:l,createFactory:sn,cloneElement:mn,createRef:c,Fragment:u,isValidElement:hn,isElement:Sn,isFragment:vn,isMemo:dn,findDOMNode:yn,Component:n,PureComponent:M,memo:N,forwardRef:D,flushSync:bn,unstable_batchedUpdates:_n,StrictMode:u,Suspense:P,SuspenseList:B,lazy:z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:fn};export{L as Children,M as PureComponent,P as Suspense,B as SuspenseList,fn as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,mn as cloneElement,sn as createFactory,$ as createPortal,gn as default,yn as findDOMNode,bn as flushSync,D as forwardRef,tn as hydrate,Sn as isElement,vn as isFragment,dn as isMemo,hn as isValidElement,z as lazy,N as memo,nn as render,x as startTransition,pn as unmountComponentAtNode,_n as unstable_batchedUpdates,w as useDeferredValue,I as useInsertionEffect,C as useSyncExternalStore,k as useTransition,an as version};\n//# sourceMappingURL=compat.module.js.map\n"],"names":["E","n","t","e","r","M","this","props","context","N","ref","current","u","shouldComponentUpdate","displayName","name","__f","prototype","isReactComponent","type","isPureReactComponent","state","T","__b","O","__e","then","o","__","__c","__k","U","unmount","V","__H","forEach","g","__P","map","W","__v","appendChild","P","__u","j","__a","B","i","l","__z","__R","push","c","__O","setState","pop","forceUpdate","componentWillUnmount","render","document","createElement","fallback","children","H","delete","revealOrder","size","length","Z","getChildContext","Y","h","v","__m","nodeType","parentNode","childNodes","contains","namespaceURI","insertBefore","removeChild","splice","indexOf","$","containerInfo","get","Map","reverse","set","componentDidUpdate","componentDidMount","q","Symbol","for","G","J","K","Q","X","test","Object","defineProperty","configurable","writable","value","en","event","persist","isPropagationStopped","cancelBubble","isDefaultPrevented","defaultPrevented","nativeEvent","un","class","on","vnode","toLowerCase","replace","multiple","Array","isArray","selected","defaultValue","className","$$typeof","ln","__r","cn","diffed"],"mappings":"sUAA6iB,SAASA,EAAEC,EAAEC,GAAG,IAAI,IAAIC,KAAKF,EAAE,GAAG,aAAaE,KAAKA,KAAKD,GAAG,OAAM,EAAG,IAAI,IAAIE,KAAKF,EAAE,GAAG,aAAaE,GAAGH,EAAEG,KAAKF,EAAEE,GAAG,OAAM,EAAG,OAAM,CAAE,CAAsX,SAASC,EAAEJ,EAAEC,GAAGI,KAAKC,MAAMN,EAAEK,KAAKE,QAAQN,CAAC,CAAC,SAASO,EAAER,EAAEE,GAAG,SAASC,EAAEH,GAAG,IAAIC,EAAEI,KAAKC,MAAMG,IAAI,OAAOR,GAAGD,EAAES,KAAKR,IAAI,mBAAmBA,EAAEA,EAAE,MAAMA,EAAES,QAAQ,MAAMR,GAAGA,EAAEG,KAAKC,MAAMN,IAAIC,GAAGD,EAAES,IAAIV,EAAEM,KAAKC,MAAMN,EAAE,CAAC,SAASW,EAAET,GAAG,OAAOG,KAAKO,sBAAsBT,EAAEF,EAAED,EAAEE,EAAE,CAAC,OAAOS,EAAEE,YAAY,SAASb,EAAEa,aAAab,EAAEc,MAAM,IAAIH,EAAEI,IAAIJ,EAAEK,UAAUC,kBAAiB,EAAGN,EAAEO,KAAKlB,EAAEW,CAAC,EAAEP,EAAEY,UAAU,IAAIhB,GAAGmB,sBAAqB,EAAGf,EAAEY,UAAUJ,sBAAsB,SAASZ,EAAEC,GAAG,OAAOF,EAAEM,KAAKC,MAAMN,IAAID,EAAEM,KAAKe,MAAMnB,EAAE,EAAE,IAAIoB,EAAEnB,EAAEoB,IAAIpB,EAAEoB,IAAI,SAAStB,GAAGA,EAAEkB,MAA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SAAShI,GAAG+H,GAAIA,EAAG/H,GAAG,IAAIC,EAAED,EAAEM,MAAMJ,EAAEF,EAAEwB,IAAI,MAAMtB,GAAG,aAAaF,EAAEkB,MAAM,UAAUjB,GAAGA,EAAEsG,QAAQrG,EAAEqG,QAAQrG,EAAEqG,MAAM,MAAMtG,EAAEsG,MAAM,GAAGtG,EAAEsG,MAAc","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e,n,t,_,l,o,r,u,i,s,c,f,p,a,h,d={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function g(e,n){for(var t in n)e[t]=n[t];return e}function k(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(n,t,_){var l,o,r,u={};for(r in t)"key"==r?l=t[r]:"ref"==r?o=t[r]:u[r]=t[r];if(arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof n&&null!=n.defaultProps)for(r in n.defaultProps)void 0===u[r]&&(u[r]=n.defaultProps[r]);return w(n,u,l,o,null)}function w(e,_,l,o,r){var u={type:e,props:_,key:l,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++t:r,__i:-1,__u:0};return null==r&&null!=n.vnode&&n.vnode(u),u}function x(){return{current:null}}function C(e){return e.children}function P(e,n){this.props=e,this.context=n}function S(e,n){if(null==n)return e.__?S(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?S(e):null}function U(e){if(e.__P&&e.__d){var t=e.__v,_=t.__e,l=[],o=[],r=g({},t);r.__v=t.__v+1,n.vnode&&n.vnode(r),I(e.__P,r,t,e.__n,e.__P.namespaceURI,32&t.__u?[_]:null,l,null==_?S(t):_,!!(32&t.__u),o),r.__v=t.__v,r.__.__k[r.__i]=r,B(l,r,o),t.__e=t.__=null,r.__e!=_&&T(r)}}function T(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(n){if(null!=n&&null!=n.__e)return e.__e=e.__c.base=n.__e}),T(e)}function M(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!D.__r++||l!=n.debounceRendering)&&((l=n.debounceRendering)||o)(D)}function D(){try{for(var e,n=1;_.length;)_.length>n&&_.sort(r),e=_.shift(),n=_.length,U(e)}finally{_.length=D.__r=0}}function E(e,n,t,_,l,o,r,u,i,s,c){var f,p,a,h,y,m,g,k=_&&_.__k||v,b=n.length;for(i=W(t,n,k,i,b),f=0;f<b;f++)null!=(a=t.__k[f])&&(p=-1!=a.__i&&k[a.__i]||d,a.__i=f,m=I(e,a,p,l,o,r,u,i,s,c),h=a.__e,a.ref&&p.ref!=a.ref&&(p.ref&&V(p.ref,null,a),c.push(a.ref,a.__c||h,a)),null==y&&null!=h&&(y=h),(g=!!(4&a.__u))||p.__k===a.__k?(i=F(a,i,e,g),g&&p.__e&&(p.__e=null)):"function"==typeof a.type&&void 0!==m?i=m:h&&(i=h.nextSibling),a.__u&=-7);return t.__e=y,i}function W(e,n,t,_,l){var o,r,u,i,s,c=t.length,f=c,p=0;for(e.__k=new Array(l),o=0;o<l;o++)null!=(r=n[o])&&"boolean"!=typeof r&&"function"!=typeof r?("string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?r=e.__k[o]=w(null,r,null,null,null):m(r)?r=e.__k[o]=w(C,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?r=e.__k[o]=w(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):e.__k[o]=r,i=o+p,r.__=e,r.__b=e.__b+1,u=null,-1!=(s=r.__i=N(r,t,i,f))&&(f--,(u=t[s])&&(u.__u|=2)),null==u||null==u.__v?(-1==s&&(l>c?p--:l<c&&p++),"function"!=typeof r.type&&(r.__u|=4)):s!=i&&(s==i-1?p--:s==i+1?p++:(s>i?p--:p++,r.__u|=4))):e.__k[o]=null;if(f)for(o=0;o<c;o++)null!=(u=t[o])&&!(2&u.__u)&&(u.__e==_&&(_=S(u)),z(u,u));return _}function F(e,n,t,_){var l,o;if("function"==typeof e.type){for(l=e.__k,o=0;l&&o<l.length;o++)l[o]&&(l[o].__=e,n=F(l[o],n,t,_));return n}e.__e!=n&&(_&&(n&&e.type&&!n.parentNode&&(n=S(e)),t.insertBefore(e.__e,n||null)),n=e.__e);do{n=n&&n.nextSibling}while(null!=n&&8==n.nodeType);return n}function L(e,n){return n=n||[],null==e||"boolean"==typeof e||(m(e)?e.some(function(e){L(e,n)}):n.push(e)),n}function N(e,n,t,_){var l,o,r,u=e.key,i=e.type,s=n[t],c=null!=s&&!(2&s.__u);if(null===s&&null==u||c&&u==s.key&&i==s.type)return t;if(_>(c?1:0))for(l=t-1,o=t+1;l>=0||o<n.length;)if(null!=(s=n[r=l>=0?l--:o++])&&!(2&s.__u)&&u==s.key&&i==s.type)return r;return-1}function A(e,n,t){"-"==n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||y.test(n)?t:t+"px"}function R(e,n,t,_,l){var o,r;e:if("style"==n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||A(e.style,n,"");if(t)for(n in t)_&&t[n]==_[n]||A(e.style,n,t[n])}else if("o"==n[0]&&"n"==n[1])o=n!=(n=n.replace(c,"$1")),r=n.toLowerCase(),n=r in e||"onFocusOut"==n||"onFocusIn"==n?r.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+o]=t,t?_?t[s]=_[s]:(t[s]=f,e.addEventListener(n,o?a:p,o)):e.removeEventListener(n,o?a:p,o);else{if("http://www.w3.org/2000/svg"==l)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=n&&"height"!=n&&"href"!=n&&"list"!=n&&"form"!=n&&"tabIndex"!=n&&"download"!=n&&"rowSpan"!=n&&"colSpan"!=n&&"role"!=n&&"popover"!=n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!=n[4]?e.removeAttribute(n):e.setAttribute(n,"popover"==n&&1==t?"":t))}}function H(e){return function(t){if(this.l){var _=this.l[t.type+e];if(null==t[i])t[i]=f++;else if(t[i]<_[s])return;return _(n.event?n.event(t):t)}}}function I(e,t,_,l,o,r,u,i,s,c){var f,p,a,h,d,y,b,w,x,S,U,T,M,D,W,F=t.type;if(void 0!==t.constructor)return null;128&_.__u&&(s=!!(32&_.__u),r=[i=t.__e=_.__e]),(f=n.__b)&&f(t);e:if("function"==typeof F)try{if(w=t.props,x=F.prototype&&F.prototype.render,S=(f=F.contextType)&&l[f.__c],U=f?S?S.props.value:f.__:l,_.__c?b=(p=t.__c=_.__c).__=p.__E:(x?t.__c=p=new F(w,U):(t.__c=p=new P(w,U),p.constructor=F,p.render=q),S&&S.sub(p),p.state||(p.state={}),p.__n=l,a=p.__d=!0,p.__h=[],p._sb=[]),x&&null==p.__s&&(p.__s=p.state),x&&null!=F.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=g({},p.__s)),g(p.__s,F.getDerivedStateFromProps(w,p.__s))),h=p.props,d=p.state,p.__v=t,a)x&&null==F.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),x&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(x&&null==F.getDerivedStateFromProps&&w!==h&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(w,U),t.__v==_.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(w,p.__s,U)){t.__v!=_.__v&&(p.props=w,p.state=p.__s,p.__d=!1),t.__e=_.__e,t.__k=_.__k,t.__k.some(function(e){e&&(e.__=t)}),v.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&u.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(w,p.__s,U),x&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(h,d,y)})}if(p.context=U,p.props=w,p.__P=e,p.__e=!1,T=n.__r,M=0,x)p.state=p.__s,p.__d=!1,T&&T(t),f=p.render(p.props,p.state,p.context),v.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,T&&T(t),f=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++M<25);p.state=p.__s,null!=p.getChildContext&&(l=g(g({},l),p.getChildContext())),x&&!a&&null!=p.getSnapshotBeforeUpdate&&(y=p.getSnapshotBeforeUpdate(h,d)),D=null!=f&&f.type===C&&null==f.key?O(f.props.children):f,i=E(e,m(D)?D:[D],t,_,l,o,r,u,i,s,c),p.base=t.__e,t.__u&=-161,p.__h.length&&u.push(p),b&&(p.__E=p.__=null)}catch(e){if(t.__v=null,s||null!=r)if(e.then){for(t.__u|=s?160:128;i&&8==i.nodeType&&i.nextSibling;)i=i.nextSibling;r[r.indexOf(i)]=null,t.__e=i}else{for(W=r.length;W--;)k(r[W]);$(t)}else t.__e=_.__e,t.__k=_.__k,e.then||$(t);n.__e(e,t,_)}else null==r&&t.__v==_.__v?(t.__k=_.__k,t.__e=_.__e):i=t.__e=j(_.__e,t,_,l,o,r,u,s,c);return(f=n.diffed)&&f(t),128&t.__u?void 0:i}function $(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some($))}function B(e,t,_){for(var l=0;l<_.length;l++)V(_[l],_[++l],_[++l]);n.__c&&n.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){n.__e(e,t.__v)}})}function O(e){return"object"!=typeof e||null==e||e.__b>0?e:m(e)?e.map(O):void 0!==e.constructor?null:g({},e)}function j(t,_,l,o,r,u,i,s,c){var f,p,a,h,v,y,g,b=l.props||d,w=_.props,x=_.type;if("svg"==x?r="http://www.w3.org/2000/svg":"math"==x?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=u)for(f=0;f<u.length;f++)if((v=u[f])&&"setAttribute"in v==!!x&&(x?v.localName==x:3==v.nodeType)){t=v,u[f]=null;break}if(null==t){if(null==x)return document.createTextNode(w);t=document.createElementNS(r,x,w.is&&w),s&&(n.__m&&n.__m(_,u),s=!1),u=null}if(null==x)b===w||s&&t.data==w||(t.data=w);else{if(u="textarea"==x&&null!=w.defaultValue?null:u&&e.call(t.childNodes),!s&&null!=u)for(b={},f=0;f<t.attributes.length;f++)b[(v=t.attributes[f]).name]=v.value;for(f in b)v=b[f],"dangerouslySetInnerHTML"==f?a=v:"children"==f||f in w||"value"==f&&"defaultValue"in w||"checked"==f&&"defaultChecked"in w||R(t,f,null,v,r);for(f in w)v=w[f],"children"==f?h=v:"dangerouslySetInnerHTML"==f?p=v:"value"==f?y=v:"checked"==f?g=v:s&&"function"!=typeof v||b[f]===v||R(t,f,v,b[f],r);if(p)s||a&&(p.__html==a.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),_.__k=[];else if(a&&(t.innerHTML=""),E("template"==_.type?t.content:t,m(h)?h:[h],_,l,o,"foreignObject"==x?"http://www.w3.org/1999/xhtml":r,u,i,u?u[0]:l.__k&&S(l,0),s,c),null!=u)for(f=u.length;f--;)k(u[f]);s&&"textarea"!=x||(f="value","progress"==x&&null==y?t.removeAttribute("value"):null!=y&&(y!==t[f]||"progress"==x&&!y||"option"==x&&y!=b[f])&&R(t,f,y,b[f],r),f="checked",null!=g&&g!=t[f]&&R(t,f,g,b[f],r))}return t}function V(e,t,_){try{if("function"==typeof e){var l="function"==typeof e.__u;l&&e.__u(),l&&null==t||(e.__u=e(t))}else e.current=t}catch(e){n.__e(e,_)}}function z(e,t,_){var l,o;if(n.unmount&&n.unmount(e),(l=e.ref)&&(l.current&&l.current!=e.__e||V(l,null,t)),null!=(l=e.__c)){if(l.componentWillUnmount)try{l.componentWillUnmount()}catch(e){n.__e(e,t)}l.base=l.__P=null}if(l=e.__k)for(o=0;o<l.length;o++)l[o]&&z(l[o],t,_||"function"!=typeof e.type);_||k(e.__e),e.__c=e.__=e.__e=void 0}function q(e,n,t){return this.constructor(e,t)}function G(t,_,l){var o,r,u;_==document&&(_=document.documentElement),n.__&&n.__(t,_),o=!1?null:_.__k,r=[],u=[],I(_,t=_.__k=b(C,null,[t]),o||d,d,_.namespaceURI,o?null:_.firstChild?e.call(_.childNodes):null,r,o?o.__e:_.firstChild,false,u),B(r,t,u)}function J(n,t,_){var l,o,r,u,i=g({},n.props);for(r in n.type&&n.type.defaultProps&&(u=n.type.defaultProps),t)"key"==r?l=t[r]:"ref"==r?o=t[r]:i[r]=void 0===t[r]&&null!=u?u[r]:t[r];return arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),w(n.type,i,l||n.key,o||n.ref,null)}function K(e){function n(e){var t,_;return this.getChildContext||(t=new Set,(_={})[n.__c]=this,this.getChildContext=function(){return _},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&t.forEach(function(e){e.__e=!0,M(e)})},this.sub=function(e){t.add(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t&&t.delete(e),n&&n.call(e)}}),e.children}return n.__c="__cC"+h++,n.__=e,n.Provider=n.__l=(n.Consumer=function(e,n){return e.children(n)}).contextType=n,n}e=v.slice,n={__e:function(e,n,t,_){for(var l,o,r;n=n.__;)if((l=n.__c)&&!l.__)try{if((o=l.constructor)&&null!=o.getDerivedStateFromError&&(l.setState(o.getDerivedStateFromError(e)),r=l.__d),null!=l.componentDidCatch&&(l.componentDidCatch(e,_||{}),r=l.__d),r)return l.__E=l}catch(n){e=n}throw e}},t=0,P.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=g({},this.state),"function"==typeof e&&(e=e(g({},t),this.props)),e&&g(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),M(this))},P.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},P.prototype.render=C,_=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,r=function(e,n){return e.__v.__b-n.__v.__b},D.__r=0,u=Math.random().toString(8),i="__d"+u,s="__a"+u,c=/(PointerCapture)$|Capture$/i,f=0,p=H(!1),a=H(!0),h=0;export{P as Component,C as Fragment,J as cloneElement,K as createContext,b as createElement,x as createRef,b as h,n as options,G as render,L as toChildArray};
|
|
1
|
+
var e,n,t,_,l,o,r,u,i,s,c,f,p,a,h,d={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function g(e,n){for(var t in n)e[t]=n[t];return e}function k(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(n,t,_){var l,o,r,u={};for(r in t)"key"==r?l=t[r]:"ref"==r?o=t[r]:u[r]=t[r];if(arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof n&&null!=n.defaultProps)for(r in n.defaultProps)void 0===u[r]&&(u[r]=n.defaultProps[r]);return w(n,u,l,o,null)}function w(e,_,l,o,r){var u={type:e,props:_,key:l,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++t:r,__i:-1,__u:0};return null==r&&null!=n.vnode&&n.vnode(u),u}function x(){return{current:null}}function C(e){return e.children}function P(e,n){this.props=e,this.context=n}function S(e,n){if(null==n)return e.__?S(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?S(e):null}function U(e){if(e.__P&&e.__d){var t=e.__v,_=t.__e,l=[],o=[],r=g({},t);r.__v=t.__v+1,n.vnode&&n.vnode(r),I(e.__P,r,t,e.__n,e.__P.namespaceURI,32&t.__u?[_]:null,l,null==_?S(t):_,!!(32&t.__u),o),r.__v=t.__v,r.__.__k[r.__i]=r,B(l,r,o),t.__e=t.__=null,r.__e!=_&&T(r)}}function T(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(n){if(null!=n&&null!=n.__e)return e.__e=e.__c.base=n.__e}),T(e)}function M(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!D.__r++||l!=n.debounceRendering)&&((l=n.debounceRendering)||o)(D)}function D(){try{for(var e,n=1;_.length;)_.length>n&&_.sort(r),e=_.shift(),n=_.length,U(e)}finally{_.length=D.__r=0}}function E(e,n,t,_,l,o,r,u,i,s,c){var f,p,a,h,y,m,g,k=_&&_.__k||v,b=n.length;for(i=W(t,n,k,i,b),f=0;f<b;f++)null!=(a=t.__k[f])&&(p=-1!=a.__i&&k[a.__i]||d,a.__i=f,m=I(e,a,p,l,o,r,u,i,s,c),h=a.__e,a.ref&&p.ref!=a.ref&&(p.ref&&V(p.ref,null,a),c.push(a.ref,a.__c||h,a)),null==y&&null!=h&&(y=h),(g=!!(4&a.__u))||p.__k===a.__k?(i=F(a,i,e,g),g&&p.__e&&(p.__e=null)):"function"==typeof a.type&&void 0!==m?i=m:h&&(i=h.nextSibling),a.__u&=-7);return t.__e=y,i}function W(e,n,t,_,l){var o,r,u,i,s,c=t.length,f=c,p=0;for(e.__k=new Array(l),o=0;o<l;o++)null!=(r=n[o])&&"boolean"!=typeof r&&"function"!=typeof r?("string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?r=e.__k[o]=w(null,r,null,null,null):m(r)?r=e.__k[o]=w(C,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?r=e.__k[o]=w(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):e.__k[o]=r,i=o+p,r.__=e,r.__b=e.__b+1,u=null,-1!=(s=r.__i=N(r,t,i,f))&&(f--,(u=t[s])&&(u.__u|=2)),null==u||null==u.__v?(-1==s&&(l>c?p--:l<c&&p++),"function"!=typeof r.type&&(r.__u|=4)):s!=i&&(s==i-1?p--:s==i+1?p++:(s>i?p--:p++,r.__u|=4))):e.__k[o]=null;if(f)for(o=0;o<c;o++)null!=(u=t[o])&&!(2&u.__u)&&(u.__e==_&&(_=S(u)),z(u,u));return _}function F(e,n,t,_){var l,o;if("function"==typeof e.type){for(l=e.__k,o=0;l&&o<l.length;o++)l[o]&&(l[o].__=e,n=F(l[o],n,t,_));return n}e.__e!=n&&(_&&(n&&e.type&&!n.parentNode&&(n=S(e)),t.insertBefore(e.__e,n||null)),n=e.__e);do{n=n&&n.nextSibling}while(null!=n&&8==n.nodeType);return n}function L(e,n){return n=n||[],null==e||"boolean"==typeof e||(m(e)?e.some(function(e){L(e,n)}):n.push(e)),n}function N(e,n,t,_){var l,o,r,u=e.key,i=e.type,s=n[t],c=null!=s&&!(2&s.__u);if(null===s&&null==u||c&&u==s.key&&i==s.type)return t;if(_>(c?1:0))for(l=t-1,o=t+1;l>=0||o<n.length;)if(null!=(s=n[r=l>=0?l--:o++])&&!(2&s.__u)&&u==s.key&&i==s.type)return r;return-1}function A(e,n,t){"-"==n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||y.test(n)?t:t+"px"}function R(e,n,t,_,l){var o,r;e:if("style"==n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||A(e.style,n,"");if(t)for(n in t)_&&t[n]==_[n]||A(e.style,n,t[n])}else if("o"==n[0]&&"n"==n[1])o=n!=(n=n.replace(c,"$1")),r=n.toLowerCase(),n=r in e||"onFocusOut"==n||"onFocusIn"==n?r.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+o]=t,t?_?t[s]=_[s]:(t[s]=f,e.addEventListener(n,o?a:p,o)):e.removeEventListener(n,o?a:p,o);else{if("http://www.w3.org/2000/svg"==l)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=n&&"height"!=n&&"href"!=n&&"list"!=n&&"form"!=n&&"tabIndex"!=n&&"download"!=n&&"rowSpan"!=n&&"colSpan"!=n&&"role"!=n&&"popover"!=n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!=n[4]?e.removeAttribute(n):e.setAttribute(n,"popover"==n&&1==t?"":t))}}function H(e){return function(t){if(this.l){var _=this.l[t.type+e];if(null==t[i])t[i]=f++;else if(t[i]<_[s])return;return _(n.event?n.event(t):t)}}}function I(e,t,_,l,o,r,u,i,s,c){var f,p,a,h,d,y,b,w,x,S,U,T,M,D,W,F,L=t.type;if(void 0!==t.constructor)return null;128&_.__u&&(s=!!(32&_.__u),r=[i=t.__e=_.__e]),(f=n.__b)&&f(t);e:if("function"==typeof L){p=u.length;try{if(x=t.props,S=L.prototype&&L.prototype.render,U=(f=L.contextType)&&l[f.__c],T=f?U?U.props.value:f.__:l,_.__c?w=(a=t.__c=_.__c).__=a.__E:(S?t.__c=a=new L(x,T):(t.__c=a=new P(x,T),a.constructor=L,a.render=q),U&&U.sub(a),a.state||(a.state={}),a.__n=l,h=a.__d=!0,a.__h=[],a._sb=[]),S&&null==a.__s&&(a.__s=a.state),S&&null!=L.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=g({},a.__s)),g(a.__s,L.getDerivedStateFromProps(x,a.__s))),d=a.props,y=a.state,a.__v=t,h)S&&null==L.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),S&&null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(S&&null==L.getDerivedStateFromProps&&x!==d&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(x,T),t.__v==_.__v||!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(x,a.__s,T)){t.__v!=_.__v&&(a.props=x,a.state=a.__s,a.__d=!1),t.__e=_.__e,t.__k=_.__k,t.__k.some(function(e){e&&(e.__=t)}),v.push.apply(a.__h,a._sb),a._sb=[],a.__h.length&&u.push(a);break e}null!=a.componentWillUpdate&&a.componentWillUpdate(x,a.__s,T),S&&null!=a.componentDidUpdate&&a.__h.push(function(){a.componentDidUpdate(d,y,b)})}if(a.context=T,a.props=x,a.__P=e,a.__e=!1,M=n.__r,D=0,S)a.state=a.__s,a.__d=!1,M&&M(t),f=a.render(a.props,a.state,a.context),v.push.apply(a.__h,a._sb),a._sb=[];else do{a.__d=!1,M&&M(t),f=a.render(a.props,a.state,a.context),a.state=a.__s}while(a.__d&&++D<25);a.state=a.__s,null!=a.getChildContext&&(l=g(g({},l),a.getChildContext())),S&&!h&&null!=a.getSnapshotBeforeUpdate&&(b=a.getSnapshotBeforeUpdate(d,y)),W=null!=f&&f.type===C&&null==f.key?O(f.props.children):f,i=E(e,m(W)?W:[W],t,_,l,o,r,u,i,s,c),a.base=t.__e,t.__u&=-161,a.__h.length&&u.push(a),w&&(a.__E=a.__=null)}catch(e){if(u.length=p,t.__v=null,s||null!=r){if(e.then){for(t.__u|=s?160:128;i&&8==i.nodeType&&i.nextSibling;)i=i.nextSibling;null!=r&&(r[r.indexOf(i)]=null),t.__e=i}else if(null!=r)for(F=r.length;F--;)k(r[F])}else t.__e=_.__e;null==t.__k&&(t.__k=_.__k||[]),e.then||$(t),n.__e(e,t,_)}}else null==r&&t.__v==_.__v?(t.__k=_.__k,t.__e=_.__e):i=t.__e=j(_.__e,t,_,l,o,r,u,s,c);return(f=n.diffed)&&f(t),128&t.__u?void 0:i}function $(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some($))}function B(e,t,_){for(var l=0;l<_.length;l++)V(_[l],_[++l],_[++l]);n.__c&&n.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){n.__e(e,t.__v)}})}function O(e){return"object"!=typeof e||null==e||e.__b>0?e:m(e)?e.map(O):void 0!==e.constructor?null:g({},e)}function j(t,_,l,o,r,u,i,s,c){var f,p,a,h,v,y,g,b=l.props||d,w=_.props,x=_.type;if("svg"==x?r="http://www.w3.org/2000/svg":"math"==x?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=u)for(f=0;f<u.length;f++)if((v=u[f])&&"setAttribute"in v==!!x&&(x?v.localName==x:3==v.nodeType)){t=v,u[f]=null;break}if(null==t){if(null==x)return document.createTextNode(w);t=document.createElementNS(r,x,w.is&&w),s&&(n.__m&&n.__m(_,u),s=!1),u=null}if(null==x)b===w||s&&t.data==w||(t.data=w);else{if(u="textarea"==x&&null!=w.defaultValue?null:u&&e.call(t.childNodes),!s&&null!=u)for(b={},f=0;f<t.attributes.length;f++)b[(v=t.attributes[f]).name]=v.value;for(f in b)v=b[f],"dangerouslySetInnerHTML"==f?a=v:"children"==f||f in w||"value"==f&&"defaultValue"in w||"checked"==f&&"defaultChecked"in w||R(t,f,null,v,r);for(f in w)v=w[f],"children"==f?h=v:"dangerouslySetInnerHTML"==f?p=v:"value"==f?y=v:"checked"==f?g=v:s&&"function"!=typeof v||b[f]===v||R(t,f,v,b[f],r);if(p)s||a&&(p.__html==a.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),_.__k=[];else if(a&&(t.innerHTML=""),E("template"==_.type?t.content:t,m(h)?h:[h],_,l,o,"foreignObject"==x?"http://www.w3.org/1999/xhtml":r,u,i,u?u[0]:l.__k&&S(l,0),s,c),null!=u)for(f=u.length;f--;)k(u[f]);s&&"textarea"!=x||(f="value","progress"==x&&null==y?t.removeAttribute("value"):null!=y&&(y!==t[f]||"progress"==x&&!y||"option"==x&&y!=b[f])&&R(t,f,y,b[f],r),f="checked",null!=g&&g!=t[f]&&R(t,f,g,b[f],r))}return t}function V(e,t,_){try{if("function"==typeof e){var l="function"==typeof e.__u;l&&e.__u(),l&&null==t||(e.__u=e(t))}else e.current=t}catch(e){n.__e(e,_)}}function z(e,t,_){var l,o;if(n.unmount&&n.unmount(e),(l=e.ref)&&(l.current&&l.current!=e.__e||V(l,null,t)),null!=(l=e.__c)){if(l.componentWillUnmount)try{l.componentWillUnmount()}catch(e){n.__e(e,t)}l.base=l.__P=l.__n=null}if(l=e.__k)for(o=0;o<l.length;o++)l[o]&&z(l[o],t,_||"function"!=typeof e.type);_||k(e.__e),e.__c=e.__=e.__e=void 0}function q(e,n,t){return this.constructor(e,t)}function G(t,_,l){var o,r,u;_==document&&(_=document.documentElement),n.__&&n.__(t,_),o=!1?null:_.__k,r=[],u=[],I(_,t=_.__k=b(C,null,[t]),o||d,d,_.namespaceURI,o?null:_.firstChild?e.call(_.childNodes):null,r,o?o.__e:_.firstChild,false,u),B(r,t,u),t.props.children=null}function J(n,t,_){var l,o,r,u,i=g({},n.props);for(r in n.type&&n.type.defaultProps&&(u=n.type.defaultProps),t)"key"==r?l=t[r]:"ref"==r?o=t[r]:i[r]=void 0===t[r]&&null!=u?u[r]:t[r];return arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),w(n.type,i,l||n.key,o||n.ref,null)}function K(e){function n(e){var t,_;return this.getChildContext||(t=new Set,(_={})[n.__c]=this,this.getChildContext=function(){return _},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&t.forEach(function(e){e.__e=!0,M(e)})},this.sub=function(e){t.add(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t&&t.delete(e),n&&n.call(e)}}),e.children}return n.__c="__cC"+h++,n.__=e,n.Provider=n.__l=(n.Consumer=function(e,n){return e.children(n)}).contextType=n,n}e=v.slice,n={__e:function(e,n,t,_){for(var l,o,r;n=n.__;)if((l=n.__c)&&!l.__)try{if((o=l.constructor)&&null!=o.getDerivedStateFromError&&(l.setState(o.getDerivedStateFromError(e)),r=l.__d),null!=l.componentDidCatch&&(l.componentDidCatch(e,_||{}),r=l.__d),r)return l.__E=l}catch(n){e=n}throw e}},t=0,P.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=g({},this.state),"function"==typeof e&&(e=e(g({},t),this.props)),e&&g(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),M(this))},P.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},P.prototype.render=C,_=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,r=function(e,n){return e.__v.__b-n.__v.__b},D.__r=0,u=Math.random().toString(8),i="__d"+u,s="__a"+u,c=/(PointerCapture)$|Capture$/i,f=0,p=H(!1),a=H(!0),h=0;export{P as Component,C as Fragment,J as cloneElement,K as createContext,b as createElement,x as createRef,b as h,n as options,G as render,L as toChildArray};
|
|
2
2
|
//# sourceMappingURL=preact.js.map
|