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AA,IAAAA,EAAAA,EAAAA,GAAA,GACD8iC,GAAkB,IACrB,uBAAqB9iC,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GAChB+iC,GAAgB,IACnBtlC,MAAO,cAGZ,ECtDY4lC,GAA6BlG,EAAAA,EAAAA,mBAAkBmF,EAAAA,GAAmBU,GCAlEM,GAA+BnG,EAAAA,EAAAA,mBAAkBuF,EAAAA,GAAqBM,GCAtEO,GAAiCpG,EAAAA,EAAAA,mBAAkByF,EAAAA,GAAuBI,E,oFCC1EQ,GAAQrG,EAAAA,EAAAA,mBAAkBqC,EAAAA,GCLP,WAAH,MAAU,CACrChyB,KAAM,CACJ8G,SAAU,WACVxa,MAAO,OACPqa,SAAU,SACVf,KAAM,EACNG,gBAAiB,mBAEjB,mBAAoB,CAClBzZ,MAAO,QAET,qBAAsB,CACpB6wB,OAAQ,kBAEV,qBAAsB,CACpBpX,gBAAiB,gBAGrB2tB,eAAgB,CACdltB,cAAe,IAEjBwtB,gBAAiB,CACf1nC,MAAO,QAETqnC,aAAc,CACZrnC,MAAO,OACPsxB,UAAW,QAEbhb,UAAW,CACTjT,QAAS,OACTE,WAAY,SAEZ,MAAO,CACLvD,MAAO,OACP2pC,OAAQ,YAGb,G","sources":["../../../../component-react/packages/validated-text-collection/src/dummy-is-optional-validation-item.js","../../../../component-react/packages/validated-text-collection/src/shared.js","../../../../component-react/packages/validated-text-collection/src/text-asset-collection.js","../../../../component-react/packages/validated-text-collection/src/style.js","../../../../component-react/packages/validated-url-input/src/validated-url-path.js","../../../../component-react/packages/validated-url-input/src/style.js","../../../../component-react/packages/validated-url-input/src/validated-mobile-url.js","../../../../component-react/packages/validated-url-input/src/validated-final-url.js","../../../../component-react/packages/validated-url-input/src/url-cards-details.js","../../../../component-react/packages/validated-url-input/src/validated-url-options.js","../../../../component-react/packages/validated-url-input/src/mobile-url-with-custom-validation.js","../../../../component-react/packages/validated-url-input/src/mobile-url-section.js","../../../../component-react/packages/validated-url-input/src/url-options-section.js","../../../../component-react/packages/vanity-url-option/src/options.js","../../../../component-react/packages/vanity-url-option/src/styles.js","../../../../component-react/packages/vanity-url-option/src/index.js","../../../../component-react/packages/video-ads-editor/src/components/video-template-summary-bar-control/style.js","../../../../component-react/packages/video-ads-editor/src/components/video-template-summary-bar-control/index.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/style.js","../../../../component-react/packages/video-ads-editor/src/navigation-view/style.js","../../../../component-react/packages/video-ads-editor/src/navigation-view/index.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/assets-editor/style.js","../../../../component-react/packages/video-ads-editor/src/components/text-collection-with-recommendations/configs/index.js","../../../../component-react/packages/video-ads-editor/src/components/text-collection-with-recommendations/components/short-headline-asset-collection/index.js","../../../../component-react/packages/video-ads-editor/src/components/text-collection-with-recommendations/components/text-asset-collection-with-copilot.js","../../../../component-react/packages/video-ads-editor/src/components/text-collection-with-recommendations/components/styles.js","../../../../component-react/packages/video-ads-editor/src/components/text-collection-with-recommendations/components/text-asset-collection-with-recommendations.js","../../../../component-react/packages/video-ads-editor/src/components/text-collection-with-recommendations/index.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/assets-editor/index.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/style-editor/style.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/style-editor/font-editor.js","../../../../component-react/packages/video-ads-editor/src/util.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/style-editor/color-editor.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/style-editor/index.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/audio-editor/style.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/audio-editor/index.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/scene-preview/style.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/scene-preview/index.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/story-board/style.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/story-board/scene-picker.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/story-board/index.js","../../../../component-react/packages/video-ads-editor/src/state.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor/index.js","../../../../component-react/packages/video-ads-editor/src/use-navigation-state.js","../../../../component-react/packages/video-ads-editor/src/styles.js","../../../../component-react/packages/video-ads-editor/src/video-template-add-image-wrapper.js","../../../../component-react/packages/video-ads-editor/src/video-template-editor-context-wrapper.js","../../../../component-react/packages/video-pure-component/src/styles.js","../../../../component-react/packages/video-pure-component/src/video.js","../../../../component-react/packages/video-status-placeholder-pure-component/src/failed-place-holder.js","../../../../component-react/packages/video-status-placeholder-pure-component/src/encoding-place-holder.js","../../../../component-react/packages/video-status-placeholder-pure-component/src/unverified-place-holder.js","../../../../component-react/packages/video-status-placeholder/src/styles.js","../../../../component-react/packages/video-status-placeholder/src/failed-place-holder.js","../../../../component-react/packages/video-status-placeholder/src/encoding-place-holder.js","../../../../component-react/packages/video-status-placeholder/src/unverified-place-holder.js","../../../../component-react/packages/video/src/video.js","../../../../component-react/packages/video/src/styles.js"],"sourcesContent":["import { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withValidation } from '@bingads-webui-react/validation';\r\n\r\nconst DummyIsOptionalComponent = ({ value, onChange }) => {\r\n const [isOptional, setIsOptional] = useState(value);\r\n\r\n if (value !== isOptional) {\r\n onChange({ target: { value } });\r\n setIsOptional(value);\r\n }\r\n\r\n return null;\r\n};\r\n\r\nDummyIsOptionalComponent.propTypes = {\r\n value: PropTypes.bool.isRequired,\r\n onChange: PropTypes.number.isRequired,\r\n};\r\n\r\nexport const DummyIsOptionalValidationItem = withValidation(DummyIsOptionalComponent);\r\n\r\nexport const createValidationPropsForDummyItem = isOptionalValue => ({\r\n schema: {\r\n properties: {\r\n type: 'object',\r\n IsOptional: {\r\n type: 'bool',\r\n },\r\n },\r\n },\r\n field: 'IsOptional',\r\n data: { IsOptional: isOptionalValue },\r\n});\r\n","import { chain, isEmpty } from 'underscore';\r\n\r\nexport const countTextAssets = ({ collectionObj, countEmpty = false }) => chain(collectionObj).values().filter(textValue => countEmpty || !isEmpty(textValue)).value().length;\r\n\r\nexport const hasTextAssets = (headlines, longHeadlines, descriptions) => countTextAssets({ collectionObj: headlines }) + countTextAssets({ collectionObj: longHeadlines }) + countTextAssets({ collectionObj: descriptions }) > 0;\r\n\r\nconst collectionSummary = (element, i18n) => {\r\n const { collection, displayText, displayTextSingular } = element;\r\n\r\n const count = countTextAssets({ collectionObj: collection });\r\n const itemText = count === 1 && displayTextSingular ? displayTextSingular : displayText;\r\n\r\n return (i18n.getString(_TL_('{{collectionCount}} {{displayText}}', { comment: 'Collection Count can be 2 and Display Text can be headlines' }), { displayText: itemText, collectionCount: count }));\r\n};\r\n\r\nexport const getTextCardSummaryDetails = (collectionsSummary, i18n) => {\r\n const summaryDetails = [];\r\n collectionsSummary.forEach((element) => {\r\n summaryDetails.push(collectionSummary(element, i18n));\r\n });\r\n return summaryDetails.join(' ');\r\n};\r\n\r\nexport const getTextCardSummaryDetailsForCollection = (i18n, collection, displayText, displayTextSingular) => collectionSummary({ collection, displayText, displayTextSingular }, i18n);\r\n\r\nexport const getHeadlinesCardSummaryDetails = (i18n, headlines) => getTextCardSummaryDetailsForCollection(i18n, headlines, i18n.getString(_TL_('short headlines')), i18n.getString(_TL_('short headline')));\r\nexport const getLongHeadlinesCardSummaryDetails = (i18n, longHeadlines) => getTextCardSummaryDetailsForCollection(i18n, longHeadlines, i18n.getString(_TL_('long headlines')), i18n.getString(_TL_('long headline')));\r\nexport const getDescriptionsCardSummaryDetails = (i18n, descriptions) => getTextCardSummaryDetailsForCollection(i18n, descriptions, i18n.getString(_TL_('descriptions')), i18n.getString(_TL_('description')));\r\n","import React, { useCallback, useMemo, useContext, useRef } from 'react';\r\nimport { result, filter, isFunction, reduce, map, isEmpty, chain, uniq, size, noop } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\n\r\nimport { ValidationGroup, withError, withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Label } from '@bingads-webui-react/primitive';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { ActionButton, CommandButton } from '@fluentui/react';\r\nimport { registerIcons } from '@fluentui/style-utilities';\r\nimport { withContainerErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { RemainingCharsValidatedTextField } from '@bingads-webui-campaign-react/remaining-chars-hint';\r\nimport { ValidatedTextFieldWithAdCustomizer } from '@bingads-webui-campaign-react/responsive-search-ad-editor';\r\n\r\nimport { getStyles } from './style';\r\nimport { DummyIsOptionalValidationItem, createValidationPropsForDummyItem } from './dummy-is-optional-validation-item';\r\nimport { countTextAssets } from './shared';\r\n\r\nregisterIcons({\r\n icons: {\r\n 'delete-svg': (\r\n \r\n \r\n \r\n ),\r\n },\r\n});\r\n\r\nconst ValidationGroupWithMessage = withControlErrorHandling(withContainerErrors(withError(ValidationGroup)));\r\nconst hasEnoughNonEmptyValues = (list, min) => filter(list.items, item => item.value && result(item.value, 'length', 0) > 0).length >= min;\r\nconst hasDuplicateValues = (list) => {\r\n const values = chain(list.items).filter(item => item.value && result(item.value, 'length', 0) > 0).map(item => item.value).value();\r\n return size(values) !== size(uniq(values));\r\n};\r\n\r\nconst deriveValue = (data, minCollectionSize, singleAssetValidationPropsField, validationPropsField) => {\r\n const initialValue = {};\r\n\r\n const collectionObj = result(data, validationPropsField, {});\r\n const numberOfPreloadedAssets = countTextAssets({ collectionObj, countEmpty: true });\r\n\r\n for (let i = 0; i < (numberOfPreloadedAssets || minCollectionSize || 1); i += 1) {\r\n const fieldName = `${singleAssetValidationPropsField}${i}`;\r\n initialValue[fieldName] = collectionObj[fieldName] || '';\r\n }\r\n return initialValue;\r\n};\r\n\r\nexport const UnvalidatedTextAssetCollection = React.memo((props) => {\r\n const {\r\n labelAction,\r\n overrideInputNode,\r\n minCollectionSize,\r\n maxCollectionSize,\r\n isOptional,\r\n labelText,\r\n labelId,\r\n helpPopupTopic,\r\n helpPopupAriaLabel,\r\n placeholderText,\r\n fieldName,\r\n singleAssetValidationPropsField,\r\n validationPropsField,\r\n addButtonText,\r\n formErrorProps,\r\n renderWrapperFunction,\r\n updateValidation,\r\n errorMessage,\r\n duplicateErrorMessage,\r\n validationProps,\r\n externalErrorMessages,\r\n showAddButton,\r\n hideAddButtonWhenLimitReached,\r\n getCustomErrorMessage,\r\n styleOverrides,\r\n alwaysShowError,\r\n showDeleteButton,\r\n onDeleteTextAsset,\r\n deleteButtonLabel,\r\n renderInlineCopilot,\r\n enableCustomizer,\r\n withDeleteIconDisabled,\r\n } = props;\r\n const getStylesWithOverrides = useMemo(() => getStyles(styleOverrides), [styleOverrides]);\r\n const classes = useDefaultStyles(getStylesWithOverrides);\r\n const i18n = useContext(I18nContext);\r\n const activity = useContext(ActivityContext);\r\n\r\n const { data, schema } = validationProps;\r\n\r\n const value = { [validationPropsField]: deriveValue(data, minCollectionSize, singleAssetValidationPropsField, validationPropsField) };\r\n\r\n const assetsToRender = value[validationPropsField];\r\n\r\n const onDeleteAsset = useCallback((key) => {\r\n const deletedValue = value[validationPropsField][key];\r\n\r\n const newValidationPropsField = {};\r\n let index = 0;\r\n Object.keys(value[validationPropsField]).forEach((itemKey) => {\r\n if (itemKey !== key) {\r\n newValidationPropsField[`${singleAssetValidationPropsField}${index}`] = value[validationPropsField][itemKey];\r\n index += 1;\r\n }\r\n });\r\n for (let i = Object.keys(newValidationPropsField).length; i < minCollectionSize; i += 1) {\r\n newValidationPropsField[`${singleAssetValidationPropsField}${index}`] = '';\r\n index += 1;\r\n }\r\n const newValue = value;\r\n newValue[validationPropsField] = newValidationPropsField;\r\n\r\n onDeleteTextAsset(key, deletedValue);\r\n\r\n updateValidation(undefined, newValue);\r\n }, [minCollectionSize, onDeleteTextAsset, singleAssetValidationPropsField, updateValidation, validationPropsField, value]);\r\n\r\n const renderItem = useCallback((key, itemValue, additionalTextFieldProps) => (\r\n
\r\n {\r\n enableCustomizer ?\r\n :\r\n \r\n }\r\n {additionalTextFieldProps && additionalTextFieldProps.renderInlineCopilot && additionalTextFieldProps.renderInlineCopilot(key, itemValue)}\r\n {showDeleteButton &&\r\n { onDeleteAsset(key); }}\r\n ariaLabel={deleteButtonLabel}\r\n disabled={Object.keys(assetsToRender).length === 1 && withDeleteIconDisabled}\r\n />\r\n }\r\n
\r\n ), [classes.TextAssetContainer, classes.WithFlexButtons, showDeleteButton, renderInlineCopilot, enableCustomizer, withDeleteIconDisabled, i18n, validationPropsField, schema, placeholderText, deleteButtonLabel, assetsToRender, onDeleteAsset]);\r\n\r\n const textAssetFields = useMemo(() => map(assetsToRender, (itemValue, key) => {\r\n if (isFunction(renderWrapperFunction)) {\r\n return renderWrapperFunction(key, additionalTextFieldProps => renderItem(key, itemValue, additionalTextFieldProps), itemValue);\r\n }\r\n\r\n return renderItem(key);\r\n }), [assetsToRender, renderWrapperFunction, renderItem]);\r\n\r\n const hideAddButton = hideAddButtonWhenLimitReached && textAssetFields.length >= maxCollectionSize;\r\n\r\n const onAddAsset = useCallback(() => {\r\n const newValue = {\r\n [validationPropsField]: {\r\n ...value[`${validationPropsField}`],\r\n [`${singleAssetValidationPropsField}${textAssetFields.length}`]: '',\r\n },\r\n };\r\n\r\n updateValidation(undefined, newValue);\r\n }, [updateValidation, singleAssetValidationPropsField, textAssetFields.length, validationPropsField, value]);\r\n\r\n const onValidate = useCallback((validationResult) => {\r\n if (activity) {\r\n activity.signal(`onTextAssetsCollectionValidate- ${validationResult.data}`);\r\n }\r\n let customErrors = [];\r\n const newData = {\r\n ...validationResult.data,\r\n [validationPropsField]: {\r\n ...value[validationPropsField],\r\n ...validationResult.data[validationPropsField],\r\n },\r\n };\r\n if (getCustomErrorMessage) {\r\n const assets = newData[validationPropsField];\r\n\r\n customErrors = getCustomErrorMessage(assets, validationPropsField);\r\n }\r\n updateValidation([...validationResult.messages, ...customErrors], newData);\r\n }, [activity, getCustomErrorMessage, updateValidation, validationPropsField, value]);\r\n\r\n const isOptionalRef = useRef();\r\n isOptionalRef.current = isOptional;\r\n\r\n const collectionValidator = (changed, list) => {\r\n let groupErrors = hasEnoughNonEmptyValues(list, isOptionalRef.current ? 0 : minCollectionSize) ? [] : [errorMessage];\r\n if (isEmpty(groupErrors) && duplicateErrorMessage) {\r\n groupErrors = hasDuplicateValues(list) ? [duplicateErrorMessage] : [];\r\n }\r\n return reduce(list.items, (errors, item) => [...errors, ...item.messages], groupErrors);\r\n };\r\n\r\n const dummyItemValidationProps = useMemo(() => createValidationPropsForDummyItem(isOptional), [isOptional]);\r\n\r\n return (\r\n
\r\n error === errorMessage || (duplicateErrorMessage && (error === duplicateErrorMessage)),\r\n stopPropagation: true,\r\n passiveMessages: externalErrorMessages,\r\n showErrorOnPassiveMessages: true,\r\n ...(alwaysShowError && { alwaysShowError }),\r\n }}\r\n formErrorProps={formErrorProps}\r\n >\r\n
\r\n \r\n {labelAction}\r\n
\r\n {overrideInputNode}\r\n \r\n {textAssetFields}\r\n
\r\n \r\n \r\n {showAddButton && !hideAddButton &&\r\n = maxCollectionSize}\r\n onClick={onAddAsset}\r\n >\r\n {addButtonText}\r\n \r\n }\r\n \r\n );\r\n});\r\n\r\nUnvalidatedTextAssetCollection.propTypes = {\r\n minCollectionSize: PropTypes.number,\r\n maxCollectionSize: PropTypes.number.isRequired,\r\n isOptional: PropTypes.bool,\r\n labelText: PropTypes.string,\r\n labelId: PropTypes.string,\r\n helpPopupTopic: PropTypes.string,\r\n helpPopupAriaLabel: PropTypes.string,\r\n placeholderText: PropTypes.string,\r\n fieldName: PropTypes.string.isRequired,\r\n validationPropsField: PropTypes.string.isRequired,\r\n singleAssetValidationPropsField: PropTypes.string.isRequired,\r\n addButtonText: PropTypes.string.isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n formErrorProps: PropTypes.shape({}),\r\n renderWrapperFunction: PropTypes.func,\r\n updateValidation: PropTypes.func.isRequired,\r\n errorMessage: PropTypes.string.isRequired,\r\n duplicateErrorMessage: PropTypes.string,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({}).isRequired,\r\n schema: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n alwaysShowError: PropTypes.bool,\r\n externalErrorMessages: PropTypes.arrayOf(PropTypes.string),\r\n showAddButton: PropTypes.bool,\r\n hideAddButtonWhenLimitReached: PropTypes.bool,\r\n getCustomErrorMessage: PropTypes.func,\r\n styleOverrides: PropTypes.shape({}),\r\n showDeleteButton: PropTypes.bool,\r\n onDeleteTextAsset: PropTypes.func,\r\n deleteButtonLabel: PropTypes.string,\r\n renderInlineCopilot: PropTypes.func,\r\n enableCustomizer: PropTypes.bool,\r\n withDeleteIconDisabled: PropTypes.bool,\r\n labelAction: PropTypes.node,\r\n overrideInputNode: PropTypes.node,\r\n};\r\n\r\nUnvalidatedTextAssetCollection.defaultProps = {\r\n minCollectionSize: 1,\r\n isOptional: false,\r\n withDeleteIconDisabled: false,\r\n labelText: undefined,\r\n labelId: undefined,\r\n placeholderText: undefined,\r\n formErrorProps: undefined,\r\n renderWrapperFunction: undefined,\r\n helpPopupTopic: undefined,\r\n helpPopupAriaLabel: undefined,\r\n alwaysShowError: undefined,\r\n externalErrorMessages: [],\r\n showAddButton: true,\r\n hideAddButtonWhenLimitReached: false,\r\n getCustomErrorMessage: undefined,\r\n duplicateErrorMessage: undefined,\r\n styleOverrides: {},\r\n showDeleteButton: false,\r\n onDeleteTextAsset: noop,\r\n deleteButtonLabel: undefined,\r\n renderInlineCopilot: null,\r\n enableCustomizer: false,\r\n labelAction: null,\r\n overrideInputNode: null,\r\n};\r\n\r\nexport const TextAssetCollection = withCustomValidation(UnvalidatedTextAssetCollection);\r\n\r\n","import { merge } from '@bingads-webui-universal/primitive-utilities';\r\n\r\nexport const getStyles = styleOverrides => () => merge({\r\n TextAssetContainer: {\r\n marginBottom: '5px',\r\n\r\n '&:not(:first-child)': {\r\n marginTop: '16px',\r\n },\r\n\r\n '& .remaining-hint': {\r\n marginBottom: '5px',\r\n },\r\n },\r\n\r\n labelContainer: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n },\r\n\r\n WithFlexButtons: {\r\n display: 'flex',\r\n\r\n '& .text-asset-copilot > button': {\r\n height: '30px',\r\n\r\n '&:first-of-type': {\r\n marginLeft: '8px',\r\n },\r\n },\r\n\r\n '& > button': {\r\n height: '30px',\r\n },\r\n },\r\n\r\n TextAssetsCollectionContainer: {\r\n width: '552px',\r\n '& div .error': {\r\n color: '#A80000',\r\n },\r\n },\r\n\r\n AddAssetButton: {\r\n marginBottom: '15px',\r\n },\r\n}, styleOverrides);\r\n","import React, { useCallback } from 'react';\r\nimport { result, first } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Label, Stack } from '@fluentui/react';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { UrlPathFluent as UrlPathFluentV1 } from '@bingads-webui-campaign-react/url-input-fluent';\r\nimport { UrlPathFluent as UrlPathFluentV2 } from '@bingads-webui-campaign-react/url-input-fluent-v2';\r\nimport { withFluentSwitcher } from '@bingads-webui-react/fluent-version-switcher';\r\n\r\nconst UrlPathFluent = withFluentSwitcher(UrlPathFluentV1, UrlPathFluentV2);\r\n\r\nconst UrlPathWithCustomValidation = ({\r\n validationProps,\r\n updateValidation,\r\n i18n,\r\n}) => {\r\n const { data } = validationProps;\r\n\r\n const urlPath1 = result(data, 'Path1', '');\r\n const urlPath2 = result(data, 'Path2', '');\r\n const finalUrl = first(result(data, 'FinalUrls', ['']));\r\n\r\n const onChange = useCallback((errors, value) => {\r\n updateValidation(errors, value);\r\n }, [updateValidation]);\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nUrlPathWithCustomValidation.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n Path1: PropTypes.string,\r\n Path2: PropTypes.string,\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n};\r\n\r\nexport const ValidatedUrlPath = withError(withCustomValidation(UrlPathWithCustomValidation));\r\n","export const getStyles = () => ({\r\n UrlContainer: {\r\n width: '435px',\r\n\r\n '& .store-url-text-container': {\r\n marginBottom: '10px',\r\n },\r\n },\r\n MobileUrlContainer: {\r\n width: '435px',\r\n marginTop: '20px',\r\n },\r\n});\r\n","import React, { useCallback, useState } from 'react';\r\nimport { isEmpty, first, result } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Label, Stack, Checkbox } from '@fluentui/react';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { UrlInputFluent as UrlInputFluentV1, getUrlPrefixAndDestination } from '@bingads-webui-campaign-react/url-input-fluent';\r\nimport { UrlInputFluent as UrlInputFluentV2 } from '@bingads-webui-campaign-react/url-input-fluent-v2';\r\nimport { withFluentSwitcher } from '@bingads-webui-react/fluent-version-switcher';\r\n\r\nimport { getStyles } from './style';\r\n\r\nconst MobileUrlKey = 'MobileFinalUrls';\r\n\r\nconst UrlInputFluent = withFluentSwitcher(UrlInputFluentV1, UrlInputFluentV2);\r\n\r\nconst MobileUrlWithCustomValidation = ({\r\n validationProps,\r\n updateValidation,\r\n i18n,\r\n helpTopicId,\r\n}) => {\r\n const { data } = validationProps;\r\n\r\n const mobileFinalUrls = result(data, MobileUrlKey, [undefined]);\r\n const mobileFinalUrl = first(mobileFinalUrls);\r\n\r\n const [isMobileUrlChecked, setIsMobileUrlChecked] = useState(!!mobileFinalUrl);\r\n const [cachedValue, setCachedValue] = useState(mobileFinalUrl);\r\n const [cachedErrors, setCachedErrors] = useState([]);\r\n\r\n const onCheckboxChange = useCallback((ev, checked) => {\r\n setIsMobileUrlChecked(checked);\r\n\r\n if (!checked) {\r\n setCachedValue(mobileFinalUrl);\r\n const [, urlWithoutPrefix] = getUrlPrefixAndDestination(mobileFinalUrl);\r\n updateValidation([], { [MobileUrlKey]: [] }, !isEmpty(urlWithoutPrefix));\r\n } else {\r\n // If the user never touched the Mobile Final URL fields and only flipping the checkbox,\r\n // we will not be setting isDirty. It is mostly important for the scenario where it initial value\r\n // of the URL is empty - this will avoid showing the validation error when checkbox is checked.\r\n const [, urlWithoutPrefix] = getUrlPrefixAndDestination(cachedValue);\r\n updateValidation(cachedErrors, { [MobileUrlKey]: [cachedValue] }, !isEmpty(urlWithoutPrefix));\r\n }\r\n }, [cachedErrors, cachedValue, mobileFinalUrl, updateValidation]);\r\n\r\n\r\n const onInputChange = useCallback((errors, value) => {\r\n if (mobileFinalUrl !== value) {\r\n updateValidation(errors, { [MobileUrlKey]: [value] });\r\n setCachedErrors(errors);\r\n }\r\n }, [mobileFinalUrl, updateValidation]);\r\n\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n return (\r\n
\r\n \r\n {isMobileUrlChecked && (\r\n \r\n \r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nMobileUrlWithCustomValidation.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n MobileFinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n helpTopicId: PropTypes.string,\r\n};\r\n\r\nMobileUrlWithCustomValidation.defaultProps = {\r\n helpTopicId: 'pop_BA_NewCampaignCreate_Ad_MobileURL',\r\n};\r\n\r\nexport const ValidatedMobileUrl = withError(withCustomValidation(MobileUrlWithCustomValidation));\r\n","import React, { useCallback, useContext } from 'react';\r\nimport { first, result, noop, isEmpty } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { Label, Stack } from '@fluentui/react';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { UrlInputFluent } from '@bingads-webui-campaign-react/url-input-fluent';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\n\r\nconst FinalURlKey = 'FinalUrls';\r\n\r\nexport const ValidatedFinalUrl= ({\r\n i18n,\r\n validationOnUrlChange,\r\n updateValidation,\r\n prepopulateUrl,\r\n validationProps,\r\n validateOnRender,\r\n helpTopicId,\r\n hideLabel,\r\n additionalProperties,\r\n customUrlProtocol,\r\n enableSpecialCharactersValidation,\r\n}) => {\r\n const { data } = validationProps;\r\n const finalUrls = result(data, FinalURlKey, undefined);\r\n const finalUrl = first(finalUrls);\r\n const createFinalUrlsViewModel = urls => ({ [FinalURlKey]: urls });\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const onChange = useCallback((errors, value) => {\r\n updateValidation(errors, createFinalUrlsViewModel([value]), (!isEmpty(errors) && !!finalUrl));\r\n\r\n if (activity) {\r\n activity.signal(`onFinalUrlChanged - ${JSON.stringify(createFinalUrlsViewModel([value]))}`);\r\n }\r\n }, [activity, finalUrl, updateValidation]);\r\n\r\n return (\r\n \r\n {!hideLabel &&\r\n \r\n }\r\n \r\n \r\n );\r\n};\r\n\r\nValidatedFinalUrl.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n validationOnUrlChange: PropTypes.func,\r\n prepopulateUrl: PropTypes.string,\r\n hideLabel: PropTypes.bool,\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n FinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n updateOnMount: PropTypes.bool,\r\n }).isRequired,\r\n validateOnRender: PropTypes.bool,\r\n helpTopicId: PropTypes.string,\r\n additionalProperties: PropTypes.shape({}),\r\n customUrlProtocol: PropTypes.bool,\r\n enableSpecialCharactersValidation: PropTypes.bool,\r\n};\r\n\r\nValidatedFinalUrl.defaultProps = {\r\n validationOnUrlChange: noop,\r\n prepopulateUrl: '',\r\n hideLabel: false,\r\n validateOnRender: false,\r\n helpTopicId: 'pop_BA_NewAdCreate_FinalURL',\r\n additionalProperties: {},\r\n customUrlProtocol: false,\r\n enableSpecialCharactersValidation: false,\r\n};\r\n","import { isEmpty, first } from 'underscore';\r\nimport { getDomain } from '@bingads-webui/url-util';\r\nimport { isEmptyUrl } from '@bingads-webui-campaign-react/url-input-fluent';\r\n\r\nexport const getFinalUrlCardSummaryDetails = (i18n, finalUrls) => (isEmptyUrl(finalUrls) ? i18n.getString(_TL_('No URL')) : first(finalUrls));\r\n\r\nexport const getFinalUrlWithPath = (finalUrls, path1, path2) => {\r\n const finalUrlDomain = getDomain(first(finalUrls)) || 'www.example.com';\r\n return !isEmpty(path1) && !isEmpty(path2) ? `${finalUrlDomain}/${path1}/${path2}` : finalUrlDomain;\r\n};\r\n\r\nexport const getAdvancedUrlOptionsCardSummaryDetails = (i18n, finalUrls, path1, path2, mobileFinalUrls) => {\r\n const finalUrl = first(finalUrls);\r\n const mobileFinalUrl = first(mobileFinalUrls);\r\n\r\n let displayUrl = '';\r\n if (!isEmpty(path1)) {\r\n const finalUrlDomain = getDomain(finalUrl) || 'www.example.com';\r\n displayUrl = `${finalUrlDomain}/${path1}`;\r\n if (!isEmpty(path2)) {\r\n displayUrl = `${displayUrl}/${path2}`;\r\n }\r\n }\r\n const noDisplayUrl = isEmpty(displayUrl);\r\n const noMboileUrl = isEmpty(mobileFinalUrl);\r\n\r\n if (noDisplayUrl && noMboileUrl) {\r\n return i18n.getString(_TL_('No settings applied'));\r\n }\r\n\r\n const displayUrlDetails = `${i18n.getString(_TL_('Display URL'))}: ${displayUrl}`;\r\n const mobileUrlDetails = `${i18n.getString(_TL_('Mobile URL'))}: ${mobileFinalUrl}`;\r\n\r\n return `${noDisplayUrl ? '' : displayUrlDetails}${noDisplayUrl || noMboileUrl ? '' : '; '}${noMboileUrl ? '' : mobileUrlDetails}`;\r\n};\r\n","import _, { compose, partial } from 'underscore';\r\nimport { withProps } from '@bingads-webui-react/with-props';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { propertyIs, StandardControlAdapter } from '@bingads-webui-campaign-react/form-error';\r\nimport { ValidatedUrlOptionsParameters, ValidatedUrlOptionsParametersWithError } from '@bingads-webui-campaign-react/url-options';\r\n\r\nconst campaignTrackingUrlTemplate = propertyIs('TrackingUrlTemplate');\r\nconst campaignFinalUrlSuffix = propertyIs('FinalUrlSuffix');\r\nconst campaignUrlCustomParameters = propertyIs('UrlCustomParameters');\r\nconst trackingUrlTemplateControlsWrapper = compose(\r\n withControlErrorHandling,\r\n partial(withUnvalidatedControlErrors, _, { filter: campaignTrackingUrlTemplate, Adapter: StandardControlAdapter() })\r\n);\r\nconst finalUrlSuffixControlsWrapper = compose(\r\n withControlErrorHandling,\r\n partial(withUnvalidatedControlErrors, _, { filter: campaignFinalUrlSuffix, Adapter: StandardControlAdapter() })\r\n);\r\nconst urlCustomParametersControlsWrapper = compose(\r\n withControlErrorHandling,\r\n partial(withUnvalidatedControlErrors, _, { filter: campaignUrlCustomParameters, Adapter: StandardControlAdapter({ functionsToInject: ['onCustomParameterKeyChange', 'onCustomParameterValueChange', 'onRemoveUrlParameter', 'onAddUrlParameter'] }) })\r\n);\r\n\r\nexport const ValidatedUrlOptionsParameter = withControlErrorHandling(withProps({\r\n trackingUrlTemplateControlsWrapper,\r\n finalUrlSuffixControlsWrapper,\r\n urlCustomParametersControlsWrapper,\r\n}, ValidatedUrlOptionsParameters));\r\n\r\nexport const ValidatedUrlOptionsParameterWithError = withControlErrorHandling(withProps({\r\n trackingUrlTemplateControlsWrapper,\r\n finalUrlSuffixControlsWrapper,\r\n urlCustomParametersControlsWrapper,\r\n}, ValidatedUrlOptionsParametersWithError));\r\n","import React, { useCallback } from 'react';\r\nimport { first, result } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { Label, Stack } from '@fluentui/react';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { withCustomValidation, withError } from '@bingads-webui-react/validation';\r\nimport { UrlInputFluent } from '@bingads-webui-campaign-react/url-input-fluent';\r\n\r\nconst MobileUrlKey = 'MobileFinalUrls';\r\nconst valuePrefix = ['http://', 'https://'];\r\n\r\nconst MobileUrlWithCustomValidation = ({\r\n validationProps,\r\n updateValidation,\r\n i18n,\r\n helpTopicId,\r\n validateOnRender,\r\n customizedValidation,\r\n isControlledOutside,\r\n validateOnDomain,\r\n}) => {\r\n const { data } = validationProps;\r\n\r\n const mobileFinalUrls = result(data, MobileUrlKey, [undefined]);\r\n const mobileFinalUrl = first(mobileFinalUrls);\r\n\r\n const onInputChange = useCallback((errors, value) => {\r\n const formattedValue = valuePrefix.includes(value) && validateOnDomain ? '' : value;\r\n const updatedErrors = valuePrefix.includes(value) && validateOnDomain ? [] : errors;\r\n if (mobileFinalUrl !== formattedValue || isControlledOutside) {\r\n updateValidation(updatedErrors, { [MobileUrlKey]: [formattedValue] });\r\n }\r\n }, [isControlledOutside, mobileFinalUrl, updateValidation, validateOnDomain]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nMobileUrlWithCustomValidation.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({\r\n MobileFinalUrls: PropTypes.arrayOf(PropTypes.string),\r\n }),\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n helpTopicId: PropTypes.string,\r\n validateOnRender: PropTypes.bool,\r\n customizedValidation: PropTypes.func,\r\n isControlledOutside: PropTypes.bool,\r\n validateOnDomain: PropTypes.bool,\r\n};\r\n\r\nMobileUrlWithCustomValidation.defaultProps = {\r\n helpTopicId: 'pop_BA_NewCampaignCreate_Ad_MobileURL',\r\n validateOnRender: false,\r\n validateOnDomain: false,\r\n customizedValidation: null,\r\n isControlledOutside: false,\r\n};\r\n\r\nexport const ValidatedMobileUrlWithoutCheckbox = withError(withCustomValidation(MobileUrlWithCustomValidation));\r\n","import React, { useMemo, useContext } from 'react';\r\nimport { first } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n ValidatedPanel,\r\n TextTitle,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { propertyIs } from '@bingads-webui-campaign-react/form-error';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { isEmptyUrl, validateAdUrl } from '@bingads-webui-campaign-react/url-input-fluent';\r\nimport MobileFinalUrlImg from '../media/mobile-url.svg';\r\nimport { ValidatedMobileUrlWithoutCheckbox } from './mobile-url-with-custom-validation';\r\n\r\nconst nativeAdMobileFinalUrlsProp = propertyIs('MobileFinalUrls');\r\nconst ServerValidatedMobileFinalUrl = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedMobileUrlWithoutCheckbox, { filter: nativeAdMobileFinalUrlsProp }));\r\nconst customizedValidation = (url, requiredUrlProtocolAndDomain, i18n, urlLengthLimit, customUrlProtocol) => {\r\n if (isEmptyUrl([url])) {\r\n return null;\r\n }\r\n return validateAdUrl(url, requiredUrlProtocolAndDomain, i18n, urlLengthLimit, customUrlProtocol);\r\n};\r\n\r\nexport const MobileUrlSection = ({\r\n expand,\r\n mobileFinalUrls,\r\n ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const mobileFinalUrlValidationProps = useMemo(() => ({\r\n data: {\r\n MobileFinalUrls: mobileFinalUrls,\r\n },\r\n initialValue: {\r\n MobileFinalUrls: mobileFinalUrls,\r\n },\r\n }), [mobileFinalUrls]);\r\n const mobileFinalUrlDetails = useMemo(() => (isEmptyUrl(mobileFinalUrls) ? i18n.getString(_TL_('Mobile URL: None')) : first(mobileFinalUrls)), [i18n, mobileFinalUrls]);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: 'mobile-final-url',\r\n }}\r\n {...rest}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nMobileUrlSection.propTypes = {\r\n expand: PropTypes.func.isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n mobileFinalUrls: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n};\r\n","import React, { useMemo, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport {\r\n ValidatedPanel,\r\n TextTitle,\r\n getPanelErrorProps,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { getUrlOptionsDetails } from '@bingads-webui-campaign-react/url-options';\r\nimport { ValidatedUrlOptionsParameter } from './validated-url-options';\r\nimport UrlOptionsImg from '../media/campaign-url-options.svg';\r\n\r\nexport const URLOptionsSection = ({\r\n expand,\r\n trackingUrlTemplate,\r\n finalUrlSuffix,\r\n urlCustomParameters,\r\n token,\r\n triggerTestUurl,\r\n ...rest\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const urlOptions = useMemo(() => ({\r\n TrackingUrlTemplate: trackingUrlTemplate,\r\n FinalUrlSuffix: finalUrlSuffix,\r\n UrlCustomParameters: urlCustomParameters,\r\n }), [finalUrlSuffix, trackingUrlTemplate, urlCustomParameters]);\r\n const urlOptionsDetails = useMemo(() => getUrlOptionsDetails(i18n, urlOptions), [urlOptions, i18n]);\r\n\r\n return (\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand,\r\n expandKey: 'advanced-url-options',\r\n }}\r\n {...rest}\r\n >\r\n \r\n {i18n.getString(_TL_('Set up the tracking and redirect information for your ads.'))}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nURLOptionsSection.propTypes = {\r\n expand: PropTypes.func.isRequired,\r\n finalUrlSuffix: PropTypes.string,\r\n trackingUrlTemplate: PropTypes.string,\r\n urlCustomParameters: PropTypes.arrayOf(PropTypes.shape({})),\r\n token: PropTypes.string.isRequired,\r\n triggerTestUurl: PropTypes.func.isRequired,\r\n};\r\n\r\nURLOptionsSection.defaultProps = {\r\n finalUrlSuffix: undefined,\r\n trackingUrlTemplate: undefined,\r\n urlCustomParameters: undefined,\r\n};\r\n","import { findIndex, filter, isEmpty } from 'underscore';\r\n\r\nexport const DisplayUrlModes = [\r\n 'ManufacturerWebsiteUrl',\r\n 'WebsiteDescription',\r\n];\r\n\r\nexport const WebsiteDescriptionLanguages = [\r\n _TL_('English'),\r\n _TL_('Spanish'),\r\n];\r\n\r\nexport const WebsiteDescriptionOptions = [\r\n {\r\n key: 'PrescriptionTreatmentWebsite_Es',\r\n value: 'Sitio de tratamientos con receta',\r\n },\r\n {\r\n key: 'PrescriptionTreatmentWebsite_En',\r\n value: 'Prescription treatment website',\r\n },\r\n {\r\n key: 'PrescriptionDeviceWebsite_Es',\r\n value: 'Sitio de dispositivos con receta',\r\n },\r\n {\r\n key: 'PrescriptionDeviceWebsite_En',\r\n value: 'Prescription device website',\r\n },\r\n {\r\n key: 'MedicalDeviceWebsite_Es',\r\n value: 'Sitio de dispositivos médicos',\r\n },\r\n {\r\n key: 'MedicalDeviceWebsite_En',\r\n value: 'Medical device website',\r\n },\r\n {\r\n key: 'PreventativeTreatmentWebsite_Es',\r\n value: 'Sitio de tratamientos preventivos',\r\n },\r\n {\r\n key: 'PreventativeTreatmentWebsite_En',\r\n value: 'Preventative treatment website',\r\n },\r\n {\r\n key: 'PrescriptionContraceptionWebsite_Es',\r\n value: 'Sitio de anticonceptivos con receta',\r\n },\r\n {\r\n key: 'PrescriptionContraceptionWebsite_En',\r\n value: 'Prescription contraception website',\r\n },\r\n {\r\n key: 'PrescriptionVaccineWebsite_Es',\r\n value: 'Sitio de vacunas con receta',\r\n },\r\n {\r\n key: 'PrescriptionVaccineWebsite_En',\r\n value: 'Prescription vaccine website',\r\n },\r\n];\r\n\r\nexport const getWebsiteDescriptionList = (key) => {\r\n const index = findIndex(WebsiteDescriptionOptions, option => option.key === key);\r\n const mod = (index + 1) % 2;\r\n return {\r\n language: WebsiteDescriptionLanguages[mod],\r\n websiteDescriptions: filter(WebsiteDescriptionOptions, (option, idx) => (idx % 2) !== mod),\r\n };\r\n};\r\n\r\nexport const getWebsiteDescriptionInAnotherLanguage = (key, langIndex = 0) => {\r\n let index = findIndex(WebsiteDescriptionOptions, option => option.key === key);\r\n if (index === -1) {\r\n index = langIndex;\r\n }\r\n return WebsiteDescriptionOptions[index + ((-1) ** (index % 2))].key;\r\n};\r\n\r\nexport const isWebsiteDescriptionUnspecified = key => isEmpty(key) || key === 'Unspecified';\r\n","export const getStyles = () => ({\r\n vanityUrlOption: {\r\n '& .form-group-subset': {\r\n paddingLeft: '28px',\r\n\r\n '& .form-control-static': {\r\n marginTop: '0px',\r\n minHeight: 'unset',\r\n },\r\n },\r\n\r\n '& .website-description-options': {\r\n display: 'inline-flex',\r\n flexDirection: 'row',\r\n gap: '16px',\r\n\r\n '& select.form-control': {\r\n width: 'fit-content',\r\n paddingRight: '100px',\r\n },\r\n },\r\n\r\n '& .website-description-info': {\r\n margin: '8px 0 12px 0',\r\n },\r\n\r\n '& .language-disclaimer': {\r\n marginTop: '12px',\r\n },\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/anchor-is-valid, jsx-a11y/label-has-for */\r\nimport { map, result } from 'underscore';\r\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { MessageBar, MessageBarType } from '@fluentui/react';\r\nimport { registerIcons } from '@fluentui/style-utilities';\r\nimport { Glyphicon } from '@bingads-webui-react/primitive-unthemed';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport {\r\n DisplayUrlModes,\r\n WebsiteDescriptionLanguages,\r\n getWebsiteDescriptionList,\r\n getWebsiteDescriptionInAnotherLanguage,\r\n isWebsiteDescriptionUnspecified,\r\n} from './options';\r\nimport { getStyles } from './styles';\r\n\r\nregisterIcons({\r\n icons: {\r\n Insights: ,\r\n },\r\n});\r\n\r\nconst messageBarStyle = {\r\n root: {\r\n background: '#EFF6FC',\r\n '& span.iconba': {\r\n fontSize: '16px',\r\n color: '#0078D4',\r\n verticalAlign: 'top',\r\n },\r\n },\r\n};\r\n\r\nexport const VanityUrlOption = ({\r\n i18n,\r\n vanityUrlSettings,\r\n onChange,\r\n}) => {\r\n const classes = useDefaultStyles(getStyles);\r\n\r\n const [displayUrlMode, setDisplayUrlMode] = useState(result(vanityUrlSettings, 'DisplayUrlMode', DisplayUrlModes[0]));\r\n const [websiteDescription, setWebsiteDescription] = useState(result(vanityUrlSettings, 'WebsiteDescription', 'Unspecified'));\r\n\r\n const languages = useMemo(() => map(WebsiteDescriptionLanguages, language => ({ key: language, value: i18n.getString(language) })), [i18n]);\r\n const { language, websiteDescriptions } = useMemo(() => getWebsiteDescriptionList(websiteDescription), [websiteDescription]);\r\n\r\n const onDisplayUrlModeChange = useCallback((e) => {\r\n setDisplayUrlMode(e.target.value);\r\n if (e.target.value === DisplayUrlModes[1] && isWebsiteDescriptionUnspecified(websiteDescription)) {\r\n setWebsiteDescription(websiteDescriptions[0].key);\r\n }\r\n }, [websiteDescription, websiteDescriptions]);\r\n\r\n const onLanguageChange = useCallback((e) => {\r\n setWebsiteDescription(getWebsiteDescriptionInAnotherLanguage(websiteDescription, e.target.selectedIndex));\r\n }, [websiteDescription]);\r\n\r\n const onWebsiteDescriptionChange = useCallback((e) => {\r\n setWebsiteDescription(e.target.value);\r\n }, []);\r\n\r\n useEffect(() => {\r\n onChange({\r\n DisplayUrlMode: displayUrlMode,\r\n WebsiteDescription: displayUrlMode === DisplayUrlModes[0] ? 'Unspecified' : websiteDescription,\r\n });\r\n }, [displayUrlMode, onChange, websiteDescription]);\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
{i18n.getString(_TL_('The Final URL will appear in your ad.'))}
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
{i18n.getString(_TL_('A description of your website will appear in your ad instead of a URL. When potential customers click the website description, they will be taken to your Final URL. Choose a website description from the dropdown menu.'))}
\r\n \r\n {i18n.getString(_TL_('Recommended for pharmaceutical ads.'))}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nVanityUrlOption.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n vanityUrlSettings: PropTypes.shape({\r\n DisplayUrlMode: PropTypes.oneOf(DisplayUrlModes),\r\n WebsiteDescription: PropTypes.string,\r\n }),\r\n onChange: PropTypes.func.isRequired,\r\n};\r\n\r\nVanityUrlOption.defaultProps = {\r\n vanityUrlSettings: {\r\n DisplayUrlMode: DisplayUrlModes[0],\r\n WebsiteDescription: 'Unspecified',\r\n },\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n container: {\r\n height: '44px',\r\n display: 'flex',\r\n alignItems: 'center',\r\n ...shorthands.padding(0, tokens.spacingHorizontalL),\r\n },\r\n previewButton: {\r\n marginLeft: tokens.spacingHorizontalL,\r\n whiteSpace: 'nowrap',\r\n },\r\n saveButton: {\r\n marginLeft: tokens.spacingHorizontalL,\r\n whiteSpace: 'nowrap',\r\n },\r\n aspectRatio: {\r\n display: 'flex',\r\n marginLeft: tokens.spacingHorizontalL,\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n height: '100%',\r\n },\r\n divider: {\r\n marginLeft: tokens.spacingHorizontalL,\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport { createPortal } from 'react-dom';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Button,\r\n Divider,\r\n mergeClasses,\r\n} from '@fluentui/react-components';\r\nimport { VideoRegular } from '@fluentui/react-icons';\r\n\r\nimport { useStyles } from './style';\r\n\r\n// TODO -Move to common place, let's not import ads-studio component here.\r\nconst getClosestAspectRatio = (width, height) => {\r\n const inputRatio = width / height;\r\n const ratios = {\r\n '16:9': (16 / 9),\r\n '9:16': (9 / 16),\r\n '4:3': (4 / 3),\r\n '1:1': (1 / 1),\r\n '9:21': (9 / 21),\r\n '21:9': (21 / 9),\r\n '3:4': (3 / 4),\r\n };\r\n let closestRatio = null;\r\n let closestDiff = Math.abs(inputRatio - closestRatio);\r\n\r\n /* eslint-disable no-restricted-syntax */\r\n for (const [label, ratio] of Object.entries(ratios)) {\r\n const diff = Math.abs(inputRatio - ratio);\r\n if (diff < closestDiff) {\r\n closestDiff = diff;\r\n closestRatio = label;\r\n }\r\n }\r\n\r\n return closestRatio;\r\n};\r\n\r\nexport const VideoTemplateSummaryBarControl = ({\r\n i18n,\r\n setShowPreviewVideoModal,\r\n onSaveVideo,\r\n metadata,\r\n activity,\r\n}) => {\r\n const classes = useStyles();\r\n const [summaryBar, setSummaryBar] = useState(null);\r\n\r\n const aspectRatio = useMemo(() => {\r\n const template = metadata && metadata.template;\r\n if (template && template.width > 0 && template.height > 0) {\r\n return getClosestAspectRatio(template.width, template.height);\r\n }\r\n return null;\r\n }, [metadata]);\r\n\r\n\r\n /* istanbul ignore next */\r\n const preview = useCallback(() => {\r\n setShowPreviewVideoModal(true);\r\n if (activity && activity.signal) {\r\n const message = `[VideoAdsEditor] - Edit Video - Preview - TemplateId:${metadata && metadata.template && metadata.template.templateId}, AdStudio:true`;\r\n activity.signal(message);\r\n }\r\n }, [setShowPreviewVideoModal, activity, metadata]);\r\n\r\n /* istanbul ignore next */\r\n const publish = useCallback(() => {\r\n onSaveVideo();\r\n }, [onSaveVideo]);\r\n\r\n /* istanbul ignore next */\r\n const customizedContent = useMemo(() => (\r\n
\r\n {aspectRatio && (\r\n <>\r\n
\r\n {aspectRatio}\r\n
\r\n \r\n \r\n )\r\n }\r\n }\r\n appearance=\"secondary\"\r\n className={mergeClasses('preview-button', classes.previewButton)}\r\n disabled={false}\r\n onClick={preview}\r\n >\r\n {i18n.getString(_TL_('Preview video'))}\r\n \r\n \r\n {i18n.getString(_TL_('Save to Ads Studio'))}\r\n \r\n\r\n
\r\n ), [classes, i18n, preview, publish, aspectRatio]);\r\n\r\n /* istanbul ignore next */\r\n useEffect(() => {\r\n const timer = setInterval(() => {\r\n try {\r\n const summaryBarCustomizeEle = document.getElementById('ad-studio-summary-bar-customize-container');\r\n if (summaryBarCustomizeEle) {\r\n setSummaryBar(summaryBarCustomizeEle);\r\n clearInterval(timer);\r\n }\r\n } catch (error) {\r\n clearInterval(timer);\r\n }\r\n }, 500);\r\n return () => clearInterval(timer);\r\n }, []);\r\n\r\n return (\r\n summaryBar ? createPortal(\r\n customizedContent,\r\n summaryBar\r\n ) : null\r\n );\r\n};\r\n\r\nVideoTemplateSummaryBarControl.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n setShowPreviewVideoModal: PropTypes.func.isRequired,\r\n logger: PropTypes.shape({\r\n log: PropTypes.func,\r\n }).isRequired,\r\n metadata: PropTypes.shape({}).isRequired,\r\n};\r\n","// copied from private\\ads-studio\\packages\\ads-studio-app-components\\src\\page-components\\edit-image-page-component\\style.js\r\n// edit as necessary\r\nimport { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n videoEditor: {\r\n width: '1280px',\r\n top: '60px',\r\n overFlowY: 'hidden',\r\n '& .fui-DrawerBody': {\r\n paddingLeft: '0px',\r\n paddingRight: '0px',\r\n },\r\n },\r\n editVideoPage: {\r\n display: 'flex',\r\n backgroundColor: '#F0F0F0',\r\n },\r\n navigationView: {\r\n width: '85px',\r\n borderWidth: '2px',\r\n },\r\n actionsWrapperContent: {\r\n height: '100%',\r\n overflowY: 'auto',\r\n overflowX: 'hidden',\r\n },\r\n actionsWrapper: {\r\n minWidth: '300px',\r\n maxWidth: '300px',\r\n height: 'auto',\r\n paddingLeft: '10px',\r\n paddingRight: '10px',\r\n paddingBottom: '60px',\r\n marginTop: '10px',\r\n marginBottom: '10px',\r\n boxShadow: '0px 0px 2px 0px #0000001F',\r\n borderRadius: '10px',\r\n backgroundColor: '#FFFFFF',\r\n ...shorthands.overflow('hidden'),\r\n },\r\n previewContainer: {\r\n height: '100%',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flexGrow: 1,\r\n alignItems: 'center',\r\n overflowY: 'auto',\r\n position: 'relative',\r\n ...shorthands.padding(tokens.spacingHorizontalM),\r\n },\r\n scenePreview: {\r\n width: '100%',\r\n flexGrow: 1,\r\n },\r\n storyBoardContainer: {\r\n paddingTop: '10px',\r\n width: '100%',\r\n height: '270px',\r\n },\r\n leftPanelTop: {\r\n paddingTop: '10px',\r\n },\r\n bottom: {\r\n '& .apply-button': {\r\n marginRight: '8px',\r\n },\r\n '& .cancel-button': {\r\n marginRight: '8px',\r\n },\r\n },\r\n containerWrapper: {\r\n height: '100%',\r\n paddingLeft: '0px',\r\n paddingRight: '0px',\r\n },\r\n generateButtonContainer: {\r\n width: '100%',\r\n display: 'flex',\r\n },\r\n generateButton: {\r\n ...shorthands.margin('10px'),\r\n width: '100%',\r\n flexGrow: '1',\r\n },\r\n topNavigationParent: {\r\n paddingTop: '10px',\r\n paddingBottom: '10px',\r\n paddingLeft: '5px',\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n fontWeight: 'bold',\r\n },\r\n topNavigationLeft: {\r\n textAlign: 'left',\r\n alignContent: 'center',\r\n },\r\n topNavigationRight: {\r\n textAlign: 'right',\r\n },\r\n});\r\n","import { makeStyles, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n editVideoPageNavigation: {\r\n ...shorthands.padding('8px'),\r\n },\r\n tabList: {\r\n display: 'flex',\r\n ...shorthands.gap('12px'),\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n\r\n '& >div': {\r\n width: '100%',\r\n },\r\n },\r\n tabItemWrapper: {\r\n '&.selected': {\r\n '& .fui-Tab': {\r\n backgroundColor: 'rgba(246, 246, 246, 0.50)',\r\n ...shorthands.borderRadius('3px'),\r\n\r\n '::after': {\r\n color: '#005FB8',\r\n },\r\n\r\n '& .fui-Tab__icon, .fui-Tab__content': {\r\n color: '#005FB8',\r\n },\r\n },\r\n },\r\n },\r\n tabItem: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n width: '100%',\r\n\r\n '::after': {\r\n height: '18px',\r\n alignSelf: 'center',\r\n },\r\n\r\n '&:hover::before': {\r\n height: '18px',\r\n alignSelf: 'center',\r\n },\r\n\r\n '& .fui-Tab__content': {\r\n fontSize: '12px',\r\n '-webkit-box-orient': 'vertical',\r\n ...shorthands.overflow('hidden'),\r\n display: '-webkit-box',\r\n wordBreak: 'break-word',\r\n width: '61px',\r\n },\r\n\r\n '& .fui-Tab__content--reserved-space': {\r\n display: 'none',\r\n },\r\n },\r\n});\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { TabList, Tab, mergeClasses } from '@fluentui/react-components';\r\nimport { AddSquareRegular, AddSquareFilled, HeadphonesSoundWaveRegular, HeadphonesSoundWaveFilled, DesignIdeasRegular, DesignIdeasFilled } from '@fluentui/react-icons';\r\n\r\nimport { useStyles } from './style';\r\n\r\nconst AssetsId = 'edit-video-assets-view';\r\nconst StyleId = 'edit-video-style-view';\r\nconst AudioId = 'edit-video-audio-view';\r\n\r\nexport const EditVideoNavigationView = ({\r\n i18n,\r\n currentView,\r\n setCurrentView,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n const selectItem = useCallback((id) => {\r\n setCurrentView(id);\r\n }, [setCurrentView]);\r\n\r\n const isSelected = useCallback(id => currentView === id, [currentView]);\r\n\r\n const items = useMemo(() => ([\r\n {\r\n id: AssetsId,\r\n name: _TL_('Assets'),\r\n onClick: () => selectItem(AssetsId),\r\n icon: () => (isSelected(AssetsId) ? : ),\r\n isSelected: currentView === AssetsId,\r\n },\r\n {\r\n id: StyleId,\r\n name: _TL_('Style'),\r\n onClick: () => selectItem(StyleId),\r\n icon: () => (isSelected(StyleId) ? : ),\r\n isSelected: currentView === StyleId,\r\n },\r\n {\r\n id: AudioId,\r\n name: _TL_('Audio'),\r\n onClick: () => selectItem(AudioId),\r\n icon: () => (isSelected(AudioId) ? : ),\r\n isSelected: currentView === AudioId,\r\n },\r\n ]), [currentView, isSelected, selectItem]);\r\n\r\n const tabItem = useCallback(item => (\r\n \r\n {i18n.getString(item.name)}\r\n \r\n ), [i18n]);\r\n\r\n return (\r\n
\r\n \r\n {items.map(item => (\r\n
\r\n
\r\n {tabItem(item)}\r\n
\r\n
\r\n ))}\r\n
\r\n
\r\n );\r\n};\r\n\r\nEditVideoNavigationView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n currentView: PropTypes.string,\r\n setCurrentView: PropTypes.func.isRequired,\r\n};\r\n\r\nEditVideoNavigationView.defaultProps = {\r\n currentView: AssetsId,\r\n};\r\n","import { makeStyles, tokens } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n topNavigation: {\r\n paddingLeft: '10px',\r\n paddingRight: '10px',\r\n paddingTop: '10px',\r\n paddingBottom: '10px',\r\n },\r\n topNavigationParent: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n },\r\n topNavigationLeft: {\r\n textAlign: 'left',\r\n },\r\n topNavigationRight: {\r\n textAlign: 'right',\r\n },\r\n divider: {\r\n marginBottom: tokens.spacingVerticalL,\r\n },\r\n recommendedImage: {\r\n marginBottom: tokens.spacingVerticalL,\r\n },\r\n});\r\n","import { getTextAssetCollectionConfig } from '@bingads-webui-campaign-react/pmax-text-input';\r\n\r\nconst collectionConfig = {\r\n headlines: {\r\n labelText: _TL_('Text'),\r\n placeholderText: _TL_('Enter your text'),\r\n fieldName: 'short-headline',\r\n singleAssetValidationPropsField: 'Headline',\r\n validationPropsField: 'Headlines',\r\n addButtonText: _TL_('Add text'),\r\n copilotButtonLabel: _TL_('Get recommendations for your text'),\r\n deleteButtonLabel: _TL_('Remove text'),\r\n minCollectionSize: 1,\r\n maxCollectionSize: 1,\r\n errorMessage: _TL_('Text is required'),\r\n helpPopupTopic: 'pop_BA_VideoTemplates_Text',\r\n helpPopupAriaLabel: _TL_('Click to learn more about text'),\r\n inlineRecommendationsTitle: _TL_('Recommended texts'),\r\n inlineRecommendationsHelpTopicKey:\r\n 'pop_BA_Recommendations_Pmax_Shortheadlines',\r\n inlineRecommendationsHelpTopicAriaLabel: _TL_('Click to learn more about text recommendations'),\r\n inlineRecommendationsDisabledItemTooltip: _TL_(\"You've reached the maximum number of texts. Please remove one text if you'd like to add this recommended text.\"),\r\n duplicateErrorMessage: _TL_('Duplicate texts are not allowed'),\r\n },\r\n};\r\n\r\nexport const getShortHeadlineAssetCollectionConfig = i18n => getTextAssetCollectionConfig('headlines', i18n, collectionConfig);\r\n\r\n","import React, { useRef, useEffect } from 'react';\r\nimport { noop } from 'underscore';\r\nimport PropTypes, { func } from 'prop-types';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { TextAssetCollectionWithRecommendations } from '@bingads-webui-campaign-react/pmax-text-input';\r\n\r\nimport { getShortHeadlineAssetCollectionConfig } from '../../configs';\r\n\r\nexport const ShortHeadlineAssetCollection = React.memo((props) => {\r\n const {\r\n i18n,\r\n className,\r\n isOptional,\r\n placeholder,\r\n isMultipleOptions,\r\n onFocusTextAsset,\r\n onDeleteTextAsset,\r\n onApplyRecommendation,\r\n enableCopilotRecommendations,\r\n setAddNewShortHeadlinesCallback,\r\n } = props;\r\n const addNewShortHeadlineCallback = useRef(noop);\r\n const shortHeadlineAssetCollectionConfig = getShortHeadlineAssetCollectionConfig(i18n);\r\n\r\n useEffect(() => {\r\n if (setAddNewShortHeadlinesCallback) {\r\n setAddNewShortHeadlinesCallback(() => (recommendations, replaceExistingAssets) => {\r\n addNewShortHeadlineCallback.current(\r\n recommendations,\r\n replaceExistingAssets\r\n );\r\n });\r\n }\r\n }, [setAddNewShortHeadlinesCallback]);\r\n\r\n return (\r\n
\r\n {\r\n addNewShortHeadlineCallback.current = callback;\r\n }}\r\n />\r\n
\r\n );\r\n});\r\n\r\nShortHeadlineAssetCollection.propTypes = {\r\n isOptional: PropTypes.bool,\r\n className: PropTypes.string,\r\n placeholder: PropTypes.string,\r\n enableCustomizer: PropTypes.bool,\r\n isMultipleOptions: PropTypes.bool,\r\n onResetTextAssets: PropTypes.func,\r\n i18n: PropTypes.shape({ getString: func, getLocale: func }).isRequired,\r\n enableCopilotRecommendations: PropTypes.bool,\r\n onFocusTextAsset: PropTypes.func,\r\n onDeleteTextAsset: PropTypes.func,\r\n onApplyRecommendation: PropTypes.func,\r\n onToggleTextFormatting: PropTypes.func,\r\n setAddNewShortHeadlinesCallback: PropTypes.func,\r\n};\r\n\r\nShortHeadlineAssetCollection.defaultProps = {\r\n className: '',\r\n placeholder: '',\r\n isOptional: false,\r\n enableCustomizer: false,\r\n isMultipleOptions: false,\r\n enableCopilotRecommendations: true,\r\n setAddNewShortHeadlinesCallback: null,\r\n onFocusTextAsset: noop,\r\n onDeleteTextAsset: noop,\r\n onApplyRecommendation: noop,\r\n onToggleTextFormatting: noop,\r\n onResetTextAssets: noop,\r\n};\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes, { func } from 'prop-types';\r\nimport {\r\n makeStyles,\r\n mergeClasses,\r\n shorthands,\r\n tokens,\r\n} from '@fluentui/react-components';\r\n\r\nimport {\r\n ShortHeadlineAssetCollection,\r\n} from './index';\r\n\r\nconst assetName = {\r\n shortHeadline: 'ShortHeadline',\r\n};\r\n\r\nconst useTextAssetCollectionStyles = makeStyles({\r\n root: {\r\n maxWidth: '432px',\r\n },\r\n textAssetStyle: {\r\n '& .text-assets-collection-container': {\r\n width: '100%',\r\n },\r\n },\r\n textDivider: {\r\n ...shorthands.margin(tokens.spacingVerticalL, 0),\r\n },\r\n hide: {\r\n display: 'none',\r\n },\r\n});\r\n\r\nconst TextAssetCollectionWithCoPilotInternal = (props) => {\r\n const {\r\n i18n,\r\n disableCopilot,\r\n onResetTextAssets,\r\n shortHeadlineValidations,\r\n fetchRecommendationAssets,\r\n setAddNewShortHeadlinesCallback,\r\n onChangeTextAssetFormattingSection,\r\n cancelFetchRecommendationAssetsJob,\r\n } = props;\r\n\r\n const classes = useTextAssetCollectionStyles();\r\n\r\n const shortHeadlineAssetCollection = useMemo(\r\n () => (\r\n \r\n onChangeTextAssetFormattingSection(assetName.shortHeadline)\r\n }\r\n />\r\n ),\r\n [\r\n i18n,\r\n classes.hide,\r\n disableCopilot,\r\n onResetTextAssets,\r\n shortHeadlineValidations,\r\n fetchRecommendationAssets,\r\n setAddNewShortHeadlinesCallback,\r\n onChangeTextAssetFormattingSection,\r\n cancelFetchRecommendationAssetsJob,\r\n ]\r\n );\r\n\r\n return (\r\n \r\n \r\n {shortHeadlineAssetCollection}\r\n \r\n \r\n );\r\n};\r\n\r\nTextAssetCollectionWithCoPilotInternal.propTypes = {\r\n i18n: PropTypes.shape({ getString: func, getLocale: func }).isRequired,\r\n fetchRecommendationAssets: PropTypes.func.isRequired,\r\n shortHeadlineValidations: PropTypes.shape({\r\n display: PropTypes.bool,\r\n placeholder: PropTypes.string,\r\n minLength: PropTypes.number,\r\n maxLength: PropTypes.number,\r\n isMultipleOptions: PropTypes.bool,\r\n }),\r\n onResetTextAssets: PropTypes.func.isRequired,\r\n disableCopilot: PropTypes.bool.isRequired,\r\n cancelFetchRecommendationAssetsJob: PropTypes.func.isRequired,\r\n setAddNewShortHeadlinesCallback: PropTypes.func.isRequired,\r\n onChangeTextAssetFormattingSection: PropTypes.func.isRequired,\r\n};\r\n\r\nTextAssetCollectionWithCoPilotInternal.defaultProps = {\r\n shortHeadlineValidations: {\r\n placeholder: '',\r\n minLength: 0,\r\n maxLength: 30,\r\n display: true,\r\n isMultipleOptions: false,\r\n },\r\n};\r\n\r\nexport const TextAssetCollectionWithCoPilot = TextAssetCollectionWithCoPilotInternal;\r\n","import { makeStyles } from '@fluentui/react-components';\r\nimport { helpbuttonStyle } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const useDefaultContainerStyles = makeStyles({\r\n container: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n rowGap: '16px',\r\n },\r\n});\r\n\r\nexport const getStyles = (_, core) => ({\r\n collapseContainer: {\r\n '& .helpbutton': {\r\n ...helpbuttonStyle(core)['.helpbutton'],\r\n marginBottom: '4px',\r\n display: 'inline-block',\r\n },\r\n '& .helpbutton::before': helpbuttonStyle(core)['.helpbutton::before'],\r\n },\r\n});\r\n","/* istanbul ignore file */\r\nimport React, { useMemo } from 'react';\r\nimport PropTypes, { func } from 'prop-types';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { AssetGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { CopilotRepositoryProvider } from '@bingads-webui/inline-copilot';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nimport { getStyles, useDefaultContainerStyles } from './styles';\r\nimport { TextAssetCollectionWithCoPilot } from './text-asset-collection-with-copilot';\r\n\r\nconst TextAssetCollectionWithRecommendationsInternal = (props) => {\r\n const {\r\n url,\r\n i18n,\r\n campaignId,\r\n serverContext,\r\n shortHeadline,\r\n onChangeTexts,\r\n shortHeadlineValidations,\r\n } = props;\r\n const classes = useDefaultContainerStyles();\r\n const helpButtonStyles = useDefaultStyles(getStyles);\r\n const { CurrentLocale: locale } = serverContext;\r\n\r\n\r\n const updatedHeadlineSchema = useMemo(() => Object.keys(AssetGroup.properties.Headlines.schema.properties).reduce((acc, key) => {\r\n const value = AssetGroup.properties.Headlines.schema.properties[key];\r\n if (key.includes('Headline')) {\r\n const updatedValue = {\r\n ...value,\r\n minLength: shortHeadlineValidations.minLength || 0,\r\n maxLength: shortHeadlineValidations.maxLength,\r\n };\r\n return {\r\n ...acc,\r\n [key]: updatedValue,\r\n };\r\n }\r\n return {\r\n ...acc,\r\n [key]: value,\r\n };\r\n }, {}), [shortHeadlineValidations.maxLength, shortHeadlineValidations.minLength]);\r\n\r\n const updatedAssetGroup = useMemo(\r\n () => ({\r\n ...AssetGroup,\r\n properties: {\r\n ...AssetGroup.properties,\r\n Headline: {\r\n ...AssetGroup.properties.Headline,\r\n maxLength: shortHeadlineValidations.maxLength,\r\n },\r\n Headlines: {\r\n ...AssetGroup.properties.Headlines,\r\n schema: {\r\n ...AssetGroup.properties.Headlines.schema,\r\n properties: {\r\n ...AssetGroup.properties.Headlines.schema.properties,\r\n ...updatedHeadlineSchema,\r\n },\r\n },\r\n },\r\n },\r\n }),\r\n [\r\n shortHeadlineValidations.maxLength,\r\n updatedHeadlineSchema,\r\n ]\r\n );\r\n\r\n const handleValidate = ({\r\n data,\r\n isDirty,\r\n isValid,\r\n messages,\r\n }) => {\r\n const {\r\n Headlines,\r\n IsOptional,\r\n } = data;\r\n const updatedTextAssets = {\r\n isOptional: IsOptional,\r\n isDirty,\r\n isValid,\r\n messages,\r\n };\r\n const newShortHeadline = Headlines ? Headlines.Headline0 || '' : '';\r\n if (!shortHeadlineValidations.isMultipleOptions &&\r\n shortHeadline !== newShortHeadline) {\r\n updatedTextAssets.shortHeadline = newShortHeadline;\r\n }\r\n\r\n onChangeTexts(updatedTextAssets);\r\n };\r\n\r\n const handleReset = (key) => {\r\n const updatedTextAssets = {\r\n ...(key === 'shortHeadline' ? { shortHeadline: '' } : {}),\r\n };\r\n onChangeTexts(updatedTextAssets);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport const TextAssetCollectionWithRecommendations = TextAssetCollectionWithRecommendationsInternal;\r\n\r\nTextAssetCollectionWithRecommendations.propTypes = {\r\n isAudienceAd: PropTypes.bool,\r\n url: PropTypes.string.isRequired,\r\n campaignId: PropTypes.string.isRequired,\r\n shortHeadline: PropTypes.string,\r\n shortHeadlineValidations: PropTypes.shape({\r\n display: PropTypes.bool,\r\n placeholder: PropTypes.string,\r\n minLength: PropTypes.number,\r\n maxLength: PropTypes.number,\r\n isMultipleOptions: PropTypes.bool,\r\n }),\r\n serverContext: PropTypes.shape({\r\n CurrentLocale: PropTypes.string.isRequired,\r\n }).isRequired,\r\n disableCopilot: PropTypes.bool.isRequired,\r\n i18n: PropTypes.shape({ getString: func, getLocale: func }).isRequired,\r\n fetchRecommendationAssets: PropTypes.func.isRequired,\r\n cancelFetchRecommendationAssetsJob: PropTypes.func.isRequired,\r\n onChangeTexts: PropTypes.func.isRequired,\r\n};\r\n\r\nTextAssetCollectionWithRecommendations.defaultProps = {\r\n isAudienceAd: false,\r\n shortHeadline: '',\r\n shortHeadlineValidations: {\r\n placeholder: '',\r\n minLength: 0,\r\n maxLength: 30,\r\n display: true,\r\n isMultipleOptions: false,\r\n },\r\n};\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { TextAssetCollectionWithRecommendations } from './components';\r\n\r\nexport const SceneWrapperTextAssetCollectionWithRecommendations = ({\r\n scene,\r\n shouldDisplay,\r\n url,\r\n disableCopilot,\r\n i18n,\r\n serverContext,\r\n campaignId,\r\n onTextListUpdate,\r\n}) => {\r\n const getTextAssets = (text, textData, index) => {\r\n let maxLength = 30;\r\n if (textData && textData.length > index) {\r\n maxLength = textData[index].maxLength || 30;\r\n }\r\n return {\r\n minLength: 0,\r\n maxLength,\r\n isMultipleOptions: false,\r\n display: true,\r\n text: text ? text.slice(0, maxLength) : '',\r\n placeholder: '',\r\n };\r\n };\r\n const metaData = useMemo(() => {\r\n if (scene && scene.updating) {\r\n return scene.updating;\r\n }\r\n return null;\r\n }, [scene]);\r\n const shortHeadline = useCallback((text, textData, index) => getTextAssets(text, textData, index), []);\r\n const textList = useMemo(() => (metaData && metaData.text) || [], [metaData]);\r\n const textDataList = useMemo(() => (metaData && metaData.textData) || [], [metaData]);\r\n\r\n return (\r\n <>\r\n {\r\n shouldDisplay && textList.length > 0 && textList.map((text, index) => (\r\n \r\n onTextListUpdate(newText, textDataList, index)}\r\n shortHeadline={shortHeadline(text, textDataList, index).text}\r\n shortHeadlineValidations={shortHeadline(text, textDataList, index)}\r\n longHeadlineValidations={{ display: false }}\r\n descriptionValidations={{ display: false }}\r\n hideTextFormatting\r\n />\r\n \r\n ))\r\n }\r\n \r\n );\r\n};\r\n\r\nSceneWrapperTextAssetCollectionWithRecommendations.propTypes = {\r\n scene: PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n updating: PropTypes.shape({\r\n textData: PropTypes.arrayOf(PropTypes.shape({\r\n text: PropTypes.string,\r\n maxLength: PropTypes.number,\r\n })),\r\n }),\r\n }).isRequired,\r\n shouldDisplay: PropTypes.bool.isRequired,\r\n url: PropTypes.string.isRequired,\r\n disableCopilot: PropTypes.bool.isRequired,\r\n i18n: PropTypes.shape({ getString: PropTypes.func, getLocale: PropTypes.func }).isRequired,\r\n serverContext: PropTypes.shape({\r\n CurrentLocale: PropTypes.string.isRequired,\r\n }).isRequired,\r\n campaignId: PropTypes.string.isRequired,\r\n onTextListUpdate: PropTypes.func.isRequired,\r\n recommendedAssetsResponse: PropTypes.shape({\r\n RecommendedAssets: PropTypes.shape({}),\r\n Logo: PropTypes.string,\r\n }).isRequired,\r\n};\r\n","import React, { useCallback, useEffect, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { RecommendedImage } from '@bingads-webui-campaign-react/display-recommended-image';\r\nimport { UploadImage } from '@bingads-webui-campaign-react/display-ads-editor';\r\nimport { useImagePicker } from '@bingads-webui-campaign-react/add-image-hooks';\r\nimport { mergeClasses, Divider } from '@fluentui/react-components';\r\nimport { Stack } from '@fluentui/react/lib/Stack';\r\nimport { useStyles } from './style';\r\nimport { SceneWrapperTextAssetCollectionWithRecommendations } from '../../components';\r\n\r\nexport const EditVideoAssetsView = ({\r\n i18n,\r\n aid,\r\n cid,\r\n oDataConfig,\r\n onTextListChange,\r\n onChangeImage,\r\n scenes,\r\n selectedSceneId,\r\n onImageUpdated,\r\n onLogoUpdated,\r\n onChangeLogo,\r\n preferenceService,\r\n serverContext,\r\n perfMarker,\r\n permissions,\r\n recommendedAssets,\r\n isLoadingRecommendedAssets,\r\n brandKit,\r\n isLoadingBrandKit,\r\n finalUrl,\r\n}) => {\r\n const classes = useStyles();\r\n const [textList, setTextList] = useState();\r\n const [assetType, setAssetType] = useState('');\r\n const [assetIndex, setAssetIndex] = useState('');\r\n const {\r\n displayImagePicker,\r\n setDisplayImagePicker,\r\n selectedMediaPanelSource,\r\n setSelectedMediaPanelSource,\r\n } = useImagePicker();\r\n\r\n const currentScene = useMemo(() => scenes[selectedSceneId], [scenes, selectedSceneId]);\r\n\r\n const metaData = useMemo(() => {\r\n if (currentScene && currentScene.updating) {\r\n return ({ ...currentScene.updating, newImages: currentScene.newImages });\r\n }\r\n return null;\r\n }, [currentScene]);\r\n\r\n const currentSceneImages = useMemo(() => ((currentScene && currentScene.newImages && currentScene.newImages.filter(image => image.url)) || []), [currentScene]);\r\n const currentSceneLogos = useMemo(() => ((currentScene && currentScene.newLogos && currentScene.newLogos.filter(logo => logo.url)) || []), [currentScene]);\r\n const hasImages = useMemo(() => currentSceneImages.length, [currentSceneImages]);\r\n const hasLogos = useMemo(() => currentSceneLogos.length, [currentSceneLogos]);\r\n const brandKitImages = useMemo(() => {\r\n if (brandKit && brandKit.images) {\r\n const assets = Array.from(brandKit.images);\r\n return assets.map(image => ({ ...image, fullUrl: image.Url, thumbnailSrc: image.Url }));\r\n }\r\n return [];\r\n }, [brandKit]);\r\n\r\n const recommendedImageList = useMemo(() => {\r\n if (recommendedAssets && recommendedAssets.ImageAssets) {\r\n const assets = Array.from(recommendedAssets.ImageAssets);\r\n const mappedAssets = assets.map(image => ({ ...image, fullUrl: image.Url, thumbnailSrc: image.Url }));\r\n return mappedAssets.concat(brandKitImages);\r\n }\r\n return [];\r\n }, [recommendedAssets, brandKitImages]);\r\n\r\n const recommendedLogoList = useMemo(() => {\r\n let mappedLogos = [];\r\n if (brandKit && brandKit.logos) {\r\n const assets = Array.from(brandKit.logos);\r\n mappedLogos = mappedLogos.concat(assets.map(logo => ({ ...logo, fullUrl: logo.Url, thumbnailSrc: logo.Url })));\r\n }\r\n if (recommendedAssets && recommendedAssets.Logo) {\r\n const assets = Array.isArray(recommendedAssets.Logo) ? recommendedAssets.Logo : [recommendedAssets.Logo];\r\n mappedLogos = mappedLogos.concat(assets.map(logo => ({ fullUrl: logo, thumbnailSrc: logo })));\r\n }\r\n return mappedLogos;\r\n }, [brandKit, recommendedAssets]);\r\n\r\n const onReplacePreview = useCallback((index, ev) => {\r\n const { type } = ev.currentTarget.dataset;\r\n setDisplayImagePicker(true);\r\n setAssetType(type);\r\n setAssetIndex(index);\r\n }, [setDisplayImagePicker]);\r\n\r\n const onEdit = useCallback(() => {\r\n onChangeLogo();\r\n }, [onChangeLogo]);\r\n\r\n const onTextListUpdate = useCallback((newText, textData, index) => {\r\n if (!newText || !newText.shortHeadline) {\r\n return;\r\n }\r\n\r\n let maxLength = 0;\r\n if (textData && textData.length > index) {\r\n // eslint-disable-next-line prefer-destructuring\r\n maxLength = textData[index].maxLength;\r\n }\r\n\r\n const str = maxLength > 0 ? newText.shortHeadline.slice(0, maxLength) : newText.shortHeadline;\r\n const newTextList = [...textList];\r\n newTextList[index] = str;\r\n setTextList(newTextList);\r\n onTextListChange(newTextList);\r\n }, [onTextListChange, textList]);\r\n\r\n const onUpdateImageFromUserAssets = index => (image, imageType) => {\r\n // Asset picker always returns array, but we limit it to 1\r\n const imageSrc = (image.length && image[0]) || {};\r\n if (imageType === 'image') {\r\n const newImageArray = [...currentSceneImages];\r\n // update image, and set url as standard reference over src\r\n newImageArray[index] = { ...imageSrc, url: (imageSrc.src || imageSrc.fullUrl || imageSrc.thumbnailSrc) };\r\n onImageUpdated(newImageArray);\r\n } else if (imageType === 'logo') {\r\n const newLogoArray = [...currentSceneLogos];\r\n newLogoArray[index] = { ...imageSrc, url: (imageSrc.src || imageSrc.fullUrl || imageSrc.thumbnailSrc) };\r\n onLogoUpdated(newLogoArray);\r\n }\r\n };\r\n\r\n const onUpdateImageFromRecommendations = index => (image, imageType) => {\r\n if (imageType === 'image') {\r\n const newImageArray = [...currentSceneImages];\r\n newImageArray[index] = { url: (image.src || image.fullUrl || image.thumbnailSrc) };\r\n onImageUpdated(newImageArray);\r\n } else if (imageType === 'logo') {\r\n const newLogoArray = [...currentSceneLogos];\r\n newLogoArray[index] = { url: (image.src || image.fullUrl || image.thumbnailSrc) };\r\n onLogoUpdated(newLogoArray);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (metaData && metaData.text && metaData.images) {\r\n setTextList(metaData.text);\r\n }\r\n }, [metaData]);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n {hasLogos && (\r\n <>\r\n \r\n
\r\n {currentSceneLogos.map((logo, index) => (\r\n
\r\n onReplacePreview(index, ev)}\r\n recommendedLoadingText={i18n.getString(_TL_('Loading'))}\r\n title={i18n.getString(_TL_('Logo'))}\r\n helpTopic=\"pop_BA_VideoTemplates_Logo\"\r\n helpLabel=\"Learn more about logos\"\r\n recommendationTitle={i18n.getString(_TL_('Recommended logos'))}\r\n onSelectRecommendedImage={onUpdateImageFromRecommendations(index)}\r\n onAddRecommendedImagefromPanel={onUpdateImageFromRecommendations(index)}\r\n showViewAllInHeader\r\n hideEditPreviewBtn\r\n />\r\n
\r\n ))\r\n }\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n )}\r\n {\r\n hasImages && (\r\n <>\r\n \r\n
\r\n {currentSceneImages.map((sceneImage, index) => (\r\n
\r\n onReplacePreview(index, ev)}\r\n recommendedLoadingText={i18n.getString(_TL_('Loading'))}\r\n title={i18n.getString(_TL_('Images'))}\r\n helpTopic=\"pop_BA_VideoTemplates_Images\"\r\n helpLabel=\"Learn more about images\"\r\n recommendationTitle={i18n.getString(_TL_('Recommended images'))}\r\n onSelectRecommendedImage={onUpdateImageFromRecommendations(index)}\r\n onAddRecommendedImagefromPanel={onUpdateImageFromRecommendations(index)}\r\n showViewAllInHeader\r\n hideEditPreviewBtn\r\n />\r\n
\r\n ))\r\n }\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n )}\r\n \r\n
\r\n {\r\n scenes && scenes.map((scene, idx) => (\r\n \r\n ))\r\n }\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {displayImagePicker && (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nEditVideoAssetsView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n aid: PropTypes.string.isRequired,\r\n cid: PropTypes.string.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n assetLibraryConfig: PropTypes.shape({}).isRequired,\r\n onTextListChange: PropTypes.func.isRequired,\r\n onChangeImage: PropTypes.func.isRequired,\r\n onImageUpdated: PropTypes.func.isRequired,\r\n onLogoUpdated: PropTypes.func.isRequired,\r\n scenes: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n selectedSceneId: PropTypes.number.isRequired,\r\n onChangeLogo: PropTypes.func.isRequired,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n serverContext: PropTypes.shape({}).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n recommendedAssets: PropTypes.shape({\r\n ImageAssets: PropTypes.arrayOf(PropTypes.shape({\r\n Url: PropTypes.string,\r\n })),\r\n Logo: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.arrayOf(PropTypes.string),\r\n ]),\r\n }).isRequired,\r\n isLoadingRecommendedAssets: PropTypes.bool.isRequired,\r\n brandKit: PropTypes.shape({\r\n images: PropTypes.arrayOf(PropTypes.shape({\r\n Url: PropTypes.string,\r\n })),\r\n logos: PropTypes.arrayOf(PropTypes.shape({\r\n Url: PropTypes.string,\r\n })),\r\n }).isRequired,\r\n isLoadingBrandKit: PropTypes.bool.isRequired,\r\n finalUrl: PropTypes.string,\r\n};\r\n\r\nEditVideoAssetsView.defaultProps = {\r\n finalUrl: '',\r\n};\r\n","import { makeStyles, shorthands, tokens } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n styleGuideContainer: {\r\n marginLeft: '10px',\r\n marginRight: '10px',\r\n marginTop: '10px',\r\n marginBottom: '10px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n styleGuideTitle: {\r\n fontWeight: tokens.fontWeightBold,\r\n paddingBottom: '5px',\r\n },\r\n styleColorTitle: {\r\n paddingTop: '5px',\r\n paddingBotton: '5px',\r\n fontWeight: tokens.fontWeightSemibold,\r\n },\r\n colorPalettes: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n ...shorthands.gap(tokens.spacingVerticalM),\r\n ...shorthands.margin(tokens.spacingVerticalM, 0, 0, 0),\r\n },\r\n item: {\r\n height: '55px',\r\n width: '55px',\r\n backgroundColor: tokens.colorNeutralStencil1,\r\n },\r\n textDivider: {\r\n ...shorthands.margin(tokens.spacingVerticalL, 0),\r\n },\r\n containerWrapper: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n marginBottom: tokens.spacingVerticalL,\r\n },\r\n container: {\r\n width: '100%',\r\n ...shorthands.flex(1),\r\n ...shorthands.padding(tokens.spacingVerticalS, 0),\r\n },\r\n header: {\r\n display: 'flex',\r\n columnGap: tokens.spacingHorizontalXS,\r\n alignItems: 'center',\r\n ...shorthands.padding(tokens.spacingVerticalL, tokens.spacingHorizontalL),\r\n },\r\n content: {\r\n ...shorthands.padding(tokens.spacingVerticalL, tokens.spacingHorizontalL),\r\n },\r\n fontSelect: {\r\n minWidth: 'auto',\r\n maxWidth: '100%',\r\n '& > input': {\r\n maxWidth: '120px',\r\n },\r\n },\r\n fontWeightSelect: {\r\n minWidth: 'auto',\r\n maxWidth: '100%',\r\n '& > input': {\r\n maxWidth: '120px',\r\n },\r\n },\r\n fontContainer: {\r\n display: 'grid',\r\n gridTemplateColumns: 'repeat(auto-fit, minmax(172px, 1fr))',\r\n gridGap: tokens.spacingHorizontalS,\r\n },\r\n contentDivider: {\r\n display: 'inline-flex',\r\n marginTop: tokens.spacingVerticalXL,\r\n },\r\n});\r\n\r\nexport const getskeletonStyles = makeStyles({\r\n row: {\r\n display: 'flex',\r\n ...shorthands.gap('8px'),\r\n flexWrap: 'wrap',\r\n },\r\n item: {\r\n height: '55px',\r\n width: '55px',\r\n backgroundColor: tokens.colorNeutralStencil1,\r\n },\r\n});\r\n","import React, { useMemo } from 'react';\r\nimport {\r\n FontsFamilySelector,\r\n FontsWeightSelector,\r\n} from '@bingads-webui-campaign-react/fonts-selector';\r\nimport PropTypes from 'prop-types';\r\nimport { useStyles } from './style';\r\n\r\nconst overrideFontWeights = [\r\n { key: 'Normal', text: _TL_('Normal') },\r\n { key: 'Bold', text: _TL_('Bold') },\r\n];\r\n\r\nexport const FontEditor = ({\r\n i18n,\r\n onChangeFont,\r\n onChangeWeight,\r\n fontsState,\r\n}) => {\r\n const classes = useStyles();\r\n const currentFont = useMemo(() => fontsState && fontsState.updating && fontsState.updating.font, [fontsState]);\r\n const currentWeight = useMemo(() => fontsState && fontsState.updating && fontsState.updating.fontWeight, [fontsState]);\r\n\r\n return (\r\n
\r\n
\r\n
{i18n.getString(_TL_('Font'))}
\r\n \r\n
\r\n
\r\n
{i18n.getString(_TL_('Font weight'))}
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nFontEditor.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n fontsState: PropTypes.shape({\r\n updating: PropTypes.shape({\r\n font: PropTypes.string,\r\n fontWeight: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n onChangeFont: PropTypes.func.isRequired,\r\n onChangeWeight: PropTypes.func.isRequired,\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\n\r\nexport const ViewName = {\r\n AssetsView: 'edit-video-assets-view',\r\n StyleView: 'edit-video-style-view',\r\n AudioView: 'edit-video-audio-view',\r\n};\r\n\r\nexport const ViewTitle = {\r\n [ViewName.StyleView]: 'Video style guide',\r\n [ViewName.AudioView]: 'Audio',\r\n};\r\n\r\nexport const ColorTypeEnum = {\r\n BackgroundColor: 'backgroundColor',\r\n TextColor: 'textColor',\r\n};\r\n\r\nconst keyframeTemplateList = [\r\n {\r\n TemplateId: '00000001-0000-0000-0000-000000000000',\r\n TemplateName: 'Template 8 Scene 1',\r\n Version: '1.0',\r\n Width: 1280,\r\n Height: 720,\r\n TemplateFileName: 'template8_keyframe1.html',\r\n Image: [\r\n {\r\n AspectRatio: '16:9',\r\n MinHeight: 360,\r\n },\r\n ],\r\n Text: [\r\n {\r\n MaxLengthInChar: 20,\r\n },\r\n {\r\n MaxLengthInChar: 36,\r\n },\r\n ],\r\n },\r\n {\r\n TemplateId: '00000001-0000-0000-0000-000000000001',\r\n TemplateName: 'Template 8 Scene 2',\r\n Version: '1.0',\r\n Width: 1280,\r\n Height: 720,\r\n TemplateFileName: 'template8_keyframe2.html',\r\n Image: [\r\n {\r\n AspectRatio: '16:9',\r\n MinHeight: 360,\r\n },\r\n ],\r\n Text: [\r\n {\r\n MaxLengthInChar: 20,\r\n },\r\n {\r\n MaxLengthInChar: 36,\r\n },\r\n ],\r\n },\r\n {\r\n TemplateId: '00000001-0000-0000-0000-000000000002',\r\n TemplateName: 'Template 8 Scene 3',\r\n Version: '1.0',\r\n Width: 1280,\r\n Height: 720,\r\n TemplateFileName: 'template8_keyframe3.html',\r\n Image: [\r\n {\r\n AspectRatio: '16:9',\r\n MinHeight: 360,\r\n },\r\n ],\r\n Text: [\r\n {\r\n MaxLengthInChar: 25,\r\n },\r\n {\r\n MaxLengthInChar: 40,\r\n },\r\n ],\r\n },\r\n];\r\n\r\nconst getActiveTemplate = templateId => _.findWhere(keyframeTemplateList, { TemplateId: templateId });\r\n\r\nexport const getTextSizeLimitation = (templateId) => {\r\n const activeTemplate = getActiveTemplate(templateId);\r\n if (activeTemplate && activeTemplate.Text) {\r\n return activeTemplate.Text.map(text => text.MaxLengthInChar);\r\n }\r\n return [];\r\n};\r\n\r\nexport const getImageSizeLimitation = (templateId) => {\r\n const activeTemplate = getActiveTemplate(templateId);\r\n if (activeTemplate && activeTemplate.Image) {\r\n return activeTemplate.Image.map((image) => {\r\n const minHeight = image.MinHeight;\r\n const aspectRatio = image.AspectRatio.split(':');\r\n const minWidth = minHeight * (aspectRatio[0] / aspectRatio[1]);\r\n\r\n return [minWidth, minHeight];\r\n });\r\n }\r\n return [];\r\n};\r\n\r\nexport const MaxBusinessNameLength = 25;\r\n\r\nexport const loadImagePromise = (src, mock) => {\r\n const image = new Image();\r\n image.src = src;\r\n return new Promise((resolve) => {\r\n image.onload = () => {\r\n // if the actual image is 404, it will return a placeholder image which width and height are 80\r\n // todo: investigate if there is a better way to handle this\r\n if (image.width === 80 && image.height === 80 && !mock) {\r\n resolve('failed');\r\n } else {\r\n resolve('success');\r\n }\r\n };\r\n image.onerror = () => {\r\n if (!mock) {\r\n resolve('failed');\r\n } else {\r\n resolve('success');\r\n }\r\n };\r\n });\r\n};\r\n","import React, { useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { AdsStudioDisplayColorPicker } from '@bingads-webui-campaign-react/display-ads-editor';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { useStyles } from './style';\r\nimport { ColorTypeEnum } from '../../util';\r\n\r\nexport const ColorEditor = ({\r\n i18n,\r\n isLoading,\r\n onPalettesUpdated,\r\n brandKit,\r\n paletteData,\r\n palettesState,\r\n}) => {\r\n const classes = useStyles();\r\n const backgroundPalette = useMemo(() => (paletteData && paletteData.length &&\r\n paletteData.filter(color =>\r\n color.Name === ColorTypeEnum.BackgroundColor || color.isBrandKitColor)) || [], [paletteData]);\r\n const textPalette = useMemo(() => (paletteData && paletteData.length &&\r\n paletteData.filter(color =>\r\n color.Name === ColorTypeEnum.TextColor || color.isBrandKitColor)) || [], [paletteData]);\r\n\r\n const selectedColor = useCallback((colorType) => {\r\n const color = palettesState && palettesState.updating && palettesState.updating.find(c => c.Name === colorType);\r\n return color ? color.HexCode : '';\r\n }, [palettesState]);\r\n const maxColors = useMemo(() => (brandKit && brandKit.palettes && brandKit.palettes.length + 1) || 1, [brandKit]);\r\n\r\n const onDeleteColor = useCallback((ev, type) => {\r\n const { colorid } = ev.currentTarget.dataset;\r\n let data = Array.from((paletteData || []));\r\n data = data.filter(color => color.Name !== colorid);\r\n if (data.length > 0 && data[0].HexCode) {\r\n onPalettesUpdated((data[0]).HexCode, type);\r\n }\r\n }, [onPalettesUpdated, paletteData]);\r\n\r\n const onUpdate = colorType => (color, colorObj) => {\r\n onPalettesUpdated(colorObj.str, colorType);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n onDeleteColor(ev, ColorTypeEnum.BackgroundColor)}\r\n helpTopic=\"pop_BA_VideoTemplates_BackgroundColor\"\r\n helpLabel=\"Learn more about background colors\"\r\n />\r\n
\r\n
\r\n onDeleteColor(ev, ColorTypeEnum.TextColor)}\r\n helpTopic=\"pop_BA_VideoTemplates_TextColor\"\r\n helpLabel=\"Learn more about font colors\"\r\n />\r\n
\r\n
\r\n );\r\n};\r\n\r\nColorEditor.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n isLoading: PropTypes.bool,\r\n palettesState: PropTypes.shape({\r\n updating: PropTypes.arrayOf(PropTypes.shape({})),\r\n }).isRequired,\r\n onPalettesUpdated: PropTypes.func.isRequired,\r\n brandKit: PropTypes.shape({\r\n palettes: PropTypes.arrayOf(PropTypes.shape({})),\r\n }).isRequired,\r\n paletteData: PropTypes.arrayOf(PropTypes.shape({\r\n Name: PropTypes.string,\r\n HexCode: PropTypes.string,\r\n isBrandKitColor: PropTypes.bool,\r\n })).isRequired,\r\n};\r\n\r\nColorEditor.defaultProps = {\r\n isLoading: false,\r\n};\r\n\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { isEmpty } from 'underscore';\r\nimport { Divider } from '@fluentui/react-components';\r\nimport { FontEditor } from './font-editor';\r\nimport { ColorEditor } from './color-editor';\r\nimport { useStyles } from './style';\r\n\r\n\r\nexport const EditVideoStyleView = ({\r\n i18n,\r\n palettesState,\r\n onPalettesUpdated,\r\n fontsState,\r\n onFontsUpdated,\r\n brandKit,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n const paletteData = useMemo(() => {\r\n let finalPalettes = [];\r\n if (!isEmpty(brandKit)) {\r\n const brandKitPalettes = brandKit.palettes;\r\n const mappedPalettes = brandKitPalettes.map(palette => ({ ...palette, isBrandKitColor: true }));\r\n finalPalettes.push(...mappedPalettes);\r\n palettesState && palettesState.updating && palettesState.updating.forEach((color) => {\r\n if (!brandKit.palettes.some(c => c.HexCode === color.HexCode)) {\r\n finalPalettes.push(color);\r\n }\r\n });\r\n } else {\r\n finalPalettes = palettesState;\r\n }\r\n return finalPalettes;\r\n }, [palettesState, brandKit]);\r\n\r\n const onChangeFont = useCallback((font) => {\r\n const newState = {\r\n ...fontsState,\r\n updating: { ...fontsState.updating, font },\r\n };\r\n onFontsUpdated(newState);\r\n }, [fontsState, onFontsUpdated]);\r\n\r\n const onChangeWeight = (fontWeight) => {\r\n const newState = {\r\n ...fontsState,\r\n updating: { ...fontsState.updating, fontWeight },\r\n };\r\n onFontsUpdated(newState);\r\n };\r\n\r\n return (\r\n
\r\n
{i18n.getString(_TL_('Edit your video\\'s style '))}
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nEditVideoStyleView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n palettesState: PropTypes.shape({\r\n updating: PropTypes.arrayOf(PropTypes.shape({\r\n Name: PropTypes.string,\r\n Colors: PropTypes.arrayOf(PropTypes.string),\r\n })),\r\n }).isRequired,\r\n onPalettesUpdated: PropTypes.func.isRequired,\r\n fontsState: PropTypes.shape({\r\n updating: PropTypes.shape({\r\n font: PropTypes.string,\r\n fontWeight: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n onFontsUpdated: PropTypes.func.isRequired,\r\n brandKit: PropTypes.shape({\r\n palettes: PropTypes.arrayOf(PropTypes.shape({\r\n Name: PropTypes.string,\r\n Colors: PropTypes.arrayOf(PropTypes.string),\r\n })),\r\n }).isRequired,\r\n};\r\n\r\nEditVideoStyleView.defaultProps = {\r\n};\r\n","import { makeStyles } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n audioGuideContainer: {\r\n marginLeft: '10px',\r\n marginRight: '10px',\r\n marginTop: '10px',\r\n marginLBottom: '10px',\r\n },\r\n audioGuideTitle: {\r\n fontWeight: 'bold',\r\n paddingBottom: '5px',\r\n },\r\n audioMusicTitle: {\r\n paddingTop: '5px',\r\n paddingBottom: '5px',\r\n },\r\n audioMusicTitleContainer: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n },\r\n audioMusicSelect: {\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n },\r\n audioMusicContainer: {\r\n marginTop: '10px',\r\n marginBottom: '10px',\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/media-has-caption */\r\nimport React, { useState, useEffect, useCallback, useRef, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Combobox, Option, useId, Button } from '@fluentui/react-components';\r\nimport { Overlay } from '@bingads-webui-react/fabric-control';\r\nimport { AssetLibrarySpinner } from '@bingads-webui-campaign-react/asset-library-spinner';\r\nimport { PlayRegular, PauseRegular } from '@fluentui/react-icons';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\n\r\nimport { useStyles } from './style';\r\n\r\nexport const getLocalizedAudioName = (key, i18n) => {\r\n const localizedAudioNames = {\r\n 'chill_calm_river_msft_mstr.aac': i18n.getString(_TL_('Calm river (chill)')),\r\n 'chill_In_A_Dream_MSFT_MSTR.aac': i18n.getString(_TL_('In a dream (chill)')),\r\n 'chill_keep_it_moving_msft_mstr.aac': i18n.getString(_TL_('Soft moves (chill)')),\r\n 'chill_Open_Field_MSFT_MSTR.aac': i18n.getString(_TL_('Open field (chill)')),\r\n 'chill_Rain_In_Japan_MSFT_MSTR.aac': i18n.getString(_TL_('Rain in Japan (chill)')),\r\n 'chill_relaxation_msft_mstr.aac': i18n.getString(_TL_('Relaxation (chill)')),\r\n 'chill_summer_breeze_msft_mstr.aac': i18n.getString(_TL_('Summer breeze (chill)')),\r\n 'chill_sunshine_msft_mstr.aac': i18n.getString(_TL_('Sunshine (chill)')),\r\n 'chill_Supernova_MSFT_MSTR.aac': i18n.getString(_TL_('Supernova (chill)')),\r\n 'chill_Waves_MSFT_MSTR.aac': i18n.getString(_TL_('Waves (chill)')),\r\n 'cinematic_disturbia_msft_mstr.aac': i18n.getString(_TL_('Disturbia (cinematic)')),\r\n 'cinematic_full_throttle_msft_mstr.aac': i18n.getString(_TL_('Full throttle (cinematic)')),\r\n 'cinematic_tackle_it_msft_mstr.aac': i18n.getString(_TL_('Ready for action (cinematic)')),\r\n 'energetic_all_hyped_up_msft_mstr.aac': i18n.getString(_TL_('All hyped up (energetic)')),\r\n 'energetic_beach_party_msft_mstr.aac': i18n.getString(_TL_('Beach party (energetic)')),\r\n 'energetic_Bring_Up_The_Energy_MSFT_MSTR.aac': i18n.getString(_TL_('Bring the energy (energetic)')),\r\n 'energetic_By_The_Shoreline_MSFT_MSTR.aac': i18n.getString(_TL_('Daytime fun (energetic)')),\r\n 'energetic_Feelin\\'_Fresh_MSFT_MSTR.aac': i18n.getString(_TL_('Feeling fresh (energetic)')),\r\n 'energetic_Get_Excited_MSFT_MSTR.aac': i18n.getString(_TL_('Get excited (energetic)')),\r\n 'energetic_get_this_msft_mstr.aac': i18n.getString(_TL_('Positive vibes (energetic)')),\r\n 'energetic_glitter_msft_mstr.aac': i18n.getString(_TL_('Get moving (energetic)')),\r\n 'energetic_ice_tea_msft_mstr.aac': i18n.getString(_TL_('Dance to the rhythm (energetic)')),\r\n 'energetic_Pump_It_Up_MSFT_MSTR.aac': i18n.getString(_TL_('Pump it up (energetic)')),\r\n 'energetic_right_away_msft_mstr.aac': i18n.getString(_TL_('Gaining speed (energetic)')),\r\n 'fun_all_night_msft_mstr.aac': i18n.getString(_TL_('All night (fun)')),\r\n 'fun_backseat_msft_mstr.aac': i18n.getString(_TL_('Cruising (fun)')),\r\n 'fun_Block_Party_MSFT_MSTR.aac': i18n.getString(_TL_('Block party (fun)')),\r\n 'fun_Chill_And_Wavey_MSFT_MSTR.aac': i18n.getString(_TL_('Waves (fun)')),\r\n 'fun_Cloud_Walk_MSFT_MSTR.aac': i18n.getString(_TL_('Walking on clouds (fun)')),\r\n 'fun_Fearless_Funk_MSFT_MSTR.aac': i18n.getString(_TL_('Summertime beats (fun)')),\r\n 'fun_get_going_msft_mstr.aac': i18n.getString(_TL_('Groove with it (fun)')),\r\n 'fun_go_hard_msft_mstr.aac': i18n.getString(_TL_('Bliss (fun)')),\r\n 'fun_Laid_Back_Vibe_MSFT_MSTR.aac': i18n.getString(_TL_('Catch the sun (fun)')),\r\n 'fun_Liquid_MSFT_MSTR.aac': i18n.getString(_TL_('Cool as water (fun)')),\r\n 'fun_Spectra_MSFT_MSTR.aac': i18n.getString(_TL_('Up for anything (fun)')),\r\n 'fun_spring_city_msft_mstr.aac': i18n.getString(_TL_('Spring time (fun)')),\r\n 'fun_The_Bounce_MSFT_MSTR.aac': i18n.getString(_TL_('Bounce step (fun)')),\r\n 'inspiring_anodized_msft_mstr.aac': i18n.getString(_TL_('Looking to the future (inspiring)')),\r\n 'inspiring_Awakenings_MSFT_MSTR.aac': i18n.getString(_TL_('Awakenings (inspiring)')),\r\n 'inspiring_Closed_Circuits_MSFT_MSTR.aac': i18n.getString(_TL_('Open circuits (inspiring)')),\r\n 'inspiring_Cutting_Edge_MSFT_MSTR.aac': i18n.getString(_TL_('Innovation (inspiring)')),\r\n 'inspiring_Driving_Force_MSFT_MSTR.aac': i18n.getString(_TL_('Driving force (inspiring)')),\r\n 'inspiring_happy_place_msft_mstr.aac': i18n.getString(_TL_('Happy place (inspiring)')),\r\n 'inspiring_in_the_sky_msft_mstr.aac': i18n.getString(_TL_('Catching air (inspiring)')),\r\n 'inspiring_Isotope_MSFT_MSTR.aac': i18n.getString(_TL_('Journeying (inspiring)')),\r\n 'inspiring_look_around_msft_mstr.aac': i18n.getString(_TL_('Taking in the view')),\r\n 'inspiring_Morning_Coffee_MSFT_MSTR.aac': i18n.getString(_TL_('Morning coffee (inspiring)')),\r\n 'inspiring_sunshine_in_my_mind_msft_mstr.aac': i18n.getString(_TL_('Sunshine all the time (inspiring)')),\r\n 'inspiring_Tinkering_MSFT_MSTR.aac': i18n.getString(_TL_('Spring cleaning (inspiring)')),\r\n 'sentimental_homecoming_msft_mstr.aac': i18n.getString(_TL_('Homecoming (sentimental)')),\r\n 'sentimental_not_guilty_msft_mstr.aac': i18n.getString(_TL_('Know you\\'re great (sentimental)')),\r\n 'sentimental_rising_star_msft_mstr.aac': i18n.getString(_TL_('Stargazing (sentimental)')),\r\n };\r\n\r\n return localizedAudioNames[key] || key;\r\n};\r\n\r\nexport const EditVideoAudioView = ({\r\n i18n,\r\n audioState,\r\n setAudioState,\r\n rawAudioList,\r\n}) => {\r\n const selectId = useId();\r\n const classes = useStyles();\r\n\r\n const [selectedValue, setSelectedValue] = useState();\r\n const [isPageLoading, setIsPageLoading] = useState(true);\r\n const [audioList, setAudioList] = useState([]);\r\n const [isPlaying, setIsPlaying] = useState(false);\r\n const audioRef = useRef(null);\r\n\r\n const audioSrc = useMemo(() => audioState && audioState.updating && audioState.updating.fileName, [audioState]);\r\n const audioName = useMemo(() => audioState && audioState.updating && audioState.updating.audioName, [audioState]);\r\n\r\n const togglePlayPause = () => {\r\n if (isPlaying) {\r\n audioRef.current.pause();\r\n } else {\r\n audioRef.current.play();\r\n }\r\n setIsPlaying(!isPlaying);\r\n };\r\n\r\n const formatResponse = useCallback((response) => {\r\n if (!response || !response.Data || !response.Data.Audio) {\r\n return [];\r\n }\r\n\r\n return response.Data.Audio.map(item => ({\r\n key: item.Url,\r\n text: getLocalizedAudioName(item.AudioName, i18n),\r\n }));\r\n }, []);\r\n\r\n const getAudioObjectFromList = useCallback((key) => {\r\n if (!audioList || audioList.length === 0) {\r\n return null;\r\n }\r\n return audioList.find(item => item.key === key);\r\n });\r\n\r\n const handleChange = (event, data) => {\r\n const audioObject = getAudioObjectFromList(data.optionValue);\r\n if (audioObject) {\r\n setSelectedValue(data.optionText);\r\n setAudioState(prev => ({\r\n ...prev,\r\n updating: {\r\n ...prev.updating,\r\n fileName: audioObject.key,\r\n audioName: audioObject.text,\r\n },\r\n }));\r\n }\r\n\r\n if (isPlaying) {\r\n audioRef.current.pause();\r\n setIsPlaying(false);\r\n }\r\n };\r\n\r\n const formatAudioList = useCallback(async () => {\r\n const formattedList = formatResponse(rawAudioList);\r\n setAudioList(formattedList);\r\n if (formattedList.length > 0) {\r\n setSelectedValue(getLocalizedAudioName(audioName, i18n) || formattedList[0].text);\r\n }\r\n setIsPageLoading(false);\r\n }, [rawAudioList, formatResponse]);\r\n\r\n useEffect(() => {\r\n formatAudioList();\r\n }, [formatAudioList]);\r\n\r\n return (\r\n
\r\n {isPageLoading && (\r\n \r\n \r\n \r\n )}\r\n
{i18n.getString(_TL_('Choose audio for your video'))}
\r\n
\r\n
\r\n
{i18n.getString(_TL_('Music'))}
\r\n \r\n
\r\n
\r\n \r\n {!isPageLoading && audioList.length > 0 && audioList.map(option => (\r\n \r\n ))}\r\n \r\n : }\r\n className=\"play-audio-button\"\r\n />\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\n\r\nEditVideoAudioView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n copilotDomainDataService: PropTypes.shape({\r\n getAudioList: PropTypes.func,\r\n }).isRequired,\r\n audioState: PropTypes.string.isRequired,\r\n setAudioState: PropTypes.func.isRequired,\r\n};\r\n\r\nEditVideoAudioView.defaultProps = {\r\n};\r\n","import { makeStyles, tokens, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n scenePreviewContainer: {\r\n display: 'flex',\r\n height: '100%',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n ...shorthands.padding('0px', tokens.spacingHorizontalXXXL, '0px', tokens.spacingHorizontalXXXL),\r\n },\r\n scenePreviewImage: {\r\n maxWidth: '100%',\r\n maxHeight: '450px',\r\n ...shorthands.borderRadius('8px'),\r\n },\r\n});\r\n","import React, { useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport { useStyles } from './style';\r\n\r\nexport const ScenePreview = ({ scenes, selectedSceneId }) => {\r\n const currentScene = useMemo(() => scenes[selectedSceneId], [scenes, selectedSceneId]);\r\n const { keyFrame } = (currentScene && currentScene.effective) || { keyFrame: { url: '' } };\r\n const classes = useStyles();\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nScenePreview.propTypes = {\r\n scenes: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n selectedSceneId: PropTypes.number.isRequired,\r\n};\r\n","import { makeStyles, tokens, shorthands } from '@fluentui/react-components';\r\n\r\nexport const useStyles = makeStyles({\r\n storyBoardView: {\r\n display: 'flex',\r\n gap: '16px',\r\n height: '100%',\r\n minWidth: 'max-content',\r\n borderRadius: '10px',\r\n ...shorthands.padding(tokens.spacingVerticalMNudge),\r\n backgroundColor: '#FFFFFF',\r\n },\r\n templateContainer: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'space-around',\r\n width: '152px',\r\n backgroundColor: '#F0F0F0',\r\n borderRadius: '10px',\r\n paddingLeft: '10px',\r\n },\r\n templateThumbnail: {\r\n maxWidth: '125px',\r\n height: 'auto',\r\n borderRadius: '10px',\r\n fontSize: '14px',\r\n },\r\n templateText: {\r\n color: tokens.colorNeutralForeground3,\r\n fontSize: '14px',\r\n },\r\n\r\n scenesContainer: {\r\n flex: 1,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '16px',\r\n },\r\n\r\n sceneContainer: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n columnGap: '8px',\r\n },\r\n\r\n sceneTitle: {\r\n fontSize: '16px',\r\n fontWeight: '500',\r\n },\r\n\r\n thumbnailsRow: {\r\n display: 'flex',\r\n },\r\n sceneItem: {\r\n display: 'flex',\r\n marginTop: '5px',\r\n marginLeft: '5px',\r\n flexDirection: 'column',\r\n maxWidth: '125px',\r\n height: 'auto',\r\n '& .scene-decorator': {\r\n borderRadius: '10px',\r\n '& .thumbnail': {\r\n overflow: 'hidden',\r\n '&.selected': {\r\n outlineColor: '#0078d4',\r\n outlineStyle: 'solid',\r\n },\r\n padding: 1,\r\n },\r\n },\r\n },\r\n sceneThumbnail: {\r\n height: '88px',\r\n borderRadius: '10px',\r\n marginBottom: '0px',\r\n },\r\n sceneNumber: {\r\n marginBottom: '16px',\r\n '& span': {\r\n verticalAlign: 'middle',\r\n lineHeight: '12px',\r\n },\r\n },\r\n audioBar: {\r\n display: 'flex',\r\n borderRadius: '10px',\r\n width: '100%',\r\n height: '28px',\r\n color: 'white',\r\n paddingTop: '2px',\r\n paddingLeft: '5px',\r\n },\r\n navigationContainer: {\r\n display: 'grid',\r\n marginLeft: '10px',\r\n },\r\n});\r\n","import React, { useContext, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { mergeClasses } from '@fluentui/react-components';\r\nimport {\r\n Text,\r\n} from '@bingads-webui-react/fabric-control';\r\nimport { keyCode } from '@bingads-webui/keycode';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { HelpPopupInline } from '@bingads-webui-react/help-popup';\r\nimport { useStyles } from './style';\r\n\r\n\r\nconst Title = () => {\r\n const i18n = useContext(I18nContext);\r\n return (\r\n
\r\n {i18n.getString(_TL_('Scenes'))}\r\n \r\n
\r\n );\r\n};\r\n\r\nconst Scene = ({\r\n scene, sceneId, onSceneSelected, selectedSceneId,\r\n}) => {\r\n const classes = useStyles();\r\n const clickFunc = useCallback(() => {\r\n onSceneSelected({ scene, id: sceneId });\r\n }, [onSceneSelected, scene, sceneId]);\r\n\r\n const onKeyDown = useCallback((ev) => {\r\n if (ev.keyCode === keyCode.Enter) {\r\n clickFunc();\r\n }\r\n }, [clickFunc]);\r\n\r\n const {\r\n keyFrame,\r\n } = scene;\r\n\r\n const isSelected = sceneId === selectedSceneId;\r\n\r\n return (\r\n
\r\n \r\n
\r\n \"scene\"\r\n
\r\n
\r\n
\r\n {`${sceneId + 1}`}\r\n
\r\n \r\n );\r\n};\r\n\r\nScene.propTypes = {\r\n scene: PropTypes.shape({\r\n keyFrame: PropTypes.shape({}).isRequired,\r\n }).isRequired,\r\n onSceneSelected: PropTypes.func.isRequired,\r\n selectedSceneId: PropTypes.number.isRequired,\r\n sceneId: PropTypes.number.isRequired,\r\n};\r\n\r\nexport const ScenePickerView = ({\r\n scenes, onSceneSelected, selectedSceneId,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n return (\r\n
\r\n \r\n <div className={mergeClasses(classes.sceneContainer, 'scene-container')}>\r\n {scenes.map(scene => (<Scene\r\n key={scene.id}\r\n scene={scene.effective}\r\n sceneId={scene.id}\r\n onSceneSelected={onSceneSelected}\r\n selectedSceneId={selectedSceneId}\r\n />))}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nScenePickerView.propTypes = {\r\n scenes: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n onSceneSelected: PropTypes.func.isRequired,\r\n selectedSceneId: PropTypes.number.isRequired,\r\n};\r\n\r\nScenePickerView.defaultProps = {};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Text, mergeClasses } from '@fluentui/react-components';\r\nimport { MusicNote2Filled } from '@fluentui/react-icons';\r\nimport { useStyles } from './style';\r\nimport { ScenePickerView } from './scene-picker';\r\nimport audioWaveImage from '../../media/audio-wave.svg';\r\nimport { getLocalizedAudioName } from '../audio-editor';\r\n\r\nconst TemplateContainer = ({ templateDetail, i18n, classes }) => {\r\n if (!templateDetail || !templateDetail.TemplateThumbnailUrl || !templateDetail.TemplateName) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className={mergeClasses(classes.templateContainer, 'template-container')} style={{ borderRadius: '10px' }}>\r\n <Text>{i18n.getString(_TL_('Selected Template'))}</Text>\r\n <img className={mergeClasses(classes.templateThumbnail, 'template-thumbnail')} src={templateDetail.TemplateThumbnailUrl} alt=\"template-thumbnail\" />\r\n <div className={mergeClasses(classes.templateText, 'template-metadata')}>\r\n <div>{templateDetail.LocalizedTemplateName || templateDetail.TemplateName}</div>\r\n <div>{i18n.getString(_TL_('Duration: {{seconds}} seconds'), { seconds: templateDetail.Duration })}</div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nTemplateContainer.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n template: PropTypes.shape({\r\n url: PropTypes.string.isRequired,\r\n title: PropTypes.string.isRequired,\r\n timestamp: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nconst AudioBar = ({ videoMetadata, i18n }) => {\r\n const classes = useStyles();\r\n const audio = videoMetadata.template && videoMetadata.template.audio;\r\n const audioName = audio && audio.audioName;\r\n const audioCategory = audio && audio.category;\r\n\r\n return (\r\n <div\r\n className={mergeClasses(classes.audioBar, 'audio-bar')}\r\n style={{\r\n borderRadius: '10px',\r\n overflow: 'hidden',\r\n backgroundImage: `url(${audioWaveImage}), linear-gradient(to right, rgba(0, 0, 255, 0.8), rgba(0, 0, 255, 1))`,\r\n backgroundPosition: 'center',\r\n backgroundRepeat: 'repeat-x',\r\n }}\r\n >\r\n <MusicNote2Filled fontSize={24} />\r\n <Text>{getLocalizedAudioName(audioName, i18n) || audioCategory}</Text>\r\n </div>\r\n );\r\n};\r\n\r\nAudioBar.propTypes = {\r\n videoMetadata: PropTypes.shape({\r\n audio: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nexport const StoryBoardView = ({\r\n i18n,\r\n scenes,\r\n selectedSceneId,\r\n onSceneSelected,\r\n videoMetadata,\r\n templateDetail,\r\n}) => {\r\n const classes = useStyles();\r\n\r\n return (\r\n <div className={mergeClasses(classes.storyBoardView, 'story-board')} style={{ borderRadius: '10px' }}>\r\n <TemplateContainer i18n={i18n} templateDetail={templateDetail} classes={classes} />\r\n <div className={classes.navigationContainer}>\r\n <div className={mergeClasses(classes.scenesContainer, 'scenes-container')}>\r\n <ScenePickerView scenes={scenes} onSceneSelected={onSceneSelected} selectedSceneId={selectedSceneId} />\r\n <AudioBar videoMetadata={videoMetadata} i18n={i18n} />\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nStoryBoardView.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n scenes: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\r\n selectedSceneId: PropTypes.number.isRequired,\r\n onSceneSelected: PropTypes.func.isRequired,\r\n videoMetadata: PropTypes.shape({\r\n audio: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n","import { useCallback, useEffect, useMemo, useState } from 'react';\r\nimport { isEqual, omit, some, keys } from 'underscore';\r\nimport { getParameter, getDomain } from '@bingads-webui/url-util';\r\nimport { getTextSizeLimitation, ColorTypeEnum } from './util';\r\n\r\n// for testing\r\nconst isSelenium = getParameter('isselenium');\r\nconst isLocal = getDomain(window.location.href) === 'localhost';\r\nconst mock = isSelenium === 'true' || isLocal;\r\nconst defaultColor = '#FFFFFF';\r\nconst defaultTextData = {\r\n font: 'Arial',\r\n color: defaultColor,\r\n fontWeight: 'Normal',\r\n};\r\n\r\n// mock\r\nconst mockEditResponse = {\r\n recommendationId: '14716601-9749-4fb5-a700-a00860f3a65c',\r\n url: 'https://mmastoragedev.blob.core.windows.net/testdata/mock-project-2.json',\r\n recommendationFormat: 'Clipchamp',\r\n thumbnailUrl: 'https://mmastoragedev.blob.core.windows.net/testdata/images/recommendation_test_DO_NOT_DEL/video-thumbnail.jpeg',\r\n videoMetadata: {\r\n width: 1280,\r\n height: 720,\r\n durationInMs: 15000,\r\n },\r\n template: {\r\n templateId: 'a3f900b6-942a-4b55-bb1d-87bae12229f0',\r\n audio: {\r\n category: 'Chill',\r\n fileName: 'abc.mp3',\r\n audioName: 'abc',\r\n },\r\n scenes: [\r\n {\r\n images: [\r\n 'https://mmastoragedev.blob.core.windows.net/testdata/images/recommendation_test_DO_NOT_DEL/autvideo_1.jpg',\r\n ],\r\n imageData: [\r\n {\r\n targetWidth: 720,\r\n targetHeight: 1280,\r\n itemId: 'af0d9795-2394-4e70-a366-6bf4a3fb0959',\r\n },\r\n ],\r\n text: [\r\n 'Premium Thai Food',\r\n 'Get your spice on',\r\n ],\r\n textData: [\r\n {\r\n font: 'Arial',\r\n color: '#FFFFFF',\r\n maxLength: 30,\r\n itemId: 'c77085f6-e229-4004-ab15-2c3605d5ae9a',\r\n },\r\n {\r\n font: 'Arial',\r\n color: '#FFFFFF',\r\n maxLength: 50,\r\n itemId: '0decb36c-8048-4eaa-926a-3ca71d126734',\r\n },\r\n ],\r\n logos: [\r\n 'https://mmastoragedev.blob.core.windows.net/testdata/images/recommendation_test_DO_NOT_DEL/logo.png',\r\n ],\r\n logoData: [\r\n {\r\n targetWidth: 500,\r\n targetHeight: 500,\r\n itemId: 'd4505e7a-d552-4b8a-bee6-eb390dd31d74',\r\n },\r\n ],\r\n keyFrame: {\r\n templateId: 'a3f900b6-942a-4b55-bb1d-87bae12229f0',\r\n url: 'https://mmastoragedev.blob.core.windows.net/testdata/images/recommendation_test_DO_NOT_DEL/keyframe1.png',\r\n },\r\n },\r\n ],\r\n },\r\n};\r\n\r\nconst useRecommendations = ({ copilotDataService }) => {\r\n const { editVideoAdsAssetRecommendations, fetchAssets } = copilotDataService;\r\n // const fetchEditedVideo = useMemo(() => _.memoize(_.throttle(editVideoAdsAssetRecommendations, 100)), [editVideoAdsAssetRecommendations]);\r\n\r\n const generateVideo = ({\r\n scenes, video, styles, audio,\r\n }) => {\r\n const { template } = video;\r\n const { templateId } = template;\r\n const newVideoMetaData = {\r\n template: {\r\n templateId,\r\n audio,\r\n scenes: scenes.map((scene) => {\r\n const {\r\n images, imageData, text, textData, logos, logoData,\r\n } = scene;\r\n return {\r\n images,\r\n imageData,\r\n text,\r\n textData,\r\n logos,\r\n logoData,\r\n };\r\n }),\r\n },\r\n };\r\n const ads = newVideoMetaData;\r\n return editVideoAdsAssetRecommendations(ads, false, styles)\r\n .then((res) => {\r\n if (res.data && res.data.ads && res.data.ads.length > 0) {\r\n return res.data.ads[0];\r\n }\r\n if (mock === true) {\r\n return mockEditResponse;\r\n }\r\n\r\n return res;\r\n })\r\n .catch(error => error);\r\n };\r\n\r\n return {\r\n generateVideo,\r\n fetchAssets,\r\n };\r\n};\r\n\r\nconst extractStylesFromScenes = (scenes) => {\r\n const { textData } = scenes[0].effective;\r\n const { font, color, fontWeight } = textData && textData.length > 0 ? textData[0] : defaultTextData;\r\n return {\r\n font,\r\n color,\r\n fontWeight,\r\n };\r\n};\r\n\r\n// even the same scene, the keyFrame url could be different.\r\nconst isEqualScene = (scene1, scene2) => isEqual(omit(scene1, 'keyFrame'), omit(scene2, 'keyFrame'));\r\nconst isSceneChanged = scene => (scene.effective ? !isEqualScene(scene.updating, scene.effective) : !isEqualScene(scene.original, scene.updating));\r\nconst isVideoChanged = scenes => scenes.some(scene => isSceneChanged(scene));\r\n\r\n// For the scene related state, we could save them into a single scene object, and then use the id to locate the scene object.\r\n// Text, Image, KeyFrame are the main scene properties that could be changed. (KeyFrame is from the API call. Text and Image are also included in the API calls.)\r\n// Original, Updating and Effective are for checking if the scene has been changed.\r\n// For the video, we could save the video URL and it's related scenes.\r\n// To check if the video could be generated, we could check if the scenes have been changed.\r\n// If the scenes have been changed, we could generate the video.\r\n// If the scenes are not changed, we could apply the video and it's related scenes (if we want to save the metadata).\r\n\r\n// videoMetaData is the original video.\r\nexport const useEditVideoAdsViewState = ({\r\n videoMetaData,\r\n copilotDataService,\r\n logger,\r\n i18n,\r\n isCTV,\r\n brandKit,\r\n finalUrl,\r\n activity,\r\n showVideoTemplateSummaryBarControl,\r\n}) => {\r\n const {\r\n generateVideo,\r\n fetchAssets,\r\n } = useRecommendations({\r\n copilotDataService,\r\n });\r\n\r\n const [scenes, setScenes] = useState([]);\r\n const [selectedSceneId, setSelectedSceneId] = useState(0); // Used to locate the scene with id\r\n const [video, setVideo] = useState({});\r\n const [audioState, setAudioState] = useState({});\r\n const [fontsState, setFontsState] = useState([]);\r\n const [palettesState, setPalettesState] = useState([]);\r\n const [videoUrl, setVideoUrl] = useState(videoMetaData && videoMetaData.url);\r\n const [videoSettings, setVideoSettings] = useState({}); // Used to store the video settings [logo, businessName]\r\n const [isGeneratingVideo, setIsGeneratingVideo] = useState(false);\r\n const [generateError, setGenerateError] = useState(undefined); // Used to show the error message\r\n const [recommendedAssets, setRecommendedAssets] = useState([]);\r\n const [isLoadingRecommendedAssets, setIsLoadingRecommendedAssets] = useState(false);\r\n const [copilotRecommendedAssets, setCopilotRecommendedAssets] = useState(null);\r\n\r\n // Update current state with response from AIGC\r\n const updateStateFromFetchResponse = useCallback((response) => {\r\n // initialization from the video metadata\r\n const {\r\n scenes: scenesInner = [], businessName, audio, backgroundColor,\r\n } = response && response.template;\r\n const scenesWithIds = scenesInner.map((scene, index) => ({\r\n original: (scene.original ? scene.original : scene), // Original won't be overridden by updates\r\n updating: scene, // Used to keep track of the scene changes (the react view will modify this part)\r\n effective: scene, // Assume, we've already generated the scene\r\n id: index,\r\n newImages: (scene.images ? scene.images.map(imageUrl => ({ url: imageUrl, id: '' })) : []),\r\n newLogos: (scene.logos ? scene.logos.map(logoUrl => ({ url: logoUrl, id: '' })) : []),\r\n }));\r\n\r\n setScenes(scenesWithIds);\r\n setVideoUrl(response.url || response.src);\r\n setVideo({\r\n ...response,\r\n });\r\n setAudioState({\r\n original: audio,\r\n updating: audio,\r\n effective: audio,\r\n });\r\n const { font, color, fontWeight } = extractStylesFromScenes(scenesWithIds);\r\n const fonts = { font, fontWeight };\r\n setFontsState({\r\n original: fonts,\r\n updating: fonts,\r\n effective: fonts,\r\n });\r\n\r\n const palettes = [\r\n { Name: ColorTypeEnum.TextColor, HexCode: (color || defaultColor) },\r\n { Name: ColorTypeEnum.BackgroundColor, HexCode: ((backgroundColor && backgroundColor.color) || defaultColor) },\r\n ];\r\n const filteredPalettes = palettes.filter(c => c.HexCode);\r\n\r\n setPalettesState({\r\n original: filteredPalettes,\r\n updating: filteredPalettes,\r\n effective: filteredPalettes,\r\n });\r\n const videoSettingsInner = {\r\n businessName,\r\n };\r\n setVideoSettings({\r\n original: videoSettingsInner,\r\n updating: videoSettingsInner,\r\n effective: videoSettingsInner,\r\n });\r\n\r\n // fetch recommended assets\r\n if (finalUrl) {\r\n setIsLoadingRecommendedAssets(true);\r\n fetchAssets().then((res) => {\r\n if (res && res.RecommendedAssets) {\r\n const { RecommendedAssets, Logo } = res;\r\n const assetsObj = { ...RecommendedAssets, Logo: Logo || '' };\r\n setRecommendedAssets(assetsObj);\r\n setCopilotRecommendedAssets(res);\r\n setIsLoadingRecommendedAssets(false);\r\n }\r\n }).catch((error) => {\r\n logger.logTrace('Error while fetch video editor recommendations', error);\r\n })\r\n .finally(() => setIsLoadingRecommendedAssets(false));\r\n }\r\n }, [fetchAssets, finalUrl, logger]);\r\n\r\n useEffect(() => {\r\n if (videoMetaData) {\r\n updateStateFromFetchResponse(videoMetaData);\r\n if (isCTV) {\r\n logger.logTrace('CTV Copilot video editor: editor panel opened');\r\n } else {\r\n logger.logTrace('OLV Copilot video editor: editor panel opened');\r\n }\r\n }\r\n }, [logger, videoMetaData, isCTV, updateStateFromFetchResponse]);\r\n\r\n const createStylesRequestObject = useCallback(() => {\r\n // const { textColor, backgroundColor } = (palettesState && palettesState.updating) || {};\r\n const colorProperties = palettesState && palettesState.updating.reduce((acc, color) => {\r\n acc[color.Name] = color;\r\n return acc;\r\n }, {});\r\n const { textColor, backgroundColor } = colorProperties || {};\r\n const { font, fontWeight } = (fontsState && fontsState.updating) || {};\r\n const palettes = [{ colorType: textColor.Name, colors: [textColor.HexCode] }, { colorType: backgroundColor.Name, colors: [backgroundColor.HexCode] }];\r\n const fonts = [{ type: font, weight: fontWeight }];\r\n return { palettes, fonts };\r\n }, [palettesState, fontsState]);\r\n\r\n const generateNewVideo = useCallback((scenesInCall) => {\r\n setGenerateError(undefined);\r\n setIsGeneratingVideo(true);\r\n\r\n const styles = createStylesRequestObject();\r\n const audio = (audioState && audioState.updating) || {};\r\n\r\n return generateVideo({\r\n scenes: scenesInCall.map(scene => scene.updating), video, styles, audio,\r\n }).then((newVideoMetaData) => {\r\n updateStateFromFetchResponse(newVideoMetaData);\r\n if (isCTV) {\r\n logger.logTrace('CTV Copilot video editor: video generated');\r\n } else {\r\n logger.logTrace('OLV Copilot video editor: video generated');\r\n }\r\n\r\n if (activity && activity.signal) {\r\n const message = `[VideoAdsEditor] - Edit Video - Generate - TemplateId:${videoMetaData.template.templateId}, AdStudio:${showVideoTemplateSummaryBarControl}`;\r\n activity.signal(message);\r\n }\r\n\r\n return {\r\n ...newVideoMetaData,\r\n scenes,\r\n msg: 'success',\r\n };\r\n }).catch((error) => {\r\n const { errors } = error;\r\n if (errors && errors[0] && errors[0].message) {\r\n setGenerateError(errors[0].message);\r\n } else {\r\n setGenerateError(i18n.getString(_TL_('Copilot has failed to generate a new video. Please try again later.')));\r\n }\r\n return {\r\n msg: 'failed',\r\n };\r\n })\r\n .finally(() => {\r\n setIsGeneratingVideo(false);\r\n });\r\n }, [generateVideo, video, logger, i18n, createStylesRequestObject, audioState, isCTV, scenes, updateStateFromFetchResponse]);\r\n\r\n const selectedScene = useMemo(() => scenes && scenes.find(scene => scene.id === selectedSceneId), [scenes, selectedSceneId]) || {\r\n original: {},\r\n updating: {},\r\n effective: {},\r\n id: -1,\r\n };\r\n\r\n const onSceneSelected = useCallback((scene) => {\r\n setSelectedSceneId(scene.id);\r\n }, []);\r\n\r\n const onScenesUpdated = useCallback((updatedScenes) => {\r\n setScenes(updatedScenes);\r\n }, []);\r\n\r\n const onFontsUpdated = useCallback((updatedFonts) => {\r\n setFontsState(updatedFonts);\r\n }, []);\r\n\r\n const onPalettesUpdated = useCallback((hex, colorType) => {\r\n setPalettesState((prevState) => {\r\n const newState = { ...prevState };\r\n const index = newState.updating.findIndex(c => c.Name === colorType);\r\n if (index !== -1) {\r\n newState.updating[index].HexCode = hex;\r\n }\r\n return newState;\r\n });\r\n }, []);\r\n\r\n const handleGenerateVideo = useCallback(() => {\r\n generateNewVideo(scenes);\r\n }, [generateNewVideo, scenes]);\r\n\r\n const handleGenerate = useCallback(() => {\r\n logger.logTrace('Copilot video editor: generate button clicked');\r\n handleGenerateVideo();\r\n }, [logger, handleGenerateVideo]);\r\n\r\n const textErrorMessages = useMemo(() => {\r\n const errorMessages = {};\r\n scenes.forEach((scene) => {\r\n errorMessages[scene.id] = [];\r\n const updatingText = scene.updating.text;\r\n const maxLengthOfText = getTextSizeLimitation(scene.updating.keyFrame.templateId);\r\n updatingText.forEach((text, index) => {\r\n if (text.length > maxLengthOfText[index]) {\r\n errorMessages[scene.id].push(i18n.getString(_TL_('Value cannot be longer than {{maxLength}} characters'), { maxLength: maxLengthOfText[index] }));\r\n } else if (text.length === 0) {\r\n errorMessages[scene.id].push(i18n.getString(_TL_('Required field')));\r\n } else {\r\n errorMessages[scene.id].push('');\r\n }\r\n });\r\n });\r\n\r\n return errorMessages;\r\n }, [i18n, scenes]);\r\n\r\n const haveTextError = useMemo(() => {\r\n const haveErrorInScenes = [];\r\n if (textErrorMessages) {\r\n keys(textErrorMessages).forEach((key) => {\r\n haveErrorInScenes.push(some(textErrorMessages[key]));\r\n });\r\n }\r\n return some(haveErrorInScenes);\r\n }, [textErrorMessages]);\r\n\r\n const textErrorForSelectedScene = useMemo(() => textErrorMessages[selectedSceneId], [selectedSceneId, textErrorMessages]);\r\n\r\n const onImageUpdated = useCallback((images) => {\r\n setScenes(prevScenes => prevScenes.map((scene) => {\r\n if (scene.id === selectedSceneId) {\r\n return {\r\n ...scene,\r\n updating: {\r\n ...scene.updating,\r\n images: images.map(image => image.url),\r\n },\r\n newImages: images,\r\n };\r\n }\r\n return scene;\r\n }));\r\n }, [selectedSceneId]);\r\n\r\n const onLogoUpdated = useCallback((logos) => {\r\n setScenes(prevScenes => prevScenes.map((scene) => {\r\n if (scene.id === selectedSceneId) {\r\n return {\r\n ...scene,\r\n updating: {\r\n ...scene.updating,\r\n logos: logos.map(logo => logo.url),\r\n },\r\n newLogos: logos,\r\n };\r\n }\r\n return scene;\r\n }));\r\n }, [selectedSceneId]);\r\n\r\n const disableGenerate = useMemo(() =>\r\n isGeneratingVideo\r\n || !(isVideoChanged(scenes, videoSettings))\r\n || haveTextError, [haveTextError, isGeneratingVideo, scenes, videoSettings]);\r\n\r\n return {\r\n video,\r\n setVideo,\r\n selectedSceneId,\r\n setSelectedSceneId,\r\n scenes,\r\n onSceneSelected,\r\n setScenes,\r\n selectedScene,\r\n onImageUpdated,\r\n onLogoUpdated,\r\n onScenesUpdated,\r\n onFontsUpdated,\r\n onPalettesUpdated,\r\n disableGenerate,\r\n isGeneratingVideo,\r\n handleGenerate,\r\n generateError,\r\n setGenerateError,\r\n textErrorForSelectedScene,\r\n videoSettings,\r\n setVideoSettings,\r\n brandKit,\r\n palettesState,\r\n fontsState,\r\n audioState,\r\n setAudioState,\r\n recommendedAssets,\r\n isLoadingRecommendedAssets,\r\n videoUrl,\r\n copilotRecommendedAssets,\r\n };\r\n};\r\n","import React, { useMemo, useCallback, useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { mergeClasses, FluentProvider, webLightTheme, Button } from '@fluentui/react-components';\r\nimport { Overlay, MessageBar, MessageBarType } from '@bingads-webui-react/fabric-control';\r\nimport { Dismiss24Regular, VideoRegular, Send16Regular, ChevronLeftRegular, ChevronRightRegular } from '@fluentui/react-icons';\r\nimport {\r\n DrawerBody,\r\n DrawerHeader,\r\n DrawerHeaderTitle,\r\n Drawer,\r\n DrawerFooter,\r\n} from '@fluentui/react-drawer';\r\nimport { AssetLibrarySpinner } from '@bingads-webui-campaign-react/asset-library-spinner';\r\nimport { PreviewClipchampVideoModal } from '@bingads-webui-campaign-react/clipchamp-player';\r\nimport { useRecommendations } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\n\r\nimport { VideoTemplateSummaryBarControl } from '../components/video-template-summary-bar-control';\r\nimport { useStyles } from './style';\r\nimport { EditVideoNavigationView } from '../navigation-view';\r\nimport { EditVideoAssetsView } from './assets-editor';\r\nimport { EditVideoStyleView } from './style-editor';\r\nimport { EditVideoAudioView } from './audio-editor';\r\nimport { ScenePreview } from './scene-preview';\r\nimport { StoryBoardView } from './story-board';\r\nimport { ViewName } from '../util';\r\nimport { useNavigationState } from '../use-navigation-state';\r\nimport { useEditVideoAdsViewState } from '../state';\r\n\r\nexport const EditVideoPageComponent = ({\r\n i18n,\r\n isOpen,\r\n setIsOpen,\r\n videoMetaData,\r\n cid,\r\n aid,\r\n oDataConfig,\r\n finalUrl,\r\n activity,\r\n copilotDataService,\r\n onChangeImage,\r\n onChangeLogo,\r\n logger,\r\n isCTV,\r\n preferenceService,\r\n serverContext,\r\n perfMarker,\r\n isDialog,\r\n permissions,\r\n loadClipchampPlayer,\r\n brandKit,\r\n templateDetail,\r\n isLoadingBrandKit,\r\n onApply,\r\n instrumentation,\r\n showVideoTemplateSummaryBarControl,\r\n rawAudioList,\r\n}) => {\r\n const classes = useStyles();\r\n const { currentView, setCurrentView } = useNavigationState();\r\n const [showPreviewVideoModal, setShowPreviewVideoModal] = useState(false);\r\n const ref = React.useRef(null);\r\n const noBorderStyle = {\r\n border: 'none',\r\n outline: 'none',\r\n };\r\n\r\n const {\r\n handleCopilotBannerFetchSucceeded,\r\n } = useRecommendations({\r\n cid,\r\n aid,\r\n campaignId: -1,\r\n permissions,\r\n finalUrl,\r\n isDisplayPlus: false,\r\n enableCopilotRecommendations: true,\r\n instrumentation,\r\n isMMA: false,\r\n isSignup: false,\r\n skipBusinessNameRecommendation: true,\r\n });\r\n\r\n const {\r\n selectedSceneId,\r\n onSceneSelected,\r\n scenes,\r\n onImageUpdated,\r\n onLogoUpdated,\r\n onScenesUpdated,\r\n onFontsUpdated,\r\n onPalettesUpdated,\r\n video,\r\n videoSettings,\r\n isGeneratingVideo,\r\n setVideoSettings,\r\n fontsState,\r\n palettesState,\r\n audioState,\r\n setAudioState,\r\n handleGenerate,\r\n recommendedAssets,\r\n isLoadingRecommendedAssets,\r\n generateError,\r\n setGenerateError,\r\n videoUrl,\r\n copilotRecommendedAssets,\r\n } = useEditVideoAdsViewState({\r\n onApply,\r\n videoMetaData,\r\n copilotDataService,\r\n logger,\r\n i18n,\r\n isCTV,\r\n finalUrl,\r\n handleCopilotBannerFetchSucceeded,\r\n activity,\r\n showVideoTemplateSummaryBarControl,\r\n });\r\n\r\n useEffect(() => {\r\n const parentContainer = ref && ref.current && ref.current.parentElement;\r\n if (parentContainer) {\r\n parentContainer.style.zIndex = '1000';\r\n }\r\n }, [ref]);\r\n\r\n const onHandleApply = useCallback(() => {\r\n const newVideo = { ...videoMetaData, ...video };\r\n newVideo.src = video.url || videoMetaData.src;\r\n onApply(newVideo);\r\n setIsOpen(false);\r\n if (activity && activity.signal) {\r\n const message = `[VideoAdsEditor] - Edit Video - Save - TemplateId:${videoMetaData.template.templateId}, AdStudio:${showVideoTemplateSummaryBarControl}`;\r\n activity.signal(message);\r\n }\r\n }, [onApply, setIsOpen, videoMetaData, video, activity, showVideoTemplateSummaryBarControl]);\r\n\r\n const handleTextListChange = useCallback((textList) => {\r\n const updatedScenes = scenes.map((scene) => {\r\n if (scene.id === selectedSceneId) {\r\n return {\r\n ...scene,\r\n updating: {\r\n ...scene.updating,\r\n text: textList,\r\n },\r\n };\r\n }\r\n return scene;\r\n });\r\n onScenesUpdated(updatedScenes);\r\n }, [scenes, selectedSceneId, onScenesUpdated]);\r\n\r\n const deepClone = useCallback((cloneIt) => {\r\n if (cloneIt === null || typeof cloneIt !== 'object') return cloneIt;\r\n if (Array.isArray(cloneIt)) {\r\n return cloneIt.map(item => deepClone(item));\r\n }\r\n\r\n const result = {};\r\n Object.keys(cloneIt).forEach(key => {\r\n result[key] = deepClone(cloneIt[key]);\r\n });\r\n\r\n return result;\r\n });\r\n\r\n useEffect(() => {\r\n if (videoMetaData && videoMetaData.template && videoMetaData.template.scenes && videoMetaData.template.scenes.length > selectedSceneId) {\r\n const scene = videoMetaData.template.scenes[selectedSceneId];\r\n if (scene && scene.textData && scene.textData.length > 0 && finalUrl && copilotRecommendedAssets) {\r\n const selectedSceneTextData = scene.textData;\r\n const textData = selectedSceneTextData && selectedSceneTextData[0];\r\n const shortHeadlines = copilotRecommendedAssets.RecommendedAssets && copilotRecommendedAssets.RecommendedAssets.ShortHeadlines;\r\n\r\n if (textData && textData.maxLength > 0 && shortHeadlines) {\r\n const cloneCopilotRecommendedAssets = deepClone(copilotRecommendedAssets);\r\n const newTheme = cloneCopilotRecommendedAssets.RecommendedAssets.Themes.map(item => {\r\n if (item.ShortHeadlines) {\r\n // eslint-disable-next-line no-param-reassign\r\n item.ShortHeadlines = item.ShortHeadlines.filter(shortHeadline => shortHeadline.Text.length <= textData.maxLength);\r\n }\r\n return item;\r\n });\r\n\r\n const filteredRecommendations = {\r\n RecommendedAssets: cloneCopilotRecommendedAssets.RecommendedAssets,\r\n Logo: cloneCopilotRecommendedAssets.Logo,\r\n Cta: cloneCopilotRecommendedAssets.Cta,\r\n IsCustomerIdInExclusionList: cloneCopilotRecommendedAssets.IsCustomerIdInExclusionList,\r\n };\r\n\r\n filteredRecommendations.RecommendedAssets.ShortHeadlines = shortHeadlines.filter(item => item.Text.length <= textData.maxLength);\r\n filteredRecommendations.RecommendedAssets.Themes = newTheme;\r\n\r\n handleCopilotBannerFetchSucceeded(finalUrl, filteredRecommendations);\r\n }\r\n }\r\n }\r\n }, [videoMetaData, selectedSceneId, copilotRecommendedAssets, finalUrl, handleCopilotBannerFetchSucceeded]);\r\n\r\n\r\n const onCloseVideoPreview = useCallback(() => {\r\n setShowPreviewVideoModal(false);\r\n }, [setShowPreviewVideoModal]);\r\n\r\n const handleSelectNextScene = useCallback(() => {\r\n const selectedScene = scenes[selectedSceneId + 1];\r\n onSceneSelected(selectedScene);\r\n }, [onSceneSelected, selectedSceneId, scenes]);\r\n\r\n const handleSelectPreviousScene = useCallback(() => {\r\n const selectedScene = scenes[selectedSceneId - 1];\r\n onSceneSelected(selectedScene);\r\n }, [onSceneSelected, selectedSceneId, scenes]);\r\n\r\n const isPreviousDisabled = useMemo(() => selectedSceneId <= 0, [selectedSceneId]);\r\n const isNextDisabled = useMemo(() => selectedSceneId >= scenes.length - 1, [scenes, selectedSceneId]);\r\n\r\n const VideoEditContent = useMemo(() => (\r\n <FluentProvider theme={webLightTheme} style={{ height: '100%' }}>\r\n <div className={classes.containerWrapper}>\r\n {isGeneratingVideo && (\r\n <Overlay styles={{ root: { zIndex: 1 } }}>\r\n <AssetLibrarySpinner className=\"page-load-spinner\" useCustomSize />\r\n </Overlay>\r\n )}\r\n {videoMetaData && videoMetaData.template && (\r\n <div className={mergeClasses('edit-video-page-container', classes.editVideoPage, 'edit-video-page', classes.containerWrapper)}>\r\n {showPreviewVideoModal && <PreviewClipchampVideoModal\r\n videoUrl={videoUrl}\r\n show={showPreviewVideoModal}\r\n onClose={onCloseVideoPreview}\r\n i18n={i18n}\r\n logger={logger}\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n />}\r\n {showVideoTemplateSummaryBarControl && (<VideoTemplateSummaryBarControl\r\n i18n={i18n}\r\n videoUrl={videoUrl}\r\n showPreviewVideoModal={showPreviewVideoModal}\r\n setShowPreviewVideoModal={setShowPreviewVideoModal}\r\n onSaveVideo={onHandleApply}\r\n metadata={videoMetaData}\r\n activity={activity}\r\n />\r\n )}\r\n <div className={mergeClasses(classes.navigationView, 'navigation-view')} >\r\n <EditVideoNavigationView\r\n i18n={i18n}\r\n currentView={currentView}\r\n setCurrentView={setCurrentView}\r\n />\r\n </div>\r\n <div className={mergeClasses('edit-video-actions-wrapper', classes.actionsWrapper)} style={{ borderRadius: '10px' }}>\r\n {currentView === ViewName.AssetsView && (\r\n <div className={classes.topNavigationParent}>\r\n <div className={classes.topNavigationLeft}>{i18n.getString(_TL_('Edit scene '))}{selectedSceneId + 1}{i18n.getString(_TL_(' of '))}{scenes.length}</div>\r\n <div className={classes.topNavigationRight}>\r\n <Button\r\n className=\"previous-scene-button\"\r\n icon={<ChevronLeftRegular />}\r\n disabled={isPreviousDisabled}\r\n onClick={handleSelectPreviousScene}\r\n style={noBorderStyle}\r\n />\r\n <Button\r\n className=\"next-scene-button\"\r\n icon={<ChevronRightRegular />}\r\n disabled={isNextDisabled}\r\n onClick={handleSelectNextScene}\r\n style={noBorderStyle}\r\n />\r\n </div>\r\n </div>\r\n )}\r\n <div className={mergeClasses('edit-video-actions-wrapper', classes.actionsWrapperContent)}>\r\n <div>\r\n {\r\n currentView === ViewName.AssetsView &&\r\n <EditVideoAssetsView\r\n i18n={i18n}\r\n aid={aid}\r\n cid={cid}\r\n oDataConfig={oDataConfig}\r\n onTextListChange={handleTextListChange}\r\n onChangeImage={onChangeImage}\r\n setVideoSettings={setVideoSettings}\r\n scenes={scenes}\r\n selectedSceneId={selectedSceneId}\r\n onSceneSelected={onSceneSelected}\r\n onImageUpdated={onImageUpdated}\r\n onLogoUpdated={onLogoUpdated}\r\n videoSettings={videoSettings}\r\n onChangeLogo={onChangeLogo}\r\n preferenceService={preferenceService}\r\n serverContext={serverContext}\r\n perfMarker={perfMarker}\r\n permissions={permissions}\r\n recommendedAssets={recommendedAssets}\r\n isLoadingRecommendedAssets={isLoadingRecommendedAssets}\r\n brandKit={brandKit}\r\n isLoadingBrandKit={isLoadingBrandKit}\r\n finalUrl={finalUrl}\r\n />\r\n }\r\n {\r\n currentView === ViewName.StyleView &&\r\n <EditVideoStyleView\r\n i18n={i18n}\r\n fontsState={fontsState}\r\n onFontsUpdated={onFontsUpdated}\r\n palettesState={palettesState}\r\n onPalettesUpdated={onPalettesUpdated}\r\n brandKit={brandKit}\r\n />\r\n }\r\n {\r\n currentView === ViewName.AudioView &&\r\n <EditVideoAudioView\r\n i18n={i18n}\r\n audioState={audioState}\r\n setAudioState={setAudioState}\r\n rawAudioList={rawAudioList}\r\n />\r\n }\r\n <div className={mergeClasses(classes.generateButtonContainer, 'generate-video-button-container')}>\r\n <Button\r\n icon={<Send16Regular />}\r\n appearance=\"secondary\"\r\n onClick={handleGenerate}\r\n className={mergeClasses(classes.generateButton, 'generate-video-button')}\r\n >\r\n {i18n.getString(_TL_('View updated scenes'))}\r\n </Button>\r\n </div>\r\n <div className=\"message-bar\">\r\n {\r\n generateError &&\r\n <MessageBar\r\n messageBarType={MessageBarType.error}\r\n isMultiline\r\n onDismiss={() => setGenerateError(undefined)}\r\n dismissButtonAriaLabel=\"Close\"\r\n >\r\n {generateError}\r\n </MessageBar>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div className={mergeClasses(classes.previewContainer, 'edit-video-page-preview-container')}>\r\n <div className={mergeClasses(classes.scenePreview, 'edit-video-page-preview', classes.containerWrapper)}>\r\n <ScenePreview\r\n selectedSceneId={selectedSceneId}\r\n scenes={scenes}\r\n />\r\n </div>\r\n <div className={mergeClasses(classes.storyBoardContainer, 'edit-video-page-storyboard-container')}>\r\n <StoryBoardView\r\n i18n={i18n}\r\n scenes={scenes}\r\n selectedSceneId={selectedSceneId}\r\n onSceneSelected={onSceneSelected}\r\n videoMetadata={video}\r\n templateDetail={templateDetail}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n {\r\n !isGeneratingVideo && (!videoMetaData || !videoMetaData.template) &&\r\n <div>\r\n <div className=\"message-bar\">\r\n <MessageBar messageBarType={MessageBarType.error} >\r\n {i18n.getString(_TL_('An error occured while loading the video.'))}\r\n </MessageBar>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </FluentProvider>\r\n ), [permissions, isGeneratingVideo, classes, aid, cid, i18n, oDataConfig, onChangeImage, onChangeLogo, onSceneSelected, preferenceService, perfMarker, selectedSceneId, scenes, currentView, serverContext, setCurrentView, video, videoSettings, fontsState, palettesState, onFontsUpdated, onPalettesUpdated, audioState, setAudioState, handleGenerate, onImageUpdated, onLogoUpdated, setVideoSettings, handleTextListChange, recommendedAssets, isLoadingRecommendedAssets, brandKit, isLoadingBrandKit]);\r\n\r\n return (\r\n isDialog ? (\r\n <div>\r\n <Drawer\r\n type=\"overlay\"\r\n modalType=\"modal\"\r\n open={isOpen}\r\n position=\"end\"\r\n size=\"large\"\r\n ref={ref}\r\n separator\r\n className={mergeClasses('video-ads-editor-panel', classes.videoEditor)}\r\n >\r\n <DrawerHeader>\r\n <DrawerHeaderTitle\r\n action={\r\n <Button\r\n appearance=\"subtle\"\r\n aria-label={i18n.getString(_TL_('Close'))}\r\n icon={<Dismiss24Regular />}\r\n onClick={() => setIsOpen(false)}\r\n />\r\n }\r\n >\r\n {i18n.getString(_TL_('Edit your video'))}\r\n </DrawerHeaderTitle>\r\n </DrawerHeader>\r\n <DrawerBody\r\n styles={{\r\n root: {\r\n paddingLeft: '0px',\r\n paddingRight: '0px',\r\n },\r\n }}\r\n >\r\n <div className={mergeClasses(classes.leftPanelTop, classes.containerWrapper)}>\r\n {VideoEditContent}\r\n </div>\r\n </DrawerBody>\r\n <DrawerFooter>\r\n <div className={classNames(classes.bottom, 'view-bottom')}>\r\n <div className=\"button-container\">\r\n <Button\r\n appearance=\"primary\"\r\n className=\"apply-button\"\r\n onClick={onHandleApply}\r\n >\r\n {i18n.getString(_TL_('Apply'))}\r\n </Button>\r\n <Button\r\n className=\"cancel-button\"\r\n onClick={() => {\r\n setIsOpen(false);\r\n logger.logTrace('Copilot video editor: Cancel button clicked');\r\n }}\r\n >\r\n {i18n.getString(_TL_('Cancel'))}\r\n </Button>\r\n <Button\r\n icon={<VideoRegular />}\r\n className=\"preview-button\"\r\n onClick={() => {\r\n setShowPreviewVideoModal(true);\r\n if (activity && activity.signal) {\r\n const message = `[VideoAdsEditor] - Edit Video - Preview - TemplateId:${videoMetaData.template.templateId}, AdStudio:${showVideoTemplateSummaryBarControl}`;\r\n activity.signal(message);\r\n }\r\n }}\r\n >\r\n {i18n.getString(_TL_('Preview video'))}\r\n </Button>\r\n </div>\r\n </div>\r\n </DrawerFooter>\r\n </Drawer>\r\n </div >\r\n ) : (\r\n <div className={classes.containerWrapper}>\r\n {VideoEditContent}\r\n </div>\r\n )\r\n );\r\n};\r\n\r\nEditVideoPageComponent.propTypes = {\r\n i18n: PropTypes.shape({}).isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n setIsOpen: PropTypes.func.isRequired,\r\n videoMetaData: PropTypes.shape({\r\n images: PropTypes.arrayOf(PropTypes.string),\r\n text: PropTypes.arrayOf(PropTypes.string),\r\n }).isRequired,\r\n cid: PropTypes.string.isRequired,\r\n aid: PropTypes.string.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n finalUrl: PropTypes.string.isRequired,\r\n activity: PropTypes.shape({\r\n signal: PropTypes.func,\r\n }).isRequired,\r\n onChangeImage: PropTypes.func.isRequired,\r\n onChangeLogo: PropTypes.func.isRequired,\r\n logger: PropTypes.shape({\r\n logTrace: PropTypes.func.isRequired,\r\n }).isRequired,\r\n dataService: PropTypes.shape({}).isRequired,\r\n copilotDataService: PropTypes.shape({}).isRequired,\r\n isCTV: PropTypes.bool,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n serverContext: PropTypes.shape({}).isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n isDialog: PropTypes.bool,\r\n permissions: PropTypes.shape({}).isRequired,\r\n loadClipchampPlayer: PropTypes.func.isRequired,\r\n brandKit: PropTypes.shape({\r\n palettes: PropTypes.arrayOf(PropTypes.shape({\r\n Name: PropTypes.string,\r\n HexCode: PropTypes.string,\r\n isBrandKitColor: PropTypes.bool,\r\n })),\r\n }).isRequired,\r\n templateDetail: PropTypes.shape({\r\n templateId: PropTypes.string,\r\n templateName: PropTypes.string,\r\n }).isRequired,\r\n isLoadingBrandKit: PropTypes.bool.isRequired,\r\n onApply: PropTypes.func.isRequired,\r\n instrumentation: PropTypes.shape({}).isRequired,\r\n showVideoTemplateSummaryBarControl: PropTypes.bool.isRequired,\r\n};\r\n\r\nEditVideoPageComponent.defaultProps = {\r\n isCTV: false,\r\n isDialog: false,\r\n};\r\n","import { useState } from 'react';\r\nimport { ViewName } from './util';\r\n\r\n\r\nexport const useNavigationState = () => {\r\n const [currentView, setCurrentView] = useState(ViewName.AssetsView);\r\n\r\n return {\r\n currentView,\r\n setCurrentView,\r\n };\r\n};\r\n","import { extensionEditorStyles } from '@bingads-webui-campaign-react/common-styles';\r\n\r\nexport const getGlobalLogoPickerStyles = (_, { palette = {} }) => ({\r\n '@global': {\r\n ...extensionEditorStyles({ palette }),\r\n },\r\n});\r\n","/* eslint-disable no-param-reassign */\r\nimport React, { useState, useEffect, useCallback, useContext } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getImageValidationErrorMessage } from '@bingads-webui-campaign/image-experience-utils';\r\nimport { useBrandKitService } from '@bingads-webui-campaign-react/brandkit-data-service';\r\nimport { useCopilotRepositoryContext } from '@bingads-webui/inline-copilot';\r\nimport { withCopilotDomainDataService } from '@bingads-webui-campaign-react/copilot-domain-data-service';\r\nimport { withRecommendationContext } from '@bingads-webui-campaign-react/perf-max-recommendation';\r\nimport { withInstrumentation, InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { withLoggingContext } from '@bingads-webui-campaign-react/copilot-loggers';\r\nimport { EditVideoPageComponent } from './video-template-editor';\r\nimport { getGlobalLogoPickerStyles } from './styles';\r\n\r\nexport const VideoTemplateEditorWithAddImageWrapperImp = ({\r\n assetLibraryConfig,\r\n activity,\r\n i18n,\r\n logger,\r\n assetLibraryUserPreferences,\r\n assetLibraryAccountPreferences,\r\n ianaTimeZone,\r\n onApply,\r\n isOpen,\r\n setIsOpen,\r\n videoMetaData,\r\n cid,\r\n aid,\r\n oDataConfig,\r\n finalUrl,\r\n isCTV,\r\n preferenceService,\r\n serverContext,\r\n isDialog,\r\n permissions,\r\n loadClipchampPlayer,\r\n copilotDomainDataService,\r\n showVideoTemplateSummaryBarControl,\r\n ...rest\r\n}) => {\r\n const [, setShowAddImagePanel] = useState(false);\r\n const [, setMinSizeOfImage] = useState([0, 0]);\r\n const [, setShowAddLogoPanel] = useState(false);\r\n const [brandKit, setBrandKit] = useState({});\r\n const [isLoadingBrandKit, setIsLoadingBrandKit] = useState(false);\r\n const [templateDetail, setTemplateDetail] = useState(null);\r\n const [rawAudioList, setRawAudioList] = useState([]);\r\n const instrumentation = useContext(InstrumentationContext);\r\n\r\n assetLibraryConfig.assetLibraryUserPreferences = assetLibraryUserPreferences;\r\n assetLibraryConfig.assetLibraryAccountPreferences = assetLibraryAccountPreferences;\r\n assetLibraryConfig.logger = logger;\r\n assetLibraryConfig.ianaTimeZone = ianaTimeZone;\r\n assetLibraryConfig.onImageAddError = (e) => {\r\n const errorCode = e && e.errors && e.errors[0] && e.errors[0].Code;\r\n const errorMessage = getImageValidationErrorMessage({ message: errorCode }, i18n);\r\n return errorMessage;\r\n };\r\n\r\n const copilotDataService = useCopilotRepositoryContext();\r\n const { brandKitDataService } = useBrandKitService();\r\n const { getBrandKits } = brandKitDataService;\r\n\r\n // Fetch BrandKits\r\n const fetchBrandKits = useCallback(async () => {\r\n if (getBrandKits) {\r\n setIsLoadingBrandKit(true);\r\n const { response } = await getBrandKits(aid);\r\n if (Array.isArray(response) && response.length > 0) {\r\n setBrandKit(response[0]);\r\n }\r\n setIsLoadingBrandKit(false);\r\n }\r\n }, [aid, getBrandKits]);\r\n\r\n const fetchTemplateDetails = useCallback(async () => {\r\n if (copilotDomainDataService && videoMetaData && videoMetaData.template.templateId) {\r\n try {\r\n const templateFilter = {\r\n TemplateIds: [videoMetaData.template.templateId],\r\n };\r\n const { response } = await copilotDomainDataService.getVideoTemplates(templateFilter, i18n);\r\n setTemplateDetail((response && response.Templates && response.Templates.length > 0 ? response.Templates[0] : null));\r\n } catch (error) {\r\n setTemplateDetail(null);\r\n }\r\n }\r\n }, [copilotDomainDataService, videoMetaData, i18n]);\r\n\r\n const fetchAudioList = useCallback(async () => {\r\n const { response, error } = await copilotDomainDataService.getAudioList();\r\n if (error) {\r\n setRawAudioList([]);\r\n return;\r\n }\r\n\r\n setRawAudioList(response);\r\n }, [copilotDomainDataService]);\r\n\r\n useEffect(() => {\r\n fetchAudioList();\r\n }, [fetchAudioList]);\r\n\r\n useEffect(() => {\r\n fetchBrandKits();\r\n }, [fetchBrandKits]);\r\n\r\n useEffect(() => {\r\n fetchTemplateDetails();\r\n }, [fetchTemplateDetails]);\r\n\r\n useEffect(() => {\r\n if (activity && activity.signal) {\r\n const message = `[VideoAdsEditor] - Edit Video - Open - TemplateId:${videoMetaData.template.templateId}, AdStudio:${showVideoTemplateSummaryBarControl}`;\r\n activity.signal(message);\r\n }\r\n }, [activity, videoMetaData, showVideoTemplateSummaryBarControl]);\r\n\r\n return (\r\n <div className=\"video-editor-with-add-image-wrapper\">\r\n <EditVideoPageComponent\r\n i18n={i18n}\r\n activity={activity}\r\n onApply={onApply}\r\n isOpen={isOpen}\r\n setIsOpen={setIsOpen}\r\n videoMetaData={videoMetaData}\r\n cid={cid}\r\n aid={aid}\r\n oDataConfig={oDataConfig}\r\n finalUrl={finalUrl}\r\n copilotDataService={copilotDataService}\r\n logger={logger}\r\n onChangeImage={(minSize) => {\r\n setShowAddImagePanel(true);\r\n setMinSizeOfImage(minSize);\r\n }}\r\n assetLibraryConfig={assetLibraryConfig}\r\n onChangeLogo={() => setShowAddLogoPanel(true)}\r\n isCTV={isCTV}\r\n preferenceService={preferenceService}\r\n serverContext={serverContext}\r\n perfMarker={rest.perfMarker}\r\n isDialog={isDialog}\r\n permissions={permissions}\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n brandKit={brandKit}\r\n isLoadingBrandKit={isLoadingBrandKit}\r\n templateDetail={templateDetail}\r\n copilotDomainDataService={copilotDomainDataService}\r\n instrumentation={instrumentation}\r\n showVideoTemplateSummaryBarControl={showVideoTemplateSummaryBarControl}\r\n rawAudioList={rawAudioList}\r\n />\r\n </div>\r\n );\r\n};\r\n\r\nVideoTemplateEditorWithAddImageWrapperImp.propTypes = {\r\n assetLibraryConfig: PropTypes.shape({\r\n activityLogger: PropTypes.shape({}),\r\n assetLibraryUserPreferences: PropTypes.shape({}),\r\n assetLibraryAccountPreferences: PropTypes.shape({}),\r\n ianaTimeZone: PropTypes.string,\r\n logger: PropTypes.shape({}),\r\n onImageAddError: PropTypes.func,\r\n }).isRequired,\r\n copilotDataService: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n initialView: PropTypes.string.isRequired,\r\n isAssetLibraryAIGCMVPEnabled: PropTypes.bool.isRequired,\r\n isLiteLandingPageEnabled: PropTypes.bool.isRequired,\r\n logger: PropTypes.shape({}).isRequired,\r\n assetLibraryUserPreferences: PropTypes.shape({}).isRequired,\r\n assetLibraryAccountPreferences: PropTypes.shape({}).isRequired,\r\n ianaTimeZone: PropTypes.string.isRequired,\r\n onApply: PropTypes.func.isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n setIsOpen: PropTypes.func.isRequired,\r\n videoMetaData: PropTypes.shape({\r\n images: PropTypes.arrayOf(PropTypes.string),\r\n text: PropTypes.arrayOf(PropTypes.string),\r\n }).isRequired,\r\n cid: PropTypes.string.isRequired,\r\n aid: PropTypes.string.isRequired,\r\n oDataConfig: PropTypes.shape({}).isRequired,\r\n finalUrl: PropTypes.string.isRequired,\r\n permissions: PropTypes.shape({\r\n IsSocialMediaImagesEnabled: PropTypes.bool,\r\n }).isRequired,\r\n isCTV: PropTypes.bool,\r\n preferenceService: PropTypes.shape({}).isRequired,\r\n serverContext: PropTypes.shape({}).isRequired,\r\n isDialog: PropTypes.bool,\r\n loadClipchampPlayer: PropTypes.func.isRequired,\r\n};\r\n\r\nVideoTemplateEditorWithAddImageWrapperImp.defaultProps = {\r\n isCTV: false,\r\n isDialog: false,\r\n};\r\n\r\nexport const VideoTemplateEditorWithAddImageWrapper = withInstrumentation(withLoggingContext(withRecommendationContext(withCopilotDomainDataService(withDefaultStyles(VideoTemplateEditorWithAddImageWrapperImp, getGlobalLogoPickerStyles)))));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport {\r\n withAssetLibraryServicesLoaded,\r\n} from '@bingads-webui-campaign-react/asset-library-services';\r\nimport { FolderAssetType } from '@bingads-webui-campaign-react/asset-library-model';\r\nimport { CampaignFetchProvider } from '@bingads-webui-campaign-react/campaign-http';\r\nimport { CopilotRepositoryProvider } from '@bingads-webui/inline-copilot';\r\nimport { VideoTemplateEditorWithAddImageWrapper } from './video-template-add-image-wrapper';\r\n\r\nconst EditVideoPageComponentWithDataServices = withAssetLibraryServicesLoaded(VideoTemplateEditorWithAddImageWrapper, { loggerTag: 'Video Template Editor' });\r\n\r\nexport const VideoTemplateEditorContextWrapper = ({\r\n assetLibraryConfig,\r\n permissions,\r\n isAADUser,\r\n isLiteLandingPageEnabled,\r\n isOpen,\r\n setIsOpen,\r\n videoMetaData,\r\n onApply,\r\n cid,\r\n aid,\r\n finalUrl,\r\n perfMarker,\r\n i18n,\r\n isCTV,\r\n serverContext,\r\n isDialog,\r\n loadClipchampPlayer,\r\n showVideoTemplateSummaryBarControl,\r\n}) => {\r\n // todo: don't pilot AAD user for now, remove this check after the feature is GAed\r\n const isAssetLibraryAIGCMVPEnabled = !isAADUser;\r\n\r\n const {\r\n timeZone,\r\n preferencesService,\r\n activityLogger,\r\n oDataConfig,\r\n dateFormat,\r\n } = assetLibraryConfig;\r\n\r\n const useClipchamp = permissions && permissions.dynamic && permissions.dynamic.VideoTemplateUI;\r\n\r\n return (\r\n isOpen ?\r\n <CampaignFetchProvider>\r\n <CopilotRepositoryProvider\r\n campaignId={-1}\r\n recommendationType=\"Video\" // This is used until we have a separate video recommendationType\r\n finalUrl={finalUrl}\r\n serverContext={serverContext}\r\n perfMarker={perfMarker}\r\n locale={i18n.getLocale()}\r\n useClipchamp={useClipchamp}\r\n enableLogoAndCTA\r\n >\r\n <EditVideoPageComponentWithDataServices\r\n accountTimeZone={timeZone}\r\n preferenceService={preferencesService}\r\n activity={activityLogger}\r\n assetLibraryConfig={assetLibraryConfig}\r\n oDataConfig={oDataConfig}\r\n allowedAssetType={FolderAssetType.Image}\r\n isAssetLibraryAIGCMVPEnabled={isAssetLibraryAIGCMVPEnabled}\r\n isLiteLandingPageEnabled={isLiteLandingPageEnabled}\r\n dateFormat={dateFormat}\r\n permissions={permissions}\r\n isOpen={isOpen}\r\n setIsOpen={setIsOpen}\r\n videoMetaData={videoMetaData}\r\n onApply={onApply}\r\n cid={cid}\r\n aid={aid}\r\n finalUrl={finalUrl}\r\n perfMarker={perfMarker}\r\n i18n={i18n}\r\n isCTV={isCTV}\r\n serverContext={serverContext}\r\n isDialog={isDialog}\r\n loadClipchampPlayer={loadClipchampPlayer}\r\n showVideoTemplateSummaryBarControl={showVideoTemplateSummaryBarControl}\r\n />\r\n </CopilotRepositoryProvider>\r\n </CampaignFetchProvider >\r\n : null\r\n );\r\n};\r\n\r\nVideoTemplateEditorContextWrapper.propTypes = {\r\n assetLibraryConfig: PropTypes.shape({\r\n timeZone: PropTypes.number,\r\n preferencesService: PropTypes.shape({}),\r\n activityLogger: PropTypes.shape({}),\r\n oDataConfig: PropTypes.shape({}),\r\n dateFormat: PropTypes.string,\r\n }).isRequired,\r\n permissions: PropTypes.shape({}).isRequired,\r\n isOpen: PropTypes.bool.isRequired,\r\n setIsOpen: PropTypes.func.isRequired,\r\n videoMetaData: PropTypes.shape().isRequired,\r\n onApply: PropTypes.func.isRequired,\r\n cid: PropTypes.string.isRequired,\r\n aid: PropTypes.string.isRequired,\r\n finalUrl: PropTypes.string.isRequired,\r\n perfMarker: PropTypes.shape({}).isRequired,\r\n i18n: PropTypes.shape({}).isRequired,\r\n isAADUser: PropTypes.bool,\r\n isLiteLandingPageEnabled: PropTypes.bool,\r\n isCTV: PropTypes.bool,\r\n serverContext: PropTypes.shape({}).isRequired,\r\n isDialog: PropTypes.bool,\r\n};\r\n\r\nVideoTemplateEditorContextWrapper.defaultProps = {\r\n isLiteLandingPageEnabled: false,\r\n isAADUser: false,\r\n isCTV: false,\r\n isDialog: false,\r\n};\r\n","import { mergeStyles } from '@fluentui/style-utilities';\r\n\r\nexport const defaultIconClass = mergeStyles({\r\n display: 'flex',\r\n});\r\n\r\nexport const getIconClass = (colorString = 'white') => mergeStyles(defaultIconClass, {\r\n selectors: {\r\n svg: {\r\n fill: colorString,\r\n },\r\n },\r\n});\r\n","/* eslint-disable jsx-a11y/media-has-caption */\r\nimport React, { useRef, useEffect, useState, useMemo, Fragment } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport classnames from 'classnames';\r\nimport { IconButton, Slider } from '@fluentui/react';\r\nimport { registerIcons } from '@fluentui/style-utilities';\r\n\r\nimport { getIconClass } from './styles';\r\n\r\nregisterIcons({\r\n icons: {\r\n videoPlayBig: (\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"black\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.60846 4.61507C7.1087 4.34314 6.5 4.70491 6.5 5.27386V18.7262C6.5 19.2951 7.1087 19.6569 7.60846 19.385L19.97 12.6588C20.4921 12.3747 20.4921 11.6253 19.97 11.3412L7.60846 4.61507ZM5 5.27386C5 3.56701 6.82609 2.4817 8.32538 3.29749L20.687 10.0236C22.2531 10.8758 22.2531 13.1242 20.687 13.9764L8.32538 20.7025C6.82609 21.5183 5 20.433 5 18.7262V5.27386Z\" /></svg>\r\n ),\r\n videoPause: (\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"black\" xmlns=\"http://www.w3.org/2000/svg\"><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M3.99609 4.75C3.99609 3.7835 4.7796 3 5.74609 3H9.24609C10.2126 3 10.9961 3.7835 10.9961 4.75V19.25C10.9961 20.2165 10.2126 21 9.24609 21H5.74609C4.7796 21 3.99609 20.2165 3.99609 19.25V4.75ZM5.74609 4.5C5.60802 4.5 5.49609 4.61193 5.49609 4.75V19.25C5.49609 19.3881 5.60802 19.5 5.74609 19.5H9.24609C9.38416 19.5 9.49609 19.3881 9.49609 19.25V4.75C9.49609 4.61193 9.38416 4.5 9.24609 4.5H5.74609ZM12.9961 4.75C12.9961 3.7835 13.7796 3 14.7461 3H18.2461C19.2126 3 19.9961 3.7835 19.9961 4.75V19.25C19.9961 20.2165 19.2126 21 18.2461 21H14.7461C13.7796 21 12.9961 20.2165 12.9961 19.25V4.75ZM14.7461 4.5C14.608 4.5 14.4961 4.61193 14.4961 4.75V19.25C14.4961 19.3881 14.608 19.5 14.7461 19.5H18.2461C18.3842 19.5 18.4961 19.3881 18.4961 19.25V4.75C18.4961 4.61193 18.3842 4.5 18.2461 4.5H14.7461Z\" /></svg>\r\n ),\r\n videoReplay: (\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"black\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 4.5C16.1421 4.5 19.5 7.85786 19.5 12C19.5 16.1421 16.1421 19.5 12 19.5C7.85786 19.5 4.5 16.1421 4.5 12C4.5 11.6236 4.52772 11.2538 4.58123 10.8923C4.64845 10.4382 4.31609 10 3.85708 10C3.48623 10 3.161 10.2562 3.10471 10.6228C3.03576 11.0718 3 11.5317 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C9.69494 3 7.59227 3.86656 6 5.29168V4.25C6 3.83579 5.66421 3.5 5.25 3.5C4.83579 3.5 4.5 3.83579 4.5 4.25V7.25C4.5 7.66421 4.83579 8 5.25 8H8.25C8.66421 8 9 7.66421 9 7.25C9 6.83579 8.66421 6.5 8.25 6.5H6.90093C8.23907 5.25883 10.0309 4.5 12 4.5Z\" /></svg>\r\n ),\r\n videoMute: (\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"black\" xmlns=\"http://www.w3.org/2000/svg\"><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M2.21968 2.21966C2.51257 1.92677 2.98745 1.92678 3.28034 2.21968L21.7801 20.7198C22.073 21.0127 22.073 21.4876 21.7801 21.7805C21.4872 22.0734 21.0123 22.0734 20.7194 21.7805L15 16.0609V19.7456C15 20.8242 13.7255 21.3965 12.9194 20.6797L8.42793 16.686C8.29063 16.5639 8.11329 16.4965 7.92956 16.4965H4.25C3.00736 16.4965 2 15.4891 2 14.2465V9.74856C2 8.50592 3.00736 7.49856 4.25 7.49856H6.43782L2.21966 3.28032C1.92677 2.98743 1.92678 2.51255 2.21968 2.21966ZM13.5 19.1888V14.5609L7.93777 8.99855L7.92961 8.99856H4.25C3.83579 8.99856 3.5 9.33435 3.5 9.74856V14.2465C3.5 14.6607 3.83579 14.9965 4.25 14.9965H7.92956C8.48074 14.9965 9.01275 15.1988 9.42465 15.565L13.5 19.1888ZM13.4995 10.3177V4.8063L10.582 7.40015L9.51953 6.33766L12.919 3.31533C13.725 2.59866 14.9995 3.17089 14.9995 4.24951V11.8177L13.4995 10.3177ZM17.1412 13.9588L18.2792 15.0969C18.741 14.1624 19.0002 13.1103 19.0002 11.9996C19.0002 10.7964 18.696 9.66203 18.1598 8.67142C17.9626 8.30715 17.5074 8.17171 17.1432 8.36891C16.7789 8.5661 16.6434 9.02125 16.8406 9.38551C17.2611 10.1623 17.5002 11.0519 17.5002 11.9996C17.5002 12.6906 17.3731 13.3508 17.1412 13.9588ZM20.4811 17.2999L19.3877 16.2065C20.0954 14.9664 20.4996 13.5312 20.4996 12.0001C20.4996 10.1063 19.8811 8.35899 18.8349 6.94644C18.5884 6.61358 18.6583 6.14389 18.9912 5.89736C19.324 5.65082 19.7937 5.7208 20.0403 6.05365C21.2713 7.71573 21.9996 9.77393 21.9996 12.0001C21.9996 13.9458 21.4433 15.7632 20.4811 17.2999Z\" /></svg>\r\n ),\r\n videoUnmute: (\r\n <svg width=\"22\" height=\"22\" viewBox=\"0 0 22 22\" fill=\"black\" xmlns=\"http://www.w3.org/2000/svg\"><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M13 2.25049C13 1.17187 11.7255 0.599636 10.9195 1.31632L6.42794 5.30958C6.29065 5.43165 6.11333 5.49908 5.92961 5.49908H2.25C1.00736 5.49908 0 6.50644 0 7.74908V12.247C0 13.4896 1.00736 14.497 2.25 14.497H5.92956C6.11329 14.497 6.29063 14.5644 6.42793 14.6865L10.9194 18.6802C11.7255 19.397 13 18.8248 13 17.7461V2.25049ZM7.4246 6.4306L11.5 2.80728V17.1893L7.42465 13.5656C7.01275 13.1993 6.48074 12.997 5.92956 12.997H2.25C1.83579 12.997 1.5 12.6612 1.5 12.247V7.74908C1.5 7.33486 1.83579 6.99908 2.25 6.99908H5.92961C6.48075 6.99908 7.01272 6.79679 7.4246 6.4306ZM16.9912 3.89736C17.324 3.65082 17.7937 3.7208 18.0403 4.05365C19.2713 5.71573 19.9996 7.77393 19.9996 10C19.9996 12.2261 19.2713 14.2843 18.0403 15.9464C17.7937 16.2793 17.324 16.3492 16.9912 16.1027C16.6583 15.8562 16.5884 15.3865 16.8349 15.0536C17.8811 13.6411 18.4996 11.8939 18.4996 10C18.4996 8.10623 17.8811 6.35899 16.8349 4.94644C16.5884 4.61359 16.6583 4.1439 16.9912 3.89736ZM16.1598 6.67142C15.9626 6.30715 15.5074 6.17172 15.1432 6.36891C14.7789 6.5661 14.6434 7.02125 14.8406 7.38551C15.2611 8.16228 15.5002 9.05188 15.5002 9.99958C15.5002 10.9473 15.2611 11.8369 14.8406 12.6137C14.6434 12.9779 14.7789 13.4331 15.1432 13.6303C15.5074 13.8275 15.9626 13.692 16.1598 13.3278C16.696 12.3372 17.0002 11.2028 17.0002 9.99958C17.0002 8.79638 16.696 7.66203 16.1598 6.67142Z\" /></svg>\r\n ),\r\n },\r\n});\r\n\r\nfunction padTime(time) {\r\n return Math.floor(time).toString().padStart(2, '0');\r\n}\r\n\r\nfunction Time({ currentTime, duration }) {\r\n const durationString = `${padTime(duration / 60)}:${padTime(duration % 60)}`;\r\n const currentTimeString = `${padTime(currentTime / 60)}:${padTime(currentTime % 60)}`;\r\n const divider = ' / ';\r\n\r\n return (\r\n <div className=\"time\">\r\n <span className=\"currentTime\">{currentTimeString}</span>\r\n <span className=\"divider\">{divider}</span>\r\n <span className=\"totalTime\">{durationString}</span>\r\n </div>\r\n );\r\n}\r\n\r\nTime.prototype.propTypes = {\r\n currentTime: PropTypes.number.isRequired,\r\n duration: PropTypes.number.isRequired,\r\n};\r\n\r\nexport function VideoPureComponent({\r\n i18n,\r\n ariaLabel,\r\n src,\r\n muteByDefault,\r\n className,\r\n classes,\r\n autoPlay,\r\n onVideoLoaded,\r\n iconColor,\r\n maxWidth,\r\n showTime,\r\n id,\r\n showPlay,\r\n customPlayObject,\r\n}) {\r\n const videoElement = useRef(null);\r\n const [volumeVisible, setVolumeVisible] = useState(false);\r\n const [paused, setPaused] = useState(true);\r\n const [muted, setMuted] = useState(muteByDefault);\r\n const [ended, setEnded] = useState(false);\r\n const [currentTime, setCurrentTime] = useState(0);\r\n const [duration, setDuration] = useState(0);\r\n const iconClass = getIconClass(iconColor);\r\n\r\n useEffect(() => {\r\n if (!videoElement.current) return;\r\n videoElement.current.onplay = () => {\r\n setPaused(false);\r\n setEnded(false);\r\n };\r\n videoElement.current.onpause = () => {\r\n setPaused(true);\r\n };\r\n videoElement.current.onended = () => {\r\n setEnded(true);\r\n };\r\n videoElement.current.ontimeupdate = (event) => {\r\n setCurrentTime(event.target.currentTime);\r\n };\r\n videoElement.current.onloadeddata = (event) => {\r\n onVideoLoaded();\r\n setDuration(event.target.duration);\r\n };\r\n }, [videoElement, onVideoLoaded]);\r\n\r\n useEffect(() => {\r\n if (customPlayObject) {\r\n const { play } = customPlayObject;\r\n if (play) {\r\n videoElement.current.play();\r\n } else {\r\n videoElement.current.pause();\r\n }\r\n }\r\n }, [customPlayObject]);\r\n\r\n const onUserSlideProgress = (v) => {\r\n if (_.isFinite(v)) {\r\n videoElement.current.currentTime = v;\r\n }\r\n if (videoElement && videoElement.current.paused) {\r\n videoElement.current.play();\r\n }\r\n };\r\n\r\n const onVolumeClick = () => {\r\n setMuted(!muted);\r\n };\r\n\r\n const playIconName = useMemo(() => {\r\n if (ended) {\r\n return 'videoReplay';\r\n }\r\n\r\n return paused ? 'videoPlayBig' : 'videoPause';\r\n }, [ended, paused]);\r\n\r\n useEffect(() => {\r\n if (onVideoLoaded && _.get(videoElement, ['current', 'complete'], false)) {\r\n onVideoLoaded();\r\n }\r\n }, [onVideoLoaded, videoElement]);\r\n\r\n const width = maxWidth ? { width: maxWidth } : {};\r\n\r\n return (\r\n <div className={classnames('video-container', classes.videoContainer, className)} style={{ ...width }}>\r\n <video ref={videoElement} className={classes.previewVideo} aria-label={ariaLabel} muted={muted} autoPlay={autoPlay} onLoadedData={onVideoLoaded} id={id}>\r\n <source src={src} />\r\n </video>\r\n <div className={classnames(classes.root, 'video-previewer-root')}>\r\n <Fragment>\r\n <div className={classes.container}>\r\n {\r\n showPlay &&\r\n <IconButton\r\n className={iconClass}\r\n ariaLabel={paused ? i18n.getString(_TL_('Play')) : i18n.getString(_TL_('Pause'))}\r\n iconProps={{ iconName: playIconName }}\r\n onClick={() => (paused ? videoElement.current.play() : videoElement.current.pause())}\r\n />\r\n }\r\n {showTime && <Time currentTime={currentTime || 0} duration={duration || 0} />}\r\n <Slider\r\n className={classes.sliderContainer}\r\n min={0}\r\n max={_.get(videoElement, ['current', 'duration'], 0)}\r\n value={currentTime || 0}\r\n aria-label={i18n.getString(_TL_('Video progress'))}\r\n showValue={false}\r\n onChange={onUserSlideProgress}\r\n />\r\n <IconButton\r\n className={iconClass}\r\n ariaLabel={muted ? i18n.getString(_TL_('Unmute')) : i18n.getString(_TL_('Mute'))}\r\n iconProps={{ iconName: muted ? 'videoMute' : 'videoUnmute' }}\r\n onMouseOver={() => setVolumeVisible(!volumeVisible)}\r\n onFocus={() => setVolumeVisible(!volumeVisible)}\r\n onClick={onVolumeClick}\r\n />\r\n </div>\r\n </Fragment>\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\nVideoPureComponent.propTypes = {\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n classes: PropTypes.shape({\r\n previewVideo: PropTypes.string,\r\n root: PropTypes.string,\r\n container: PropTypes.string,\r\n volumeIcon: PropTypes.string,\r\n volumeSlider: PropTypes.string,\r\n videoControlsShadow: PropTypes.string,\r\n sliderContainer: PropTypes.string,\r\n videoContainer: PropTypes.string,\r\n }).isRequired,\r\n ariaLabel: PropTypes.string.isRequired,\r\n src: PropTypes.string.isRequired,\r\n className: PropTypes.string,\r\n muteByDefault: PropTypes.bool,\r\n autoPlay: PropTypes.bool,\r\n onVideoLoaded: PropTypes.func,\r\n iconColor: PropTypes.string,\r\n id: PropTypes.string,\r\n showTime: PropTypes.bool,\r\n maxWidth: PropTypes.number,\r\n showPlay: PropTypes.bool,\r\n customPlayObject: PropTypes.shape({\r\n play: PropTypes.bool,\r\n }),\r\n};\r\n\r\nVideoPureComponent.defaultProps = {\r\n className: '',\r\n showTime: false,\r\n muteByDefault: false,\r\n autoPlay: false,\r\n onVideoLoaded: _.noop,\r\n iconColor: 'white',\r\n id: '',\r\n maxWidth: 0,\r\n showPlay: true,\r\n customPlayObject: null,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Icon } from '@bingads-webui-react/fabric-control';\r\n\r\nexport const FailedPlaceholder = props => (\r\n <div className={props.classes.failed}>\r\n <Icon\r\n className=\"placeholder-icon\"\r\n iconName=\"ErrorBadge\"\r\n />\r\n <div className=\"placeholder-content\" style={{ fontWeight: 600, color: props.textColor }}>{props.placeholderContent}</div>\r\n </div>\r\n);\r\n\r\nFailedPlaceholder.propTypes = {\r\n placeholderContent: PropTypes.string.isRequired,\r\n textColor: PropTypes.string,\r\n classes: PropTypes.shape({\r\n failed: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nFailedPlaceholder.defaultProps = {\r\n textColor: undefined,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Icon } from '@bingads-webui-react/fabric-control';\r\n\r\nexport const EncodingPlaceholder = props => (\r\n <div className={props.classes.encoding}>\r\n <Icon\r\n className=\"placeholder-icon\"\r\n iconName=\"ProgressRingDots\"\r\n />\r\n <div className=\"placeholder-content\" style={{ fontWeight: 600, color: props.textColor }}>{props.placeholderContent}</div>\r\n </div>\r\n);\r\n\r\nEncodingPlaceholder.propTypes = {\r\n placeholderContent: PropTypes.string.isRequired,\r\n textColor: PropTypes.string,\r\n classes: PropTypes.shape({\r\n encoding: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nEncodingPlaceholder.defaultProps = {\r\n textColor: undefined,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Icon } from '@bingads-webui-react/fabric-control';\r\n\r\nexport const UnverifiedPlaceholder = props => (\r\n <div className={props.classes.unverified}>\r\n <div className=\"download-icon-container\">\r\n <Icon\r\n className=\"placeholder-icon\"\r\n iconName=\"Down\"\r\n />\r\n </div>\r\n <div className=\"placeholder-content\" style={{ fontWeight: 600, color: props.textColor }}>{props.placeholderContent}</div>\r\n </div>\r\n);\r\n\r\nUnverifiedPlaceholder.propTypes = {\r\n placeholderContent: PropTypes.string.isRequired,\r\n textColor: PropTypes.string,\r\n classes: PropTypes.shape({\r\n unverified: PropTypes.string.isRequired,\r\n }).isRequired,\r\n};\r\n\r\nUnverifiedPlaceholder.defaultProps = {\r\n textColor: undefined,\r\n};\r\n","const commonParentStyles = {\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n flexDirection: 'column',\r\n height: '100%',\r\n};\r\n\r\nconst iconCommonStyles = {\r\n fontSize: '36px',\r\n lineHeight: '36px',\r\n color: '#0078d4',\r\n};\r\n\r\nexport const getPlaceholderStyle = () => ({\r\n '@global': {\r\n '@keyframes spinner': {\r\n to: {\r\n transform: 'rotate(360deg)',\r\n },\r\n },\r\n '@keyframes downloading': {\r\n from: {\r\n transform: 'translateY(-18px)',\r\n },\r\n to: {\r\n transform: 'translateY(42px)',\r\n },\r\n },\r\n },\r\n encoding: {\r\n ...commonParentStyles,\r\n '& .placeholder-icon': {\r\n ...iconCommonStyles,\r\n animation: 'spinner 1.2s linear infinite',\r\n },\r\n '.add-video-content-container &': {\r\n marginTop: 14,\r\n },\r\n },\r\n unverified: {\r\n ...commonParentStyles,\r\n '& .download-icon-container': {\r\n overflow: 'hidden',\r\n borderBottom: '2px solid #0078d4',\r\n },\r\n '& .placeholder-icon': {\r\n ...iconCommonStyles,\r\n animation: 'downloading 1.2s ease infinite',\r\n },\r\n },\r\n failed: {\r\n ...commonParentStyles,\r\n '& .placeholder-icon': {\r\n ...iconCommonStyles,\r\n color: '#d83b01',\r\n },\r\n },\r\n});\r\n","import { FailedPlaceholder } from '@bingads-webui-campaign-react/video-status-placeholder-pure-component';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getPlaceholderStyle } from './styles';\r\n\r\nexport const FailedPlaceholderWithStyle = withDefaultStyles(FailedPlaceholder, getPlaceholderStyle);\r\n","import { EncodingPlaceholder } from '@bingads-webui-campaign-react/video-status-placeholder-pure-component';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getPlaceholderStyle } from './styles';\r\n\r\nexport const EncodingPlaceholderWithStyle = withDefaultStyles(EncodingPlaceholder, getPlaceholderStyle);\r\n","import { UnverifiedPlaceholder } from '@bingads-webui-campaign-react/video-status-placeholder-pure-component';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getPlaceholderStyle } from './styles';\r\n\r\nexport const UnverifiedPlaceholderWithStyle = withDefaultStyles(UnverifiedPlaceholder, getPlaceholderStyle);\r\n","import { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { VideoPureComponent } from '@bingads-webui-campaign-react/video-pure-component';\r\n\r\nimport { getControlStyles } from './styles';\r\n\r\nexport const Video = withDefaultStyles(VideoPureComponent, getControlStyles);\r\n","export const getControlStyles = () => ({\r\n root: {\r\n position: 'relative',\r\n width: '100%',\r\n overflow: 'hidden',\r\n top: -5,\r\n backgroundColor: 'rgba(0,0,0,0.75)',\r\n\r\n '& .ms-Button svg': {\r\n width: '100%',\r\n },\r\n '& .ms-Button:focus': {\r\n border: '1px solid #fff',\r\n },\r\n '& .ms-Button:hover': {\r\n backgroundColor: 'transparent',\r\n },\r\n },\r\n videoContainer: {\r\n paddingBottom: 32,\r\n },\r\n sliderContainer: {\r\n width: '100%',\r\n },\r\n previewVideo: {\r\n width: '100%',\r\n maxHeight: '100%',\r\n },\r\n container: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n\r\n '& i': {\r\n width: '100%',\r\n cursor: 'pointer',\r\n },\r\n },\r\n});\r\n\r\n"],"names":["DummyIsOptionalComponent","_ref","value","onChange","_useState","useState","_useState2","_slicedToArray","isOptional","setIsOptional","target","propTypes","PropTypes","isRequired","DummyIsOptionalValidationItem","withValidation","countTextAssets","collectionObj","_ref$countEmpty","countEmpty","chain","values","filter","textValue","isEmpty","length","hasTextAssets","headlines","longHeadlines","descriptions","collectionSummary","element","i18n","collection","displayText","displayTextSingular","count","itemText","getString","_TL_","collectionCount","getTextCardSummaryDetails","collectionsSummary","summaryDetails","forEach","push","join","getTextCardSummaryDetailsForCollection","getHeadlinesCardSummaryDetails","getLongHeadlinesCardSummaryDetails","getDescriptionsCardSummaryDetails","registerIcons","icons","_jsx","width","height","viewBox","fill","xmlns","children","d","ValidationGroupWithMessage","withControlErrorHandling","withContainerErrors","withError","ValidationGroup","UnvalidatedTextAssetCollection","React","props","labelAction","overrideInputNode","minCollectionSize","maxCollectionSize","labelText","labelId","helpPopupTopic","helpPopupAriaLabel","placeholderText","fieldName","singleAssetValidationPropsField","validationPropsField","addButtonText","formErrorProps","renderWrapperFunction","updateValidation","errorMessage","duplicateErrorMessage","validationProps","externalErrorMessages","showAddButton","hideAddButtonWhenLimitReached","getCustomErrorMessage","styleOverrides","alwaysShowError","showDeleteButton","onDeleteTextAsset","deleteButtonLabel","renderInlineCopilot","enableCustomizer","withDeleteIconDisabled","getStylesWithOverrides","useMemo","merge","TextAssetContainer","marginBottom","marginTop","labelContainer","display","justifyContent","alignItems","WithFlexButtons","marginLeft","TextAssetsCollectionContainer","color","AddAssetButton","getStyles","classes","useDefaultStyles","useContext","I18nContext","activity","ActivityContext","data","schema","_defineProperty","initialValue","result","numberOfPreloadedAssets","i","concat","deriveValue","assetsToRender","onDeleteAsset","useCallback","key","deletedValue","newValidationPropsField","index","Object","keys","itemKey","newValue","undefined","renderItem","itemValue","additionalTextFieldProps","_jsxs","className","classnames","ValidatedTextFieldWithAdCustomizer","field","configProps","_objectSpread","placeholder","title","RemainingCharsValidatedTextField","CommandButton","iconProps","iconName","onClick","ariaLabel","disabled","textAssetFields","map","isFunction","hideAddButton","onAddAsset","onValidate","validationResult","signal","customErrors","newData","assets","_toConsumableArray","messages","isOptionalRef","useRef","current","dummyItemValidationProps","properties","type","IsOptional","validator","changed","list","groupErrors","min","items","item","hasEnoughNonEmptyValues","size","uniq","hasDuplicateValues","reduce","errors","errorFilter","error","stopPropagation","passiveMessages","showErrorOnPassiveMessages","Label","id","label","HelpPopup","topic","style","ActionButton","allowDisabledFocus","defaultProps","noop","withCustomValidation","UrlPathFluent","withFluentSwitcher","UrlPathFluentV1","UrlPathFluentV2","ValidatedUrlPath","urlPath1","urlPath2","finalUrl","first","Stack","horizontal","verticalAlign","HelpPopupInline","url","UrlContainer","MobileUrlContainer","MobileUrlKey","UrlInputFluent","UrlInputFluentV1","UrlInputFluentV2","MobileUrlWithCustomValidation","helpTopicId","mobileFinalUrls","mobileFinalUrl","isMobileUrlChecked","setIsMobileUrlChecked","_useState3","_useState4","cachedValue","setCachedValue","_useState5","_useState6","cachedErrors","setCachedErrors","onCheckboxChange","ev","checked","_getUrlPrefixAndDesti3","getUrlPrefixAndDestination","urlWithoutPrefix","_getUrlPrefixAndDesti","onInputChange","classNames","Checkbox","containerClassName","dropdownOptionAriaLabel","textFieldAriaLabel","ValidatedMobileUrl","FinalURlKey","ValidatedFinalUrl","validationOnUrlChange","prepopulateUrl","validateOnRender","hideLabel","additionalProperties","customUrlProtocol","enableSpecialCharactersValidation","finalUrls","createFinalUrlsViewModel","urls","JSON","stringify","additionalValidation","propertyKey","getFinalUrlCardSummaryDetails","isEmptyUrl","getFinalUrlWithPath","path1","path2","finalUrlDomain","getDomain","getAdvancedUrlOptionsCardSummaryDetails","displayUrl","noDisplayUrl","noMboileUrl","displayUrlDetails","mobileUrlDetails","campaignTrackingUrlTemplate","propertyIs","campaignFinalUrlSuffix","campaignUrlCustomParameters","trackingUrlTemplateControlsWrapper","compose","partial","withUnvalidatedControlErrors","_","Adapter","StandardControlAdapter","finalUrlSuffixControlsWrapper","urlCustomParametersControlsWrapper","functionsToInject","ValidatedUrlOptionsParameter","withProps","ValidatedUrlOptionsParameters","ValidatedUrlOptionsParameterWithError","ValidatedUrlOptionsParametersWithError","valuePrefix","customizedValidation","isControlledOutside","validateOnDomain","formattedValue","includes","updatedErrors","ValidatedMobileUrlWithoutCheckbox","nativeAdMobileFinalUrlsProp","ServerValidatedMobileFinalUrl","requiredUrlProtocolAndDomain","urlLengthLimit","validateAdUrl","MobileUrlSection","expand","rest","_objectWithoutProperties","_excluded","mobileFinalUrlValidationProps","MobileFinalUrls","mobileFinalUrlDetails","ValidatedPanel","TextTitle","titleKey","topicKey","details","icon","MobileFinalUrlImg","attentionBeaconProps","getExtraProps","getPanelErrorProps","actuationProps","expandKey","URLOptionsSection","trackingUrlTemplate","finalUrlSuffix","urlCustomParameters","token","triggerTestUurl","urlOptions","TrackingUrlTemplate","FinalUrlSuffix","UrlCustomParameters","urlOptionsDetails","getUrlOptionsDetails","UrlOptionsImg","showUurlTestTool","DisplayUrlModes","WebsiteDescriptionLanguages","WebsiteDescriptionOptions","vanityUrlOption","paddingLeft","minHeight","flexDirection","gap","paddingRight","margin","Insights","Glyphicon","glyph","messageBarStyle","root","background","fontSize","VanityUrlOption","vanityUrlSettings","displayUrlMode","setDisplayUrlMode","websiteDescription","setWebsiteDescription","languages","language","_useMemo","mod","findIndex","option","websiteDescriptions","idx","getWebsiteDescriptionList","onDisplayUrlModeChange","e","onLanguageChange","langIndex","arguments","Math","pow","getWebsiteDescriptionInAnotherLanguage","selectedIndex","onWebsiteDescriptionChange","useEffect","DisplayUrlMode","WebsiteDescription","name","MessageBar","messageBarIconProps","messageBarType","MessageBarType","info","styles","hidden","lang","description","paddingTop","useStyles","makeStyles","container","shorthands","padding","tokens","spacingHorizontalL","previewButton","whiteSpace","saveButton","aspectRatio","divider","VideoTemplateSummaryBarControl","setShowPreviewVideoModal","onSaveVideo","metadata","summaryBar","setSummaryBar","template","inputRatio","closestRatio","closestDiff","abs","_i","_Object$entries","entries","_Object$entries$_i","ratio","diff","getClosestAspectRatio","preview","message","templateId","publish","customizedContent","mergeClasses","_Fragment","Divider","vertical","Button","VideoRegular","appearance","timer","setInterval","summaryBarCustomizeEle","document","getElementById","clearInterval","createPortal","videoEditor","top","overFlowY","editVideoPage","backgroundColor","navigationView","borderWidth","actionsWrapperContent","overflowY","overflowX","actionsWrapper","minWidth","maxWidth","paddingBottom","boxShadow","borderRadius","overflow","previewContainer","flexGrow","position","spacingHorizontalM","scenePreview","storyBoardContainer","leftPanelTop","bottom","marginRight","containerWrapper","generateButtonContainer","generateButton","topNavigationParent","fontWeight","topNavigationLeft","textAlign","alignContent","topNavigationRight","editVideoPageNavigation","tabList","tabItemWrapper","tabItem","alignSelf","wordBreak","AssetsId","StyleId","AudioId","EditVideoNavigationView","currentView","setCurrentView","selectItem","isSelected","AddSquareFilled","AddSquareRegular","DesignIdeasFilled","DesignIdeasRegular","HeadphonesSoundWaveFilled","HeadphonesSoundWaveRegular","Tab","selected","TabList","selectedValue","topNavigation","spacingVerticalL","recommendedImage","collectionConfig","copilotButtonLabel","inlineRecommendationsTitle","inlineRecommendationsHelpTopicKey","inlineRecommendationsHelpTopicAriaLabel","inlineRecommendationsDisabledItemTooltip","ShortHeadlineAssetCollection","isMultipleOptions","onFocusTextAsset","onApplyRecommendation","enableCopilotRecommendations","setAddNewShortHeadlinesCallback","addNewShortHeadlineCallback","shortHeadlineAssetCollectionConfig","getTextAssetCollectionConfig","getShortHeadlineAssetCollectionConfig","recommendations","replaceExistingAssets","TextAssetCollectionWithRecommendations","replaceMode","hideAddAllSuggestionsButton","withInlineRecommendations","setAddTextAssetCallback","callback","onToggleTextFormatting","onResetTextAssets","assetName","useTextAssetCollectionStyles","textAssetStyle","textDivider","hide","TextAssetCollectionWithCoPilotInternal","disableCopilot","shortHeadlineValidations","fetchRecommendationAssets","onChangeTextAssetFormattingSection","cancelFetchRecommendationAssetsJob","shortHeadlineAssetCollection","featureName","minLength","maxLength","TextAssetCollectionWithCoPilot","useDefaultContainerStyles","rowGap","core","collapseContainer","helpbuttonStyle","campaignId","serverContext","shortHeadline","onChangeTexts","helpButtonStyles","locale","CurrentLocale","updatedHeadlineSchema","AssetGroup","Headlines","acc","updatedValue","updatedAssetGroup","Headline","isDirty","isValid","updatedTextAssets","newShortHeadline","Headline0","FinalUrlForRecommendation","CopilotRepositoryProvider","enableLogoAndCTA","recommendationType","isAudienceAd","func","getLocale","SceneWrapperTextAssetCollectionWithRecommendations","scene","shouldDisplay","onTextListUpdate","metaData","updating","text","textData","slice","getTextAssets","textList","textDataList","newText","longHeadlineValidations","descriptionValidations","hideTextFormatting","EditVideoAssetsView","aid","cid","oDataConfig","onTextListChange","onChangeImage","scenes","selectedSceneId","onImageUpdated","onLogoUpdated","onChangeLogo","preferenceService","perfMarker","permissions","recommendedAssets","isLoadingRecommendedAssets","brandKit","isLoadingBrandKit","setTextList","assetType","setAssetType","assetIndex","setAssetIndex","_useImagePicker","useImagePicker","displayImagePicker","setDisplayImagePicker","selectedMediaPanelSource","setSelectedMediaPanelSource","currentScene","newImages","currentSceneImages","image","currentSceneLogos","newLogos","logo","hasImages","hasLogos","brandKitImages","images","Array","from","fullUrl","Url","thumbnailSrc","recommendedImageList","ImageAssets","recommendedLogoList","mappedLogos","logos","Logo","isArray","onReplacePreview","currentTarget","dataset","onEdit","str","newTextList","onUpdateImageFromRecommendations","imageType","newImageArray","src","newLogoArray","Item","RecommendedImage","isLoading","previewImage","recommendedImages","maxUploadNum","uiBlocking","seeAllPanelTitle","seeAllLinkText","onEditPreviewImage","onReplacePreviewImage","recommendedLoadingText","helpTopic","helpLabel","recommendationTitle","onSelectRecommendedImage","onAddRecommendedImagefromPanel","showViewAllInHeader","hideEditPreviewBtn","sceneImage","classeName","UploadImage","elementType","maxLimit","onSelectImages","imageSrc","styleGuideContainer","styleGuideTitle","fontWeightBold","styleColorTitle","paddingBotton","fontWeightSemibold","colorPalettes","spacingVerticalM","colorNeutralStencil1","flex","spacingVerticalS","header","columnGap","spacingHorizontalXS","content","fontSelect","fontWeightSelect","fontContainer","gridTemplateColumns","gridGap","spacingHorizontalS","contentDivider","spacingVerticalXL","overrideFontWeights","row","flexWrap","FontEditor","onChangeFont","onChangeWeight","fontsState","currentFont","font","currentWeight","FontsFamilySelector","selectClassName","FontsWeightSelector","ViewName","ColorTypeEnum","keyframeTemplateList","TemplateId","TemplateName","Version","Width","Height","TemplateFileName","Image","AspectRatio","MinHeight","Text","MaxLengthInChar","getActiveTemplate","ColorEditor","onPalettesUpdated","paletteData","palettesState","backgroundPalette","Name","isBrandKitColor","textPalette","selectedColor","colorType","find","c","HexCode","maxColors","palettes","onDeleteColor","colorid","onUpdate","colorObj","AdsStudioDisplayColorPicker","onDelete","EditVideoStyleView","onFontsUpdated","finalPalettes","_finalPalettes","mappedPalettes","palette","apply","some","newState","audioGuideContainer","marginLBottom","audioGuideTitle","audioMusicTitle","audioMusicTitleContainer","audioMusicSelect","audioMusicContainer","getLocalizedAudioName","EditVideoAudioView","audioState","setAudioState","rawAudioList","selectId","useId","setSelectedValue","isPageLoading","setIsPageLoading","audioList","setAudioList","_useState7","_useState8","isPlaying","setIsPlaying","audioRef","audioSrc","fileName","audioName","formatResponse","response","Data","Audio","AudioName","getAudioObjectFromList","formatAudioList","_asyncToGenerator","_regeneratorRuntime","mark","_callee","formattedList","wrap","_context","prev","next","stop","Overlay","zIndex","AssetLibrarySpinner","useCustomSize","Combobox","onOptionSelect","event","audioObject","optionValue","optionText","pause","border","Option","play","PauseRegular","PlayRegular","ref","scenePreviewContainer","spacingHorizontalXXXL","scenePreviewImage","maxHeight","ScenePreview","keyFrame","effective","alt","storyBoardView","spacingVerticalMNudge","templateContainer","templateThumbnail","templateText","colorNeutralForeground3","scenesContainer","sceneContainer","sceneTitle","thumbnailsRow","sceneItem","outlineColor","outlineStyle","sceneThumbnail","sceneNumber","lineHeight","audioBar","navigationContainer","Title","variant","Scene","sceneId","onSceneSelected","clickFunc","onKeyDown","keyCode","Enter","role","tabIndex","ScenePickerView","_ref2","TemplateContainer","templateDetail","TemplateThumbnailUrl","LocalizedTemplateName","seconds","Duration","AudioBar","videoMetadata","audio","audioCategory","category","backgroundImage","audioWaveImage","backgroundPosition","backgroundRepeat","MusicNote2Filled","StoryBoardView","_ref3","isSelenium","getParameter","isLocal","window","location","href","mock","defaultColor","defaultTextData","mockEditResponse","recommendationId","recommendationFormat","thumbnailUrl","durationInMs","imageData","targetWidth","targetHeight","itemId","logoData","isEqualScene","scene1","scene2","isEqual","omit","isVideoChanged","original","isSceneChanged","useEditVideoAdsViewState","_ref4","videoMetaData","copilotDataService","logger","isCTV","showVideoTemplateSummaryBarControl","_useRecommendations","editVideoAdsAssetRecommendations","generateVideo","video","newVideoMetaData","then","res","ads","catch","fetchAssets","useRecommendations","setScenes","setSelectedSceneId","setVideo","_useState9","_useState10","setFontsState","_useState11","_useState12","setPalettesState","_useState13","_useState14","videoUrl","setVideoUrl","_useState15","_useState16","videoSettings","setVideoSettings","_useState17","_useState18","isGeneratingVideo","setIsGeneratingVideo","_useState19","_useState20","generateError","setGenerateError","_useState21","_useState22","setRecommendedAssets","_useState23","_useState24","setIsLoadingRecommendedAssets","_useState25","_useState26","copilotRecommendedAssets","setCopilotRecommendedAssets","updateStateFromFetchResponse","_ref5","_ref5$scenes","scenesInner","businessName","scenesWithIds","imageUrl","logoUrl","_extractStylesFromSce","extractStylesFromScenes","fonts","filteredPalettes","videoSettingsInner","RecommendedAssets","assetsObj","logTrace","finally","createStylesRequestObject","_ref6","textColor","_ref7","colors","weight","generateNewVideo","scenesInCall","msg","selectedScene","onScenesUpdated","updatedScenes","updatedFonts","hex","prevState","handleGenerateVideo","handleGenerate","textErrorMessages","errorMessages","updatingText","maxLengthOfText","activeTemplate","getTextSizeLimitation","haveTextError","haveErrorInScenes","textErrorForSelectedScene","prevScenes","disableGenerate","EditVideoPageComponent","isOpen","setIsOpen","isDialog","loadClipchampPlayer","onApply","instrumentation","_useNavigationState","useNavigationState","showPreviewVideoModal","noBorderStyle","outline","handleCopilotBannerFetchSucceeded","isDisplayPlus","isMMA","isSignup","skipBusinessNameRecommendation","_useEditVideoAdsViewS","parentContainer","parentElement","onHandleApply","newVideo","handleTextListChange","deepClone","cloneIt","selectedSceneTextData","shortHeadlines","ShortHeadlines","cloneCopilotRecommendedAssets","newTheme","Themes","filteredRecommendations","Cta","IsCustomerIdInExclusionList","onCloseVideoPreview","handleSelectNextScene","handleSelectPreviousScene","isPreviousDisabled","isNextDisabled","VideoEditContent","FluentProvider","theme","webLightTheme","PreviewClipchampVideoModal","show","onClose","ChevronLeftRegular","ChevronRightRegular","Send16Regular","isMultiline","onDismiss","dismissButtonAriaLabel","Drawer","modalType","open","separator","DrawerHeader","DrawerHeaderTitle","action","Dismiss24Regular","DrawerBody","DrawerFooter","VideoTemplateEditorWithAddImageWrapperImp","assetLibraryConfig","assetLibraryUserPreferences","assetLibraryAccountPreferences","ianaTimeZone","copilotDomainDataService","setShowAddImagePanel","setMinSizeOfImage","setShowAddLogoPanel","setBrandKit","setIsLoadingBrandKit","setTemplateDetail","setRawAudioList","InstrumentationContext","onImageAddError","errorCode","Code","getImageValidationErrorMessage","useCopilotRepositoryContext","getBrandKits","useBrandKitService","brandKitDataService","fetchBrandKits","_yield$getBrandKits","sent","fetchTemplateDetails","_callee2","templateFilter","_yield$copilotDomainD","_context2","TemplateIds","getVideoTemplates","Templates","t0","fetchAudioList","_callee3","_yield$copilotDomainD2","_context3","getAudioList","abrupt","minSize","VideoTemplateEditorWithAddImageWrapper","withInstrumentation","withLoggingContext","withRecommendationContext","withCopilotDomainDataService","withDefaultStyles","_ref$palette","extensionEditorStyles","EditVideoPageComponentWithDataServices","withAssetLibraryServicesLoaded","loggerTag","VideoTemplateEditorContextWrapper","isAADUser","isLiteLandingPageEnabled","isAssetLibraryAIGCMVPEnabled","timeZone","preferencesService","activityLogger","dateFormat","useClipchamp","dynamic","VideoTemplateUI","CampaignFetchProvider","accountTimeZone","allowedAssetType","FolderAssetType","defaultIconClass","mergeStyles","getIconClass","colorString","selectors","svg","padTime","time","floor","toString","padStart","Time","currentTime","duration","durationString","currentTimeString","VideoPureComponent","muteByDefault","autoPlay","onVideoLoaded","iconColor","showTime","showPlay","customPlayObject","videoElement","volumeVisible","setVolumeVisible","paused","setPaused","muted","setMuted","ended","setEnded","setCurrentTime","setDuration","iconClass","onplay","onpause","onended","ontimeupdate","onloadeddata","playIconName","videoContainer","previewVideo","onLoadedData","Fragment","IconButton","Slider","sliderContainer","max","showValue","v","onMouseOver","onFocus","videoPlayBig","videoPause","fillRule","clipRule","videoReplay","videoMute","videoUnmute","prototype","FailedPlaceholder","failed","Icon","placeholderContent","EncodingPlaceholder","encoding","UnverifiedPlaceholder","unverified","commonParentStyles","iconCommonStyles","getPlaceholderStyle","to","transform","animation","borderBottom","FailedPlaceholderWithStyle","EncodingPlaceholderWithStyle","UnverifiedPlaceholderWithStyle","Video","cursor"],"sourceRoot":""}