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IAAIH,EAAM,EAAQ,QAMlBv3G,EAAOx1B,QAJP,SAAkBgtI,GAAS,IAAoCC,EAAhCC,EAAW,GAAqCC,EAAmBH,GAAU,CAAC,EAG4O,OAHxO,SAAU3mH,EAAM3e,GAAiBA,IAClJwlI,GAAsB,mDAEtBA,EAAWA,EAAW,SAAsBH,EAAIK,OAAO,OAASH,EAAa5mH,GAAQ,GAAK4mH,GAAe,SAAyB,EAAE94H,KAAKxW,KAAK,SAAUwvI,EAAgBA,EAAgB9mH,KAAmB,qBAAPA,KAAmBA,UAAKlpB,EAAU,eAAgBgwI,EAAgBA,EAAgBzlI,WAA+B,qBAAbA,WAAyBA,gBAAWvK,GAAoB+vI,CAAS,0BCL/V,EAAQ,QAOlB13G,EAAOx1B,QALP,SAAkBgtI,GAAS,IAAIE,EAAW,GAAqCC,EAAmBH,GAAU,CAAC,EAI4E,OAJxE,SAAUhkD,GAAgBkkD,GAAsB,uJAC7JlkD,IACJkkD,GAAsB,wCAEtBA,GAAsB,QAAwB,EAAE/4H,KAAKxW,KAAK,kBAAmBwvI,EAAgBA,EAAgBnkD,cAAqC,qBAAhBA,cAA4BA,mBAAc7rF,GAAoB+vI,CAAS,sBCNzM,SAASoD,EAAoBlkD,GAC5B,IAAIvgF,EAAI,IAAI9Q,MAAM,uBAAyBqxF,EAAM,KAEjD,MADAvgF,EAAEuD,KAAO,mBACHvD,CACP,CACAykI,EAAoBv5G,KAAO,WAAa,MAAO,EAAI,EACnDu5G,EAAoB7tE,QAAU6tE,EAC9BA,EAAoBzuI,GAAK,OACzB2zB,EAAOx1B,QAAUswI","sources":["../../../../static-resource-legacy/packages/ad-constants/adConstants.js","../../../../static-resource-legacy/packages/api-error-mapper-service/apiErrorMapper.js","../../../../static-resource-legacy/packages/app/router/lib/url.js","../../../../static-resource-legacy/packages/async-scheduler/asyncScheduler.js","../../../../static-resource-legacy/packages/app/config/template.js","../../../../static-resource-legacy/packages/bulk-edit/bulkEdit/bulkEditRepository.js","../../../../static-resource-legacy/packages/bulk-edit/model/campaign/changeBudget.js","../../../../static-resource-legacy/packages/bulk-edit/model/campaign/changeCashbackBudget.js","../../../../static-resource-legacy/packages/bulk-edit/model/campaign/changeCashbackPercent.js","../../../../static-resource-legacy/packages/bulk-edit/model/campaign/changeStatus.js","../../../../static-resource-legacy/packages/bulk-edit/model/shared/changeBiddingStrategy.js","../../../../static-resource-legacy/packages/bulk-edit/model/shared/changeRsaAutoAssets.js","../../../../static-resource-legacy/packages/bulk-edit/bulkEdit/jobStatePoller.js","../../../../static-resource-legacy/packages/bulk-edit-cache-service/BulkEditCacheService.js","../../../../static-resource-legacy/packages/bulk-edit/view/bulkEditJob.js","../../../../static-resource-legacy/packages/bulk-edit/viewmodel/campaign/changeBudget.js","../../../../static-resource-legacy/packages/bulk-edit/view/campaign/changeBudget.js","../../../../static-resource-legacy/packages/bulk-edit/viewmodel/campaign/changeCashbackBudget.js","../../../../static-resource-legacy/packages/bulk-edit/view/campaign/changeCashbackBudget.js","../../../../static-resource-legacy/packages/bulk-edit/view/campaign/changeCashbackPercent.js","../../../../static-resource-legacy/packages/bulk-edit/viewmodel/campaign/changeStatus.js","../../../../static-resource-legacy/packages/bulk-edit/view/campaign/changeStatus.js","../../../../static-resource-legacy/packages/bulk-edit/model/copypaste/copyPaste.js","../../../../static-resource-legacy/packages/bulk-edit/viewmodel/copypaste/copyPaste.js","../../../../static-resource-legacy/packages/bulk-edit/view/copypaste/copyPaste.js","../../../../static-resource-legacy/packages/bulk-edit/view/copyPaste.js","../../../../static-resource-legacy/packages/bulk-edit/view/filterHelper.js","../../../../static-resource-legacy/packages/bulk-edit/model/label/association.js","../../../../static-resource-legacy/packages/bulk-edit/viewmodel/label/association.js","../../../../static-resource-legacy/packages/bulk-edit/view/label/association.js","../../../../static-resource-legacy/packages/bulk-edit/viewmodel/shared/changeBiddingStrategy.js","../../../../static-resource-legacy/packages/bulk-edit/view/shared/changeBiddingStrategy.js","../../../../static-resource-legacy/packages/bulk-edit/viewmodel/shared/changeRsaAutoAssets.js","../../../../static-resource-legacy/packages/bulk-edit/view/shared/changeRsaAutoAssets.js","../../../../static-resource-legacy/packages/bulk-edit/viewmodel/bulkEditJob.js","../../../../static-resource-legacy/packages/bulk-edit/viewmodel/shared/changeCashbackPercent.js","../../../../static-resource-legacy/packages/communication/adapter/odata-4.js","../../../../static-resource-legacy/packages/constants/index.js","../../../../static-resource-legacy/packages/directive/help.js","../../../../static-resource-legacy/packages/legacy/summary/InlineBudgetEditor.js","../../../../static-resource-legacy/packages/odata-filter-converter/odataFilterConverter.js","../../../../static-resource-legacy/packages/popup/popup.js","../../../../static-resource-legacy/packages/schema/bulkEdit/changeBidActions.js","../../../../static-resource-legacy/packages/schema/bulkEdit/changeBudgetActions.js","../../../../static-resource-legacy/packages/schema/bulkEdit/numericActionType.js","../../../../static-resource-legacy/packages/schema/bulkEdit/resultsStatus.js","../../../../static-resource-legacy/packages/schema/bulkEdit/status.js","../../../../static-resource-legacy/packages/schema/campaign/budgetTypes.js","../../../../static-resource-legacy/packages/schema/campaign/status.js","../../../../static-resource-legacy/packages/shared/view/gridHelper.js","../../../../static-resource-legacy/packages/sinon-legacy/index.js","../../../../static-resource-legacy/packages/uservoice-service/uservoice.js","../../../../summary-tabs/packages/ad-previews/src/responsiveAd/responsive-ad-template.js","../../../../summary-tabs/packages/ad-previews/src/dynamicSearchAd/dynamic-search-ad-template.js","../../../../summary-tabs/packages/campaigns-grid/demo/mock/dummy-js-data-resource.js","../../../../summary-tabs/packages/campaigns-grid/demo/mock/dummy-data-source.js","../../../../summary-tabs/packages/campaigns-grid/demo/mock/schema.js","../../../../summary-tabs/packages/campaigns-grid/index.js","../../../../summary-tabs/packages/campaigns-landscape-progress/src/view.js","../../../../summary-tabs/packages/campaigns-grid/src/bid-landscape/index.js","../../../../summary-tabs/packages/campaigns-grid/src/instrumentation-schema.js","../../../../summary-tabs/packages/campaigns-grid/src/new-pkg/tooltips/fluctuation-tooltip.js","../../../../summary-tabs/packages/campaigns-grid/src/new-pkg/tooltips/budget-center-help-tooltip.js","../../../../summary-tabs/packages/campaigns-grid/src/new-pkg/tooltips/conversion-status-popup.js","../../../../summary-tabs/packages/campaigns-grid/src/filter-entity-util.js","../../../../summary-tabs/packages/campaigns-grid/src/new-pkg/campaigns-grid.js","../../../../summary-tabs/packages/linkedin-delivery-status-column/src/request-permission.js","../../../../summary-tabs/packages/campaigns-grid/src/new-pkg/show-rejection-reasons.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/campaign-id.js","../../../../summary-tabs/packages/campaigns-language/src/inline-editor-viewmodel.js","../../../../summary-tabs/packages/campaigns-language/src/inline-editor-view.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/campaign-languages.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/campaign-type.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/campaign.js","../../../../summary-tabs/packages/campaigns-grid/src/campaign-status.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/status-icon.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/bid-strategy-target-cpa.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/bid-strategy-target-roas.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/bid-strategy-manual-cpi.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/bid-strategy-manual-cpc.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/inline-editable/date-save.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/start-date.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/end-date.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/bid-strategy-target-impression-share.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/optimization-score.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/performance-insights.js","../../../../summary-tabs/packages/campaigns-grid/src/columns/index.js","../../../../summary-tabs/packages/campaigns-grid/src/new-pkg/plugin-config.js","../../../../summary-tabs/packages/campaigns-grid/src/new-pkg/grid-config.js","../../../../summary-tabs/packages/campaigns-grid/demo/mock/edm.js","../../../../summary-tabs/packages/campaigns-grid/src/new-pkg/plugins.js","../../../../summary-tabs/packages/campaigns-grid/src/new-pkg/campaigns-grid-factory.js","../../../../summary-tabs/packages/date-inline-edit-prompt/src/date-inline-edit-view.js","../../../../summary-tabs/packages/date-inline-edit-prompt/src/date-inline-editable-column-prompt.js","../../../../summary-tabs/packages/grid-tooltip/src/callout-with-lock.js","../../../../summary-tabs/packages/grid-tooltip/src/index.js","../../../../summary-tabs/packages/rsa-ad-customizer-attribute-column/src/inline-editor-view.js","../../../../summary-tabs/packages/rsa-ad-customizer-attribute-column/src/style.js","../../../../summary-tabs/packages/rsa-ad-customizer-attribute-column/src/column.js","../../../../summary-tabs/packages/rsa-ad-customizer-attribute-column/src/editorial-reasons/get-editorial-reasons.js","../../../../summary-tabs/packages/rsa-ad-customizer-attribute-column/src/editorial-reasons/show-rejection-reasons.js","../../../../target-recommendation/packages/inline-location-recommendation/src/base-location-recommendation-model.js","../../../../target-recommendation/packages/inline-location-recommendation/src/model.js","../../../../target-recommendation/packages/inline-location-recommendation/src/view.js","../../../../target-recommendation/packages/inline-location-recommendation/src/inline-location-recommendation-dialog.js","../../../../target-recommendation/packages/inline-location-recommendation/src/inline-location-recommendation-panel.js","../../../../target-recommendation/packages/location-recommendation-grid/src/column/location.js","../../../../target-recommendation/packages/location-recommendation-grid/src/column/impression.js","../../../../target-recommendation/packages/location-recommendation-grid/src/column/dismiss.js","../../../../target-recommendation/packages/location-recommendation-grid/src/column/campaign.js","../../../../target-recommendation/packages/location-recommendation-grid/src/view.js","../../standard-shopping-wizard/src/constants.js","../../standard-shopping-wizard/src/steps/step-utils.js","../../standard-shopping-wizard/src/steps/summary/use-summary-schema-data.js","../../standard-shopping-wizard/src/steps/summary/summary-step.js","../../standard-shopping-wizard/src/steps/summary/schema.js","../../standard-shopping-wizard/src/model/campaign-criterions.js","../../standard-shopping-wizard/src/model/campaign.js","../../standard-shopping-wizard/src/model/ad-group-criterions.js","../../standard-shopping-wizard/src/model/ad-group.js","../../standard-shopping-wizard/src/model/ad-group-bulk.js","../../standard-shopping-wizard/src/model/campaign-bulk.js","../../standard-shopping-wizard/src/shared/styles/collapsible-panel.js","../../standard-shopping-wizard/src/shared/use-wizard-log.js","../../standard-shopping-wizard/src/shared/get-product-data.js","../../standard-shopping-wizard/src/steps/summary/use-summary-repository.js","../../standard-shopping-wizard/src/steps/campaign-settings/component/setting-configs.js","../../standard-shopping-wizard/src/steps/campaign-settings/component/product-filter.js","../../standard-shopping-wizard/src/steps/campaign-settings/component/store-setting.js","../../standard-shopping-wizard/src/steps/campaign-settings/component/bmc-redirect.js","../../standard-shopping-wizard/src/steps/campaign-settings/component/campaign-priority.js","../../standard-shopping-wizard/src/steps/campaign-settings/styles.js","../../standard-shopping-wizard/src/shared/pannel-header.js","../../standard-shopping-wizard/src/steps/campaign-settings/campaign-settings-shell.js","../../standard-shopping-wizard/src/steps/campaign-settings/use-campaign-repository.js","../../standard-shopping-wizard/src/steps/adgroup-settings/utils.js","../../standard-shopping-wizard/src/steps/adgroup-settings/components/device-target.js","../../standard-shopping-wizard/src/steps/adgroup-settings/components/targeting-preferences.js","../../standard-shopping-wizard/src/steps/adgroup-settings/components/ad-rotation.js","../../standard-shopping-wizard/src/steps/adgroup-settings/target-shell.js","../../standard-shopping-wizard/src/steps/adgroup-settings/adgroup-settings.js","../../standard-shopping-wizard/src/steps/adgroup-settings/use-target-repository.js","../../standard-shopping-wizard/src/steps/budget-and-bids/styles.js","../../standard-shopping-wizard/src/steps/budget-and-bids/budget-bid-step.js","../../standard-shopping-wizard/src/steps/budget-and-bids/use-budget-bid-repository.js","../../standard-shopping-wizard/src/steps/step-config.js","../../standard-shopping-wizard/src/steps/step-lists.js","../../standard-shopping-wizard/src/footer.js","../../standard-shopping-wizard/src/index.js","../../standard-shopping-wizard/src/steps/adgroup-settings/components/ad-distribution.js","../../table-page-container/src/virtual-scrollbar.js","../../table-page-container/src/scrollbar.js","../../table-page-container/src/table-page-container.js","../../table-page-state-manager/src/index.js","feature-bootstrap/i18n-utils.js","feature-bootstrap/legacy-bootstrap-utils.js","feature-bootstrap/performance-lazy-deps.js","feature-bootstrap/performance-deps.js","../../../../static-resource-legacy/packages/bulk-edit/template/campaign/actionLink.pug","../../../../static-resource-legacy/packages/bulk-edit/template/campaign/association.pug","../../../../static-resource-legacy/packages/bulk-edit/template/campaign/changeBudget.pug","../../../../static-resource-legacy/packages/bulk-edit/template/campaign/changeCashbackBudget.pug","../../../../static-resource-legacy/packages/bulk-edit/template/campaign/changeCashbackPercent.pug","../../../../static-resource-legacy/packages/bulk-edit/template/campaign/changeStatus.pug","../../../../static-resource-legacy/packages/bulk-edit/template/copypaste/copyPasteAd.pug","../../../../static-resource-legacy/packages/bulk-edit/template/copypaste/copyPasteAdGroup.pug","../../../../static-resource-legacy/packages/bulk-edit/template/copypaste/copyPasteAssetGroup.pug","../../../../static-resource-legacy/packages/bulk-edit/template/copypaste/copyPasteCampaign.pug","../../../../static-resource-legacy/packages/bulk-edit/template/copypaste/copyPasteKeyword.pug","../../../../static-resource-legacy/packages/bulk-edit/template/footer.pug","../../../../static-resource-legacy/packages/bulk-edit/template/label/association.pug","../../../../static-resource-legacy/packages/bulk-edit/template/shared/changeBiddingStrategy.pug","../../../../static-resource-legacy/packages/bulk-edit/template/shared/changeRsaAutoAssets.pug","../../../../static-resource-legacy/packages/bulk-edit/template/status.pug","../../../../static-resource-legacy/packages/shared/template/popup.pug","../../../../summary-tabs/packages/ad-previews/src/dynamicSearchAd/template.pug","../../../../summary-tabs/packages/ad-previews/src/responsiveAd/template.pug","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/bid-strategy-target-cpa.pug","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/bid-strategy-target-roas.pug","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/budget.pug","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/campaign-languages-template.pug","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/campaign-type-template.pug","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/campaign.pug","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/optimization-score.pug","../../../../summary-tabs/packages/campaigns-grid/src/columns/attributes/performance-insights.pug","../../../../summary-tabs/packages/campaigns-landscape-progress/src/template.pug","../../../../summary-tabs/packages/campaigns-language/src/inline-editor-template.pug","../../../../summary-tabs/packages/linkedin-delivery-status-column/src/request-permission-template.pug","../../../../summary-tabs/packages/quality-score/src/content.pug","../../../../summary-tabs/packages/quality-score/src/title.pug","../../../../summary-tabs/packages/rsa-ad-customizer-attribute-column/src/rsa-ad-customizer-attribute-template.pug","../../../../target-recommendation/packages/inline-location-recommendation/src/inline-template.pug","../../../../target-recommendation/packages/inline-location-recommendation/src/location-grid-account-template.pug","../../../../target-recommendation/packages/inline-location-recommendation/src/location-grid-campaign-template.pug","../../../../target-recommendation/packages/inline-location-recommendation/src/location-grid-template.pug","../../../../target-recommendation/packages/location-recommendation-grid/src/column/dismiss-column-template.pug","../../../../target-recommendation/packages/location-recommendation-grid/src/column/location-column-template.pug","../../../../target-recommendation/packages/location-recommendation-grid/src/template.pug","../../../../static-resource-legacy/packages/sinon-legacy|sync"],"sourcesContent":["/* eslint-disable */\r\nvar maxAdTitleLength = 25, maxAdDescriptionLength = 71, maxTextDisplayUrlLength = 35, maxUrlLength = 1024, maxAppStoreIdLength = 1024, maxEditorialAppealJustificationLength = 1000;\r\nexport default {\r\n maxAdTitleLength: maxAdTitleLength,\r\n maxAdDescriptionLength: maxAdDescriptionLength,\r\n maxTextDisplayUrlLength: maxTextDisplayUrlLength,\r\n maxUrlLength: maxUrlLength,\r\n maxAppStoreIdLength: maxAppStoreIdLength,\r\n maxEditorialAppealJustificationLength: maxEditorialAppealJustificationLength\r\n};\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nfunction mapCampaignApiErrorCode(errorCode, args) {\r\n var i18nArgs = ['Error_Campaign_API_' + errorCode, errorCode ? errorCode : i18n.getString('Error')];\r\n if (args) {\r\n i18nArgs = i18nArgs.concat(args);\r\n }\r\n return i18n.getStringOrDefault.apply(i18n, i18nArgs);\r\n}\r\nfunction mapCampaignApiErrorCodeShort(errorCode, args) {\r\n var i18nArgs = ['Error_Campaign_API_' + errorCode + '_Short'].concat(args);\r\n return i18n.getString.apply(i18n, i18nArgs);\r\n}\r\nfunction mapEditorialErrorCode(apiErrorCode, rawErrorCode) {\r\n return rawErrorCode ? i18n.getString('Error_Editorial_Raw_' + rawErrorCode) : i18n.getString('Error_Editorial_API_' + apiErrorCode);\r\n}\r\nfunction _mapSingleEditorialError(error, countryKey, countryName) {\r\n return _.extend({\r\n countryKey: countryKey,\r\n countryName: countryName,\r\n message: mapEditorialErrorCode(error.Error, error.RawEditorialErrorCode)\r\n }, error);\r\n}\r\nfunction _mapSingleCountryErrors(countryErrors) {\r\n var countryName = i18n.getString('PublisherCountry_' + countryErrors.Key);\r\n return {\r\n countryKey: countryErrors.Key,\r\n countryName: countryName,\r\n errors: _.map(countryErrors.Value, function (error) {\r\n return _mapSingleEditorialError(error, countryErrors.Key, countryName);\r\n })\r\n };\r\n}\r\nfunction mapEditorialErrors(errors, flatten) {\r\n if (!_.isArray(errors) || errors.length === 0) {\r\n return [];\r\n }\r\n var grouppedErrors = _.map(errors, _mapSingleCountryErrors);\r\n return !flatten ? grouppedErrors : _.chain(grouppedErrors).pluck('errors').flatten().value();\r\n}\r\nexport default {\r\n mapCampaignApiErrorCode: mapCampaignApiErrorCode,\r\n mapEditorialErrorCode: mapEditorialErrorCode,\r\n mapEditorialErrors: mapEditorialErrors,\r\n mapCampaignApiErrorCodeShort: mapCampaignApiErrorCodeShort\r\n};\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nfunction build(pattern, param) {\r\n var url = pattern || '';\r\n _.each(param, function (value, key, list) {\r\n if (_.first(key) != '$') {\r\n if (!_.isUndefined(value)) {\r\n var str = value;\r\n if (_.isObject(value)) {\r\n str = encodeURIComponent(JSON.stringify(value));\r\n }\r\n url = url.replace(new RegExp('\\\\(?/:' + key + '\\\\)?'), '/' + str);\r\n }\r\n }\r\n });\r\n url = url.replace(/(\\w+?)\\/:(\\1)_id\\//g, '');\r\n url = url.replace(/\\((.*?)\\)/g, '');\r\n return url;\r\n}\r\nfunction isOptional(pattern, key) {\r\n var reg = new RegExp('\\\\(/:' + key + '\\\\)');\r\n return !_.isNull(reg.exec(pattern));\r\n}\r\nfunction isValidString(value) {\r\n return !(_.isString(value) && value[0] === ':');\r\n}\r\nfunction check(pattern, param) {\r\n return _.every(param, function (value, key, list) {\r\n return isOptional(pattern, key) ? isValidString(value) : !_.isUndefined(value) && !_.isNull(value) && isValidString(value);\r\n });\r\n}\r\nexport default {\r\n build: build,\r\n check: check\r\n};\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport backbone from 'backbone';\r\nvar defaults = {\r\n schedule: undefined,\r\n task: undefined,\r\n asyncInterface: 'promise',\r\n timeout: 0,\r\n cancellationToken: undefined,\r\n overlapping: 'allow'\r\n};\r\nvar Task = function (options) {\r\n this.options = _.defaults({}, options, defaults);\r\n if (!this.options.schedule) {\r\n throw new Error('asyncScheduler: schedule option must be provided');\r\n }\r\n if (!this.options.task) {\r\n throw new Error('asyncScheduler: task option must be provided');\r\n }\r\n};\r\nTask.prototype.start = function () {\r\n this.isRunning = true;\r\n this._scheduleNext();\r\n return this;\r\n};\r\nTask.prototype.stop = function () {\r\n this.isRunning = false;\r\n if (this.next) {\r\n clearTimeout(this.next);\r\n }\r\n return this;\r\n};\r\nTask.prototype._scheduleNext = function (current) {\r\n this.next = setTimeout(_.bind(this._iteration, this, current), this.options.schedule);\r\n};\r\nTask.prototype._iteration = function (previous) {\r\n if (previous && !previous.completed && this.options.overlapping === 'wait') {\r\n previous.isAwait = true;\r\n return;\r\n }\r\n var iteration = this._startTask();\r\n if (this.isRunning === true) {\r\n this._scheduleNext(iteration);\r\n if (this.options.timeout) {\r\n this._scheduleTimeout(iteration);\r\n }\r\n }\r\n};\r\nTask.prototype._startTask = function () {\r\n var iteration = {\r\n completed: false,\r\n isOverlapped: false\r\n };\r\n if (this.options.asyncInterface === 'callback') {\r\n var callback = _.bind(this._callback, this, iteration);\r\n iteration.token = this.options.task(callback);\r\n } else {\r\n iteration.token = this.options.task();\r\n iteration.token.then(_.bind(this._callback, this, iteration, null), _.bind(this._callback, this, iteration));\r\n }\r\n return iteration;\r\n};\r\nTask.prototype._callback = function (iteration, error, data) {\r\n if (iteration.completed) {\r\n return;\r\n }\r\n clearTimeout(iteration.timeout);\r\n iteration.completed = true;\r\n if (iteration.isAwait) {\r\n this._iteration(iteration);\r\n }\r\n this.trigger(error ? 'error' : 'success', {\r\n error: error,\r\n data: data,\r\n stopTask: _.bind(this.stop, this)\r\n });\r\n};\r\nTask.prototype._scheduleTimeout = function (iteration) {\r\n if (this.options.cancellationToken && !_.isFunction(iteration.token[this.options.cancellationToken])) {\r\n throw new Error('asyncScheduler: \"cancel\" function is not found in task returned value');\r\n }\r\n iteration.timeout = setTimeout(_.bind(this._processTimeout, this, iteration), this.options.timeout);\r\n};\r\nTask.prototype._processTimeout = function (iteration) {\r\n if (this.options.cancellationToken) {\r\n iteration.token[this.options.cancellationToken]();\r\n }\r\n iteration.completed = true;\r\n if (iteration.isAwait) {\r\n this._iteration(iteration);\r\n }\r\n this.trigger('timeout', {\r\n stopTask: _.bind(this.stop, this)\r\n });\r\n};\r\n_.extend(Task.prototype, backbone.Events);\r\nvar createTask = function (options) {\r\n return new Task(options);\r\n};\r\nexport default {\r\n createTask: createTask\r\n};\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nfunction run(app) {\r\n _.templateSettings = {\r\n interpolate: /\\{\\{(.+?)\\}\\}/g\r\n };\r\n}\r\nexport default {\r\n run: run\r\n};\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport odata from '@bingads-webui-static-legacy/communication/channel/odata';\r\nimport resultsStatus from '@bingads-webui-static-legacy/schema/bulkEdit/resultsStatus';\r\nimport * as alertHelper from '@bingads-webui-campaign/alert-helper';\r\nimport templateConfig from '@bingads-webui-static-legacy/app/config/template';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\ntemplateConfig.run();\r\nvar urlTmpls = _.mapObject({\r\n getJobs: '/Advertiser/Customers()/Accounts()/BulkEditSessions?$top={{top}}&$skip={{skip}}',\r\n getSingleJob: '/Advertiser/Customers()/{{accountInUrl ? \\'Accounts()/\\' : \\'\\'}}BulkEditSessions(\\'{{jobId}}\\')?',\r\n getJobResults: '/Advertiser/Customers()/{{accountInUrl ? \\'Accounts()/\\' : \\'\\'}}BulkEditSessions(\\'{{jobId}}\\')/BulkEditResults?$top={{top}}&$skip={{skip}}',\r\n filterSuffix: '&$filter={{statusFilter}}'\r\n}, function (url) {\r\n return _.template(url);\r\n}), exports = {};\r\nfunction getHistory(skip, take) {\r\n return odata.get(urlTmpls.getJobs({\r\n skip: skip,\r\n top: take\r\n })).then(function (response) {\r\n return {\r\n items: _.map(response.value, mapJobObject),\r\n total: response['@odata.count']\r\n };\r\n }).catch(function (response) {\r\n var errors = response && response.errorResponseBody && response.errorResponseBody.value ? response.errorResponseBody.value : [];\r\n var isCustomerMigrationError = _.find(errors, function (item) {\r\n return item.Code === 'CustomerUnderMigration';\r\n });\r\n if (isCustomerMigrationError) {\r\n var alert = new alertHelper.AlertHelper({\r\n i18n: i18n\r\n });\r\n var migrationMsg = i18n.getString('Error_Campaign_API_CustomerUnderMigration');\r\n alert.showError(migrationMsg);\r\n }\r\n });\r\n}\r\n;\r\nfunction mapJobObject(job) {\r\n return _.extend({}, job, {\r\n CreationTime: job.CreationTime && new Date(job.CreationTime),\r\n CompletionTime: job.CompletionTime && new Date(job.CompletionTime)\r\n });\r\n}\r\nfunction getJobs(jobModels) {\r\n if (!jobModels || jobModels.length === 0) {\r\n throw new Error('Provided Jobs array is empty or undefined');\r\n }\r\n var singleModel = jobModels.length === 1 ? jobModels[0] : null;\r\n if (singleModel) {\r\n return odata.get(urlTmpls.getSingleJob({\r\n jobId: singleModel.id,\r\n accountInUrl: singleModel.attributes.Entity !== 'Account'\r\n })).then(function (jobData) {\r\n return [mapJobObject(jobData)];\r\n });\r\n }\r\n return exports.getJobsByIds(_.pluck(jobModels, 'id'));\r\n}\r\n;\r\nfunction getJobsByIds(jobIds) {\r\n return getHistory(0, 20).then(function (jobsData) {\r\n return _.filter(jobsData.items, function (job) {\r\n return _.contains(jobIds, job.Id);\r\n });\r\n });\r\n}\r\nfunction getJobResults(jobId, statusFilter, skip, take, entity) {\r\n var url = urlTmpls.getJobResults({\r\n jobId: jobId,\r\n top: take,\r\n skip: skip,\r\n accountInUrl: !entity || entity !== 'Account'\r\n });\r\n var filter = '';\r\n if (statusFilter === resultsStatus.OnlyErrors) {\r\n filter = 'Errors/any() or EditorialErrors/any()';\r\n } else if (statusFilter === resultsStatus.OnlySuccessful) {\r\n filter = 'not (Errors/any() or EditorialErrors/any())';\r\n }\r\n if (filter !== '') {\r\n url += urlTmpls.filterSuffix({\r\n statusFilter: filter\r\n });\r\n }\r\n return odata.get(url);\r\n}\r\nexport default _.extend(exports, {\r\n getHistory: getHistory,\r\n getJobsByIds: getJobsByIds,\r\n getJobs: getJobs,\r\n getJobResults: getJobResults\r\n});\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport Backbone from 'backbone';\r\nimport BaseModel from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\n'use strict;';\r\nvar model = BaseModel.extend({\r\n defaults: $.extend({}, BaseModel.prototype.defaults, {\r\n Entity: 'Campaign',\r\n BatchAction: {\r\n Actions: [{\r\n '@odata.type': '#Model.NumericAction',\r\n 'Property': 'Budget/Amount',\r\n 'ActionType': 'Set',\r\n 'Value': '',\r\n 'SearchString': '',\r\n 'Options': 'None'\r\n }]\r\n }\r\n })\r\n});\r\nexport default model;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport Backbone from 'backbone';\r\nimport BaseModel from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\n'use strict;';\r\nvar model = BaseModel.extend({\r\n defaults: $.extend({}, BaseModel.prototype.defaults, {\r\n Entity: 'Campaign',\r\n BatchAction: {\r\n Actions: [{\r\n '@odata.type': '#Model.NumericAction',\r\n 'Property': 'Budget/Amount',\r\n 'ActionType': 'Set',\r\n 'Value': '',\r\n 'SearchString': '',\r\n 'Options': 'None'\r\n }]\r\n }\r\n })\r\n});\r\nexport default model;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport Backbone from 'backbone';\r\nimport BaseModel from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\n'use strict;';\r\nvar model = BaseModel.extend({\r\n defaults: $.extend({}, BaseModel.prototype.defaults, {\r\n Entity: 'Campaign',\r\n BatchAction: {\r\n Actions: [{\r\n '@odata.type': '#Model.NumericAction',\r\n 'Property': 'BidAmount/Bid/Amount',\r\n 'ActionType': 'SetToAmount'\r\n }]\r\n }\r\n })\r\n});\r\nexport default model;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport Backbone from 'backbone';\r\nimport BaseModel from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\n'use strict;';\r\nvar model = BaseModel.extend({\r\n defaults: $.extend({}, BaseModel.prototype.defaults, {\r\n Entity: 'Campaign',\r\n BatchAction: {\r\n Actions: [{\r\n '@odata.type': '#Model.TextAction',\r\n 'Property': 'Status',\r\n 'ActionType': 'Set',\r\n 'Value': '',\r\n 'SearchString': '',\r\n 'Options': 'None'\r\n }]\r\n }\r\n })\r\n});\r\nexport default model;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport Backbone from 'backbone';\r\nimport BaseModel from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\n'use strict;';\r\nvar model = BaseModel.extend({\r\n defaults: $.extend({}, BaseModel.prototype.defaults, {\r\n Entity: 'Campaign',\r\n BatchAction: {\r\n Actions: [{\r\n '@odata.type': '#Model.TextAction',\r\n 'Property': 'BiddingScheme',\r\n 'ActionType': 'Set',\r\n 'Value': '{\"Type\":1}'\r\n }]\r\n }\r\n })\r\n});\r\nexport default model;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport BaseModel from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\n'use strict;';\r\nvar model = BaseModel.extend({\r\n defaults: $.extend({}, BaseModel.prototype.defaults, {\r\n Entity: 'Campaign',\r\n BatchAction: {\r\n Actions: [{\r\n '@odata.type': '#Model.TextAction',\r\n 'Property': 'CampaignSettings/RSAAutoGeneratedAssetsEnabled',\r\n 'ActionType': 'Set',\r\n 'Value': '',\r\n 'SearchString': '',\r\n 'Options': 'None'\r\n }]\r\n }\r\n })\r\n});\r\nexport default model;\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport backbone from 'backbone';\r\nimport scheduler from '@bingads-webui-static-legacy/async-scheduler';\r\nimport repository from '@bingads-webui-static-legacy/bulk-edit/bulkEdit/bulkEditRepository';\r\nimport bulkEditStatus from '@bingads-webui-static-legacy/schema/bulkEdit/status';\r\nvar Poller = function (options) {\r\n this._options = options || ({});\r\n this.successiveFailureCount = 0;\r\n this.recurringTask = scheduler.createTask({\r\n task: _.bind(this._taskIteration, this),\r\n schedule: this._options.schedule || 2000\r\n });\r\n this.recurringTask.on('success', _.bind(this._successHandler, this));\r\n this.recurringTask.on('error', _.bind(this._errorHandler, this));\r\n};\r\nPoller.prototype.maxSuccessiveFailureCount = 6;\r\nPoller.prototype.start = function (jobModels) {\r\n this._jobModels = new backbone.Collection(jobModels);\r\n if (this._getPendingJobs().length > 0) {\r\n this.recurringTask.start();\r\n }\r\n return this;\r\n};\r\nPoller.prototype.stop = function () {\r\n this.recurringTask.stop();\r\n return this;\r\n};\r\nPoller.prototype._taskIteration = function () {\r\n return repository.getJobs(this._getPendingJobs());\r\n};\r\nPoller.prototype._successHandler = function (eventArgs) {\r\n var self = this;\r\n this.successiveFailureCount = 0;\r\n if (eventArgs && eventArgs.data && _.isArray(eventArgs.data)) {\r\n _.each(eventArgs.data, function (jobData) {\r\n self._jobModels.get(jobData.Id).set(jobData);\r\n });\r\n }\r\n if (this._options.success && _.isFunction(this._options.success)) {\r\n this._options.success(this._jobModels);\r\n }\r\n if (this._getPendingJobs().length === 0) {\r\n eventArgs.stopTask();\r\n }\r\n};\r\nPoller.prototype._errorHandler = function (eventArgs) {\r\n this.successiveFailureCount++;\r\n if (this.maxSuccessiveFailureCount <= this.successiveFailureCount) {\r\n this.recurringTask.stop();\r\n if (this._options.error && _.isFunction(this._options.error)) {\r\n this._options.error(eventArgs);\r\n }\r\n }\r\n};\r\nPoller.prototype._getPendingJobs = function () {\r\n return this._jobModels.filter(function (model) {\r\n return model.get('Status') === bulkEditStatus.inProgress || model.get('Status') === bulkEditStatus.pendingStart || model.get('Status') === 'PendingFileUpload';\r\n });\r\n};\r\nexport default Poller;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport repository from '@bingads-webui-static-legacy/bulk-edit/bulkEdit/bulkEditRepository';\r\nimport Poller from '@bingads-webui-static-legacy/bulk-edit/bulkEdit/jobStatePoller';\r\nimport JobModel from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\nimport bulkEditStatus from '@bingads-webui-static-legacy/schema/bulkEdit/status';\r\nimport cacheManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nvar getPendingJobs = function (jobs) {\r\n return _.filter(jobs, function (item) {\r\n var status = item.get('Status');\r\n return status === bulkEditStatus.inProgress || status === bulkEditStatus.pendingStart || status === 'PendingFileUpload';\r\n });\r\n};\r\nvar successHandler = function (pendingJobModels) {\r\n var jobs = _.filter(pendingJobModels.models, function (item) {\r\n var status = item.get('Status');\r\n return status === bulkEditStatus.completed || status === bulkEditStatus.completedWithErrors || status === bulkEditStatus.failed;\r\n });\r\n if (jobs && jobs.length > 0) {\r\n cacheManager.updateContext(['KeywordGrid']);\r\n }\r\n};\r\nexport default {\r\n init: function () {\r\n repository.getHistory(0, 20).then(function (response) {\r\n if (response && response.items && response.items.length > 0) {\r\n var poller = new Poller({\r\n success: successHandler,\r\n schedule: 7000\r\n });\r\n var jobModels = _.map(response.items, function (item) {\r\n return new JobModel(item);\r\n });\r\n var pendingJobModels = getPendingJobs(jobModels);\r\n pendingJobModels.length > 0 && poller.start(pendingJobModels);\r\n }\r\n });\r\n }\r\n};\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport legacy_jquery from 'jquery';\r\nimport status from '@bingads-webui-static-legacy/schema/bulkEdit/status';\r\nimport resultsStatus from '@bingads-webui-static-legacy/schema/bulkEdit/resultsStatus';\r\nimport StatusPoller from '@bingads-webui-static-legacy/bulk-edit/bulkEdit/jobStatePoller';\r\nimport cacheManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport filterConverter from '@bingads-webui-static-legacy/odata-filter-converter';\r\nimport * as filterMetadataToLegacy from '@bingads-webui/filter-commons';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport * as _AppEventDelegator from '@bingads-webui-component-legacy/app-event-delegator/index';\r\nimport blockerExtension from '@bingads-webui-static-legacy/extension/promise/withUiBlock';\r\nimport repository from '@bingads-webui-static-legacy/bulk-edit/bulkEdit/bulkEditRepository';\r\nimport errorMapper from '@bingads-webui-static-legacy/api-error-mapper-service';\r\nimport gridFilterSerializer from '@bingads-webui-campaign-legacy/bulk-operation/util/grid-filter-serializer';\r\nimport * as toast from '@bingads-webui-component-legacy/toast/index';\r\nimport gridHelper from '@bingads-webui-static-legacy/shared/view/gridHelper';\r\nimport cacheService from '@bingads-webui-static-legacy/bulk-edit-cache-service';\r\nimport actionMap from '@bingads-webui-static-legacy/summary/SummaryGridsActionMap';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport legacyRouter from '@bingads-webui-component-legacy/legacy-router/index';\r\nimport setting from '@bingads-webui-static-legacy/instrumentation/campaignSchemaAndSetting';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport constants from '@bingads-webui-static-legacy/instrumentation/constants';\r\nimport appState from '@bingads-webui-component-legacy/state/index';\r\nimport '@bingads-webui-static-legacy/instrumentation/instrumentation';\r\nvar osd = window.osd;\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar activePollers = 0;\r\nvar AppEventDelegator = _AppEventDelegator.default;\r\nvar vNextCacheNotify = function vNextCacheNotify(context, skipEntityCallPaths) {\r\n var entity = context.model.get('Entity');\r\n cacheManager.successEmitter.trigger('invalidate', entity, skipEntityCallPaths);\r\n};\r\nvar onProgressNotification = function () {\r\n var currentStatus = this.model.get('Status');\r\n if (currentStatus === status.pendingStart || currentStatus === 'PendingFileUpload') {\r\n return;\r\n }\r\n var totalCount = this.model.get('TotalRowCount');\r\n var successCount = this.model.get('SuccessRowCount');\r\n var errorCount = this.model.get('ErrorRowCount');\r\n this.ko_model.totalCount(totalCount);\r\n this.ko_model.successCount(successCount);\r\n this.ko_model.errorCount(errorCount);\r\n if (_.isFunction(this.getProgressText)) {\r\n this.ko_model.statusText(this.getProgressText().replace('{1}', totalCount).replace('{0}', successCount + errorCount));\r\n }\r\n if (currentStatus === status.completed) {\r\n if (activePollers > 0) {\r\n activePollers -= 1;\r\n this.onJobSuccess(this.model);\r\n this.refresh();\r\n this.refreshGrid();\r\n }\r\n vNextCacheNotify(this);\r\n } else if (currentStatus === status.completedWithErrors) {\r\n this.ko_model.completedWithErrorsBulkEditResultsString(i18n.getString('CampaignAdGroupCopyPaste_CompletedWithErrorsText_NewUI'));\r\n activePollers -= 1;\r\n this.onJobFailure();\r\n this.showErrors();\r\n this.ko_model.showButtonBar(false);\r\n this.ko_model.showCloseButton(true);\r\n if (this.model.get('SuccessRowCount') > 0) {\r\n gridHelper.refresh(this.grid);\r\n this.refreshGrid();\r\n }\r\n vNextCacheNotify(this);\r\n } else if (currentStatus === status.failed && this.operationCancelled) {\r\n activePollers -= 1;\r\n this.refresh();\r\n } else if (currentStatus === status.failed) {\r\n activePollers -= 1;\r\n if (!this.handleUserError()) {\r\n legacy_jquery.advertiser.ajaxError();\r\n }\r\n }\r\n};\r\nvar getDateRangeQueryArgs = function () {\r\n try {\r\n var dateRange;\r\n if (!!osd && !!osd.ui && !!osd.ui.Controls && !!osd.ui.Controls.DateRangeFilter && _.isFunction(osd.ui.Controls.DateRangeFilter.getParsedDateRange)) {\r\n dateRange = osd.ui.Controls.DateRangeFilter.getParsedDateRange();\r\n } else {\r\n dateRange = window.App && window.App.state ? window.App.state.get('$daterange') : null;\r\n }\r\n var startdate = dateRange.start.getMonth() + 1 + '/' + dateRange.start.getDate() + '/' + dateRange.start.getFullYear(), enddate = dateRange.end.getMonth() + 1 + '/' + dateRange.end.getDate() + '/' + dateRange.end.getFullYear();\r\n return 'startdate=' + startdate + '&enddate=' + enddate;\r\n } catch (e) {\r\n return '';\r\n }\r\n};\r\nvar view = Backbone.View.extend({\r\n initialize: function (options) {\r\n this.poller = new StatusPoller({\r\n success: _.bind(onProgressNotification, this),\r\n error: function () {\r\n legacy_jquery.advertiser.ajaxError();\r\n }\r\n });\r\n this.grid = options.grid;\r\n this.isSkipEntityCache = options.isSkipEntityCache;\r\n this.onOperationSuccess = options.onOperationSuccess;\r\n this.onOperationFailure = options.onOperationFailure;\r\n this.instrumentationActivity = options.activity;\r\n this.eventDelegator = _.result({}, 'eventDelegator', new AppEventDelegator());\r\n },\r\n render: function () {\r\n this.$el.html(this.template({\r\n i18n: i18n,\r\n PageContext: PageContext,\r\n viewModel: this.ko_model,\r\n isForVNext: true\r\n }));\r\n if (this.$el.length > 0) {\r\n ko.cleanNode(this.$el[0]);\r\n }\r\n ko.applyBindings(this.ko_model, this.$el[0]);\r\n _.bindAll(this, 'submitJob', 'previewChanges', 'hideView', 'hideProgress', 'cancelJob', 'stopCopyPaste');\r\n this.$('#save').click(this.submitJob);\r\n this.$('#preview').click(this.previewChanges);\r\n this.$('#cancel').click(this.cancelJob);\r\n this.$('#runInBackground').click(this.hideProgress);\r\n this.$('#close').click(this.hideView);\r\n this.$('#stopCopyPaste').click(this.stopCopyPaste);\r\n var link = 'javascript:void(0);';\r\n this.$('#historyPageLink').attr('href', link);\r\n var firstVisibleEnabledElement = this.$el.find(':input:enabled:visible:first');\r\n if (_.isFunction(firstVisibleEnabledElement.focus)) {\r\n firstVisibleEnabledElement.focus();\r\n }\r\n return this;\r\n },\r\n events: function () {\r\n return {\r\n 'click a#historyPageLink': function () {\r\n legacyRouter.legacyRouter.navigateToRoute('bulk_edit');\r\n }\r\n };\r\n },\r\n hideView: function () {\r\n this.$el.empty();\r\n gridHelper.onBulkEditViewHide(this, this.grid);\r\n },\r\n hideProgress: function () {\r\n this.$el.empty();\r\n cacheService.init();\r\n gridHelper.onBulkEditViewHide(this, this.grid);\r\n },\r\n stopCopyPaste: function () {\r\n this.showPreview(false);\r\n var cId = PageContext.CurrentCustomer.Id;\r\n var aId = PageContext.CurrentAccount.Id;\r\n var sessionId = this.model.get('Id');\r\n var url = '/Customers(' + cId + ')/Accounts(' + aId + ')/BulkEditSessions(\\'' + sessionId + '\\')/Default.Cancel';\r\n odata.get(url, {\r\n data: null\r\n }).catch(function () {\r\n return null;\r\n });\r\n this.operationCancelled = true;\r\n },\r\n getCurrentFilter: function () {\r\n var filters = {}, idBased = false;\r\n if (!this.ko_model.ignoreRowSelection() && gridHelper.allPageSelected(this.grid)) {\r\n if (this.grid && (this.grid.filterService || this.grid.pgridPlugins && this.grid.pgridPlugins.filterService)) {\r\n var filterServiceFilters = (this.grid.filterService || this.grid.pgridPlugins.filterService).getCombinedFilter();\r\n filters.FilterExpressions = filterMetadataToLegacy.toLegacyFilter(filterServiceFilters);\r\n } else if (this.grid && this.grid.pgridPlugins) {\r\n if (this.grid.pgridPlugins.filterState) {\r\n var pluginFilters = this.grid.pgridPlugins.filterState.getAllFilters();\r\n filters.FilterExpressions = filterMetadataToLegacy.toLegacyFilter(pluginFilters);\r\n } else if (this.grid.pgridPlugins.filter) {\r\n var pluginFilters = this.grid.pgridPlugins.filter.getCurrentFilter();\r\n filters.FilterExpressions = filterMetadataToLegacy.toLegacyFilter(pluginFilters);\r\n }\r\n } else {\r\n filters = this.grid.getFilters(true);\r\n }\r\n } else if (_.isFunction(this.getIdFilter)) {\r\n idBased = true;\r\n filters = this.getIdFilter();\r\n if (this.grid && (this.grid.filterService || this.grid.pgridPlugins && this.grid.pgridPlugins.filterService)) {\r\n filterServiceFilters = (this.grid.filterService || this.grid.pgridPlugins.filterService).getCombinedFilter();\r\n var additionalFilterExpressions = filterMetadataToLegacy.toLegacyFilter(filterServiceFilters);\r\n if (additionalFilterExpressions && additionalFilterExpressions.length >= 2 && additionalFilterExpressions[0]['SelectedColumn'] === 'Criterion' && additionalFilterExpressions[1]['SelectedColumn'] === 'LevelOfDetails') {\r\n filters.FilterExpressions = _.union(additionalFilterExpressions, filters.FilterExpressions);\r\n }\r\n }\r\n }\r\n if (_.isFunction(this.getCustomFilter)) {\r\n var customFilter = this.getCustomFilter(filters) || ({\r\n FilterExpressions: []\r\n });\r\n if (filters && filters.FilterExpressions) {\r\n filters.FilterExpressions = _.union(filters.FilterExpressions, customFilter.FilterExpressions);\r\n } else {\r\n filters = {\r\n FilterExpressions: customFilter.FilterExpressions\r\n };\r\n }\r\n }\r\n return {\r\n FilterExpressions: filters && filters.FilterExpressions || [],\r\n idBased: idBased\r\n };\r\n },\r\n getFilterURLParam: function (filter, entity) {\r\n return filterConverter.convertToURLParam(filter.FilterExpressions, entity);\r\n },\r\n getCurrentSelection: function (simulateResults) {\r\n var entity = this.model.get('Entity');\r\n var query = null, campaignId = -1, adGroupId = -1, dateRangeQs = null, filter = this.getCurrentFilter();\r\n if (this.ko_model.ignoreRowSelection()) {\r\n if (_.isFunction(this.getCampaignId)) {\r\n campaignId = this.getCampaignId();\r\n }\r\n if (_.isFunction(this.getAdGroupId)) {\r\n adGroupId = this.getAdGroupId();\r\n }\r\n if (_.isFunction(this.getDateRangeQuery)) {\r\n dateRangeQs = this.getDateRangeQuery();\r\n }\r\n } else {\r\n campaignId = Number(legacy_jquery.advertiser.getUrlParameter('cmpid')) || Number(appState.get('campaign_id'));\r\n adGroupId = Number(legacy_jquery.advertiser.getUrlParameter('adgid')) || Number(appState.get('adgroup_id'));\r\n dateRangeQs = getDateRangeQueryArgs();\r\n }\r\n if (simulateResults) {\r\n var pageSize = gridHelper.getPageSize(this.grid);\r\n var currentPage = gridHelper.getCurrentPage(this.grid);\r\n var sortInfo = gridHelper.getSortInfo(entity, this.grid);\r\n query = '$top=' + pageSize + '&$skip=' + currentPage * pageSize + '&$orderby=' + sortInfo;\r\n }\r\n if (filter) {\r\n var addendum = dateRangeQs ? dateRangeQs : '';\r\n var filterURLParam = this.getFilterURLParam(filter, entity);\r\n if (filterURLParam) {\r\n if (addendum) {\r\n addendum += '&';\r\n }\r\n addendum += filterURLParam;\r\n }\r\n query = query === null ? addendum : query + '&' + addendum;\r\n }\r\n return {\r\n 'QueryString': query,\r\n 'CampaignId': campaignId > 0 ? campaignId : null,\r\n 'AdGroupId': adGroupId > 0 ? adGroupId : null\r\n };\r\n },\r\n onJobSuccess: function (model) {\r\n if (_.isFunction(this.onOperationSuccess)) {\r\n this.onOperationSuccess(model);\r\n }\r\n },\r\n onJobFailure: function (model) {\r\n if (_.isFunction(this.onOperationFailure)) {\r\n this.onOperationFailure(model);\r\n }\r\n },\r\n onValidateFailure: function () {},\r\n refresh: function () {\r\n gridHelper.refresh(this.grid, this.hideView.bind(this));\r\n },\r\n submitJob: function () {\r\n this.showPreview(false);\r\n this.makeChanges(false);\r\n },\r\n cancelJob: function () {\r\n this.hideView();\r\n },\r\n previewChanges: function () {\r\n this.makeChanges(true);\r\n },\r\n isValuesArrayEmpty: function (filterExpressions) {\r\n var isEmpty = false;\r\n if (filterExpressions.length > 0) {\r\n _.each(filterExpressions, function (item) {\r\n if (item.Values.length === 0) {\r\n isEmpty = true;\r\n }\r\n });\r\n }\r\n return isEmpty;\r\n },\r\n makeChanges: (function (simulateResults) {\r\n activePollers = 0;\r\n if (this.ko_model.ignoreRowSelection() || this.hasSelectedEntities()) {\r\n if (this.ko_model.validate(this)) {\r\n if (!simulateResults) {\r\n this.ko_model.isDisabled(true);\r\n }\r\n this.model.unset('PreviewEntityIds');\r\n if (simulateResults) {\r\n this.model.url = 'Advertiser/Customers()/Accounts()/BulkEditSessions?$expand=BulkEditResults&preview=true';\r\n if (gridHelper.allPageSelected(this.grid)) {\r\n this.model.set('PreviewEntityIds', gridHelper.getSelectedEntityIds(this.grid));\r\n }\r\n } else {\r\n var isCustomerLevelLabel = this._scope && this._scope === 'Customer';\r\n var accountValueInUrl = isCustomerLevelLabel ? '' : 'Accounts()/';\r\n this.model.url = 'Advertiser/Customers()/' + accountValueInUrl + 'BulkEditSessions?';\r\n }\r\n if (_.isFunction(this.setAction)) {\r\n this.setAction(simulateResults);\r\n }\r\n this.model.set('Selection', this.getCurrentSelection(simulateResults));\r\n var currentFilter = this.getCurrentFilter();\r\n if (currentFilter.idBased && this.isValuesArrayEmpty(currentFilter.FilterExpressions)) {\r\n this.refresh();\r\n return;\r\n }\r\n if (!currentFilter.idBased && (_.contains(currentFilter.FilterExpressions, null) || _.contains(currentFilter.FilterExpressions, undefined))) {\r\n try {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'bulkeditsessions/makeChanges/nullFilter', JSON.stringify({\r\n BatchAction: this.model.get('BatchAction'),\r\n filter: currentFilter\r\n }));\r\n } catch (ex) {}\r\n }\r\n this.model.set('Description', gridFilterSerializer.toDescription(currentFilter));\r\n legacy_jquery.advertiser.clearErrorSummary();\r\n if (actionMap) {\r\n actionMap.registerActionMapExtension('bulkeditsessions', _.bind(this.model.updateSummaryDataContext, this.model));\r\n }\r\n this.model.save({}, {\r\n success: _.bind(function (model) {\r\n let skipEntityCallPaths = null;\r\n if (this.isSkipEntityCache && currentFilter.idBased && currentFilter.FilterExpressions.length > 0) {\r\n const entityName = this.model.get('Entity');\r\n skipEntityCallPaths = _.flatten(_.map(currentFilter.FilterExpressions, filterExpressions => _.map(filterExpressions.Values, value => `${entityName}s(${value})`)));\r\n }\r\n vNextCacheNotify(this, skipEntityCallPaths);\r\n if (this.model.attributes.BatchAction.Actions) {\r\n _.each(this.model.attributes.BatchAction.Actions, function (element, index) {\r\n if (element['@odata.type'] === '#Model.TextAction' && element.ActionType === 'Set' && element.Property === 'Status' && element.Value === 'Excluded') {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'bulkeditsessions/AudienceBulkEditExclusion', '{\"result\": \"1\"}');\r\n } else if (element['@odata.type'] === '#Model.AudienceAssociationAction' && element.AssociationList && element.ExclusionList) {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'bulkeditsessions/AdgroupAudienceExclusionList', '{\"result\": \"1\", \"AssociationList\": \"' + element.AssociationList.length + '\", \"ExclusionList\": \"' + element.AssociationList.length + '\"}');\r\n }\r\n });\r\n }\r\n var currentStatus = model.get('Status');\r\n if (model.url && model.url.toLowerCase().indexOf('preview=true') > 0) {\r\n this.ko_model.totalCount(model.get('TotalRowCount'));\r\n var results = model.get('BulkEditResults');\r\n if (_.isFunction(this.formatPreviewResults)) {\r\n results = this.formatPreviewResults(results, model);\r\n }\r\n this.ko_model.currentPageChangeCount(results.length);\r\n this.ko_model.results(results);\r\n this.showPreview(true);\r\n } else if (currentStatus === status.pendingStart || currentStatus === 'PendingFileUpload') {\r\n this.showProgress(true);\r\n this.ko_model.showCheckBoxes(false);\r\n this.ko_model.showButtonBar(false);\r\n activePollers += 1;\r\n this.poller.start(model);\r\n } else if (currentStatus === status.completed) {\r\n this.onJobSuccess(model);\r\n this.refresh();\r\n } else if (currentStatus === status.completedWithErrors) {\r\n this.onJobFailure(model);\r\n this.ko_model.errorCount(this.model.get('ErrorRowCount'));\r\n this.showErrors();\r\n this.ko_model.showButtonBar(false);\r\n this.ko_model.showCloseButton(true);\r\n if (this.model.get('SuccessRowCount') > 0) {\r\n gridHelper.refresh(this.grid);\r\n }\r\n if (this.ko_model.showPanel === false) {\r\n gridHelper.onBulkEditViewHide(this, this.grid);\r\n }\r\n }\r\n if (this.instrumentationActivity && _.isFunction(this.instrumentationActivity.stop)) {\r\n this.instrumentationActivity.stop();\r\n }\r\n }, this),\r\n error: _.bind(function (model, response) {\r\n if (this.model.attributes.BatchAction.Actions) {\r\n _.each(this.model.attributes.BatchAction.Actions, function (element, index) {\r\n if (element['@odata.type'] === '#Model.TextAction' && element.ActionType === 'Set' && element.Property === 'Status' && element.Value === 'Excluded') {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'bulkeditsessions/AudienceBulkEditExclusion', '{\"result\": \"0\"}');\r\n } else if (element['@odata.type'] === '#Model.AudienceAssociationAction' && element.AssociationList && element.ExclusionList) {\r\n logger.logMessage([constants.LOGCATEGORY.TRACE], constants.LOGLEVEL.INFO, 'bulkeditsessions/AdgroupAudienceExclusionList', '{\"result\": \"0\", \"AssociationList\": \"' + element.AssociationList.length + '\", \"ExclusionList\": \"' + element.AssociationList.length + '\"}');\r\n }\r\n });\r\n }\r\n var errors = response && response.responseJSON && response.responseJSON.value || [];\r\n if (_.isEmpty(errors) || !errors[0] || !errors[0].Code) {\r\n legacy_jquery.advertiser.ajaxError();\r\n } else {\r\n var code = errors[0].Code;\r\n var msg = errorMapper.mapCampaignApiErrorCodeShort(code) || errorMapper.mapCampaignApiErrorCode(code);\r\n legacy_jquery.advertiser.clearErrorSummary();\r\n legacy_jquery.advertiser.appendErrorSummary(msg);\r\n }\r\n }, this)\r\n }).withUiBlock();\r\n } else {\r\n this.onValidateFailure();\r\n }\r\n } else {\r\n alert(i18n.getString('Grid_RowSelectionRequired'));\r\n }\r\n }).asLoggingStart(setting.ACTIVITYNAME.BulkEditSessions, setting.SCENARIONAME.BulkEditSessions),\r\n showProgress: function (visibility) {\r\n this.ko_model.showProgress(visibility);\r\n },\r\n showPreview: function (visibility) {\r\n this.ko_model.showPreview(visibility);\r\n },\r\n showErrors: function () {\r\n repository.getJobResults(this.model.get('Id'), resultsStatus.OnlyErrors, 0, this.ko_model.maxInlineErrorCount, this.model.get('Entity')).withUiBlock().done(_.bind(function (response) {\r\n if (response && response.value) {\r\n _.each(response.value, function (item) {\r\n item.combinedErrors = this.localizeErrors(item);\r\n }, this);\r\n if (_.isFunction(this.formatErrors)) {\r\n response.value = this.formatErrors(response.value, this.model);\r\n }\r\n this.ko_model.inlineErrors(response.value);\r\n }\r\n this.ko_model.showProgress(false);\r\n this.ko_model.showErrors(true);\r\n this.$('.errorCountLink').off('click');\r\n this.$('.errorCountLink').click(_.bind(function () {\r\n this.ko_model.showErrorGrid(!this.ko_model.showErrorGrid());\r\n }, this));\r\n if (!_.isFunction(this.onOperationFailure) && !gridHelper.allPageSelected(this.grid)) {\r\n this.toastErrors();\r\n }\r\n }, this)).fail(legacy_jquery.advertiser.ajaxError);\r\n },\r\n refreshGrid: function () {\r\n if (PageContext.CurrentTabId == 'Campaign') {\r\n cacheManager.getContext('/campaign/NewCampaign/Create?');\r\n this.eventDelegator && this.eventDelegator.trigger('campaignReload');\r\n } else if (PageContext.CurrentTabId == 'AdGroup') {\r\n cacheManager.getContext('/campaign/MewAdGroup/Create?');\r\n this.eventDelegator && this.eventDelegator.trigger('adGroupReload');\r\n }\r\n },\r\n toastErrors: function () {\r\n var inlineErrors = _.map(this.ko_model.inlineErrors(), function (error) {\r\n return error.combinedErrors;\r\n });\r\n var toastErrors = new Set();\r\n _.each(inlineErrors, function (errors) {\r\n _.each(errors, function (error) {\r\n toastErrors.add(error);\r\n });\r\n });\r\n toastErrors.forEach(function (error) {\r\n toast.showError(error);\r\n });\r\n },\r\n handleUserError: function () {\r\n var userErrors = this.model.get('UserErrors');\r\n var customColumnErrors = _.chain(userErrors).map(function (userError) {\r\n if (userError.Code === 'CustomColumnIdIsInvalid') {\r\n return {\r\n ErrorCode: 'EntityDoesNotExist',\r\n Id: userError.Property.replace('CustomColumn', '')\r\n };\r\n }\r\n if (userError.Code === 'CustomColumnIsUnsupported') {\r\n return {\r\n ErrorCode: 'EntityIsUnsupported',\r\n Id: userError.Property.replace('CustomColumn', '')\r\n };\r\n }\r\n return null;\r\n }).compact().value();\r\n if (_.isEmpty(customColumnErrors)) {\r\n return false;\r\n }\r\n if (this.grid.gridView) {\r\n this.grid.gridView.trigger('hasInvalidOrDeletedCustomColumns', customColumnErrors);\r\n }\r\n this.onJobFailure();\r\n this.ko_model.showProgress(false);\r\n this.ko_model.showButtonBar(false);\r\n this.ko_model.showCloseButton(true);\r\n this.refreshGrid();\r\n window.App.views.alertCenter.toastWarning(i18n.getString('BulkEdit_Notification_CustomColumn_Errors'));\r\n return true;\r\n },\r\n updateSelectedEntityCount: function (count) {\r\n this.ko_model && this.ko_model.selectedEntityCount(count);\r\n },\r\n localizeErrors: function (entityResult) {\r\n var apiErrorMessages = _.isArray(entityResult.Errors) ? _.map(entityResult.Errors, function (error) {\r\n return errorMapper.mapCampaignApiErrorCodeShort(error) || errorMapper.mapCampaignApiErrorCode(error);\r\n }) : [], editorialErrors = _.isArray(entityResult.EditorialErrors) ? errorMapper.mapEditorialErrors(entityResult.EditorialErrors, true) : [];\r\n if (_.isFunction(this.transformErrors)) {\r\n this.transformErrors(editorialErrors);\r\n }\r\n var editorialErrorMessages = _.map(editorialErrors, function (error) {\r\n return i18n.getString('BulkEdit_HistoryJobDetails_EditorialError', error.countryName, error.message);\r\n });\r\n return apiErrorMessages.concat(editorialErrorMessages);\r\n },\r\n hasSelectedEntities: function () {\r\n var selectedRowIds = gridHelper.getSelectedRowIds(this.grid);\r\n return _.isArray(selectedRowIds) ? selectedRowIds.length > 0 : false;\r\n }\r\n});\r\nexport default view;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport ko from 'knockout';\r\nimport Base from '@bingads-webui-static-legacy/bulk-edit/viewmodel/bulkEditJob';\r\nimport actions from '@bingads-webui-static-legacy/schema/bulkEdit/changeBudgetActions';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { getBudgetRange } from '@bingads-webui-campaign-legacy/common-grid-config/budget/get-budget-range';\r\n\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar i18nAmdLoader = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaigns-tab/campaigns');\r\nvar OUT_OF_RANGE = 'OutOfRange';\r\nvar INVALID = 'InvalidNumber';\r\nvar budgetType = {\r\n monthly: 'Monthly',\r\n daily: 'Daily',\r\n lifetimeBudgetStandard: 'LifetimeBudgetStandard'\r\n};\r\nvar actionOptions = [{\r\n Value: actions.Set,\r\n Text: i18n.getString('BulkEdit_Campaign_SetBudgetOption')\r\n}, {\r\n Value: actions.Increase,\r\n Text: i18n.getString('BulkEdit_Campaign_IncreaseBudgetOption')\r\n}, {\r\n Value: actions.Decrease,\r\n Text: i18n.getString('BulkEdit_Campaign_DecreaseBudgetOption')\r\n}];\r\nvar unitOptions = [{\r\n Value: 'percentage',\r\n Text: '%'\r\n}, {\r\n Value: 'absolute',\r\n Text: PageContext.AccountCurrencyCode\r\n}];\r\nvar budgetTypeOptions = [{\r\n Value: budgetType.monthly,\r\n Text: i18n.getString('BulkEdit_Campaign_MonthlyBudget')\r\n}, {\r\n Value: budgetType.daily,\r\n Text: i18n.getString('BulkEdit_Campaign_DailyBudget')\r\n},{\r\n Value: budgetType.lifetimeBudgetStandard,\r\n Text: i18n.getString('BulkEdit_Campaign_LifetimeBudget')\r\n}];\r\nvar regEx = new RegExp(/^[0-9]*\\.?[0-9]+$/g);\r\nvar validateNumber = function (value, usePercentValidation, budgetValidation) {\r\n if (!i18nAmdLoader.isValidDecimal(value)) {\r\n return INVALID;\r\n }\r\n\r\n var minValue, maxValue;\r\n var budgetRange = getBudgetRange(PageContext.AccountCurrencyCode);\r\n\r\n if (budgetValidation === budgetType.daily) {\r\n minValue = usePercentValidation ? 0 : budgetRange.Daily.Min;\r\n maxValue = usePercentValidation ? Number.MAX_VALUE : budgetRange.Daily.Max;\r\n } else if (budgetValidation === budgetType.lifetimeBudgetStandard) {\r\n minValue = usePercentValidation ? 0 : budgetRange.Lifetime.Min;\r\n maxValue = usePercentValidation ? Number.MAX_VALUE : budgetRange.Lifetime.Max;\r\n }\r\n\r\n value = i18nAmdLoader.parseDecimal(value, 2).toString();\r\n if (value.match(regEx)) {\r\n if (value < minValue && !usePercentValidation || value <= minValue && usePercentValidation || value > maxValue) {\r\n return OUT_OF_RANGE;\r\n }\r\n } else {\r\n return INVALID;\r\n }\r\n return '';\r\n};\r\nvar ViewModel = function (model) {\r\n Base.call(this);\r\n this.actions = actionOptions;\r\n this.selectedAction = ko.observable(actions.Set);\r\n this.limitValueErrorMessage = ko.observable('');\r\n this.selectedAction.subscribe(function () {\r\n this.errorMessage('');\r\n this.limitValueErrorMessage('');\r\n }, this);\r\n this.budgetTypes = budgetTypeOptions;\r\n this.selectedBudget = ko.observable(model.get('budgetType'));\r\n if (ko.isObservable(model.get('budgetType'))) {\r\n model.get('budgetType').subscribe(function (newBudgetType) {\r\n this.selectedBudget(newBudgetType);\r\n }, this);\r\n }\r\n this.selectedBudget.subscribe(function () {\r\n this.errorMessage('');\r\n this.limitValueErrorMessage('');\r\n }, this);\r\n this.isDailyBudget = ko.computed(function () {\r\n return this.selectedBudget() === budgetType.daily;\r\n }, this);\r\n this.isLifetimeBudget = ko.computed(function () {\r\n return this.selectedBudget() === budgetType.lifetimeBudgetStandard;\r\n }, this);\r\n this.getLifetimeBudgetLabel = function () {\r\n if (this.isDailyBudget()) {\r\n return i18n.getString('BulkEdit_Campaign_DailyBudget');\r\n } else if (this.isLifetimeBudget()) {\r\n return i18n.getString('BulkEdit_Campaign_LifetimeBudget');\r\n }\r\n return '';\r\n }\r\n this.showSetPanel = ko.computed(function () {\r\n return this.selectedAction() === actions.Set;\r\n }, this);\r\n this.showChangeByPanel = ko.computed(function () {\r\n return this.selectedAction() === actions.Increase || this.selectedAction() === actions.Decrease;\r\n }, this);\r\n this.showIncreaseBudgetHelp = ko.computed(function () {\r\n return this.selectedAction() === actions.Increase;\r\n }, this);\r\n this.units = unitOptions;\r\n this.selectedUnit = ko.observable('percentage');\r\n this.budget = ko.observable();\r\n this.budgetValue = ko.computed({\r\n read: function () {\r\n return this.budget();\r\n },\r\n write: function (value) {\r\n this.errorMessage('');\r\n this.limitValueErrorMessage('');\r\n this.budget(value);\r\n },\r\n owner: this\r\n });\r\n this.limit = ko.observable();\r\n this.limitValue = ko.computed({\r\n read: function () {\r\n return this.limit();\r\n },\r\n write: function (value) {\r\n this.errorMessage('');\r\n this.limitValueErrorMessage('');\r\n this.limit(value);\r\n },\r\n owner: this\r\n });\r\n this.useLimitValue = ko.observable();\r\n this.limitBudgetLabelText = ko.computed(function () {\r\n if (this.selectedAction() === actions.Increase) return i18n.getString('BulkEdit_Campaign_UpperBudgetLimit'); else if (this.selectedAction() === actions.Decrease) return i18n.getString('BulKEdit_Campaign_LowerBudgetLimit');\r\n }, this);\r\n this.selectedEntityCount(model.get('selectedEntityCount'));\r\n this.titleText = ko.computed(function () {\r\n return i18n.getString('BulkEdit_Campaign_ChangeBudgetTitle').replace('{0}', this.selectedEntityCount());\r\n }, this);\r\n this.validate = function () {\r\n this.errorMessage('');\r\n if (this.selectedEntityCount() === 0) {\r\n alert(i18n.getString('Grid_RowSelectionRequired'));\r\n return false;\r\n }\r\n var selectedAction = this.selectedAction();\r\n var usePercentValidation = (selectedAction === actions.Increase || selectedAction === actions.Decrease) && this.selectedUnit() === 'percentage';\r\n var budgetValue = this.budgetValue();\r\n if (!budgetValue) {\r\n if (selectedAction === actions.Set) {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_MissingBudgetError'));\r\n } else {\r\n if (this.selectedUnit() === 'percentage') {\r\n this.errorMessage(i18n.getString('BulkEdit_Keyword_MissingPercentageError'));\r\n } else {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_MissingBudgetError'));\r\n }\r\n }\r\n return false;\r\n }\r\n if (budgetValue) {\r\n var result = validateNumber(budgetValue, usePercentValidation, this.selectedBudget());\r\n if (result === OUT_OF_RANGE) {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_BudgetOutOfRangeError'));\r\n return false;\r\n } else if (result === INVALID) {\r\n if (this.selectedUnit() === 'percentage') {\r\n this.errorMessage(i18n.getString('BulkEdit_Keyword_InvalidPercentageError'));\r\n } else {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_InvalidBudgetError'));\r\n }\r\n return false;\r\n }\r\n }\r\n if (this.useLimitValue() && selectedAction !== actions.Set) {\r\n var limit = this.limitValue();\r\n if (!limit) {\r\n this.limitValueErrorMessage(i18n.getString('BulkEdit_Campaign_MissingBudgetLimitError'));\r\n return false;\r\n } else {\r\n var result = validateNumber(limit, false, this.selectedBudget());\r\n if (result === OUT_OF_RANGE) {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_BudgetOutOfRangeError'));\r\n return false;\r\n } else if (result === INVALID) {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_InvalidBudgetError'));\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n };\r\n};\r\nexport default ViewModel;\r\n\r\n","/* eslint-disable */\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport ChangeBudgetViewModel from '@bingads-webui-static-legacy/bulk-edit/viewmodel/campaign/changeBudget';\r\nimport template from '@bingads-webui-static-legacy/bulk-edit/template/campaign/changeBudget.pug';\r\nimport ChangeBudgetModel from '@bingads-webui-static-legacy/bulk-edit/model/campaign/changeBudget';\r\nimport BaseView from '@bingads-webui-static-legacy/bulk-edit/view/bulkEditJob';\r\nimport numericActionTypes from '@bingads-webui-static-legacy/schema/bulkEdit/numericActionType';\r\nimport actions from '@bingads-webui-static-legacy/schema/bulkEdit/changeBudgetActions';\r\nimport decimalNumber from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport filterHelper from '@bingads-webui-static-legacy/bulk-edit/view/filterHelper';\r\nimport budgetTypes from '@bingads-webui-static-legacy/schema/campaign/budgetTypes';\r\nimport helpDirective from '@bingads-webui-static-legacy/directive/help';\r\nimport * as Persistence from '@bingads-webui-component-legacy/ko-persistence/observable-localstorage';\r\nimport * as instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar selectedUnitPreferenceName = 'WebApp.CampaignUI.CampaignGrid.changeBudget.selectedUnit.user(' + PageContext.CurrentUser.Id + ')';\r\nvar formatBudget = function (rows) {\r\n if (rows) {\r\n _.each(rows, function (value) {\r\n value.Entity = _.find(value.EntityKey, function (item) {\r\n return item.Key === 'CampaignName';\r\n });\r\n value.data = [];\r\n value.data.push({\r\n value: value.Entity && value.Entity.Value ? value.Entity.Value : '',\r\n isHtml: false\r\n });\r\n if (value.Changes && value.Changes.length) {\r\n value.data.push({\r\n value: decimalNumber.fromFloatToString(value.Changes[0].OriginalValue, 2),\r\n isHtml: false\r\n });\r\n value.data.push({\r\n value: decimalNumber.fromFloatToString(value.Changes[0].NewValue, 2),\r\n isHtml: false\r\n });\r\n } else {\r\n value.data.push({\r\n value: '',\r\n isHtml: false\r\n });\r\n value.data.push({\r\n value: '',\r\n isHtml: false\r\n });\r\n }\r\n });\r\n }\r\n return rows;\r\n};\r\nvar view = BaseView.extend({\r\n initialize: function (options) {\r\n var senario = instrumentation.default.bulkEditCampaignBudget.create();\r\n var activity = senario.bulkEditCampaignBudget.create();\r\n activity.start();\r\n options.activity = activity;\r\n BaseView.prototype.initialize.call(this, options);\r\n this.ko_model = new ChangeBudgetViewModel(this.model);\r\n this.template = template;\r\n Persistence.on(this.ko_model.selectedUnit, selectedUnitPreferenceName);\r\n },\r\n render: function () {\r\n BaseView.prototype.render.apply(this, arguments);\r\n helpDirective.run(this.$el);\r\n return this;\r\n },\r\n setAction: function () {\r\n var action = null;\r\n var selectedAction = this.ko_model.selectedAction();\r\n var limitValue = selectedAction !== actions.Set && this.ko_model.useLimitValue() ? decimalNumber.fromLocalToFloat(this.ko_model.limitValue()) : null;\r\n var budgetAmount = decimalNumber.fromLocalToFloat(this.ko_model.budgetValue());\r\n if (selectedAction === actions.Decrease) {\r\n budgetAmount *= -1;\r\n }\r\n var actionType = selectedAction === actions.Set ? numericActionTypes.setAmount : this.ko_model.selectedUnit() === 'percentage' ? numericActionTypes.changeByPercent : numericActionTypes.changeByAmount;\r\n action = {\r\n Actions: [{\r\n '@odata.type': '#Model.NumericAction',\r\n Property: 'Budget/Amount',\r\n ActionType: actionType,\r\n Value: budgetAmount,\r\n Limit: limitValue\r\n }]\r\n };\r\n this.model.set('BatchAction', action);\r\n },\r\n getIdFilter: function () {\r\n var filter = filterHelper.getIdFilter(this.grid, 'Campaign');\r\n return filter;\r\n },\r\n getProgressText: function () {\r\n return i18n.getString('BulkEdit_Campaigns_ProgressText');\r\n },\r\n getCustomFilter: function () {\r\n var value = this.ko_model.isDailyBudget() ? [budgetTypes.dailyAccelerated, budgetTypes.dailyStandard] : [budgetTypes.lifetimeBudgetStandard];\r\n return {\r\n FilterExpressions: [{\r\n SelectedColumn: 'BudgetType',\r\n SelectedOperator: 'Equal',\r\n Values: value\r\n }]\r\n };\r\n },\r\n formatErrors: function (errors) {\r\n return formatBudget(errors);\r\n },\r\n formatPreviewResults: function (results) {\r\n return formatBudget(results);\r\n }\r\n});\r\nexport default view;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport ko from 'knockout';\r\nimport Base from '@bingads-webui-static-legacy/bulk-edit/viewmodel/bulkEditJob';\r\nimport actions from '@bingads-webui-static-legacy/schema/bulkEdit/changeBudgetActions';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar i18nAmdLoader = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaigns-tab/campaigns');\r\nvar OUT_OF_RANGE = 'OutOfRange';\r\nvar INVALID = 'InvalidNumber';\r\nvar actionOptions = [{\r\n Value: actions.Set,\r\n Text: i18n.getString('BulkEdit_Campaign_SetBudgetOption')\r\n}, {\r\n Value: actions.Increase,\r\n Text: i18n.getString('BulkEdit_Campaign_IncreaseBudgetOption')\r\n}, {\r\n Value: actions.Decrease,\r\n Text: i18n.getString('BulkEdit_Campaign_DecreaseBudgetOption')\r\n}];\r\nvar unitOptions = [{\r\n Value: 'percentage',\r\n Text: '%'\r\n}, {\r\n Value: 'absolute',\r\n Text: PageContext.AccountCurrencyCode\r\n}];\r\nvar regEx = new RegExp(/^[0-9]*\\.?[0-9]+$/g);\r\nvar validateNumber = function (value, usePercentValidation) {\r\n if (!i18nAmdLoader.isValidDecimal(value)) {\r\n return INVALID;\r\n }\r\n var minValue = usePercentValidation ? 0 : PageContext.BudgetRange.DailyRange.FloorValue;\r\n var maxValue = usePercentValidation ? Number.MAX_VALUE : PageContext.BudgetRange.DailyRange.CeilingValue;\r\n value = i18nAmdLoader.parseDecimal(value, 2).toString();\r\n if (value.match(regEx)) {\r\n if (value < minValue && !usePercentValidation || value <= minValue && usePercentValidation || value > maxValue) {\r\n return OUT_OF_RANGE;\r\n }\r\n } else {\r\n return INVALID;\r\n }\r\n return '';\r\n};\r\nvar ViewModel = function (model) {\r\n Base.call(this);\r\n this.actions = actionOptions;\r\n this.selectedAction = ko.observable(actions.Set);\r\n this.selectedAction.subscribe(function () {\r\n this.errorMessage('');\r\n }, this);\r\n this.showSetPanel = ko.computed(function () {\r\n return this.selectedAction() === actions.Set;\r\n }, this);\r\n this.showChangeByPanel = ko.computed(function () {\r\n return this.selectedAction() === actions.Increase || this.selectedAction() === actions.Decrease;\r\n }, this);\r\n this.showIncreaseBudgetHelp = ko.computed(function () {\r\n return this.selectedAction() === actions.Increase;\r\n }, this);\r\n this.units = unitOptions;\r\n this.selectedUnit = ko.observable('percentage');\r\n this.budget = ko.observable();\r\n this.budgetValue = ko.computed({\r\n read: function () {\r\n return this.budget();\r\n },\r\n write: function (value) {\r\n this.errorMessage('');\r\n this.budget(value);\r\n },\r\n owner: this\r\n });\r\n this.limit = ko.observable();\r\n this.limitValue = ko.computed({\r\n read: function () {\r\n return this.limit();\r\n },\r\n write: function (value) {\r\n this.errorMessage('');\r\n this.limit(value);\r\n },\r\n owner: this\r\n });\r\n this.useLimitValue = ko.observable();\r\n this.limitBudgetLabelText = ko.computed(function () {\r\n if (this.selectedAction() === actions.Increase) return i18n.getString('BulkEdit_Campaign_UpperCashbackBudgetLimit'); else if (this.selectedAction() === actions.Decrease) return i18n.getString('BulKEdit_Campaign_LowerCashbackBudgetLimit');\r\n }, this);\r\n this.selectedEntityCount(model.get('selectedEntityCount'));\r\n this.titleText = ko.computed(function () {\r\n return i18n.getString('BulkEdit_Campaign_ChangeCashbackBudgetTitle').replace('{0}', this.selectedEntityCount());\r\n }, this);\r\n this.validate = function () {\r\n this.errorMessage('');\r\n if (this.selectedEntityCount() === 0) {\r\n alert(i18n.getString('Grid_RowSelectionRequired'));\r\n return false;\r\n }\r\n var selectedAction = this.selectedAction();\r\n var usePercentValidation = (selectedAction === actions.Increase || selectedAction === actions.Decrease) && this.selectedUnit() === 'percentage';\r\n var budgetValue = this.budgetValue();\r\n if (!budgetValue) {\r\n if (selectedAction === actions.Set) {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_MissingBudgetError'));\r\n } else {\r\n if (this.selectedUnit() === 'percentage') {\r\n this.errorMessage(i18n.getString('BulkEdit_Keyword_MissingPercentageError'));\r\n } else {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_MissingBudgetError'));\r\n }\r\n }\r\n return false;\r\n }\r\n if (budgetValue) {\r\n var result = validateNumber(budgetValue, usePercentValidation);\r\n if (result === OUT_OF_RANGE) {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_BudgetOutOfRangeError'));\r\n return false;\r\n } else if (result === INVALID) {\r\n if (this.selectedUnit() === 'percentage') {\r\n this.errorMessage(i18n.getString('BulkEdit_Keyword_InvalidPercentageError'));\r\n } else {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_InvalidBudgetError'));\r\n }\r\n return false;\r\n }\r\n }\r\n if (this.useLimitValue() && selectedAction !== actions.Set) {\r\n var limit = this.limitValue();\r\n if (!limit) {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_MissingBudgetLimitError'));\r\n return false;\r\n } else {\r\n var result = validateNumber(limit, false);\r\n if (result === OUT_OF_RANGE) {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_BudgetOutOfRangeError'));\r\n return false;\r\n } else if (result === INVALID) {\r\n this.errorMessage(i18n.getString('BulkEdit_Campaign_InvalidBudgetError'));\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n };\r\n};\r\nexport default ViewModel;\r\n\r\n","/* eslint-disable */\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport ChangeCashbackBudgetViewModel from '@bingads-webui-static-legacy/bulk-edit/viewmodel/campaign/changeCashbackBudget';\r\nimport template from '@bingads-webui-static-legacy/bulk-edit/template/campaign/changeCashbackBudget.pug';\r\nimport BaseView from '@bingads-webui-static-legacy/bulk-edit/view/bulkEditJob';\r\nimport numericActionTypes from '@bingads-webui-static-legacy/schema/bulkEdit/numericActionType';\r\nimport actions from '@bingads-webui-static-legacy/schema/bulkEdit/changeBudgetActions';\r\nimport decimalNumber from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport filterHelper from '@bingads-webui-static-legacy/bulk-edit/view/filterHelper';\r\nimport helpDirective from '@bingads-webui-static-legacy/directive/help';\r\nimport * as Persistence from '@bingads-webui-component-legacy/ko-persistence/observable-localstorage';\r\nimport * as instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar selectedUnitPreferenceName = 'WebApp.CampaignUI.CampaignGrid.changeCashbackBudget.selectedUnit.user(' + PageContext.CurrentUser.Id + ')';\r\nvar formatBudget = function (rows) {\r\n if (rows) {\r\n _.each(rows, function (value) {\r\n value.Entity = _.find(value.EntityKey, function (item) {\r\n return item.Key === 'CampaignName';\r\n });\r\n value.data = [];\r\n value.data.push({\r\n value: value.Entity && value.Entity.Value ? value.Entity.Value : '',\r\n isHtml: false\r\n });\r\n if (value.Changes && value.Changes.length) {\r\n value.data.push({\r\n value: decimalNumber.fromFloatToString(value.Changes[0].OriginalValue, 2),\r\n isHtml: false\r\n });\r\n value.data.push({\r\n value: decimalNumber.fromFloatToString(value.Changes[0].NewValue, 2),\r\n isHtml: false\r\n });\r\n } else {\r\n value.data.push({\r\n value: '',\r\n isHtml: false\r\n });\r\n value.data.push({\r\n value: '',\r\n isHtml: false\r\n });\r\n }\r\n });\r\n }\r\n return rows;\r\n};\r\nvar view = BaseView.extend({\r\n initialize: function (options) {\r\n var senario = instrumentation.default.bulkEditCampaignCashbackBudget.create();\r\n var activity = senario.bulkEditCampaignCashbackBudget.create();\r\n activity.start();\r\n options.activity = activity;\r\n BaseView.prototype.initialize.call(this, options);\r\n this.ko_model = new ChangeCashbackBudgetViewModel(this.model);\r\n this.template = template;\r\n Persistence.on(this.ko_model.selectedUnit, selectedUnitPreferenceName);\r\n },\r\n render: function () {\r\n BaseView.prototype.render.apply(this, arguments);\r\n helpDirective.run(this.$el);\r\n return this;\r\n },\r\n setAction: function () {\r\n var action = null;\r\n var selectedAction = this.ko_model.selectedAction();\r\n var limitValue = selectedAction !== actions.Set && this.ko_model.useLimitValue() ? decimalNumber.fromLocalToFloat(this.ko_model.limitValue()) : null;\r\n var budgetAmount = decimalNumber.fromLocalToFloat(this.ko_model.budgetValue());\r\n if (selectedAction === actions.Decrease) {\r\n budgetAmount *= -1;\r\n }\r\n var actionType = selectedAction === actions.Set ? numericActionTypes.setAmount : this.ko_model.selectedUnit() === 'percentage' ? numericActionTypes.changeByPercent : numericActionTypes.changeByAmount;\r\n action = {\r\n Actions: [{\r\n '@odata.type': '#Model.NumericAction',\r\n Property: 'CampaignCashback/MonthlyBudget',\r\n ActionType: actionType,\r\n Value: budgetAmount,\r\n Limit: limitValue\r\n }]\r\n };\r\n this.model.set('BatchAction', action);\r\n },\r\n getIdFilter: function () {\r\n var filter = filterHelper.getIdFilter(this.grid, 'Campaign');\r\n return filter;\r\n },\r\n getProgressText: function () {\r\n return i18n.getString('BulkEdit_Campaigns_ProgressText');\r\n },\r\n formatErrors: function (errors) {\r\n return formatBudget(errors);\r\n },\r\n formatPreviewResults: function (results) {\r\n return formatBudget(results);\r\n }\r\n});\r\nexport default view;\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport template from '@bingads-webui-static-legacy/bulk-edit/template/campaign/changeCashbackPercent.pug';\r\nimport viewModel from '@bingads-webui-static-legacy/bulk-edit/viewmodel/shared/changeCashbackPercent';\r\nimport BaseView from '@bingads-webui-static-legacy/bulk-edit/view/bulkEditJob';\r\nimport filterHelper from '@bingads-webui-static-legacy/bulk-edit/view/filterHelper';\r\nimport numericActionType from '@bingads-webui-static-legacy/schema/bulkEdit/numericActionType';\r\nimport decimalNumber from '@bingads-webui-component-legacy/humanize/decimal';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar formatBid = function (rows) {\r\n if (rows) {\r\n _.each(rows, function (value) {\r\n value.Entity = _.find(value.EntityKey, function (item) {\r\n return item.Key === 'CampaignName';\r\n });\r\n value.data = [];\r\n value.data.push({\r\n value: value.Entity && value.Entity.Value ? value.Entity.Value : '',\r\n isHtml: false\r\n });\r\n if (value.Changes && value.Changes.length) {\r\n var newValue = value.Changes[0].NewValue;\r\n var newValueText;\r\n if (+newValue === -1 || newValue === '') {\r\n newValueText = '-';\r\n } else {\r\n newValueText = decimalNumber.fromFloatToPercentString(value.Changes[0].NewValue, 2);\r\n }\r\n var originalValue = value.Changes[0].OriginalValue;\r\n value.data.push({\r\n value: originalValue === '' || +originalValue === -1 ? '-' : decimalNumber.fromFloatToPercentString(value.Changes[0].OriginalValue, 2),\r\n isHtml: false\r\n });\r\n value.data.push({\r\n value: newValueText,\r\n isHtml: false\r\n });\r\n } else {\r\n value.data.push({\r\n value: '',\r\n isHtml: false\r\n });\r\n value.data.push({\r\n value: '',\r\n isHtml: false\r\n });\r\n }\r\n });\r\n }\r\n return rows;\r\n ;\r\n};\r\nvar view = BaseView.extend({\r\n initialize: function (options) {\r\n this.options = options || ({});\r\n BaseView.prototype.initialize.apply(this, arguments);\r\n this.template = template;\r\n this.entityType = options.entityType;\r\n this.ko_model = new viewModel({\r\n isCampaignBulkEdit: true,\r\n cashbackPercentDescription: i18n.getString('BulkEdit_Campaign_CashbackPercentMessage')\r\n });\r\n },\r\n render: function () {\r\n BaseView.prototype.render.apply(this, arguments);\r\n return this;\r\n },\r\n setAction: function () {\r\n this.model.set('Entity', 'Campaign');\r\n var oDataType = '#Model.NumericAction';\r\n var oDataProperty = 'CampaignCashback/Percent';\r\n var actionType = numericActionType.setAmount;\r\n var action = {\r\n Actions: [{\r\n '@odata.type': oDataType,\r\n Property: oDataProperty,\r\n ActionType: actionType,\r\n Value: this.ko_model.getCashbackPercentValueByAction()\r\n }]\r\n };\r\n this.model.set('BatchAction', action);\r\n },\r\n getIdFilter: function () {\r\n var filter = filterHelper.getIdFilter(this.grid, 'Campaign');\r\n return filter;\r\n },\r\n formatErrors: function (errors) {\r\n return formatBid(errors);\r\n },\r\n formatPreviewResults: function (results) {\r\n return formatBid(results);\r\n },\r\n getProgressText: function () {\r\n return i18n.getString('BulkEdit_Campaigns_ProgressText');\r\n }\r\n});\r\nexport default view;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport ko from 'knockout';\r\nimport Base from '@bingads-webui-static-legacy/bulk-edit/viewmodel/bulkEditJob';\r\nimport campaignStatus from '@bingads-webui-static-legacy/schema/campaign/status';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar ViewModel = function (model) {\r\n Base.call(this);\r\n var status = model.get('BatchAction').Actions[0].Value;\r\n this.showPanel = true;\r\n this.selectedEntityCount(model.get('selectedEntityCount'));\r\n this.titleText = ko.computed(function () {\r\n if (status === campaignStatus.Deleted) {\r\n return i18n.getString('BulkEdit_Campaign_DeleteTitle').replace('{0}', this.selectedEntityCount());\r\n } else if (status === campaignStatus.Active) {\r\n return i18n.getString('BulkEdit_Campaign_ResumeTitle').replace('{0}', this.selectedEntityCount());\r\n } else {\r\n return i18n.getString('BulkEdit_Campaign_PauseTitle').replace('{0}', this.selectedEntityCount());\r\n }\r\n }, this);\r\n this.validate = function () {\r\n this.errorMessage('');\r\n if (this.selectedEntityCount() === 0) {\r\n alert(i18n.getString('Grid_RowSelectionRequired'));\r\n return false;\r\n }\r\n return true;\r\n };\r\n};\r\nexport default ViewModel;\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport StatusViewModel from '@bingads-webui-static-legacy/bulk-edit/viewmodel/campaign/changeStatus';\r\nimport template from '@bingads-webui-static-legacy/bulk-edit/template/campaign/changeStatus.pug';\r\nimport actionLinkTemplate from '@bingads-webui-static-legacy/bulk-edit/template/campaign/actionLink.pug';\r\nimport BaseView from '@bingads-webui-static-legacy/bulk-edit/view/bulkEditJob';\r\nimport filterHelper from '@bingads-webui-static-legacy/bulk-edit/view/filterHelper';\r\nimport gridHelper from '@bingads-webui-static-legacy/shared/view/gridHelper';\r\nimport urlUtil from '@bingads-webui-static-legacy/app/router/lib/url';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar formatStatus = function (rows) {\r\n if (rows) {\r\n _.each(rows, function (item) {\r\n item.Entity = _.find(item.EntityKey, function (item) {\r\n return item.Key === 'CampaignName';\r\n });\r\n item.data = [];\r\n item.data.push({\r\n value: item.Entity && item.Entity.Value ? item.Entity.Value : '',\r\n isHtml: false\r\n });\r\n if (item.Changes && item.Changes.length) {\r\n item.data.push({\r\n value: i18n.getString('EntityStatus_' + item.Changes[0].OriginalValue),\r\n isHtml: false\r\n });\r\n item.data.push({\r\n value: i18n.getString('EntityStatus_' + item.Changes[0].NewValue),\r\n isHtml: false\r\n });\r\n } else {\r\n item.data.push({\r\n value: '',\r\n isHtml: false\r\n });\r\n item.data.push({\r\n value: '',\r\n isHtml: false\r\n });\r\n }\r\n });\r\n }\r\n return rows;\r\n};\r\nvar view = BaseView.extend({\r\n initialize: function (options) {\r\n BaseView.prototype.initialize.apply(this, arguments);\r\n this.ko_model = new StatusViewModel(this.model);\r\n this.template = template;\r\n this.bulkEditUrl = options.bulkEditUrl;\r\n },\r\n render: function () {\r\n if (!gridHelper.isCrossPageAllSelected(this.grid)) {\r\n this.ko_model.showPanel = false;\r\n }\r\n BaseView.prototype.render.apply(this, arguments);\r\n if (!gridHelper.isCrossPageAllSelected(this.grid)) {\r\n this.submitJob();\r\n }\r\n return this;\r\n },\r\n showErrors: function () {\r\n if (this.ko_model.showPanel) {\r\n return BaseView.prototype.showErrors.apply(this, arguments);\r\n }\r\n var alertId = 'alert-bulkedit-campaignstatus';\r\n var message = i18n.getString('BulkEdit_CampaignStatus_PartialSuccess', this.model.get('ErrorRowCount'), this.model.get('TotalRowCount'));\r\n var actionLink = actionLinkTemplate({\r\n alertId: alertId,\r\n href: `${this.bulkEditUrl ? this.bulkEditUrl : ''}bulkeditoperation?cid=` + state.get('customer_id') + '&aid=' + state.get('account_id'),\r\n text: i18n.getString('BulkEdit_ViewDetails')\r\n });\r\n window.App.views.alertCenter.show({\r\n message: message + ' ' + actionLink,\r\n dismissible: true,\r\n level: 'Error'\r\n }, alertId);\r\n },\r\n getIdFilter: function () {\r\n return filterHelper.getIdFilter(this.grid, 'Campaign');\r\n },\r\n getProgressText: function () {\r\n return i18n.getString('BulkEdit_Campaigns_ProgressText');\r\n },\r\n formatPreviewResults: function (results) {\r\n return formatStatus(results);\r\n },\r\n formatErrors: function (errors) {\r\n return formatStatus(errors);\r\n }\r\n});\r\nexport default view;\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport BaseModel from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\nvar model = BaseModel.extend({\r\n defaults: _.extend({}, BaseModel.prototype.defaults, {\r\n Entity: '',\r\n BatchAction: {\r\n Actions: [{\r\n '@odata.type': '#Model.CopyAction',\r\n DestinationParentEntityIds: []\r\n }],\r\n EditCopy: false\r\n },\r\n Description: 'Copy Paste'\r\n })\r\n});\r\nexport default model;\r\n\r\n","/* eslint-disable */\r\nimport ko from 'knockout';\r\nimport Base from '@bingads-webui-static-legacy/bulk-edit/viewmodel/bulkEditJob';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport * as DatePicker from '@bingads-webui-campaign/campaigns-date-picker';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar disableKeywordDestinationUrl = PageContext.Permissions.IsKeywordDestinationURLDisabled;\r\nvar titleStrings = {\r\n 'ad': function (count) {\r\n if (count === 1) {\r\n return i18n.getString('BulkEdit_PasteOneAd_Title');\r\n } else if (count > 1) {\r\n return i18n.getString('BulkEdit_PasteNAds_Title', count);\r\n } else {\r\n return i18n.getString('BulkEdit_PasteUnknownAds_Title');\r\n }\r\n },\r\n 'keyword': function (count) {\r\n if (count === 1) {\r\n return i18n.getString('BulkEdit_PasteOneKeyword_Title');\r\n } else if (count > 1) {\r\n return i18n.getString('BulkEdit_PasteNKeywords_Title', count);\r\n } else {\r\n return i18n.getString('BulkEdit_PasteUnknownKeywords_Title');\r\n }\r\n },\r\n 'campaign': function (count) {\r\n if (count === 1) {\r\n return i18n.getString('BulkEdit_PasteOneCampaign_Title');\r\n } else if (count > 1) {\r\n return i18n.getString('BulkEdit_PasteNCampaigns_Title', count);\r\n } else {\r\n return i18n.getString('BulkEdit_PasteUnknownCampaigns_Title');\r\n }\r\n },\r\n 'adgroup': function (count) {\r\n if (count === 1) {\r\n return i18n.getString('BulkEdit_PasteOneAdGroup_Title');\r\n } else if (count > 1) {\r\n return i18n.getString('BulkEdit_PasteNAdGroups_Title', count);\r\n } else {\r\n return i18n.getString('BulkEdit_PasteUnknownAdGroups_Title');\r\n }\r\n },\r\n 'assetgroup': function (count) {\r\n if (count === 1) {\r\n return i18n.getString('BulkEdit_PasteOneAssetGroup_Title');\r\n } else if (count > 1) {\r\n return i18n.getString('BulkEdit_PasteNAssetGroups_Title', count);\r\n } else {\r\n return i18n.getString('BulkEdit_PasteUnknownAssetGroups_Title');\r\n }\r\n }\r\n};\r\nvar ViewModel = function (model, startDatePicker, endDatePicker) {\r\n Base.call(this);\r\n this.contentType = ko.observable('');\r\n this.includeBids = ko.observable(true);\r\n this.disableKeywordDestinationUrl = disableKeywordDestinationUrl;\r\n this.includeDestinationURLs = ko.observable(true);\r\n this.pauseAfterPasting = ko.observable(false);\r\n this.ignoreRowSelection = ko.observable(true);\r\n this.showPreviewButton = ko.observable(false);\r\n this.actionButtonText = ko.observable(i18n.getString('BulkEdit_PasteButton'));\r\n this.statusText = ko.observable(i18n.getString('BulkEdit_Paste_InitialStatus'));\r\n this.adjustStartAndEndDates = ko.observable(false);\r\n this.endDateModification = ko.observable(null);\r\n this.showCheckBoxes = ko.observable(true);\r\n this.isCampaignAdGroupCopyPasteOperation = ko.observable(model.attributes.content.type === 'campaign' || model.attributes.content.type === 'adgroup');\r\n this.culture = config.get('culture') || 'en-US';\r\n this.format = config.get('globalization.datetime.shortDatePattern') || 'M/d/yyyy';\r\n this.titleText = ko.computed(function () {\r\n var title = titleStrings[this.contentType()];\r\n return title ? title(model.get('content').count) : '';\r\n }, this);\r\n startDatePicker.on('dateChanged', () => {\r\n this.errorMessage('');\r\n });\r\n endDatePicker.on('dateChanged', () => {\r\n this.errorMessage('');\r\n });\r\n this.validate = function () {\r\n if (this.adjustStartAndEndDates() && this.endDateModification() === 'Selected') {\r\n var startDate = startDatePicker.getState().selectedDate;\r\n var endDate = endDatePicker.getState().selectedDate;\r\n if (startDate > endDate) {\r\n this.errorMessage(i18n.getString('DatePicker_StartDateCannotBeLaterThanEndDate'));\r\n return false;\r\n }\r\n }\r\n return ViewModel.validateTab(this.contentType());\r\n };\r\n};\r\nexport default ViewModel;\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport CopyPasteViewModel from '@bingads-webui-static-legacy/bulk-edit/viewmodel/copypaste/copyPaste';\r\nimport adTemplate from '@bingads-webui-static-legacy/bulk-edit/template/copypaste/copyPasteAd.pug';\r\nimport keywordTemplate from '@bingads-webui-static-legacy/bulk-edit/template/copypaste/copyPasteKeyword.pug';\r\nimport campaignTemplate from '@bingads-webui-static-legacy/bulk-edit/template/copypaste/copyPasteCampaign.pug';\r\nimport adGroupTemplate from '@bingads-webui-static-legacy/bulk-edit/template/copypaste/copyPasteAdGroup.pug';\r\nimport assetGroupTemplate from '@bingads-webui-static-legacy/bulk-edit/template/copypaste/copyPasteAssetGroup.pug';\r\nimport BaseView from '@bingads-webui-static-legacy/bulk-edit/view/bulkEditJob';\r\nimport helpDirective from '@bingads-webui-static-legacy/directive/help';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport * as datePicker from '@bingads-webui-campaign/campaigns-date-picker';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar pasteOptions = [{\r\n flag: function (ko_model) {\r\n return !ko_model.includeBids();\r\n },\r\n data: {\r\n '@odata.type': '#Model.NumericAction',\r\n Property: 'Bid/Amount',\r\n ActionType: 'SetToAmount',\r\n Value: null,\r\n Limit: null\r\n }\r\n}, {\r\n flag: function (ko_model) {\r\n return !ko_model.includeDestinationURLs();\r\n },\r\n data: {\r\n '@odata.type': '#Model.TextAction',\r\n Property: 'DestinationUrl',\r\n ActionType: 'Set',\r\n Value: null\r\n }\r\n}, {\r\n flag: function (ko_model) {\r\n return ko_model.pauseAfterPasting();\r\n },\r\n data: {\r\n '@odata.type': '#Model.TextAction',\r\n Property: 'Status',\r\n ActionType: 'Set',\r\n Value: 'Paused'\r\n }\r\n}];\r\nvar tabs = {\r\n 'ad': {\r\n key: 'AdTitle',\r\n secondary: 'AdText',\r\n progress: i18n.getString('BulkEdit_PasteAds_ProgressText'),\r\n template: adTemplate\r\n },\r\n 'keyword': {\r\n key: 'Keyword',\r\n progress: i18n.getString('BulkEdit_PasteKeywords_ProgressText'),\r\n template: keywordTemplate\r\n },\r\n 'campaign': {\r\n key: 'Campaign',\r\n progress: i18n.getString('BulkEdit_PasteCampaigns_ProgressTextWithoutTotalEntities'),\r\n template: campaignTemplate\r\n },\r\n 'adgroup': {\r\n key: 'AdGroup',\r\n progress: i18n.getString('BulkEdit_PasteAdGroups_ProgressTextWithoutTotalEntities'),\r\n template: adGroupTemplate\r\n },\r\n 'assetgroup': {\r\n key: 'AssetGroup',\r\n progress: i18n.getString('BulkEdit_PasteAssetGroups_ProgressTextWithoutTotalEntities'),\r\n template: assetGroupTemplate\r\n }\r\n};\r\nvar clipboard = null;\r\nvar formatCampaignAdGroup = function (campaign, adgroup) {\r\n var value = campaign ? campaign : '';\r\n value += ' >';\r\n if (adgroup) {\r\n value += '
';\r\n value += adgroup;\r\n }\r\n return value;\r\n};\r\nvar view = BaseView.extend({\r\n initialize: function (options) {\r\n if (options.perfMarker) {\r\n this.perfMarker = options.perfMarker;\r\n }\r\n BaseView.prototype.initialize.apply(this, arguments);\r\n this.startDatePicker = new datePicker.CampaignsDatePicker({\r\n minDate: new Date(),\r\n selectedDate: new Date()\r\n });\r\n var nextYear = new Date();\r\n nextYear.setFullYear(nextYear.getFullYear() + 1);\r\n this.endDatePicker = new datePicker.CampaignsDatePicker({\r\n minDate: new Date(),\r\n selectedDate: nextYear\r\n });\r\n this.ko_model = new CopyPasteViewModel(this.model, this.startDatePicker, this.endDatePicker);\r\n clipboard = this.model.get('content');\r\n this.ko_model.contentType(clipboard.type);\r\n this.template = tabs[clipboard.type] && tabs[clipboard.type].template;\r\n },\r\n render: function () {\r\n if (this.perfMarker) {\r\n this.perfMarker.willRender();\r\n }\r\n BaseView.prototype.render.apply(this, arguments);\r\n helpDirective.run(this.$el);\r\n this.startDatePicker.render();\r\n this.$('.start-date-picker').html(this.startDatePicker.$el);\r\n this.endDatePicker.render();\r\n this.$('.end-date-picker').html(this.endDatePicker.$el);\r\n var tmp = this.endDatePicker.getChild('date-picker');\r\n var that = this;\r\n tmp.on('rendered', function () {\r\n tmp.datePicker.enable(false);\r\n that.ko_model.endDateModification.subscribe(function (endDateModification) {\r\n var shouldEnable = endDateModification === 'Selected';\r\n tmp.datePicker.enable(shouldEnable);\r\n });\r\n if (that.perfMarker) {\r\n that.perfMarker.done();\r\n }\r\n });\r\n return this;\r\n },\r\n setAction: function () {\r\n var adgroup = PageContext.CurrentAdGroup;\r\n if (adgroup) {\r\n this.setActionWithinAdGroup(adgroup);\r\n } else {\r\n var campaign = PageContext.CurrentCampaign;\r\n if (campaign) {\r\n this.setActionOutsideAdGroup(campaign);\r\n } else {\r\n this.setActionOutsideAdGroup(null);\r\n }\r\n }\r\n },\r\n setActionWithinAdGroup: function (adgroup) {\r\n switch (this.ko_model.contentType()) {\r\n case 'keyword':\r\n this.model.set('Entity', 'Keyword');\r\n break;\r\n case 'ad':\r\n this.model.set('Entity', 'Ad');\r\n break;\r\n default:\r\n return;\r\n }\r\n this.setActionWithAdGroupId(adgroup.Id);\r\n },\r\n setActionOutsideAdGroup: function (campaign) {\r\n switch (this.ko_model.contentType()) {\r\n case 'adgroup':\r\n this.model.set('Entity', 'AdGroup');\r\n break;\r\n case 'campaign':\r\n this.model.set('Entity', 'Campaign');\r\n break;\r\n case 'assetgroup':\r\n this.model.set('Entity', 'AssetGroup');\r\n break;\r\n default:\r\n return;\r\n }\r\n var campaignId = campaign ? campaign.Id : null;\r\n this.setActionWithDates(campaignId);\r\n },\r\n setActionWithAdGroupId: function (adgroupId) {\r\n var action = {\r\n Actions: [{\r\n '@odata.type': '#Model.CopyAction',\r\n DestinationParentEntityIds: adgroupId ? [adgroupId] : null\r\n }],\r\n EditCopy: false\r\n };\r\n _.each(pasteOptions, (function (option) {\r\n if (option.flag(this.ko_model)) {\r\n action.Actions.push(option.data);\r\n }\r\n }).bind(this));\r\n this.model.set('BatchAction', action);\r\n },\r\n setActionWithDates: function (campaignId) {\r\n var action = {\r\n Actions: [{\r\n '@odata.type': '#Model.CopyAction',\r\n DestinationParentEntityIds: campaignId ? [campaignId] : [0],\r\n StartDate: this.ko_model.adjustStartAndEndDates() ? this.startDatePicker.getState().selectedDate : null,\r\n EndDate: this.ko_model.endDateModification() === 'Selected' ? this.endDatePicker.getState().selectedDate : null,\r\n EndDateAction: this.ko_model.adjustStartAndEndDates() ? this.ko_model.endDateModification() : 'NoChange'\r\n }],\r\n EditCopy: false\r\n };\r\n _.each(pasteOptions, (function (option) {\r\n if (option.flag(this.ko_model)) {\r\n action.Actions.push(option.data);\r\n }\r\n }).bind(this));\r\n this.model.set('BatchAction', action);\r\n },\r\n getCampaignId: function () {\r\n return clipboard ? clipboard.campaignId : -1;\r\n },\r\n getAdGroupId: function () {\r\n return clipboard ? clipboard.adGroupId : -1;\r\n },\r\n getIdFilter: function () {\r\n return clipboard ? clipboard.filters : null;\r\n },\r\n getDateRangeQuery: function () {\r\n return clipboard ? clipboard.dateRange : null;\r\n },\r\n getProgressText: function () {\r\n var tab = tabs[this.ko_model.contentType()];\r\n return tab && tab.progress || '';\r\n },\r\n formatErrors: function (errors) {\r\n if (!errors) {\r\n return errors;\r\n }\r\n var entityKey = tabs[this.ko_model.contentType()] && tabs[this.ko_model.contentType()].key;\r\n var secondaryKey = tabs[this.ko_model.contentType()] && tabs[this.ko_model.contentType()].secondary;\r\n _.each(errors, function (error) {\r\n var copyFromCampaign, copyFromAdGroup, pasteToCampaign, pasteToAdGroup;\r\n var entity = entityKey ? _.find(error.EntityKey, function (item) {\r\n return item.Key === entityKey;\r\n }) : null;\r\n if (!entity) {\r\n entity = _.find(error.EntityKey, function (item) {\r\n return item.Key === secondaryKey;\r\n });\r\n }\r\n error.data = [];\r\n error.data.push({\r\n value: entity && entity.Value ? entity.Value : '',\r\n isHtml: false\r\n });\r\n _.each(error.Changes, function (change) {\r\n switch (change.Property) {\r\n case 'AdgroupName':\r\n copyFromAdGroup = change.OriginalValue;\r\n pasteToAdGroup = change.NewValue;\r\n break;\r\n case 'CampaignName':\r\n copyFromCampaign = change.OriginalValue;\r\n pasteToCampaign = change.NewValue;\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n error.data.push({\r\n value: formatCampaignAdGroup(copyFromCampaign, copyFromAdGroup),\r\n isHtml: true\r\n });\r\n error.data.push({\r\n value: formatCampaignAdGroup(pasteToCampaign, pasteToAdGroup),\r\n isHtml: true\r\n });\r\n });\r\n return errors;\r\n }\r\n});\r\nexport default view;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport * as Toast from '@bingads-webui-component-legacy/toast/index';\r\nimport LocalStorage from '@bingads-webui-component-legacy/storage/localStorage';\r\nimport CopyPasteModel from '@bingads-webui-static-legacy/bulk-edit/model/copypaste/copyPaste';\r\nimport CopyPasteView from '@bingads-webui-static-legacy/bulk-edit/view/copypaste/copyPaste';\r\nimport FilterHelper from '@bingads-webui-static-legacy/bulk-edit/view/filterHelper';\r\nimport gridHelper from '@bingads-webui-static-legacy/shared/view/gridHelper';\r\nimport ViewModel from '@bingads-webui-static-legacy/bulk-edit/viewmodel/copypaste/copyPaste';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar osd = window.osd;\r\nvar isCampaignsTab = function () {\r\n return PageContext.CurrentTabId === 'Campaign' || PageContext.CurrentTabId === 'Campaigns';\r\n};\r\nvar isAdGroupsTab = function () {\r\n return PageContext.CurrentCampaign && (PageContext.CurrentTabId === 'AdGroup' || PageContext.CurrentTabId === 'Adgroups');\r\n};\r\nvar isKeywordsTab = function () {\r\n return PageContext.CurrentAdGroup && PageContext.CurrentTabId === 'Keywords';\r\n};\r\nvar isAdsTab = function () {\r\n return PageContext.CurrentAdGroup && PageContext.CurrentTabId === 'Ads';\r\n};\r\nvar isAssetGroupsTab = function () {\r\n return PageContext.CurrentCampaign && PageContext.CurrentTabId === 'Assetgroups';\r\n}\r\nvar getClipboardName = function () {\r\n return ('clipboard-').concat(PageContext.CurrentAccount.Id);\r\n};\r\nvar getDateRangeQueryArgs = function () {\r\n var dateRange;\r\n if (!!osd && !!osd.ui && !!osd.ui.Controls && !!osd.ui.Controls.DateRangeFilter && _.isFunction(osd.ui.Controls.DateRangeFilter.getParsedDateRange)) {\r\n dateRange = osd.ui.Controls.DateRangeFilter.getParsedDateRange();\r\n } else {\r\n dateRange = window.App && window.App.state ? window.App.state.get('$daterange') : null;\r\n }\r\n if (dateRange) {\r\n var startdate = (dateRange.start || dateRange.RangeStartDate).toISOString(), enddate = (dateRange.end || dateRange.RangeEndDate).toISOString();\r\n return 'startdate=' + startdate + '&enddate=' + enddate;\r\n }\r\n return '';\r\n};\r\nvar tabIdToClipboardType = {\r\n Campaign: 'campaign',\r\n Campaigns: 'campaign',\r\n AdGroup: 'adgroup',\r\n Adgroups: 'adgroup',\r\n Ads: 'ad',\r\n Keywords: 'keyword',\r\n Assetgroups: 'assetgroup',\r\n};\r\nvar tabs = {\r\n 'ad': {\r\n validate: isAdsTab,\r\n strings: {\r\n wrongTab: i18n.getString('BulkEdit_PasteAds_WrongTab'),\r\n wrongType: i18n.getString('BulkEdit_PasteAds_WrongType'),\r\n copyOneSuccess_OldUI: i18n.getString('BulkEdit_CopyOneAd_Success_OldUI'),\r\n copyNSuccess_OldUI: i18n.getString('BulkEdit_CopyNAds_Success_OldUI'),\r\n copyOneSuccess_NewUI: i18n.getString('BulkEdit_CopyOneAd_Success_NewUI'),\r\n copyNSuccess_NewUI: i18n.getString('BulkEdit_CopyNAds_Success_NewUI')\r\n },\r\n filters: function (grid) {\r\n return FilterHelper.getIdFilter(grid, 'Ad');\r\n }\r\n },\r\n 'keyword': {\r\n validate: isKeywordsTab,\r\n strings: {\r\n wrongTab: i18n.getString('BulkEdit_PasteKeywords_WrongTab'),\r\n wrongType: i18n.getString('BulkEdit_PasteKeywords_WrongType'),\r\n copyOneSuccess_OldUI: i18n.getString('BulkEdit_CopyOneKeyword_Success_OldUI'),\r\n copyNSuccess_OldUI: i18n.getString('BulkEdit_CopyNKeywords_Success_OldUI'),\r\n copyOneSuccess_NewUI: i18n.getString('BulkEdit_CopyOneKeyword_Success_NewUI'),\r\n copyNSuccess_NewUI: i18n.getString('BulkEdit_CopyNKeywords_Success_NewUI')\r\n },\r\n filters: function (grid) {\r\n return FilterHelper.getIdFilter(grid, 'Keyword');\r\n }\r\n },\r\n 'campaign': {\r\n validate: isCampaignsTab,\r\n strings: {\r\n wrongTab: i18n.getString('BulkEdit_PasteCampaigns_WrongTab'),\r\n wrongType: i18n.getString('BulkEdit_PasteCampaigns_WrongType'),\r\n copyOneSuccess_OldUI: i18n.getString('BulkEdit_CopyOneCampaign_Success_OldUI'),\r\n copyNSuccess_OldUI: i18n.getString('BulkEdit_CopyNCampaigns_Success_OldUI'),\r\n copyOneSuccess_NewUI: i18n.getString('BulkEdit_CopyOneCampaign_Success_NewUI'),\r\n copyNSuccess_NewUI: i18n.getString('BulkEdit_CopyNCampaigns_Success_NewUI')\r\n },\r\n filters: function (grid) {\r\n return FilterHelper.getIdFilter(grid, 'Campaign');\r\n }\r\n },\r\n 'adgroup': {\r\n validate: isAdGroupsTab,\r\n strings: {\r\n wrongTab: i18n.getString('BulkEdit_PasteAdGroups_WrongTab'),\r\n wrongType: i18n.getString('BulkEdit_PasteAdGroups_WrongType'),\r\n copyOneSuccess_OldUI: i18n.getString('BulkEdit_CopyOneAdGroup_Success_OldUI'),\r\n copyNSuccess_OldUI: i18n.getString('BulkEdit_CopyNAdGroups_Success_OldUI'),\r\n copyOneSuccess_NewUI: i18n.getString('BulkEdit_CopyOneAdGroup_Success_NewUI'),\r\n copyNSuccess_NewUI: i18n.getString('BulkEdit_CopyNAdGroups_Success_NewUI')\r\n },\r\n filters: function (grid) {\r\n return FilterHelper.getIdFilter(grid, 'AdGroup');\r\n }\r\n },\r\n 'assetgroup': {\r\n validate: isAssetGroupsTab,\r\n strings: {\r\n wrongTab: i18n.getString('BulkEdit_PasteAssetGroups_WrongTab'),\r\n wrongType: i18n.getString('BulkEdit_PasteAssetGroups_WrongType'),\r\n copyOneSuccess_OldUI: i18n.getString('BulkEdit_CopyOneAssetGroup_Success_OldUI'),\r\n copyNSuccess_OldUI: i18n.getString('BulkEdit_CopyNAssetGroups_Success_OldUI'),\r\n copyOneSuccess_NewUI: i18n.getString('BulkEdit_CopyOneAssetGroup_Success_NewUI'),\r\n copyNSuccess_NewUI: i18n.getString('BulkEdit_CopyNAssetGroups_Success_NewUI')\r\n },\r\n filters: function (grid) {\r\n return FilterHelper.getIdFilter(grid, 'AssetGroup');\r\n }\r\n }\r\n};\r\nvar validateTab = function (type) {\r\n var isValid = false;\r\n var tab = tabs[type];\r\n var expectedType = tabIdToClipboardType[PageContext.CurrentTabId];\r\n if (expectedType && expectedType !== type) {\r\n alert(tabs[expectedType].strings.wrongType);\r\n } else if (tab) {\r\n isValid = tab.validate();\r\n if (!isValid) {\r\n alert(tab.strings.wrongTab);\r\n }\r\n } else {\r\n if (PageContext.CurrentTabId === 'Campaign') {\r\n alert(i18n.getString('BulkEdit_PasteCampaigns_NothingCopied'));\r\n } else if (PageContext.CurrentTabId === 'AdGroup') {\r\n alert(i18n.getString('BulkEdit_PasteAdGroups_NothingCopied'));\r\n } else if (PageContext.CurrentTabId === 'Assetgroups') {\r\n alert(i18n.getString('BulkEdit_PasteAssetGroups_NothingCopied'));\r\n } else {\r\n alert(i18n.getString('BulkEdit_PasteAdsOrKeywords_NothingCopied'));\r\n }\r\n }\r\n return isValid;\r\n};\r\nViewModel.validateTab = validateTab;\r\nexport default {\r\n validateTab: validateTab,\r\n copy: function (type, grid) {\r\n var copyPerfMarker;\r\n if (grid.perfMarker) {\r\n copyPerfMarker = grid.perfMarker.createChild('pgrid-Copy-action');\r\n copyPerfMarker.willInit();\r\n }\r\n var selectedItemsLength = gridHelper.getSelectedRowsCount(grid);\r\n if (!type || !grid || selectedItemsLength === 0) {\r\n return;\r\n }\r\n if (type === 'campaign') {\r\n var selectedRows = gridHelper.getSelectedRows(grid);\r\n for (var i = 0; i < selectedRows.length; i++) {\r\n if (selectedRows[i].CampaignType === 'Smart') {\r\n Toast.showError(i18n.getString('CopyPasteSmartCampaigns_ErrorMessage'));\r\n LocalStorage.set(getClipboardName(), null);\r\n return;\r\n }\r\n }\r\n }\r\n var count = 0;\r\n var filters = null;\r\n if (gridHelper.isCrossPageAllSelected(grid)) {\r\n if (type === 'campaign' || type === 'adgroup') {\r\n Toast.showError(i18n.getString('CopyPasteCampaignAdGroupCrossPage_ErrorMessage'));\r\n LocalStorage.set(getClipboardName(), null);\r\n return;\r\n }\r\n count = gridHelper.getTotalRowsCount(grid);\r\n filters = FilterHelper.getFiltersIncludeWaterfall(grid);\r\n } else {\r\n count = selectedItemsLength;\r\n filters = tabs[type] && tabs[type].filters(grid);\r\n }\r\n LocalStorage.set(getClipboardName(), {\r\n 'type': type,\r\n 'count': count,\r\n 'campaignId': PageContext.CurrentCampaign ? PageContext.CurrentCampaign.Id : -1,\r\n 'adGroupId': PageContext.CurrentAdGroup ? PageContext.CurrentAdGroup.Id : -1,\r\n 'dateRange': getDateRangeQueryArgs(),\r\n 'filters': filters ? $.extend(true, {}, filters) : null\r\n });\r\n if (tabs[type]) {\r\n if ((type === 'campaign' || type === 'adgroup') && !PageContext.Permissions.IsCampaignAdGroupCopyPasteEnabled) {\r\n return;\r\n }\r\n Toast.showSuccess(count === 1 ? tabs[type].strings.copyOneSuccess_NewUI : _.template(tabs[type].strings.copyNSuccess_NewUI)({\r\n count: count\r\n }));\r\n }\r\n if (copyPerfMarker) {\r\n copyPerfMarker.done();\r\n }\r\n },\r\n paste: function (grid) {\r\n var pastePerfMarker;\r\n if (grid.perfMarker) {\r\n pastePerfMarker = grid.perfMarker.createChild('pgrid-Paste-action');\r\n pastePerfMarker.willInit();\r\n }\r\n var clipboard = LocalStorage.get(getClipboardName());\r\n if (clipboard) {\r\n if (!this.validateTab(clipboard.type)) {\r\n return;\r\n }\r\n switch (clipboard.type) {\r\n case 'ad':\r\n case 'keyword':\r\n case 'campaign':\r\n case 'adgroup':\r\n case 'assetgroup':\r\n var view = new CopyPasteView({\r\n perfMarker: pastePerfMarker,\r\n model: new CopyPasteModel({\r\n content: clipboard\r\n }),\r\n grid: grid,\r\n onOperationSuccess: function () {\r\n Toast.showSuccess(i18n.getString('BulkEdit_Notification_Success'));\r\n grid.gridView.refresh(false);\r\n },\r\n onOperationFailure: function () {\r\n if (clipboard.type === 'campaign' || clipboard.type === 'adgroup') {\r\n Toast.showError(i18n.getString('CampaignAdGroupCopyPaste_CompletedWithErrorsText_NewUI'));\r\n } else {\r\n Toast.showError(i18n.getString('BulkEdit_Notification_Failure'));\r\n }\r\n }\r\n });\r\n view.render();\r\n return view;\r\n break;\r\n default:\r\n alert(i18n.getString('BulkEdit_PasteAdsOrKeywords_NothingCopied'));\r\n break;\r\n }\r\n } else {\r\n if (isCampaignsTab()) {\r\n alert(i18n.getString('BulkEdit_PasteCampaigns_NothingCopied'));\r\n } else if (PageContext.CurrentTabId === 'AdGroup' || PageContext.CurrentTabId === 'Adgroups') {\r\n alert(i18n.getString('BulkEdit_PasteAdGroups_NothingCopied'));\r\n } else if (PageContext.CurrentTabId === 'Assetgroups') {\r\n alert(i18n.getString('BulkEdit_PasteAssetGroups_NothingCopied'));\r\n } else {\r\n alert(i18n.getString('BulkEdit_PasteAdsOrKeywords_NothingCopied'));\r\n }\r\n }\r\n }\r\n};\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport gridHelper from '@bingads-webui-static-legacy/shared/view/gridHelper';\r\nimport * as filterMetadataToLegacy from '@bingads-webui/filter-commons';\r\nexport default {\r\n getFiltersIncludeWaterfall: function (grid) {\r\n if (grid && (grid.filterService || grid.pgridPlugins && grid.pgridPlugins.filterService)) {\r\n var filterServiceFilters = (grid.filterService || grid.pgridPlugins.filterService).getCombinedFilter();\r\n return {\r\n FilterExpressions: filterMetadataToLegacy.toLegacyFilter(filterServiceFilters)\r\n };\r\n } else {\r\n return grid.getFilters(true);\r\n }\r\n },\r\n getIdFilter: function (grid, entityType) {\r\n if (grid) {\r\n var ids = gridHelper.getSelectedRowIds(grid);\r\n if (entityType === 'Keyword' && !grid.gridView) {\r\n ids = _.map(ids, function (value) {\r\n return value.substring(0, value.indexOf('_'));\r\n });\r\n }\r\n return {\r\n FilterExpressions: [{\r\n SelectedColumn: entityType + 'Id',\r\n SelectedOperator: 'Equal',\r\n Values: ids\r\n }]\r\n };\r\n }\r\n },\r\n getIdFilterNoEntityType: function (grid) {\r\n if (grid) {\r\n var ids = gridHelper.getSelectedRowIds(grid);\r\n ids = _.map(ids, function (id) {\r\n return Number(id);\r\n });\r\n return {\r\n FilterExpressions: [{\r\n SelectedColumn: 'Id',\r\n SelectedOperator: 'Equal',\r\n Values: ids\r\n }]\r\n };\r\n }\r\n },\r\n getProductGroupIdFilter: function (grid) {\r\n if (grid) {\r\n var isOnAdGroupLevel = pageContext.CurrentAdGroup != null;\r\n var rows = gridHelper.getSelectedRows(grid);\r\n if (isOnAdGroupLevel) {\r\n var completeIds = _.map(rows, function (row) {\r\n return row.Id;\r\n });\r\n var groupSize = 200;\r\n var idGroups = _.reduce(completeIds, function (result, id) {\r\n var lastGroup = result[result.length - 1];\r\n if (lastGroup == null || lastGroup.length === groupSize) {\r\n result.push([id]);\r\n } else {\r\n lastGroup.push(id);\r\n }\r\n return result;\r\n }, []);\r\n var compositeIds = _.map(idGroups, function (group) {\r\n return group.join(',');\r\n });\r\n var filterExpressions = [{\r\n SelectedColumn: 'IdString',\r\n SelectedOperator: 'eq',\r\n Values: compositeIds\r\n }];\r\n return {\r\n FilterExpressions: filterExpressions\r\n };\r\n } else {\r\n var hasInvalidParam = false;\r\n var compositeIds = _.map(rows, function (row) {\r\n var campaignId = pageContext.CurrentCampaign && pageContext.CurrentCampaign.Id != null ? pageContext.CurrentCampaign.Id : row.CampaignId;\r\n var adGroupId = pageContext.CurrentAdGroup && pageContext.CurrentAdGroup.Id != null ? pageContext.CurrentAdGroup.Id : row.AdGroupId;\r\n if (campaignId == null || adGroupId == null) {\r\n hasInvalidParam = true;\r\n }\r\n return 'CampaignId=' + campaignId + ',AdGroupId=' + adGroupId + ',ProductGroupId=' + row.Id;\r\n });\r\n var filterExpressions = [{\r\n SelectedColumn: 'IdString',\r\n SelectedOperator: 'eq',\r\n Values: !hasInvalidParam ? compositeIds : []\r\n }];\r\n return {\r\n FilterExpressions: filterExpressions\r\n };\r\n }\r\n }\r\n },\r\n getPerformanceTargetIdFilter: function (grid) {\r\n if (grid) {\r\n var ids = gridHelper.getSelectedRowIds(grid);\r\n ids = _.map(ids, function (value) {\r\n return Number(value);\r\n });\r\n return {\r\n FilterExpressions: [{\r\n SelectedColumn: 'Id',\r\n SelectedOperator: 'Equal',\r\n Values: ids\r\n }]\r\n };\r\n }\r\n },\r\n getAdGroupIdFilterExcludingContentOnly: function (grid) {\r\n if (grid) {\r\n var rows = gridHelper.getSelectedRows(grid);\r\n var ids = [];\r\n _.each(rows, function (key, value) {\r\n if (!_.contains(['2', 'Content'], key.Medium)) {\r\n ids[ids.length] = key.Id;\r\n }\r\n });\r\n return {\r\n FilterExpressions: [{\r\n SelectedColumn: 'AdGroupId',\r\n SelectedOperator: 'Equal',\r\n Values: ids\r\n }]\r\n };\r\n }\r\n },\r\n getCampaignIdFilter: function (grid) {\r\n if (grid) {\r\n var rows = gridHelper.getSelectedRows(grid);\r\n var ids = _.map(rows, function (r) {\r\n return r.Id;\r\n });\r\n return {\r\n FilterExpressions: [{\r\n SelectedColumn: 'CampaignId',\r\n SelectedOperator: 'Equal',\r\n Values: ids\r\n }]\r\n };\r\n }\r\n },\r\n getAudienceIdFilter: function (grid, shouldExclude) {\r\n if (grid) {\r\n var ids = [];\r\n if (!shouldExclude) {\r\n ids = gridHelper.getSelectedRowIds(grid);\r\n } else {\r\n var rows = gridHelper.getSelectedRows(grid);\r\n _.each(rows, function (row) {\r\n if (row.Status !== 'Excluded') {\r\n ids.push(row.Id);\r\n }\r\n });\r\n }\r\n return {\r\n FilterExpressions: [{\r\n SelectedColumn: 'AudienceAssociationId',\r\n SelectedOperator: 'Equal',\r\n Values: ids\r\n }]\r\n };\r\n }\r\n }\r\n};\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport BaseModel from '@bingads-webui-campaign-legacy/bulk-operation/util/bulk-edit-job';\r\nvar model = BaseModel.extend({\r\n defaults: $.extend({}, BaseModel.prototype.defaults, {\r\n 'BatchAction': {\r\n 'Actions': [{\r\n '@data.type': '#Model.LabelAssociationAction',\r\n 'AssociationList': []\r\n }]\r\n },\r\n 'Entity': '',\r\n 'RequestProperties': [],\r\n 'CurrentCustomerId': ''\r\n })\r\n});\r\nexport default model;\r\n\r\n","/* eslint-disable */\r\nimport ko from 'knockout';\r\nimport Base from '@bingads-webui-static-legacy/bulk-edit/viewmodel/bulkEditJob';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar ViewModel = function (model) {\r\n Base.call(this);\r\n this.selectedEntityCount(model.get('selectedEntityCount'));\r\n this.showPreviewButton(false);\r\n this.showPanel = ko.observable(true);\r\n this.titleText = ko.computed(function () {\r\n return i18n.getString('label_association_panel_title', this.selectedEntityCount());\r\n }, this);\r\n this._inlineErrors = ko.observable([]);\r\n this.inlineErrors = ko.computed({\r\n read: function () {\r\n return this._inlineErrors();\r\n },\r\n write: function (value) {\r\n var err = value.map(function (errorObject) {\r\n var errorKey = errorObject.Errors[0];\r\n var entityName = errorObject.EntityKey[0].Value;\r\n return {\r\n error: i18n.getString('Error_Campaign_API_' + errorKey),\r\n name: entityName\r\n };\r\n });\r\n this._inlineErrors(err);\r\n }\r\n }, this);\r\n this.validate = function () {\r\n this.errorMessage('');\r\n if (this.selectedEntityCount() === 0) {\r\n alert(i18n.getString('Grid_RowSelectionRequired'));\r\n return false;\r\n }\r\n return true;\r\n };\r\n};\r\nexport default ViewModel;\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport BaseView from '@bingads-webui-static-legacy/bulk-edit/view/bulkEditJob';\r\nimport filterHelper from '@bingads-webui-static-legacy/bulk-edit/view/filterHelper';\r\nimport Model from '@bingads-webui-static-legacy/bulk-edit/model/label/association';\r\nimport ViewModel from '@bingads-webui-static-legacy/bulk-edit/viewmodel/label/association';\r\nimport instrumentationSettings from '@bingads-webui-static-legacy/instrumentation/campaignSchemaAndSetting';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar deserialize = function (key) {\r\n return JSON.parse(key);\r\n};\r\nvar getId = function (key) {\r\n var id = key.Id || key;\r\n return parseInt(id);\r\n};\r\nvar getChanged = function (state, stats) {\r\n return _.keys(stats.changed).filter(function (key) {\r\n var change = stats.changed[key];\r\n return change.after.state === state;\r\n }).map(deserialize);\r\n};\r\nvar getAdded = function (stats) {\r\n var changed = getChanged('checked', stats);\r\n var added = _.keys(stats.added || ({})).map(deserialize).concat(changed);\r\n return _.uniq(added);\r\n};\r\nvar getRemoved = function (stats) {\r\n var changed = getChanged('unchecked', stats);\r\n var removed = _.keys(stats.removed).map(deserialize).concat(changed);\r\n return _.uniq(removed);\r\n};\r\nvar getByScope = function (labels) {\r\n var result = {\r\n Account: [],\r\n Customer: []\r\n };\r\n labels.forEach(function (label) {\r\n if (!label.Scope || label.Scope !== 'Customer') {\r\n result.Account.push(label);\r\n } else {\r\n result.Customer.push(label);\r\n }\r\n });\r\n return result;\r\n};\r\nvar view = BaseView.extend({\r\n initialize: function (options) {\r\n this._stats = options.stats;\r\n this._entity = options.entity;\r\n this._scope = options.scope;\r\n this._loadDirectlyLinkedAccounts = options.loadDirectlyLinkedAccounts;\r\n this.template = options.template;\r\n this._isManagementRequest = options.isManagementRequest;\r\n this.model = new Model();\r\n BaseView.prototype.initialize.apply(this, arguments);\r\n this.ko_model = new ViewModel(this.model);\r\n },\r\n render: (function () {\r\n if (this.grid.getSelectionScope() === 'AllPages') {\r\n this.ko_model.showProgress(true);\r\n this.ko_model.showButtonBar(false);\r\n } else {\r\n this.ko_model.showPanel = false;\r\n }\r\n BaseView.prototype.render.apply(this, arguments);\r\n this.submitJob();\r\n return this;\r\n }).asLoggingStart(instrumentationSettings.ACTIVITYNAME.LabelAssociation, instrumentationSettings.SCENARIONAME.LabelAssociation),\r\n renderBulkEditJobView: function () {\r\n BaseView.prototype.render.apply(this, arguments);\r\n },\r\n setAction: function () {\r\n var action = [];\r\n var added;\r\n var removed;\r\n var currentCustomerId;\r\n if (!this._scope || this._scope !== 'Customer') {\r\n currentCustomerId = pageContext.CurrentCustomer.Id;\r\n }\r\n if (!_.isEmpty(this._stats)) {\r\n added = getAdded(this._stats);\r\n removed = getRemoved(this._stats);\r\n if (added.length > 0) {\r\n const addedByScope = getByScope(added);\r\n if (addedByScope.Account.length > 0) {\r\n action.push({\r\n '@odata.type': '#Model.LabelAssociationAction',\r\n 'AssociationList': addedByScope.Account.map(getId),\r\n 'Scope': 'Account'\r\n });\r\n }\r\n if (addedByScope.Customer.length > 0) {\r\n action.push({\r\n '@odata.type': '#Model.LabelAssociationAction',\r\n 'AssociationList': addedByScope.Customer.map(getId),\r\n 'Scope': 'Customer'\r\n });\r\n }\r\n }\r\n if (removed.length > 0) {\r\n const removedByScope = getByScope(removed);\r\n if (removedByScope.Account.length > 0) {\r\n action.push({\r\n '@odata.type': '#Model.LabelDisassociationAction',\r\n 'AssociationList': removedByScope.Account.map(getId),\r\n 'Scope': 'Account'\r\n });\r\n }\r\n if (removedByScope.Customer.length > 0) {\r\n action.push({\r\n '@odata.type': '#Model.LabelDisassociationAction',\r\n 'AssociationList': removedByScope.Customer.map(getId),\r\n 'Scope': 'Customer'\r\n });\r\n }\r\n }\r\n }\r\n this.model.set('Entity', this._entity);\r\n this.model.set('BatchAction', {\r\n 'Actions': action\r\n });\r\n this.model.set('currentCustomerIdFirst', true);\r\n if (this._entity === 'Account' && this.selectionInfo.allPages) {\r\n this._isManagementRequest = this._isManagementRequest || false;\r\n var RequestProperties = [{\r\n 'Key': 'IsManagementRequest',\r\n 'Value': this._isManagementRequest + ''\r\n }, {\r\n 'Key': 'LoadDirectlyLinkedAccounts',\r\n 'Value': this._loadDirectlyLinkedAccounts\r\n }];\r\n this.model.set('RequestProperties', RequestProperties);\r\n }\r\n if (currentCustomerId) {\r\n this.model.set('CurrentCustomerId', currentCustomerId);\r\n }\r\n },\r\n getIdFilter: function () {\r\n var isCustomerLevelLabel = this._scope && this._scope === 'Customer';\r\n return isCustomerLevelLabel ? filterHelper.getIdFilterNoEntityType(this.grid) : filterHelper.getIdFilter(this.grid, this._entity);\r\n },\r\n getProgressText: function () {\r\n return i18n.getString('label_progress_text');\r\n }\r\n});\r\nexport default view;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport ko from 'knockout';\r\nimport Base from '@bingads-webui-static-legacy/bulk-edit/viewmodel/bulkEditJob';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar ViewModel = function (model, settingView) {\r\n Base.call(this);\r\n this.entityType = model.get('Entity');\r\n this.settingView = settingView;\r\n this.selectedEntityCount(model.get('selectedEntityCount'));\r\n this.titleText = ko.computed(function () {\r\n var totalCount = this.selectedEntityCount();\r\n switch (this.entityType) {\r\n case 'Campaign':\r\n return totalCount > 1 ? i18n.getString('BidStrategySetting_Campaigns_BulkEditTitle').replace('{0}', totalCount) : i18n.getString('BidStrategySetting_Campaign_BulkEditTitle').replace('{0}', totalCount);\r\n case 'AdGroup':\r\n return totalCount > 1 ? i18n.getString('BidStrategySetting_AdGroups_BulkEditTitle').replace('{0}', totalCount) : i18n.getString('BidStrategySetting_AdGroup_BulkEditTitle').replace('{0}', totalCount);\r\n case 'Keyword':\r\n return totalCount > 1 ? i18n.getString('BidStrategySetting_Keywords_BulkEditTitle').replace('{0}', totalCount) : i18n.getString('BidStrategySetting_Keyword_BulkEditTitle').replace('{0}', totalCount);\r\n }\r\n }, this);\r\n this.entityHeaderName = ko.computed(function () {\r\n switch (this.entityType) {\r\n case 'Keyword':\r\n return i18n.getString('BulkEdit_Keyword_EntityNameHeader');\r\n break;\r\n case 'AdGroup':\r\n return i18n.getString('BulkEdit_AdGroup_EntityNameHeader');\r\n break;\r\n case 'Campaign':\r\n return i18n.getString('BulkEdit_Campaign_EntityNameHeader');\r\n break;\r\n default:\r\n return 'unknown entity';\r\n break;\r\n }\r\n }, this);\r\n this.showButtonBar = ko.observable(true);\r\n this.showCloseButton = ko.observable(false);\r\n this.validate = function () {\r\n return this.settingView.validate();\r\n };\r\n};\r\nexport default ViewModel;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport template from '@bingads-webui-static-legacy/bulk-edit/template/shared/changeBiddingStrategy.pug';\r\nimport changeBiddingStrategyViewModel from '@bingads-webui-static-legacy/bulk-edit/viewmodel/shared/changeBiddingStrategy';\r\nimport BaseView from '@bingads-webui-static-legacy/bulk-edit/view/bulkEditJob';\r\nimport * as _settingView from '@bingads-webui-campaign-legacy/bidding-strategy/view/setting';\r\nimport biddingStrategyType from '@bingads-webui-campaign-legacy/bidding-strategy/bidding-strategy-type';\r\nimport filterHelper from '@bingads-webui-static-legacy/bulk-edit/view/filterHelper';\r\nimport * as safeJSON from '@bingads-webui/safe-json';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar settingView = _settingView.default;\r\nvar allowedEntities = ['Campaign', 'AdGroup', 'Keyword'];\r\nvar parseType = function (value) {\r\n if (!_.isString(value)) {\r\n return '';\r\n }\r\n var typeReg = /.*\"Type\":([0-9]+).*$/;\r\n var matches = value.match(typeReg);\r\n if (matches && matches[1] && _.contains(_.keys(biddingStrategyType.biddingStrategyType), matches[1])) {\r\n return i18n.getString('BidStrategy_' + matches[1]);\r\n } else {\r\n return '';\r\n }\r\n};\r\nvar formatTypes = function (rows, entityType) {\r\n if (!rows) {\r\n return rows;\r\n }\r\n _.each(rows, function (value) {\r\n value.Entity = _.find(value.EntityKey, function (item) {\r\n var keyName = '';\r\n switch (entityType) {\r\n case 'Campaign':\r\n keyName = 'CampaignName';\r\n break;\r\n case 'AdGroup':\r\n keyName = 'AdgroupName';\r\n break;\r\n case 'Keyword':\r\n keyName = 'Keyword';\r\n break;\r\n }\r\n return item.Key === keyName;\r\n });\r\n value.data = [];\r\n value.data.push({\r\n value: value.Entity && value.Entity.Value ? value.Entity.Value : '',\r\n isHtml: false\r\n });\r\n if (value.Changes && value.Changes.length) {\r\n if (value.Changes[0].Property === 'CampaignBidStrategyId') {\r\n var originalValue = safeJSON.parseSync(value.Changes[0].OriginalValue) || ({});\r\n var newValue = safeJSON.parseSync(value.Changes[0].NewValue) || ({});\r\n if (originalValue.Id) {\r\n value.data.push({\r\n value: originalValue.Name,\r\n isHtml: false\r\n });\r\n value.data.push({\r\n value: newValue.Name,\r\n isHtml: false\r\n });\r\n } else {\r\n var originalIBS = _.result(_.find(value.EntityKey, {\r\n Key: 'BiddingScheme'\r\n }), 'Value');\r\n value.data.push({\r\n value: parseType(originalIBS),\r\n isHtml: false\r\n });\r\n value.data.push({\r\n value: newValue.Name,\r\n isHtml: false\r\n });\r\n }\r\n } else {\r\n var originalPBS = safeJSON.parseSync(_.result(_.find(value.EntityKey, {\r\n Key: 'BidStrategyId'\r\n }), 'Value')) || ({});\r\n if (originalPBS.Id) {\r\n value.data.push({\r\n value: originalPBS.Name,\r\n isHtml: false\r\n });\r\n value.data.push({\r\n value: parseType(value.Changes[0].NewValue),\r\n isHtml: false\r\n });\r\n } else {\r\n value.data.push({\r\n value: parseType(value.Changes[0].OriginalValue),\r\n isHtml: false\r\n });\r\n value.data.push({\r\n value: parseType(value.Changes[0].NewValue),\r\n isHtml: false\r\n });\r\n }\r\n }\r\n } else {\r\n value.data.push({\r\n value: '',\r\n isHtml: false\r\n });\r\n value.data.push({\r\n value: '',\r\n isHtml: false\r\n });\r\n }\r\n });\r\n return rows;\r\n};\r\nvar view = BaseView.extend({\r\n initialize: function (options) {\r\n this.options = options || ({});\r\n BaseView.prototype.initialize.apply(this, arguments);\r\n this.template = template;\r\n this.entityType = options.entityType;\r\n this.biddingStrategyType = options.biddingStrategyType;\r\n this.settingView = new settingView({\r\n entityType: this.entityType,\r\n biddingStrategyType: this.biddingStrategyType,\r\n isBulkEdit: true,\r\n i18nNewDesign: this.options.i18nNewDesign,\r\n campaignType: options.campaignType,\r\n campaignSubType: options.campaignSubType,\r\n getCampaignTypeGlobalFilter: options.getCampaignTypeGlobalFilter\r\n });\r\n this.ko_model = new changeBiddingStrategyViewModel(this.model, this.settingView);\r\n },\r\n render: function () {\r\n BaseView.prototype.render.apply(this, arguments);\r\n this.$('.section-container.form-horizontal').empty().html(this.settingView.render().el);\r\n return this;\r\n },\r\n setAction: function () {\r\n this.model.set('BatchAction', this.settingView.action());\r\n this.model.set('Entity', this.entityType);\r\n },\r\n formatPreviewResults: function (results) {\r\n return formatTypes(results, this.entityType);\r\n },\r\n formatErrors: function (rows) {\r\n if (rows) {\r\n _.each(rows, function (value) {\r\n value.Entity = _.find(value.EntityKey, function (item) {\r\n return item.Key === 'CampaignName';\r\n });\r\n value.data = [];\r\n value.data.push({\r\n value: value.Entity && value.Entity.Value ? value.Entity.Value : '',\r\n isHtml: false\r\n });\r\n });\r\n }\r\n return rows;\r\n },\r\n getIdFilter: function () {\r\n var result = null;\r\n var entity = this.model.get('Entity');\r\n if (_.contains(allowedEntities, entity)) {\r\n result = filterHelper.getIdFilter(this.grid, entity);\r\n }\r\n return result;\r\n }\r\n});\r\nexport default view;\r\n\r\n","/* eslint-disable */\r\nimport ko from 'knockout';\r\nimport Base from '@bingads-webui-static-legacy/bulk-edit/viewmodel/bulkEditJob';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar ViewModel = function (model) {\r\n Base.call(this);\r\n this.selectedEntityCount(model.get('selectedEntityCount'));\r\n this.titleText = ko.computed(function () {\r\n return i18n.getString('BulkEdit_Campaign_ChangeRsaAutoAssets').replace('{0}', this.selectedEntityCount());\r\n }, this);\r\n this.isRsaAutoAssetsSettingChecked = ko.observable(false);\r\n this.showPreviewButton(false);\r\n};\r\nexport default ViewModel;\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport template from '@bingads-webui-static-legacy/bulk-edit/template/shared/changeRsaAutoAssets.pug';\r\nimport viewModel from '@bingads-webui-static-legacy/bulk-edit/viewmodel/shared/changeRsaAutoAssets';\r\nimport BaseView from '@bingads-webui-static-legacy/bulk-edit/view/bulkEditJob';\r\nimport filterHelper from '@bingads-webui-static-legacy/bulk-edit/view/filterHelper';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar view = BaseView.extend({\r\n initialize: function (options) {\r\n this.options = options || ({});\r\n BaseView.prototype.initialize.apply(this, arguments);\r\n this.template = template;\r\n this.entity = options.entity;\r\n this.ko_model = new viewModel(this.model);\r\n },\r\n render: function () {\r\n BaseView.prototype.render.apply(this, arguments);\r\n return this;\r\n },\r\n setAction: function () {\r\n var action = {\r\n Actions: [{\r\n '@odata.type': '#Model.TextAction',\r\n Property: 'CampaignSettings/RSAAutoGeneratedAssetsEnabled',\r\n ActionType: 'Set',\r\n Value: this.ko_model.isRsaAutoAssetsSettingChecked().toString(),\r\n SearchString: '',\r\n Options: 'None'\r\n }]\r\n };\r\n this.model.set('BatchAction', action);\r\n this.model.set('Entity', 'Campaign');\r\n },\r\n getIdFilter: function () {\r\n return filterHelper.getIdFilter(this.grid, 'Campaign');\r\n },\r\n getProgressText: function () {\r\n return i18n.getString('BulkEdit_Campaigns_ProgressText');\r\n },\r\n formatErrors: function (rows) {\r\n if (rows) {\r\n _.each(rows, function (item) {\r\n item.Entity = _.find(item.EntityKey, function (item) {\r\n return item.Key === 'CampaignName';\r\n });\r\n item.data = [];\r\n item.data.push({\r\n value: item.Entity && item.Entity.Value ? item.Entity.Value : '',\r\n isHtml: false\r\n });\r\n });\r\n }\r\n return rows;\r\n }\r\n});\r\nexport default view;\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport ko from 'knockout';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nexport default function () {\r\n this.results = ko.observable([]);\r\n this.errorMessage = ko.observable('');\r\n this.selectedEntityCount = ko.observable(0);\r\n this.showButtonBar = ko.observable(true);\r\n this.showCloseButton = ko.observable(false);\r\n this.isDisabled = ko.observable(false);\r\n this.showPreviewButton = ko.observable(true);\r\n this.ignoreRowSelection = ko.observable(false);\r\n this.actionButtonText = ko.observable(i18n.getString('BulkEdit_MakeChanges'));\r\n this.statusText = ko.observable(i18n.getString('BulkEdit_InitialStatus'));\r\n this.showProgress = ko.observable(false);\r\n this.isCampaignAdGroupCopyPasteOperation = ko.observable(false);\r\n this.successCount = ko.observable(0);\r\n this.totalCount = ko.observable(0);\r\n this.completePercentage = ko.computed(function () {\r\n var total = this.totalCount();\r\n if (total === 0) {\r\n return '1%';\r\n }\r\n var success = this.successCount();\r\n var error = this.errorCount();\r\n var completed = Math.floor((success + error) * 100 / total);\r\n return completed < 1 ? completed + 1 + '%' : completed + '%';\r\n }, this);\r\n this.maxInlineErrorCount = 100;\r\n this.showErrors = ko.observable(false);\r\n this.showErrorGrid = ko.observable(false);\r\n this.errorCount = ko.observable(0);\r\n this.errorCountString = ko.computed(function () {\r\n return i18n.getString('BulkEdit_InlineError_ErrorCount').replace('{0}', this.errorCount());\r\n }, this);\r\n this.completedWithErrorsBulkEditResultsString = ko.observable(i18n.getString('CampaignAdGroupCopyPaste_CompletedWithErrorsText_OldUI').replace('{0}', PageContext.CurrentCustomer.Id).replace('{1}', PageContext.CurrentUser.Id).replace('{2}', PageContext.CurrentCustomer.Id).replace('{3}', PageContext.CurrentAccount.Id));\r\n this.inlineErrors = ko.observable();\r\n this.errorCountLinkText = ko.computed(function () {\r\n if (this.showErrorGrid()) {\r\n return i18n.getString('BulkEdit_InlineError_HideErrorLink');\r\n } else {\r\n var errorCount = this.errorCount() > this.maxInlineErrorCount ? this.maxInlineErrorCount : this.errorCount();\r\n return i18n.getString('BulkEdit_InlineError_ErrorLink').replace('{0}', errorCount);\r\n }\r\n }, this);\r\n this.showPreview = ko.observable(false);\r\n this.showCheckBoxes = ko.observable(false);\r\n this.currentPageChangeCount = ko.observable(0);\r\n this.changeText = ko.computed(function () {\r\n if (this.totalCount() === 0) {\r\n return i18n.getString('BulkEdit_Preview_NoChange');\r\n } else {\r\n if (this.currentPageChangeCount() > 0) {\r\n return i18n.getString('BulkEdit_Preview_SomeChanges').replace('{0}', this.totalCount());\r\n } else {\r\n return i18n.getString('BulkEdit_Preview_NoCurrentPageChange').replace('{0}', this.totalCount());\r\n }\r\n }\r\n }, this);\r\n this.validate = function () {\r\n return true;\r\n };\r\n}\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport ko from 'knockout';\r\nimport Base from '@bingads-webui-static-legacy/bulk-edit/viewmodel/bulkEditJob';\r\nimport actions from '@bingads-webui-static-legacy/schema/bulkEdit/changeBidActions';\r\nimport * as POUtils from '@bingads-webui-campaign/target-bid-adjustment';\r\nimport numericActionType from '@bingads-webui-static-legacy/schema/bulkEdit/numericActionType';\r\nimport decimalNumber from '@bingads-webui-component-legacy/humanize/decimal';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nvar i18nAudience = window.globalLegacyI18n.get('component/i18n/loader!campaignui/feature/audience-campaign');\r\nvar validateNumber = function (value) {\r\n return POUtils.isCashbackPercentValid(value, decimalNumber);\r\n};\r\nvar ViewModel = function (options) {\r\n Base.call(this);\r\n var actionOptions = _.compact([{\r\n Value: 'SetAmount',\r\n Text: i18n.getString('BulkEdit_AdGroup_SetBidOption_CashbackPercent')\r\n }, !options.isCampaignBulkEdit && ({\r\n Value: 'Remove',\r\n Text: i18n.getString('BulkEdit_CashbackPercent_SetToInherit')\r\n }), {\r\n Value: 'NoCashback',\r\n Text: i18n.getString('BulkEdit_CashbackPercent_SetToNoCashback')\r\n }]);\r\n this.actions = actionOptions;\r\n this.selectedAction = ko.observable(actions.Set);\r\n this.selectedAction.subscribe(function () {\r\n this.errorMessage('');\r\n }, this);\r\n this.showSetPanel = ko.computed(function () {\r\n var result = this.selectedAction() === actions.SetAmount;\r\n return result;\r\n }, this);\r\n this.selectedUnit = ko.observable('%');\r\n this.cashbackPercent = ko.observable();\r\n this.cashbackPercentValue = ko.computed({\r\n read: function () {\r\n return this.cashbackPercent();\r\n },\r\n write: function (value) {\r\n this.errorMessage('');\r\n this.cashbackPercent(value);\r\n },\r\n owner: this\r\n });\r\n this.titleText = ko.computed(function () {\r\n return i18n.getString('BulkEdit_CashbackPercent_HeaderText');\r\n }, this);\r\n this.doesIncludeExcludeItems = ko.observable(false);\r\n this.doesIncludeExcludeItemsText = ko.observable(i18n.getString('BulkEdit_ProductGroup_IncludeExcludedItems'));\r\n this.getCashbackPercentValueByAction = function () {\r\n var selectedAction = this.selectedAction();\r\n var cashbackPercentValue;\r\n switch (selectedAction) {\r\n case numericActionType.remove:\r\n cashbackPercentValue = -1;\r\n break;\r\n case numericActionType.noCashback:\r\n cashbackPercentValue = 0;\r\n break;\r\n default:\r\n if (cashbackPercentValue === '') {\r\n cashbackPercentValue = -1;\r\n } else {\r\n cashbackPercentValue = decimalNumber.fromLocalToFloat(this.cashbackPercentValue());\r\n }\r\n break;\r\n }\r\n return cashbackPercentValue;\r\n };\r\n this.cashbackPercentDescription = ko.observable(options.cashbackPercentDescription);\r\n this.validate = function () {\r\n this.errorMessage('');\r\n var selectedAction = this.selectedAction();\r\n var cashbackPercentValue = this.cashbackPercentValue();\r\n if (!cashbackPercentValue && selectedAction !== 'Remove' && selectedAction !== 'NoCashback') {\r\n return true;\r\n }\r\n if (cashbackPercentValue && selectedAction !== 'Remove' && selectedAction !== 'NoCashback') {\r\n var result = validateNumber(cashbackPercentValue);\r\n if (!result) {\r\n this.errorMessage(POUtils.getCashbackPercentValidationError(cashbackPercentValue, i18nAudience, decimalNumber));\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n};\r\nexport default ViewModel;\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nfunction from(params, from_version) {\r\n delete params.$format;\r\n if (params.$inlinecount) {\r\n delete params.$inlinecount;\r\n params.$count = true;\r\n }\r\n if (!(_.isString(params.$filter) && params.$filter.length)) {\r\n delete params.$filter;\r\n }\r\n if (params.$filter) {\r\n params.$filter = params.$filter.replace(/substringof\\(('.*?'),(tolower\\([\\w\\/]+?\\))\\)/g, 'contains($2, $1)');\r\n params.$filter = params.$filter.replace(/substringof\\(('.*?'),([\\w\\/]+?)\\)/g, 'contains($2, $1)');\r\n params.$filter = params.$filter.replace(/'Enum\\.(\\w+)''((\\w+,?)+)'''/g, 'Enum.$1\\'$2\\'');\r\n params.$filter = params.$filter.replace(/datetime'(.*?)'/g, '$1+00:00');\r\n }\r\n return params;\r\n}\r\nexport default {\r\n from: from\r\n};\r\n\r\n","/* eslint-disable */\r\nexport default {\r\n imagePath: '',\r\n enums: {\r\n alertEntity: {\r\n none: 0,\r\n import: 1,\r\n migration: 4,\r\n budgetOpportunity: 5,\r\n keywordOpportunity: 6,\r\n disapproved: 7,\r\n maintenance: 11,\r\n accountSuspended: 12,\r\n introBingAdsforioS: 20,\r\n incompatibleBrowsers: 22,\r\n adBlockWarning: 26,\r\n productsLimitation: 1000000\r\n },\r\n alertType: {\r\n none: 0,\r\n info: 1,\r\n warn: 2,\r\n error: 3\r\n },\r\n accountStatus: {\r\n none: 0,\r\n creditHold: 18,\r\n lockedForUpdate: 28,\r\n pendingPaymentInstrument: 29,\r\n draft: 30,\r\n active: 31,\r\n inActive: 32,\r\n deleted: 33,\r\n proposed: 34,\r\n pendingCreditCheck: 35,\r\n noHold: 36,\r\n soldToOnly: 37,\r\n creditWarning: 38,\r\n hold: 39,\r\n locked: 40,\r\n noLock: 41,\r\n userPaused: 42,\r\n suspended: 43,\r\n writeOff: 223,\r\n paused: 234,\r\n taxOnHold: 253,\r\n userHold: 254\r\n },\r\n accountInactiveReason: {\r\n notSet: 0,\r\n pausedDueToSystemIssue: 1,\r\n pausedZeroBalance: 2,\r\n pausedNoValidiO: 3,\r\n processing: 4,\r\n pendingPaymentMethod: 5,\r\n pendingNewCustomer: 6,\r\n inactive: 7,\r\n hold: 8,\r\n deleted: 9\r\n }\r\n }\r\n};\r\n\r\n","/* eslint-disable */\r\nimport $ from 'jquery';\r\nvar handler = function (event) {\r\n window.PopupController.PopupJsClick(this);\r\n event.stopPropagation();\r\n};\r\nexport default {\r\n run: function ($scope) {\r\n $scope = $scope || $('body');\r\n if ($scope.jquery) {\r\n var helpLinks = $scope.find('a[data-help]');\r\n helpLinks.off('click', handler).on('click', handler);\r\n }\r\n }\r\n};\r\n\r\n","/* eslint-disable */\r\nimport dn from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport $ from 'jquery';\r\n\r\nexport default {\r\n editBudget: function editBudget(fieldId, combinedBudget) {\r\n if (typeof combinedBudget == 'string') {\r\n combinedBudget = JSON.parse(combinedBudget.replace(/"/g, '\"'));\r\n }\r\n var editor = $.tmpl($('#budgetEditorTemplate'), {\r\n budgetValue: combinedBudget ? combinedBudget.BudgetAmount : '',\r\n budgetTypes: window.budgetTypes\r\n });\r\n if (combinedBudget) {\r\n $('.inline-budget-edit-type', editor).val(combinedBudget.SimplifiedBudgetLimitType);\r\n }\r\n return editor;\r\n },\r\n getBudget: function getBudget(control) {\r\n var budgetAmount = $(control).find('.inline-budget-edit-value').val();\r\n var budgetType = $(control).find('.inline-budget-edit-type').val();\r\n if (!(budgetAmount && budgetType)) {\r\n var currentValue = $(control).find('.combinedBudgetGridCellValue');\r\n budgetAmount = currentValue.data('budgetamount');\r\n budgetType = currentValue.data('budgettype');\r\n }\r\n return JSON.stringify({\r\n BudgetAmount: dn.fromLocalToStringStrict(budgetAmount),\r\n SimplifiedBudgetLimitType: budgetType\r\n });\r\n }\r\n};\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport kendo from '@bingads-webui/kendo/kendo.data.odata';\r\nimport odata_4 from '@bingads-webui-static-legacy/communication/adapter/odata-4';\r\nimport * as filterMetadata from '@bingads-webui/filter-commons';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport dateUtils from '@bingads-webui-static-legacy/utils/date';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nfunction convertDateToStandardFormat(dateString) {\r\n return dateUtils.parse(dateString);\r\n}\r\nfunction convertToPoPField(field, popOption) {\r\n if (popOption && popOption != 0) {\r\n if (field.indexOf('/') != -1) {\r\n var strings = field.split('/');\r\n if (strings.length >= 2) {\r\n var category = strings[0];\r\n var column = strings[1];\r\n if (popOption == 1) {\r\n category = 'PoP' + category;\r\n } else if (popOption == 2) {\r\n category = 'PoP' + category + 'Change';\r\n } else if (popOption == 3) {\r\n category = 'PoP' + category + 'ChangePercentage';\r\n } else {\r\n return field;\r\n }\r\n var result = category + '/' + column;\r\n return result;\r\n }\r\n }\r\n } else {\r\n return field;\r\n }\r\n}\r\nfunction toKendo(filterExpressions, entityType) {\r\n var filters = [];\r\n _.each(filterExpressions, function (item) {\r\n if (!item) {\r\n return;\r\n }\r\n var selectedColumn = item.SelectedColumn;\r\n var popOption = item.PeriodComparisonOption;\r\n var popPrefix = 'PoP';\r\n if ((/^PoP/).test(selectedColumn)) {\r\n var change = 'Change';\r\n var changePercent = 'ChangePercent';\r\n if (selectedColumn.match(change + '$')) {\r\n popOption = 2;\r\n selectedColumn = selectedColumn.slice(popPrefix.length, -change.length);\r\n } else if (selectedColumn.match(changePercent + '$')) {\r\n popOption = 3;\r\n selectedColumn = selectedColumn.slice(popPrefix.length, -changePercent.length);\r\n } else {\r\n popOption = 1;\r\n selectedColumn = selectedColumn.slice(popPrefix.length);\r\n }\r\n }\r\n var type = filterMetadata.columnTypeMapper(selectedColumn);\r\n var filterExpression = {\r\n field: filterMetadata.columnNameMapper(selectedColumn, entityType),\r\n operator: filterMetadata.operatorMapper(item.SelectedOperator, type)\r\n };\r\n if (popOption && popOption != 0) {\r\n filterExpression.field = convertToPoPField(filterExpression.field, popOption);\r\n }\r\n if (_.isArray(item.Values)) {\r\n if (item.Values.length > 1) {\r\n var opr = filterExpression.operator, subExpressions = [];\r\n _.each(item.Values, function (valueItem, index) {\r\n if (type === 'date') {\r\n valueItem = convertDateToStandardFormat(valueItem);\r\n }\r\n if (_.isArray(filterExpression.operator)) {\r\n opr = filterExpression.operator[index];\r\n }\r\n subExpressions.push({\r\n field: filterExpression.field,\r\n operator: opr,\r\n value: filterMetadata.valueFormatter(valueItem, type, filterExpression.field, entityType, decimal)\r\n });\r\n });\r\n filters.push({\r\n logic: _.isArray(filterExpression.operator) ? 'and' : 'or',\r\n filters: subExpressions\r\n });\r\n } else {\r\n if (type === 'date') {\r\n item.Values[0] = convertDateToStandardFormat(item.Values[0]);\r\n }\r\n filterExpression.value = filterMetadata.valueFormatter(item.Values[0], type, filterExpression.field, entityType, decimal);\r\n filters.push(filterExpression);\r\n }\r\n }\r\n });\r\n return {\r\n filters: filters\r\n };\r\n}\r\nfunction convertForLambdaExpression(filterExpressions, entityType) {\r\n var url = '';\r\n var indexToDelete = [];\r\n _.each(filterExpressions, function (item, index) {\r\n if (!item) {\r\n return;\r\n }\r\n var lambdaMappedResult = filterMetadata.lambdaMapper(item.SelectedOperator, item.SelectedColumn, entityType, item.Values);\r\n if (!_.isEmpty(lambdaMappedResult) && !_.isEmpty(item.Values)) {\r\n var partialUrl = lambdaExpressionMapping(item, lambdaMappedResult, entityType);\r\n if (url.length > 0) {\r\n url += ' and (';\r\n url += partialUrl;\r\n url += ')';\r\n } else {\r\n url += partialUrl;\r\n }\r\n indexToDelete.push(index);\r\n }\r\n });\r\n _.each(indexToDelete, function (index) {\r\n delete filterExpressions[index];\r\n });\r\n filterExpressions = _.without(filterExpressions, undefined);\r\n return url;\r\n}\r\nfunction lambdaExpressionMapping(item, lambdaMappedResult, entityType) {\r\n var partialUrl = '';\r\n var columnName = filterMetadata.columnNameMapper(item.SelectedColumn, entityType);\r\n var type = filterMetadata.columnTypeMapper(item.SelectedColumn);\r\n var fieldId = lambdaMappedResult.fieldId;\r\n if (lambdaMappedResult.mapToShorterVersion) {\r\n partialUrl += columnName;\r\n partialUrl += '/' + lambdaMappedResult.secondLogic + '(d:';\r\n }\r\n _.each(item.Values, function (value, index) {\r\n if (index > 0) {\r\n partialUrl += ' ' + lambdaMappedResult.logic + ' ';\r\n }\r\n var mappedOperatorAndValue = '';\r\n if (!_.isEmpty(lambdaMappedResult.operator)) {\r\n mappedOperatorAndValue = ' ' + lambdaMappedResult.operator + ' ' + (_.isUndefined(lambdaMappedResult.value) ? filterMetadata.valueFormatter(value, type, columnName, entityType, decimal) : lambdaMappedResult.value);\r\n }\r\n if (lambdaMappedResult.mapToShorterVersion) {\r\n partialUrl += fieldId + mappedOperatorAndValue;\r\n } else {\r\n partialUrl += columnName;\r\n partialUrl += '/' + lambdaMappedResult.secondLogic + '(' + fieldId + mappedOperatorAndValue + ')';\r\n }\r\n });\r\n if (lambdaMappedResult.mapToShorterVersion) {\r\n partialUrl += ')';\r\n }\r\n return partialUrl;\r\n}\r\nfunction convert(filterExpressions, entityType) {\r\n var filterExpressionsCopy = _.isEmpty(filterExpressions) ? {} : $.extend(true, {}, filterExpressions);\r\n var lamdaExpressionUrlPart = convertForLambdaExpression(filterExpressionsCopy, entityType);\r\n var odata_params = kendo.data.transports.odata.parameterMap({\r\n filter: toKendo(filterExpressionsCopy, entityType)\r\n }, 'read');\r\n var result = odata_4.from(odata_params);\r\n if (!_.isEmpty(lamdaExpressionUrlPart) && lamdaExpressionUrlPart.length > 0) {\r\n result.$filter = result.$filter || '';\r\n result.$filter += result.$filter.length > 0 ? ' and ' : '';\r\n result.$filter += lamdaExpressionUrlPart;\r\n }\r\n return result;\r\n}\r\nfunction convertToURLParam(filterExpressions, entityType) {\r\n var expression = convert(filterExpressions, entityType);\r\n if (expression && expression.$filter) {\r\n return '$filter=' + encodeURIComponent(expression.$filter);\r\n }\r\n return '';\r\n}\r\nexport default {\r\n toKendo: toKendo,\r\n convertForLambdaExpression: convertForLambdaExpression,\r\n convert: convert,\r\n convertToURLParam: convertToURLParam\r\n};\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Template from '@bingads-webui-static-legacy/shared/template/popup.pug';\r\nimport uiBlocker from '@bingads-webui-component-legacy/uiblocker/service/uiBlocker';\r\nvar container;\r\nvar popupContentContainer;\r\nvar containerSelector = '.popup-container';\r\nvar contentSelector = '.popup-content';\r\nvar dialogSelector = '.popup-dialog';\r\nvar defaultHeight = 400;\r\nvar blocked = false;\r\nvar render = function (renderHtml, height) {\r\n preparePopupContainer();\r\n if (popupContentContainer && popupContentContainer.length > 0) {\r\n popupContentContainer.html(renderHtml);\r\n if (popupContentContainer.length > 0) {\r\n _.each(popupContentContainer.children(), function (child) {\r\n $(child).addClass('center-block');\r\n });\r\n }\r\n }\r\n if (!_.isUndefined(height) && _.isNumber(height)) {\r\n container.find(dialogSelector).css({\r\n 'height': height + 'px'\r\n });\r\n } else {\r\n container.find(dialogSelector).css({\r\n 'height': defaultHeight + 'px'\r\n });\r\n }\r\n show();\r\n};\r\nvar drag_start = function (event) {\r\n event.originalEvent.dataTransfer.setData('text', event.clientX + ',' + event.clientY);\r\n};\r\nvar drop = function (event, draggableItem) {\r\n var eventStart = event.originalEvent.dataTransfer.getData('text').split(',');\r\n var moveOnYAxis = event.clientY - parseInt(eventStart[1], 10);\r\n var moveOnXAxis = event.clientX - parseInt(eventStart[0], 10);\r\n var originOffset = draggableItem.offset();\r\n draggableItem.offset({\r\n top: originOffset.top + moveOnYAxis,\r\n left: originOffset.left + moveOnXAxis\r\n });\r\n event.preventDefault();\r\n return false;\r\n};\r\nvar drag_over = function (event) {\r\n event.preventDefault();\r\n return false;\r\n};\r\nvar draggable = function (draggableItem, draggableContainer) {\r\n draggableItem.on('dragstart', drag_start);\r\n draggableContainer.on('dragover', drag_over);\r\n draggableContainer.on('drop', function (event) {\r\n drop(event, $(draggableItem[0]));\r\n });\r\n};\r\nvar bindDraggable = _.once(function (container) {\r\n draggable(container, $('body'));\r\n});\r\nvar preparePopupContainer = function () {\r\n container = $(containerSelector);\r\n popupContentContainer = container.length > 0 ? container.find(contentSelector) : null;\r\n if (container.length === 0 || !popupContentContainer || popupContentContainer.length === 0) {\r\n container.remove();\r\n var oldBlocker = $('.blocker-panel');\r\n if (oldBlocker.length == 1) {\r\n $(Template()).insertBefore(oldBlocker);\r\n } else {\r\n $('body').append(Template());\r\n }\r\n container = $(containerSelector);\r\n popupContentContainer = container.find(contentSelector);\r\n } else {\r\n popupContentContainer.empty();\r\n }\r\n $(document).unbind('click.popup');\r\n $(document).bind('click.popup', closePopupByClick);\r\n bindDraggable(popupContentContainer);\r\n};\r\nvar show = function () {\r\n if (!_.isUndefined(container) && container != null) {\r\n container.removeClass('fade');\r\n container.addClass('show');\r\n }\r\n};\r\nvar hide = function () {\r\n if (!_.isUndefined(container) && container !== null) {\r\n container.removeClass('show');\r\n container.addClass('fade');\r\n if (blocked) {\r\n uiBlocker.unblock(container, 'popupBlocker');\r\n }\r\n }\r\n};\r\nvar resizeBlockingImg = function () {\r\n $.advertiser.showLoadingPanel();\r\n $('.blocker-panel').css({\r\n 'left': 0,\r\n 'top': '0 !important'\r\n });\r\n};\r\nvar block = function () {\r\n if (!_.isUndefined(container) && container !== null) {\r\n uiBlocker.block(container, 'popupBlocker');\r\n blocked = true;\r\n }\r\n};\r\nvar closePopupByClick = function (e) {\r\n const $target = $(e.target);\r\n if ($target.closest('.popup-content').length === 1 || $target.attr('data-role') === 'droptarget') {\r\n return;\r\n }\r\n closePopup();\r\n};\r\nvar closePopup = function (e) {\r\n hide();\r\n $(document).unbind('click.popup');\r\n};\r\nexport default {\r\n render: render,\r\n close: closePopup,\r\n show: show,\r\n block: block,\r\n resizeBlockingImg: resizeBlockingImg\r\n};\r\n\r\n","/* eslint-disable */\r\nexport default {\r\n SetAmount: 'SetAmount',\r\n IncreaseBid: 'IncreaseBid',\r\n DecreaseBid: 'DecreaseBid',\r\n BestBid: 'BestBid',\r\n FirstPageBid: 'FirstPageBid',\r\n ExcludeBid: 'ExcludeBid'\r\n};\r\n\r\n","/* eslint-disable */\r\nexport default {\r\n Set: 'SetAmount',\r\n Increase: 'IncreaseBudget',\r\n Decrease: 'DecreaseBudget'\r\n};\r\n\r\n","/* eslint-disable */\r\nexport default {\r\n changeByPercent: 'ChangeByPercent',\r\n changeByAmount: 'ChangeByAmount',\r\n setAmount: 'SetToAmount',\r\n excludeBid: 'Set',\r\n remove: 'Remove',\r\n noCashback: 'NoCashback'\r\n};\r\n\r\n","/* eslint-disable */\r\nexport default {\r\n All: 'all',\r\n OnlyErrors: 'errors',\r\n OnlySuccessful: 'success'\r\n};\r\n\r\n","/* eslint-disable */\r\nexport default {\r\n pendingStart: 'Pending',\r\n inProgress: 'InProgress',\r\n completed: 'Completed',\r\n completedWithErrors: 'CompletedWithErrors',\r\n failed: 'Failed'\r\n};\r\n\r\n","/* eslint-disable */\r\nexport default {\r\n monthly: 'Monthly',\r\n dailyStandard: 'DailyStandard',\r\n dailyAccelerated: 'DailyAccelerated',\r\n lifetimeBudgetStandard: 'LifetimeBudgetStandard'\r\n};\r\n\r\n","/* eslint-disable */\r\nexport default {\r\n Active: 'Active',\r\n Deleted: 'Deleted',\r\n Paused: 'UserPaused',\r\n Suspended: 'Suspended',\r\n InProgress: 'InProgress',\r\n EnumPaused: 124,\r\n EnumBudgetPaused: 126,\r\n EnumBudgetUserPaused: 127\r\n};\r\n\r\n","/* eslint-disable */\r\nimport _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport $ from 'jquery';\r\nimport * as filterMetadata from '@bingads-webui/filter-commons';\r\nexport default {\r\n refresh: function (grid, cb) {\r\n if (grid.gridView) {\r\n grid.gridView.refresh(true);\r\n if (_.isFunction(cb)) {\r\n grid.gridView.once('didReload', cb);\r\n }\r\n } else {\r\n _.isFunction(cb) ? grid.go().then(cb, cb) : grid.go();\r\n }\r\n },\r\n onBulkEditViewHide: function (view, grid) {\r\n if (grid.gridView) {\r\n view.trigger('hide');\r\n } else {\r\n grid.gridDom.trigger('showToolbar');\r\n }\r\n },\r\n unbindRowSelection: function (grid) {\r\n if (!grid.gridView) {\r\n grid.gridDom.unbind(grid.rowSelectionChanged + '.ruleAuthoringEvents');\r\n }\r\n },\r\n getSelectedRowIds: function (grid) {\r\n if (grid) {\r\n return grid.gridView ? grid.gridView.selectedKeys() : grid.getSelectedRowIds();\r\n }\r\n return null;\r\n },\r\n isCrossPageAllSelected: function (grid) {\r\n if (grid.gridView) {\r\n return grid.pgridPlugins.crossPageSelectAll.isAllSelected;\r\n } else {\r\n return grid.getSelectionScope() === 'AllPages';\r\n }\r\n },\r\n getTotalRowsCount: function (grid) {\r\n if (grid.gridView) {\r\n return grid.gridView.totalCountRows;\r\n } else {\r\n return grid.getTotalRecordCount();\r\n }\r\n },\r\n getSelectedRows: function (grid) {\r\n if (grid) {\r\n return grid.gridView ? grid.gridView.selectedItems() : grid.getSelectedRowItems();\r\n }\r\n return [];\r\n },\r\n getSelectedRowsCount: function (grid) {\r\n if (grid) {\r\n var isCrossPageAllSelected = this.isCrossPageAllSelected(grid);\r\n return isCrossPageAllSelected ? this.getTotalRowsCount(grid) : this.getSelectedRowIds(grid).length;\r\n }\r\n return 0;\r\n },\r\n deselectAll: function (grid) {\r\n if (grid.gridView) {\r\n return grid.gridView.deselectAll();\r\n } else {\r\n return grid.toggleAllRows(false, true);\r\n }\r\n },\r\n getSelectedEntityIds: function (grid) {\r\n if (grid) {\r\n var ids = grid.gridView ? grid.gridView.selectedKeys() : grid.getSelectedRowIds();\r\n ids = _.map(ids, function (value) {\r\n var indexOf_ = value.indexOf('_');\r\n if (indexOf_ < 0) return parseInt(value);\r\n return parseInt(value.substring(0, value.indexOf('_')));\r\n });\r\n return ids;\r\n }\r\n return null;\r\n },\r\n allPageSelected: function (grid) {\r\n if (grid.crossPageSelectAll) {\r\n return grid.crossPageSelectAll.isAllSelected;\r\n } else if (grid.pgridPlugins) {\r\n return grid.pgridPlugins.crossPageSelectAll && grid.pgridPlugins.crossPageSelectAll.isAllSelected;\r\n } else {\r\n return grid.getSelectionScope() === 'AllPages';\r\n }\r\n },\r\n getPageSize: function (grid) {\r\n return grid.pgridPlugins && grid.pgridPlugins.pagination ? grid.pgridPlugins.pagination.pageSize : grid.getPageSize();\r\n },\r\n getCurrentPage: function (grid) {\r\n return grid.pgridPlugins && grid.pgridPlugins.pagination ? grid.pgridPlugins.pagination.pageNumber : grid.getCurrentPage();\r\n },\r\n getColumnValue: function (grid, rowId, columnName) {\r\n if (grid.gridView) {\r\n return _.result(grid.gridView.itemWithKey(rowId), columnName);\r\n }\r\n return grid.getColumnValue(rowId, columnName);\r\n },\r\n getSortInfo: function (entity, grid) {\r\n var sortParams = {};\r\n var sortInfo = '';\r\n if (grid.gridView) {\r\n var sort = grid.gridView.get('sortableHeader');\r\n sortParams.ColumnId = sort.name;\r\n sortParams.Direction = sort.direction <= 0 ? 'd' : 'a';\r\n } else {\r\n sortParams = grid.sortInfo;\r\n }\r\n if (sortParams && sortParams.ColumnId) {\r\n if (grid.gridView) {\r\n var orderby = grid.gridView.get('query').orderby;\r\n if (orderby && orderby.length > 0) {\r\n sortInfo = orderby[0].key;\r\n }\r\n } else {\r\n sortInfo = filterMetadata.columnNameMapper(sortParams.ColumnId, entity);\r\n }\r\n if (sortParams.Direction === 'd') {\r\n sortInfo += ' desc';\r\n }\r\n }\r\n return sortInfo;\r\n },\r\n hideToolbar: function (grid) {\r\n if (grid.gridView) {\r\n grid.toolbar.gridToolbarGroup.hideAllToolbars();\r\n } else {\r\n grid.gridDom.trigger('hideToolbar');\r\n }\r\n },\r\n showToolbar: function (grid) {\r\n if (grid.gridView) {\r\n grid.toolbar.gridToolbarGroup.showAllToolbars();\r\n } else {\r\n grid.gridDom.trigger('showToolbar');\r\n }\r\n },\r\n hideGroupMenu: function (grid) {\r\n if (!grid.gridView) {\r\n grid.hideGroupMenu();\r\n }\r\n },\r\n loadPage: function (grid, data) {\r\n if (grid.gridView) {\r\n grid.gridView.refresh(true);\r\n } else {\r\n grid.loadPage(data);\r\n }\r\n }\r\n};\r\n\r\n","/* eslint-disable */\r\n/**\r\n * Sinon.JS 1.17.2, 2015/10/21\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @author Contributors: https://github.com/cjohansen/Sinon.JS/blob/master/AUTHORS\r\n *\r\n * (The BSD License)\r\n *\r\n * Copyright (c) 2010-2014, Christian Johansen, christian@cjohansen.no\r\n * All rights reserved.\r\n *\r\n * Redistribution and use in source and binary forms, with or without modification,\r\n * are permitted provided that the following conditions are met:\r\n *\r\n * * Redistributions of source code must retain the above copyright notice,\r\n * this list of conditions and the following disclaimer.\r\n * * Redistributions in binary form must reproduce the above copyright notice,\r\n * this list of conditions and the following disclaimer in the documentation\r\n * and/or other materials provided with the distribution.\r\n * * Neither the name of Christian Johansen nor the names of his contributors\r\n * may be used to endorse or promote products derived from this software\r\n * without specific prior written permission.\r\n *\r\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\r\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\r\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\r\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\r\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\r\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n */\r\n\r\nvar lolexModule = require('lolex');\r\n\r\n(function (root, factory) {\r\n 'use strict';\r\n if (/* typeof define === 'function' && define.amd */ false) {\r\n define('sinon-legacy', [], function () {\r\n return (root.sinon = factory());\r\n });\r\n } else if (typeof exports === 'object') {\r\n module.exports = factory();\r\n } else {\r\n root.sinon = factory();\r\n }\r\n}(this, function () {\r\n var samsam, formatio, lolex;\r\n lolex = lolexModule;\r\n (function () {\r\n function define(mod, deps, fn) {\r\n if (mod == 'samsam') {\r\n samsam = deps();\r\n } else if (typeof deps === 'function' && mod.length === 0) {\r\n lolex = deps();\r\n } else if (typeof fn === 'function') {\r\n formatio = fn(samsam);\r\n }\r\n }\r\n define.amd = {};\r\n((/* typeof define === 'function' && define.amd */ false && function (m) { define('samsam', m); }) ||\r\n (typeof module === 'object' &&\r\n function (m) { module.exports = m(); }) || // Node\r\n function (m) { this.samsam = m(); } // Browser globals\r\n)(function () {\r\n var o = Object.prototype;\r\n var div = typeof document !== 'undefined' && document.createElement('div');\r\n\r\n function isNaN(value) {\r\n // Unlike global isNaN, this avoids type coercion\r\n // typeof check avoids IE host object issues, hat tip to\r\n // lodash\r\n var val = value; // JsLint thinks value !== value is \"weird\"\r\n return typeof value === 'number' && value !== val;\r\n }\r\n\r\n function getClass(value) {\r\n // Returns the internal [[Class]] by calling Object.prototype.toString\r\n // with the provided value as this. Return value is a string, naming the\r\n // internal class, e.g. \"Array\"\r\n return o.toString.call(value).split(/[ \\]]/)[1];\r\n }\r\n\r\n /**\r\n * @name samsam.isArguments\r\n * @param Object object\r\n *\r\n * Returns ``true`` if ``object`` is an ``arguments`` object,\r\n * ``false`` otherwise.\r\n */\r\n function isArguments(object) {\r\n if (getClass(object) === 'Arguments') { return true; }\r\n if (typeof object !== 'object' || typeof object.length !== 'number' ||\r\n getClass(object) === 'Array') {\r\n return false;\r\n }\r\n if (typeof object.callee == 'function') { return true; }\r\n try {\r\n object[object.length] = 6;\r\n delete object[object.length];\r\n } catch (e) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * @name samsam.isElement\r\n * @param Object object\r\n *\r\n * Returns ``true`` if ``object`` is a DOM element node. Unlike\r\n * Underscore.js/lodash, this function will return ``false`` if ``object``\r\n * is an *element-like* object, i.e. a regular object with a ``nodeType``\r\n * property that holds the value ``1``.\r\n */\r\n function isElement(object) {\r\n if (!object || object.nodeType !== 1 || !div) { return false; }\r\n try {\r\n object.appendChild(div);\r\n object.removeChild(div);\r\n } catch (e) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * @name samsam.keys\r\n * @param Object object\r\n *\r\n * Return an array of own property names.\r\n */\r\n function keys(object) {\r\n var ks = [], prop;\r\n for (prop in object) {\r\n if (o.hasOwnProperty.call(object, prop)) { ks.push(prop); }\r\n }\r\n return ks;\r\n }\r\n\r\n /**\r\n * @name samsam.isDate\r\n * @param Object value\r\n *\r\n * Returns true if the object is a ``Date``, or *date-like*. Duck typing\r\n * of date objects work by checking that the object has a ``getTime``\r\n * function whose return value equals the return value from the object's\r\n * ``valueOf``.\r\n */\r\n function isDate(value) {\r\n return typeof value.getTime == 'function' &&\r\n value.getTime() == value.valueOf();\r\n }\r\n\r\n /**\r\n * @name samsam.isNegZero\r\n * @param Object value\r\n *\r\n * Returns ``true`` if ``value`` is ``-0``.\r\n */\r\n function isNegZero(value) {\r\n return value === 0 && 1 / value === -Infinity;\r\n }\r\n\r\n /**\r\n * @name samsam.equal\r\n * @param Object obj1\r\n * @param Object obj2\r\n *\r\n * Returns ``true`` if two objects are strictly equal. Compared to\r\n * ``===`` there are two exceptions:\r\n *\r\n * - NaN is considered equal to NaN\r\n * - -0 and +0 are not considered equal\r\n */\r\n function identical(obj1, obj2) {\r\n if (obj1 === obj2 || (isNaN(obj1) && isNaN(obj2))) {\r\n return obj1 !== 0 || isNegZero(obj1) === isNegZero(obj2);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * @name samsam.deepEqual\r\n * @param Object obj1\r\n * @param Object obj2\r\n *\r\n * Deep equal comparison. Two values are \"deep equal\" if:\r\n *\r\n * - They are equal, according to samsam.identical\r\n * - They are both date objects representing the same time\r\n * - They are both arrays containing elements that are all deepEqual\r\n * - They are objects with the same set of properties, and each property\r\n * in ``obj1`` is deepEqual to the corresponding property in ``obj2``\r\n *\r\n * Supports cyclic objects.\r\n */\r\n function deepEqualCyclic(obj1, obj2) {\r\n\r\n // used for cyclic comparison\r\n // contain already visited objects\r\n var objects1 = [],\r\n objects2 = [],\r\n // contain pathes (position in the object structure)\r\n // of the already visited objects\r\n // indexes same as in objects arrays\r\n paths1 = [],\r\n paths2 = [],\r\n // contains combinations of already compared objects\r\n // in the manner: { \"$1['ref']$2['ref']\": true }\r\n compared = {};\r\n\r\n /**\r\n * used to check, if the value of a property is an object\r\n * (cyclic logic is only needed for objects)\r\n * only needed for cyclic logic\r\n */\r\n function isObject(value) {\r\n\r\n if (typeof value === 'object' && value !== null &&\r\n !(value instanceof Boolean) &&\r\n !(value instanceof Date) &&\r\n !(value instanceof Number) &&\r\n !(value instanceof RegExp) &&\r\n !(value instanceof String)) {\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * returns the index of the given object in the\r\n * given objects array, -1 if not contained\r\n * only needed for cyclic logic\r\n */\r\n function getIndex(objects, obj) {\r\n\r\n var i;\r\n for (i = 0; i < objects.length; i++) {\r\n if (objects[i] === obj) {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n // does the recursion for the deep equal check\r\n return (function deepEqual(obj1, obj2, path1, path2) {\r\n var type1 = typeof obj1;\r\n var type2 = typeof obj2;\r\n\r\n // == null also matches undefined\r\n if (obj1 === obj2 ||\r\n isNaN(obj1) || isNaN(obj2) ||\r\n obj1 == null || obj2 == null ||\r\n type1 !== 'object' || type2 !== 'object') {\r\n\r\n return identical(obj1, obj2);\r\n }\r\n\r\n // Elements are only equal if identical(expected, actual)\r\n if (isElement(obj1) || isElement(obj2)) { return false; }\r\n\r\n var isDate1 = isDate(obj1), isDate2 = isDate(obj2);\r\n if (isDate1 || isDate2) {\r\n if (!isDate1 || !isDate2 || obj1.getTime() !== obj2.getTime()) {\r\n return false;\r\n }\r\n }\r\n\r\n if (obj1 instanceof RegExp && obj2 instanceof RegExp) {\r\n if (obj1.toString() !== obj2.toString()) { return false; }\r\n }\r\n\r\n var class1 = getClass(obj1);\r\n var class2 = getClass(obj2);\r\n var keys1 = keys(obj1);\r\n var keys2 = keys(obj2);\r\n\r\n if (isArguments(obj1) || isArguments(obj2)) {\r\n if (obj1.length !== obj2.length) { return false; }\r\n } else {\r\n if (type1 !== type2 || class1 !== class2 ||\r\n keys1.length !== keys2.length) {\r\n return false;\r\n }\r\n }\r\n\r\n var key, i, l,\r\n // following vars are used for the cyclic logic\r\n value1, value2,\r\n isObject1, isObject2,\r\n index1, index2,\r\n newPath1, newPath2;\r\n\r\n for (i = 0, l = keys1.length; i < l; i++) {\r\n key = keys1[i];\r\n if (!o.hasOwnProperty.call(obj2, key)) {\r\n return false;\r\n }\r\n\r\n // Start of the cyclic logic\r\n\r\n value1 = obj1[key];\r\n value2 = obj2[key];\r\n\r\n isObject1 = isObject(value1);\r\n isObject2 = isObject(value2);\r\n\r\n // determine, if the objects were already visited\r\n // (it's faster to check for isObject first, than to\r\n // get -1 from getIndex for non objects)\r\n index1 = isObject1 ? getIndex(objects1, value1) : -1;\r\n index2 = isObject2 ? getIndex(objects2, value2) : -1;\r\n\r\n // determine the new pathes of the objects\r\n // - for non cyclic objects the current path will be extended\r\n // by current property name\r\n // - for cyclic objects the stored path is taken\r\n newPath1 = index1 !== -1\r\n ? paths1[index1]\r\n : path1 + '[' + JSON.stringify(key) + ']';\r\n newPath2 = index2 !== -1\r\n ? paths2[index2]\r\n : path2 + '[' + JSON.stringify(key) + ']';\r\n\r\n // stop recursion if current objects are already compared\r\n if (compared[newPath1 + newPath2]) {\r\n return true;\r\n }\r\n\r\n // remember the current objects and their pathes\r\n if (index1 === -1 && isObject1) {\r\n objects1.push(value1);\r\n paths1.push(newPath1);\r\n }\r\n if (index2 === -1 && isObject2) {\r\n objects2.push(value2);\r\n paths2.push(newPath2);\r\n }\r\n\r\n // remember that the current objects are already compared\r\n if (isObject1 && isObject2) {\r\n compared[newPath1 + newPath2] = true;\r\n }\r\n\r\n // End of cyclic logic\r\n\r\n // neither value1 nor value2 is a cycle\r\n // continue with next level\r\n if (!deepEqual(value1, value2, newPath1, newPath2)) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n\r\n }(obj1, obj2, '$1', '$2'));\r\n }\r\n\r\n var match;\r\n\r\n function arrayContains(array, subset) {\r\n if (subset.length === 0) { return true; }\r\n var i, l, j, k;\r\n for (i = 0, l = array.length; i < l; ++i) {\r\n if (match(array[i], subset[0])) {\r\n for (j = 0, k = subset.length; j < k; ++j) {\r\n if (!match(array[i + j], subset[j])) { return false; }\r\n }\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * @name samsam.match\r\n * @param Object object\r\n * @param Object matcher\r\n *\r\n * Compare arbitrary value ``object`` with matcher.\r\n */\r\n match = function match(object, matcher) {\r\n if (matcher && typeof matcher.test === 'function') {\r\n return matcher.test(object);\r\n }\r\n\r\n if (typeof matcher === 'function') {\r\n return matcher(object) === true;\r\n }\r\n\r\n if (typeof matcher === 'string') {\r\n matcher = matcher.toLowerCase();\r\n var notNull = typeof object === 'string' || !!object;\r\n return notNull &&\r\n (String(object)).toLowerCase().indexOf(matcher) >= 0;\r\n }\r\n\r\n if (typeof matcher === 'number') {\r\n return matcher === object;\r\n }\r\n\r\n if (typeof matcher === 'boolean') {\r\n return matcher === object;\r\n }\r\n\r\n if (typeof(matcher) === 'undefined') {\r\n return typeof(object) === 'undefined';\r\n }\r\n\r\n if (matcher === null) {\r\n return object === null;\r\n }\r\n\r\n if (getClass(object) === 'Array' && getClass(matcher) === 'Array') {\r\n return arrayContains(object, matcher);\r\n }\r\n\r\n if (matcher && typeof matcher === 'object') {\r\n if (matcher === object) {\r\n return true;\r\n }\r\n var prop;\r\n for (prop in matcher) {\r\n var value = object[prop];\r\n if (typeof value === 'undefined' &&\r\n typeof object.getAttribute === 'function') {\r\n value = object.getAttribute(prop);\r\n }\r\n if (matcher[prop] === null || typeof matcher[prop] === 'undefined') {\r\n if (value !== matcher[prop]) {\r\n return false;\r\n }\r\n } else if (typeof value === 'undefined' || !match(value, matcher[prop])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n throw new Error('Matcher was not a string, a number, a ' +\r\n 'function, a boolean or an object');\r\n };\r\n\r\n return {\r\n isArguments: isArguments,\r\n isElement: isElement,\r\n isDate: isDate,\r\n isNegZero: isNegZero,\r\n identical: identical,\r\n deepEqual: deepEqualCyclic,\r\n match: match,\r\n keys: keys\r\n };\r\n});\r\n((/* typeof define === 'function' && define.amd */ false && function (m) {\r\n define('formatio', ['samsam'], m);\r\n}) || (typeof module === 'object' && function (m) {\r\n module.exports = m(/* require */('samsam'));\r\n}) || function (m) { this.formatio = m(this.samsam); }\r\n)(function (samsam) {\r\n\r\n var formatio = {\r\n excludeConstructors: ['Object', /^.$/],\r\n quoteStrings: true,\r\n limitChildrenCount: 0\r\n };\r\n\r\n var hasOwn = Object.prototype.hasOwnProperty;\r\n\r\n var specialObjects = [];\r\n if (typeof global !== 'undefined') {\r\n specialObjects.push({ object: global, value: '[object global]' });\r\n }\r\n if (typeof document !== 'undefined') {\r\n specialObjects.push({\r\n object: document,\r\n value: '[object HTMLDocument]'\r\n });\r\n }\r\n if (typeof window !== 'undefined') {\r\n specialObjects.push({ object: window, value: '[object Window]' });\r\n }\r\n\r\n function functionName(func) {\r\n if (!func) { return ''; }\r\n if (func.displayName) { return func.displayName; }\r\n if (func.name) { return func.name; }\r\n var matches = func.toString().match(/function\\s+([^\\(]+)/m);\r\n return (matches && matches[1]) || '';\r\n }\r\n\r\n function constructorName(f, object) {\r\n var name = functionName(object && object.constructor);\r\n var excludes = f.excludeConstructors ||\r\n formatio.excludeConstructors || [];\r\n\r\n var i, l;\r\n for (i = 0, l = excludes.length; i < l; ++i) {\r\n if (typeof excludes[i] === 'string' && excludes[i] === name) {\r\n return '';\r\n } else if (excludes[i].test && excludes[i].test(name)) {\r\n return '';\r\n }\r\n }\r\n\r\n return name;\r\n }\r\n\r\n function isCircular(object, objects) {\r\n if (typeof object !== 'object') { return false; }\r\n var i, l;\r\n for (i = 0, l = objects.length; i < l; ++i) {\r\n if (objects[i] === object) { return true; }\r\n }\r\n return false;\r\n }\r\n\r\n function ascii(f, object, processed, indent) {\r\n if (typeof object === 'string') {\r\n var qs = f.quoteStrings;\r\n var quote = typeof qs !== 'boolean' || qs;\r\n return processed || quote ? '\"' + object + '\"' : object;\r\n }\r\n\r\n if (typeof object === 'function' && !(object instanceof RegExp)) {\r\n return ascii.func(object);\r\n }\r\n\r\n processed = processed || [];\r\n\r\n if (isCircular(object, processed)) { return '[Circular]'; }\r\n\r\n if (Object.prototype.toString.call(object) === '[object Array]') {\r\n return ascii.array.call(f, object, processed);\r\n }\r\n\r\n if (!object) { return String((1/object) === -Infinity ? '-0' : object); }\r\n if (samsam.isElement(object)) { return ascii.element(object); }\r\n\r\n if (typeof object.toString === 'function' &&\r\n object.toString !== Object.prototype.toString) {\r\n return object.toString();\r\n }\r\n\r\n var i, l;\r\n for (i = 0, l = specialObjects.length; i < l; i++) {\r\n if (object === specialObjects[i].object) {\r\n return specialObjects[i].value;\r\n }\r\n }\r\n\r\n return ascii.object.call(f, object, processed, indent);\r\n }\r\n\r\n ascii.func = function (func) {\r\n return 'function ' + functionName(func) + '() {}';\r\n };\r\n\r\n ascii.array = function (array, processed) {\r\n processed = processed || [];\r\n processed.push(array);\r\n var pieces = [];\r\n var i, l;\r\n l = (this.limitChildrenCount > 0) ?\r\n Math.min(this.limitChildrenCount, array.length) : array.length;\r\n\r\n for (i = 0; i < l; ++i) {\r\n pieces.push(ascii(this, array[i], processed));\r\n }\r\n\r\n if(l < array.length)\r\n pieces.push('[... ' + (array.length - l) + ' more elements]');\r\n\r\n return '[' + pieces.join(', ') + ']';\r\n };\r\n\r\n ascii.object = function (object, processed, indent) {\r\n processed = processed || [];\r\n processed.push(object);\r\n indent = indent || 0;\r\n var pieces = [], properties = samsam.keys(object).sort();\r\n var length = 3;\r\n var prop, str, obj, i, k, l;\r\n l = (this.limitChildrenCount > 0) ?\r\n Math.min(this.limitChildrenCount, properties.length) : properties.length;\r\n\r\n for (i = 0; i < l; ++i) {\r\n prop = properties[i];\r\n obj = object[prop];\r\n\r\n if (isCircular(obj, processed)) {\r\n str = '[Circular]';\r\n } else {\r\n str = ascii(this, obj, processed, indent + 2);\r\n }\r\n\r\n str = (/\\s/.test(prop) ? '\"' + prop + '\"' : prop) + ': ' + str;\r\n length += str.length;\r\n pieces.push(str);\r\n }\r\n\r\n var cons = constructorName(this, object);\r\n var prefix = cons ? '[' + cons + '] ' : '';\r\n var is = '';\r\n for (i = 0, k = indent; i < k; ++i) { is += ' '; }\r\n\r\n if(l < properties.length)\r\n pieces.push('[... ' + (properties.length - l) + ' more elements]');\r\n\r\n if (length + indent > 80) {\r\n return prefix + '{\\n ' + is + pieces.join(',\\n ' + is) + '\\n' +\r\n is + '}';\r\n }\r\n return prefix + '{ ' + pieces.join(', ') + ' }';\r\n };\r\n\r\n ascii.element = function (element) {\r\n var tagName = element.tagName.toLowerCase();\r\n var attrs = element.attributes, attr, pairs = [], attrName, i, l, val;\r\n\r\n for (i = 0, l = attrs.length; i < l; ++i) {\r\n attr = attrs.item(i);\r\n attrName = attr.nodeName.toLowerCase().replace('html:', '');\r\n val = attr.nodeValue;\r\n if (attrName !== 'contenteditable' || val !== 'inherit') {\r\n if (!!val) { pairs.push(attrName + '=\"' + val + '\"'); }\r\n }\r\n }\r\n\r\n var formatted = '<' + tagName + (pairs.length > 0 ? ' ' : '');\r\n var content = element.innerHTML;\r\n\r\n if (content.length > 20) {\r\n content = content.substr(0, 20) + '[...]';\r\n }\r\n\r\n var res = formatted + pairs.join(' ') + '>' + content +\r\n '';\r\n\r\n return res.replace(/ contentEditable=\"inherit\"/, '');\r\n };\r\n\r\n function Formatio(options) {\r\n for (var opt in options) {\r\n this[opt] = options[opt];\r\n }\r\n }\r\n\r\n Formatio.prototype = {\r\n functionName: functionName,\r\n\r\n configure: function (options) {\r\n return new Formatio(options);\r\n },\r\n\r\n constructorName: function (object) {\r\n return constructorName(this, object);\r\n },\r\n\r\n ascii: function (object, processed, indent) {\r\n return ascii(this, object, processed, indent);\r\n }\r\n };\r\n\r\n return Formatio.prototype;\r\n});\r\n!function(e){if('object'==typeof exports&&'undefined'!=typeof module)module.exports=e();else if(/* typeof define === 'function' && define.amd */ false)define([],e);else{var f;'undefined'!=typeof window?f=window:'undefined'!=typeof global?f=global:'undefined'!=typeof self&&(f=self),f.lolex=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=='function'&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error('Cannot find module \\''+o+'\\'');throw f.code='MODULE_NOT_FOUND',f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=='function'&&require;for(var o=0;o 3 || !/^(\\d\\d:){0,2}\\d\\d?$/.test(str)) {\r\n throw new Error('tick only understands numbers and \\'h:m:s\\'');\r\n }\r\n\r\n while (i--) {\r\n parsed = parseInt(strings[i], 10);\r\n\r\n if (parsed >= 60) {\r\n throw new Error('Invalid time ' + str);\r\n }\r\n\r\n ms += parsed * Math.pow(60, (l - i - 1));\r\n }\r\n\r\n return ms * 1000;\r\n }\r\n\r\n /**\r\n * Used to grok the `now` parameter to createClock.\r\n */\r\n function getEpoch(epoch) {\r\n if (!epoch) { return 0; }\r\n if (typeof epoch.getTime === 'function') { return epoch.getTime(); }\r\n if (typeof epoch === 'number') { return epoch; }\r\n throw new TypeError('now should be milliseconds since UNIX epoch');\r\n }\r\n\r\n function inRange(from, to, timer) {\r\n return timer && timer.callAt >= from && timer.callAt <= to;\r\n }\r\n\r\n function mirrorDateProperties(target, source) {\r\n var prop;\r\n for (prop in source) {\r\n if (source.hasOwnProperty(prop)) {\r\n target[prop] = source[prop];\r\n }\r\n }\r\n\r\n // set special now implementation\r\n if (source.now) {\r\n target.now = function now() {\r\n return target.clock.now;\r\n };\r\n } else {\r\n delete target.now;\r\n }\r\n\r\n // set special toSource implementation\r\n if (source.toSource) {\r\n target.toSource = function toSource() {\r\n return source.toSource();\r\n };\r\n } else {\r\n delete target.toSource;\r\n }\r\n\r\n // set special toString implementation\r\n target.toString = function toString() {\r\n return source.toString();\r\n };\r\n\r\n target.prototype = source.prototype;\r\n target.parse = source.parse;\r\n target.UTC = source.UTC;\r\n target.prototype.toUTCString = source.prototype.toUTCString;\r\n\r\n return target;\r\n }\r\n\r\n function createDate() {\r\n function ClockDate(year, month, date, hour, minute, second, ms) {\r\n // Defensive and verbose to avoid potential harm in passing\r\n // explicit undefined when user does not pass argument\r\n switch (arguments.length) {\r\n case 0:\r\n return new NativeDate(ClockDate.clock.now);\r\n case 1:\r\n return new NativeDate(year);\r\n case 2:\r\n return new NativeDate(year, month);\r\n case 3:\r\n return new NativeDate(year, month, date);\r\n case 4:\r\n return new NativeDate(year, month, date, hour);\r\n case 5:\r\n return new NativeDate(year, month, date, hour, minute);\r\n case 6:\r\n return new NativeDate(year, month, date, hour, minute, second);\r\n default:\r\n return new NativeDate(year, month, date, hour, minute, second, ms);\r\n }\r\n }\r\n\r\n return mirrorDateProperties(ClockDate, NativeDate);\r\n }\r\n\r\n function addTimer(clock, timer) {\r\n if (timer.func === undefined) {\r\n throw new Error('Callback must be provided to timer calls');\r\n }\r\n\r\n if (!clock.timers) {\r\n clock.timers = {};\r\n }\r\n\r\n timer.id = uniqueTimerId++;\r\n timer.createdAt = clock.now;\r\n timer.callAt = clock.now + (timer.delay || (clock.duringTick ? 1 : 0));\r\n\r\n clock.timers[timer.id] = timer;\r\n\r\n if (addTimerReturnsObject) {\r\n return {\r\n id: timer.id,\r\n ref: NOOP,\r\n unref: NOOP\r\n };\r\n }\r\n\r\n return timer.id;\r\n }\r\n\r\n\r\n function compareTimers(a, b) {\r\n // Sort first by absolute timing\r\n if (a.callAt < b.callAt) {\r\n return -1;\r\n }\r\n if (a.callAt > b.callAt) {\r\n return 1;\r\n }\r\n\r\n // Sort next by immediate, immediate timers take precedence\r\n if (a.immediate && !b.immediate) {\r\n return -1;\r\n }\r\n if (!a.immediate && b.immediate) {\r\n return 1;\r\n }\r\n\r\n // Sort next by creation time, earlier-created timers take precedence\r\n if (a.createdAt < b.createdAt) {\r\n return -1;\r\n }\r\n if (a.createdAt > b.createdAt) {\r\n return 1;\r\n }\r\n\r\n // Sort next by id, lower-id timers take precedence\r\n if (a.id < b.id) {\r\n return -1;\r\n }\r\n if (a.id > b.id) {\r\n return 1;\r\n }\r\n\r\n // As timer ids are unique, no fallback `0` is necessary\r\n }\r\n\r\n function firstTimerInRange(clock, from, to) {\r\n var timers = clock.timers,\r\n timer = null,\r\n id,\r\n isInRange;\r\n\r\n for (id in timers) {\r\n if (timers.hasOwnProperty(id)) {\r\n isInRange = inRange(from, to, timers[id]);\r\n\r\n if (isInRange && (!timer || compareTimers(timer, timers[id]) === 1)) {\r\n timer = timers[id];\r\n }\r\n }\r\n }\r\n\r\n return timer;\r\n }\r\n\r\n function callTimer(clock, timer) {\r\n var exception;\r\n\r\n if (typeof timer.interval === 'number') {\r\n clock.timers[timer.id].callAt += timer.interval;\r\n } else {\r\n delete clock.timers[timer.id];\r\n }\r\n\r\n try {\r\n if (typeof timer.func === 'function') {\r\n timer.func.apply(null, timer.args);\r\n } else {\r\n eval(timer.func);\r\n }\r\n } catch (e) {\r\n exception = e;\r\n }\r\n\r\n if (!clock.timers[timer.id]) {\r\n if (exception) {\r\n throw exception;\r\n }\r\n return;\r\n }\r\n\r\n if (exception) {\r\n throw exception;\r\n }\r\n }\r\n\r\n function timerType(timer) {\r\n if (timer.immediate) {\r\n return 'Immediate';\r\n } else if (typeof timer.interval !== 'undefined') {\r\n return 'Interval';\r\n } else {\r\n return 'Timeout';\r\n }\r\n }\r\n\r\n function clearTimer(clock, timerId, ttype) {\r\n if (!timerId) {\r\n // null appears to be allowed in most browsers, and appears to be\r\n // relied upon by some libraries, like Bootstrap carousel\r\n return;\r\n }\r\n\r\n if (!clock.timers) {\r\n clock.timers = [];\r\n }\r\n\r\n // in Node, timerId is an object with .ref()/.unref(), and\r\n // its .id field is the actual timer id.\r\n if (typeof timerId === 'object') {\r\n timerId = timerId.id;\r\n }\r\n\r\n if (clock.timers.hasOwnProperty(timerId)) {\r\n // check that the ID matches a timer of the correct type\r\n var timer = clock.timers[timerId];\r\n if (timerType(timer) === ttype) {\r\n delete clock.timers[timerId];\r\n } else {\r\n\t\t\t\tthrow new Error('Cannot clear timer: timer created with set' + ttype + '() but cleared with clear' + timerType(timer) + '()');\r\n\t\t\t}\r\n }\r\n }\r\n\r\n function uninstall(clock, target) {\r\n var method,\r\n i,\r\n l;\r\n\r\n for (i = 0, l = clock.methods.length; i < l; i++) {\r\n method = clock.methods[i];\r\n\r\n if (target[method].hadOwnProperty) {\r\n target[method] = clock['_' + method];\r\n } else {\r\n try {\r\n delete target[method];\r\n } catch (ignore) {}\r\n }\r\n }\r\n\r\n // Prevent multiple executions which will completely remove these props\r\n clock.methods = [];\r\n }\r\n\r\n function hijackMethod(target, method, clock) {\r\n var prop;\r\n\r\n clock[method].hadOwnProperty = Object.prototype.hasOwnProperty.call(target, method);\r\n clock['_' + method] = target[method];\r\n\r\n if (method === 'Date') {\r\n var date = mirrorDateProperties(clock[method], target[method]);\r\n target[method] = date;\r\n } else {\r\n target[method] = function () {\r\n return clock[method].apply(clock, arguments);\r\n };\r\n\r\n for (prop in clock[method]) {\r\n if (clock[method].hasOwnProperty(prop)) {\r\n target[method][prop] = clock[method][prop];\r\n }\r\n }\r\n }\r\n\r\n target[method].clock = clock;\r\n }\r\n\r\n var timers = {\r\n setTimeout: setTimeout,\r\n clearTimeout: clearTimeout,\r\n setImmediate: global.setImmediate,\r\n clearImmediate: global.clearImmediate,\r\n setInterval: setInterval,\r\n clearInterval: clearInterval,\r\n Date: Date\r\n };\r\n\r\n var keys = Object.keys || function (obj) {\r\n var ks = [],\r\n key;\r\n\r\n for (key in obj) {\r\n if (obj.hasOwnProperty(key)) {\r\n ks.push(key);\r\n }\r\n }\r\n\r\n return ks;\r\n };\r\n\r\n exports.timers = timers;\r\n\r\n function createClock(now) {\r\n var clock = {\r\n now: getEpoch(now),\r\n timeouts: {},\r\n Date: createDate()\r\n };\r\n\r\n clock.Date.clock = clock;\r\n\r\n clock.setTimeout = function setTimeout(func, timeout) {\r\n return addTimer(clock, {\r\n func: func,\r\n args: Array.prototype.slice.call(arguments, 2),\r\n delay: timeout\r\n });\r\n };\r\n\r\n clock.clearTimeout = function clearTimeout(timerId) {\r\n return clearTimer(clock, timerId, 'Timeout');\r\n };\r\n\r\n clock.setInterval = function setInterval(func, timeout) {\r\n return addTimer(clock, {\r\n func: func,\r\n args: Array.prototype.slice.call(arguments, 2),\r\n delay: timeout,\r\n interval: timeout\r\n });\r\n };\r\n\r\n clock.clearInterval = function clearInterval(timerId) {\r\n return clearTimer(clock, timerId, 'Interval');\r\n };\r\n\r\n clock.setImmediate = function setImmediate(func) {\r\n return addTimer(clock, {\r\n func: func,\r\n args: Array.prototype.slice.call(arguments, 1),\r\n immediate: true\r\n });\r\n };\r\n\r\n clock.clearImmediate = function clearImmediate(timerId) {\r\n return clearTimer(clock, timerId, 'Immediate');\r\n };\r\n\r\n clock.tick = function tick(ms) {\r\n ms = typeof ms === 'number' ? ms : parseTime(ms);\r\n var tickFrom = clock.now, tickTo = clock.now + ms, previous = clock.now;\r\n var timer = firstTimerInRange(clock, tickFrom, tickTo);\r\n var oldNow;\r\n\r\n clock.duringTick = true;\r\n\r\n var firstException;\r\n while (timer && tickFrom <= tickTo) {\r\n if (clock.timers[timer.id]) {\r\n tickFrom = clock.now = timer.callAt;\r\n try {\r\n oldNow = clock.now;\r\n callTimer(clock, timer);\r\n // compensate for any setSystemTime() call during timer callback\r\n if (oldNow !== clock.now) {\r\n tickFrom += clock.now - oldNow;\r\n tickTo += clock.now - oldNow;\r\n previous += clock.now - oldNow;\r\n }\r\n } catch (e) {\r\n firstException = firstException || e;\r\n }\r\n }\r\n\r\n timer = firstTimerInRange(clock, previous, tickTo);\r\n previous = tickFrom;\r\n }\r\n\r\n clock.duringTick = false;\r\n clock.now = tickTo;\r\n\r\n if (firstException) {\r\n throw firstException;\r\n }\r\n\r\n return clock.now;\r\n };\r\n\r\n clock.reset = function reset() {\r\n clock.timers = {};\r\n };\r\n\r\n clock.setSystemTime = function setSystemTime(now) {\r\n // determine time difference\r\n var newNow = getEpoch(now);\r\n var difference = newNow - clock.now;\r\n\r\n // update 'system clock'\r\n clock.now = newNow;\r\n\r\n // update timers and intervals to keep them stable\r\n for (var id in clock.timers) {\r\n if (clock.timers.hasOwnProperty(id)) {\r\n var timer = clock.timers[id];\r\n timer.createdAt += difference;\r\n timer.callAt += difference;\r\n }\r\n }\r\n };\r\n\r\n return clock;\r\n }\r\n exports.createClock = createClock;\r\n\r\n exports.install = function install(target, now, toFake) {\r\n var i,\r\n l;\r\n\r\n if (typeof target === 'number') {\r\n toFake = now;\r\n now = target;\r\n target = null;\r\n }\r\n\r\n if (!target) {\r\n target = global;\r\n }\r\n\r\n var clock = createClock(now);\r\n\r\n clock.uninstall = function () {\r\n uninstall(clock, target);\r\n };\r\n\r\n clock.methods = toFake || [];\r\n\r\n if (clock.methods.length === 0) {\r\n clock.methods = keys(timers);\r\n }\r\n\r\n for (i = 0, l = clock.methods.length; i < l; i++) {\r\n hijackMethod(target, clock.methods[i], clock);\r\n }\r\n\r\n return clock;\r\n };\r\n\r\n}(global || this));\r\n\r\n}).call(this,typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {})\r\n},{}]},{},[1])(1)\r\n});\r\n })();\r\n var define;\r\n/**\r\n * Sinon core utilities. For internal use only.\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\nvar sinon = (function () {\r\n'use strict';\r\n // eslint-disable-line no-unused-vars\r\n\r\n var sinonModule;\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = /* typeof define === \"function\" && typeof define.amd === \"object\" && define.amd */ false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n sinonModule = module.exports = /* require */('./sinon/util/core');\r\n /* require */('./sinon/extend');\r\n /* require */('./sinon/walk');\r\n /* require */('./sinon/typeOf');\r\n /* require */('./sinon/times_in_words');\r\n /* require */('./sinon/spy');\r\n /* require */('./sinon/call');\r\n /* require */('./sinon/behavior');\r\n /* require */('./sinon/stub');\r\n /* require */('./sinon/mock');\r\n /* require */('./sinon/collection');\r\n /* require */('./sinon/assert');\r\n /* require */('./sinon/sandbox');\r\n /* require */('./sinon/test');\r\n /* require */('./sinon/test_case');\r\n /* require */('./sinon/match');\r\n /* require */('./sinon/format');\r\n /* require */('./sinon/log_error');\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n } else if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n sinonModule = module.exports;\r\n } else {\r\n sinonModule = {};\r\n }\r\n\r\n return sinonModule;\r\n}());\r\n\r\n/**\r\n * depend ../../sinon.js\r\n */\r\n/**\r\n * Sinon core utilities. For internal use only.\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function (sinonGlobal) {\r\n\r\n var div = typeof document !== 'undefined' && document.createElement('div');\r\n var hasOwn = Object.prototype.hasOwnProperty;\r\n\r\n function isDOMNode(obj) {\r\n var success = false;\r\n\r\n try {\r\n obj.appendChild(div);\r\n success = div.parentNode === obj;\r\n } catch (e) {\r\n return false;\r\n } finally {\r\n try {\r\n obj.removeChild(div);\r\n } catch (e) {\r\n // Remove failed, not much we can do about that\r\n }\r\n }\r\n\r\n return success;\r\n }\r\n\r\n function isElement(obj) {\r\n return div && obj && obj.nodeType === 1 && isDOMNode(obj);\r\n }\r\n\r\n function isFunction(obj) {\r\n return typeof obj === 'function' || !!(obj && obj.constructor && obj.call && obj.apply);\r\n }\r\n\r\n function isReallyNaN(val) {\r\n return typeof val === 'number' && isNaN(val);\r\n }\r\n\r\n function mirrorProperties(target, source) {\r\n for (var prop in source) {\r\n if (!hasOwn.call(target, prop)) {\r\n target[prop] = source[prop];\r\n }\r\n }\r\n }\r\n\r\n function isRestorable(obj) {\r\n return typeof obj === 'function' && typeof obj.restore === 'function' && obj.restore.sinon;\r\n }\r\n\r\n // Cheap way to detect if we have ES5 support.\r\n var hasES5Support = 'keys' in Object;\r\n\r\n function makeApi(sinon) {\r\n sinon.wrapMethod = function wrapMethod(object, property, method) {\r\n if (!object) {\r\n throw new TypeError('Should wrap property of object');\r\n }\r\n\r\n if (typeof method !== 'function' && typeof method !== 'object') {\r\n throw new TypeError('Method wrapper should be a function or a property descriptor');\r\n }\r\n\r\n function checkWrappedMethod(wrappedMethod) {\r\n var error;\r\n\r\n if (!isFunction(wrappedMethod)) {\r\n error = new TypeError('Attempted to wrap ' + (typeof wrappedMethod) + ' property ' +\r\n property + ' as function');\r\n } else if (wrappedMethod.restore && wrappedMethod.restore.sinon) {\r\n error = new TypeError('Attempted to wrap ' + property + ' which is already wrapped');\r\n } else if (wrappedMethod.calledBefore) {\r\n var verb = wrappedMethod.returns ? 'stubbed' : 'spied on';\r\n error = new TypeError('Attempted to wrap ' + property + ' which is already ' + verb);\r\n }\r\n\r\n if (error) {\r\n if (wrappedMethod && wrappedMethod.stackTrace) {\r\n error.stack += '\\n--------------\\n' + wrappedMethod.stackTrace;\r\n }\r\n throw error;\r\n }\r\n }\r\n\r\n var error, wrappedMethod, i;\r\n\r\n // IE 8 does not support hasOwnProperty on the window object and Firefox has a problem\r\n // when using hasOwn.call on objects from other frames.\r\n var owned = object.hasOwnProperty ? object.hasOwnProperty(property) : hasOwn.call(object, property);\r\n\r\n if (hasES5Support) {\r\n var methodDesc = (typeof method === 'function') ? {value: method} : method;\r\n var wrappedMethodDesc = sinon.getPropertyDescriptor(object, property);\r\n\r\n if (!wrappedMethodDesc) {\r\n error = new TypeError('Attempted to wrap ' + (typeof wrappedMethod) + ' property ' +\r\n property + ' as function');\r\n } else if (wrappedMethodDesc.restore && wrappedMethodDesc.restore.sinon) {\r\n error = new TypeError('Attempted to wrap ' + property + ' which is already wrapped');\r\n }\r\n if (error) {\r\n if (wrappedMethodDesc && wrappedMethodDesc.stackTrace) {\r\n error.stack += '\\n--------------\\n' + wrappedMethodDesc.stackTrace;\r\n }\r\n throw error;\r\n }\r\n\r\n var types = sinon.objectKeys(methodDesc);\r\n for (i = 0; i < types.length; i++) {\r\n wrappedMethod = wrappedMethodDesc[types[i]];\r\n checkWrappedMethod(wrappedMethod);\r\n }\r\n\r\n mirrorProperties(methodDesc, wrappedMethodDesc);\r\n for (i = 0; i < types.length; i++) {\r\n mirrorProperties(methodDesc[types[i]], wrappedMethodDesc[types[i]]);\r\n }\r\n Object.defineProperty(object, property, methodDesc);\r\n } else {\r\n wrappedMethod = object[property];\r\n checkWrappedMethod(wrappedMethod);\r\n object[property] = method;\r\n method.displayName = property;\r\n }\r\n\r\n method.displayName = property;\r\n\r\n // Set up a stack trace which can be used later to find what line of\r\n // code the original method was created on.\r\n method.stackTrace = (new Error('Stack Trace for original')).stack;\r\n\r\n method.restore = function () {\r\n // For prototype properties try to reset by delete first.\r\n // If this fails (ex: localStorage on mobile safari) then force a reset\r\n // via direct assignment.\r\n if (!owned) {\r\n // In some cases `delete` may throw an error\r\n try {\r\n delete object[property];\r\n } catch (e) {} // eslint-disable-line no-empty\r\n // For native code functions `delete` fails without throwing an error\r\n // on Chrome < 43, PhantomJS, etc.\r\n } else if (hasES5Support) {\r\n Object.defineProperty(object, property, wrappedMethodDesc);\r\n }\r\n\r\n // Use strict equality comparison to check failures then force a reset\r\n // via direct assignment.\r\n if (object[property] === method) {\r\n object[property] = wrappedMethod;\r\n }\r\n };\r\n\r\n method.restore.sinon = true;\r\n\r\n if (!hasES5Support) {\r\n mirrorProperties(method, wrappedMethod);\r\n }\r\n\r\n return method;\r\n };\r\n\r\n sinon.create = function create(proto) {\r\n var F = function () {};\r\n F.prototype = proto;\r\n return new F();\r\n };\r\n\r\n sinon.deepEqual = function deepEqual(a, b) {\r\n if (sinon.match && sinon.match.isMatcher(a)) {\r\n return a.test(b);\r\n }\r\n\r\n if (typeof a !== 'object' || typeof b !== 'object') {\r\n return isReallyNaN(a) && isReallyNaN(b) || a === b;\r\n }\r\n\r\n if (isElement(a) || isElement(b)) {\r\n return a === b;\r\n }\r\n\r\n if (a === b) {\r\n return true;\r\n }\r\n\r\n if ((a === null && b !== null) || (a !== null && b === null)) {\r\n return false;\r\n }\r\n\r\n if (a instanceof RegExp && b instanceof RegExp) {\r\n return (a.source === b.source) && (a.global === b.global) &&\r\n (a.ignoreCase === b.ignoreCase) && (a.multiline === b.multiline);\r\n }\r\n\r\n var aString = Object.prototype.toString.call(a);\r\n if (aString !== Object.prototype.toString.call(b)) {\r\n return false;\r\n }\r\n\r\n if (aString === '[object Date]') {\r\n return a.valueOf() === b.valueOf();\r\n }\r\n\r\n var prop;\r\n var aLength = 0;\r\n var bLength = 0;\r\n\r\n if (aString === '[object Array]' && a.length !== b.length) {\r\n return false;\r\n }\r\n\r\n for (prop in a) {\r\n if (a.hasOwnProperty(prop)) {\r\n aLength += 1;\r\n\r\n if (!(prop in b)) {\r\n return false;\r\n }\r\n\r\n if (!deepEqual(a[prop], b[prop])) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n for (prop in b) {\r\n if (b.hasOwnProperty(prop)) {\r\n bLength += 1;\r\n }\r\n }\r\n\r\n return aLength === bLength;\r\n };\r\n\r\n sinon.functionName = function functionName(func) {\r\n var name = func.displayName || func.name;\r\n\r\n // Use function decomposition as a last resort to get function\r\n // name. Does not rely on function decomposition to work - if it\r\n // doesn't debugging will be slightly less informative\r\n // (i.e. toString will say 'spy' rather than 'myFunc').\r\n if (!name) {\r\n var matches = func.toString().match(/function ([^\\s\\(]+)/);\r\n name = matches && matches[1];\r\n }\r\n\r\n return name;\r\n };\r\n\r\n sinon.functionToString = function toString() {\r\n if (this.getCall && this.callCount) {\r\n var thisValue,\r\n prop;\r\n var i = this.callCount;\r\n\r\n while (i--) {\r\n thisValue = this.getCall(i).thisValue;\r\n\r\n for (prop in thisValue) {\r\n if (thisValue[prop] === this) {\r\n return prop;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return this.displayName || 'sinon fake';\r\n };\r\n\r\n sinon.objectKeys = function objectKeys(obj) {\r\n if (obj !== Object(obj)) {\r\n throw new TypeError('sinon.objectKeys called on a non-object');\r\n }\r\n\r\n var keys = [];\r\n var key;\r\n for (key in obj) {\r\n if (hasOwn.call(obj, key)) {\r\n keys.push(key);\r\n }\r\n }\r\n\r\n return keys;\r\n };\r\n\r\n sinon.getPropertyDescriptor = function getPropertyDescriptor(object, property) {\r\n var proto = object;\r\n var descriptor;\r\n\r\n while (proto && !(descriptor = Object.getOwnPropertyDescriptor(proto, property))) {\r\n proto = Object.getPrototypeOf(proto);\r\n }\r\n return descriptor;\r\n };\r\n\r\n sinon.getConfig = function (custom) {\r\n var config = {};\r\n custom = custom || {};\r\n var defaults = sinon.defaultConfig;\r\n\r\n for (var prop in defaults) {\r\n if (defaults.hasOwnProperty(prop)) {\r\n config[prop] = custom.hasOwnProperty(prop) ? custom[prop] : defaults[prop];\r\n }\r\n }\r\n\r\n return config;\r\n };\r\n\r\n sinon.defaultConfig = {\r\n injectIntoThis: true,\r\n injectInto: null,\r\n properties: ['spy', 'stub', 'mock', 'clock', 'server', 'requests'],\r\n useFakeTimers: true,\r\n useFakeServer: true\r\n };\r\n\r\n sinon.timesInWords = function timesInWords(count) {\r\n return count === 1 && 'once' ||\r\n count === 2 && 'twice' ||\r\n count === 3 && 'thrice' ||\r\n (count || 0) + ' times';\r\n };\r\n\r\n sinon.calledInOrder = function (spies) {\r\n for (var i = 1, l = spies.length; i < l; i++) {\r\n if (!spies[i - 1].calledBefore(spies[i]) || !spies[i].called) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n sinon.orderByFirstCall = function (spies) {\r\n return spies.sort(function (a, b) {\r\n // uuid, won't ever be equal\r\n var aCall = a.getCall(0);\r\n var bCall = b.getCall(0);\r\n var aId = aCall && aCall.callId || -1;\r\n var bId = bCall && bCall.callId || -1;\r\n\r\n return aId < bId ? -1 : 1;\r\n });\r\n };\r\n\r\n sinon.createStubInstance = function (constructor) {\r\n if (typeof constructor !== 'function') {\r\n throw new TypeError('The constructor should be a function.');\r\n }\r\n return sinon.stub(sinon.create(constructor.prototype));\r\n };\r\n\r\n sinon.restore = function (object) {\r\n if (object !== null && typeof object === 'object') {\r\n for (var prop in object) {\r\n if (isRestorable(object[prop])) {\r\n object[prop].restore();\r\n }\r\n }\r\n } else if (isRestorable(object)) {\r\n object.restore();\r\n }\r\n };\r\n\r\n return sinon;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = /* typeof define === \"function\" && typeof define.amd === \"object\" && define.amd */ false;\r\n\r\n function loadDependencies(require, exports) {\r\n makeApi(exports);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend util/core.js\r\n */\r\n(function (sinonGlobal) {\r\n\r\n function makeApi(sinon) {\r\n\r\n // Adapted from https://developer.mozilla.org/en/docs/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug\r\n var hasDontEnumBug = (function () {\r\n var obj = {\r\n constructor: function () {\r\n return '0';\r\n },\r\n toString: function () {\r\n return '1';\r\n },\r\n valueOf: function () {\r\n return '2';\r\n },\r\n toLocaleString: function () {\r\n return '3';\r\n },\r\n prototype: function () {\r\n return '4';\r\n },\r\n isPrototypeOf: function () {\r\n return '5';\r\n },\r\n propertyIsEnumerable: function () {\r\n return '6';\r\n },\r\n hasOwnProperty: function () {\r\n return '7';\r\n },\r\n length: function () {\r\n return '8';\r\n },\r\n unique: function () {\r\n return '9';\r\n }\r\n };\r\n\r\n var result = [];\r\n for (var prop in obj) {\r\n if (obj.hasOwnProperty(prop)) {\r\n result.push(obj[prop]());\r\n }\r\n }\r\n return result.join('') !== '0123456789';\r\n })();\r\n\r\n /* Public: Extend target in place with all (own) properties from sources in-order. Thus, last source will\r\n * override properties in previous sources.\r\n *\r\n * target - The Object to extend\r\n * sources - Objects to copy properties from.\r\n *\r\n * Returns the extended target\r\n */\r\n function extend(target /*, sources */) {\r\n var sources = Array.prototype.slice.call(arguments, 1);\r\n var source, i, prop;\r\n\r\n for (i = 0; i < sources.length; i++) {\r\n source = sources[i];\r\n\r\n for (prop in source) {\r\n if (source.hasOwnProperty(prop)) {\r\n target[prop] = source[prop];\r\n }\r\n }\r\n\r\n // Make sure we copy (own) toString method even when in JScript with DontEnum bug\r\n // See https://developer.mozilla.org/en/docs/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug\r\n if (hasDontEnumBug && source.hasOwnProperty('toString') && source.toString !== target.toString) {\r\n target.toString = source.toString;\r\n }\r\n }\r\n\r\n return target;\r\n }\r\n\r\n sinon.extend = extend;\r\n return sinon.extend;\r\n }\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./util/core');\r\n module.exports = makeApi(sinon);\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend util/core.js\r\n */\r\n(function (sinonGlobal) {\r\n\r\n function makeApi(sinon) {\r\n\r\n function timesInWords(count) {\r\n switch (count) {\r\n case 1:\r\n return 'once';\r\n case 2:\r\n return 'twice';\r\n case 3:\r\n return 'thrice';\r\n default:\r\n return (count || 0) + ' times';\r\n }\r\n }\r\n\r\n sinon.timesInWords = timesInWords;\r\n return sinon.timesInWords;\r\n }\r\n\r\n function loadDependencies(require, exports, module) {\r\n var core = /* require */('./util/core');\r\n module.exports = makeApi(core);\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend util/core.js\r\n */\r\n/**\r\n * Format functions\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2014 Christian Johansen\r\n */\r\n(function (sinonGlobal) {\r\n\r\n function makeApi(sinon) {\r\n function typeOf(value) {\r\n if (value === null) {\r\n return 'null';\r\n } else if (value === undefined) {\r\n return 'undefined';\r\n }\r\n var string = Object.prototype.toString.call(value);\r\n return string.substring(8, string.length - 1).toLowerCase();\r\n }\r\n\r\n sinon.typeOf = typeOf;\r\n return sinon.typeOf;\r\n }\r\n\r\n function loadDependencies(require, exports, module) {\r\n var core = /* require */('./util/core');\r\n module.exports = makeApi(core);\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend util/core.js\r\n * depend typeOf.js\r\n */\r\n/*jslint eqeqeq: false, onevar: false, plusplus: false*/\r\n/*global module, require, sinon*/\r\n/**\r\n * Match functions\r\n *\r\n * @author Maximilian Antoni (mail@maxantoni.de)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2012 Maximilian Antoni\r\n */\r\n(function (sinonGlobal) {\r\n\r\n function makeApi(sinon) {\r\n function assertType(value, type, name) {\r\n var actual = sinon.typeOf(value);\r\n if (actual !== type) {\r\n throw new TypeError('Expected type of ' + name + ' to be ' +\r\n type + ', but was ' + actual);\r\n }\r\n }\r\n\r\n var matcher = {\r\n toString: function () {\r\n return this.message;\r\n }\r\n };\r\n\r\n function isMatcher(object) {\r\n return matcher.isPrototypeOf(object);\r\n }\r\n\r\n function matchObject(expectation, actual) {\r\n if (actual === null || actual === undefined) {\r\n return false;\r\n }\r\n for (var key in expectation) {\r\n if (expectation.hasOwnProperty(key)) {\r\n var exp = expectation[key];\r\n var act = actual[key];\r\n if (isMatcher(exp)) {\r\n if (!exp.test(act)) {\r\n return false;\r\n }\r\n } else if (sinon.typeOf(exp) === 'object') {\r\n if (!matchObject(exp, act)) {\r\n return false;\r\n }\r\n } else if (!sinon.deepEqual(exp, act)) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n function match(expectation, message) {\r\n var m = sinon.create(matcher);\r\n var type = sinon.typeOf(expectation);\r\n switch (type) {\r\n case 'object':\r\n if (typeof expectation.test === 'function') {\r\n m.test = function (actual) {\r\n return expectation.test(actual) === true;\r\n };\r\n m.message = 'match(' + sinon.functionName(expectation.test) + ')';\r\n return m;\r\n }\r\n var str = [];\r\n for (var key in expectation) {\r\n if (expectation.hasOwnProperty(key)) {\r\n str.push(key + ': ' + expectation[key]);\r\n }\r\n }\r\n m.test = function (actual) {\r\n return matchObject(expectation, actual);\r\n };\r\n m.message = 'match(' + str.join(', ') + ')';\r\n break;\r\n case 'number':\r\n m.test = function (actual) {\r\n // we need type coercion here\r\n return expectation == actual; // eslint-disable-line eqeqeq\r\n };\r\n break;\r\n case 'string':\r\n m.test = function (actual) {\r\n if (typeof actual !== 'string') {\r\n return false;\r\n }\r\n return actual.indexOf(expectation) !== -1;\r\n };\r\n m.message = 'match(\"' + expectation + '\")';\r\n break;\r\n case 'regexp':\r\n m.test = function (actual) {\r\n if (typeof actual !== 'string') {\r\n return false;\r\n }\r\n return expectation.test(actual);\r\n };\r\n break;\r\n case 'function':\r\n m.test = expectation;\r\n if (message) {\r\n m.message = message;\r\n } else {\r\n m.message = 'match(' + sinon.functionName(expectation) + ')';\r\n }\r\n break;\r\n default:\r\n m.test = function (actual) {\r\n return sinon.deepEqual(expectation, actual);\r\n };\r\n }\r\n if (!m.message) {\r\n m.message = 'match(' + expectation + ')';\r\n }\r\n return m;\r\n }\r\n\r\n matcher.or = function (m2) {\r\n if (!arguments.length) {\r\n throw new TypeError('Matcher expected');\r\n } else if (!isMatcher(m2)) {\r\n m2 = match(m2);\r\n }\r\n var m1 = this;\r\n var or = sinon.create(matcher);\r\n or.test = function (actual) {\r\n return m1.test(actual) || m2.test(actual);\r\n };\r\n or.message = m1.message + '.or(' + m2.message + ')';\r\n return or;\r\n };\r\n\r\n matcher.and = function (m2) {\r\n if (!arguments.length) {\r\n throw new TypeError('Matcher expected');\r\n } else if (!isMatcher(m2)) {\r\n m2 = match(m2);\r\n }\r\n var m1 = this;\r\n var and = sinon.create(matcher);\r\n and.test = function (actual) {\r\n return m1.test(actual) && m2.test(actual);\r\n };\r\n and.message = m1.message + '.and(' + m2.message + ')';\r\n return and;\r\n };\r\n\r\n match.isMatcher = isMatcher;\r\n\r\n match.any = match(function () {\r\n return true;\r\n }, 'any');\r\n\r\n match.defined = match(function (actual) {\r\n return actual !== null && actual !== undefined;\r\n }, 'defined');\r\n\r\n match.truthy = match(function (actual) {\r\n return !!actual;\r\n }, 'truthy');\r\n\r\n match.falsy = match(function (actual) {\r\n return !actual;\r\n }, 'falsy');\r\n\r\n match.same = function (expectation) {\r\n return match(function (actual) {\r\n return expectation === actual;\r\n }, 'same(' + expectation + ')');\r\n };\r\n\r\n match.typeOf = function (type) {\r\n assertType(type, 'string', 'type');\r\n return match(function (actual) {\r\n return sinon.typeOf(actual) === type;\r\n }, 'typeOf(\"' + type + '\")');\r\n };\r\n\r\n match.instanceOf = function (type) {\r\n assertType(type, 'function', 'type');\r\n return match(function (actual) {\r\n return actual instanceof type;\r\n }, 'instanceOf(' + sinon.functionName(type) + ')');\r\n };\r\n\r\n function createPropertyMatcher(propertyTest, messagePrefix) {\r\n return function (property, value) {\r\n assertType(property, 'string', 'property');\r\n var onlyProperty = arguments.length === 1;\r\n var message = messagePrefix + '(\"' + property + '\"';\r\n if (!onlyProperty) {\r\n message += ', ' + value;\r\n }\r\n message += ')';\r\n return match(function (actual) {\r\n if (actual === undefined || actual === null ||\r\n !propertyTest(actual, property)) {\r\n return false;\r\n }\r\n return onlyProperty || sinon.deepEqual(value, actual[property]);\r\n }, message);\r\n };\r\n }\r\n\r\n match.has = createPropertyMatcher(function (actual, property) {\r\n if (typeof actual === 'object') {\r\n return property in actual;\r\n }\r\n return actual[property] !== undefined;\r\n }, 'has');\r\n\r\n match.hasOwn = createPropertyMatcher(function (actual, property) {\r\n return actual.hasOwnProperty(property);\r\n }, 'hasOwn');\r\n\r\n match.bool = match.typeOf('boolean');\r\n match.number = match.typeOf('number');\r\n match.string = match.typeOf('string');\r\n match.object = match.typeOf('object');\r\n match.func = match.typeOf('function');\r\n match.array = match.typeOf('array');\r\n match.regexp = match.typeOf('regexp');\r\n match.date = match.typeOf('date');\r\n\r\n sinon.match = match;\r\n return match;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./util/core');\r\n /* require */('./typeOf');\r\n module.exports = makeApi(sinon);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend util/core.js\r\n */\r\n/**\r\n * Format functions\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2014 Christian Johansen\r\n */\r\n(function (sinonGlobal, formatio) {\r\n\r\n function makeApi(sinon) {\r\n function valueFormatter(value) {\r\n return '' + value;\r\n }\r\n\r\n function getFormatioFormatter() {\r\n var formatter = formatio.configure({\r\n quoteStrings: false,\r\n limitChildrenCount: 250\r\n });\r\n\r\n function format() {\r\n return formatter.ascii.apply(formatter, arguments);\r\n }\r\n\r\n return format;\r\n }\r\n\r\n function getNodeFormatter() {\r\n try {\r\n var util = /* require */('util');\r\n } catch (e) {\r\n /* Node, but no util module - would be very old, but better safe than sorry */\r\n }\r\n\r\n function format(v) {\r\n var isObjectWithNativeToString = typeof v === 'object' && v.toString === Object.prototype.toString;\r\n return isObjectWithNativeToString ? util.inspect(v) : v;\r\n }\r\n\r\n return util ? format : valueFormatter;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var formatter;\r\n\r\n if (isNode) {\r\n try {\r\n formatio = /* require */('formatio');\r\n }\r\n catch (e) {} // eslint-disable-line no-empty\r\n }\r\n\r\n if (formatio) {\r\n formatter = getFormatioFormatter();\r\n } else if (isNode) {\r\n formatter = getNodeFormatter();\r\n } else {\r\n formatter = valueFormatter;\r\n }\r\n\r\n sinon.format = formatter;\r\n return sinon.format;\r\n }\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./util/core');\r\n module.exports = makeApi(sinon);\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon, // eslint-disable-line no-undef\r\n typeof formatio === 'object' && formatio // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend util/core.js\r\n * depend match.js\r\n * depend format.js\r\n */\r\n/**\r\n * Spy calls\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @author Maximilian Antoni (mail@maxantoni.de)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n * Copyright (c) 2013 Maximilian Antoni\r\n */\r\n(function (sinonGlobal) {\r\n\r\n var slice = Array.prototype.slice;\r\n\r\n function makeApi(sinon) {\r\n function throwYieldError(proxy, text, args) {\r\n var msg = sinon.functionName(proxy) + text;\r\n if (args.length) {\r\n msg += ' Received [' + slice.call(args).join(', ') + ']';\r\n }\r\n throw new Error(msg);\r\n }\r\n\r\n var callProto = {\r\n calledOn: function calledOn(thisValue) {\r\n if (sinon.match && sinon.match.isMatcher(thisValue)) {\r\n return thisValue.test(this.thisValue);\r\n }\r\n return this.thisValue === thisValue;\r\n },\r\n\r\n calledWith: function calledWith() {\r\n var l = arguments.length;\r\n if (l > this.args.length) {\r\n return false;\r\n }\r\n for (var i = 0; i < l; i += 1) {\r\n if (!sinon.deepEqual(arguments[i], this.args[i])) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n },\r\n\r\n calledWithMatch: function calledWithMatch() {\r\n var l = arguments.length;\r\n if (l > this.args.length) {\r\n return false;\r\n }\r\n for (var i = 0; i < l; i += 1) {\r\n var actual = this.args[i];\r\n var expectation = arguments[i];\r\n if (!sinon.match || !sinon.match(expectation).test(actual)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n calledWithExactly: function calledWithExactly() {\r\n return arguments.length === this.args.length &&\r\n this.calledWith.apply(this, arguments);\r\n },\r\n\r\n notCalledWith: function notCalledWith() {\r\n return !this.calledWith.apply(this, arguments);\r\n },\r\n\r\n notCalledWithMatch: function notCalledWithMatch() {\r\n return !this.calledWithMatch.apply(this, arguments);\r\n },\r\n\r\n returned: function returned(value) {\r\n return sinon.deepEqual(value, this.returnValue);\r\n },\r\n\r\n threw: function threw(error) {\r\n if (typeof error === 'undefined' || !this.exception) {\r\n return !!this.exception;\r\n }\r\n\r\n return this.exception === error || this.exception.name === error;\r\n },\r\n\r\n calledWithNew: function calledWithNew() {\r\n return this.proxy.prototype && this.thisValue instanceof this.proxy;\r\n },\r\n\r\n calledBefore: function (other) {\r\n return this.callId < other.callId;\r\n },\r\n\r\n calledAfter: function (other) {\r\n return this.callId > other.callId;\r\n },\r\n\r\n callArg: function (pos) {\r\n this.args[pos]();\r\n },\r\n\r\n callArgOn: function (pos, thisValue) {\r\n this.args[pos].apply(thisValue);\r\n },\r\n\r\n callArgWith: function (pos) {\r\n this.callArgOnWith.apply(this, [pos, null].concat(slice.call(arguments, 1)));\r\n },\r\n\r\n callArgOnWith: function (pos, thisValue) {\r\n var args = slice.call(arguments, 2);\r\n this.args[pos].apply(thisValue, args);\r\n },\r\n\r\n 'yield': function () {\r\n this.yieldOn.apply(this, [null].concat(slice.call(arguments, 0)));\r\n },\r\n\r\n yieldOn: function (thisValue) {\r\n var args = this.args;\r\n for (var i = 0, l = args.length; i < l; ++i) {\r\n if (typeof args[i] === 'function') {\r\n args[i].apply(thisValue, slice.call(arguments, 1));\r\n return;\r\n }\r\n }\r\n throwYieldError(this.proxy, ' cannot yield since no callback was passed.', args);\r\n },\r\n\r\n yieldTo: function (prop) {\r\n this.yieldToOn.apply(this, [prop, null].concat(slice.call(arguments, 1)));\r\n },\r\n\r\n yieldToOn: function (prop, thisValue) {\r\n var args = this.args;\r\n for (var i = 0, l = args.length; i < l; ++i) {\r\n if (args[i] && typeof args[i][prop] === 'function') {\r\n args[i][prop].apply(thisValue, slice.call(arguments, 2));\r\n return;\r\n }\r\n }\r\n throwYieldError(this.proxy, ' cannot yield to \\'' + prop +\r\n '\\' since no callback was passed.', args);\r\n },\r\n\r\n getStackFrames: function () {\r\n // Omit the error message and the two top stack frames in sinon itself:\r\n return this.stack && this.stack.split('\\n').slice(3);\r\n },\r\n\r\n toString: function () {\r\n var callStr = this.proxy.toString() + '(';\r\n var args = [];\r\n\r\n for (var i = 0, l = this.args.length; i < l; ++i) {\r\n args.push(sinon.format(this.args[i]));\r\n }\r\n\r\n callStr = callStr + args.join(', ') + ')';\r\n\r\n if (typeof this.returnValue !== 'undefined') {\r\n callStr += ' => ' + sinon.format(this.returnValue);\r\n }\r\n\r\n if (this.exception) {\r\n callStr += ' !' + this.exception.name;\r\n\r\n if (this.exception.message) {\r\n callStr += '(' + this.exception.message + ')';\r\n }\r\n }\r\n if (this.stack) {\r\n callStr += this.getStackFrames()[0].replace(/^\\s*(?:at\\s+|@)?/, ' at ');\r\n\r\n }\r\n\r\n return callStr;\r\n }\r\n };\r\n\r\n callProto.invokeCallback = callProto.yield;\r\n\r\n function createSpyCall(spy, thisValue, args, returnValue, exception, id, stack) {\r\n if (typeof id !== 'number') {\r\n throw new TypeError('Call id is not a number');\r\n }\r\n var proxyCall = sinon.create(callProto);\r\n proxyCall.proxy = spy;\r\n proxyCall.thisValue = thisValue;\r\n proxyCall.args = args;\r\n proxyCall.returnValue = returnValue;\r\n proxyCall.exception = exception;\r\n proxyCall.callId = id;\r\n proxyCall.stack = stack;\r\n\r\n return proxyCall;\r\n }\r\n createSpyCall.toString = callProto.toString; // used by mocks\r\n\r\n sinon.spyCall = createSpyCall;\r\n return createSpyCall;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./util/core');\r\n /* require */('./match');\r\n /* require */('./format');\r\n module.exports = makeApi(sinon);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend times_in_words.js\r\n * depend util/core.js\r\n * depend extend.js\r\n * depend call.js\r\n * depend format.js\r\n */\r\n/**\r\n * Spy functions\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function (sinonGlobal) {\r\n\r\n function makeApi(sinon) {\r\n var push = Array.prototype.push;\r\n var slice = Array.prototype.slice;\r\n var callId = 0;\r\n\r\n function spy(object, property, types) {\r\n if (!property && typeof object === 'function') {\r\n return spy.create(object);\r\n }\r\n\r\n if (!object && !property) {\r\n return spy.create(function () { });\r\n }\r\n\r\n if (types) {\r\n var methodDesc = sinon.getPropertyDescriptor(object, property);\r\n for (var i = 0; i < types.length; i++) {\r\n methodDesc[types[i]] = spy.create(methodDesc[types[i]]);\r\n }\r\n return sinon.wrapMethod(object, property, methodDesc);\r\n }\r\n\r\n return sinon.wrapMethod(object, property, spy.create(object[property]));\r\n }\r\n\r\n function matchingFake(fakes, args, strict) {\r\n if (!fakes) {\r\n return undefined;\r\n }\r\n\r\n for (var i = 0, l = fakes.length; i < l; i++) {\r\n if (fakes[i].matches(args, strict)) {\r\n return fakes[i];\r\n }\r\n }\r\n }\r\n\r\n function incrementCallCount() {\r\n this.called = true;\r\n this.callCount += 1;\r\n this.notCalled = false;\r\n this.calledOnce = this.callCount === 1;\r\n this.calledTwice = this.callCount === 2;\r\n this.calledThrice = this.callCount === 3;\r\n }\r\n\r\n function createCallProperties() {\r\n this.firstCall = this.getCall(0);\r\n this.secondCall = this.getCall(1);\r\n this.thirdCall = this.getCall(2);\r\n this.lastCall = this.getCall(this.callCount - 1);\r\n }\r\n\r\n var vars = 'a,b,c,d,e,f,g,h,i,j,k,l';\r\n function createProxy(func, proxyLength) {\r\n // Retain the function length:\r\n var p;\r\n if (proxyLength) {\r\n eval('p = (function proxy(' + vars.substring(0, proxyLength * 2 - 1) + // eslint-disable-line no-eval\r\n ') { return p.invoke(func, this, slice.call(arguments)); });');\r\n } else {\r\n p = function proxy() {\r\n return p.invoke(func, this, slice.call(arguments));\r\n };\r\n }\r\n p.isSinonProxy = true;\r\n return p;\r\n }\r\n\r\n var uuid = 0;\r\n\r\n // Public API\r\n var spyApi = {\r\n reset: function () {\r\n if (this.invoking) {\r\n var err = new Error('Cannot reset Sinon function while invoking it. ' +\r\n 'Move the call to .reset outside of the callback.');\r\n err.name = 'InvalidResetException';\r\n throw err;\r\n }\r\n\r\n this.called = false;\r\n this.notCalled = true;\r\n this.calledOnce = false;\r\n this.calledTwice = false;\r\n this.calledThrice = false;\r\n this.callCount = 0;\r\n this.firstCall = null;\r\n this.secondCall = null;\r\n this.thirdCall = null;\r\n this.lastCall = null;\r\n this.args = [];\r\n this.returnValues = [];\r\n this.thisValues = [];\r\n this.exceptions = [];\r\n this.callIds = [];\r\n this.stacks = [];\r\n if (this.fakes) {\r\n for (var i = 0; i < this.fakes.length; i++) {\r\n this.fakes[i].reset();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n create: function create(func, spyLength) {\r\n var name;\r\n\r\n if (typeof func !== 'function') {\r\n func = function () { };\r\n } else {\r\n name = sinon.functionName(func);\r\n }\r\n\r\n if (!spyLength) {\r\n spyLength = func.length;\r\n }\r\n\r\n var proxy = createProxy(func, spyLength);\r\n\r\n sinon.extend(proxy, spy);\r\n delete proxy.create;\r\n sinon.extend(proxy, func);\r\n\r\n proxy.reset();\r\n proxy.prototype = func.prototype;\r\n proxy.displayName = name || 'spy';\r\n proxy.toString = sinon.functionToString;\r\n proxy.instantiateFake = sinon.spy.create;\r\n proxy.id = 'spy#' + uuid++;\r\n\r\n return proxy;\r\n },\r\n\r\n invoke: function invoke(func, thisValue, args) {\r\n var matching = matchingFake(this.fakes, args);\r\n var exception, returnValue;\r\n\r\n incrementCallCount.call(this);\r\n push.call(this.thisValues, thisValue);\r\n push.call(this.args, args);\r\n push.call(this.callIds, callId++);\r\n\r\n // Make call properties available from within the spied function:\r\n createCallProperties.call(this);\r\n\r\n try {\r\n this.invoking = true;\r\n\r\n if (matching) {\r\n returnValue = matching.invoke(func, thisValue, args);\r\n } else {\r\n returnValue = (this.func || func).apply(thisValue, args);\r\n }\r\n\r\n var thisCall = this.getCall(this.callCount - 1);\r\n if (thisCall.calledWithNew() && typeof returnValue !== 'object') {\r\n returnValue = thisValue;\r\n }\r\n } catch (e) {\r\n exception = e;\r\n } finally {\r\n delete this.invoking;\r\n }\r\n\r\n push.call(this.exceptions, exception);\r\n push.call(this.returnValues, returnValue);\r\n push.call(this.stacks, new Error().stack);\r\n\r\n // Make return value and exception available in the calls:\r\n createCallProperties.call(this);\r\n\r\n if (exception !== undefined) {\r\n throw exception;\r\n }\r\n\r\n return returnValue;\r\n },\r\n\r\n named: function named(name) {\r\n this.displayName = name;\r\n return this;\r\n },\r\n\r\n getCall: function getCall(i) {\r\n if (i < 0 || i >= this.callCount) {\r\n return null;\r\n }\r\n\r\n return sinon.spyCall(this, this.thisValues[i], this.args[i],\r\n this.returnValues[i], this.exceptions[i],\r\n this.callIds[i], this.stacks[i]);\r\n },\r\n\r\n getCalls: function () {\r\n var calls = [];\r\n var i;\r\n\r\n for (i = 0; i < this.callCount; i++) {\r\n calls.push(this.getCall(i));\r\n }\r\n\r\n return calls;\r\n },\r\n\r\n calledBefore: function calledBefore(spyFn) {\r\n if (!this.called) {\r\n return false;\r\n }\r\n\r\n if (!spyFn.called) {\r\n return true;\r\n }\r\n\r\n return this.callIds[0] < spyFn.callIds[spyFn.callIds.length - 1];\r\n },\r\n\r\n calledAfter: function calledAfter(spyFn) {\r\n if (!this.called || !spyFn.called) {\r\n return false;\r\n }\r\n\r\n return this.callIds[this.callCount - 1] > spyFn.callIds[spyFn.callCount - 1];\r\n },\r\n\r\n withArgs: function () {\r\n var args = slice.call(arguments);\r\n\r\n if (this.fakes) {\r\n var match = matchingFake(this.fakes, args, true);\r\n\r\n if (match) {\r\n return match;\r\n }\r\n } else {\r\n this.fakes = [];\r\n }\r\n\r\n var original = this;\r\n var fake = this.instantiateFake();\r\n fake.matchingAguments = args;\r\n fake.parent = this;\r\n push.call(this.fakes, fake);\r\n\r\n fake.withArgs = function () {\r\n return original.withArgs.apply(original, arguments);\r\n };\r\n\r\n for (var i = 0; i < this.args.length; i++) {\r\n if (fake.matches(this.args[i])) {\r\n incrementCallCount.call(fake);\r\n push.call(fake.thisValues, this.thisValues[i]);\r\n push.call(fake.args, this.args[i]);\r\n push.call(fake.returnValues, this.returnValues[i]);\r\n push.call(fake.exceptions, this.exceptions[i]);\r\n push.call(fake.callIds, this.callIds[i]);\r\n }\r\n }\r\n createCallProperties.call(fake);\r\n\r\n return fake;\r\n },\r\n\r\n matches: function (args, strict) {\r\n var margs = this.matchingAguments;\r\n\r\n if (margs.length <= args.length &&\r\n sinon.deepEqual(margs, args.slice(0, margs.length))) {\r\n return !strict || margs.length === args.length;\r\n }\r\n },\r\n\r\n printf: function (format) {\r\n var spyInstance = this;\r\n var args = slice.call(arguments, 1);\r\n var formatter;\r\n\r\n return (format || '').replace(/%(.)/g, function (match, specifyer) {\r\n formatter = spyApi.formatters[specifyer];\r\n\r\n if (typeof formatter === 'function') {\r\n return formatter.call(null, spyInstance, args);\r\n } else if (!isNaN(parseInt(specifyer, 10))) {\r\n return sinon.format(args[specifyer - 1]);\r\n }\r\n\r\n return '%' + specifyer;\r\n });\r\n }\r\n };\r\n\r\n function delegateToCalls(method, matchAny, actual, notCalled) {\r\n spyApi[method] = function () {\r\n if (!this.called) {\r\n if (notCalled) {\r\n return notCalled.apply(this, arguments);\r\n }\r\n return false;\r\n }\r\n\r\n var currentCall;\r\n var matches = 0;\r\n\r\n for (var i = 0, l = this.callCount; i < l; i += 1) {\r\n currentCall = this.getCall(i);\r\n\r\n if (currentCall[actual || method].apply(currentCall, arguments)) {\r\n matches += 1;\r\n\r\n if (matchAny) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return matches === this.callCount;\r\n };\r\n }\r\n\r\n delegateToCalls('calledOn', true);\r\n delegateToCalls('alwaysCalledOn', false, 'calledOn');\r\n delegateToCalls('calledWith', true);\r\n delegateToCalls('calledWithMatch', true);\r\n delegateToCalls('alwaysCalledWith', false, 'calledWith');\r\n delegateToCalls('alwaysCalledWithMatch', false, 'calledWithMatch');\r\n delegateToCalls('calledWithExactly', true);\r\n delegateToCalls('alwaysCalledWithExactly', false, 'calledWithExactly');\r\n delegateToCalls('neverCalledWith', false, 'notCalledWith', function () {\r\n return true;\r\n });\r\n delegateToCalls('neverCalledWithMatch', false, 'notCalledWithMatch', function () {\r\n return true;\r\n });\r\n delegateToCalls('threw', true);\r\n delegateToCalls('alwaysThrew', false, 'threw');\r\n delegateToCalls('returned', true);\r\n delegateToCalls('alwaysReturned', false, 'returned');\r\n delegateToCalls('calledWithNew', true);\r\n delegateToCalls('alwaysCalledWithNew', false, 'calledWithNew');\r\n delegateToCalls('callArg', false, 'callArgWith', function () {\r\n throw new Error(this.toString() + ' cannot call arg since it was not yet invoked.');\r\n });\r\n spyApi.callArgWith = spyApi.callArg;\r\n delegateToCalls('callArgOn', false, 'callArgOnWith', function () {\r\n throw new Error(this.toString() + ' cannot call arg since it was not yet invoked.');\r\n });\r\n spyApi.callArgOnWith = spyApi.callArgOn;\r\n delegateToCalls('yield', false, 'yield', function () {\r\n throw new Error(this.toString() + ' cannot yield since it was not yet invoked.');\r\n });\r\n // \"invokeCallback\" is an alias for \"yield\" since \"yield\" is invalid in strict mode.\r\n spyApi.invokeCallback = spyApi.yield;\r\n delegateToCalls('yieldOn', false, 'yieldOn', function () {\r\n throw new Error(this.toString() + ' cannot yield since it was not yet invoked.');\r\n });\r\n delegateToCalls('yieldTo', false, 'yieldTo', function (property) {\r\n throw new Error(this.toString() + ' cannot yield to \\'' + property +\r\n '\\' since it was not yet invoked.');\r\n });\r\n delegateToCalls('yieldToOn', false, 'yieldToOn', function (property) {\r\n throw new Error(this.toString() + ' cannot yield to \\'' + property +\r\n '\\' since it was not yet invoked.');\r\n });\r\n\r\n spyApi.formatters = {\r\n c: function (spyInstance) {\r\n return sinon.timesInWords(spyInstance.callCount);\r\n },\r\n\r\n n: function (spyInstance) {\r\n return spyInstance.toString();\r\n },\r\n\r\n C: function (spyInstance) {\r\n var calls = [];\r\n\r\n for (var i = 0, l = spyInstance.callCount; i < l; ++i) {\r\n var stringifiedCall = ' ' + spyInstance.getCall(i).toString();\r\n if (/\\n/.test(calls[i - 1])) {\r\n stringifiedCall = '\\n' + stringifiedCall;\r\n }\r\n push.call(calls, stringifiedCall);\r\n }\r\n\r\n return calls.length > 0 ? '\\n' + calls.join('\\n') : '';\r\n },\r\n\r\n t: function (spyInstance) {\r\n var objects = [];\r\n\r\n for (var i = 0, l = spyInstance.callCount; i < l; ++i) {\r\n push.call(objects, sinon.format(spyInstance.thisValues[i]));\r\n }\r\n\r\n return objects.join(', ');\r\n },\r\n\r\n '*': function (spyInstance, args) {\r\n var formatted = [];\r\n\r\n for (var i = 0, l = args.length; i < l; ++i) {\r\n push.call(formatted, sinon.format(args[i]));\r\n }\r\n\r\n return formatted.join(', ');\r\n }\r\n };\r\n\r\n sinon.extend(spy, spyApi);\r\n\r\n spy.spyCall = sinon.spyCall;\r\n sinon.spy = spy;\r\n\r\n return spy;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var core = /* require */('./util/core');\r\n /* require */('./call');\r\n /* require */('./extend');\r\n /* require */('./times_in_words');\r\n /* require */('./format');\r\n module.exports = makeApi(core);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend util/core.js\r\n * depend extend.js\r\n */\r\n/**\r\n * Stub behavior\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @author Tim Fischbach (mail@timfischbach.de)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function (sinonGlobal) {\r\n\r\n var slice = Array.prototype.slice;\r\n var join = Array.prototype.join;\r\n var useLeftMostCallback = -1;\r\n var useRightMostCallback = -2;\r\n\r\n var nextTick = (function () {\r\n if (typeof process === 'object' && typeof process.nextTick === 'function') {\r\n return process.nextTick;\r\n }\r\n\r\n if (typeof setImmediate === 'function') {\r\n return setImmediate;\r\n }\r\n\r\n return function (callback) {\r\n setTimeout(callback, 0);\r\n };\r\n })();\r\n\r\n function throwsException(error, message) {\r\n if (typeof error === 'string') {\r\n this.exception = new Error(message || '');\r\n this.exception.name = error;\r\n } else if (!error) {\r\n this.exception = new Error('Error');\r\n } else {\r\n this.exception = error;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n function getCallback(behavior, args) {\r\n var callArgAt = behavior.callArgAt;\r\n\r\n if (callArgAt >= 0) {\r\n return args[callArgAt];\r\n }\r\n\r\n var argumentList;\r\n\r\n if (callArgAt === useLeftMostCallback) {\r\n argumentList = args;\r\n }\r\n\r\n if (callArgAt === useRightMostCallback) {\r\n argumentList = slice.call(args).reverse();\r\n }\r\n\r\n var callArgProp = behavior.callArgProp;\r\n\r\n for (var i = 0, l = argumentList.length; i < l; ++i) {\r\n if (!callArgProp && typeof argumentList[i] === 'function') {\r\n return argumentList[i];\r\n }\r\n\r\n if (callArgProp && argumentList[i] &&\r\n typeof argumentList[i][callArgProp] === 'function') {\r\n return argumentList[i][callArgProp];\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n function makeApi(sinon) {\r\n function getCallbackError(behavior, func, args) {\r\n if (behavior.callArgAt < 0) {\r\n var msg;\r\n\r\n if (behavior.callArgProp) {\r\n msg = sinon.functionName(behavior.stub) +\r\n ' expected to yield to \\'' + behavior.callArgProp +\r\n '\\', but no object with such a property was passed.';\r\n } else {\r\n msg = sinon.functionName(behavior.stub) +\r\n ' expected to yield, but no callback was passed.';\r\n }\r\n\r\n if (args.length > 0) {\r\n msg += ' Received [' + join.call(args, ', ') + ']';\r\n }\r\n\r\n return msg;\r\n }\r\n\r\n return 'argument at index ' + behavior.callArgAt + ' is not a function: ' + func;\r\n }\r\n\r\n function callCallback(behavior, args) {\r\n if (typeof behavior.callArgAt === 'number') {\r\n var func = getCallback(behavior, args);\r\n\r\n if (typeof func !== 'function') {\r\n throw new TypeError(getCallbackError(behavior, func, args));\r\n }\r\n\r\n if (behavior.callbackAsync) {\r\n nextTick(function () {\r\n func.apply(behavior.callbackContext, behavior.callbackArguments);\r\n });\r\n } else {\r\n func.apply(behavior.callbackContext, behavior.callbackArguments);\r\n }\r\n }\r\n }\r\n\r\n var proto = {\r\n create: function create(stub) {\r\n var behavior = sinon.extend({}, sinon.behavior);\r\n delete behavior.create;\r\n behavior.stub = stub;\r\n\r\n return behavior;\r\n },\r\n\r\n isPresent: function isPresent() {\r\n return (typeof this.callArgAt === 'number' ||\r\n this.exception ||\r\n typeof this.returnArgAt === 'number' ||\r\n this.returnThis ||\r\n this.returnValueDefined);\r\n },\r\n\r\n invoke: function invoke(context, args) {\r\n callCallback(this, args);\r\n\r\n if (this.exception) {\r\n throw this.exception;\r\n } else if (typeof this.returnArgAt === 'number') {\r\n return args[this.returnArgAt];\r\n } else if (this.returnThis) {\r\n return context;\r\n }\r\n\r\n return this.returnValue;\r\n },\r\n\r\n onCall: function onCall(index) {\r\n return this.stub.onCall(index);\r\n },\r\n\r\n onFirstCall: function onFirstCall() {\r\n return this.stub.onFirstCall();\r\n },\r\n\r\n onSecondCall: function onSecondCall() {\r\n return this.stub.onSecondCall();\r\n },\r\n\r\n onThirdCall: function onThirdCall() {\r\n return this.stub.onThirdCall();\r\n },\r\n\r\n withArgs: function withArgs(/* arguments */) {\r\n throw new Error(\r\n 'Defining a stub by invoking \"stub.onCall(...).withArgs(...)\" ' +\r\n 'is not supported. Use \"stub.withArgs(...).onCall(...)\" ' +\r\n 'to define sequential behavior for calls with certain arguments.'\r\n );\r\n },\r\n\r\n callsArg: function callsArg(pos) {\r\n if (typeof pos !== 'number') {\r\n throw new TypeError('argument index is not number');\r\n }\r\n\r\n this.callArgAt = pos;\r\n this.callbackArguments = [];\r\n this.callbackContext = undefined;\r\n this.callArgProp = undefined;\r\n this.callbackAsync = false;\r\n\r\n return this;\r\n },\r\n\r\n callsArgOn: function callsArgOn(pos, context) {\r\n if (typeof pos !== 'number') {\r\n throw new TypeError('argument index is not number');\r\n }\r\n if (typeof context !== 'object') {\r\n throw new TypeError('argument context is not an object');\r\n }\r\n\r\n this.callArgAt = pos;\r\n this.callbackArguments = [];\r\n this.callbackContext = context;\r\n this.callArgProp = undefined;\r\n this.callbackAsync = false;\r\n\r\n return this;\r\n },\r\n\r\n callsArgWith: function callsArgWith(pos) {\r\n if (typeof pos !== 'number') {\r\n throw new TypeError('argument index is not number');\r\n }\r\n\r\n this.callArgAt = pos;\r\n this.callbackArguments = slice.call(arguments, 1);\r\n this.callbackContext = undefined;\r\n this.callArgProp = undefined;\r\n this.callbackAsync = false;\r\n\r\n return this;\r\n },\r\n\r\n callsArgOnWith: function callsArgWith(pos, context) {\r\n if (typeof pos !== 'number') {\r\n throw new TypeError('argument index is not number');\r\n }\r\n if (typeof context !== 'object') {\r\n throw new TypeError('argument context is not an object');\r\n }\r\n\r\n this.callArgAt = pos;\r\n this.callbackArguments = slice.call(arguments, 2);\r\n this.callbackContext = context;\r\n this.callArgProp = undefined;\r\n this.callbackAsync = false;\r\n\r\n return this;\r\n },\r\n\r\n yields: function () {\r\n this.callArgAt = useLeftMostCallback;\r\n this.callbackArguments = slice.call(arguments, 0);\r\n this.callbackContext = undefined;\r\n this.callArgProp = undefined;\r\n this.callbackAsync = false;\r\n\r\n return this;\r\n },\r\n\r\n yieldsRight: function () {\r\n this.callArgAt = useRightMostCallback;\r\n this.callbackArguments = slice.call(arguments, 0);\r\n this.callbackContext = undefined;\r\n this.callArgProp = undefined;\r\n this.callbackAsync = false;\r\n\r\n return this;\r\n },\r\n\r\n yieldsOn: function (context) {\r\n if (typeof context !== 'object') {\r\n throw new TypeError('argument context is not an object');\r\n }\r\n\r\n this.callArgAt = useLeftMostCallback;\r\n this.callbackArguments = slice.call(arguments, 1);\r\n this.callbackContext = context;\r\n this.callArgProp = undefined;\r\n this.callbackAsync = false;\r\n\r\n return this;\r\n },\r\n\r\n yieldsTo: function (prop) {\r\n this.callArgAt = useLeftMostCallback;\r\n this.callbackArguments = slice.call(arguments, 1);\r\n this.callbackContext = undefined;\r\n this.callArgProp = prop;\r\n this.callbackAsync = false;\r\n\r\n return this;\r\n },\r\n\r\n yieldsToOn: function (prop, context) {\r\n if (typeof context !== 'object') {\r\n throw new TypeError('argument context is not an object');\r\n }\r\n\r\n this.callArgAt = useLeftMostCallback;\r\n this.callbackArguments = slice.call(arguments, 2);\r\n this.callbackContext = context;\r\n this.callArgProp = prop;\r\n this.callbackAsync = false;\r\n\r\n return this;\r\n },\r\n\r\n throws: throwsException,\r\n throwsException: throwsException,\r\n\r\n returns: function returns(value) {\r\n this.returnValue = value;\r\n this.returnValueDefined = true;\r\n this.exception = undefined;\r\n\r\n return this;\r\n },\r\n\r\n returnsArg: function returnsArg(pos) {\r\n if (typeof pos !== 'number') {\r\n throw new TypeError('argument index is not number');\r\n }\r\n\r\n this.returnArgAt = pos;\r\n\r\n return this;\r\n },\r\n\r\n returnsThis: function returnsThis() {\r\n this.returnThis = true;\r\n\r\n return this;\r\n }\r\n };\r\n\r\n function createAsyncVersion(syncFnName) {\r\n return function () {\r\n var result = this[syncFnName].apply(this, arguments);\r\n this.callbackAsync = true;\r\n return result;\r\n };\r\n }\r\n\r\n // create asynchronous versions of callsArg* and yields* methods\r\n for (var method in proto) {\r\n // need to avoid creating anotherasync versions of the newly added async methods\r\n if (proto.hasOwnProperty(method) && method.match(/^(callsArg|yields)/) && !method.match(/Async/)) {\r\n proto[method + 'Async'] = createAsyncVersion(method);\r\n }\r\n }\r\n\r\n sinon.behavior = proto;\r\n return proto;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./util/core');\r\n /* require */('./extend');\r\n module.exports = makeApi(sinon);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend util/core.js\r\n */\r\n(function (sinonGlobal) {\r\n\r\n function makeApi(sinon) {\r\n function walkInternal(obj, iterator, context, originalObj, seen) {\r\n var proto, prop;\r\n\r\n if (typeof Object.getOwnPropertyNames !== 'function') {\r\n // We explicitly want to enumerate through all of the prototype's properties\r\n // in this case, therefore we deliberately leave out an own property check.\r\n /* eslint-disable guard-for-in */\r\n for (prop in obj) {\r\n iterator.call(context, obj[prop], prop, obj);\r\n }\r\n /* eslint-enable guard-for-in */\r\n\r\n return;\r\n }\r\n\r\n Object.getOwnPropertyNames(obj).forEach(function (k) {\r\n if (!seen[k]) {\r\n seen[k] = true;\r\n var target = typeof Object.getOwnPropertyDescriptor(obj, k).get === 'function' ?\r\n originalObj : obj;\r\n iterator.call(context, target[k], k, target);\r\n }\r\n });\r\n\r\n proto = Object.getPrototypeOf(obj);\r\n if (proto) {\r\n walkInternal(proto, iterator, context, originalObj, seen);\r\n }\r\n }\r\n\r\n /* Public: walks the prototype chain of an object and iterates over every own property\r\n * name encountered. The iterator is called in the same fashion that Array.prototype.forEach\r\n * works, where it is passed the value, key, and own object as the 1st, 2nd, and 3rd positional\r\n * argument, respectively. In cases where Object.getOwnPropertyNames is not available, walk will\r\n * default to using a simple for..in loop.\r\n *\r\n * obj - The object to walk the prototype chain for.\r\n * iterator - The function to be called on each pass of the walk.\r\n * context - (Optional) When given, the iterator will be called with this object as the receiver.\r\n */\r\n function walk(obj, iterator, context) {\r\n return walkInternal(obj, iterator, context, obj, {});\r\n }\r\n\r\n sinon.walk = walk;\r\n return sinon.walk;\r\n }\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./util/core');\r\n module.exports = makeApi(sinon);\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend util/core.js\r\n * depend extend.js\r\n * depend spy.js\r\n * depend behavior.js\r\n * depend walk.js\r\n */\r\n/**\r\n * Stub functions\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function (sinonGlobal) {\r\n\r\n function makeApi(sinon) {\r\n function stub(object, property, func) {\r\n if (!!func && typeof func !== 'function' && typeof func !== 'object') {\r\n throw new TypeError('Custom stub should be a function or a property descriptor');\r\n }\r\n\r\n var wrapper;\r\n\r\n if (func) {\r\n if (typeof func === 'function') {\r\n wrapper = sinon.spy && sinon.spy.create ? sinon.spy.create(func) : func;\r\n } else {\r\n wrapper = func;\r\n if (sinon.spy && sinon.spy.create) {\r\n var types = sinon.objectKeys(wrapper);\r\n for (var i = 0; i < types.length; i++) {\r\n wrapper[types[i]] = sinon.spy.create(wrapper[types[i]]);\r\n }\r\n }\r\n }\r\n } else {\r\n var stubLength = 0;\r\n if (typeof object === 'object' && typeof object[property] === 'function') {\r\n stubLength = object[property].length;\r\n }\r\n wrapper = stub.create(stubLength);\r\n }\r\n\r\n if (!object && typeof property === 'undefined') {\r\n return sinon.stub.create();\r\n }\r\n\r\n if (typeof property === 'undefined' && typeof object === 'object') {\r\n sinon.walk(object || {}, function (value, prop, propOwner) {\r\n // we don't want to stub things like toString(), valueOf(), etc. so we only stub if the object\r\n // is not Object.prototype\r\n if (\r\n propOwner !== Object.prototype &&\r\n prop !== 'constructor' &&\r\n typeof sinon.getPropertyDescriptor(propOwner, prop).value === 'function'\r\n ) {\r\n stub(object, prop);\r\n }\r\n });\r\n\r\n return object;\r\n }\r\n\r\n return sinon.wrapMethod(object, property, wrapper);\r\n }\r\n\r\n\r\n /*eslint-disable no-use-before-define*/\r\n function getParentBehaviour(stubInstance) {\r\n return (stubInstance.parent && getCurrentBehavior(stubInstance.parent));\r\n }\r\n\r\n function getDefaultBehavior(stubInstance) {\r\n return stubInstance.defaultBehavior ||\r\n getParentBehaviour(stubInstance) ||\r\n sinon.behavior.create(stubInstance);\r\n }\r\n\r\n function getCurrentBehavior(stubInstance) {\r\n var behavior = stubInstance.behaviors[stubInstance.callCount - 1];\r\n return behavior && behavior.isPresent() ? behavior : getDefaultBehavior(stubInstance);\r\n }\r\n /*eslint-enable no-use-before-define*/\r\n\r\n var uuid = 0;\r\n\r\n var proto = {\r\n create: function create(stubLength) {\r\n var functionStub = function () {\r\n return getCurrentBehavior(functionStub).invoke(this, arguments);\r\n };\r\n\r\n functionStub.id = 'stub#' + uuid++;\r\n var orig = functionStub;\r\n functionStub = sinon.spy.create(functionStub, stubLength);\r\n functionStub.func = orig;\r\n\r\n sinon.extend(functionStub, stub);\r\n functionStub.instantiateFake = sinon.stub.create;\r\n functionStub.displayName = 'stub';\r\n functionStub.toString = sinon.functionToString;\r\n\r\n functionStub.defaultBehavior = null;\r\n functionStub.behaviors = [];\r\n\r\n return functionStub;\r\n },\r\n\r\n resetBehavior: function () {\r\n var i;\r\n\r\n this.defaultBehavior = null;\r\n this.behaviors = [];\r\n\r\n delete this.returnValue;\r\n delete this.returnArgAt;\r\n this.returnThis = false;\r\n\r\n if (this.fakes) {\r\n for (i = 0; i < this.fakes.length; i++) {\r\n this.fakes[i].resetBehavior();\r\n }\r\n }\r\n },\r\n\r\n onCall: function onCall(index) {\r\n if (!this.behaviors[index]) {\r\n this.behaviors[index] = sinon.behavior.create(this);\r\n }\r\n\r\n return this.behaviors[index];\r\n },\r\n\r\n onFirstCall: function onFirstCall() {\r\n return this.onCall(0);\r\n },\r\n\r\n onSecondCall: function onSecondCall() {\r\n return this.onCall(1);\r\n },\r\n\r\n onThirdCall: function onThirdCall() {\r\n return this.onCall(2);\r\n }\r\n };\r\n\r\n function createBehavior(behaviorMethod) {\r\n return function () {\r\n this.defaultBehavior = this.defaultBehavior || sinon.behavior.create(this);\r\n this.defaultBehavior[behaviorMethod].apply(this.defaultBehavior, arguments);\r\n return this;\r\n };\r\n }\r\n\r\n for (var method in sinon.behavior) {\r\n if (sinon.behavior.hasOwnProperty(method) &&\r\n !proto.hasOwnProperty(method) &&\r\n method !== 'create' &&\r\n method !== 'withArgs' &&\r\n method !== 'invoke') {\r\n proto[method] = createBehavior(method);\r\n }\r\n }\r\n\r\n sinon.extend(stub, proto);\r\n sinon.stub = stub;\r\n\r\n return stub;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var core = /* require */('./util/core');\r\n /* require */('./behavior');\r\n /* require */('./spy');\r\n /* require */('./extend');\r\n module.exports = makeApi(core);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend times_in_words.js\r\n * depend util/core.js\r\n * depend call.js\r\n * depend extend.js\r\n * depend match.js\r\n * depend spy.js\r\n * depend stub.js\r\n * depend format.js\r\n */\r\n/**\r\n * Mock functions.\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function (sinonGlobal) {\r\n\r\n function makeApi(sinon) {\r\n var push = [].push;\r\n var match = sinon.match;\r\n\r\n function mock(object) {\r\n // if (typeof console !== undefined && console.warn) {\r\n // console.warn(\"mock will be removed from Sinon.JS v2.0\");\r\n // }\r\n\r\n if (!object) {\r\n return sinon.expectation.create('Anonymous mock');\r\n }\r\n\r\n return mock.create(object);\r\n }\r\n\r\n function each(collection, callback) {\r\n if (!collection) {\r\n return;\r\n }\r\n\r\n for (var i = 0, l = collection.length; i < l; i += 1) {\r\n callback(collection[i]);\r\n }\r\n }\r\n\r\n function arrayEquals(arr1, arr2, compareLength) {\r\n if (compareLength && (arr1.length !== arr2.length)) {\r\n return false;\r\n }\r\n\r\n for (var i = 0, l = arr1.length; i < l; i++) {\r\n if (!sinon.deepEqual(arr1[i], arr2[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n sinon.extend(mock, {\r\n create: function create(object) {\r\n if (!object) {\r\n throw new TypeError('object is null');\r\n }\r\n\r\n var mockObject = sinon.extend({}, mock);\r\n mockObject.object = object;\r\n delete mockObject.create;\r\n\r\n return mockObject;\r\n },\r\n\r\n expects: function expects(method) {\r\n if (!method) {\r\n throw new TypeError('method is falsy');\r\n }\r\n\r\n if (!this.expectations) {\r\n this.expectations = {};\r\n this.proxies = [];\r\n }\r\n\r\n if (!this.expectations[method]) {\r\n this.expectations[method] = [];\r\n var mockObject = this;\r\n\r\n sinon.wrapMethod(this.object, method, function () {\r\n return mockObject.invokeMethod(method, this, arguments);\r\n });\r\n\r\n push.call(this.proxies, method);\r\n }\r\n\r\n var expectation = sinon.expectation.create(method);\r\n push.call(this.expectations[method], expectation);\r\n\r\n return expectation;\r\n },\r\n\r\n restore: function restore() {\r\n var object = this.object;\r\n\r\n each(this.proxies, function (proxy) {\r\n if (typeof object[proxy].restore === 'function') {\r\n object[proxy].restore();\r\n }\r\n });\r\n },\r\n\r\n verify: function verify() {\r\n var expectations = this.expectations || {};\r\n var messages = [];\r\n var met = [];\r\n\r\n each(this.proxies, function (proxy) {\r\n each(expectations[proxy], function (expectation) {\r\n if (!expectation.met()) {\r\n push.call(messages, expectation.toString());\r\n } else {\r\n push.call(met, expectation.toString());\r\n }\r\n });\r\n });\r\n\r\n this.restore();\r\n\r\n if (messages.length > 0) {\r\n sinon.expectation.fail(messages.concat(met).join('\\n'));\r\n } else if (met.length > 0) {\r\n sinon.expectation.pass(messages.concat(met).join('\\n'));\r\n }\r\n\r\n return true;\r\n },\r\n\r\n invokeMethod: function invokeMethod(method, thisValue, args) {\r\n var expectations = this.expectations && this.expectations[method] ? this.expectations[method] : [];\r\n var expectationsWithMatchingArgs = [];\r\n var currentArgs = args || [];\r\n var i, available;\r\n\r\n for (i = 0; i < expectations.length; i += 1) {\r\n var expectedArgs = expectations[i].expectedArguments || [];\r\n if (arrayEquals(expectedArgs, currentArgs, expectations[i].expectsExactArgCount)) {\r\n expectationsWithMatchingArgs.push(expectations[i]);\r\n }\r\n }\r\n\r\n for (i = 0; i < expectationsWithMatchingArgs.length; i += 1) {\r\n if (!expectationsWithMatchingArgs[i].met() &&\r\n expectationsWithMatchingArgs[i].allowsCall(thisValue, args)) {\r\n return expectationsWithMatchingArgs[i].apply(thisValue, args);\r\n }\r\n }\r\n\r\n var messages = [];\r\n var exhausted = 0;\r\n\r\n for (i = 0; i < expectationsWithMatchingArgs.length; i += 1) {\r\n if (expectationsWithMatchingArgs[i].allowsCall(thisValue, args)) {\r\n available = available || expectationsWithMatchingArgs[i];\r\n } else {\r\n exhausted += 1;\r\n }\r\n }\r\n\r\n if (available && exhausted === 0) {\r\n return available.apply(thisValue, args);\r\n }\r\n\r\n for (i = 0; i < expectations.length; i += 1) {\r\n push.call(messages, ' ' + expectations[i].toString());\r\n }\r\n\r\n messages.unshift('Unexpected call: ' + sinon.spyCall.toString.call({\r\n proxy: method,\r\n args: args\r\n }));\r\n\r\n sinon.expectation.fail(messages.join('\\n'));\r\n }\r\n });\r\n\r\n var times = sinon.timesInWords;\r\n var slice = Array.prototype.slice;\r\n\r\n function callCountInWords(callCount) {\r\n if (callCount === 0) {\r\n return 'never called';\r\n }\r\n\r\n return 'called ' + times(callCount);\r\n }\r\n\r\n function expectedCallCountInWords(expectation) {\r\n var min = expectation.minCalls;\r\n var max = expectation.maxCalls;\r\n\r\n if (typeof min === 'number' && typeof max === 'number') {\r\n var str = times(min);\r\n\r\n if (min !== max) {\r\n str = 'at least ' + str + ' and at most ' + times(max);\r\n }\r\n\r\n return str;\r\n }\r\n\r\n if (typeof min === 'number') {\r\n return 'at least ' + times(min);\r\n }\r\n\r\n return 'at most ' + times(max);\r\n }\r\n\r\n function receivedMinCalls(expectation) {\r\n var hasMinLimit = typeof expectation.minCalls === 'number';\r\n return !hasMinLimit || expectation.callCount >= expectation.minCalls;\r\n }\r\n\r\n function receivedMaxCalls(expectation) {\r\n if (typeof expectation.maxCalls !== 'number') {\r\n return false;\r\n }\r\n\r\n return expectation.callCount === expectation.maxCalls;\r\n }\r\n\r\n function verifyMatcher(possibleMatcher, arg) {\r\n var isMatcher = match && match.isMatcher(possibleMatcher);\r\n\r\n return isMatcher && possibleMatcher.test(arg) || true;\r\n }\r\n\r\n sinon.expectation = {\r\n minCalls: 1,\r\n maxCalls: 1,\r\n\r\n create: function create(methodName) {\r\n var expectation = sinon.extend(sinon.stub.create(), sinon.expectation);\r\n delete expectation.create;\r\n expectation.method = methodName;\r\n\r\n return expectation;\r\n },\r\n\r\n invoke: function invoke(func, thisValue, args) {\r\n this.verifyCallAllowed(thisValue, args);\r\n\r\n return sinon.spy.invoke.apply(this, arguments);\r\n },\r\n\r\n atLeast: function atLeast(num) {\r\n if (typeof num !== 'number') {\r\n throw new TypeError('\\'' + num + '\\' is not number');\r\n }\r\n\r\n if (!this.limitsSet) {\r\n this.maxCalls = null;\r\n this.limitsSet = true;\r\n }\r\n\r\n this.minCalls = num;\r\n\r\n return this;\r\n },\r\n\r\n atMost: function atMost(num) {\r\n if (typeof num !== 'number') {\r\n throw new TypeError('\\'' + num + '\\' is not number');\r\n }\r\n\r\n if (!this.limitsSet) {\r\n this.minCalls = null;\r\n this.limitsSet = true;\r\n }\r\n\r\n this.maxCalls = num;\r\n\r\n return this;\r\n },\r\n\r\n never: function never() {\r\n return this.exactly(0);\r\n },\r\n\r\n once: function once() {\r\n return this.exactly(1);\r\n },\r\n\r\n twice: function twice() {\r\n return this.exactly(2);\r\n },\r\n\r\n thrice: function thrice() {\r\n return this.exactly(3);\r\n },\r\n\r\n exactly: function exactly(num) {\r\n if (typeof num !== 'number') {\r\n throw new TypeError('\\'' + num + '\\' is not a number');\r\n }\r\n\r\n this.atLeast(num);\r\n return this.atMost(num);\r\n },\r\n\r\n met: function met() {\r\n return !this.failed && receivedMinCalls(this);\r\n },\r\n\r\n verifyCallAllowed: function verifyCallAllowed(thisValue, args) {\r\n if (receivedMaxCalls(this)) {\r\n this.failed = true;\r\n sinon.expectation.fail(this.method + ' already called ' + times(this.maxCalls));\r\n }\r\n\r\n if ('expectedThis' in this && this.expectedThis !== thisValue) {\r\n sinon.expectation.fail(this.method + ' called with ' + thisValue + ' as thisValue, expected ' +\r\n this.expectedThis);\r\n }\r\n\r\n if (!('expectedArguments' in this)) {\r\n return;\r\n }\r\n\r\n if (!args) {\r\n sinon.expectation.fail(this.method + ' received no arguments, expected ' +\r\n sinon.format(this.expectedArguments));\r\n }\r\n\r\n if (args.length < this.expectedArguments.length) {\r\n sinon.expectation.fail(this.method + ' received too few arguments (' + sinon.format(args) +\r\n '), expected ' + sinon.format(this.expectedArguments));\r\n }\r\n\r\n if (this.expectsExactArgCount &&\r\n args.length !== this.expectedArguments.length) {\r\n sinon.expectation.fail(this.method + ' received too many arguments (' + sinon.format(args) +\r\n '), expected ' + sinon.format(this.expectedArguments));\r\n }\r\n\r\n for (var i = 0, l = this.expectedArguments.length; i < l; i += 1) {\r\n\r\n if (!verifyMatcher(this.expectedArguments[i], args[i])) {\r\n sinon.expectation.fail(this.method + ' received wrong arguments ' + sinon.format(args) +\r\n ', didn\\'t match ' + this.expectedArguments.toString());\r\n }\r\n\r\n if (!sinon.deepEqual(this.expectedArguments[i], args[i])) {\r\n sinon.expectation.fail(this.method + ' received wrong arguments ' + sinon.format(args) +\r\n ', expected ' + sinon.format(this.expectedArguments));\r\n }\r\n }\r\n },\r\n\r\n allowsCall: function allowsCall(thisValue, args) {\r\n if (this.met() && receivedMaxCalls(this)) {\r\n return false;\r\n }\r\n\r\n if ('expectedThis' in this && this.expectedThis !== thisValue) {\r\n return false;\r\n }\r\n\r\n if (!('expectedArguments' in this)) {\r\n return true;\r\n }\r\n\r\n args = args || [];\r\n\r\n if (args.length < this.expectedArguments.length) {\r\n return false;\r\n }\r\n\r\n if (this.expectsExactArgCount &&\r\n args.length !== this.expectedArguments.length) {\r\n return false;\r\n }\r\n\r\n for (var i = 0, l = this.expectedArguments.length; i < l; i += 1) {\r\n if (!verifyMatcher(this.expectedArguments[i], args[i])) {\r\n return false;\r\n }\r\n\r\n if (!sinon.deepEqual(this.expectedArguments[i], args[i])) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n },\r\n\r\n withArgs: function withArgs() {\r\n this.expectedArguments = slice.call(arguments);\r\n return this;\r\n },\r\n\r\n withExactArgs: function withExactArgs() {\r\n this.withArgs.apply(this, arguments);\r\n this.expectsExactArgCount = true;\r\n return this;\r\n },\r\n\r\n on: function on(thisValue) {\r\n this.expectedThis = thisValue;\r\n return this;\r\n },\r\n\r\n toString: function () {\r\n var args = (this.expectedArguments || []).slice();\r\n\r\n if (!this.expectsExactArgCount) {\r\n push.call(args, '[...]');\r\n }\r\n\r\n var callStr = sinon.spyCall.toString.call({\r\n proxy: this.method || 'anonymous mock expectation',\r\n args: args\r\n });\r\n\r\n var message = callStr.replace(', [...', '[, ...') + ' ' +\r\n expectedCallCountInWords(this);\r\n\r\n if (this.met()) {\r\n return 'Expectation met: ' + message;\r\n }\r\n\r\n return 'Expected ' + message + ' (' +\r\n callCountInWords(this.callCount) + ')';\r\n },\r\n\r\n verify: function verify() {\r\n if (!this.met()) {\r\n sinon.expectation.fail(this.toString());\r\n } else {\r\n sinon.expectation.pass(this.toString());\r\n }\r\n\r\n return true;\r\n },\r\n\r\n pass: function pass(message) {\r\n sinon.assert.pass(message);\r\n },\r\n\r\n fail: function fail(message) {\r\n var exception = new Error(message);\r\n exception.name = 'ExpectationError';\r\n\r\n throw exception;\r\n }\r\n };\r\n\r\n sinon.mock = mock;\r\n return mock;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./util/core');\r\n /* require */('./times_in_words');\r\n /* require */('./call');\r\n /* require */('./extend');\r\n /* require */('./match');\r\n /* require */('./spy');\r\n /* require */('./stub');\r\n /* require */('./format');\r\n\r\n module.exports = makeApi(sinon);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend util/core.js\r\n * depend spy.js\r\n * depend stub.js\r\n * depend mock.js\r\n */\r\n/**\r\n * Collections of stubs, spies and mocks.\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function (sinonGlobal) {\r\n\r\n var push = [].push;\r\n var hasOwnProperty = Object.prototype.hasOwnProperty;\r\n\r\n function getFakes(fakeCollection) {\r\n if (!fakeCollection.fakes) {\r\n fakeCollection.fakes = [];\r\n }\r\n\r\n return fakeCollection.fakes;\r\n }\r\n\r\n function each(fakeCollection, method) {\r\n var fakes = getFakes(fakeCollection);\r\n\r\n for (var i = 0, l = fakes.length; i < l; i += 1) {\r\n if (typeof fakes[i][method] === 'function') {\r\n fakes[i][method]();\r\n }\r\n }\r\n }\r\n\r\n function compact(fakeCollection) {\r\n var fakes = getFakes(fakeCollection);\r\n var i = 0;\r\n while (i < fakes.length) {\r\n fakes.splice(i, 1);\r\n }\r\n }\r\n\r\n function makeApi(sinon) {\r\n var collection = {\r\n verify: function resolve() {\r\n each(this, 'verify');\r\n },\r\n\r\n restore: function restore() {\r\n each(this, 'restore');\r\n compact(this);\r\n },\r\n\r\n reset: function restore() {\r\n each(this, 'reset');\r\n },\r\n\r\n verifyAndRestore: function verifyAndRestore() {\r\n var exception;\r\n\r\n try {\r\n this.verify();\r\n } catch (e) {\r\n exception = e;\r\n }\r\n\r\n this.restore();\r\n\r\n if (exception) {\r\n throw exception;\r\n }\r\n },\r\n\r\n add: function add(fake) {\r\n push.call(getFakes(this), fake);\r\n return fake;\r\n },\r\n\r\n spy: function spy() {\r\n return this.add(sinon.spy.apply(sinon, arguments));\r\n },\r\n\r\n stub: function stub(object, property, value) {\r\n if (property) {\r\n var original = object[property];\r\n\r\n if (typeof original !== 'function') {\r\n if (!hasOwnProperty.call(object, property)) {\r\n throw new TypeError('Cannot stub non-existent own property ' + property);\r\n }\r\n\r\n object[property] = value;\r\n\r\n return this.add({\r\n restore: function () {\r\n object[property] = original;\r\n }\r\n });\r\n }\r\n }\r\n if (!property && !!object && typeof object === 'object') {\r\n var stubbedObj = sinon.stub.apply(sinon, arguments);\r\n\r\n for (var prop in stubbedObj) {\r\n if (typeof stubbedObj[prop] === 'function') {\r\n this.add(stubbedObj[prop]);\r\n }\r\n }\r\n\r\n return stubbedObj;\r\n }\r\n\r\n return this.add(sinon.stub.apply(sinon, arguments));\r\n },\r\n\r\n mock: function mock() {\r\n return this.add(sinon.mock.apply(sinon, arguments));\r\n },\r\n\r\n inject: function inject(obj) {\r\n var col = this;\r\n\r\n obj.spy = function () {\r\n return col.spy.apply(col, arguments);\r\n };\r\n\r\n obj.stub = function () {\r\n return col.stub.apply(col, arguments);\r\n };\r\n\r\n obj.mock = function () {\r\n return col.mock.apply(col, arguments);\r\n };\r\n\r\n return obj;\r\n }\r\n };\r\n\r\n sinon.collection = collection;\r\n return collection;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./util/core');\r\n /* require */('./mock');\r\n /* require */('./spy');\r\n /* require */('./stub');\r\n module.exports = makeApi(sinon);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * Fake timer API\r\n * setTimeout\r\n * setInterval\r\n * clearTimeout\r\n * clearInterval\r\n * tick\r\n * reset\r\n * Date\r\n *\r\n * Inspired by jsUnitMockTimeOut from JsUnit\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function () {\r\n\r\n function makeApi(s, lol) {\r\n /*global lolex */\r\n var llx = (typeof lolex !== 'undefined' ? lolex : lol) || window.lolex;\r\n\r\n s.useFakeTimers = function () {\r\n var now;\r\n var methods = Array.prototype.slice.call(arguments);\r\n\r\n if (typeof methods[0] === 'string') {\r\n now = 0;\r\n } else {\r\n now = methods.shift();\r\n }\r\n\r\n var clock = llx.install(now || 0, methods);\r\n clock.restore = clock.uninstall;\r\n return clock;\r\n };\r\n\r\n s.clock = {\r\n create: function (now) {\r\n return llx.createClock(now);\r\n }\r\n };\r\n\r\n s.timers = {\r\n setTimeout: setTimeout,\r\n clearTimeout: clearTimeout,\r\n setImmediate: (typeof setImmediate !== 'undefined' ? setImmediate : undefined),\r\n clearImmediate: (typeof clearImmediate !== 'undefined' ? clearImmediate : undefined),\r\n setInterval: setInterval,\r\n clearInterval: clearInterval,\r\n Date: Date\r\n };\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, epxorts, module, lolex) {\r\n var core = /* require */('./core');\r\n makeApi(core, lolex);\r\n module.exports = core;\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n } else if (isNode) {\r\n loadDependencies(require, module.exports, module, /* require */('lolex'));\r\n } else {\r\n makeApi(sinon); // eslint-disable-line no-undef\r\n }\r\n}());\r\n\r\n/**\r\n * Minimal Event interface implementation\r\n *\r\n * Original implementation by Sven Fuchs: https://gist.github.com/995028\r\n * Modifications and tests by Christian Johansen.\r\n *\r\n * @author Sven Fuchs (svenfuchs@artweb-design.de)\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2011 Sven Fuchs, Christian Johansen\r\n */\r\nif (typeof sinon === 'undefined') {\r\n this.sinon = {};\r\n}\r\n\r\n(function () {\r\n\r\n var push = [].push;\r\n\r\n function makeApi(sinon) {\r\n sinon.Event = function Event(type, bubbles, cancelable, target) {\r\n this.initEvent(type, bubbles, cancelable, target);\r\n };\r\n\r\n sinon.Event.prototype = {\r\n initEvent: function (type, bubbles, cancelable, target) {\r\n this.type = type;\r\n this.bubbles = bubbles;\r\n this.cancelable = cancelable;\r\n this.target = target;\r\n },\r\n\r\n stopPropagation: function () {},\r\n\r\n preventDefault: function () {\r\n this.defaultPrevented = true;\r\n }\r\n };\r\n\r\n sinon.ProgressEvent = function ProgressEvent(type, progressEventRaw, target) {\r\n this.initEvent(type, false, false, target);\r\n this.loaded = progressEventRaw.loaded || null;\r\n this.total = progressEventRaw.total || null;\r\n this.lengthComputable = !!progressEventRaw.total;\r\n };\r\n\r\n sinon.ProgressEvent.prototype = new sinon.Event();\r\n\r\n sinon.ProgressEvent.prototype.constructor = sinon.ProgressEvent;\r\n\r\n sinon.CustomEvent = function CustomEvent(type, customData, target) {\r\n this.initEvent(type, false, false, target);\r\n this.detail = customData.detail || null;\r\n };\r\n\r\n sinon.CustomEvent.prototype = new sinon.Event();\r\n\r\n sinon.CustomEvent.prototype.constructor = sinon.CustomEvent;\r\n\r\n sinon.EventTarget = {\r\n addEventListener: function addEventListener(event, listener) {\r\n this.eventListeners = this.eventListeners || {};\r\n this.eventListeners[event] = this.eventListeners[event] || [];\r\n push.call(this.eventListeners[event], listener);\r\n },\r\n\r\n removeEventListener: function removeEventListener(event, listener) {\r\n var listeners = this.eventListeners && this.eventListeners[event] || [];\r\n\r\n for (var i = 0, l = listeners.length; i < l; ++i) {\r\n if (listeners[i] === listener) {\r\n return listeners.splice(i, 1);\r\n }\r\n }\r\n },\r\n\r\n dispatchEvent: function dispatchEvent(event) {\r\n var type = event.type;\r\n var listeners = this.eventListeners && this.eventListeners[type] || [];\r\n\r\n for (var i = 0; i < listeners.length; i++) {\r\n if (typeof listeners[i] === 'function') {\r\n listeners[i].call(this, event);\r\n } else {\r\n listeners[i].handleEvent(event);\r\n }\r\n }\r\n\r\n return !!event.defaultPrevented;\r\n }\r\n };\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require) {\r\n var sinon = /* require */('./core');\r\n makeApi(sinon);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n } else if (isNode) {\r\n loadDependencies(require);\r\n } else {\r\n makeApi(sinon); // eslint-disable-line no-undef\r\n }\r\n}());\r\n\r\n/**\r\n * depend util/core.js\r\n */\r\n/**\r\n * Logs errors\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2014 Christian Johansen\r\n */\r\n(function (sinonGlobal) {\r\n\r\n // cache a reference to setTimeout, so that our reference won't be stubbed out\r\n // when using fake timers and errors will still get logged\r\n // https://github.com/cjohansen/Sinon.JS/issues/381\r\n var realSetTimeout = setTimeout;\r\n\r\n function makeApi(sinon) {\r\n\r\n function log() {}\r\n\r\n function logError(label, err) {\r\n var msg = label + ' threw exception: ';\r\n\r\n function throwLoggedError() {\r\n err.message = msg + err.message;\r\n throw err;\r\n }\r\n\r\n sinon.log(msg + '[' + err.name + '] ' + err.message);\r\n\r\n if (err.stack) {\r\n sinon.log(err.stack);\r\n }\r\n\r\n if (logError.useImmediateExceptions) {\r\n throwLoggedError();\r\n } else {\r\n logError.setTimeout(throwLoggedError, 0);\r\n }\r\n }\r\n\r\n // When set to true, any errors logged will be thrown immediately;\r\n // If set to false, the errors will be thrown in separate execution frame.\r\n logError.useImmediateExceptions = false;\r\n\r\n // wrap realSetTimeout with something we can stub in tests\r\n logError.setTimeout = function (func, timeout) {\r\n realSetTimeout(func, timeout);\r\n };\r\n\r\n var exports = {};\r\n exports.log = sinon.log = log;\r\n exports.logError = sinon.logError = logError;\r\n\r\n return exports;\r\n }\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./util/core');\r\n module.exports = makeApi(sinon);\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend core.js\r\n * depend ../extend.js\r\n * depend event.js\r\n * depend ../log_error.js\r\n */\r\n/**\r\n * Fake XDomainRequest object\r\n */\r\nif (typeof sinon === 'undefined') {\r\n this.sinon = {};\r\n}\r\n\r\n// wrapper for global\r\n(function (global) {\r\n\r\n var xdr = { XDomainRequest: global.XDomainRequest };\r\n xdr.GlobalXDomainRequest = global.XDomainRequest;\r\n xdr.supportsXDR = typeof xdr.GlobalXDomainRequest !== 'undefined';\r\n xdr.workingXDR = xdr.supportsXDR ? xdr.GlobalXDomainRequest : false;\r\n\r\n function makeApi(sinon) {\r\n sinon.xdr = xdr;\r\n\r\n function FakeXDomainRequest() {\r\n this.readyState = FakeXDomainRequest.UNSENT;\r\n this.requestBody = null;\r\n this.requestHeaders = {};\r\n this.status = 0;\r\n this.timeout = null;\r\n\r\n if (typeof FakeXDomainRequest.onCreate === 'function') {\r\n FakeXDomainRequest.onCreate(this);\r\n }\r\n }\r\n\r\n function verifyState(x) {\r\n if (x.readyState !== FakeXDomainRequest.OPENED) {\r\n throw new Error('INVALID_STATE_ERR');\r\n }\r\n\r\n if (x.sendFlag) {\r\n throw new Error('INVALID_STATE_ERR');\r\n }\r\n }\r\n\r\n function verifyRequestSent(x) {\r\n if (x.readyState === FakeXDomainRequest.UNSENT) {\r\n throw new Error('Request not sent');\r\n }\r\n if (x.readyState === FakeXDomainRequest.DONE) {\r\n throw new Error('Request done');\r\n }\r\n }\r\n\r\n function verifyResponseBodyType(body) {\r\n if (typeof body !== 'string') {\r\n var error = new Error('Attempted to respond to fake XDomainRequest with ' +\r\n body + ', which is not a string.');\r\n error.name = 'InvalidBodyException';\r\n throw error;\r\n }\r\n }\r\n\r\n sinon.extend(FakeXDomainRequest.prototype, sinon.EventTarget, {\r\n open: function open(method, url) {\r\n this.method = method;\r\n this.url = url;\r\n\r\n this.responseText = null;\r\n this.sendFlag = false;\r\n\r\n this.readyStateChange(FakeXDomainRequest.OPENED);\r\n },\r\n\r\n readyStateChange: function readyStateChange(state) {\r\n this.readyState = state;\r\n var eventName = '';\r\n switch (this.readyState) {\r\n case FakeXDomainRequest.UNSENT:\r\n break;\r\n case FakeXDomainRequest.OPENED:\r\n break;\r\n case FakeXDomainRequest.LOADING:\r\n if (this.sendFlag) {\r\n //raise the progress event\r\n eventName = 'onprogress';\r\n }\r\n break;\r\n case FakeXDomainRequest.DONE:\r\n if (this.isTimeout) {\r\n eventName = 'ontimeout';\r\n } else if (this.errorFlag || (this.status < 200 || this.status > 299)) {\r\n eventName = 'onerror';\r\n } else {\r\n eventName = 'onload';\r\n }\r\n break;\r\n }\r\n\r\n // raising event (if defined)\r\n if (eventName) {\r\n if (typeof this[eventName] === 'function') {\r\n try {\r\n this[eventName]();\r\n } catch (e) {\r\n sinon.logError('Fake XHR ' + eventName + ' handler', e);\r\n }\r\n }\r\n }\r\n },\r\n\r\n send: function send(data) {\r\n verifyState(this);\r\n\r\n if (!/^(get|head)$/i.test(this.method)) {\r\n this.requestBody = data;\r\n }\r\n this.requestHeaders['Content-Type'] = 'text/plain;charset=utf-8';\r\n\r\n this.errorFlag = false;\r\n this.sendFlag = true;\r\n this.readyStateChange(FakeXDomainRequest.OPENED);\r\n\r\n if (typeof this.onSend === 'function') {\r\n this.onSend(this);\r\n }\r\n },\r\n\r\n abort: function abort() {\r\n this.aborted = true;\r\n this.responseText = null;\r\n this.errorFlag = true;\r\n\r\n if (this.readyState > sinon.FakeXDomainRequest.UNSENT && this.sendFlag) {\r\n this.readyStateChange(sinon.FakeXDomainRequest.DONE);\r\n this.sendFlag = false;\r\n }\r\n },\r\n\r\n setResponseBody: function setResponseBody(body) {\r\n verifyRequestSent(this);\r\n verifyResponseBodyType(body);\r\n\r\n var chunkSize = this.chunkSize || 10;\r\n var index = 0;\r\n this.responseText = '';\r\n\r\n do {\r\n this.readyStateChange(FakeXDomainRequest.LOADING);\r\n this.responseText += body.substring(index, index + chunkSize);\r\n index += chunkSize;\r\n } while (index < body.length);\r\n\r\n this.readyStateChange(FakeXDomainRequest.DONE);\r\n },\r\n\r\n respond: function respond(status, contentType, body) {\r\n // content-type ignored, since XDomainRequest does not carry this\r\n // we keep the same syntax for respond(...) as for FakeXMLHttpRequest to ease\r\n // test integration across browsers\r\n this.status = typeof status === 'number' ? status : 200;\r\n this.setResponseBody(body || '');\r\n },\r\n\r\n simulatetimeout: function simulatetimeout() {\r\n this.status = 0;\r\n this.isTimeout = true;\r\n // Access to this should actually throw an error\r\n this.responseText = undefined;\r\n this.readyStateChange(FakeXDomainRequest.DONE);\r\n }\r\n });\r\n\r\n sinon.extend(FakeXDomainRequest, {\r\n UNSENT: 0,\r\n OPENED: 1,\r\n LOADING: 3,\r\n DONE: 4\r\n });\r\n\r\n sinon.useFakeXDomainRequest = function useFakeXDomainRequest() {\r\n sinon.FakeXDomainRequest.restore = function restore(keepOnCreate) {\r\n if (xdr.supportsXDR) {\r\n global.XDomainRequest = xdr.GlobalXDomainRequest;\r\n }\r\n\r\n delete sinon.FakeXDomainRequest.restore;\r\n\r\n if (keepOnCreate !== true) {\r\n delete sinon.FakeXDomainRequest.onCreate;\r\n }\r\n };\r\n if (xdr.supportsXDR) {\r\n global.XDomainRequest = sinon.FakeXDomainRequest;\r\n }\r\n return sinon.FakeXDomainRequest;\r\n };\r\n\r\n sinon.FakeXDomainRequest = FakeXDomainRequest;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./core');\r\n /* require */('../extend');\r\n /* require */('./event');\r\n /* require */('../log_error');\r\n makeApi(sinon);\r\n module.exports = sinon;\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n } else if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n } else {\r\n makeApi(sinon); // eslint-disable-line no-undef\r\n }\r\n})(typeof global !== 'undefined' ? global : self);\r\n\r\n/**\r\n * depend core.js\r\n * depend ../extend.js\r\n * depend event.js\r\n * depend ../log_error.js\r\n */\r\n/**\r\n * Fake XMLHttpRequest object\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function (sinonGlobal, global) {\r\n\r\n function getWorkingXHR(globalScope) {\r\n var supportsXHR = typeof globalScope.XMLHttpRequest !== 'undefined';\r\n if (supportsXHR) {\r\n return globalScope.XMLHttpRequest;\r\n }\r\n\r\n var supportsActiveX = typeof globalScope.ActiveXObject !== 'undefined';\r\n if (supportsActiveX) {\r\n return function () {\r\n return new globalScope.ActiveXObject('MSXML2.XMLHTTP.3.0');\r\n };\r\n }\r\n\r\n return false;\r\n }\r\n\r\n var supportsProgress = typeof ProgressEvent !== 'undefined';\r\n var supportsCustomEvent = typeof CustomEvent !== 'undefined';\r\n var supportsFormData = typeof FormData !== 'undefined';\r\n var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined';\r\n var supportsBlob = typeof Blob === 'function';\r\n var sinonXhr = { XMLHttpRequest: global.XMLHttpRequest };\r\n sinonXhr.GlobalXMLHttpRequest = global.XMLHttpRequest;\r\n sinonXhr.GlobalActiveXObject = global.ActiveXObject;\r\n sinonXhr.supportsActiveX = typeof sinonXhr.GlobalActiveXObject !== 'undefined';\r\n sinonXhr.supportsXHR = typeof sinonXhr.GlobalXMLHttpRequest !== 'undefined';\r\n sinonXhr.workingXHR = getWorkingXHR(global);\r\n sinonXhr.supportsCORS = sinonXhr.supportsXHR && 'withCredentials' in (new sinonXhr.GlobalXMLHttpRequest());\r\n\r\n var unsafeHeaders = {\r\n 'Accept-Charset': true,\r\n 'Accept-Encoding': true,\r\n Connection: true,\r\n 'Content-Length': true,\r\n Cookie: true,\r\n Cookie2: true,\r\n 'Content-Transfer-Encoding': true,\r\n Date: true,\r\n Expect: true,\r\n Host: true,\r\n 'Keep-Alive': true,\r\n Referer: true,\r\n TE: true,\r\n Trailer: true,\r\n 'Transfer-Encoding': true,\r\n Upgrade: true,\r\n 'User-Agent': true,\r\n Via: true\r\n };\r\n\r\n // An upload object is created for each\r\n // FakeXMLHttpRequest and allows upload\r\n // events to be simulated using uploadProgress\r\n // and uploadError.\r\n function UploadProgress() {\r\n this.eventListeners = {\r\n progress: [],\r\n load: [],\r\n abort: [],\r\n error: []\r\n };\r\n }\r\n\r\n UploadProgress.prototype.addEventListener = function addEventListener(event, listener) {\r\n this.eventListeners[event].push(listener);\r\n };\r\n\r\n UploadProgress.prototype.removeEventListener = function removeEventListener(event, listener) {\r\n var listeners = this.eventListeners[event] || [];\r\n\r\n for (var i = 0, l = listeners.length; i < l; ++i) {\r\n if (listeners[i] === listener) {\r\n return listeners.splice(i, 1);\r\n }\r\n }\r\n };\r\n\r\n UploadProgress.prototype.dispatchEvent = function dispatchEvent(event) {\r\n var listeners = this.eventListeners[event.type] || [];\r\n\r\n for (var i = 0, listener; (listener = listeners[i]) != null; i++) {\r\n listener(event);\r\n }\r\n };\r\n\r\n // Note that for FakeXMLHttpRequest to work pre ES5\r\n // we lose some of the alignment with the spec.\r\n // To ensure as close a match as possible,\r\n // set responseType before calling open, send or respond;\r\n function FakeXMLHttpRequest() {\r\n this.readyState = FakeXMLHttpRequest.UNSENT;\r\n this.requestHeaders = {};\r\n this.requestBody = null;\r\n this.status = 0;\r\n this.statusText = '';\r\n this.upload = new UploadProgress();\r\n this.responseType = '';\r\n this.response = '';\r\n if (sinonXhr.supportsCORS) {\r\n this.withCredentials = false;\r\n }\r\n\r\n var xhr = this;\r\n var events = ['loadstart', 'load', 'abort', 'loadend'];\r\n\r\n function addEventListener(eventName) {\r\n xhr.addEventListener(eventName, function (event) {\r\n var listener = xhr['on' + eventName];\r\n\r\n if (listener && typeof listener === 'function') {\r\n listener.call(this, event);\r\n }\r\n });\r\n }\r\n\r\n for (var i = events.length - 1; i >= 0; i--) {\r\n addEventListener(events[i]);\r\n }\r\n\r\n if (typeof FakeXMLHttpRequest.onCreate === 'function') {\r\n FakeXMLHttpRequest.onCreate(this);\r\n }\r\n }\r\n\r\n function verifyState(xhr) {\r\n if (xhr.readyState !== FakeXMLHttpRequest.OPENED) {\r\n throw new Error('INVALID_STATE_ERR');\r\n }\r\n\r\n if (xhr.sendFlag) {\r\n throw new Error('INVALID_STATE_ERR');\r\n }\r\n }\r\n\r\n function getHeader(headers, header) {\r\n header = header.toLowerCase();\r\n\r\n for (var h in headers) {\r\n if (h.toLowerCase() === header) {\r\n return h;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // filtering to enable a white-list version of Sinon FakeXhr,\r\n // where whitelisted requests are passed through to real XHR\r\n function each(collection, callback) {\r\n if (!collection) {\r\n return;\r\n }\r\n\r\n for (var i = 0, l = collection.length; i < l; i += 1) {\r\n callback(collection[i]);\r\n }\r\n }\r\n function some(collection, callback) {\r\n for (var index = 0; index < collection.length; index++) {\r\n if (callback(collection[index]) === true) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n // largest arity in XHR is 5 - XHR#open\r\n var apply = function (obj, method, args) {\r\n switch (args.length) {\r\n case 0: return obj[method]();\r\n case 1: return obj[method](args[0]);\r\n case 2: return obj[method](args[0], args[1]);\r\n case 3: return obj[method](args[0], args[1], args[2]);\r\n case 4: return obj[method](args[0], args[1], args[2], args[3]);\r\n case 5: return obj[method](args[0], args[1], args[2], args[3], args[4]);\r\n }\r\n };\r\n\r\n FakeXMLHttpRequest.filters = [];\r\n FakeXMLHttpRequest.addFilter = function addFilter(fn) {\r\n this.filters.push(fn);\r\n };\r\n var IE6Re = /MSIE 6/;\r\n FakeXMLHttpRequest.defake = function defake(fakeXhr, xhrArgs) {\r\n var xhr = new sinonXhr.workingXHR(); // eslint-disable-line new-cap\r\n\r\n each([\r\n 'open',\r\n 'setRequestHeader',\r\n 'send',\r\n 'abort',\r\n 'getResponseHeader',\r\n 'getAllResponseHeaders',\r\n 'addEventListener',\r\n 'overrideMimeType',\r\n 'removeEventListener'\r\n ], function (method) {\r\n fakeXhr[method] = function () {\r\n return apply(xhr, method, arguments);\r\n };\r\n });\r\n\r\n var copyAttrs = function (args) {\r\n each(args, function (attr) {\r\n try {\r\n fakeXhr[attr] = xhr[attr];\r\n } catch (e) {\r\n if (!IE6Re.test(navigator.userAgent)) {\r\n throw e;\r\n }\r\n }\r\n });\r\n };\r\n\r\n var stateChange = function stateChange() {\r\n fakeXhr.readyState = xhr.readyState;\r\n if (xhr.readyState >= FakeXMLHttpRequest.HEADERS_RECEIVED) {\r\n copyAttrs(['status', 'statusText']);\r\n }\r\n if (xhr.readyState >= FakeXMLHttpRequest.LOADING) {\r\n copyAttrs(['responseText', 'response']);\r\n }\r\n if (xhr.readyState === FakeXMLHttpRequest.DONE) {\r\n copyAttrs(['responseXML']);\r\n }\r\n if (fakeXhr.onreadystatechange) {\r\n fakeXhr.onreadystatechange.call(fakeXhr, { target: fakeXhr });\r\n }\r\n };\r\n\r\n if (xhr.addEventListener) {\r\n for (var event in fakeXhr.eventListeners) {\r\n if (fakeXhr.eventListeners.hasOwnProperty(event)) {\r\n\r\n /*eslint-disable no-loop-func*/\r\n each(fakeXhr.eventListeners[event], function (handler) {\r\n xhr.addEventListener(event, handler);\r\n });\r\n /*eslint-enable no-loop-func*/\r\n }\r\n }\r\n xhr.addEventListener('readystatechange', stateChange);\r\n } else {\r\n xhr.onreadystatechange = stateChange;\r\n }\r\n apply(xhr, 'open', xhrArgs);\r\n };\r\n FakeXMLHttpRequest.useFilters = false;\r\n\r\n function verifyRequestOpened(xhr) {\r\n if (xhr.readyState !== FakeXMLHttpRequest.OPENED) {\r\n throw new Error('INVALID_STATE_ERR - ' + xhr.readyState);\r\n }\r\n }\r\n\r\n function verifyRequestSent(xhr) {\r\n if (xhr.readyState === FakeXMLHttpRequest.DONE) {\r\n throw new Error('Request done');\r\n }\r\n }\r\n\r\n function verifyHeadersReceived(xhr) {\r\n if (xhr.async && xhr.readyState !== FakeXMLHttpRequest.HEADERS_RECEIVED) {\r\n throw new Error('No headers received');\r\n }\r\n }\r\n\r\n function verifyResponseBodyType(body) {\r\n if (typeof body !== 'string') {\r\n var error = new Error('Attempted to respond to fake XMLHttpRequest with ' +\r\n body + ', which is not a string.');\r\n error.name = 'InvalidBodyException';\r\n throw error;\r\n }\r\n }\r\n\r\n function convertToArrayBuffer(body) {\r\n var buffer = new ArrayBuffer(body.length);\r\n var view = new Uint8Array(buffer);\r\n for (var i = 0; i < body.length; i++) {\r\n var charCode = body.charCodeAt(i);\r\n if (charCode >= 256) {\r\n throw new TypeError('arraybuffer or blob responseTypes require binary string, ' +\r\n 'invalid character ' + body[i] + ' found.');\r\n }\r\n view[i] = charCode;\r\n }\r\n return buffer;\r\n }\r\n\r\n function isXmlContentType(contentType) {\r\n return !contentType || /(text\\/xml)|(application\\/xml)|(\\+xml)/.test(contentType);\r\n }\r\n\r\n function convertResponseBody(responseType, contentType, body) {\r\n if (responseType === '' || responseType === 'text') {\r\n return body;\r\n } else if (supportsArrayBuffer && responseType === 'arraybuffer') {\r\n return convertToArrayBuffer(body);\r\n } else if (responseType === 'json') {\r\n try {\r\n return JSON.parse(body);\r\n } catch (e) {\r\n // Return parsing failure as null\r\n return null;\r\n }\r\n } else if (supportsBlob && responseType === 'blob') {\r\n var blobOptions = {};\r\n if (contentType) {\r\n blobOptions.type = contentType;\r\n }\r\n return new Blob([convertToArrayBuffer(body)], blobOptions);\r\n } else if (responseType === 'document') {\r\n if (isXmlContentType(contentType)) {\r\n return FakeXMLHttpRequest.parseXML(body);\r\n }\r\n return null;\r\n }\r\n throw new Error('Invalid responseType ' + responseType);\r\n }\r\n\r\n function clearResponse(xhr) {\r\n if (xhr.responseType === '' || xhr.responseType === 'text') {\r\n xhr.response = xhr.responseText = '';\r\n } else {\r\n xhr.response = xhr.responseText = null;\r\n }\r\n xhr.responseXML = null;\r\n }\r\n\r\n FakeXMLHttpRequest.parseXML = function parseXML(text) {\r\n // Treat empty string as parsing failure\r\n if (text !== '') {\r\n try {\r\n if (typeof DOMParser !== 'undefined') {\r\n var parser = new DOMParser();\r\n return parser.parseFromString(text, 'text/xml');\r\n }\r\n var xmlDoc = new window.ActiveXObject('Microsoft.XMLDOM');\r\n xmlDoc.async = 'false';\r\n xmlDoc.loadXML(text);\r\n return xmlDoc;\r\n } catch (e) {\r\n // Unable to parse XML - no biggie\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n FakeXMLHttpRequest.statusCodes = {\r\n 100: 'Continue',\r\n 101: 'Switching Protocols',\r\n 200: 'OK',\r\n 201: 'Created',\r\n 202: 'Accepted',\r\n 203: 'Non-Authoritative Information',\r\n 204: 'No Content',\r\n 205: 'Reset Content',\r\n 206: 'Partial Content',\r\n 207: 'Multi-Status',\r\n 300: 'Multiple Choice',\r\n 301: 'Moved Permanently',\r\n 302: 'Found',\r\n 303: 'See Other',\r\n 304: 'Not Modified',\r\n 305: 'Use Proxy',\r\n 307: 'Temporary Redirect',\r\n 400: 'Bad Request',\r\n 401: 'Unauthorized',\r\n 402: 'Payment Required',\r\n 403: 'Forbidden',\r\n 404: 'Not Found',\r\n 405: 'Method Not Allowed',\r\n 406: 'Not Acceptable',\r\n 407: 'Proxy Authentication Required',\r\n 408: 'Request Timeout',\r\n 409: 'Conflict',\r\n 410: 'Gone',\r\n 411: 'Length Required',\r\n 412: 'Precondition Failed',\r\n 413: 'Request Entity Too Large',\r\n 414: 'Request-URI Too Long',\r\n 415: 'Unsupported Media Type',\r\n 416: 'Requested Range Not Satisfiable',\r\n 417: 'Expectation Failed',\r\n 422: 'Unprocessable Entity',\r\n 500: 'Internal Server Error',\r\n 501: 'Not Implemented',\r\n 502: 'Bad Gateway',\r\n 503: 'Service Unavailable',\r\n 504: 'Gateway Timeout',\r\n 505: 'HTTP Version Not Supported'\r\n };\r\n\r\n function makeApi(sinon) {\r\n sinon.xhr = sinonXhr;\r\n\r\n sinon.extend(FakeXMLHttpRequest.prototype, sinon.EventTarget, {\r\n async: true,\r\n\r\n open: function open(method, url, async, username, password) {\r\n this.method = method;\r\n this.url = url;\r\n this.async = typeof async === 'boolean' ? async : true;\r\n this.username = username;\r\n this.password = password;\r\n clearResponse(this);\r\n this.requestHeaders = {};\r\n this.sendFlag = false;\r\n\r\n if (FakeXMLHttpRequest.useFilters === true) {\r\n var xhrArgs = arguments;\r\n var defake = some(FakeXMLHttpRequest.filters, function (filter) {\r\n return filter.apply(this, xhrArgs);\r\n });\r\n if (defake) {\r\n return FakeXMLHttpRequest.defake(this, arguments);\r\n }\r\n }\r\n this.readyStateChange(FakeXMLHttpRequest.OPENED);\r\n },\r\n\r\n readyStateChange: function readyStateChange(state) {\r\n this.readyState = state;\r\n\r\n var readyStateChangeEvent = new sinon.Event('readystatechange', false, false, this);\r\n\r\n if (typeof this.onreadystatechange === 'function') {\r\n try {\r\n this.onreadystatechange(readyStateChangeEvent);\r\n } catch (e) {\r\n sinon.logError('Fake XHR onreadystatechange handler', e);\r\n }\r\n }\r\n\r\n switch (this.readyState) {\r\n case FakeXMLHttpRequest.DONE:\r\n if (supportsProgress) {\r\n this.upload.dispatchEvent(new sinon.ProgressEvent('progress', {loaded: 100, total: 100}));\r\n this.dispatchEvent(new sinon.ProgressEvent('progress', {loaded: 100, total: 100}));\r\n }\r\n this.upload.dispatchEvent(new sinon.Event('load', false, false, this));\r\n this.dispatchEvent(new sinon.Event('load', false, false, this));\r\n this.dispatchEvent(new sinon.Event('loadend', false, false, this));\r\n break;\r\n }\r\n\r\n this.dispatchEvent(readyStateChangeEvent);\r\n },\r\n\r\n setRequestHeader: function setRequestHeader(header, value) {\r\n verifyState(this);\r\n\r\n if (unsafeHeaders[header] || /^(Sec-|Proxy-)/.test(header)) {\r\n throw new Error('Refused to set unsafe header \"' + header + '\"');\r\n }\r\n\r\n if (this.requestHeaders[header]) {\r\n this.requestHeaders[header] += ',' + value;\r\n } else {\r\n this.requestHeaders[header] = value;\r\n }\r\n },\r\n\r\n // Helps testing\r\n setResponseHeaders: function setResponseHeaders(headers) {\r\n verifyRequestOpened(this);\r\n this.responseHeaders = {};\r\n\r\n for (var header in headers) {\r\n if (headers.hasOwnProperty(header)) {\r\n this.responseHeaders[header] = headers[header];\r\n }\r\n }\r\n\r\n if (this.async) {\r\n this.readyStateChange(FakeXMLHttpRequest.HEADERS_RECEIVED);\r\n } else {\r\n this.readyState = FakeXMLHttpRequest.HEADERS_RECEIVED;\r\n }\r\n },\r\n\r\n // Currently treats ALL data as a DOMString (i.e. no Document)\r\n send: function send(data) {\r\n verifyState(this);\r\n\r\n if (!/^(get|head)$/i.test(this.method)) {\r\n var contentType = getHeader(this.requestHeaders, 'Content-Type');\r\n if (this.requestHeaders[contentType]) {\r\n var value = this.requestHeaders[contentType].split(';');\r\n this.requestHeaders[contentType] = value[0] + ';charset=utf-8';\r\n } else if (supportsFormData && !(data instanceof FormData)) {\r\n this.requestHeaders['Content-Type'] = 'text/plain;charset=utf-8';\r\n }\r\n\r\n this.requestBody = data;\r\n }\r\n\r\n this.errorFlag = false;\r\n this.sendFlag = this.async;\r\n clearResponse(this);\r\n this.readyStateChange(FakeXMLHttpRequest.OPENED);\r\n\r\n if (typeof this.onSend === 'function') {\r\n this.onSend(this);\r\n }\r\n\r\n this.dispatchEvent(new sinon.Event('loadstart', false, false, this));\r\n },\r\n\r\n abort: function abort() {\r\n this.aborted = true;\r\n clearResponse(this);\r\n this.errorFlag = true;\r\n this.requestHeaders = {};\r\n this.responseHeaders = {};\r\n\r\n if (this.readyState > FakeXMLHttpRequest.UNSENT && this.sendFlag) {\r\n this.readyStateChange(FakeXMLHttpRequest.DONE);\r\n this.sendFlag = false;\r\n }\r\n\r\n this.readyState = FakeXMLHttpRequest.UNSENT;\r\n\r\n this.dispatchEvent(new sinon.Event('abort', false, false, this));\r\n\r\n this.upload.dispatchEvent(new sinon.Event('abort', false, false, this));\r\n\r\n if (typeof this.onerror === 'function') {\r\n this.onerror();\r\n }\r\n },\r\n\r\n getResponseHeader: function getResponseHeader(header) {\r\n if (this.readyState < FakeXMLHttpRequest.HEADERS_RECEIVED) {\r\n return null;\r\n }\r\n\r\n if (/^Set-Cookie2?$/i.test(header)) {\r\n return null;\r\n }\r\n\r\n header = getHeader(this.responseHeaders, header);\r\n\r\n return this.responseHeaders[header] || null;\r\n },\r\n\r\n getAllResponseHeaders: function getAllResponseHeaders() {\r\n if (this.readyState < FakeXMLHttpRequest.HEADERS_RECEIVED) {\r\n return '';\r\n }\r\n\r\n var headers = '';\r\n\r\n for (var header in this.responseHeaders) {\r\n if (this.responseHeaders.hasOwnProperty(header) &&\r\n !/^Set-Cookie2?$/i.test(header)) {\r\n headers += header + ': ' + this.responseHeaders[header] + '\\r\\n';\r\n }\r\n }\r\n\r\n return headers;\r\n },\r\n\r\n setResponseBody: function setResponseBody(body) {\r\n verifyRequestSent(this);\r\n verifyHeadersReceived(this);\r\n verifyResponseBodyType(body);\r\n var contentType = this.getResponseHeader('Content-Type');\r\n\r\n var isTextResponse = this.responseType === '' || this.responseType === 'text';\r\n clearResponse(this);\r\n if (this.async) {\r\n var chunkSize = this.chunkSize || 10;\r\n var index = 0;\r\n\r\n do {\r\n this.readyStateChange(FakeXMLHttpRequest.LOADING);\r\n\r\n if (isTextResponse) {\r\n this.responseText = this.response += body.substring(index, index + chunkSize);\r\n }\r\n index += chunkSize;\r\n } while (index < body.length);\r\n }\r\n\r\n this.response = convertResponseBody(this.responseType, contentType, body);\r\n if (isTextResponse) {\r\n this.responseText = this.response;\r\n }\r\n\r\n if (this.responseType === 'document') {\r\n this.responseXML = this.response;\r\n } else if (this.responseType === '' && isXmlContentType(contentType)) {\r\n this.responseXML = FakeXMLHttpRequest.parseXML(this.responseText);\r\n }\r\n this.readyStateChange(FakeXMLHttpRequest.DONE);\r\n },\r\n\r\n respond: function respond(status, headers, body) {\r\n this.status = typeof status === 'number' ? status : 200;\r\n this.statusText = FakeXMLHttpRequest.statusCodes[this.status];\r\n this.setResponseHeaders(headers || {});\r\n this.setResponseBody(body || '');\r\n },\r\n\r\n uploadProgress: function uploadProgress(progressEventRaw) {\r\n if (supportsProgress) {\r\n this.upload.dispatchEvent(new sinon.ProgressEvent('progress', progressEventRaw));\r\n }\r\n },\r\n\r\n downloadProgress: function downloadProgress(progressEventRaw) {\r\n if (supportsProgress) {\r\n this.dispatchEvent(new sinon.ProgressEvent('progress', progressEventRaw));\r\n }\r\n },\r\n\r\n uploadError: function uploadError(error) {\r\n if (supportsCustomEvent) {\r\n this.upload.dispatchEvent(new sinon.CustomEvent('error', {detail: error}));\r\n }\r\n }\r\n });\r\n\r\n sinon.extend(FakeXMLHttpRequest, {\r\n UNSENT: 0,\r\n OPENED: 1,\r\n HEADERS_RECEIVED: 2,\r\n LOADING: 3,\r\n DONE: 4\r\n });\r\n\r\n sinon.useFakeXMLHttpRequest = function () {\r\n FakeXMLHttpRequest.restore = function restore(keepOnCreate) {\r\n if (sinonXhr.supportsXHR) {\r\n global.XMLHttpRequest = sinonXhr.GlobalXMLHttpRequest;\r\n }\r\n\r\n if (sinonXhr.supportsActiveX) {\r\n global.ActiveXObject = sinonXhr.GlobalActiveXObject;\r\n }\r\n\r\n delete FakeXMLHttpRequest.restore;\r\n\r\n if (keepOnCreate !== true) {\r\n delete FakeXMLHttpRequest.onCreate;\r\n }\r\n };\r\n if (sinonXhr.supportsXHR) {\r\n global.XMLHttpRequest = FakeXMLHttpRequest;\r\n }\r\n\r\n if (sinonXhr.supportsActiveX) {\r\n global.ActiveXObject = function ActiveXObject(objId) {\r\n if (objId === 'Microsoft.XMLHTTP' || /^Msxml2\\.XMLHTTP/i.test(objId)) {\r\n\r\n return new FakeXMLHttpRequest();\r\n }\r\n\r\n return new sinonXhr.GlobalActiveXObject(objId);\r\n };\r\n }\r\n\r\n return FakeXMLHttpRequest;\r\n };\r\n\r\n sinon.FakeXMLHttpRequest = FakeXMLHttpRequest;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./core');\r\n /* require */('../extend');\r\n /* require */('./event');\r\n /* require */('../log_error');\r\n makeApi(sinon);\r\n module.exports = sinon;\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon, // eslint-disable-line no-undef\r\n typeof global !== 'undefined' ? global : self\r\n));\r\n\r\n/**\r\n * depend fake_xdomain_request.js\r\n * depend fake_xml_http_request.js\r\n * depend ../format.js\r\n * depend ../log_error.js\r\n */\r\n/**\r\n * The Sinon \"server\" mimics a web server that receives requests from\r\n * sinon.FakeXMLHttpRequest and provides an API to respond to those requests,\r\n * both synchronously and asynchronously. To respond synchronuously, canned\r\n * answers have to be provided upfront.\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function () {\r\n\r\n var push = [].push;\r\n\r\n function responseArray(handler) {\r\n var response = handler;\r\n\r\n if (Object.prototype.toString.call(handler) !== '[object Array]') {\r\n response = [200, {}, handler];\r\n }\r\n\r\n if (typeof response[2] !== 'string') {\r\n throw new TypeError('Fake server response body should be string, but was ' +\r\n typeof response[2]);\r\n }\r\n\r\n return response;\r\n }\r\n\r\n var wloc = typeof window !== 'undefined' ? window.location : {};\r\n var rCurrLoc = new RegExp('^' + wloc.protocol + '//' + wloc.host);\r\n\r\n function matchOne(response, reqMethod, reqUrl) {\r\n var rmeth = response.method;\r\n var matchMethod = !rmeth || rmeth.toLowerCase() === reqMethod.toLowerCase();\r\n var url = response.url;\r\n var matchUrl = !url || url === reqUrl || (typeof url.test === 'function' && url.test(reqUrl));\r\n\r\n return matchMethod && matchUrl;\r\n }\r\n\r\n function match(response, request) {\r\n var requestUrl = request.url;\r\n\r\n if (!/^https?:\\/\\//.test(requestUrl) || rCurrLoc.test(requestUrl)) {\r\n requestUrl = requestUrl.replace(rCurrLoc, '');\r\n }\r\n\r\n if (matchOne(response, this.getHTTPMethod(request), requestUrl)) {\r\n if (typeof response.response === 'function') {\r\n var ru = response.url;\r\n var args = [request].concat(ru && typeof ru.exec === 'function' ? ru.exec(requestUrl).slice(1) : []);\r\n return response.response.apply(response, args);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function makeApi(sinon) {\r\n sinon.fakeServer = {\r\n create: function (config) {\r\n var server = sinon.create(this);\r\n server.configure(config);\r\n if (!sinon.xhr.supportsCORS) {\r\n this.xhr = sinon.useFakeXDomainRequest();\r\n } else {\r\n this.xhr = sinon.useFakeXMLHttpRequest();\r\n }\r\n server.requests = [];\r\n\r\n this.xhr.onCreate = function (xhrObj) {\r\n server.addRequest(xhrObj);\r\n };\r\n\r\n return server;\r\n },\r\n configure: function (config) {\r\n var whitelist = {\r\n 'autoRespond': true,\r\n 'autoRespondAfter': true,\r\n 'respondImmediately': true,\r\n 'fakeHTTPMethods': true\r\n };\r\n var setting;\r\n\r\n config = config || {};\r\n for (setting in config) {\r\n if (whitelist.hasOwnProperty(setting) && config.hasOwnProperty(setting)) {\r\n this[setting] = config[setting];\r\n }\r\n }\r\n },\r\n addRequest: function addRequest(xhrObj) {\r\n var server = this;\r\n push.call(this.requests, xhrObj);\r\n\r\n xhrObj.onSend = function () {\r\n server.handleRequest(this);\r\n\r\n if (server.respondImmediately) {\r\n server.respond();\r\n } else if (server.autoRespond && !server.responding) {\r\n setTimeout(function () {\r\n server.responding = false;\r\n server.respond();\r\n }, server.autoRespondAfter || 10);\r\n\r\n server.responding = true;\r\n }\r\n };\r\n },\r\n\r\n getHTTPMethod: function getHTTPMethod(request) {\r\n if (this.fakeHTTPMethods && /post/i.test(request.method)) {\r\n var matches = (request.requestBody || '').match(/_method=([^\\b;]+)/);\r\n return matches ? matches[1] : request.method;\r\n }\r\n\r\n return request.method;\r\n },\r\n\r\n handleRequest: function handleRequest(xhr) {\r\n if (xhr.async) {\r\n if (!this.queue) {\r\n this.queue = [];\r\n }\r\n\r\n push.call(this.queue, xhr);\r\n } else {\r\n this.processRequest(xhr);\r\n }\r\n },\r\n\r\n log: function log(response, request) {\r\n var str;\r\n\r\n str = 'Request:\\n' + sinon.format(request) + '\\n\\n';\r\n str += 'Response:\\n' + sinon.format(response) + '\\n\\n';\r\n\r\n sinon.log(str);\r\n },\r\n\r\n respondWith: function respondWith(method, url, body) {\r\n if (arguments.length === 1 && typeof method !== 'function') {\r\n this.response = responseArray(method);\r\n return;\r\n }\r\n\r\n if (!this.responses) {\r\n this.responses = [];\r\n }\r\n\r\n if (arguments.length === 1) {\r\n body = method;\r\n url = method = null;\r\n }\r\n\r\n if (arguments.length === 2) {\r\n body = url;\r\n url = method;\r\n method = null;\r\n }\r\n\r\n push.call(this.responses, {\r\n method: method,\r\n url: url,\r\n response: typeof body === 'function' ? body : responseArray(body)\r\n });\r\n },\r\n\r\n respond: function respond() {\r\n if (arguments.length > 0) {\r\n this.respondWith.apply(this, arguments);\r\n }\r\n\r\n var queue = this.queue || [];\r\n var requests = queue.splice(0, queue.length);\r\n\r\n for (var i = 0; i < requests.length; i++) {\r\n this.processRequest(requests[i]);\r\n }\r\n },\r\n\r\n processRequest: function processRequest(request) {\r\n try {\r\n if (request.aborted) {\r\n return;\r\n }\r\n\r\n var response = this.response || [404, {}, ''];\r\n\r\n if (this.responses) {\r\n for (var l = this.responses.length, i = l - 1; i >= 0; i--) {\r\n if (match.call(this, this.responses[i], request)) {\r\n response = this.responses[i].response;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (request.readyState !== 4) {\r\n this.log(response, request);\r\n\r\n request.respond(response[0], response[1], response[2]);\r\n }\r\n } catch (e) {\r\n sinon.logError('Fake server request processing', e);\r\n }\r\n },\r\n\r\n restore: function restore() {\r\n return this.xhr.restore && this.xhr.restore.apply(this.xhr, arguments);\r\n }\r\n };\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./core');\r\n /* require */('./fake_xdomain_request');\r\n /* require */('./fake_xml_http_request');\r\n /* require */('../format');\r\n makeApi(sinon);\r\n module.exports = sinon;\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n } else if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n } else {\r\n makeApi(sinon); // eslint-disable-line no-undef\r\n }\r\n}());\r\n\r\n/**\r\n * depend fake_server.js\r\n * depend fake_timers.js\r\n */\r\n/**\r\n * Add-on for sinon.fakeServer that automatically handles a fake timer along with\r\n * the FakeXMLHttpRequest. The direct inspiration for this add-on is jQuery\r\n * 1.3.x, which does not use xhr object's onreadystatehandler at all - instead,\r\n * it polls the object for completion with setInterval. Dispite the direct\r\n * motivation, there is nothing jQuery-specific in this file, so it can be used\r\n * in any environment where the ajax implementation depends on setInterval or\r\n * setTimeout.\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function () {\r\n\r\n function makeApi(sinon) {\r\n function Server() {}\r\n Server.prototype = sinon.fakeServer;\r\n\r\n sinon.fakeServerWithClock = new Server();\r\n\r\n sinon.fakeServerWithClock.addRequest = function addRequest(xhr) {\r\n if (xhr.async) {\r\n if (typeof setTimeout.clock === 'object') {\r\n this.clock = setTimeout.clock;\r\n } else {\r\n this.clock = sinon.useFakeTimers();\r\n this.resetClock = true;\r\n }\r\n\r\n if (!this.longestTimeout) {\r\n var clockSetTimeout = this.clock.setTimeout;\r\n var clockSetInterval = this.clock.setInterval;\r\n var server = this;\r\n\r\n this.clock.setTimeout = function (fn, timeout) {\r\n server.longestTimeout = Math.max(timeout, server.longestTimeout || 0);\r\n\r\n return clockSetTimeout.apply(this, arguments);\r\n };\r\n\r\n this.clock.setInterval = function (fn, timeout) {\r\n server.longestTimeout = Math.max(timeout, server.longestTimeout || 0);\r\n\r\n return clockSetInterval.apply(this, arguments);\r\n };\r\n }\r\n }\r\n\r\n return sinon.fakeServer.addRequest.call(this, xhr);\r\n };\r\n\r\n sinon.fakeServerWithClock.respond = function respond() {\r\n var returnVal = sinon.fakeServer.respond.apply(this, arguments);\r\n\r\n if (this.clock) {\r\n this.clock.tick(this.longestTimeout || 0);\r\n this.longestTimeout = 0;\r\n\r\n if (this.resetClock) {\r\n this.clock.restore();\r\n this.resetClock = false;\r\n }\r\n }\r\n\r\n return returnVal;\r\n };\r\n\r\n sinon.fakeServerWithClock.restore = function restore() {\r\n if (this.clock) {\r\n this.clock.restore();\r\n }\r\n\r\n return sinon.fakeServer.restore.apply(this, arguments);\r\n };\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require) {\r\n var sinon = /* require */('./core');\r\n /* require */('./fake_server');\r\n /* require */('./fake_timers');\r\n makeApi(sinon);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n } else if (isNode) {\r\n loadDependencies(require);\r\n } else {\r\n makeApi(sinon); // eslint-disable-line no-undef\r\n }\r\n}());\r\n\r\n/**\r\n * depend util/core.js\r\n * depend extend.js\r\n * depend collection.js\r\n * depend util/fake_timers.js\r\n * depend util/fake_server_with_clock.js\r\n */\r\n/**\r\n * Manages fake collections as well as fake utilities such as Sinon's\r\n * timers and fake XHR implementation in one convenient object.\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function (sinonGlobal) {\r\n\r\n function makeApi(sinon) {\r\n var push = [].push;\r\n\r\n function exposeValue(sandbox, config, key, value) {\r\n if (!value) {\r\n return;\r\n }\r\n\r\n if (config.injectInto && !(key in config.injectInto)) {\r\n config.injectInto[key] = value;\r\n sandbox.injectedKeys.push(key);\r\n } else {\r\n push.call(sandbox.args, value);\r\n }\r\n }\r\n\r\n function prepareSandboxFromConfig(config) {\r\n var sandbox = sinon.create(sinon.sandbox);\r\n\r\n if (config.useFakeServer) {\r\n if (typeof config.useFakeServer === 'object') {\r\n sandbox.serverPrototype = config.useFakeServer;\r\n }\r\n\r\n sandbox.useFakeServer();\r\n }\r\n\r\n if (config.useFakeTimers) {\r\n if (typeof config.useFakeTimers === 'object') {\r\n sandbox.useFakeTimers.apply(sandbox, config.useFakeTimers);\r\n } else {\r\n sandbox.useFakeTimers();\r\n }\r\n }\r\n\r\n return sandbox;\r\n }\r\n\r\n sinon.sandbox = sinon.extend(sinon.create(sinon.collection), {\r\n useFakeTimers: function useFakeTimers() {\r\n this.clock = sinon.useFakeTimers.apply(sinon, arguments);\r\n\r\n return this.add(this.clock);\r\n },\r\n\r\n serverPrototype: sinon.fakeServer,\r\n\r\n useFakeServer: function useFakeServer() {\r\n var proto = this.serverPrototype || sinon.fakeServer;\r\n\r\n if (!proto || !proto.create) {\r\n return null;\r\n }\r\n\r\n this.server = proto.create();\r\n return this.add(this.server);\r\n },\r\n\r\n inject: function (obj) {\r\n sinon.collection.inject.call(this, obj);\r\n\r\n if (this.clock) {\r\n obj.clock = this.clock;\r\n }\r\n\r\n if (this.server) {\r\n obj.server = this.server;\r\n obj.requests = this.server.requests;\r\n }\r\n\r\n obj.match = sinon.match;\r\n\r\n return obj;\r\n },\r\n\r\n restore: function () {\r\n sinon.collection.restore.apply(this, arguments);\r\n this.restoreContext();\r\n },\r\n\r\n restoreContext: function () {\r\n if (this.injectedKeys) {\r\n for (var i = 0, j = this.injectedKeys.length; i < j; i++) {\r\n delete this.injectInto[this.injectedKeys[i]];\r\n }\r\n this.injectedKeys = [];\r\n }\r\n },\r\n\r\n create: function (config) {\r\n if (!config) {\r\n return sinon.create(sinon.sandbox);\r\n }\r\n\r\n var sandbox = prepareSandboxFromConfig(config);\r\n sandbox.args = sandbox.args || [];\r\n sandbox.injectedKeys = [];\r\n sandbox.injectInto = config.injectInto;\r\n var prop,\r\n value;\r\n var exposed = sandbox.inject({});\r\n\r\n if (config.properties) {\r\n for (var i = 0, l = config.properties.length; i < l; i++) {\r\n prop = config.properties[i];\r\n value = exposed[prop] || prop === 'sandbox' && sandbox;\r\n exposeValue(sandbox, config, prop, value);\r\n }\r\n } else {\r\n exposeValue(sandbox, config, 'sandbox', value);\r\n }\r\n\r\n return sandbox;\r\n },\r\n\r\n match: sinon.match\r\n });\r\n\r\n sinon.sandbox.useFakeXMLHttpRequest = sinon.sandbox.useFakeServer;\r\n\r\n return sinon.sandbox;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./util/core');\r\n /* require */('./extend');\r\n /* require */('./util/fake_server_with_clock');\r\n /* require */('./util/fake_timers');\r\n /* require */('./collection');\r\n module.exports = makeApi(sinon);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend util/core.js\r\n * depend sandbox.js\r\n */\r\n/**\r\n * Test function, sandboxes fakes\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function (sinonGlobal) {\r\n\r\n function makeApi(sinon) {\r\n var slice = Array.prototype.slice;\r\n\r\n function test(callback) {\r\n var type = typeof callback;\r\n\r\n if (type !== 'function') {\r\n throw new TypeError('sinon.test needs to wrap a test function, got ' + type);\r\n }\r\n\r\n function sinonSandboxedTest() {\r\n var config = sinon.getConfig(sinon.config);\r\n config.injectInto = config.injectIntoThis && this || config.injectInto;\r\n var sandbox = sinon.sandbox.create(config);\r\n var args = slice.call(arguments);\r\n var oldDone = args.length && args[args.length - 1];\r\n var exception, result;\r\n\r\n if (typeof oldDone === 'function') {\r\n args[args.length - 1] = function sinonDone(res) {\r\n if (res) {\r\n sandbox.restore();\r\n } else {\r\n sandbox.verifyAndRestore();\r\n }\r\n oldDone(res);\r\n };\r\n }\r\n\r\n try {\r\n result = callback.apply(this, args.concat(sandbox.args));\r\n } catch (e) {\r\n exception = e;\r\n }\r\n\r\n if (typeof oldDone !== 'function') {\r\n if (typeof exception !== 'undefined') {\r\n sandbox.restore();\r\n throw exception;\r\n } else {\r\n sandbox.verifyAndRestore();\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n if (callback.length) {\r\n return function sinonAsyncSandboxedTest(done) { // eslint-disable-line no-unused-vars\r\n return sinonSandboxedTest.apply(this, arguments);\r\n };\r\n }\r\n\r\n return sinonSandboxedTest;\r\n }\r\n\r\n test.config = {\r\n injectIntoThis: true,\r\n injectInto: null,\r\n properties: ['spy', 'stub', 'mock', 'clock', 'server', 'requests'],\r\n useFakeTimers: true,\r\n useFakeServer: true\r\n };\r\n\r\n sinon.test = test;\r\n return test;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var core = /* require */('./util/core');\r\n /* require */('./sandbox');\r\n module.exports = makeApi(core);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n } else if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n } else if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(typeof sinon === 'object' && sinon || null)); // eslint-disable-line no-undef\r\n\r\n/**\r\n * depend util/core.js\r\n * depend test.js\r\n */\r\n/**\r\n * Test case, sandboxes all test functions\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function (sinonGlobal) {\r\n\r\n function createTest(property, setUp, tearDown) {\r\n return function () {\r\n if (setUp) {\r\n setUp.apply(this, arguments);\r\n }\r\n\r\n var exception, result;\r\n\r\n try {\r\n result = property.apply(this, arguments);\r\n } catch (e) {\r\n exception = e;\r\n }\r\n\r\n if (tearDown) {\r\n tearDown.apply(this, arguments);\r\n }\r\n\r\n if (exception) {\r\n throw exception;\r\n }\r\n\r\n return result;\r\n };\r\n }\r\n\r\n function makeApi(sinon) {\r\n function testCase(tests, prefix) {\r\n if (!tests || typeof tests !== 'object') {\r\n throw new TypeError('sinon.testCase needs an object with test functions');\r\n }\r\n\r\n prefix = prefix || 'test';\r\n var rPrefix = new RegExp('^' + prefix);\r\n var methods = {};\r\n var setUp = tests.setUp;\r\n var tearDown = tests.tearDown;\r\n var testName,\r\n property,\r\n method;\r\n\r\n for (testName in tests) {\r\n if (tests.hasOwnProperty(testName) && !/^(setUp|tearDown)$/.test(testName)) {\r\n property = tests[testName];\r\n\r\n if (typeof property === 'function' && rPrefix.test(testName)) {\r\n method = property;\r\n\r\n if (setUp || tearDown) {\r\n method = createTest(property, setUp, tearDown);\r\n }\r\n\r\n methods[testName] = sinon.test(method);\r\n } else {\r\n methods[testName] = tests[testName];\r\n }\r\n }\r\n }\r\n\r\n return methods;\r\n }\r\n\r\n sinon.testCase = testCase;\r\n return testCase;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var core = /* require */('./util/core');\r\n /* require */('./test');\r\n module.exports = makeApi(core);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon // eslint-disable-line no-undef\r\n));\r\n\r\n/**\r\n * depend times_in_words.js\r\n * depend util/core.js\r\n * depend match.js\r\n * depend format.js\r\n */\r\n/**\r\n * Assertions matching the test spy retrieval interface.\r\n *\r\n * @author Christian Johansen (christian@cjohansen.no)\r\n * @license BSD\r\n *\r\n * Copyright (c) 2010-2013 Christian Johansen\r\n */\r\n(function (sinonGlobal, global) {\r\n\r\n var slice = Array.prototype.slice;\r\n\r\n function makeApi(sinon) {\r\n var assert;\r\n\r\n function verifyIsStub() {\r\n var method;\r\n\r\n for (var i = 0, l = arguments.length; i < l; ++i) {\r\n method = arguments[i];\r\n\r\n if (!method) {\r\n assert.fail('fake is not a spy');\r\n }\r\n\r\n if (method.proxy && method.proxy.isSinonProxy) {\r\n verifyIsStub(method.proxy);\r\n } else {\r\n if (typeof method !== 'function') {\r\n assert.fail(method + ' is not a function');\r\n }\r\n\r\n if (typeof method.getCall !== 'function') {\r\n assert.fail(method + ' is not stubbed');\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n function failAssertion(object, msg) {\r\n object = object || global;\r\n var failMethod = object.fail || assert.fail;\r\n failMethod.call(object, msg);\r\n }\r\n\r\n function mirrorPropAsAssertion(name, method, message) {\r\n if (arguments.length === 2) {\r\n message = method;\r\n method = name;\r\n }\r\n\r\n assert[name] = function (fake) {\r\n verifyIsStub(fake);\r\n\r\n var args = slice.call(arguments, 1);\r\n var failed = false;\r\n\r\n if (typeof method === 'function') {\r\n failed = !method(fake);\r\n } else {\r\n failed = typeof fake[method] === 'function' ?\r\n !fake[method].apply(fake, args) : !fake[method];\r\n }\r\n\r\n if (failed) {\r\n failAssertion(this, (fake.printf || fake.proxy.printf).apply(fake, [message].concat(args)));\r\n } else {\r\n assert.pass(name);\r\n }\r\n };\r\n }\r\n\r\n function exposedName(prefix, prop) {\r\n return !prefix || /^fail/.test(prop) ? prop :\r\n prefix + prop.slice(0, 1).toUpperCase() + prop.slice(1);\r\n }\r\n\r\n assert = {\r\n failException: 'AssertError',\r\n\r\n fail: function fail(message) {\r\n var error = new Error(message);\r\n error.name = this.failException || assert.failException;\r\n\r\n throw error;\r\n },\r\n\r\n pass: function pass() {},\r\n\r\n callOrder: function assertCallOrder() {\r\n verifyIsStub.apply(null, arguments);\r\n var expected = '';\r\n var actual = '';\r\n\r\n if (!sinon.calledInOrder(arguments)) {\r\n try {\r\n expected = [].join.call(arguments, ', ');\r\n var calls = slice.call(arguments);\r\n var i = calls.length;\r\n while (i) {\r\n if (!calls[--i].called) {\r\n calls.splice(i, 1);\r\n }\r\n }\r\n actual = sinon.orderByFirstCall(calls).join(', ');\r\n } catch (e) {\r\n // If this fails, we'll just fall back to the blank string\r\n }\r\n\r\n failAssertion(this, 'expected ' + expected + ' to be ' +\r\n 'called in order but were called as ' + actual);\r\n } else {\r\n assert.pass('callOrder');\r\n }\r\n },\r\n\r\n callCount: function assertCallCount(method, count) {\r\n verifyIsStub(method);\r\n\r\n if (method.callCount !== count) {\r\n var msg = 'expected %n to be called ' + sinon.timesInWords(count) +\r\n ' but was called %c%C';\r\n failAssertion(this, method.printf(msg));\r\n } else {\r\n assert.pass('callCount');\r\n }\r\n },\r\n\r\n expose: function expose(target, options) {\r\n if (!target) {\r\n throw new TypeError('target is null or undefined');\r\n }\r\n\r\n var o = options || {};\r\n var prefix = typeof o.prefix === 'undefined' && 'assert' || o.prefix;\r\n var includeFail = typeof o.includeFail === 'undefined' || !!o.includeFail;\r\n\r\n for (var method in this) {\r\n if (method !== 'expose' && (includeFail || !/^(fail)/.test(method))) {\r\n target[exposedName(prefix, method)] = this[method];\r\n }\r\n }\r\n\r\n return target;\r\n },\r\n\r\n match: function match(actual, expectation) {\r\n var matcher = sinon.match(expectation);\r\n if (matcher.test(actual)) {\r\n assert.pass('match');\r\n } else {\r\n var formatted = [\r\n 'expected value to match',\r\n ' expected = ' + sinon.format(expectation),\r\n ' actual = ' + sinon.format(actual)\r\n ];\r\n\r\n failAssertion(this, formatted.join('\\n'));\r\n }\r\n }\r\n };\r\n\r\n mirrorPropAsAssertion('called', 'expected %n to have been called at least once but was never called');\r\n mirrorPropAsAssertion('notCalled', function (spy) {\r\n return !spy.called;\r\n }, 'expected %n to not have been called but was called %c%C');\r\n mirrorPropAsAssertion('calledOnce', 'expected %n to be called once but was called %c%C');\r\n mirrorPropAsAssertion('calledTwice', 'expected %n to be called twice but was called %c%C');\r\n mirrorPropAsAssertion('calledThrice', 'expected %n to be called thrice but was called %c%C');\r\n mirrorPropAsAssertion('calledOn', 'expected %n to be called with %1 as this but was called with %t');\r\n mirrorPropAsAssertion(\r\n 'alwaysCalledOn',\r\n 'expected %n to always be called with %1 as this but was called with %t'\r\n );\r\n mirrorPropAsAssertion('calledWithNew', 'expected %n to be called with new');\r\n mirrorPropAsAssertion('alwaysCalledWithNew', 'expected %n to always be called with new');\r\n mirrorPropAsAssertion('calledWith', 'expected %n to be called with arguments %*%C');\r\n mirrorPropAsAssertion('calledWithMatch', 'expected %n to be called with match %*%C');\r\n mirrorPropAsAssertion('alwaysCalledWith', 'expected %n to always be called with arguments %*%C');\r\n mirrorPropAsAssertion('alwaysCalledWithMatch', 'expected %n to always be called with match %*%C');\r\n mirrorPropAsAssertion('calledWithExactly', 'expected %n to be called with exact arguments %*%C');\r\n mirrorPropAsAssertion('alwaysCalledWithExactly', 'expected %n to always be called with exact arguments %*%C');\r\n mirrorPropAsAssertion('neverCalledWith', 'expected %n to never be called with arguments %*%C');\r\n mirrorPropAsAssertion('neverCalledWithMatch', 'expected %n to never be called with match %*%C');\r\n mirrorPropAsAssertion('threw', '%n did not throw exception%C');\r\n mirrorPropAsAssertion('alwaysThrew', '%n did not always throw exception%C');\r\n\r\n sinon.assert = assert;\r\n return assert;\r\n }\r\n\r\n var isNode = false && typeof module !== 'undefined' && module.exports && typeof require === 'function';\r\n var isAMD = typeof define === 'function' && typeof define.amd === 'object' && define.amd && false;\r\n\r\n function loadDependencies(require, exports, module) {\r\n var sinon = /* require */('./util/core');\r\n /* require */('./match');\r\n /* require */('./format');\r\n module.exports = makeApi(sinon);\r\n }\r\n\r\n if (isAMD) {\r\n define(loadDependencies);\r\n return;\r\n }\r\n\r\n if (isNode) {\r\n loadDependencies(require, module.exports, module);\r\n return;\r\n }\r\n\r\n if (sinonGlobal) {\r\n makeApi(sinonGlobal);\r\n }\r\n}(\r\n typeof sinon === 'object' && sinon, // eslint-disable-line no-undef\r\n typeof global !== 'undefined' ? global : self\r\n));\r\n\r\n return sinon;\r\n}));\r\n","/* eslint-disable */\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nvar i18n = window.globalLegacyI18n.get('module/extension/requirejs/i18n!global');\r\nfunction addTargetedTriggerFunc(triggerId, featureName, areaName, targetId) {\r\n var _userVoice = window.UserVoice || [];\r\n _userVoice.push(['identify', {\r\n id: pageContext.CurrentUser.Id,\r\n account: {\r\n id: pageContext.CurrentAccount.Id,\r\n name: pageContext.CurrentAccount.AccountNumber\r\n }\r\n }]);\r\n _userVoice.push(['set', {\r\n ticket_custom_fields: {\r\n 'UserAgent': navigator.userAgent,\r\n 'Feature': featureName,\r\n 'FeatureArea': areaName,\r\n 'URL': window.location.href,\r\n 'AccountNumber': pageContext.CurrentAccount.AccountNumber,\r\n 'AccountName': pageContext.CurrentAccount.Name,\r\n 'AccountID': pageContext.CurrentAccount.Id,\r\n 'CustomerID': pageContext.CurrentCustomer.Id,\r\n 'CustomerName': pageContext.CurrentCustomer.Name,\r\n 'PageHTML': ''\r\n },\r\n smartvote_enabled: false,\r\n target: targetId,\r\n screenshot_enabled: false,\r\n strings: {\r\n contact_menu_label: i18n.getString('UserVoice_WidgetText_ContactMenuLabel'),\r\n contact_title: i18n.getString('UserVoice_WidgetText_ContactTitle'),\r\n contact_message_placeholder: i18n.getString('UserVoice_WidgetText_ContactMessagePlaceholder'),\r\n contact_skip_instant_answers_button: i18n.getString('UserVoice_WidgetText_ContactSkipInstantAnswersButton'),\r\n contact_details_title: i18n.getString('UserVoice_WidgetText_ContactDetailsTitle'),\r\n contact_submit_button: i18n.getString('UserVoice_WidgetText_ContactSubmitButton'),\r\n contact_success_title: i18n.getString('UserVoice_WidgetText_ContactSuccessTitle'),\r\n contact_success_body: i18n.getString('UserVoice_WidgetText_ContactSuccessBody'),\r\n email_address_label: i18n.getString('UserVoice_WidgetText_EmailAddressLabel'),\r\n email_address_placeholder: i18n.getString('UserVoice_WidgetText_EmailAddressPlaceholder')\r\n }\r\n }]);\r\n _userVoice.push(['addTrigger', triggerId, {\r\n mode: 'contact'\r\n }]);\r\n}\r\n;\r\nfunction addTriggerFunc(triggerId, featureName, areaName) {\r\n addTargetedTriggerFunc(triggerId, featureName, areaName, 'self');\r\n}\r\n;\r\nexport default {\r\n addTrigger: addTriggerFunc,\r\n addTargetedTrigger: addTargetedTriggerFunc\r\n};\r\n\r\n","import template from './template.pug';\r\n\r\nconst responsiveAdThumbnailWidth = 114;\r\nconst responsiveAdThumbnailHeight = 60;\r\nconst resizeQueryString = `&w=${responsiveAdThumbnailWidth}&h=${responsiveAdThumbnailHeight}`;\r\n\r\nconst responsiveAdPreviewTemplate = function ({\r\n itemViewModel, i18n, withContainer, isMMAV2Enabled,\r\n}) {\r\n const { isVideo } = itemViewModel;\r\n\r\n // if we find originalImageUrlToUse, then it means this image is from V2 and we will use original image URL for preview.\r\n let imageUrlToUse = isMMAV2Enabled && itemViewModel.OriginalImageMediaUrl ? itemViewModel.OriginalImageMediaUrl : itemViewModel.LandscapeImageMediaUrl;\r\n\r\n if (imageUrlToUse && !isVideo) {\r\n // strip off the resizing from MT as we need a smaller resizing\r\n const indexOfResizeInfo = imageUrlToUse.indexOf('&w=');\r\n if (indexOfResizeInfo > 0) {\r\n imageUrlToUse = imageUrlToUse.substr(0, indexOfResizeInfo);\r\n }\r\n\r\n itemViewModel.LandscapeImageMediaUrl = `${imageUrlToUse}${resizeQueryString}`; // eslint-disable-line\r\n }\r\n\r\n return template({ itemViewModel, i18n, withContainer });\r\n};\r\n\r\nexport { responsiveAdPreviewTemplate };\r\n","import template from './template.pug';\r\n\r\nfunction getCombinedPath(path1, path2) {\r\n if (!path1) {\r\n return '';\r\n }\r\n\r\n return path1 + (path2 ? `/${path2}` : '');\r\n}\r\n\r\nfunction getDisplayUrl(domain, path) {\r\n if (!domain) {\r\n return '';\r\n }\r\n\r\n if (!path) {\r\n return domain;\r\n }\r\n\r\n return `${domain}/${path}`;\r\n}\r\n\r\nfunction getDynamicSearchAdDisplayUrl(domain, path1, path2) {\r\n return getDisplayUrl(domain, getCombinedPath(path1, path2));\r\n}\r\n\r\nconst dynamicSearchAdPreviewTemplate = function ({ itemViewModel, i18n }) {\r\n const newVM = {\r\n convertedTitle: `{${i18n.getString('Ad_DSA_Title')}}`,\r\n convertedDisplayUrl: getDynamicSearchAdDisplayUrl(\r\n itemViewModel.DisplayUrl,\r\n itemViewModel.Path1,\r\n itemViewModel.Path2\r\n ),\r\n Text: itemViewModel.Text,\r\n };\r\n\r\n return template({ itemViewModel: newVM, i18n });\r\n};\r\n\r\nexport { dynamicSearchAdPreviewTemplate, getDynamicSearchAdDisplayUrl };\r\n","import _ from 'underscore';\r\nimport { DS } from 'js-data';\r\nimport Promise from 'bluebird';\r\nimport mockData from './dummy-data.json';\r\n\r\nconst store = new DS();\r\n\r\nclass CustomerAdapter {\r\n // All of the methods shown here must return a promise\r\n\r\n // \"definition\" is a resource defintion that would\r\n // be returned by DS#defineResource\r\n\r\n // \"options\" would be the options argument that\r\n // was passed into the DS method that is calling\r\n // the adapter method\r\n\r\n findAll(/* definition, params, options */) {\r\n const result = _.clone(mockData.value);\r\n\r\n result.raw = mockData;\r\n return Promise.resolve(result);\r\n }\r\n}\r\n\r\nstore.registerAdapter('Campaign', new CustomerAdapter(), { default: true });\r\n\r\nexport const campaign = store.defineResource({\r\n name: 'Campaign',\r\n idAttribute: 'Id',\r\n});\r\n","import { noop } from 'underscore';\r\nimport { campaign } from './dummy-js-data-resource';\r\nimport { mockSchema } from './schema';\r\n\r\nexport const dummyDataSource = {\r\n type: 'js-data',\r\n entity: campaign,\r\n primaryKey: 'Id',\r\n schema: mockSchema,\r\n options: {\r\n entitySet: {\r\n toJSON: noop,\r\n },\r\n },\r\n};\r\n","const PerformanceMetrics = {\r\n name: 'PerformanceMetrics',\r\n type: 'object',\r\n properties: {\r\n Impressions: {\r\n type: 'integer',\r\n nullable: true,\r\n },\r\n Clicks: {\r\n type: 'integer',\r\n nullable: true,\r\n },\r\n CTR: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n Conversions: {\r\n type: 'integer',\r\n nullable: true,\r\n },\r\n Spend: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n AverageCPC: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n AveragePosition: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n AverageCPM: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n CPA: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n WebsiteCoverage: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n AuctionWonPercent: {\r\n type: 'number',\r\n nullable: true,\r\n sovcolumn: true,\r\n isPercentValue: true,\r\n },\r\n AuctionLostToBudgetPercent: {\r\n type: 'number',\r\n nullable: true,\r\n sovcolumn: true,\r\n isPercentValue: true,\r\n },\r\n AuctionLostToRankPercent: {\r\n type: 'number',\r\n nullable: true,\r\n sovcolumn: true,\r\n isPercentValue: true,\r\n },\r\n AuctionLostToLandingPercent: {\r\n type: 'number',\r\n nullable: true,\r\n sovcolumn: true,\r\n isPercentValue: true,\r\n },\r\n AuctionLostToAdQualityPercent: {\r\n type: 'number',\r\n nullable: true,\r\n sovcolumn: true,\r\n isPercentValue: true,\r\n },\r\n AuctionLostToBidPercent: {\r\n type: 'number',\r\n nullable: true,\r\n sovcolumn: true,\r\n isPercentValue: true,\r\n },\r\n ClickSharePercent: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n RevenueOnAdSpend: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n AdvertiserReportedRevenue: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n ConversionRate: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n },\r\n};\r\n\r\nconst Labels = {\r\n type: 'array',\r\n items: {\r\n type: 'object',\r\n schema: {\r\n name: 'Label',\r\n type: 'object',\r\n key: 'Id',\r\n properties: {\r\n Id: {\r\n type: 'integer',\r\n key: true,\r\n nullable: true,\r\n },\r\n Name: {\r\n type: 'string',\r\n maxLength: 80,\r\n required: true,\r\n },\r\n Description: {\r\n type: 'string',\r\n maxLength: 200,\r\n },\r\n ColorCode: {\r\n type: 'integer',\r\n nullable: true,\r\n },\r\n AssociationCounts: {\r\n type: 'object',\r\n schema: {\r\n name: 'LabelAssociationCounts',\r\n type: 'object',\r\n properties: {\r\n CampaignCount: {\r\n type: 'integer',\r\n },\r\n AdGroupCount: {\r\n type: 'integer',\r\n },\r\n AdCount: {\r\n type: 'integer',\r\n },\r\n KeywordCount: {\r\n type: 'integer',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n isRelatedEntity: true,\r\n filterable: true,\r\n};\r\n\r\nexport const mockSchema = {\r\n name: 'Campaign',\r\n type: 'object',\r\n key: 'Id',\r\n required: ['Name'],\r\n properties: {\r\n Id: {\r\n filterable: true,\r\n skipLocalization: true,\r\n type: 'integer',\r\n key: true,\r\n },\r\n Name: {\r\n type: 'string',\r\n filterable: true,\r\n },\r\n Status: {\r\n type: 'string',\r\n enum: ['Active', 'Deleted', 'Suspended', 'UserPaused', 'BudgetPaused', 'BudgetUserPaused'],\r\n filterable: true,\r\n },\r\n Budget: {\r\n filterable: ['Amount'],\r\n schema: {\r\n key: 'Id',\r\n name: 'Budget',\r\n properties: {\r\n Id: {\r\n type: 'integer',\r\n key: true,\r\n nullable: true,\r\n },\r\n Name: {\r\n type: 'string',\r\n filterable: true,\r\n },\r\n Amount: {\r\n type: 'number',\r\n },\r\n },\r\n },\r\n },\r\n CampaignType: {\r\n chooseType: 'checkbox',\r\n type: 'string',\r\n enum: ['Default', 'Shopping', 'Audience'],\r\n filterable: true,\r\n },\r\n Languages: {\r\n type: 'array',\r\n items: {\r\n type: 'string',\r\n },\r\n },\r\n DeliveryStatus: {\r\n chooseType: 'checkbox',\r\n type: 'string',\r\n enum: ['CreditCardExpired', 'IOExceeded', 'PaymentInformationMissing', 'InvalidFinancialStatusOther', 'MigrationPaused', 'CampaignDeleted', 'CampaignSuspended', 'CampaignBudgetPaused', 'DomainLanguageNotSupported', 'ShoppingCampaignStoreNotFound', 'ShoppingCampaignNoOffersPresent', 'AdGroupExpired', 'AdGroupDraft', 'AdGroupDeleted', 'CamAssetRejected', 'CamAssetDeleted', 'AdGroupTargetingTooNarrow', 'EditorialRejected', 'EditorialUnderAppeal', 'UrlInvalid', 'ApplicationNotFound', 'ApplicationDestinationUrlMismatch', 'PendingMetadataSync', 'EditorialPending', 'AssociationDeleted', 'CampaignUserPaused', 'AdGroupPrivacyPending', 'AdGroupUserPaused', 'AdUserPaused', 'KeywordMatchTypeAdGroupMediumCombinationInvalid', 'KeywordUserPaused', 'NegativeKeywordConflicts', 'PartialNegativeKeywordConflicts', 'AutoBiddingLimitedByNotEnoughConversions', 'EditorialApprovedLimited', 'LowSupply', 'LowQuality', 'BidBelowFirstPageBid', 'Incomplete', 'BudgetSuggestions', 'InlineOpportunity', 'GeoCodingIncomplete', 'ProductTargetUserPaused', 'AdExtensionNotPresent', 'AdExtensionDeleted', 'AdExtensionAssociationDeleted', 'StoreIdNotAssociated', 'AdGroupAudienceAssociationPaused', 'AdGroupAudienceAssociationExcluded', 'AdNotPresent', 'AdNotActive', 'ApplicationDestinationUrlValidationIncomplete', 'AdGroupCriterionExcluded', 'AdGroupCriterionPaused', 'Eligible'],\r\n filterable: true,\r\n },\r\n PerformanceMetrics: {\r\n type: 'object',\r\n schema: PerformanceMetrics,\r\n filterable: ['Impressions', 'Clicks', 'CTR', 'Spend', 'Conversions',\r\n 'AverageCPC', 'AverageCPM', 'AveragePosition', 'CPA', 'RevenueOnAdSpend',\r\n 'ConversionRate', 'AdvertiserReportedRevenue'],\r\n alias: {\r\n Spend: {\r\n legacy: 'TotalEffectiveCost',\r\n },\r\n },\r\n },\r\n Labels,\r\n PhonePerformanceMetrics: {\r\n type: 'object',\r\n $schema: {},\r\n },\r\n QualityScore: {\r\n type: 'object',\r\n $schema: {},\r\n },\r\n UpdatedOnLastImport: {\r\n type: 'boolean',\r\n },\r\n HasAuctionInsight: {\r\n type: 'boolean',\r\n filterable: true,\r\n },\r\n TrackingUrlTemplate: {\r\n type: 'string',\r\n },\r\n UrlCustomParameters: {\r\n type: 'array',\r\n items: {\r\n type: 'object',\r\n $schema: {},\r\n },\r\n },\r\n BiddingScheme: {\r\n type: 'object',\r\n $schema: {},\r\n },\r\n NativeBidAdjustment: {\r\n type: 'integer',\r\n nullable: true,\r\n },\r\n DisplayBiddingStrategyType: {\r\n type: 'string',\r\n enum: ['InheritFromParent', 'ManualCpc', 'MaxClicks', 'MaxConversions', 'TargetCpa', 'EnhancedCpc'],\r\n },\r\n DisplayBiddingStrategyMaxCpc: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n DisplayBiddingStrategyTargetCpa: {\r\n type: 'number',\r\n nullable: true,\r\n },\r\n DsaTargets: {\r\n type: 'array',\r\n items: {\r\n type: 'object',\r\n $schema: {},\r\n },\r\n },\r\n DomainCategorys: {\r\n type: 'array',\r\n items: {\r\n type: 'object',\r\n $schema: {},\r\n },\r\n },\r\n NegativeAdGroupDsaTargets: {\r\n type: 'array',\r\n items: {\r\n type: 'object',\r\n $schema: {},\r\n },\r\n },\r\n Categories: {\r\n type: 'array',\r\n items: {\r\n type: 'object',\r\n $schema: {},\r\n },\r\n },\r\n DsaSearchTerms: {\r\n type: 'array',\r\n items: {\r\n type: 'object',\r\n $schema: {},\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport const mockLabelSchema = {\r\n name: 'Label',\r\n type: 'object',\r\n key: 'Id',\r\n properties: {\r\n Id: {\r\n type: 'integer',\r\n key: true,\r\n nullable: true,\r\n },\r\n Name: {\r\n type: 'string',\r\n maxLength: 80,\r\n required: true,\r\n },\r\n Description: {\r\n type: 'string',\r\n maxLength: 200,\r\n },\r\n ColorCode: {\r\n type: 'integer',\r\n nullable: true,\r\n },\r\n AssociationCounts: {\r\n type: 'object',\r\n $schema: {\r\n name: 'LabelAssociationCounts',\r\n type: 'object',\r\n properties: {\r\n CampaignCount: {\r\n type: 'integer',\r\n },\r\n AdGroupCount: {\r\n type: 'integer',\r\n },\r\n AdCount: {\r\n type: 'integer',\r\n },\r\n KeywordCount: {\r\n type: 'integer',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n};\r\n","import { dummyDataSource } from './demo/mock/dummy-data-source';\r\nimport {\r\n applyError,\r\n campaignBidLandscapeTrack,\r\n formatRes,\r\n getParams,\r\n validateSearchBid,\r\n} from './src/bid-landscape';\r\n\r\nexport function getCampaignsGridFactory() {\r\n return () => import(/* webpackMode: 'eager' */ './src/new-pkg/campaigns-grid-factory'); // eslint-disable-line no-unused-vars\r\n}\r\n\r\nexport {\r\n applyError,\r\n campaignBidLandscapeTrack,\r\n dummyDataSource,\r\n formatRes,\r\n getParams,\r\n validateSearchBid,\r\n};\r\n","import Backbone from 'backbone';\r\nimport template from './template.pug';\r\n\r\nexport class ProgressView extends Backbone.View {\r\n initialize({\r\n scope,\r\n i18n,\r\n }) {\r\n this.i18n = i18n;\r\n this.scope = scope;\r\n }\r\n get events() {\r\n return {\r\n 'click .closebtn': 'close',\r\n };\r\n }\r\n close() {\r\n this.trigger('close');\r\n }\r\n render() {\r\n const { i18n, scope } = this;\r\n this.$el.html(template({\r\n i18n,\r\n scope,\r\n }));\r\n return this;\r\n }\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport { CampaignBidLandscape } from '@bingads-webui/bid-landscape';\r\nimport { AlertHelper } from '@bingads-webui-campaign/alert-helper';\r\nimport { showPopup } from '@bingads-webui/automatic-positioning-popover';\r\nimport { Dialog } from '@bingads-webui/dialog';\r\nimport { ProgressView } from '@bingads-webui-campaign/campaigns-landscape-progress';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { generateGuid } from '@bingads-webui-universal/primitive-utilities';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport jsdataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport instrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport odata from '@bingads-webui-component-legacy/http/channel/odata';\r\nimport { schema as instruSchema } from '../instrumentation-schema';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaigns-tab/campaigns');\r\n\r\nlet dialog = {};\r\nlet dialogProgress = {};\r\nlet bulkEditChange = {};\r\n\r\nconst ACTION_TYPE = {\r\n CampaignWideBid: 'SetToAmount',\r\n BidScaling: 'ChangeByPercent',\r\n TROAS: 'TargetROAS',\r\n TCPA: 'TargetCPA',\r\n};\r\nconst currencyCode = appConfig.get('AccountCurrencyCode');\r\ninstrumentation.addScenario(instruSchema);\r\nconst senario = instrumentation.campaignLandscapeEditBid.create();\r\nconst activity = senario.campaignLandscapeEditBid.create();\r\nactivity.start();\r\n\r\nexport function campaignBidLandscapeTrack(options) {\r\n const {\r\n Id,\r\n scope,\r\n landscapeType,\r\n hash,\r\n callback,\r\n } = options;\r\n const { customerId: cid, accountId: aid } = scope;\r\n const url = `Customers(${cid})/Accounts(${aid})/Campaigns(${Id})/CampaignBidLandscape.Track`;\r\n return odata.post(\r\n url,\r\n {\r\n path: 'AdInsight/V2/',\r\n host: 'adinsight.odata.url',\r\n data: {\r\n Request: {\r\n Type: landscapeType,\r\n Hash: hash,\r\n },\r\n },\r\n }\r\n ).then(() => callback());\r\n}\r\n\r\nfunction showError(msg) {\r\n const alertHelper = new AlertHelper({ i18n });\r\n alertHelper.showError(msg);\r\n}\r\n\r\nexport function applyError(response) {\r\n let error;\r\n const unexpectedError = i18n.getString('ErrorNumber_-1');\r\n\r\n if (!response || !response.errors) {\r\n error = unexpectedError;\r\n } else {\r\n const errors = i18nErrors.getBulkApiErrors(response.errors, 'newadgroup')\r\n || i18nErrors.getBulkApiErrors(response.errors, 'newkeyword');\r\n\r\n if (!errors || !errors[0] || !errors[0].message) {\r\n error = unexpectedError;\r\n } else {\r\n error = errors[0].message;\r\n }\r\n }\r\n showError(error);\r\n}\r\n\r\nexport function validateSearchBid(newBidStr, campaignSelectMode) {\r\n const bidRange = appConfig.get('KeywordBidRange');\r\n let floorPrice = bidRange.FloorValue || 0.01;\r\n let ceilingPrice = bidRange.CeilingValue || 1000;\r\n\r\n if (campaignSelectMode === 'TCPA') {\r\n ceilingPrice *= 4;\r\n } else if (campaignSelectMode === 'TROAS') {\r\n floorPrice = 0.01;\r\n ceilingPrice = 1000;\r\n }\r\n\r\n let floorPriceStr = i18n.formatDecimalToFixed(campaignSelectMode === 'TROAS' ? floorPrice * 100 : floorPrice);\r\n let ceilingPriceStr = i18n.formatDecimalToFixed(campaignSelectMode === 'TROAS' ? ceilingPrice * 100 : ceilingPrice);\r\n if (campaignSelectMode === 'BidScaling') {\r\n ceilingPrice = 100000;\r\n floorPrice = -90;\r\n ceilingPriceStr = `${ceilingPrice}%`;\r\n floorPriceStr = `${floorPrice}%`;\r\n }\r\n\r\n if (newBidStr < floorPrice) {\r\n return i18n.getString('AdGroupSummary_SearchBidLessThanFloorPrice').replace('#0#', floorPriceStr);\r\n } else if (newBidStr > ceilingPrice) {\r\n return i18n.getString('AdGroupSummary_SearchBidMoreThanCeilingPrice').replace('#0#', ceilingPriceStr);\r\n }\r\n return '';\r\n}\r\n\r\nexport function getParams(options, entity) {\r\n const timeFormat = { raw: 'M/d/yyyy', timeZone: 'UTC' };\r\n const end = new Date();\r\n const start = new Date(Date.now() - (30 * 24 * 60 * 60 * 1000));\r\n const startDate = i18n.formatDate(start, timeFormat);\r\n const endDate = i18n.formatDate(end, timeFormat);\r\n const QueryString = options.actionType === 'ChangeByPercent' && entity === 'Keyword' ?\r\n `startdate=${startDate}&enddate=${endDate}&$filter=Bid/AmountSource eq Enum.BidAmountSource'UseFromOrderItem'`\r\n : `startdate=${startDate}&enddate=${endDate}`;\r\n const Property = entity === 'AdGroup' ? 'SearchBid' : 'Bid/Amount';\r\n const Value = entity === 'Keyword' && options.actionType === 'SetToAmount' ? null : options.newValue;\r\n const params = {\r\n Entity: entity,\r\n BatchAction: {\r\n Actions: [{\r\n '@odata.type': '#Model.NumericAction',\r\n Property,\r\n ActionType: options.actionType,\r\n Value,\r\n Limit: null,\r\n },\r\n ],\r\n },\r\n Selection: {\r\n QueryString,\r\n CampaignId: options.Id,\r\n AdGroupId: null,\r\n },\r\n Description: null,\r\n PreviewCompositeIds: [],\r\n };\r\n return params;\r\n}\r\n\r\nfunction bulkEdit(options) {\r\n const paramsAdGroup = getParams(options.params, 'AdGroup');\r\n const paramsKeyword = getParams(options.params, 'Keyword');\r\n bulkEditChange(_.defaults(\r\n {\r\n params: paramsAdGroup,\r\n completeCB: (res) => {\r\n options.progressCB(res);\r\n bulkEditChange(_.defaults(\r\n { params: paramsKeyword },\r\n _.pick(options, 'completeCB', 'progressCB', 'failedCB')\r\n ));\r\n },\r\n },\r\n _.pick(options, 'progressCB', 'failedCB')\r\n ));\r\n}\r\n\r\n// Going\r\nfunction defaultApply(campaign, campaignBidLandscapeView, scope, grid, noWidBidData, trackingId) {\r\n const {\r\n Id,\r\n } = campaign;\r\n const newValue = campaignBidLandscapeView.valueToApply();\r\n const landscapeType = campaignBidLandscapeView.campaignSelectMode();\r\n const hash = campaignBidLandscapeView.hash();\r\n const actionType = ACTION_TYPE[landscapeType];\r\n const additionalBuget = campaignBidLandscapeView.keepCurrentBudget() ?\r\n null : campaignBidLandscapeView.additionalBuget();\r\n const currentBudget = campaign.Budget.Amount;\r\n const startDate = campaignBidLandscapeView.viewModel.startDateString();\r\n const endDate = campaignBidLandscapeView.viewModel.endDateString();\r\n const isCustomBid = campaignBidLandscapeView.viewModel.currentSelectedId()\r\n === campaignBidLandscapeView.viewModel.landscapePointsLength();\r\n const selectedData = isCustomBid ? {} : campaignBidLandscapeView.viewModel.dataArray()[campaignBidLandscapeView.viewModel.currentSelectedId()];\r\n const curValue = landscapeType === 'TCPA' || landscapeType === 'TROAS' ? campaign.BiddingScheme[campaign.BiddingScheme.Type] : null;\r\n let campaignData = campaign;\r\n\r\n dialog.remove();\r\n if (landscapeType === 'TCPA' || landscapeType === 'TROAS') {\r\n const toUpdated = {\r\n BiddingScheme: { ...campaign.BiddingScheme },\r\n };\r\n toUpdated.BiddingScheme[toUpdated.BiddingScheme.Type] = newValue;\r\n jsdataCampaign.Campaign\r\n .update(campaign.Id, toUpdated, { adapter: 'bulk', cacheResponse: false })\r\n .finally(withUiBlock(grid.gridView.$el))\r\n .then(() => {\r\n grid.gridView.refresh(true);\r\n })\r\n .catch(response => applyError(response));\r\n } else {\r\n const progressView = new ProgressView({\r\n scope,\r\n i18n,\r\n });\r\n dialogProgress = new Dialog({\r\n backdrop: true,\r\n keyboard: true,\r\n showCloseButton: false,\r\n }).setContent(progressView);\r\n $(document.body).append(dialogProgress.el);\r\n dialogProgress.show();\r\n progressView.on('close', () => dialogProgress.remove());\r\n\r\n bulkEdit({\r\n params: {\r\n newValue,\r\n actionType,\r\n Id,\r\n },\r\n completeCB: () => {\r\n setTimeout(() => dialogProgress.remove(), 500);\r\n },\r\n failedCB: (res) => {\r\n applyError(res);\r\n dialogProgress.remove();\r\n },\r\n progressCB: () => { },\r\n });\r\n }\r\n\r\n campaignBidLandscapeTrack({\r\n Id,\r\n scope,\r\n landscapeType,\r\n hash,\r\n callback: () => {\r\n campaignData = _.defaults({ IsBidLandscapeAvailable: !noWidBidData }, campaignData);\r\n grid.gridView.trigger('didEdit', campaignData);\r\n },\r\n });\r\n if (additionalBuget) {\r\n if (campaign.Budget.Id) {\r\n const updated = _.defaults({\r\n Amount: additionalBuget,\r\n });\r\n jsdataCampaign.Budget.update(campaign.Budget.Id, updated, { adapter: 'bulk', cacheResponse: false })\r\n .then(() => {\r\n campaignData = _.defaults({ Budget: _.defaults(updated, campaign.Budget) }, campaignData);\r\n grid.gridView.trigger('didEdit', campaignData);\r\n })\r\n .catch((response) => {\r\n applyError(response, 'bulk');\r\n });\r\n } else {\r\n const updated = _.defaults({\r\n Budget: { Amount: additionalBuget },\r\n }, _.pick(campaign, 'Id'));\r\n jsdataCampaign.Campaign.update(campaign.Id, updated, { adapter: 'bulk', cacheResponse: false })\r\n .then(() => {\r\n campaignData = _.defaults(\r\n {\r\n Budget: _.defaults(updated.Budget, campaign.Budget),\r\n },\r\n campaignData\r\n );\r\n grid.gridView.trigger('didEdit', campaignData);\r\n })\r\n .catch((response) => {\r\n applyError(response, 'bulk');\r\n });\r\n }\r\n }\r\n activity.trace(`Apply Campaign bid landscape success for ${campaign.Id}: ${newValue}. Currency:${currencyCode}. LandscapeType: ${landscapeType}. IncreaseBudget: ${additionalBuget}. CurrentBudget: ${currentBudget}. DataDate: ${startDate}~${endDate}. TrackingId: ${trackingId}. IsCustomBid: ${isCustomBid}. CurValue: ${curValue}. EstImp: ${selectedData.impressions}. EstTopImp: ${selectedData.mlImpressions}. EstClick: ${selectedData.clicks}. EstSpend: ${selectedData.cost}. EstConv: ${selectedData.conversion}. EstConvValue: ${selectedData.conversionValue}. AdditionalBudgetNeeded: ${selectedData.additionalBugetNeeds}.`, 'campaignLandscapeEditBid');\r\n}\r\n\r\nexport function formatRes(data, Id) {\r\n const res = { Id, Nodata: true };\r\n data.value.forEach((val) => {\r\n if (val.BidLandscapePoints && val.BidLandscapePoints.length > 0) {\r\n res[val.CampaignBidLandscapeType] = val;\r\n res.Nodata = false;\r\n }\r\n });\r\n return res;\r\n}\r\n\r\nfunction onCallReturnedForBidLandscape({\r\n campaign, response, event, scope, container, isForVNext, grid, perfMarker,\r\n}) {\r\n const dataToShow = formatRes(response, campaign.Id);\r\n const noWidBidData = _.isUndefined(dataToShow.CampaignWideBid);\r\n const trackingId = generateGuid();\r\n const currentTargetValue = campaign.BiddingScheme[campaign.BiddingScheme.Type];\r\n const campaignBidLandscapeView = new CampaignBidLandscape({\r\n parentItem: {\r\n Id: campaign.Id,\r\n CurrentValue: campaign.Budget.Amount.toString(),\r\n CurrentTargetValue: currentTargetValue,\r\n EntityName: campaign.Name,\r\n CurrencyCode: currencyCode,\r\n },\r\n i18n,\r\n dataToShow,\r\n isForVNext,\r\n });\r\n\r\n campaignBidLandscapeView.on('cancel', () => {\r\n dialog.remove();\r\n });\r\n\r\n campaignBidLandscapeView.on('apply', () => {\r\n defaultApply(campaign, campaignBidLandscapeView, scope, grid, noWidBidData, trackingId);\r\n });\r\n\r\n campaignBidLandscapeView.on('update', ({ valueToApply }) => {\r\n const campaignSelectMode = campaignBidLandscapeView.campaignSelectMode();\r\n campaignBidLandscapeView.markInputValueInvalid(validateSearchBid(\r\n valueToApply,\r\n campaignSelectMode\r\n ));\r\n });\r\n\r\n campaignBidLandscapeView.once('selectModeChange rendered', () => {\r\n const showActivity = senario.FetchedCampaignBidLandscape.create();\r\n showActivity.start();\r\n const ariaData = {\r\n Id: campaign.Id,\r\n ActionName: 'ViewCampaignBidLandscape',\r\n UIData: {\r\n selectMode: campaignBidLandscapeView.campaignSelectMode(),\r\n bidList: campaignBidLandscapeView.viewModel.dataArray(),\r\n currencyCode,\r\n currentBudget: campaign.Budget.Amount,\r\n startDate: campaignBidLandscapeView.viewModel.startDateString(),\r\n endDate: campaignBidLandscapeView.viewModel.endDateString(),\r\n trackingId,\r\n },\r\n };\r\n showActivity.trace(ariaData, 'ViewCampaignBidLandscape');\r\n });\r\n\r\n campaignBidLandscapeView.render();\r\n if (campaignBidLandscapeView.hasData()) {\r\n dialog = new Dialog({\r\n backdrop: true,\r\n keyboard: true,\r\n showCloseButton: false,\r\n }).setContent(campaignBidLandscapeView).setState({\r\n }).render();\r\n $(dialog.el).addClass('fix-dialog-position');\r\n $(document.body).append(dialog.el);\r\n dialog.show();\r\n } else {\r\n showPopup({\r\n positioningMethod: 'fit',\r\n positioningOptions: {\r\n anchorPosition: {\r\n top: event.clientY,\r\n left: event.clientX,\r\n width: $(event.target).width(),\r\n height: $(event.target).height(),\r\n },\r\n },\r\n contentView: campaignBidLandscapeView,\r\n i18n,\r\n classes: ['bidlandscape-container'],\r\n container,\r\n anchor: $(event.target),\r\n });\r\n }\r\n\r\n if (perfMarker) {\r\n perfMarker.done();\r\n }\r\n}\r\n\r\nexport function openCampaignBidLandscape({\r\n event, scope, campaign, grid, container, isForVNext, bulkChange, perfMarker,\r\n}) {\r\n activity.trace(`Fetch Campaign bid landscape success for ${campaign.Id}`, 'campaignLandscapeEditBid');\r\n const uiBlocker = withUiBlock(grid.gridView.$el.parent());\r\n const { customerId: cid, accountId: aid } = scope;\r\n bulkEditChange = bulkChange;\r\n\r\n if (perfMarker) {\r\n perfMarker.willFetchData();\r\n }\r\n\r\n const url = `Customers(${cid})/Accounts(${aid})/Campaigns(${campaign.Id})/CampaignBidLandscape.GetDetails`;\r\n\r\n return odata.get(url, {\r\n path: 'AdInsight/V2/',\r\n host: 'adinsight.odata.url',\r\n })\r\n .then((response) => {\r\n if (perfMarker) {\r\n perfMarker.willRender();\r\n }\r\n\r\n onCallReturnedForBidLandscape({\r\n grid, campaign, response, event, scope, container, isForVNext, perfMarker,\r\n });\r\n uiBlocker();\r\n });\r\n}\r\n","export const schema = {\r\n scenario: [\r\n {\r\n name: 'campaignLandscapeEditBid',\r\n value: 'campaignLandscapeEditBid',\r\n setting: {},\r\n activity: [\r\n {\r\n name: 'campaignLandscapeEditBid',\r\n value: 'campaignLandscapeEditBid',\r\n },\r\n {\r\n name: 'FetchedCampaignBidLandscape',\r\n value: 'FetchedCampaignBidLandscape',\r\n },\r\n ],\r\n },\r\n ],\r\n};\r\n","import $ from 'jquery';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { insertPopoverContainer } from '@bingads-webui-campaign/fluctuation-common';\r\nimport { GridTooltip } from '@bingads-webui-campaign/grid-tooltip';\r\n\r\nexport const mccPerfFluxPopupContainerId = 'mcc-perf-fluctuation-placeholder';\r\n\r\nexport const dismissFlucCallout = () => {\r\n const calloutElement = document.getElementById(mccPerfFluxPopupContainerId);\r\n if (calloutElement) {\r\n ReactDOM.unmountComponentAtNode(calloutElement);\r\n }\r\n};\r\n\r\nexport const renderFluctuationInsightsTooltip = ({\r\n i18n, event, view,\r\n}) => {\r\n insertPopoverContainer(mccPerfFluxPopupContainerId);\r\n const tooltipProps = {\r\n parentView: view,\r\n popoverId: 'fluctuation-tooltip-id',\r\n target: event.currentTarget,\r\n show: true,\r\n onClose: dismissFlucCallout,\r\n onMouseLeave: dismissFlucCallout,\r\n closeButton: false,\r\n placement: 'top',\r\n content: ({i18n.getString('Fluctuation_Insights_Icon_Tooltip')}),\r\n };\r\n\r\n ReactDOM.render(\r\n ,\r\n document.getElementById(mccPerfFluxPopupContainerId)\r\n );\r\n};\r\n\r\nexport const hideFluctuationInsightsTooltip = ({ event, view }) => {\r\n if ($(event.relatedTarget).closest('#fluctuation-tooltip-id').length === 0) {\r\n view.trigger('closePopup');\r\n }\r\n};\r\n","import classnames from 'classnames';\r\nimport $ from 'jquery';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { insertPopoverContainer } from '@bingads-webui-campaign/fluctuation-common';\r\nimport { mergeStyleSets } from '@fluentui/react';\r\nimport { GridTooltip } from '@bingads-webui-campaign/grid-tooltip';\r\n\r\nexport const budgetCenterHelpContainerId = 'budget-center-help-tooltip';\r\n\r\nexport const dismissBudgetCenterHelpCallout = () => {\r\n const calloutElement = document.getElementById(budgetCenterHelpContainerId);\r\n if (calloutElement) {\r\n ReactDOM.unmountComponentAtNode(calloutElement);\r\n }\r\n};\r\n\r\nexport const renderBudgetCenterHelpTooltip = ({\r\n i18n, event, view, monthString, monthlyBudgetAmount, actionLink,\r\n}) => {\r\n const styles = mergeStyleSets({\r\n content: {\r\n marginBottom: '8px',\r\n },\r\n });\r\n const { right } = event.target.getBoundingClientRect();\r\n const calloutMaxWidth = 325; // this value is defined in global style\r\n const placement = right + calloutMaxWidth > window.innerWidth ? 'left' : 'right';\r\n\r\n insertPopoverContainer(budgetCenterHelpContainerId);\r\n const tooltipProps = {\r\n parentView: view,\r\n popoverId: 'budget-center-help-tooltip-id',\r\n target: event.currentTarget,\r\n show: true,\r\n onClose: dismissBudgetCenterHelpCallout,\r\n onMouseLeave: dismissBudgetCenterHelpCallout,\r\n closeButton: false,\r\n placement,\r\n focusLockContent: true,\r\n content: (\r\n <>\r\n
\r\n {i18n.getString('Campaign_BudgetCenter_BudgetChange', { monthString, budgetAmount: monthlyBudgetAmount })}\r\n
\r\n {i18n.getString('Campaign_BudgetCenter_ViewLink')}\r\n \r\n ),\r\n };\r\n\r\n ReactDOM.render(\r\n ,\r\n document.getElementById(budgetCenterHelpContainerId)\r\n );\r\n};\r\n\r\nexport const hideBudgetCenterHelpTooltip = ({ event, view }) => {\r\n if ($(event.relatedTarget).closest('#budget-center-help-tooltip-id').length === 0) {\r\n view.trigger('closePopup');\r\n }\r\n};\r\n","/* eslint-disable jsx-a11y/anchor-is-valid */\r\nimport classnames from 'classnames';\r\nimport $ from 'jquery';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { insertPopoverContainer } from '@bingads-webui-campaign/fluctuation-common';\r\nimport { mergeStyleSets, DefaultButton, Text, Link } from '@fluentui/react';\r\nimport { CopilotToggleCustomEvent, LiveAgentQueue } from '@bingads-webui-react/msa-copilot-common';\r\nimport { GridTooltip } from '@bingads-webui-campaign/grid-tooltip';\r\n\r\n// TODO: replace this with util function from copilot-live-agent once build issue is resolved\r\n// Bug 9089477: [Copilot][CTA] Cloudbuild warning when importing copilot-live-agent\r\nconst isEnglishOnlyChatSupportedLocale = (locale) => {\r\n if (!locale) return false;\r\n\r\n const ENGLISH_ONLY_SUPPORTED_LOCALES = [\r\n 'bg-bg',\r\n 'cs-cz',\r\n 'el-gr',\r\n 'fi-fi',\r\n 'fil-ph',\r\n 'hi-in',\r\n 'hr-hr',\r\n 'hu-hu',\r\n 'ko-kr',\r\n 'lt-lt',\r\n 'ms-my',\r\n 'nb-no',\r\n 'pl-pl',\r\n 'ro-ro',\r\n 'ru-ru',\r\n 'th-th',\r\n 'tr-tr',\r\n 'uk-ua',\r\n 'zh-cn',\r\n 'zh-hk',\r\n 'zh-tw',\r\n ];\r\n\r\n const lowerLocale = locale.toLocaleLowerCase();\r\n return ENGLISH_ONLY_SUPPORTED_LOCALES.includes(lowerLocale);\r\n};\r\n\r\nexport const conversionDeliveryStatusContainerId = 'conversion-delivery-status-tooltip';\r\n\r\nexport const dismissConversionStatusCallout = () => {\r\n const calloutElement = document.getElementById(conversionDeliveryStatusContainerId);\r\n if (calloutElement) {\r\n ReactDOM.unmountComponentAtNode(calloutElement);\r\n }\r\n};\r\n\r\nexport const renderConversionDeliveryStatusTooltip = ({\r\n i18n, event, item, view, activity, isConnectWithExpertEnabled,\r\n}) => {\r\n const styles = mergeStyleSets({\r\n content: {\r\n marginBottom: '10px',\r\n marginTop: '10px',\r\n rowGap: '10px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n },\r\n ctaButton: {\r\n marginTop: '10px',\r\n },\r\n ctaFooter: {\r\n display: 'block',\r\n marginTop: '16px',\r\n paddingTop: '4px',\r\n marginBottom: '-16px',\r\n borderTop: '1px solid #E9E9E9',\r\n color: '#838383',\r\n },\r\n });\r\n const { right } = event.target.getBoundingClientRect();\r\n const calloutMaxWidth = 325; // this value is defined in global style\r\n const placement = right + calloutMaxWidth > window.innerWidth ? 'left' : 'right';\r\n\r\n const noEligibleGoalText = {\r\n title: _TL_('Missing primary conversion goal'),\r\n description: _TL_('This campaign does not have a main conversion goal configured, which may result in missing conversion tracking. Please review your campaign settings to assign a main goal.'),\r\n learnMoreHref: 'https://help.ads.microsoft.com/#apex/ads/en/56689/2-500',\r\n learnMoreText: _TL_('Learn more about conversion goals.'),\r\n };\r\n\r\n const tagUnverifiedText = {\r\n title: _TL_('Unverified UET tag'),\r\n description: _TL_('One or more of your main conversion goals have an unverified tag, which resulted in receiving no events. This could lead to missing conversion data. Please ensure the UET tag is properly implemented.'),\r\n learnMoreHref: 'https://help.ads-int.microsoft.com/#apex/ads/en/56692/1/en-US/#ext:vnext_offlineconversions',\r\n learnMoreText: _TL_('Learn more about UET tracking.'),\r\n };\r\n\r\n const tagInactiveText = {\r\n title: _TL_('Inactive UET tag'),\r\n description: _TL_('The UET tag for this campaign\\'s main goal hasn\\'t recorded any events in the last 24 hours, which may result in incomplete conversion tracking. Please check your tag configuration to ensure it is tracking correctly.'),\r\n learnMoreHref: 'https://help.ads-int.microsoft.com/#apex/ads/en/56692/1/en-US/#ext:vnext_offlineconversions',\r\n learnMoreText: _TL_('Learn more about UET tracking.'),\r\n };\r\n\r\n const noRecentOfflineText = {\r\n title: _TL_('No offline conversions uploaded in last 7 days'),\r\n description: _TL_('Go to your offline goals to upload conversions that may be associated to this campaign.'),\r\n learnMoreHref: 'https://help.ads.microsoft.com/#apex/ads/en/56852/2',\r\n learnMoreText: _TL_('Learn more'),\r\n };\r\n\r\n const consentModeWarning = {\r\n title: _TL_('Action required: Ensure proper implementation of consent signals'),\r\n description: _TL_('To avoid any negative impact on conversion attribution and remarketing segments for users visiting your websites from the European Economic Area (EEA), the United Kingdom, and Switzerland, implement Consent Mode or the Transparency and Consent Framework (TCF) with your UET tags.'),\r\n learnMoreHref: 'https://help.ads.microsoft.com/apex/index/3/en/60119',\r\n learnMoreText: _TL_('Learn more'),\r\n };\r\n\r\n const textStrings = {\r\n NoEligibleGoal: noEligibleGoalText,\r\n TagUnverified: tagUnverifiedText,\r\n TagInactive: tagInactiveText,\r\n NoRecentOfflineConversion: noRecentOfflineText,\r\n ConsentModeWarning: consentModeWarning,\r\n };\r\n\r\n const goalStatus = item && item.GoalStatusDetails && item.GoalStatusDetails.length > 0 && item.GoalStatusDetails[0].GoalDeliveryStatus;\r\n\r\n const Id = item && item.Id;\r\n\r\n const text = textStrings[goalStatus];\r\n\r\n insertPopoverContainer(conversionDeliveryStatusContainerId);\r\n const tooltipProps = {\r\n parentView: view,\r\n popoverId: 'conversion-delivery-status-tooltip-id',\r\n target: event.currentTarget,\r\n show: true,\r\n onClose: dismissConversionStatusCallout,\r\n onMouseLeave: dismissConversionStatusCallout,\r\n closeButton: false,\r\n placement,\r\n focusLockContent: true,\r\n content: (\r\n <>\r\n
\r\n \r\n {i18n.getString(text.title)}\r\n \r\n \r\n {i18n.getString(text.description)}\r\n  \r\n {!isConnectWithExpertEnabled ? (\r\n {\r\n if (activity) {\r\n activity.trace(`[ConversionDeliveryStatusPopup] - LearnMore Link clicked - campaignId: ${Id}`);\r\n }\r\n window.open(text.learnMoreHref, '_blank');\r\n }}\r\n aria-label={i18n.getString(text.learnMoreText)}\r\n >\r\n {i18n.getString(text.learnMoreText)}\r\n \r\n ) : (\r\n <>\r\n
\r\n {\r\n if (activity) {\r\n activity.trace(`[ConversionDeliveryStatusPopup] - LearnMore Button clicked - campaignId: ${Id}`);\r\n }\r\n window.open(text.learnMoreHref, '_blank');\r\n }}\r\n >\r\n {i18n.getString(_TL_('Learn more'))}\r\n \r\n
\r\n
\r\n {\r\n if (activity) {\r\n activity.trace(`[ConversionDeliveryStatusPopup] - Connect with expert Button clicked - campaignId: ${Id}`);\r\n }\r\n const customEvent = new CopilotToggleCustomEvent({\r\n detail: {\r\n eventType: 'action',\r\n eventSource: 'conversionDeliveryStatusPopup',\r\n eventData: {\r\n ActionId: 'liveAgentSupport',\r\n liveAgentParameters: {\r\n queue: LiveAgentQueue.ShoppingAndUET,\r\n problemDescription: i18n.getString(\r\n _TL_('Campaign Id: {{campaignId}}, Campaign Name: {{campaignName}}, UET Status: {{uetStatus}}'),\r\n {\r\n campaignId: item.Id,\r\n campaignName: item.Name,\r\n uetStatus: i18n.getString(text.title),\r\n }\r\n ),\r\n },\r\n },\r\n },\r\n });\r\n document.dispatchEvent(customEvent);\r\n dismissConversionStatusCallout();\r\n }}\r\n >\r\n {i18n.getString(_TL_('Connect with an expert'))}\r\n \r\n {isEnglishOnlyChatSupportedLocale(i18n.getLocale()) && (\r\n \r\n {i18n.getString(_TL_('Support chat is in English only'))}\r\n \r\n )}\r\n
\r\n \r\n )}\r\n
\r\n
\r\n \r\n ),\r\n };\r\n\r\n ReactDOM.render(\r\n ,\r\n document.getElementById(conversionDeliveryStatusContainerId)\r\n );\r\n};\r\n\r\nexport const hideConversionDeliveryStatusTooltip = ({ event, view }) => {\r\n if ($(event.relatedTarget).closest('#conversion-delivery-status-tooltip').length === 0) {\r\n view.trigger('closePopup');\r\n }\r\n};\r\n","import { keyCode } from '@bingads-webui/keycode';\r\n\r\nfunction replaceAtom(atom, oldKey, newKey) {\r\n if (oldKey in atom) {\r\n const newAtom = {\r\n ...atom,\r\n [newKey]: atom[oldKey],\r\n };\r\n delete newAtom[oldKey];\r\n\r\n return newAtom;\r\n }\r\n return atom;\r\n}\r\n\r\nexport function replaceKeyOfFilterEntity(filterEntity, oldKey, newKey) {\r\n let finalQuery = { ...filterEntity.query };\r\n if (oldKey in finalQuery) {\r\n finalQuery = replaceAtom(finalQuery, oldKey, newKey);\r\n } else if ('$and' in finalQuery) {\r\n finalQuery.$and.forEach((value, index, array) => {\r\n // eslint-disable-next-line no-param-reassign\r\n array[index] = replaceAtom(value, oldKey, newKey);\r\n });\r\n }\r\n // eslint-disable-next-line no-param-reassign\r\n filterEntity.query = finalQuery;\r\n return filterEntity;\r\n}\r\n\r\nexport const filterEnterKeyDown = eventHandler => (event, ...args) => {\r\n if (event.keyCode === keyCode.Enter) {\r\n eventHandler(event, ...args);\r\n }\r\n};\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Backbone from 'backbone';\r\nimport URI from 'urijs';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport { merge } from '@bingads-webui-universal/primitive-utilities';\r\nimport { DeterministicWrapperView } from '@bingads-webui/deterministic-wrapper-view';\r\nimport { showLabelsPopup, filterOnLabelClick, navigateToManagePage } from '@bingads-webui-campaign/labels';\r\nimport { validateOrder, updateGridQuery, appendScopeParameter, getTargetEntity, handleShowRejectionReasonEnter, handleShowRejectionReasonLeave } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { showQualityScoreDetail, BudgetSplitView } from '@bingads-webui-campaign/campaignui-common-columns';\r\nimport { getEditorialReasonsTemplate } from '@bingads-webui-campaign/rsa-ad-customizer-attribute-column';\r\nimport { getRequestPermission } from '@bingads-webui-campaign/linkedin-delivery-status-column';\r\nimport { GridCustomizedPopupEditor, getEditorPositionAsideAnchor } from '@bingads-webui-campaign/grid-customized-popup-editor';\r\nimport { pgridFactory } from '@bingads-webui-campaign/pgrid-factory';\r\nimport { PageReady } from '@bingads-webui/page-ready';\r\nimport { insertPopoverContainer } from '@bingads-webui-campaign/fluctuation-common';\r\nimport { TopPanelCashbackSettings } from '@bingads-webui-campaign/top-panel-cashback-settings';\r\nimport { handleSortChange } from '@bingads-webui-campaign-legacy/bingadsgrid/service/state-manager-helper';\r\nimport { CampaignDeliveryStatusPopupFactory } from '@bingads-webui-campaign-legacy/campaigns-tab-campaigns/grid/delivery-status/delivery-status-popup-factory';\r\nimport { bulkEditChange } from '@bingads-webui-campaign-legacy/bulk-edit/service/bulk-edit';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport CopyPaste from '@bingads-webui-static-legacy/bulk-edit/view/copyPaste';\r\nimport Hotkeys from '@bingads-webui-component-legacy/hotkeys/index';\r\nimport jsdataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport pageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { notificationApi } from '@bingads-webui-react/notification-center';\r\nimport * as SharedBudgetModel from '@bingads-webui-campaign-legacy/shared-budget/model/shared-budget';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport { fromLegacyTimeZone, toIANATimeZone } from '@bingads-webui-universal/time-zone-converter';\r\nimport ReactDOM from 'react-dom';\r\nimport React from 'react';\r\nimport { mergeStyleSets, DirectionalHint, Callout, Text } from '@fluentui/react';\r\nimport * as AppealAggregator from '@bingads-webui-campaign-legacy/editorial-appeal/aggregator';\r\nimport SharedRepository from '@bingads-webui-campaign-legacy/adextension-shared/service/repository';\r\nimport { DisclaimerAdExtension } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport BingAdsWebUIComponentLegacyRouterIndex from '@bingads-webui-component-legacy/legacy-router/index';\r\nimport { keyVault } from '@bingads-webui-react/popup-manager';\r\nimport { PerformanceInsightsToolTipCard } from '@bingads-webui-campaign-react/performance-insights';\r\nimport { openCampaignBidLandscape } from '../bid-landscape/index';\r\nimport { renderFluctuationInsightsTooltip, mccPerfFluxPopupContainerId, hideFluctuationInsightsTooltip, dismissFlucCallout } from './tooltips/fluctuation-tooltip';\r\nimport { hideBudgetCenterHelpTooltip, renderBudgetCenterHelpTooltip } from './tooltips/budget-center-help-tooltip';\r\nimport { renderConversionDeliveryStatusTooltip } from './tooltips/conversion-status-popup';\r\nimport { filterEnterKeyDown } from '../filter-entity-util';\r\nimport { getReasonTemplates } from './show-rejection-reasons';\r\n\r\nconst { legacyRouter } = BingAdsWebUIComponentLegacyRouterIndex;\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaigns-tab/campaigns');\r\nconst commonI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/ads-tab/common');\r\nconst legacyGlobalI18n = window.globalLegacyI18n.get('$/i18n!legacy/global');\r\nconst locationTargeti18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/location-targets');\r\n\r\nconst permissions = appConfig.get('Permissions');\r\nconst {\r\n IsExperimentsOpenBetaEnabled,\r\n IsCampaignAdGroupCopyPasteEnabled,\r\n IsSmartShoppingCampaignEnabled,\r\n IsAccountLabelsEnabled,\r\n IsDeferredHoveringPopupEnabled,\r\n} = permissions;\r\nconst budgetLimit = ['CampaignBudgetPaused', 'BudgetSuggestions'];\r\nconst autobiddingLimitedStatus = ['AutoBiddingLimitedInventoryLimit', 'AutoBiddingLimitedMaxCPCRestriction', 'AutoBiddingLimitedBudgetRestriction', 'AutoBiddingLimitedUnAttainableTarget', 'AutoBiddingPortfolioBidStrategyTrainingStatus'];\r\nconst linkedInPermissionRequired = ['LinkedInCompanyPagePaidMediaRequired'];\r\nconst customTemplateDeliveryStatus = [...budgetLimit, ...autobiddingLimitedStatus, ...linkedInPermissionRequired];\r\nconst disclaimerEditorialStatus = ['DisclaimerInfoRejected', 'DisclaimerInfoApprovedLimited', 'DisclaimerInfoRejectedAppealRejected', 'DisclaimerInfoApprovedLimitedAppealRejected'];\r\nconst popupContentKey = _.uniqueId(`${keyVault.hoveringPopup}-`);\r\n\r\nexport class CampaignsGrid extends DeterministicWrapperView {\r\n // performance targets details page also use campaign grid\r\n // verify functionalility to avoid regression after modification\r\n viewFactory({\r\n router,\r\n scope,\r\n filterService,\r\n preferenceConfig,\r\n gridConfig,\r\n serverContext,\r\n instrumentation,\r\n isForVNext = false,\r\n getPlugins,\r\n getGridConfig,\r\n enableCopyPaste = true,\r\n pageName,\r\n preexecuteFlag = false,\r\n theme,\r\n azureUrlRewrite,\r\n perfMarker,\r\n preferenceService,\r\n newI18n,\r\n }) {\r\n this.gridRemoved = false;\r\n this.filterService = filterService;\r\n this.router = router;\r\n this.scope = scope;\r\n this.isForVNext = isForVNext;\r\n this.enableCopyPaste = enableCopyPaste;\r\n this.serverContext = serverContext;\r\n this.instrumentation = instrumentation;\r\n this.pageName = pageName;\r\n this.preexecuteFlag = preexecuteFlag;\r\n this.theme = theme;\r\n this.azureUrlRewrite = azureUrlRewrite;\r\n this.perfMarker = perfMarker;\r\n this.preferenceService = preferenceService;\r\n this.newI18n = newI18n;\r\n\r\n const internalConfig = getGridConfig(this);\r\n\r\n let config = merge(internalConfig, gridConfig);\r\n this.gridName = config.name;\r\n\r\n // check if the order by column is supported as sortable\r\n validateOrder(preferenceConfig, config.columns, this.gridName, permissions);\r\n\r\n config = merge(config, preferenceConfig);\r\n\r\n this.grid = pgridFactory({\r\n gridConfig: config,\r\n plugins: getPlugins(this),\r\n preferenceConfig,\r\n });\r\n\r\n this.disclaimerRepos = new SharedRepository({\r\n schema: DisclaimerAdExtension,\r\n afterChangeComitted: _.noop,\r\n });\r\n this.appealAggregator = null;\r\n\r\n this.rejectionPopupContainerSelector = '#rejectionContainer';\r\n this.popoverId = 'delivery-status-popup-callout';\r\n\r\n this.conversionActivity = this.instrumentation && this.instrumentation.createScenarioAndActivity({\r\n scenarioName: 'conversionDeliveryStatusPopup',\r\n activityName: 'showConversionDeliveryStatusWarning',\r\n });\r\n\r\n if (isForVNext) {\r\n this.filterService.on('filter-state-changed', () => {\r\n if (!this.gridRemoved) {\r\n const filter = this.filterService.getCombinedFilter();\r\n updateGridQuery(\r\n this.grid.gridView,\r\n filter,\r\n true\r\n );\r\n }\r\n });\r\n }\r\n\r\n if (!this.preexecuteFlag && IsCampaignAdGroupCopyPasteEnabled && this.enableCopyPaste) {\r\n const bulkEditGridOptions = {\r\n filterService: this.filterService,\r\n gridView: this.grid.gridView,\r\n pgridPlugins: this.grid,\r\n isForVNext: this.isForVNext,\r\n };\r\n\r\n Hotkeys.on('copy', CopyPaste.copy.bind(CopyPaste, 'campaign', bulkEditGridOptions));\r\n if (this.isForVNext) {\r\n Hotkeys.on('paste', this.grid.paste.onClick);\r\n } else {\r\n Hotkeys.on('paste', CopyPaste.paste.bind(CopyPaste, bulkEditGridOptions));\r\n }\r\n Hotkeys.setup();\r\n }\r\n\r\n this.grid.gridView.on('willUpdate', (changes) => {\r\n // only after rendering, we do the patch\r\n const { _isRendered } = this.grid.gridView;\r\n if (_isRendered) {\r\n handleSortChange(changes, this.grid.gridView, config.name);\r\n }\r\n });\r\n\r\n this.grid.gridView.once('didReload', () => {\r\n this.grid.gridView.once('didRedraw', () => {\r\n PageReady.pageIsReady(this.pageName);\r\n }, this);\r\n });\r\n\r\n this.grid.pagination.on('change:page-number', (pageNumber) => {\r\n this.setPageNumberToState(pageNumber);\r\n });\r\n\r\n const eventDispatcher = _.extend({}, Backbone.Events);\r\n\r\n this.listenTo(eventDispatcher, 'wunderbar.collapsed', this.onWunderbarChange);\r\n this.listenTo(eventDispatcher, 'wunderbar.expanded', this.onWunderbarChange);\r\n this.deliveryStatusPopupFactory = new CampaignDeliveryStatusPopupFactory({\r\n grid: this.grid,\r\n perfMarker,\r\n scope,\r\n instrumentation,\r\n });\r\n this.on('inlineEditCashbackSetting', this.inlineEditCashbackSetting, this);\r\n return this.grid.gridView;\r\n }\r\n\r\n renderTrunk() {\r\n if (this.isForVNext) {\r\n this.filterService.initializeCombinedFilterPromise.then(() => {\r\n if (!this.gridRemoved) {\r\n const filter = this.filterService.getCombinedFilter();\r\n updateGridQuery(\r\n this.grid.gridView,\r\n filter,\r\n true\r\n );\r\n }\r\n });\r\n }\r\n super.renderTrunk();\r\n }\r\n\r\n inlineEditCashbackSetting(item) {\r\n const {\r\n Percent,\r\n MonthlyBudget,\r\n Scope,\r\n CouponsEnabled,\r\n PersonalizedOffersEnabled,\r\n } = item.CampaignCashback || {};\r\n\r\n const inlineEdit = new TopPanelCashbackSettings({\r\n CashbackPercent: Percent,\r\n CashbackMonthlyBudget: MonthlyBudget,\r\n CashbackScope: Scope,\r\n CouponsEnabled,\r\n PersonalizedOffersEnabled,\r\n deps: {\r\n i18n,\r\n decimal,\r\n pageContext,\r\n jsdataCampaign,\r\n },\r\n view: this,\r\n item,\r\n campaignName: item.Name,\r\n }).render();\r\n this.showTopPanelCashbackSettingEditor(inlineEdit);\r\n }\r\n\r\n showTopPanelCashbackSettingEditor(view) {\r\n // use defer here to wait for the dropdown menu to hide first\r\n _.defer(() => {\r\n if (this.editorView) {\r\n this.editorView.remove();\r\n }\r\n this.editorView = view;\r\n\r\n this.grid.gridView.overrideWith(this.editorView);\r\n\r\n this.editorView.once('cancel close', (response) => {\r\n this.grid.gridView.overrideWith(null);\r\n this.editorView.remove();\r\n this.editorView = null;\r\n\r\n if (response) {\r\n this.grid.gridView.refresh(true);\r\n }\r\n });\r\n window.scrollTo(0, 0);\r\n });\r\n }\r\n\r\n get events() {\r\n const events = {\r\n 'click .quality-score-detail': 'showQualityScoreDetails',\r\n 'click .labels-cell-container #see-all': 'onLabelsRowClicked',\r\n 'click .labels-cell-item': (event) => {\r\n const targetEntity = getTargetEntity(event, this.grid.gridView);\r\n filterOnLabelClick(\r\n event,\r\n targetEntity.Labels,\r\n this.grid.gridView,\r\n this.filterService,\r\n IsAccountLabelsEnabled\r\n );\r\n },\r\n 'click .manage-labels-button': () => navigateToManagePage(this.router),\r\n 'click .budget-landscape-row': 'showBudgetLandscape',\r\n 'click .delivery_status_with_inline_opportunities': 'showInlineOpportunityPanel',\r\n 'click .experiment-budget-ellipsis': 'showExperimentBudgetPopup',\r\n 'click .grid-column-Budget .bidlandscape_icon.enabled': 'showBidLandscape',\r\n 'mouseover .grid-column-Budget .bidlandscape_icon.disabled': IsDeferredHoveringPopupEnabled ? _.partial(handleShowRejectionReasonEnter, this, this.showLandscapeDisabledHelpInfo) : 'showLandscapeDisabledHelpInfo',\r\n 'mouseout .grid-column-Budget .bidlandscape_icon.disabled': IsDeferredHoveringPopupEnabled ? _.partial(handleShowRejectionReasonLeave, this, this.hideRejectionReason) : 'hideRejectionReason',\r\n 'click .grid-column-biddingStrategyTargetCpa .bidlandscape_icon.enabled': 'showBidLandscape',\r\n 'mouseover .grid-column-biddingStrategyTargetCpa .bidlandscape_icon.disabled': IsDeferredHoveringPopupEnabled ? _.partial(handleShowRejectionReasonEnter, this, this.showLandscapeDisabledHelpInfo) : 'showLandscapeDisabledHelpInfo',\r\n 'mouseout .grid-column-biddingStrategyTargetCpa .bidlandscape_icon.disabled': IsDeferredHoveringPopupEnabled ? _.partial(handleShowRejectionReasonLeave, this, this.hideRejectionReason) : 'hideRejectionReason',\r\n 'click .grid-column-biddingStrategyTargetRoas .bidlandscape_icon.enabled': 'showBidLandscape',\r\n 'mouseover .grid-column-biddingStrategyTargetRoas .bidlandscape_icon.disabled': IsDeferredHoveringPopupEnabled ? _.partial(handleShowRejectionReasonEnter, this, this.showLandscapeDisabledHelpInfo) : 'showLandscapeDisabledHelpInfo',\r\n 'mouseout .grid-column-biddingStrategyTargetRoas .bidlandscape_icon.disabled': IsDeferredHoveringPopupEnabled ? _.partial(handleShowRejectionReasonLeave, this, this.hideRejectionReason) : 'hideRejectionReason',\r\n 'click .grid-column-Delivery .bidlandscape_icon.enabled': 'showBidLandscape', // TODO: Only show this if value = limited by auto-bidding-target\r\n 'mouseover .grid-column-Delivery .bidlandscape_icon.disabled': IsDeferredHoveringPopupEnabled ? _.partial(handleShowRejectionReasonEnter, this, this.showLandscapeDisabledHelpInfo) : 'showLandscapeDisabledHelpInfo',\r\n 'mouseout .grid-column-Delivery .bidlandscape_icon.disabled': IsDeferredHoveringPopupEnabled ? _.partial(handleShowRejectionReasonLeave, this, this.hideRejectionReason) : 'hideRejectionReason',\r\n 'click .performance-metrics-fluctuation .clickable': 'showFluctuationInsightsPopup',\r\n 'mouseenter .performance-metrics-fluctuation .clickable': 'showFluctuationInsightsTooltip',\r\n 'mouseleave .performance-metrics-fluctuation .clickable': event => hideFluctuationInsightsTooltip({ event, view: this.grid.gridView }),\r\n 'mouseenter .optimization_score_with_popover': 'showOptimizationScorePopover',\r\n 'mouseleave .grid-column-OptimizationScoreColumn': 'hideOptimizationScorePopover',\r\n 'mouseover .budgetCenterEntry': 'showBudgetCenterHelpInfo',\r\n 'mouseleave .budgetCenterEntry': event => hideBudgetCenterHelpTooltip({ event, view: this.grid.gridView }),\r\n 'keydown .budgetCenterEntry': filterEnterKeyDown(e => this.showBudgetCenterHelpInfo(e)),\r\n 'mouseover .conversion-warning-delivery-status': IsDeferredHoveringPopupEnabled ? _.partial(handleShowRejectionReasonEnter, this, this.showConversionDeliveryStatusWarning) : 'showConversionDeliveryStatusWarning',\r\n 'keydown .conversion-warning-delivery-status': filterEnterKeyDown(e => this.showConversionDeliveryStatusWarning(e)),\r\n };\r\n\r\n if (this.isForVNext) {\r\n events['mouseenter .delivery_status_with_reject_reasons'] = IsDeferredHoveringPopupEnabled ? _.partial(handleShowRejectionReasonEnter, this, this.showRejectionReason) : 'showRejectionReason';\r\n events['mouseleave .delivery_status_with_reject_reasons'] = IsDeferredHoveringPopupEnabled ? _.partial(handleShowRejectionReasonLeave, null, _.noop) : null;\r\n events['mouseleave .grid-column-Delivery'] = 'hideRejectionReason';\r\n events['click .delivery_status_with_reject_reasons'] = 'showRejectionReason';\r\n events['click .grid-column-Budget .bidlandscape_icon.disabled'] = 'showLandscapeDisabledHelpInfo';\r\n events['mouseover .budget-landscape-row'] = 'showRejectionReason';\r\n events['click .editorial_delivery_status_with_inline_appeals'] = 'showEditorialRejectionReason';\r\n events['mouseenter .editorial_delivery_status_with_inline_appeals'] = 'showEditorialRejectionReason';\r\n events['mouseenter .performance-insights-status'] = _.debounce(this.showPerformanceInsightsPopup, 100);\r\n events['mouseleave .performance-insights-status'] = 'hidePerformanceInsightsPopup';\r\n } else {\r\n events['click .delivery_status_with_reject_reasons'] = 'showRejectionReason';\r\n events['mouseover .budget-landscape-row'] = 'showBudgetLandscapeHelpInfo';\r\n }\r\n return events;\r\n }\r\n\r\n remove() {\r\n if (this.grid) {\r\n if (this.grid.toolbar && this.grid.toolbar.gridToolbarGroup) {\r\n this.grid.toolbar.gridToolbarGroup.remove();\r\n this.grid.toolbar = null;\r\n }\r\n }\r\n\r\n if (!this.preexecuteFlag && IsCampaignAdGroupCopyPasteEnabled && this.enableCopyPaste) {\r\n Hotkeys.reset();\r\n }\r\n\r\n dismissFlucCallout();\r\n\r\n this.gridRemoved = true;\r\n this.setPageNumberToState(0);\r\n super.remove();\r\n }\r\n\r\n setPageNumberToState(number) {\r\n state.set('pgridPageNumber', _.defaults({\r\n [this.gridName]: number,\r\n }, state.get('pgridPageNumber') || {}));\r\n }\r\n\r\n showOptimizationScorePopover(event) {\r\n const containerDOM = document.querySelector(this.rejectionPopupContainerSelector);\r\n const styles = mergeStyleSets({\r\n callout: {\r\n width: 320,\r\n padding: '20px 24px',\r\n fontSize: '12px',\r\n },\r\n title: { marginBottom: 12 },\r\n body: {},\r\n });\r\n ReactDOM.render(\r\n (\r\n \r\n \r\n {i18n.getString('Optimization_Score_Column_Warning_Title')}\r\n \r\n \r\n {i18n.getString('Optimization_Score_Column_Warning_Text')}\r\n \r\n \r\n ),\r\n containerDOM\r\n );\r\n\r\n this.optimizationScorePopoverShown = true;\r\n }\r\n\r\n showConversionDeliveryStatusWarning(event) {\r\n const item = getTargetEntity(event, this.grid.gridView);\r\n const { activity } = this.conversionActivity || {};\r\n\r\n if (activity) {\r\n activity.trace(`[ConversionDeliveryStatusPopup] Rendered - ${JSON.stringify({ campaignId: item.Id, goalDeliveryStatus: JSON.stringify(item.GoalStatusDetails) })}`);\r\n }\r\n\r\n\r\n renderConversionDeliveryStatusTooltip({\r\n i18n: this.newI18n,\r\n event,\r\n item,\r\n view: this.grid.gridView,\r\n activity,\r\n isConnectWithExpertEnabled: permissions.dynamic.AdsCopilotConversionTrackingLiveAgent,\r\n });\r\n\r\n this.conversionDeliveryStatusPopoverShown = true;\r\n }\r\n\r\n hideConversionDeliveryStatusWarning() {\r\n\r\n }\r\n\r\n hideOptimizationScorePopover() {\r\n if (this.optimizationScorePopoverShown) {\r\n ReactDOM.unmountComponentAtNode(document.querySelector(this.rejectionPopupContainerSelector));\r\n this.optimizationScorePopoverShown = false;\r\n }\r\n }\r\n\r\n showExperimentBudgetPopup(event) {\r\n const item = getTargetEntity(event, this.grid.gridView);\r\n const budgetSplitView = new BudgetSplitView({ item, i18n }).render();\r\n\r\n return new GridCustomizedPopupEditor({\r\n editorView: budgetSplitView,\r\n editorPositionFactory: getEditorPositionAsideAnchor($(event.target)),\r\n renderBelow: false,\r\n className: 'grid-popupeditor experiment-budget-popup',\r\n }).render();\r\n }\r\n\r\n showBidLandscape(event) {\r\n let bidLandscapePerfMarker;\r\n if (this.perfMarker) {\r\n bidLandscapePerfMarker = this.perfMarker.createChild('Campaign_Bid_Landscape');\r\n bidLandscapePerfMarker.willInit();\r\n }\r\n\r\n const targetEntity = getTargetEntity(event, this.grid.gridView);\r\n openCampaignBidLandscape({\r\n event,\r\n scope: this.scope,\r\n campaign: targetEntity,\r\n grid: this.grid,\r\n container: this.$el,\r\n isForVNext: this.isForVNext,\r\n bulkChange: bulkEditChange,\r\n perfMarker: bidLandscapePerfMarker,\r\n });\r\n }\r\n\r\n onLabelsRowClicked(event) {\r\n const targetEntity = getTargetEntity(event, this.grid.gridView);\r\n this.grid.gridView.trigger('willShowLabelsPopup');\r\n\r\n showLabelsPopup({\r\n labels: targetEntity.Labels,\r\n entityType: 'Campaign',\r\n entityName: targetEntity.Name,\r\n container: this.isForVNext ? $('.grid-and-disclaim-container') : this.$el,\r\n event,\r\n router: legacyRouter,\r\n i18n,\r\n grid: this.grid,\r\n filterService: this.filterService,\r\n isMCCLabelEnabled: IsAccountLabelsEnabled,\r\n });\r\n }\r\n\r\n showEditorialRejectionReason(event) {\r\n const key = this.grid.gridView.keyOfElement(event.target);\r\n const selectedItem = this.grid.gridView.itemWithKey(key);\r\n const editorialStatus = $(event.target).parent('.delivery-info').data('status');\r\n const attributeId = $(event.target).data('entityid');\r\n const valueLevel = $(event.target).parent('.delivery-info').data('valuelevel');\r\n const activity = this.instrumentation && this.instrumentation.editorial && this.instrumentation.editorial.create().toggleCountryList.create();\r\n\r\n import(/* webpackMode: 'eager' */'@bingads-webui-campaign/delivery-status-popup-factory').then(({ showRejectionReasons, registerCountryListEvent }) => {\r\n showRejectionReasons({\r\n event,\r\n i18n,\r\n deliveryStatusDetails: [editorialStatus],\r\n getCustomTemplate: _.partial(getEditorialReasonsTemplate, {\r\n event,\r\n ajaxOptions: {\r\n host: appConfig.get('odata.url'),\r\n path: appConfig.get('odata.multipart_path'),\r\n oDataToken: appConfig.get('odata.token'),\r\n params: {\r\n campaign_id: selectedItem.Id,\r\n account_id: appConfig.get('CurrentAccount').Id,\r\n customer_id: appConfig.get('CurrentCustomer').Id,\r\n },\r\n sessionId: appConfig.get('Omniture').SessionId,\r\n },\r\n instrumentation: this.instrumentation,\r\n i18n,\r\n attributeId,\r\n deliveryStatus: editorialStatus,\r\n valueLevel,\r\n permissions,\r\n commonI18n,\r\n }),\r\n useCustomTemplate: () => true,\r\n popoverId: this.popoverId,\r\n isForVNext: this.isForVNext,\r\n view: this.grid.gridView,\r\n afterRender: popup => registerCountryListEvent(popup.$el, activity, { entity: 'campaign customizer attribute', id: selectedItem.Id }),\r\n });\r\n });\r\n }\r\n RequestDisclaimerExceptionCallBack(adsGrid) {\r\n if (!this.appealAggregator) {\r\n const AppealAggregatorClass = AppealAggregator.default;\r\n this.appealAggregator = new AppealAggregatorClass({\r\n grid: adsGrid.grid,\r\n controller: 'Extension',\r\n submit: 'SubmitAppeal',\r\n menuToFollow: 'button-extension-create',\r\n permissions,\r\n instrumentation: adsGrid.instrumentation,\r\n requestExceptionFromPopup: true,\r\n });\r\n }\r\n this.appealAggregator.openBulkEditor(\r\n i18n.getString('InlineExtensionAppeal_RejectionTitle'),\r\n null,\r\n null,\r\n false,\r\n null,\r\n _.extend(this.scope.values, { type: 'disclaimer' })\r\n );\r\n return this.appealAggregator.bulkEditor;\r\n }\r\n\r\n RequestDisclaimerExceptionCallBackFromPopup(adsGrid, id) {\r\n if (adsGrid.isForVNext) {\r\n adsGrid.trigger('closeDeliveryStatusPopup');\r\n } else {\r\n $(adsGrid.rejectionPopupContainerSelector).hide();\r\n }\r\n\r\n adsGrid.grid.gridView.deselectAll();\r\n adsGrid.grid.gridView.selectRow(id);\r\n const appealView = adsGrid.RequestDisclaimerExceptionCallBack(adsGrid);\r\n\r\n adsGrid.grid.gridView.overrideWith(appealView.render());\r\n appealView.on('hide', () => {\r\n adsGrid.grid.gridView.overrideWith(null);\r\n appealView.remove();\r\n });\r\n }\r\n\r\n showRejectionReason(event) {\r\n const actionLinks = [];\r\n const entity = getTargetEntity(event, this.grid.gridView);\r\n if (this.isForVNext) {\r\n if (entity &&\r\n entity.DeliveryStatusDetails &&\r\n entity.DeliveryStatusDetails.includes('NoEligibleAdGroups')) {\r\n const url = this.router.getRoutePathById('adgroup-create');\r\n const uri = new URI(url);\r\n appendScopeParameter(uri, this.scope);\r\n uri.addQuery('campaignId', entity.Id);\r\n uri.addQuery('isOpenCreatePanel', true);\r\n actionLinks.NoEligibleAdGroups = uri.toString();\r\n }\r\n\r\n if (entity && entity.DeliveryStatusDetails &&\r\n entity.DeliveryStatusDetails.includes('ShoppingCampaignNoOffersPresent')) {\r\n // get merchant center url under account level\r\n const url = this.router.getRoutePathById('merchant-center');\r\n const uri = new URI(url);\r\n appendScopeParameter(uri, this.scope);\r\n actionLinks.ShoppingCampaignNoOffersPresent = uri.toString();\r\n }\r\n }\r\n\r\n import(/* webpackMode: 'eager' */'@bingads-webui-campaign/delivery-status-popup-factory').then(({ DeliveryStatusPopupFactory, registerCountryListEvent }) => {\r\n const view = new DeliveryStatusPopupFactory({ grid: this.grid, i18n });\r\n view.showRejectionPopup({\r\n event,\r\n actionLinks,\r\n containerSelector: this.rejectionPopupContainerSelector,\r\n IsExperimentsOpenBetaEnabled,\r\n isSmartShoppingCampaignEnabled: IsSmartShoppingCampaignEnabled,\r\n percentSymbol: this.serverContext.DecimalFormatter.percentSymbol,\r\n view: this,\r\n popoverId: this.popoverId,\r\n useCustomTemplate: deliveryStatus =>\r\n _.contains(customTemplateDeliveryStatus, deliveryStatus) || (permissions && permissions.dynamic.AdExtensionInlineAppeal && _.contains(disclaimerEditorialStatus, deliveryStatus)),\r\n getCustomTemplate: (deliveryStatus, index) => {\r\n if (_.contains(linkedInPermissionRequired, deliveryStatus)) {\r\n return getRequestPermission({\r\n i18n,\r\n deliveryStatus,\r\n });\r\n }\r\n if (_.contains(disclaimerEditorialStatus, deliveryStatus)) {\r\n return this.disclaimerRepos.association.findAll({\r\n where: {\r\n campaignId: entity.Id,\r\n },\r\n }).then(disclaimerData => getReasonTemplates({\r\n deliveryStatus,\r\n scope: this.scope.values,\r\n errI18n: i18nErrors,\r\n locationI18n: locationTargeti18n,\r\n i18n,\r\n commonI18n,\r\n permissions,\r\n entity,\r\n extension: disclaimerData && disclaimerData[0],\r\n }));\r\n }\r\n if (budgetLimit.indexOf(deliveryStatus) > -1) {\r\n return this.deliveryStatusPopupFactory.getBudgetLandscapeHelpInfoTemplate(event);\r\n }\r\n return this.deliveryStatusPopupFactory.getAutobiddingLimitedHelpInfoTemplate(deliveryStatus, index, event);\r\n },\r\n afterRender: (popupView) => {\r\n popupView.$('#requestLinkedInPermission').on('click', () => {\r\n this.grid.gridView.trigger('closeDeliveryStatusPopup');\r\n });\r\n popupView.$('#requestExceptionforExtension').on('click', _.partial(this.RequestDisclaimerExceptionCallBackFromPopup, this, entity.Id));\r\n registerCountryListEvent(popupView.$el);\r\n popupView.$('.budget-landscape-action-link').on('click', () => {\r\n // only the mouse over event contains campaign info\r\n // but only popupView could catch this click event\r\n // so we have to pass the mouse over event\r\n this.showBudgetLandscape(event);\r\n $(this.rejectionPopupContainerSelector).hide();\r\n });\r\n\r\n popupView.$('.autobidding-suggestion .apply').on('click', (clickEvent) => {\r\n // deliveryStatusList should only contain one element\r\n const deliveryStatusList = _.intersection(clickEvent.target.classList, autobiddingLimitedStatus);\r\n this.applyAutobiddingSuggestion(event, deliveryStatusList[0]);\r\n this.grid.gridView.trigger('closeDeliveryStatusPopup');\r\n clickEvent.stopPropagation();\r\n clickEvent.preventDefault();\r\n });\r\n },\r\n instrumentation: this.instrumentation,\r\n inContextRepairRecommedationType: 'campaign',\r\n });\r\n });\r\n }\r\n\r\n processErrors(response) {\r\n let errorMessage;\r\n const unexpectedError = i18n.getString('ErrorNumber_-1');\r\n if (response && response.errors) {\r\n const errors = i18nErrors.getBulkApiErrors(response.errors);\r\n if (!errors || !errors[0] || !errors[0].message) {\r\n errorMessage = unexpectedError;\r\n } else {\r\n errorMessage = errors[0].message;\r\n }\r\n }\r\n\r\n notificationApi.showWarning(errorMessage || unexpectedError);\r\n }\r\n\r\n applyAutobiddingSuggestionForMaxCPCRestriction(campaign, suggestedValue) {\r\n const toUpdated = {\r\n BiddingScheme: {\r\n ...campaign.BiddingScheme,\r\n MaxCpc: {\r\n Amount: suggestedValue,\r\n },\r\n },\r\n };\r\n\r\n jsdataCampaign.Campaign\r\n .update(campaign.Id, toUpdated, { adapter: 'bulk', cacheResponse: false })\r\n .finally(withUiBlock(this.grid.gridView.$el))\r\n .then(() => {\r\n notificationApi.showInfo(i18n.getString('Message_RecommendedValue_Applied'));\r\n this.grid.gridView.refresh(true);\r\n })\r\n .catch(response => this.processErrors(response));\r\n }\r\n // budget, shared budget\r\n applyAutobiddingSuggestionForBudgetRestriction(campaign, suggestedValue) {\r\n if (campaign && campaign.Budget) {\r\n if (campaign.Budget.Id) {\r\n // shared budget\r\n SharedBudgetModel.updateBudget({\r\n Id: campaign.Budget.Id,\r\n Amount: suggestedValue,\r\n })\r\n .finally(withUiBlock(this.grid.gridView.$el))\r\n .then(() => {\r\n notificationApi.showInfo(i18n.getString('Message_RecommendedValue_Applied'));\r\n this.grid.gridView.refresh(true);\r\n })\r\n .catch(response => this.processErrors(response));\r\n } else if (campaign.Budget.Amount) {\r\n const toUpdated = {\r\n Budget: _.extend({}, campaign.Budget, {\r\n Amount: suggestedValue,\r\n }),\r\n };\r\n jsdataCampaign.Campaign\r\n .update(campaign.Id, toUpdated, { adapter: 'bulk', cacheResponse: false })\r\n .finally(withUiBlock(this.grid.gridView.$el))\r\n .then(() => {\r\n notificationApi.showInfo(i18n.getString('Message_RecommendedValue_Applied'));\r\n this.grid.gridView.refresh(true);\r\n })\r\n .catch(response => this.processErrors(response));\r\n }\r\n }\r\n }\r\n // targetCPA, targetROAS, targetImpressionShare\r\n applyAutobiddingSuggestionForUnAttainableTarget(campaign, suggestedValue) {\r\n const toUpdated = {\r\n BiddingScheme: { ...campaign.BiddingScheme },\r\n };\r\n // shopping campaign - mcv+roas, mc+cpa\r\n if (toUpdated.BiddingScheme.Type === 'MaxConversionValue') {\r\n toUpdated.BiddingScheme.TargetRoas = suggestedValue;\r\n } else if (toUpdated.BiddingScheme.Type === 'MaxConversions') {\r\n toUpdated.BiddingScheme.TargetCpa = suggestedValue;\r\n } else {\r\n toUpdated.BiddingScheme[toUpdated.BiddingScheme.Type] = suggestedValue;\r\n }\r\n jsdataCampaign.Campaign\r\n .update(campaign.Id, toUpdated, { adapter: 'bulk', cacheResponse: false })\r\n .finally(withUiBlock(this.grid.gridView.$el))\r\n .then(() => {\r\n notificationApi.showInfo(i18n.getString('Message_RecommendedValue_Applied'));\r\n this.grid.gridView.refresh(true);\r\n })\r\n .catch(response => this.processErrors(response));\r\n }\r\n\r\n applyAutobiddingSuggestion(event, deliveryStatus) {\r\n const campaign = getTargetEntity(event, this.grid.gridView);\r\n const detail = _.filter(campaign.CampaignDeliveryStatusDetails, detailStatus => detailStatus.Status === deliveryStatus);\r\n const suggestedValue = detail[0] && detail[0].RecommendedValue;\r\n const activity = this.instrumentation && this.instrumentation.autobiddingLimitedStatus.create().applyDeliveryStatus.create();\r\n let currentValue = null;\r\n\r\n switch (deliveryStatus) {\r\n case 'AutoBiddingLimitedMaxCPCRestriction':\r\n currentValue = campaign.BiddingScheme.MaxCpc && campaign.BiddingScheme.MaxCpc.Amount;\r\n this.applyAutobiddingSuggestionForMaxCPCRestriction(campaign, suggestedValue);\r\n break;\r\n case 'AutoBiddingLimitedBudgetRestriction':\r\n currentValue = campaign.Budget.Amount;\r\n this.applyAutobiddingSuggestionForBudgetRestriction(campaign, suggestedValue);\r\n break;\r\n case 'AutoBiddingLimitedUnAttainableTarget':\r\n currentValue = campaign.BiddingScheme[campaign.BiddingScheme.Type];\r\n this.applyAutobiddingSuggestionForUnAttainableTarget(campaign, suggestedValue);\r\n break;\r\n default:\r\n break;\r\n }\r\n if (activity) {\r\n activity.trace(JSON.stringify({\r\n campaignId: campaign.Id,\r\n deliveryStatus,\r\n suggestedValue,\r\n currentValue,\r\n }));\r\n }\r\n }\r\n\r\n hideRejectionReason(e) {\r\n if ($(e.relatedTarget).closest(`#${this.popoverId}`).length === 0) {\r\n this.grid.gridView.trigger('closeDeliveryStatusPopup');\r\n }\r\n }\r\n\r\n showBudgetLandscape(event) {\r\n event.stopImmediatePropagation();\r\n // this.deliveryStatusPopupFactory.showBudgetLandscapePopup(event, this.isForVNext);\r\n\r\n const activity = this.instrumentation && this.instrumentation.editorial && this.instrumentation.editorial.create().toggleCountryList.create();\r\n this.deliveryStatusPopupFactory.showBudgetLandscapePopup(event, this.isForVNext, this.serverContext, activity, this.newI18n);\r\n }\r\n\r\n showInlineOpportunityPanel(event) {\r\n event.stopImmediatePropagation();\r\n this.deliveryStatusPopupFactory.showInlineOpportunityPanel(event, this.isForVNext);\r\n }\r\n\r\n showBudgetLandscapeHelpInfo(event) {\r\n event.stopImmediatePropagation();\r\n this.deliveryStatusPopupFactory.showBudgetLandscapeHelpInfo(event, this.isForVNext);\r\n }\r\n\r\n showQualityScoreDetails(event) {\r\n const targetEntity = getTargetEntity(event, this.grid.gridView);\r\n\r\n showQualityScoreDetail(event, targetEntity.QualityScore, 'qsContainer', legacyGlobalI18n); // qsContainer is the id from qsContainerTemplate\r\n }\r\n\r\n onWunderbarChange() {\r\n this.grid.gridView.monitorViewportChange(1500, 15);\r\n }\r\n\r\n showLandscapeDisabledHelpInfo(event) {\r\n this.showRejectionReason(_.extend({}, event, { bidlandscapeDisabled: true }));\r\n }\r\n\r\n forceCampaignsGridRefresh({ gridView }) {\r\n const invalidateGridData = jsdataCampaign.Campaign.destroyAll();\r\n invalidateGridData.then(() => {\r\n gridView.deselectAll();\r\n gridView.refresh(true);\r\n });\r\n }\r\n\r\n showFluctuationInsightsTooltip(event) {\r\n renderFluctuationInsightsTooltip({\r\n i18n,\r\n event,\r\n view: this.grid.gridView,\r\n });\r\n }\r\n\r\n showFluctuationInsightsPopup(event) {\r\n const { currentTarget } = event;\r\n event.stopPropagation();\r\n const targetEntity = getTargetEntity(event, this.grid.gridView);\r\n\r\n insertPopoverContainer(mccPerfFluxPopupContainerId);\r\n\r\n const dateRange = this.grid.dateFilter.getCurrentDateRange();\r\n\r\n import(/* webpackMode: 'eager' */'@bingads-webui-campaign-react/fluctuation-popup').then(({ createElementBasedFluctuationPopupFactory }) => {\r\n import(/* webpackMode: 'eager' */'@bingads-webui-campaign-react/common-styles').then(({ getFluctuationPopupStyle }) => {\r\n const { core } = this.theme;\r\n const { palette } = core;\r\n const getFluctuationPopupStyles = () => ({\r\n '@global': getFluctuationPopupStyle({ palette }),\r\n });\r\n createElementBasedFluctuationPopupFactory({\r\n perfMarker: this.perfMarker,\r\n triggerButton: currentTarget,\r\n onFlucDismiss: ({ isLastFluc }) => {\r\n if (isLastFluc) {\r\n this.forceCampaignsGridRefresh(this.grid);\r\n }\r\n },\r\n deps: {\r\n i18n,\r\n context: {\r\n ...this.serverContext,\r\n scope: this.scope,\r\n CurrentCampaign: {\r\n Id: targetEntity ? targetEntity.Id : '',\r\n },\r\n },\r\n instrumentation: this.instrumentation,\r\n azure: this.azureUrlRewrite,\r\n appConfig,\r\n },\r\n metrics: [{\r\n name: currentTarget.getAttribute('data-metric-name'),\r\n value: currentTarget.getAttribute('data-metric-value'),\r\n type: currentTarget.getAttribute('data-metric-type'),\r\n }],\r\n fromScenario: 'CampaignsGrid',\r\n isForVNext: this.isForVNext,\r\n canViewAllInsights: false,\r\n asyncLoadFluctuationConfig: {\r\n dateRange: {\r\n startDate: dateRange.start,\r\n endDate: dateRange.end,\r\n },\r\n fluctuationTypeIds: [currentTarget.getAttribute('data-metric-type')],\r\n },\r\n onDismiss: () => {\r\n if (currentTarget) {\r\n currentTarget.focus();\r\n }\r\n },\r\n getFluctuationPopupStyles,\r\n }, document.getElementById(mccPerfFluxPopupContainerId));\r\n });\r\n });\r\n }\r\n\r\n showBudgetCenterHelpInfo(event) {\r\n const timeZone = toIANATimeZone(fromLegacyTimeZone(_.get(this.serverContext, ['CurrentAccount', 'TimeZone'])));\r\n const monthString = i18n.formatDate(new Date(), { skeleton: 'MMMM', timeZone });\r\n\r\n const entity = getTargetEntity(event, this.grid.gridView);\r\n const url = this.router.getRoutePathById('budget-center');\r\n const uri = new URI(url);\r\n appendScopeParameter(uri, this.scope);\r\n uri.addQuery('campaignId', entity.Id);\r\n uri.addQuery('entrypoint', 'campaignsgrid');\r\n const actionLink = uri.toString();\r\n\r\n const monthlyBudgetAmount = i18n.formatCurrency(\r\n _.get(entity, ['Budget', 'MonthlyAmount']),\r\n _.get(this.serverContext, ['CurrentAccount', 'CurrencyCode'])\r\n );\r\n\r\n renderBudgetCenterHelpTooltip({\r\n i18n,\r\n event,\r\n view: this.grid.gridView,\r\n monthString,\r\n monthlyBudgetAmount,\r\n actionLink,\r\n });\r\n }\r\n\r\n renderPerformanceInsightsPopup({\r\n event, containerDOM, closePerformanceInsightsPopup,\r\n }) {\r\n ReactDOM.render(\r\n (),\r\n containerDOM\r\n );\r\n }\r\n\r\n closePerformanceInsightsPopup() {\r\n if (window.popupManager) {\r\n window.popupManager.releaseLock(popupContentKey);\r\n }\r\n ReactDOM.unmountComponentAtNode(document.querySelector(this.rejectionPopupContainerSelector));\r\n }\r\n\r\n showPerformanceInsightsPopup(event) {\r\n const containerDOM = document.querySelector(this.rejectionPopupContainerSelector);\r\n if (window.popupManager) {\r\n window.popupManager.forceAcquireLock(popupContentKey);\r\n }\r\n\r\n this.renderPerformanceInsightsPopup({\r\n event, containerDOM, closePerformanceInsightsPopup: this.closePerformanceInsightsPopup.bind(this),\r\n });\r\n }\r\n\r\n hidePerformanceInsightsPopup(e) {\r\n if ($(e.relatedTarget).closest('.performance-insights-callout').length === 0) {\r\n this.closePerformanceInsightsPopup();\r\n }\r\n }\r\n\r\n get className() { return 'campaign-tab-grid'; }\r\n}\r\n","import Promise from 'bluebird';\r\nimport requestPermissionTemplate from './request-permission-template.pug';\r\n\r\nexport function getRequestPermission({ i18n, deliveryStatus }) {\r\n return Promise.resolve(requestPermissionTemplate({\r\n i18n,\r\n deliveryStatus,\r\n showRequestPermissionBtn: false,\r\n }));\r\n}\r\n","/* eslint-disable no-bitwise */\r\n/* istanbul ignore file */\r\nimport _ from 'underscore';\r\nimport $ from 'jquery';\r\nimport Promise from 'bluebird';\r\nimport { http } from '@bingads-webui/http-util';\r\nimport { queryify } from '@bingads-webui/url-util';\r\nimport { getEditorialTemplates, ENTITY } from '@bingads-webui-campaign/delivery-status-popup-factory';\r\nimport * as editorialRejection from '@bingads-webui-component-legacy/api-errors-campaign/map/editorialRejectionFwdLinkId';\r\n\r\nexport function getReasonTemplates({\r\n deliveryStatus, scope, errI18n, locationI18n,\r\n i18n, commonI18n, permissions, entity, extension,\r\n}) {\r\n return new Promise((resolve) => {\r\n let url = '/campaign/AdExtensions.m/GetRejectionReasonData';\r\n const args = _.extend({\r\n aid: scope.aid,\r\n cid: scope.cid,\r\n cmpid: scope.campaignId,\r\n type: 'disclaimer',\r\n adExtensionId: extension.Id,\r\n campaignId: scope.campaignId || entity.Id,\r\n version: extension.Version,\r\n });\r\n url = queryify(url, args);\r\n return http.post({\r\n url,\r\n data: { __RequestVerificationToken: $('input[name=\"__RequestVerificationToken\"]').val() },\r\n contentType: 'application/x-www-form-urlencoded',\r\n }).then(({\r\n RejectionReasons,\r\n IsAppealable,\r\n }) => {\r\n const reasonTemplates = getEditorialTemplates({\r\n reasons: _.map(RejectionReasons, Reason => ({\r\n ReasonCode: Reason.ReasonCode,\r\n Location: Reason.Location,\r\n LanguageToCountries: [{\r\n PublisherCountries: Reason.RejectionCountries,\r\n }],\r\n })),\r\n editorialRejection,\r\n errI18n,\r\n i18n,\r\n locationI18n,\r\n commonI18n,\r\n entity: ENTITY.EXTENSION,\r\n deliveryStatus,\r\n permissions,\r\n isAppealable: IsAppealable,\r\n });\r\n resolve(reasonTemplates);\r\n });\r\n });\r\n}\r\n","import { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\n\r\nexport class CampaignIdColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'CampaignId',\r\n property: 'Id',\r\n title: i18n.getString('ColumnName_CampaignID'),\r\n sortable: 'Id',\r\n type: 'number',\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport ko from 'knockout';\r\n\r\nexport default class ViewModel {\r\n constructor() {\r\n this.isValid = ko.observable(true);\r\n\r\n this.handleErrors = (errors) => {\r\n this.isValid(!_.isEmpty(errors));\r\n };\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport { MultiLanguageSelector } from '@bingads-webui-campaign/multi-language-selector';\r\n\r\nimport template from './inline-editor-template.pug';\r\nimport ViewModel from './inline-editor-viewmodel';\r\n\r\n/**\r\n* Provide inline editoring function for campaign language\r\n*\r\n*
It reads user selection, and trigger these events:\r\n*
save: with { SelectedLanguages } after user click save\r\n*
close: after user click cancel\r\n*\r\n*/\r\n\r\nexport class CampaignLanguageInlineEditor extends Backbone.View {\r\n /**\r\n * Initilize view settings\r\n *\r\n * @param {Object} param - An object containing these default options for view:\r\n * @param {Object} param.item - the campaign entity to be edit\r\n * to where to central the loading icon when update\r\n * @param {Object[]} param.languages - the languages set to choose from, default empty\r\n * @param {Object[]} param.i18n - the localization object which contains function getString\r\n *\r\n * @returns {void} void\r\n */\r\n initialize({\r\n item,\r\n languages = [],\r\n i18n = { getString: x => x },\r\n }) {\r\n this.item = item;\r\n this.languages = languages;\r\n this.i18n = i18n;\r\n this.viewModel = new ViewModel();\r\n this.viewModel.isValid(!_.isEmpty(this.item.Languages));\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .grid-popupeditor-save': 'save',\r\n 'click .grid-popupeditor-cancel': 'cancel',\r\n };\r\n }\r\n\r\n render() {\r\n this.$el.html(template({ i18n: this.i18n }));\r\n ko.applyBindings(this.viewModel, this.el);\r\n\r\n this.languageSelector = new MultiLanguageSelector({\r\n inEditMode: true,\r\n languages: this.languages,\r\n i18n: this.i18n,\r\n selectedLanguages: this.item.Languages,\r\n });\r\n\r\n this.$('.campaign-language-editor').html(this.languageSelector.render().el);\r\n\r\n this.languageSelector.on('selectedLanguages:changed', () => {\r\n this.viewModel.isValid(!_.isEmpty(this.languageSelector.getSelectedLanguages()));\r\n });\r\n\r\n return this;\r\n }\r\n\r\n save() {\r\n this.trigger('save', { SelectedLanguages: this.languageSelector.getSelectedLanguages() });\r\n }\r\n\r\n cancel() {\r\n this.trigger('close');\r\n }\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { GridCustomizedPopupEditor } from '@bingads-webui-campaign/grid-customized-popup-editor';\r\nimport { CampaignLanguageInlineEditor } from '@bingads-webui-campaign/campaigns-language';\r\nimport { inlineEditSave } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { AdGroup } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport template from './campaign-languages-template.pug';\r\n\r\nconst permissions = appConfig.get('Permissions');\r\n\r\nexport function getLanguageSetForSelector() {\r\n let languagesSet = _.without(_.clone(AdGroup.properties.Language.enum), 'None');\r\n const {\r\n IsSimplifiedChineseLanguageEnabledInMultipleLanguage,\r\n IsAdsGlobalizationPhase1Enabled,\r\n IsAdsGlobalizationPhase2Enabled,\r\n IsAdsGlobalizationPhase2JapanEnabled,\r\n IsAdsGlobalizationPhase6Enabled,\r\n IsDomesticSimplifiedChineseEnabled,\r\n IsAdsGlobalizationPhase9Enabled,\r\n IsAdsGlobalizationPhase9VIEnabled,\r\n } = permissions;\r\n\r\n if (!IsSimplifiedChineseLanguageEnabledInMultipleLanguage) {\r\n languagesSet = _.without(languagesSet, 'SimplifiedChinese');\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase1Enabled) {\r\n languagesSet = _.without(languagesSet, 'Greek', 'Polish', 'Bulgarian', 'Croatian', 'Czech', 'Estonian', 'Hungarian', 'Latvian', 'Lithuanian', 'Maltese', 'Romanian', 'Slovak', 'Slovenian');\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase2Enabled) {\r\n languagesSet = _.without(languagesSet, 'Turkish', 'Serbian', 'Bosnian', 'Albanian', 'Macedonian', 'Icelandic');\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase6Enabled) {\r\n languagesSet = _.without(languagesSet, 'Hebrew', 'Arabic', 'Russian');\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase2JapanEnabled) {\r\n languagesSet = _.without(languagesSet, 'Japanese');\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase9Enabled) {\r\n languagesSet = _.without(languagesSet, 'Hindi', 'Malay', 'Thai', 'Indonesian', 'Tagalog');\r\n }\r\n\r\n if (!IsAdsGlobalizationPhase9VIEnabled) {\r\n languagesSet = _.without(languagesSet, 'Vietnamese');\r\n }\r\n\r\n if (IsDomesticSimplifiedChineseEnabled) {\r\n languagesSet = ['SimplifiedChinese'];\r\n }\r\n\r\n return languagesSet.sort();\r\n}\r\n\r\n\r\nexport class CampaignLanguagesColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n, view, isForVNext }) {\r\n const title = i18n.getString('ColumnName_Languages');\r\n super({\r\n name: 'Languages',\r\n property: ['Languages', 'CampaignType'],\r\n title,\r\n editable: true,\r\n type: 'string',\r\n helpId: 'pop_BA_CampaignCreate_Settings_LanguageTargeting',\r\n enableEdit: item => item.CampaignType === 'Default',\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.i18n = i18n;\r\n this.view = view;\r\n this.isForVNext = isForVNext;\r\n }\r\n\r\n onPrompt({ position, item, newPosition }) {\r\n const languageInlineEditorView = new CampaignLanguageInlineEditor({\r\n item,\r\n i18n: this.i18n,\r\n languages: getLanguageSetForSelector(),\r\n });\r\n\r\n languageInlineEditorView.on('save', ({ SelectedLanguages }) => {\r\n const updatedItem = _.defaults({\r\n Languages: SelectedLanguages,\r\n }, item);\r\n\r\n return inlineEditSave({\r\n id: item.Id,\r\n fieldName: 'Languages',\r\n updatedItem,\r\n }, {\r\n view: this.view,\r\n resource: jsData.Campaign,\r\n i18n: this.i18n,\r\n i18nErrors,\r\n editorView: languageInlineEditorView,\r\n editorViewCallbackAfterUpdate: () => {\r\n languageInlineEditorView.trigger('close');\r\n },\r\n customBlockerTarget: this.isForVNext ? '.campaigns-page' : null,\r\n });\r\n });\r\n const groupClass = `grid-group-${_.result(this.config, 'group', 'other')}`;\r\n const editorView = new GridCustomizedPopupEditor({\r\n editorView: languageInlineEditorView.render(),\r\n cellPosition: this.isForVNext ? newPosition : position,\r\n renderBelow: false,\r\n className: `grid-popupeditor ${groupClass}`,\r\n parentContainerSelector: this.isForVNext ? '.grid-and-disclaim-container' : null,\r\n });\r\n\r\n return editorView.render();\r\n }\r\n\r\n pickProperty(item) {\r\n return {\r\n Languages: item.Languages,\r\n };\r\n }\r\n\r\n template({ value }) {\r\n return template({\r\n Languages: value.Languages,\r\n i18n: this.i18n,\r\n });\r\n }\r\n}\r\n","import { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport template from './campaign-type-template.pug';\r\n\r\nexport class CampaignTypeColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n, permissions }) {\r\n super({\r\n name: 'CampaignType',\r\n property: ['CampaignType', 'CampaignMigrationStatus'],\r\n title: i18n.getString('ColumnName_CampaignType'),\r\n sortable: 'CampaignType',\r\n type: 'string',\r\n });\r\n this.i18n = i18n;\r\n this.IsRenameHotelToLodgingEnabled = permissions && permissions.dynamic && permissions.dynamic.IsRenameHotelToLodgingEnabled;\r\n }\r\n\r\n pickProperty(item) {\r\n return {\r\n CampaignType: item.CampaignType,\r\n CampaignMigrationStatus: item.CampaignMigrationStatus,\r\n i18n: this.i18n,\r\n };\r\n }\r\n\r\n template({ value }) {\r\n if (this.IsRenameHotelToLodgingEnabled && value.CampaignType === 'Hotel') {\r\n // When enable IsRenameHotelToLodgingEnabled, show text as \"Lodging\"\r\n value.CampaignType = 'Lodging'; // eslint-disable-line no-param-reassign\r\n }\r\n return template({\r\n CampaignType: value.CampaignType,\r\n CampaignMigrationStatus: value.CampaignMigrationStatus,\r\n i18n: this.i18n,\r\n });\r\n }\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { InlineEditableColumnPrompt, inlineEditSave } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { Campaign } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport campaignTemplate from './campaign.pug';\r\n\r\nconst permissions = appConfig.get('Permissions');\r\n\r\nexport class CampaignColumn extends CampaignuiBaseColumn {\r\n constructor({\r\n i18n, scope, view,\r\n }) {\r\n super({\r\n name: 'Name',\r\n property: _.compact([\r\n 'Name',\r\n 'Id',\r\n 'Labels', // for labels menu\r\n permissions.IsBAACompetitionBSCAuctionInsightsEnabled && 'CampaignType',\r\n permissions.IsExperimentsEnabled && 'BaseCampaignName',\r\n permissions.IsSmartShoppingCampaignEnabled && 'CampaignSubType',\r\n ]),\r\n title: i18n.getString('ColumnName_Campaign'),\r\n sortable: 'Name',\r\n editable: true,\r\n type: 'string',\r\n bodyClasses: ['grid-column-Campaign'],\r\n group: 'freezing',\r\n });\r\n\r\n this.scope = scope;\r\n this.i18n = i18n;\r\n this.view = view;\r\n }\r\n\r\n pickProperty(item) {\r\n const { customerId: cid, accountId: aid } = this.scope;\r\n const {\r\n Name: name,\r\n Id: cmpid,\r\n $total,\r\n BaseCampaignName,\r\n } = item;\r\n const isSmartCampaign = item.CampaignType === 'Smart';\r\n const isPMaxCampaign = item.CampaignType === 'PerformanceMax';\r\n const isAppCampaign = item.CampaignType === 'App';\r\n\r\n let href = '';\r\n\r\n if (isSmartCampaign) {\r\n href = item.DeliveryStatus === 'CampaignInProgress' ?\r\n `/campaign/Smart?cid=${cid}#/CreateCampaign/${cmpid}` :\r\n `/campaign/Smart?cid=${cid}#/campaign/${cmpid}`;\r\n } else if (isPMaxCampaign || isAppCampaign) {\r\n href = `/campaign/vnext/overview?aid=${aid}&cid=${cid}&campaignId=${cmpid}`;\r\n } else {\r\n href = `/campaign/vnext/adgroups?aid=${aid}&cid=${cid}&campaignId=${cmpid}`;\r\n }\r\n\r\n let ariaLabel = this.i18n.getString('Click to scope to campaign {{campaignName}}', { campaignName: name });\r\n let className = '';\r\n\r\n if (BaseCampaignName) {\r\n ariaLabel = this.i18n.getString('Click to scope to experiment {{experimentName}}', { experimentName: name });\r\n className = 'experiment-name';\r\n }\r\n\r\n return {\r\n $total,\r\n name,\r\n href,\r\n Id: cmpid,\r\n skipScopeNavigation: isSmartCampaign,\r\n Status: item.DeliveryStatus,\r\n BaseCampaignName,\r\n isForVNext: true,\r\n ariaLabel,\r\n className,\r\n };\r\n }\r\n\r\n get template() { return campaignTemplate; }\r\n\r\n onPrompt({\r\n event, item, newPosition,\r\n }) {\r\n if ($(event.target).is('a')) {\r\n return undefined;\r\n }\r\n\r\n return InlineEditableColumnPrompt({\r\n position: newPosition,\r\n item,\r\n view: this.view,\r\n i18n: this.i18n,\r\n fieldName: 'Name',\r\n schema: Campaign,\r\n saveModel: (updated, editorView) => inlineEditSave(\r\n {\r\n id: item.Id,\r\n fieldName: 'Name',\r\n updatedItem: updated,\r\n },\r\n {\r\n view: this.view,\r\n resource: jsData.Campaign,\r\n i18n: this.i18n,\r\n i18nErrors,\r\n editorView,\r\n editorViewCallbackAfterUpdate: () => {\r\n editorView.trigger('save', updated);\r\n\r\n // Since the currently edited Campaign may also be the BaseCampaign of\r\n // other Experimental Campaigns in this grid, check and update.\r\n _.each(this.view.grid.gridView.itemArray, (rowItem) => {\r\n if (rowItem.BaseCampaignName === item.Name) {\r\n const updatedRowItem = _.defaults({\r\n BaseCampaignName: updated.Name,\r\n }, rowItem);\r\n\r\n this.view.grid.gridView.trigger('didEdit', updatedRowItem);\r\n }\r\n });\r\n\r\n // update wunderbar\r\n const response = [{\r\n Id: item.Id,\r\n Name: updated.Name,\r\n }];\r\n\r\n window.App.trigger('campaignUpdated', { data: response });\r\n },\r\n customBlockerTarget: '.campaigns-page',\r\n }\r\n ),\r\n });\r\n }\r\n}\r\n","export default {\r\n Active: 'Active',\r\n Deleted: 'Deleted',\r\n Paused: 'UserPaused',\r\n Suspended: 'Suspended',\r\n\r\n // used in wunderbar, needs to be migrated once workflow goes to oData\r\n EnumPaused: 124,\r\n EnumBudgetPaused: 126,\r\n EnumBudgetUserPaused: 127,\r\n};\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport _ from 'underscore';\r\nimport { StatusIconColumn as BaseStatusIconColumn } from '@bingads-webui-campaign/campaignui-common-columns';\r\nimport { showPausedCampaignNotifications } from '@bingads-webui-campaign/import-shared-utils';\r\nimport { inlineEditSave } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport campaignStatus from '../../campaign-status';\r\n\r\nexport class StatusIconColumn extends BaseStatusIconColumn {\r\n constructor(options) {\r\n super(_.extend({}, options, {\r\n enableEdit: true,\r\n statusOptions: [\r\n { name: 'Enabled', value: 'Active' },\r\n { name: 'Paused', value: 'UserPaused' },\r\n ],\r\n group: 'freezing',\r\n title: options.i18n ? options.i18n.getString('ColumnName_Status') : 'Status',\r\n }));\r\n }\r\n\r\n updateStatus({ status, item }) {\r\n const updatedItem = _.extend({}, item, { Status: status });\r\n // workaround to fix the bug in bulkupsert api. use 'UserPaused' will get success\r\n // but actually the request take No effect.\r\n updatedItem.Status = updatedItem.Status === 'UserPaused' ? 'Paused' : updatedItem.Status;\r\n\r\n const { instrumentation } = this.view;\r\n\r\n const { activity } = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'PausedCampaignImportNotification',\r\n activityName: 'CampaignsGridStatusColumn',\r\n });\r\n return inlineEditSave(\r\n {\r\n id: item.Id,\r\n fieldName: 'Status',\r\n updatedItem,\r\n },\r\n {\r\n view: this.view,\r\n resource: jsData.Campaign,\r\n i18n: this.i18n,\r\n i18nErrors,\r\n editorViewCallbackAfterUpdate: () => {\r\n const response = [{\r\n Id: updatedItem.Id,\r\n Status: status === 'UserPaused' ? campaignStatus.EnumPaused : status,\r\n }];\r\n\r\n window.App.trigger('campaignUpdated', { data: response });\r\n },\r\n importNotificationCallback: () => {\r\n // show paused campaign notifications based on specific conditions\r\n showPausedCampaignNotifications({ campaignItemList: [item], updateStatus: status, activity });\r\n },\r\n customBlockerTarget: this.isForVNext ? '.campaigns-page' : null,\r\n }\r\n );\r\n }\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { InlineEditableColumnPrompt } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { Campaign } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { targetCpaInlineEditorView } from '@bingads-webui-campaign-react/portfolio-bid-strategy-shared';\r\nimport { NumberRange } from '@bingads-webui-campaign-legacy/bidding-strategy/viewmodel/setting';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport { getBidLandscapeConfigs } from '@bingads-webui-campaign/campaignui-common-columns';\r\nimport template from './bid-strategy-target-cpa.pug';\r\n\r\nexport class BidStrategyTargetCPAColumn extends CampaignuiBaseColumn {\r\n constructor(options) {\r\n const {\r\n i18n,\r\n view,\r\n helpId = 'pop_BA_CampaignGrids_TargetCPA',\r\n } = options;\r\n const title = i18n.getString('ColumnName_BidStrategyTargetCpa');\r\n\r\n super({\r\n name: 'DisplayBiddingStrategyTargetCpa',\r\n property: ['BiddingScheme'],\r\n title,\r\n sortable: 'DisplayBiddingStrategyTargetCpa',\r\n type: 'number',\r\n helpId,\r\n bodyClasses: ['grid-column-biddingStrategyTargetCpa'],\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n enableEdit: item =>\r\n (item.BiddingScheme && item.BiddingScheme.Type === 'TargetCpa') ||\r\n ((item.CampaignType === 'PerformanceMax' || item.CampaignSubType === 'ShoppingSmartAds') && item.BiddingScheme && item.BiddingScheme.Type === 'MaxConversions' && item.BiddingScheme.TargetCpa),\r\n });\r\n this.i18n = i18n;\r\n this.view = view;\r\n this.permissions = options.permissions;\r\n }\r\n\r\n pickProperty(item) {\r\n return {\r\n Id: item.Id,\r\n DeliveryStatus: item.DeliveryStatus,\r\n Budget: item.Budget,\r\n BiddingScheme: item.BiddingScheme,\r\n DeliveryStatusDetails: item.DeliveryStatusDetails,\r\n IsBidLandscapeAvailable: item.IsBidLandscapeAvailable,\r\n };\r\n }\r\n\r\n template({ value }) {\r\n const { DeliveryStatus } = value;\r\n const isAutoBiddingLimited = DeliveryStatus === 'AutoBiddingLimitedUnAttainableTarget';\r\n let { enabledBidLandscape, hasBidLandscapeIcon } = getBidLandscapeConfigs({\r\n permissions: this.permissions,\r\n value,\r\n });\r\n if (!isAutoBiddingLimited) {\r\n enabledBidLandscape = false;\r\n hasBidLandscapeIcon = false;\r\n }\r\n\r\n const getTargetCpaValue = () => {\r\n if (value && value.BiddingScheme && value.BiddingScheme.TargetCpa) {\r\n return _.isNull(value.BiddingScheme.TargetCpa) ? '-' : decimal.fromFloatToString(value.BiddingScheme.TargetCpa);\r\n }\r\n return '-';\r\n };\r\n\r\n const targetCpaValue = getTargetCpaValue();\r\n\r\n return template({\r\n targetCpaValue,\r\n budgetType: value && value.Budget ? value.Budget.Type : null,\r\n budgetId: value && value.Budget ? value.Budget.Id : null,\r\n enabledBidlandscape: enabledBidLandscape && targetCpaValue !== '-',\r\n hasBidlandscapeIcon: hasBidLandscapeIcon && targetCpaValue !== '-',\r\n i18n: this.i18n,\r\n });\r\n }\r\n\r\n onPrompt({\r\n item, newPosition,\r\n }) {\r\n // disable edit while using existing bid strategy\r\n if (item.BidStrategyName) {\r\n window.App.views.alertCenter.showError(this.i18n.getString('Target_Edit_Not_Support_Hint'));\r\n return undefined;\r\n }\r\n const model = cloneDeep(item);\r\n model['BiddingScheme/TargetCpa'] = item.BiddingScheme.TargetCpa;\r\n const flattenedSchema = {\r\n ...Campaign,\r\n properties: {\r\n ...Campaign.properties,\r\n 'BiddingScheme/TargetCpa': Campaign.properties.BiddingScheme.schema.properties.TargetCpa,\r\n },\r\n };\r\n const minValue = (NumberRange && NumberRange.targetCpa && NumberRange.targetCpa.minValue) || 0.01;\r\n const maxValue = (NumberRange && NumberRange.targetCpa && NumberRange.targetCpa.maxValue) || 4000;\r\n const fieldName =\r\n {\r\n property: 'BiddingScheme/TargetCpa',\r\n control: targetCpaInlineEditorView,\r\n i18n: this.i18n,\r\n curTargetCpa: decimal.fromFloatToString(item.BiddingScheme.TargetCpa),\r\n minValue,\r\n maxValue,\r\n currencySymbol: this.i18n.getCurrencySymbol(PageContext.AccountCurrencyCode),\r\n currencySymbolClassName: `symbol-size-${this.i18n.getCurrencySymbol(PageContext.AccountCurrencyCode).length}`,\r\n };\r\n return InlineEditableColumnPrompt({\r\n position: newPosition,\r\n item: model,\r\n view: this.view,\r\n i18n: this.i18n,\r\n fieldName,\r\n schema: flattenedSchema,\r\n saveModel: (updated, editorView) => {\r\n if (updated['BiddingScheme/TargetCpa'] < minValue || updated['BiddingScheme/TargetCpa'] > maxValue) {\r\n return;\r\n }\r\n const bidObject = cloneDeep(item.BiddingScheme);\r\n bidObject.TargetCpa = updated['BiddingScheme/TargetCpa'];\r\n const toUpdated = _.defaults({\r\n BiddingScheme: bidObject,\r\n }, _.pick(this.item, 'Id'));\r\n\r\n jsData.Campaign\r\n .update(item.Id, toUpdated, { adapter: 'bulk', cacheResponse: false })\r\n .finally(withUiBlock(this.view.grid.gridView.$el))\r\n .then(() => {\r\n editorView.trigger('save');\r\n this.view.grid.gridView.refresh(true);\r\n })\r\n .catch((response) => {\r\n let errorMessage;\r\n const unexpectedError = this.i18n.getString('ErrorNumber_-1');\r\n if (!response || !response.errors) {\r\n errorMessage = unexpectedError;\r\n } else {\r\n const errors = i18nErrors.getBulkApiErrors(response.errors);\r\n if (!errors || !errors[0] || !errors[0].message) {\r\n errorMessage = unexpectedError;\r\n } else {\r\n errorMessage = errors[0].message;\r\n }\r\n }\r\n editorView.setErrors({\r\n 'BiddingScheme/TargetCpa': errorMessage,\r\n });\r\n });\r\n },\r\n parentContainerSelector: '.grid-and-disclaim-container',\r\n });\r\n }\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { InlineEditableColumnPrompt } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { Campaign } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { targetRoasInlineEditorView } from '@bingads-webui-campaign-react/portfolio-bid-strategy-shared';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport { getBidLandscapeConfigs } from '@bingads-webui-campaign/campaignui-common-columns';\r\nimport template from './bid-strategy-target-roas.pug';\r\n\r\nexport class BidStrategyTargetROASColumn extends CampaignuiBaseColumn {\r\n constructor(options) {\r\n const {\r\n i18n,\r\n view,\r\n helpId = 'pop_BA_CampaignGrids_TargetROAS',\r\n } = options;\r\n\r\n const title = i18n.getString('ColumnName_BidStrategyTargetRoas');\r\n\r\n super({\r\n name: 'DisplayBiddingStrategyTargetRoas',\r\n property: ['BiddingScheme'],\r\n title,\r\n sortable: 'DisplayBiddingStrategyTargetRoas',\r\n type: 'number',\r\n helpId,\r\n bodyClasses: ['grid-column-biddingStrategyTargetRoas'],\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n enableEdit: item =>\r\n (item.BiddingScheme && _.result(item.BiddingScheme, 'Type') === 'TargetRoas') ||\r\n ((item.CampaignSubType === 'ShoppingSmartAds' || item.CampaignType === 'Default' || item.CampaignType === 'Shopping') && item.BiddingScheme && _.result(item.BiddingScheme, 'Type') === 'MaxConversionValue' && _.result(item.BiddingScheme, 'TargetRoas')),\r\n });\r\n this.i18n = i18n;\r\n this.view = view;\r\n this.permissions = options.permissions;\r\n }\r\n\r\n pickProperty(item) {\r\n return {\r\n Id: item.Id,\r\n Budget: item.Budget,\r\n DeliveryStatus: item.DeliveryStatus,\r\n BiddingScheme: item.BiddingScheme,\r\n DeliveryStatusDetails: item.DeliveryStatusDetails,\r\n IsBidLandscapeAvailable: item.IsBidLandscapeAvailable,\r\n };\r\n }\r\n\r\n template({ value }) {\r\n const { DeliveryStatus } = value;\r\n const isAutoBiddingLimited = DeliveryStatus === 'AutoBiddingLimitedUnAttainableTarget';\r\n let { enabledBidLandscape, hasBidLandscapeIcon } = getBidLandscapeConfigs({\r\n permissions: this.permissions,\r\n value,\r\n });\r\n if (!isAutoBiddingLimited) {\r\n enabledBidLandscape = false;\r\n hasBidLandscapeIcon = false;\r\n }\r\n\r\n const getTargetRoasValue = () => {\r\n if (value && value.BiddingScheme && value.BiddingScheme.TargetRoas) {\r\n return _.isNull(value.BiddingScheme.TargetRoas) ? '-' : decimal.fromFloatToPercentString(value.BiddingScheme.TargetRoas * 100);\r\n }\r\n return '-';\r\n };\r\n\r\n const targetRoasValue = getTargetRoasValue();\r\n\r\n return template({\r\n targetRoasValue,\r\n budgetType: value && value.Budget ? value.Budget.Type : null,\r\n budgetId: value && value.Budget ? value.Budget.Id : null,\r\n enabledBidlandscape: enabledBidLandscape && targetRoasValue !== '-',\r\n hasBidlandscapeIcon: hasBidLandscapeIcon && targetRoasValue !== '-',\r\n i18n: this.i18n,\r\n });\r\n }\r\n\r\n onPrompt({\r\n item, newPosition,\r\n }) {\r\n // disable edit while using existing bid strategy\r\n if (item.BidStrategyName) {\r\n window.App.views.alertCenter.showError(this.i18n.getString('Target_Edit_Not_Support_Hint'));\r\n return undefined;\r\n }\r\n const model = cloneDeep(item);\r\n model['BiddingScheme/TargetRoas'] = decimal.fromLocalToFloat(item.BiddingScheme.TargetRoas * 100.0, 2);\r\n const flattenedSchema = {\r\n ...Campaign,\r\n properties: {\r\n ...Campaign.properties,\r\n 'BiddingScheme/TargetRoas': Campaign.properties.BiddingScheme.schema.properties.TargetRoas,\r\n },\r\n };\r\n const fieldName =\r\n {\r\n property: 'BiddingScheme/TargetRoas',\r\n control: targetRoasInlineEditorView,\r\n i18n: this.i18n,\r\n curTargetRoas: decimal.fromFloatToString(item.BiddingScheme.TargetRoas * 100.0, 2),\r\n };\r\n return InlineEditableColumnPrompt({\r\n position: newPosition,\r\n item: model,\r\n view: this.view,\r\n i18n: this.i18n,\r\n fieldName,\r\n schema: flattenedSchema,\r\n saveModel: (updated, editorView) => {\r\n if (updated['BiddingScheme/TargetRoas'] < 1.0 || updated['BiddingScheme/TargetRoas'] > 100000.0) {\r\n return;\r\n }\r\n const bidObject = cloneDeep(item.BiddingScheme);\r\n bidObject.TargetRoas = (updated['BiddingScheme/TargetRoas'] / 100.0).toFixed(4);\r\n const toUpdated = _.defaults({\r\n BiddingScheme: bidObject,\r\n }, _.pick(this.item, 'Id'));\r\n\r\n jsData.Campaign\r\n .update(item.Id, toUpdated, { adapter: 'bulk', cacheResponse: false })\r\n .finally(withUiBlock(this.view.grid.gridView.$el))\r\n .then(() => {\r\n editorView.trigger('save');\r\n this.view.grid.gridView.refresh(true);\r\n })\r\n .catch((response) => {\r\n let errorMessage;\r\n const unexpectedError = this.i18n.getString('ErrorNumber_-1');\r\n if (!response || !response.errors) {\r\n errorMessage = unexpectedError;\r\n } else {\r\n const errors = i18nErrors.getBulkApiErrors(response.errors);\r\n if (!errors || !errors[0] || !errors[0].message) {\r\n errorMessage = unexpectedError;\r\n } else {\r\n errorMessage = errors[0].message;\r\n }\r\n }\r\n editorView.setErrors({\r\n 'BiddingScheme/TargetRoas': errorMessage,\r\n });\r\n });\r\n },\r\n });\r\n }\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { InlineEditableColumnPrompt } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { Campaign } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { manualCpiInlineEditorView } from '@bingads-webui-campaign-react/portfolio-bid-strategy-shared';\r\nimport { NumberRange } from '@bingads-webui-campaign-legacy/bidding-strategy/viewmodel/setting';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\n\r\nexport class BidStrategyManualCPIColumn extends CampaignuiBaseColumn {\r\n constructor({\r\n i18n, view, helpId = 'pop_BA_CampaignGrids_ManualCPI',\r\n }) {\r\n const title = i18n.getString('BiddingStrategyType_ManualCpi');\r\n\r\n super({\r\n name: 'DisplayBiddingStrategyManualCpi',\r\n property: 'BiddingScheme',\r\n title,\r\n sortable: 'DisplayBiddingStrategyManualCpi',\r\n type: 'number',\r\n helpId,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n enableEdit: item =>\r\n item.BiddingScheme && item.BiddingScheme.Type === 'ManualCpa' && item.CampaignType === 'App' && item.BiddingScheme.ManualCPI,\r\n });\r\n this.i18n = i18n;\r\n this.view = view;\r\n }\r\n\r\n pickProperty(item) {\r\n return _.result(item, 'BiddingScheme', null);\r\n }\r\n\r\n template({ value }) {\r\n if (value && value.ManualCPI) {\r\n return _.isNull(value.ManualCPI) ? '-' : decimal.fromFloatToString(value.ManualCPI);\r\n }\r\n return '-';\r\n }\r\n\r\n onPrompt({\r\n item, newPosition,\r\n }) {\r\n // disable edit while using existing bid strategy\r\n if (item.BidStrategyName) {\r\n window.App.views.alertCenter.showError(this.i18n.getString('Target_Edit_Not_Support_Hint'));\r\n return undefined;\r\n }\r\n const model = cloneDeep(item);\r\n model['BiddingScheme/ManualCpi'] = item.BiddingScheme.ManualCPI;\r\n const flattenedSchema = {\r\n ...Campaign,\r\n properties: {\r\n ...Campaign.properties,\r\n 'BiddingScheme/ManualCpi': Campaign.properties.BiddingScheme.schema.properties.ManualCpi,\r\n },\r\n };\r\n const minValue = (NumberRange && NumberRange.manualCpi && NumberRange.manualCpi.minValue) || 0.01;\r\n const maxValue = (NumberRange && NumberRange.manualCpi && NumberRange.manualCpi.maxValue) || 4000;\r\n const fieldName =\r\n {\r\n property: 'BiddingScheme/ManualCpi',\r\n control: manualCpiInlineEditorView,\r\n i18n: this.i18n,\r\n curTargetCpi: decimal.fromFloatToString(item.BiddingScheme.ManualCPI),\r\n minValue,\r\n maxValue,\r\n currencySymbol: this.i18n.getCurrencySymbol(PageContext.AccountCurrencyCode),\r\n currencySymbolClassName: `symbol-size-${this.i18n.getCurrencySymbol(PageContext.AccountCurrencyCode).length}`,\r\n };\r\n return InlineEditableColumnPrompt({\r\n position: newPosition,\r\n item: model,\r\n view: this.view,\r\n i18n: this.i18n,\r\n fieldName,\r\n schema: flattenedSchema,\r\n saveModel: (updated, editorView) => {\r\n if (updated['BiddingScheme/ManualCpi'] < minValue || updated['BiddingScheme/ManualCpi'] > maxValue) {\r\n return;\r\n }\r\n const bidObject = cloneDeep(item.BiddingScheme);\r\n bidObject.ManualCpi = updated['BiddingScheme/ManualCpi'];\r\n const toUpdated = _.defaults({\r\n BiddingScheme: bidObject,\r\n }, _.pick(this.item, 'Id'));\r\n\r\n jsData.Campaign\r\n .update(item.Id, toUpdated, { adapter: 'bulk', cacheResponse: false })\r\n .finally(withUiBlock(this.view.grid.gridView.$el))\r\n .then(() => {\r\n editorView.trigger('save');\r\n this.view.grid.gridView.refresh(true);\r\n })\r\n .catch((response) => {\r\n let errorMessage;\r\n const unexpectedError = this.i18n.getString('ErrorNumber_-1');\r\n if (!response || !response.errors) {\r\n errorMessage = unexpectedError;\r\n } else {\r\n const errors = i18nErrors.getBulkApiErrors(response.errors);\r\n if (!errors || !errors[0] || !errors[0].message) {\r\n errorMessage = unexpectedError;\r\n } else {\r\n errorMessage = errors[0].message;\r\n }\r\n }\r\n editorView.setErrors({\r\n 'BiddingScheme/ManualCpi': errorMessage,\r\n });\r\n });\r\n },\r\n parentContainerSelector: '.grid-and-disclaim-container',\r\n });\r\n }\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { InlineEditableColumnPrompt } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { Campaign } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport PageContext from '@bingads-webui-static-legacy/page-context';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { manualCpcInlineEditorView } from '@bingads-webui-campaign-react/portfolio-bid-strategy-shared';\r\nimport { NumberRange } from '@bingads-webui-campaign-legacy/bidding-strategy/viewmodel/setting';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\n\r\nexport class BidStrategyManualCPCColumn extends CampaignuiBaseColumn {\r\n constructor({\r\n i18n, view, helpId = 'pop_BA_CampaignGrids_ManualCPI',\r\n }) {\r\n const title = i18n.getString('BiddingStrategyType_ManualCpc');\r\n\r\n super({\r\n name: 'DisplayBiddingStrategyManualCpc',\r\n property: 'BiddingScheme',\r\n title,\r\n sortable: 'DisplayBiddingStrategyManualCpc',\r\n type: 'number',\r\n helpId,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n enableEdit: item =>\r\n item.BiddingScheme && item.BiddingScheme.Type === 'ManualCpc' && item.CampaignType === 'App' && item.BiddingScheme.ManualCPC,\r\n });\r\n this.i18n = i18n;\r\n this.view = view;\r\n }\r\n\r\n pickProperty(item) {\r\n return _.result(item, 'BiddingScheme', null);\r\n }\r\n\r\n template({ value }) {\r\n if (value && value.ManualCPC) {\r\n return _.isNull(value.ManualCPC) ? '-' : decimal.fromFloatToString(value.ManualCPC);\r\n }\r\n return '-';\r\n }\r\n\r\n onPrompt({\r\n item, newPosition,\r\n }) {\r\n // disable edit while using existing bid strategy\r\n if (item.BidStrategyName) {\r\n window.App.views.alertCenter.showError(this.i18n.getString('Target_Edit_Not_Support_Hint'));\r\n return undefined;\r\n }\r\n const model = cloneDeep(item);\r\n model['BiddingScheme/ManualCpc'] = item.BiddingScheme.ManualCPC;\r\n const flattenedSchema = {\r\n ...Campaign,\r\n properties: {\r\n ...Campaign.properties,\r\n 'BiddingScheme/ManualCpc': Campaign.properties.BiddingScheme.schema.properties.ManualCpc,\r\n },\r\n };\r\n const minValue = (NumberRange && NumberRange.manualCpc && NumberRange.manualCpc.minValue) || 0.01;\r\n const maxValue = (NumberRange && NumberRange.manualCpc && NumberRange.manualCpc.maxValue) || 4000;\r\n const fieldName =\r\n {\r\n property: 'BiddingScheme/ManualCpc',\r\n control: manualCpcInlineEditorView,\r\n i18n: this.i18n,\r\n curTargetCpc: decimal.fromFloatToString(item.BiddingScheme.ManualCPC),\r\n minValue,\r\n maxValue,\r\n currencySymbol: this.i18n.getCurrencySymbol(PageContext.AccountCurrencyCode),\r\n currencySymbolClassName: `symbol-size-${this.i18n.getCurrencySymbol(PageContext.AccountCurrencyCode).length}`,\r\n };\r\n return InlineEditableColumnPrompt({\r\n position: newPosition,\r\n item: model,\r\n view: this.view,\r\n i18n: this.i18n,\r\n fieldName,\r\n schema: flattenedSchema,\r\n saveModel: (updated, editorView) => {\r\n if (updated['BiddingScheme/ManualCpc'] < minValue || updated['BiddingScheme/ManualCpc'] > maxValue) {\r\n return;\r\n }\r\n const bidObject = cloneDeep(item.BiddingScheme);\r\n bidObject.ManualCpc = updated['BiddingScheme/ManualCpc'];\r\n const toUpdated = _.defaults({\r\n BiddingScheme: bidObject,\r\n }, _.pick(this.item, 'Id'));\r\n\r\n jsData.Campaign\r\n .update(item.Id, toUpdated, { adapter: 'bulk', cacheResponse: false })\r\n .finally(withUiBlock(this.view.grid.gridView.$el))\r\n .then(() => {\r\n editorView.trigger('save');\r\n this.view.grid.gridView.refresh(true);\r\n })\r\n .catch((response) => {\r\n let errorMessage;\r\n const unexpectedError = this.i18n.getString('ErrorNumber_-1');\r\n if (!response || !response.errors) {\r\n errorMessage = unexpectedError;\r\n } else {\r\n const errors = i18nErrors.getBulkApiErrors(response.errors);\r\n if (!errors || !errors[0] || !errors[0].message) {\r\n errorMessage = unexpectedError;\r\n } else {\r\n errorMessage = errors[0].message;\r\n }\r\n }\r\n editorView.setErrors({\r\n 'BiddingScheme/ManualCpc': errorMessage,\r\n });\r\n });\r\n },\r\n parentContainerSelector: '.grid-and-disclaim-container',\r\n });\r\n }\r\n}\r\n","import { inlineEditSave } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\n\r\nconst save = ({\r\n view,\r\n i18n,\r\n updated,\r\n fieldName,\r\n scenario,\r\n editorView,\r\n editorViewCallbackAfterUpdate,\r\n isDateType,\r\n}) => inlineEditSave({\r\n id: updated.Id,\r\n fieldName,\r\n updatedItem: updated,\r\n refreshGrid: true,\r\n}, {\r\n view,\r\n gridView: view.grid.gridView,\r\n resource: jsData.Campaign,\r\n scenario,\r\n i18n,\r\n i18nErrors,\r\n editorView,\r\n editorViewCallbackAfterUpdate,\r\n isDateType,\r\n});\r\n\r\nexport const getDateSaveAction = (fieldName, scenario) =>\r\n props => save({\r\n ...props,\r\n fieldName,\r\n scenario,\r\n });\r\n","import '@bingads-webui/kendo/kendo.data';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { DateInlineEditableColumnPrompt } from '@bingads-webui-campaign/date-inline-edit-prompt';\r\nimport { convertUTCDateToMachineDate, getCurrentDate, formatDate } from '@bingads-webui-campaign/summary-grid-helper';\r\n\r\nimport { getDateSaveAction } from '../inline-editable/date-save';\r\n\r\nconst fieldName = 'StartDate';\r\n\r\nexport class StartDateColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n, view, isForVNext }) {\r\n const title = i18n.getString('ColumnName_StartDate');\r\n\r\n super({\r\n name: fieldName,\r\n property: [fieldName, 'UseCampaignLevelDates'],\r\n title,\r\n editable: true,\r\n sortable: fieldName,\r\n type: 'string',\r\n helpId: 'pop_BA_Campaigns_StartDateColumn',\r\n enableEdit: item => item.UseCampaignLevelDates && new Date(item.StartDate) > getCurrentDate(),\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.i18n = i18n;\r\n this.view = view;\r\n this.isForVNext = isForVNext;\r\n }\r\n\r\n pickProperty(item) {\r\n if (item.$total) {\r\n return '';\r\n }\r\n\r\n return item.UseCampaignLevelDates && item.StartDate\r\n ? formatDate(item.StartDate, this.i18n)\r\n : this.i18n.getString('StartDate_None');\r\n }\r\n\r\n onPrompt({ position, item, newPosition }) {\r\n const saveDate = getDateSaveAction(fieldName, 'CampaignsGridStartDateColumn');\r\n\r\n const options = {\r\n position: this.isForVNext ? newPosition : position,\r\n isForVNext: this.isForVNext,\r\n item,\r\n view: this.view,\r\n i18n: this.i18n,\r\n fieldName,\r\n allowNoDate: false,\r\n selectedDate: convertUTCDateToMachineDate(new Date(item.StartDate), this.i18n),\r\n updater: saveDate,\r\n };\r\n\r\n if (item.EndDate) {\r\n options.maxDate = convertUTCDateToMachineDate(new Date(item.EndDate), this.i18n);\r\n }\r\n return DateInlineEditableColumnPrompt(options);\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport '@bingads-webui/kendo/kendo.data';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { DateInlineEditableColumnPrompt } from '@bingads-webui-campaign/date-inline-edit-prompt';\r\nimport { convertUTCDateToMachineDate, displayDate } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport { getLaterDate } from '@bingads-webui-campaign/date-setting';\r\n\r\nimport { getDateSaveAction } from '../inline-editable/date-save';\r\n\r\nconst fieldName = 'EndDate';\r\n\r\nexport class EndDateColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n, view, isForVNext }) {\r\n const title = i18n.getString('ColumnName_EndDate');\r\n\r\n super({\r\n name: fieldName,\r\n property: [fieldName, 'UseCampaignLevelDates'],\r\n title,\r\n editable: true,\r\n enableEdit: item => item.UseCampaignLevelDates,\r\n sortable: fieldName,\r\n type: 'string',\r\n helpId: 'pop_BA_Campaigns_EndDateColumn',\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n });\r\n this.i18n = i18n;\r\n this.view = view;\r\n this.isForVNext = isForVNext;\r\n }\r\n\r\n pickProperty(item) {\r\n if (item.$total) {\r\n return '';\r\n }\r\n\r\n return item.UseCampaignLevelDates\r\n ? displayDate(item.EndDate, 'EndDate_None', this.i18n)\r\n : this.i18n.getString('EndDate_Unavailable');\r\n }\r\n\r\n getMaxDate(budgetType, startDate) {\r\n if (budgetType === 'LifetimeBudgetStandard') {\r\n return getLaterDate(startDate, 365);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n onPrompt({ position, item, newPosition }) {\r\n const groupClass = `grid-group-${_.result(this.config, 'group', 'other')}`;\r\n const localizedStartDate = convertUTCDateToMachineDate(new Date(item.StartDate), this.i18n);\r\n\r\n const saveDate = getDateSaveAction(fieldName, 'CampaignsGridEndDateColumn');\r\n\r\n const options = {\r\n position: this.isForVNext ? newPosition : position,\r\n isForVNext: this.isForVNext,\r\n item,\r\n view: this.view,\r\n i18n: this.i18n,\r\n fieldName,\r\n allowNoDate: item.Budget?.Type === 'DailyStandard',\r\n minDate: localizedStartDate,\r\n maxDate: this.getMaxDate(item.Budget?.Type, localizedStartDate),\r\n customClass: groupClass,\r\n updater: saveDate,\r\n };\r\n\r\n if (item.EndDate) {\r\n options.selectedDate = convertUTCDateToMachineDate(new Date(item.EndDate), this.i18n);\r\n }\r\n return DateInlineEditableColumnPrompt(options);\r\n }\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { Campaign } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport { targetImpressionShareInlineEditorView, targetAdPositionInlineEditorView } from '@bingads-webui-campaign-react/portfolio-bid-strategy-shared';\r\nimport * as PopupEditor from '@bingads-webui/popup-editor';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport { cloneDeep } from '@bingads-webui-universal/primitive-utilities';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\n\r\nexport class BidStrategyTargetImpressionShareColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n, view, helpId = 'pop_BA_CampaignGrids_TargetImprShare' }) {\r\n const title = i18n.getString('ColumnName_BidStrategyTargetImpressionShare');\r\n\r\n super({\r\n name: 'DisplayBiddingStrategyTargetImpressionShare',\r\n property: 'BiddingScheme',\r\n title,\r\n sortable: 'DisplayBiddingStrategyTargetImpressionShare',\r\n type: 'number',\r\n helpId,\r\n helpAriaLabel: i18n.getString('Click to learn more about {{item}}', { item: title }),\r\n enableEdit: item =>\r\n item.BiddingScheme && item.BiddingScheme.Type === 'TargetImpressionShare',\r\n });\r\n this.i18n = i18n;\r\n this.view = view;\r\n }\r\n\r\n pickProperty(item) {\r\n return _.result(item, 'BiddingScheme', null);\r\n }\r\n\r\n template({ value }) {\r\n if (value && value.TargetImpressionShare) {\r\n return _.isNull(value.TargetImpressionShare) ? '-' : decimal.fromFloatToPercentString(value.TargetImpressionShare);\r\n }\r\n return '-';\r\n }\r\n\r\n onPrompt({\r\n item, newPosition,\r\n }) {\r\n // disable edit while using existing bid strategy\r\n if (item.BidStrategyName) {\r\n window.App.views.alertCenter.showError(this.i18n.getString('Target_Edit_Not_Support_Hint'));\r\n return undefined;\r\n }\r\n const model = cloneDeep(item);\r\n model['BiddingScheme/TargetImpressionShare'] = item.BiddingScheme.TargetImpressionShare;\r\n model['BiddingScheme/TargetAdPosition'] = item.BiddingScheme.TargetAdPosition;\r\n const flattenedSchema = {\r\n ...Campaign,\r\n properties: {\r\n ...Campaign.properties,\r\n 'BiddingScheme/TargetImpressionShare': Campaign.properties.BiddingScheme.schema.properties.TargetImpressionShare,\r\n 'BiddingScheme/TargetAdPosition': Campaign.properties.BiddingScheme.schema.properties.TargetAdPosition,\r\n },\r\n };\r\n const fields =\r\n [{\r\n property: 'BiddingScheme/TargetImpressionShare',\r\n valueProperty: 'BiddingScheme/TargetAdPosition',\r\n control: targetImpressionShareInlineEditorView,\r\n i18n: this.i18n,\r\n curTargetImpressionShare: decimal.fromFloatToString(item.BiddingScheme.TargetImpressionShare),\r\n curTargetAdPosition: item.BiddingScheme.TargetAdPosition,\r\n },\r\n {\r\n property: 'BiddingScheme/TargetAdPosition',\r\n control: targetAdPositionInlineEditorView,\r\n }];\r\n return PopupEditor.prompt({\r\n position: newPosition,\r\n i18n: this.i18n,\r\n schema: flattenedSchema,\r\n model,\r\n fields,\r\n hasLabels: false,\r\n template: 'inline',\r\n saveModel: (updated, editorView) => {\r\n if (updated['BiddingScheme/TargetImpressionShare'] < 0.01 || updated['BiddingScheme/TargetImpressionShare'] > 100.0) {\r\n return;\r\n }\r\n const bidObject = cloneDeep(item.BiddingScheme);\r\n bidObject.TargetImpressionShare = updated['BiddingScheme/TargetImpressionShare'];\r\n bidObject.TargetAdPosition = updated['BiddingScheme/TargetAdPosition'];\r\n const toUpdated = _.defaults({\r\n BiddingScheme: bidObject,\r\n }, _.pick(this.item, 'Id'));\r\n\r\n jsData.Campaign\r\n .update(item.Id, toUpdated, { adapter: 'bulk', cacheResponse: false })\r\n .finally(withUiBlock(this.view.grid.gridView.$el))\r\n .then(() => {\r\n editorView.trigger('save');\r\n this.view.grid.gridView.refresh(true);\r\n })\r\n .catch((response) => {\r\n let errorMessage;\r\n const unexpectedError = this.i18n.getString('ErrorNumber_-1');\r\n if (!response || !response.errors) {\r\n errorMessage = unexpectedError;\r\n } else {\r\n const errors = i18nErrors.getBulkApiErrors(response.errors);\r\n if (!errors || !errors[0] || !errors[0].message) {\r\n errorMessage = unexpectedError;\r\n } else {\r\n errorMessage = errors[0].message;\r\n }\r\n }\r\n editorView.setErrors({\r\n 'BiddingScheme/TargetImpressionShare': errorMessage,\r\n });\r\n });\r\n },\r\n parentContainerSelector: '.grid-and-disclaim-container',\r\n });\r\n }\r\n}\r\n","import { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport _ from 'underscore';\r\nimport OptimizationScoreTemplate from './optimization-score.pug';\r\n\r\nexport class OptimizationScoreColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'OptimizationScore',\r\n property: 'OptimizationScore',\r\n title: i18n.getString('ColumnName_OptimizationScore'),\r\n sortable: 'OptimizationScore',\r\n bodyClasses: ['grid-column-OptimizationScoreColumn'],\r\n type: 'number',\r\n helpId: 'Pop_BA_Recommendations_OptScoreAcct',\r\n });\r\n this.i18n = i18n;\r\n }\r\n\r\n pickProperty(item) {\r\n const { Id: cpid, Name } = item;\r\n const ariaLabel = this.i18n.getString('Click to scope to the recommendation with campaign {{campaignName}}', { campaignName: Name });\r\n return {\r\n display: _.has(item, 'OptimizationScore'), OptimizationScore: _.result(item, 'OptimizationScore', null), cpid, ariaLabel,\r\n };\r\n }\r\n\r\n template({ value }) {\r\n const newProps = _.defaults({ value: this.formatter(value.OptimizationScore), pathname: '/campaign/vnext/recommendations/All' }, value);\r\n return OptimizationScoreTemplate(newProps);\r\n }\r\n\r\n get formatter() {\r\n if (!this.cached.formatter) {\r\n this.cached.formatter = val =>\r\n (_.isFinite(val) ?\r\n _.compose(this.i18n.percentToFixedFormatter({ digits: 1 }), Number)(val)\r\n : val);\r\n }\r\n return this.cached.formatter;\r\n }\r\n}\r\n","import { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport PerformanceInsightsTemplate from './performance-insights.pug';\r\n\r\nexport class PerformanceInsightsColumn extends CampaignuiBaseColumn {\r\n constructor({ i18n }) {\r\n super({\r\n name: 'PerformanceInsights',\r\n property: 'PerformanceInsights',\r\n title: i18n.getString('ColumnName_PerformanceInsights'),\r\n sortable: 'PerformanceInsights',\r\n bodyClasses: ['grid-column-PerformanceInsightsColumn'],\r\n type: 'number',\r\n helpId: 'Pop_BA_Recommendations_OptScoreAcct', // TODO: Update helpId\r\n });\r\n this.i18n = i18n;\r\n }\r\n\r\n pickProperty(item) {\r\n // TODO: integrate API response\r\n let performanceInsights = {\r\n issue: 0,\r\n recommendation: 0,\r\n };\r\n if (item.Name === 'OPT-Test-Campaign-00') {\r\n performanceInsights = {\r\n issue: 2,\r\n recommendation: 1,\r\n };\r\n } else if (item.Name === 'OPT-Test-Campaign-01') {\r\n performanceInsights = {\r\n issue: 0,\r\n recommendation: 1,\r\n };\r\n }\r\n return performanceInsights;\r\n }\r\n\r\n template({ value }) {\r\n const { i18n } = this;\r\n const { issue, recommendation } = value;\r\n let status = '-';\r\n if (issue > 0) {\r\n status = issue === 1 ? i18n.getString('Issue_Singular', { n: issue }) : i18n.getString('Issues', { n: issue });\r\n } else if (recommendation > 0) {\r\n status = recommendation === 1 ? i18n.getString('Recommendation_Singular', { n: recommendation }) : i18n.getString('Recommendations', { n: recommendation });\r\n }\r\n return PerformanceInsightsTemplate({ status, issue, recommendation });\r\n }\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport _ from 'underscore';\r\nimport { campaignMetricCategoriesFactory } from '@bingads-webui/custom-columns-shared-config';\r\nimport { RSAAdCustomizerAttributeColumn } from '@bingads-webui-campaign/rsa-ad-customizer-attribute-column';\r\n\r\nimport {\r\n BudgetColumn,\r\n LifetimeBudgetColumn,\r\n QualityScoreColumn,\r\n ColumnCTR,\r\n ColumnAverageCPC,\r\n ColumnAveragePosition,\r\n ColumnTopImpressionRate,\r\n ColumnAbsoluteTopImpressionRate,\r\n ColumnConversions,\r\n ColumnConversionsCredit,\r\n DeliveryColumn,\r\n ColumnClicksWithFluctuation,\r\n ColumnImpressionsWithFluctuation,\r\n ColumnSpendWithFluctuation,\r\n BidStrategyNameColumn,\r\n CampaignBidStrategyTypeColumn as BidStrategyTypeColumn,\r\n ColumnViewThroughConversionsCredit,\r\n ColumnViewThroughConversions,\r\n} from '@bingads-webui-campaign/campaignui-common-columns';\r\nimport {\r\n CampaignCashbackPercentColumn,\r\n CashbackBudgetColumn,\r\n CampaignCashbackScopeColumn,\r\n CampaignCouponColumn,\r\n} from '@bingads-webui-campaign/personalized-offer-columns';\r\n\r\nimport { LabelsColumn } from '@bingads-webui-campaign/labels';\r\nimport { ColumnsConfigBuilder } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport decimal from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport { Columns, SelectedColumns } from '@bingads-webui-component-legacy/bingads-grid/service/column-chooser-preferences';\r\nimport { CustomColumns } from '@bingads-webui-component-legacy/bingads-grid/service/custom-column-preferences';\r\nimport { LegacyColumns, LegacySelectedColumns } from '@bingads-webui-component-legacy/bingads-grid/service/legacy-column-chooser-preferences';\r\nimport { LegacyGridFlag } from '@bingads-webui-component-legacy/bingads-grid/service/legacy-grid-flag-preferences';\r\nimport InlineSharedBudgetEditor from '@bingads-webui-campaign-legacy/shared-budget/view/campaigns-grid-inline-shared-budget-editor';\r\nimport InlineBudgetEditor from '@bingads-webui-campaign-legacy/budget/view/inline-budget-editor';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\n\r\nimport { CampaignIdColumn } from './attributes/campaign-id';\r\nimport { CampaignLanguagesColumn } from './attributes/campaign-languages';\r\nimport { CampaignTypeColumn } from './attributes/campaign-type';\r\nimport { CampaignColumn } from './attributes/campaign';\r\nimport { StatusIconColumn } from './attributes/status-icon';\r\nimport { BidStrategyTargetCPAColumn } from './attributes/bid-strategy-target-cpa';\r\nimport { BidStrategyTargetROASColumn } from './attributes/bid-strategy-target-roas';\r\nimport { BidStrategyManualCPIColumn } from './attributes/bid-strategy-manual-cpi';\r\nimport { BidStrategyManualCPCColumn } from './attributes/bid-strategy-manual-cpc';\r\nimport { StartDateColumn } from './attributes/start-date';\r\nimport { EndDateColumn } from './attributes/end-date';\r\nimport { BidStrategyTargetImpressionShareColumn } from './attributes/bid-strategy-target-impression-share';\r\nimport { OptimizationScoreColumn } from './attributes/optimization-score';\r\nimport { PerformanceInsightsColumn } from './attributes/performance-insights';\r\nimport template from './attributes/budget.pug';\r\n\r\nconst Permissions = config.get('Permissions');\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaigns-tab/campaigns');\r\n\r\n// we use the shared version of delivery column to share code, but we need to keep the legacy name\r\n// otherwise, user column chooser preference will break\r\nclass DeliveryColumnForCampaign extends DeliveryColumn {\r\n constructor(...args) {\r\n super(...args);\r\n\r\n this.config.name = 'DeliveryStatus';\r\n }\r\n}\r\n\r\nconst {\r\n IsViewThroughConversionEnabled,\r\n IsAudienceSOVEnabled,\r\n IsAvgPositionDeprecationPhase1Enabled,\r\n IsAvgPositionDeprecationPhase2Enabled,\r\n IsPersonalizedOffersEnabled,\r\n IsPersonalizedOffersV2Enabled,\r\n IsPersonalizedOffersV3Enabled,\r\n IsViewThroughConversionsRevenueEnabled,\r\n IsPersonalizedOffersV4Enabled,\r\n IsOptimizationScoreInCampaignsGridEnabled,\r\n dynamic = {},\r\n IsPerformanceInsightsEnabled,\r\n} = Permissions;\r\nconst {\r\n PartialConversions: IsPartialConversionsEnabled,\r\n ColumnConversion: IsColumnConversionEnabled,\r\n CPSReporting,\r\n InstallPerformanceColumns,\r\n ConvValueRules,\r\n CampaignLifetimeBudget,\r\n MaeLifetimeBudgetExclusion,\r\n} = dynamic;\r\nconst usePartialConversions = IsPartialConversionsEnabled && IsColumnConversionEnabled;\r\n\r\nconst isPortfolioBidStrategyEnabled = _.result(Permissions.dynamic, 'PortfolioBidStrategy');\r\nconst isAppAdsCampaignPhaseOneEnabled = _.result(Permissions.dynamic, 'AppAdsCampaignPhaseOne');\r\nconst isUnifiedAppAdsEnabled = _.result(Permissions.dynamic, 'UnifiedAppAds');\r\n\r\nconst isCampaignLifetimeBudgetEnabled = CampaignLifetimeBudget && !MaeLifetimeBudgetExclusion;\r\n\r\nfunction isCampaignTypeAllowed() {\r\n return Permissions.IsEnhancedShoppingCampaignAllowed ||\r\n Permissions.IsDynamicSearchAdsV1Enabled ||\r\n Permissions.IsAIMCampaignEnabled;\r\n}\r\n\r\nfunction getBuilder(options) {\r\n const builder = new ColumnsConfigBuilder({ Permissions });\r\n\r\n const getCampaignTypeGlobalFilter = options && options.getCampaignTypeGlobalFilter;\r\n\r\n builder\r\n .addCategory('Attributes', category => category.addColumns(_.compact([\r\n StatusIconColumn,\r\n CampaignColumn,\r\n BudgetColumn,\r\n isCampaignLifetimeBudgetEnabled && LifetimeBudgetColumn,\r\n IsOptimizationScoreInCampaignsGridEnabled ? OptimizationScoreColumn : null,\r\n IsPerformanceInsightsEnabled ? PerformanceInsightsColumn : null,\r\n DeliveryColumnForCampaign,\r\n CampaignIdColumn,\r\n isCampaignTypeAllowed() ? CampaignTypeColumn : null,\r\n isPortfolioBidStrategyEnabled && BidStrategyNameColumn,\r\n BidStrategyTypeColumn,\r\n isCampaignLifetimeBudgetEnabled && StartDateColumn,\r\n isCampaignLifetimeBudgetEnabled && EndDateColumn,\r\n BidStrategyTargetCPAColumn,\r\n isAppAdsCampaignPhaseOneEnabled && BidStrategyManualCPIColumn,\r\n isUnifiedAppAdsEnabled && BidStrategyManualCPCColumn,\r\n BidStrategyTargetROASColumn,\r\n BidStrategyTargetImpressionShareColumn,\r\n QualityScoreColumn,\r\n CampaignLanguagesColumn,\r\n LabelsColumn,\r\n IsPersonalizedOffersEnabled && !IsPersonalizedOffersV4Enabled\r\n ? CampaignCashbackScopeColumn : null,\r\n IsPersonalizedOffersEnabled && !IsPersonalizedOffersV4Enabled &&\r\n !(IsPersonalizedOffersV2Enabled || IsPersonalizedOffersV3Enabled) ?\r\n CashbackBudgetColumn : null,\r\n IsPersonalizedOffersEnabled && !IsPersonalizedOffersV4Enabled ?\r\n CampaignCashbackPercentColumn : null,\r\n IsPersonalizedOffersV3Enabled && !IsPersonalizedOffersV4Enabled ? CampaignCouponColumn : null,\r\n ])))\r\n .addPerformanceCategoryForCampaign({\r\n withFluctuations: true,\r\n IsAvgPositionDeprecationPhase2Enabled,\r\n getCampaignTypeGlobalFilter,\r\n })\r\n .addConversionsCategory({\r\n withFluctuations: true,\r\n withPartialConversions: IsPartialConversionsEnabled,\r\n IsViewThroughConversionEnabled,\r\n IsViewThroughConversionsRevenueEnabled,\r\n IsColumnConversionEnabled,\r\n isCPSEnabled: CPSReporting,\r\n isInstallColumnsEnabled: InstallPerformanceColumns,\r\n isConversionValueRuleColumnsEnabled: ConvValueRules,\r\n })\r\n .addCompetitiveCategoryForCampaignOrAdGroups({\r\n IsAudienceSOVEnabled,\r\n });\r\n\r\n if (Permissions.IsCallMeteringAllowed) {\r\n builder.addCallDetailsCategoryForCampaigns();\r\n }\r\n\r\n builder\r\n .setLockedColumns(_.compact([\r\n StatusIconColumn,\r\n CampaignColumn,\r\n ]))\r\n .setSelectedColumns(_.compact([\r\n StatusIconColumn,\r\n CampaignColumn,\r\n BudgetColumn,\r\n isCampaignLifetimeBudgetEnabled && LifetimeBudgetColumn,\r\n IsOptimizationScoreInCampaignsGridEnabled ? OptimizationScoreColumn : null,\r\n IsPerformanceInsightsEnabled ? PerformanceInsightsColumn : null,\r\n DeliveryColumnForCampaign,\r\n isCampaignTypeAllowed() ? CampaignTypeColumn : null,\r\n isPortfolioBidStrategyEnabled && BidStrategyNameColumn,\r\n BidStrategyTypeColumn,\r\n isCampaignLifetimeBudgetEnabled && StartDateColumn,\r\n isCampaignLifetimeBudgetEnabled && EndDateColumn,\r\n BidStrategyTargetCPAColumn,\r\n isAppAdsCampaignPhaseOneEnabled && BidStrategyManualCPIColumn,\r\n isUnifiedAppAdsEnabled && BidStrategyManualCPCColumn,\r\n BidStrategyTargetROASColumn,\r\n BidStrategyTargetImpressionShareColumn,\r\n LabelsColumn,\r\n ColumnClicksWithFluctuation,\r\n ColumnImpressionsWithFluctuation,\r\n ColumnCTR,\r\n ColumnAverageCPC,\r\n ColumnSpendWithFluctuation,\r\n usePartialConversions && ColumnConversionsCredit,\r\n !usePartialConversions && ColumnConversions,\r\n usePartialConversions && ColumnViewThroughConversionsCredit,\r\n !usePartialConversions && ColumnViewThroughConversions,\r\n !IsAvgPositionDeprecationPhase1Enabled\r\n && !IsAvgPositionDeprecationPhase2Enabled\r\n && ColumnAveragePosition,\r\n IsAvgPositionDeprecationPhase1Enabled && ColumnTopImpressionRate,\r\n IsAvgPositionDeprecationPhase1Enabled && ColumnAbsoluteTopImpressionRate,\r\n ]));\r\n\r\n return builder;\r\n}\r\n\r\nexport function getColumnsConfig(options) {\r\n _.extend(options, {\r\n InlineSharedBudgetEditor,\r\n InlineBudgetEditor,\r\n budgetTemplate: template,\r\n decimal,\r\n permissions: Permissions,\r\n isCampaign: true,\r\n showExperiment: Permissions.IsExperimentsEnabled,\r\n });\r\n\r\n const getCampaignTypeGlobalFilter = options && options.getCampaignTypeGlobalFilter;\r\n return getBuilder({ getCampaignTypeGlobalFilter }).getColumnsConfig(options);\r\n}\r\n\r\nexport function getColumnChooserConfig({ filterService, isForVNext = false, getCampaignTypeGlobalFilter }) {\r\n let customColumnConfig;\r\n if (Permissions.IsCustomColumnsInCampaignsSupported) {\r\n const { metricCategories, segmentCategories } = campaignMetricCategoriesFactory(Permissions);\r\n customColumnConfig = {\r\n enabled: true,\r\n metricCategories,\r\n segmentCategories,\r\n filterService,\r\n };\r\n }\r\n\r\n return _.defaults(getBuilder({ getCampaignTypeGlobalFilter }).getColumnChooserConfig({\r\n patchQuery: true,\r\n Columns,\r\n SelectedColumns,\r\n LegacyColumns,\r\n LegacySelectedColumns,\r\n LegacyGridFlag,\r\n i18n,\r\n CustomColumns,\r\n customColumnConfig,\r\n permissions: Permissions,\r\n }), {\r\n isForVNext,\r\n i18nErrors,\r\n AdCustomizerAttribute: jsData.AdCustomizerAttribute,\r\n resource: jsData.CampaignAdCustomizerAttribute,\r\n RSAAdCustomizerAttributeColumn,\r\n enableRSAAdCustomizer: true,\r\n });\r\n}\r\n","const i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaigns-tab/campaigns');\r\n\r\nexport function getPluginsConfig() {\r\n return {\r\n popColumns: {\r\n i18n,\r\n },\r\n };\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\nimport { crossPageSelectHeadRow } from '@bingads-webui/projection-grid-cross-page-select-all';\r\nimport { getGridName } from '@bingads-webui-campaign/inline-download-grids-metadata';\r\nimport { sortableHeaderTemplate, validateOrder } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport preferenceService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport { getColumnsConfig } from '../columns/index';\r\nimport { getPluginsConfig } from './plugin-config';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaigns-tab/campaigns');\r\nconst schemaI18n = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\n\r\nexport function getConfig({\r\n dataSource,\r\n scope,\r\n view,\r\n filterService,\r\n addDateChangeListener,\r\n customHeaderOffset,\r\n isForVNext,\r\n viewport,\r\n isDataFetchManagerSource = false,\r\n gridName = getGridName('Campaign'),\r\n preferenceConfig,\r\n getCampaignTypeGlobalFilter,\r\n}) {\r\n const tableName = i18n.getString('EntityType_Campaign_Plural');\r\n const permissions = config.get('Permissions');\r\n const { dynamic = {} } = permissions;\r\n\r\n const enableGridFlexLayout = _.result(dynamic, 'GridFlexLayout', false) && isForVNext && (gridName === getGridName('Campaign'));\r\n const scrolling = {\r\n header: {\r\n type: 'sticky',\r\n offset: customHeaderOffset || (() => $('nav.navbar-default.navbar-fixed-top').height()),\r\n attributes: {\r\n 'aria-label': i18n.getString('{{tableName}} table header', { tableName }),\r\n role: 'rowgroup',\r\n },\r\n },\r\n virtualized: true,\r\n };\r\n\r\n const columns = getColumnsConfig({\r\n i18n,\r\n schemaI18n,\r\n scope,\r\n view,\r\n isForVNext,\r\n enableGridFlexLayout,\r\n getCampaignTypeGlobalFilter,\r\n });\r\n\r\n validateOrder(preferenceConfig, columns, gridName, permissions);\r\n\r\n if (viewport) {\r\n scrolling.viewport = viewport;\r\n }\r\n\r\n return {\r\n name: gridName,\r\n legacyGridName: 'CampaignsGrid',\r\n tableClasses: enableGridFlexLayout ? ['table'] : ['table', 'table-bordered'],\r\n tableAttributes: { 'aria-label': tableName },\r\n dataSource,\r\n selection: true,\r\n filterService,\r\n rows: {\r\n headRows:\r\n isForVNext\r\n ? [\r\n 'column-header-rows',\r\n ]\r\n : [\r\n crossPageSelectHeadRow(),\r\n 'column-header-rows',\r\n ],\r\n },\r\n columns,\r\n scrolling,\r\n plugins: getPluginsConfig({\r\n view,\r\n scope,\r\n addDateChangeListener,\r\n }),\r\n i18n,\r\n sortableHeader: {\r\n template: sortableHeaderTemplate,\r\n },\r\n preferenceService,\r\n config,\r\n isDataFetchManagerSource,\r\n ...enableGridFlexLayout && { layout: 'flex' },\r\n };\r\n}\r\n","const navigation = ({\r\n toJSON: () => ({}),\r\n source: {\r\n $call: () => ({\r\n toJSON: () => ({}),\r\n navigation,\r\n }),\r\n },\r\n parameters: {},\r\n});\r\n\r\nexport const mockEdm = {\r\n root: {\r\n identifyEntitySet: () => ({\r\n toJSON: () => ({}),\r\n navigation,\r\n }),\r\n },\r\n};\r\n","/* eslint-disable no-underscore-dangle */\r\n/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport $ from 'jquery';\r\nimport _ from 'underscore';\r\n\r\nimport { paginationPlugin } from '@bingads-webui/projection-grid-pagination';\r\nimport { columnChooserPlugin } from '@bingads-webui-campaign/projection-grid-column-chooser';\r\nimport { editablePlugin } from '@bingads-webui-campaign/projection-grid-editable';\r\nimport { auctionInsightPlugin } from '@bingads-webui-campaign/projection-grid-auction-insight';\r\nimport { inlineDownloadWithoutFilterstatePlugin } from '@bingads-webui-campaign/projection-grid-inline-download';\r\nimport {\r\n jsdataRawDataPlugin as commonJsdataRawDataPlugin,\r\n} from '@bingads-webui/projection-grid-js-data-raw-data';\r\nimport { periodOverPeriodPlugin } from '@bingads-webui-campaign/projection-grid-period-over-period';\r\nimport { segmentPlugin } from '@bingads-webui-campaign/projection-grid-segment';\r\nimport {\r\n campaignSegmentationTypeEnum,\r\n segmentationType,\r\n} from '@bingads-webui-campaign/segmentation-utilities';\r\nimport { inlineErrorPlugin } from '@bingads-webui/projection-grid-inline-error';\r\nimport { bidStrategy } from '@bingads-webui-campaign/projection-grid-bid-strategy';\r\nimport { uiBlockerPlugin } from '@bingads-webui/projection-grid-uiblocker';\r\nimport { assistedSelectionPlugin } from '@bingads-webui/projection-grid-assisted-selection';\r\nimport { performanceLogPlugin, perfMarkerPlugin } from '@bingads-webui-campaign/pgrid-performance-log';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\nimport { aggregatedRowsPluginBuilder } from '@bingads-webui-campaign/pgrid-aggregated-rows';\r\nimport { dateFilterPlugin } from '@bingads-webui-campaign/projection-grid-date-filter';\r\nimport { Campaign } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport appState from '@bingads-webui-component-legacy/state/index';\r\nimport edm from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport sessionStore from '@bingads-webui-component-legacy/js-data-storage/session-storage';\r\nimport { DownloadView } from '@bingads-webui-campaign-legacy/griddownload/view/adapter';\r\nimport { setSegType, getSegType } from '@bingads-webui-component-legacy/bingads-grid/service/segmentation-preferences';\r\nimport ChangeBiddingStrategyModel from '@bingads-webui-static-legacy/bulk-edit/model/shared/changeBiddingStrategy';\r\nimport ChangeBiddingStrategyView from '@bingads-webui-static-legacy/bulk-edit/view/shared/changeBiddingStrategy';\r\nimport logger from '@bingads-webui-static-legacy/instrumentation/index';\r\n\r\nimport { getColumnChooserConfig } from '../columns/index';\r\nimport { mockEdm } from '../../demo/mock/edm';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaigns-tab/campaigns');\r\nconst s$i18n = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\n\r\nconst permissions = appConfig.get('Permissions');\r\n\r\nconst jsdataRawDataPlugin = commonJsdataRawDataPlugin({\r\n getRawData: _.property('raw'),\r\n rawDataAccessor(ds) {\r\n return ds._rawData || ds.dataSource.dfmRawData;\r\n },\r\n});\r\n\r\nexport function getCampaignsPlugins({\r\n filterService,\r\n preferenceService,\r\n router,\r\n scope,\r\n isForVNext,\r\n addDateChangeListener,\r\n p$daterange,\r\n campaignTabPerfMarker,\r\n viewport,\r\n processReportRule,\r\n gridId,\r\n preexecuteFlag = false,\r\n getCampaignTypeGlobalFilter,\r\n}) {\r\n const aggregatedRowsPlugin = aggregatedRowsPluginBuilder({\r\n i18n,\r\n keys: {\r\n overallI18nKey: 'Campaigns_Total_New',\r\n filteredI18nKey: 'Campaigns_Filtered_Total_New',\r\n waterfallFilterI18nKey: 'Campaigns_Quickfilter_Total_New',\r\n },\r\n permissions,\r\n filterService,\r\n customConfig: {\r\n showPmaxRow: true,\r\n showLinkedInRow: true,\r\n },\r\n });\r\n\r\n const columnChooserConfig = getColumnChooserConfig({ isForVNext, filterService, getCampaignTypeGlobalFilter });\r\n\r\n const ReportEmailRule = appState.get('$ReportEmailRule');\r\n appState.unset('$ReportEmailRule');\r\n\r\n const inlineDownloadConfig = {\r\n isForVNext,\r\n p$daterange,\r\n DownloadView,\r\n isAvailable: true,\r\n gridId: gridId || 'CampaignGrid',\r\n schema: Campaign,\r\n s$i18n,\r\n i18n,\r\n ReportEmailRule,\r\n };\r\n\r\n if (processReportRule) {\r\n inlineDownloadConfig.processReportRule = processReportRule;\r\n }\r\n\r\n if (isForVNext) {\r\n columnChooserConfig.customToolbarIcon = 'ba-TripleColumnSolid';\r\n }\r\n\r\n const getSegmentationTypes = () => {\r\n if (permissions.IsVerticalAdsReportingPhase1Enabled) {\r\n return [...campaignSegmentationTypeEnum, segmentationType.AdScenario];\r\n }\r\n\r\n return campaignSegmentationTypeEnum;\r\n };\r\n\r\n return _.compact([{\r\n // For accurate grid init latency, PerfMarkerPlugin should be the first plugin to load.\r\n plugin: perfMarkerPlugin,\r\n config: {\r\n appConfig,\r\n marker: campaignTabPerfMarker,\r\n },\r\n }, {\r\n plugin: paginationPlugin,\r\n config: {\r\n availablePageSizes: [20, 50, 100, 200],\r\n enableRandomPage: false,\r\n pageNumberLabelText: isForVNext ? '' : i18n.getString('Grid_Page_Number_Label_Text'),\r\n pageSizeText: i18n.getString('Grid_ShowRows'),\r\n totalPageCountText: i18n.getString('Grid_PageOf'),\r\n resetPageNumberOnSort: true,\r\n },\r\n },\r\n {\r\n plugin: auctionInsightPlugin,\r\n config: {\r\n isForVNext,\r\n pageName: 'campaigns',\r\n i18n,\r\n state: appState,\r\n legacyRouter: router,\r\n route: 'campaign_auction_insight',\r\n crossPageSelectNotAllowedI18nKey: 'CampaignSummaryPage_MultiplePageSelectionNotAllowed',\r\n shouldNavigateToCompetitionTab: permissions.IsBAACompetitionEnabled,\r\n scope,\r\n sessionStore,\r\n preferenceService,\r\n permissions,\r\n getCampaignTypeGlobalFilter,\r\n },\r\n },\r\n {\r\n plugin: inlineDownloadWithoutFilterstatePlugin,\r\n config: inlineDownloadConfig,\r\n },\r\n {\r\n plugin: segmentPlugin,\r\n config: {\r\n i18n,\r\n permissions,\r\n state: appState,\r\n isOdataActionSource: true,\r\n edm: preexecuteFlag ? mockEdm : edm,\r\n getSegType,\r\n setSegType,\r\n cultureShortDatePattern: appConfig.get('CultureDateTimeFormat').ShortDatePattern,\r\n cellTemplates: {\r\n Name: 'default',\r\n },\r\n segmentationTypes: getSegmentationTypes(),\r\n },\r\n },\r\n {\r\n plugin: bidStrategy,\r\n config: {\r\n isForVNext,\r\n ChangeBiddingStrategyView,\r\n ChangeBiddingStrategyModel,\r\n i18n,\r\n permissions,\r\n },\r\n }, !appConfig.get('CurrentAccountInActive') && !permissions.IsReadOnlyUser && {\r\n plugin: editablePlugin,\r\n config: { i18n },\r\n },\r\n {\r\n plugin: uiBlockerPlugin,\r\n config: { el: viewport || $(isForVNext ? '.campaigns-page' : '#child-page') },\r\n },\r\n {\r\n plugin: performanceLogPlugin,\r\n config: { appConfig, logger },\r\n },\r\n {\r\n plugin: periodOverPeriodPlugin,\r\n config: { i18n },\r\n },\r\n {\r\n plugin: columnChooserPlugin,\r\n config: columnChooserConfig,\r\n },\r\n {\r\n plugin: dateFilterPlugin,\r\n config: {\r\n isForVNext,\r\n state: appState,\r\n isOdataActionSource: true,\r\n edm: preexecuteFlag ? mockEdm : edm,\r\n addDateChangeListener,\r\n p$daterange, // FIXME: Wasn't in original campaigngrid\r\n },\r\n },\r\n {\r\n plugin: inlineErrorPlugin({\r\n errorIconClasses: ['grid-error'],\r\n }),\r\n },\r\n {\r\n plugin: assistedSelectionPlugin,\r\n },\r\n {\r\n plugin: a11yPlugin,\r\n config: { i18n },\r\n },\r\n {\r\n plugin: aggregatedRowsPlugin,\r\n },\r\n {\r\n plugin: jsdataRawDataPlugin,\r\n }]);\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\nimport { setUpErrorHandling } from '@bingads-webui-campaign/summary-grid-helper';\r\n\r\nimport { CampaignsGrid } from './campaigns-grid';\r\nimport { getConfig } from './grid-config';\r\nimport { getCampaignsPlugins } from './plugins';\r\n\r\nconst i18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/campaigns-tab/campaigns');\r\n\r\nexport function createCampaignsGrid({\r\n dataSource,\r\n filterService,\r\n getAdditionalPlugins = () => [],\r\n preferenceConfig,\r\n preferenceService,\r\n router,\r\n scope,\r\n addDateChangeListener,\r\n p$daterange,\r\n isForVNext = false,\r\n viewport,\r\n gridConfig,\r\n instrumentation,\r\n serverContext,\r\n campaignTabPerfMarker,\r\n customHeaderOffset,\r\n isDataFetchManagerSource,\r\n gridName,\r\n pageName,\r\n preexecuteFlag = false,\r\n theme,\r\n processReportRule,\r\n gridId,\r\n enableCopyPaste = true,\r\n azureUrlRewrite,\r\n getCampaignTypeGlobalFilter,\r\n newI18n,\r\n}) {\r\n // performance targets details page also use campaign grid\r\n // verify functionalility to avoid regression after modification\r\n return new CampaignsGrid({\r\n isForVNext,\r\n enableCopyPaste,\r\n filterService,\r\n gridConfig,\r\n serverContext,\r\n instrumentation,\r\n newI18n,\r\n getGridConfig: view => getConfig({\r\n dataSource,\r\n scope,\r\n view,\r\n filterService,\r\n preferenceConfig,\r\n router,\r\n isForVNext,\r\n viewport,\r\n customHeaderOffset,\r\n isDataFetchManagerSource,\r\n gridName,\r\n instrumentation,\r\n getCampaignTypeGlobalFilter,\r\n }),\r\n getPlugins: view => getCampaignsPlugins({\r\n filterService,\r\n router,\r\n scope,\r\n isForVNext,\r\n addDateChangeListener,\r\n p$daterange,\r\n campaignTabPerfMarker,\r\n viewport,\r\n processReportRule,\r\n gridId,\r\n preexecuteFlag,\r\n getCampaignTypeGlobalFilter,\r\n preferenceService,\r\n }).concat(getAdditionalPlugins(view)),\r\n router,\r\n scope,\r\n setupDataSourceErrorHandling: view => setUpErrorHandling({\r\n gridView: view,\r\n scope,\r\n dataSource,\r\n i18n,\r\n }),\r\n preferenceConfig,\r\n pageName,\r\n preexecuteFlag,\r\n theme,\r\n azureUrlRewrite,\r\n perfMarker: campaignTabPerfMarker,\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport { DeterministicView } from '@bingads-webui/deterministic-view';\r\nimport { CampaignsDatePicker } from '@bingads-webui-campaign/campaigns-date-picker';\r\nimport { customizedInlineEditTemplate, convertMachineDateToUTCDate } from '@bingads-webui-campaign/summary-grid-helper';\r\n\r\nexport class DateInlineEditView extends DeterministicView {\r\n initialize({\r\n minDate, maxDate, selectedDate, allowNoDate, i18n, fieldName,\r\n }) {\r\n this.i18n = i18n;\r\n this.fieldName = fieldName;\r\n this.datePicker = new CampaignsDatePicker({\r\n minDate,\r\n maxDate,\r\n selectedDate,\r\n allowNoDate,\r\n noDateLabel: i18n.getString('noEndDate'),\r\n dateLabel: i18n.getString('EndBy'),\r\n });\r\n this.setChild('subEditView', this.datePicker);\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .btn-primary': 'save',\r\n 'click .btn-default': 'cancel',\r\n 'click input[type=radio]': 'removeError',\r\n };\r\n }\r\n\r\n get template() {\r\n return ({ model }) => customizedInlineEditTemplate({ model, i18n: this.i18n });\r\n }\r\n\r\n save() {\r\n const date = this.datePicker.getSelectedDate();\r\n const isSelectCustomEndDate = this.$el.find('.date input[type=radio]').is(':checked');\r\n\r\n if (isSelectCustomEndDate && _.isNull(date)) {\r\n this.setErrors({\r\n EndDate: this.i18n.getString('Campaign_Validation_EndDateInvalid'),\r\n StartDate: this.i18n.getString('Campaign_Validation_StartDateInvalid'),\r\n });\r\n return;\r\n }\r\n\r\n this.trigger('save', {\r\n newSelectedDate: date ? convertMachineDateToUTCDate(date, this.i18n) : null,\r\n });\r\n }\r\n\r\n cancel() {\r\n this.trigger('close');\r\n }\r\n\r\n removeError() {\r\n this.setErrors({});\r\n }\r\n\r\n setErrors(errorMapping) {\r\n const errorContent = errorMapping && errorMapping[this.fieldName] ?\r\n errorMapping[this.fieldName] :\r\n '';\r\n if (errorContent.length > 0) {\r\n document.querySelectorAll('.grid-error-list').forEach(el => el.classList.remove('hide'));\r\n } else {\r\n document.querySelectorAll('.grid-error-list').forEach(el => el.classList.add('hide'));\r\n }\r\n // eslint-disable-next-line no-param-reassign\r\n document.querySelectorAll('.grid-error-message').forEach((el) => { el.innerHTML = errorContent; });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { GridCustomizedPopupEditor } from '@bingads-webui-campaign/grid-customized-popup-editor';\r\nimport { DateInlineEditView } from './date-inline-edit-view';\r\n\r\nexport function DateInlineEditableColumnPrompt({\r\n position,\r\n isForVNext,\r\n item,\r\n allowNoDate,\r\n selectedDate,\r\n minDate,\r\n maxDate,\r\n view,\r\n i18n,\r\n fieldName,\r\n customClass = 'grid-group-other',\r\n updater = null,\r\n}) {\r\n const dateEditorView = new DateInlineEditView({\r\n minDate,\r\n maxDate,\r\n allowNoDate,\r\n selectedDate,\r\n i18n,\r\n fieldName,\r\n });\r\n\r\n dateEditorView.on('save', ({ newSelectedDate }) => {\r\n const updated = _.extendOwn({}, item);\r\n\r\n updated[fieldName] = newSelectedDate ?\r\n newSelectedDate.toISOString() :\r\n newSelectedDate;\r\n\r\n if (view && view.instrumentation) {\r\n const sn = view.instrumentation.datepicker;\r\n const adsActivity = sn && sn.create().inlineDateChange.create();\r\n if (adsActivity && adsActivity.signal) {\r\n adsActivity.signal(`${fieldName} date changed: ${newSelectedDate}`);\r\n }\r\n }\r\n\r\n return updater({\r\n view,\r\n i18n,\r\n fieldName,\r\n updated,\r\n editorView: dateEditorView,\r\n editorViewCallbackAfterUpdate: () => {\r\n dateEditorView.trigger('close');\r\n },\r\n isDateType: true,\r\n });\r\n });\r\n\r\n const editorView = new GridCustomizedPopupEditor({\r\n editorView: dateEditorView.render(),\r\n cellPosition: position,\r\n renderBelow: false,\r\n className: `adgroup-grid-inline-edit-popup grid-popupeditor ${customClass}`,\r\n parentContainerSelector: isForVNext ? '.grid-and-disclaim-container' : null,\r\n });\r\n\r\n return editorView.render();\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withLock, keyVault } from '@bingads-webui-react/popup-manager';\r\nimport { Callout } from '@bingads-webui-react/callout';\r\n\r\nexport const CalloutWithLock = ({ lockKey, ...props }) => {\r\n const CalloutWithLockInner = withLock(Callout, {\r\n lockKey,\r\n force: true,\r\n });\r\n\r\n return ();\r\n};\r\n\r\nCalloutWithLock.propTypes = {\r\n lockKey: PropTypes.string,\r\n};\r\n\r\nCalloutWithLock.defaultProps = {\r\n lockKey: keyVault.hoveringPopup,\r\n};\r\n","import React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { keyVault } from '@bingads-webui-react/popup-manager';\r\nimport { CalloutWithLock } from './callout-with-lock';\r\n\r\nexport const GridTooltip = (props) => {\r\n const { onClose, onMouseLeave, parentView } = props;\r\n\r\n useEffect(() => {\r\n if (parentView) {\r\n parentView.on('closePopup', onClose);\r\n }\r\n\r\n return () => {\r\n if (parentView) {\r\n parentView.off('closePopup');\r\n }\r\n };\r\n }, [onClose, parentView]);\r\n\r\n useEffect(() => {\r\n document.querySelector('.table-page-container')?.addEventListener('scroll.actionCallout', onClose);\r\n document.querySelector('.table-page-container .scrollbars-view')?.addEventListener('scroll.actionCallout', onClose);\r\n\r\n return () => {\r\n document.querySelector('.table-page-container')?.removeEventListener('scroll.actionCallout', onClose);\r\n document.querySelector('.table-page-container .scrollbars-view')?.removeEventListener('scroll.actionCallout', onClose);\r\n };\r\n }, [onClose]);\r\n\r\n return (\r\n
\r\n \r\n
);\r\n};\r\n\r\nGridTooltip.propTypes = {\r\n parentView: PropTypes.shape(),\r\n onClose: PropTypes.func.isRequired,\r\n onMouseLeave: PropTypes.func.isRequired,\r\n};\r\n\r\nGridTooltip.defaultProps = {\r\n parentView: null,\r\n};\r\n","/* eslint-disable react/no-unused-prop-types */\r\nimport Backbone from 'backbone';\r\nimport ReactDOM from 'react-dom';\r\nimport React from 'react';\r\nimport { ChoiceGroup, TextField, Stack, DefaultButton, PrimaryButton } from '@fluentui/react';\r\nimport decimalNumber from '@bingads-webui-component-legacy/humanize/decimal';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport { getInlineEditorViewStyles } from './style';\r\n\r\nconst InlineEditor = (props) => {\r\n const [selectedKey, setSelectedKey] = React.useState(props.isUsingInheritedValue ? 'inherited' : 'customed');\r\n const [customedValue, setCustomedValue] =\r\n React.useState((props.dataType === 'Percent' && !_.isEmpty(props.customedValue)) ? props.customedValue.replace('%', '') : props.customedValue);\r\n\r\n const onChangeOption = (ev, option) => {\r\n setSelectedKey(option.key);\r\n };\r\n const styles = getInlineEditorViewStyles();\r\n const inheritedValueName = props.i18n.getString(`RSAAdCustomizer_${props.inheritedValueLevel}_Value`);\r\n const options = [\r\n {\r\n key: 'inherited',\r\n labelId: 'inherited',\r\n text: props.i18n.getString('RSAAdCustomizer_Use_Inherited_Value'),\r\n onRenderField: (optionPops, render) => (\r\n
\r\n {render(optionPops)}\r\n
\r\n
\r\n {\r\n _.isEmpty(props.inheritedValue) ? '-' : `${inheritedValueName}: ${props.inheritedValue}`\r\n }\r\n
\r\n
\r\n ),\r\n },\r\n {\r\n key: 'customed',\r\n labelId: 'customed',\r\n text: props.i18n.getString('RSAAdCustomizer_Use_Custom_Value'),\r\n },\r\n ];\r\n\r\n return (\r\n
\r\n \r\n {\r\n selectedKey === 'customed' ?\r\n (\r\n \r\n {props.attributeName} ({props.dataType})\r\n \r\n setCustomedValue(value, selectedKey)}\r\n />\r\n {\r\n props.dataType === 'Percent' ?\r\n % : null\r\n }\r\n \r\n \r\n ) : null\r\n }\r\n\r\n \r\n props.save(customedValue, selectedKey, props.dataType)} />\r\n props.cancel()} />\r\n \r\n
\r\n );\r\n};\r\n\r\nInlineEditor.propTypes = {\r\n isUsingInheritedValue: PropTypes.bool.isRequired,\r\n inheritedValue: (PropTypes.number || PropTypes.string).isRequired,\r\n inheritedValueLevel: PropTypes.string.isRequired,\r\n attributeName: PropTypes.string.isRequired,\r\n dataType: PropTypes.string.isRequired,\r\n customedValue: (PropTypes.number || PropTypes.string).isRequired,\r\n cancel: PropTypes.func.isRequired,\r\n save: PropTypes.func.isRequired,\r\n i18n: PropTypes.func.isRequired,\r\n};\r\n\r\nexport class AdCustomizerAttributeInlineEditor extends Backbone.View {\r\n initialize({\r\n isUsingInheritedValue,\r\n inheritedValue,\r\n inheritedValueLevel,\r\n value,\r\n valueLevel,\r\n currentLevel,\r\n dataType,\r\n attributeName,\r\n i18n = { getString: x => x },\r\n }) {\r\n this.i18n = i18n;\r\n this.isUsingInheritedValue = isUsingInheritedValue;\r\n this.inheritedValue = this.isUsingInheritedValue ? value : inheritedValue;\r\n this.inheritedValueLevel = this.isUsingInheritedValue ? valueLevel : inheritedValueLevel;\r\n this.value = value;\r\n this.valueLevel = valueLevel;\r\n this.currentLevel = currentLevel;\r\n this.dataType = dataType;\r\n this.attributeName = attributeName;\r\n }\r\n\r\n render() {\r\n ReactDOM.render(\r\n this.cancel()}\r\n save={(value, selectedKey, dataType) => this.save(value, selectedKey, dataType)}\r\n i18n={this.i18n}\r\n />,\r\n this.el\r\n );\r\n return this;\r\n }\r\n\r\n save(customedValue, selectedKey, dataType) {\r\n if (selectedKey === 'inherited' && !this.isUsingInheritedValue) {\r\n this.trigger('save', { value: 'delete_value' });\r\n return;\r\n }\r\n if (selectedKey === 'customed' && !_.isEmpty(customedValue) &&\r\n (this.value !== customedValue || this.currentLevel !== this.valueLevel)) {\r\n const formattedValue = dataType === 'String' || dataType === 'Price' ? customedValue : decimalNumber.fromLocalToFloat(customedValue) || customedValue;\r\n this.trigger('save', { value: formattedValue });\r\n return;\r\n }\r\n this.trigger('close');\r\n }\r\n\r\n cancel() {\r\n this.trigger('close');\r\n }\r\n}\r\n","export const getInlineEditorViewStyles = () => ({\r\n choiceGroup: {\r\n root: {\r\n maxWidth: '190px',\r\n selectors: {\r\n 'label.ms-ChoiceField-field': {\r\n padding: '0px',\r\n },\r\n 'div.inherited-value': {\r\n paddingLeft: '30px',\r\n wordBreak: 'break-all',\r\n },\r\n },\r\n },\r\n },\r\n textField: {\r\n fieldGroup: {\r\n root: {\r\n selectors: {\r\n '&:after': {\r\n display: 'none',\r\n },\r\n },\r\n },\r\n },\r\n },\r\n});\r\n","import _ from 'underscore';\r\nimport { CampaignuiBaseColumn } from '@bingads-webui-campaign/campaignui-base-column';\r\nimport { SchemaI18n } from '@bingads-webui-universal/schema-i18n';\r\nimport { GridCustomizedPopupEditor } from '@bingads-webui-campaign/grid-customized-popup-editor';\r\nimport { inlineEditSave } from '@bingads-webui-campaign/summary-grid-helper';\r\nimport CampaignCacheManager from '@bingads-webui-campaign-legacy/cache-manager';\r\nimport template from './rsa-ad-customizer-attribute-template.pug';\r\nimport { AdCustomizerAttributeInlineEditor } from './inline-editor-view';\r\n\r\nexport class RSAAdCustomizerAttributeColumn extends CampaignuiBaseColumn {\r\n constructor(columnConfig) {\r\n const {\r\n Name,\r\n i18n,\r\n i18nErrors,\r\n Datatype,\r\n gridType,\r\n resource,\r\n gridView,\r\n permissions,\r\n } = columnConfig;\r\n const dataTypeI18nKey = `RSAAdCustomizer_Attribute_${Datatype}`;\r\n super(_.defaults({\r\n title: `${Name} (${i18n.getString(dataTypeI18nKey)})`,\r\n name: `RSAAdCustomizerAttributes-${Name}`,\r\n property: 'RSAAdCustomizerAttributes',\r\n sortable: false,\r\n bodyClasses: ['grid-column-Delivery'],\r\n i18n,\r\n enableEdit: item => gridType !== 'Campaign' || item.CampaignType === 'Default',\r\n }, columnConfig));\r\n\r\n this.rawName = Name;\r\n this.gridType = gridType;\r\n this.resource = resource;\r\n this.i18n = i18n;\r\n this.i18nErrors = i18nErrors;\r\n this.gridView = gridView;\r\n this.dataType = Datatype;\r\n this.permissions = permissions;\r\n }\r\n\r\n get title() {\r\n return this.config.title;\r\n }\r\n\r\n onPrompt({ event, item, newPosition }) {\r\n if (event.target.className.includes('editorial-status')) {\r\n return null;\r\n }\r\n const RSAAdCustomizerAttribute = this.findAttribute(item.RSAAdCustomizerAttributes);\r\n if (!RSAAdCustomizerAttribute) return null;\r\n\r\n const AdCustomizerAttributeInlineEditorView = new AdCustomizerAttributeInlineEditor({\r\n i18n: this.i18n,\r\n isUsingInheritedValue: this.gridType !== RSAAdCustomizerAttribute.ValueSetAtLevel,\r\n inheritedValue: RSAAdCustomizerAttribute.InheritedValue,\r\n inheritedValueLevel: RSAAdCustomizerAttribute.InheritedValueSetAtLevel,\r\n valueLevel: RSAAdCustomizerAttribute.ValueSetAtLevel,\r\n value: RSAAdCustomizerAttribute.Value,\r\n currentLevel: this.gridType,\r\n dataType: this.dataType,\r\n attributeName: RSAAdCustomizerAttribute.Name,\r\n });\r\n\r\n AdCustomizerAttributeInlineEditorView.on('save', ({ value }) => {\r\n inlineEditSave({\r\n id: RSAAdCustomizerAttribute.Id,\r\n additionalPayload: {\r\n Name: RSAAdCustomizerAttribute.Name,\r\n AdCustomizerAttributeValue: value,\r\n [this.gridType]: { Id: item.Id },\r\n },\r\n }, {\r\n gridView: this.gridView,\r\n resource: this.resource,\r\n i18n: this.i18n,\r\n i18nErrors: this.i18nErrors,\r\n editorView: AdCustomizerAttributeInlineEditorView,\r\n editorViewCallbackAfterUpdate: () => {\r\n AdCustomizerAttributeInlineEditorView.trigger('close');\r\n CampaignCacheManager.invalidate('AdCustomizerAttribute');\r\n this.gridView.refresh(true);\r\n },\r\n });\r\n });\r\n const groupClass = `grid-group-${_.result(this.config, 'group', 'other')}`;\r\n const editorView = new GridCustomizedPopupEditor({\r\n editorView: AdCustomizerAttributeInlineEditorView.render(),\r\n cellPosition: newPosition,\r\n renderBelow: false,\r\n className: `grid-popupeditor ${groupClass}`,\r\n parentContainerSelector: '.grid-and-disclaim-container',\r\n });\r\n\r\n return editorView.render();\r\n }\r\n\r\n pickProperty(item) {\r\n return {\r\n RSAAdCustomizerAttribute: this.findAttribute(item.RSAAdCustomizerAttributes),\r\n };\r\n }\r\n\r\n findAttribute(attributes) {\r\n return _.find(attributes, attribute => attribute.Name === this.rawName);\r\n }\r\n\r\n template({ value }) {\r\n const { RSAAdCustomizerAttribute } = value;\r\n const schemaI18n = new SchemaI18n({ i18n: this.config.i18n });\r\n\r\n let defaultValue = '-';\r\n let showInheritIcon = false;\r\n if (RSAAdCustomizerAttribute && !_.isEmpty(RSAAdCustomizerAttribute.Value)) {\r\n defaultValue = RSAAdCustomizerAttribute.Value;\r\n if (this.gridType !== RSAAdCustomizerAttribute.ValueSetAtLevel) {\r\n showInheritIcon = true;\r\n }\r\n }\r\n const editorialStatus =\r\n RSAAdCustomizerAttribute ? RSAAdCustomizerAttribute.EditorialStatus : null;\r\n return template({\r\n Value: defaultValue,\r\n editorialStatus,\r\n editorialStatusText: editorialStatus ? schemaI18n.enum('EditorialStatus', editorialStatus) : null,\r\n showInheritIcon,\r\n i18n: this.i18n,\r\n permissions: this.permissions,\r\n Id: RSAAdCustomizerAttribute ? RSAAdCustomizerAttribute.Id : '',\r\n ValueSetAtLevel: RSAAdCustomizerAttribute ? RSAAdCustomizerAttribute.ValueSetAtLevel : '',\r\n });\r\n }\r\n}\r\n","import _ from 'underscore';\r\nimport { odata } from '@bingads-webui/http-util';\r\n\r\n\r\nconst odataURLMap = {\r\n Account: '/Customers(:customer_id)/Accounts(:account_id)/AdCustomizerAttributes/Default.GetEditorialReasons',\r\n Campaign: '/Customers(:customer_id)/Accounts(:account_id)/Campaigns(:campaign_id)/AdCustomizerAttributes/Default.GetEditorialReasons',\r\n AdGroup: '/Customers(:customer_id)/Accounts(:account_id)/Campaigns(:campaign_id)/AdGroups(:adgroup_id)/AdCustomizerAttributes/Default.GetEditorialReasons',\r\n Keyword: '/Customers(:customer_id)/Accounts(:account_id)/Campaigns(:campaign_id)/AdGroups(:adgroup_id)/Keywords(:keyword_id)/AdCustomizerAttributes/Default.GetEditorialReasons',\r\n};\r\nexport function getAppealRejections({\r\n attributeId,\r\n ajaxOptions,\r\n valueLevel,\r\n}) {\r\n const odataURL = odataURLMap[valueLevel];\r\n const options = _.extend(\r\n { url: odataURL, contentType: 'application/json' }, ajaxOptions,\r\n {\r\n data: {\r\n EntityIds: [parseInt(attributeId, 10)],\r\n },\r\n }\r\n );\r\n\r\n return odata.post(options)\r\n .then((data) => {\r\n if (data && !data.Errors) {\r\n return data;\r\n }\r\n return {};\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { getEditorialTemplates, ENTITY } from '@bingads-webui-campaign/delivery-status-popup-factory';\r\nimport { getFwdLinkId } from '@bingads-webui-campaign/api-errors';\r\nimport { getAppealRejections } from './get-editorial-reasons';\r\n\r\nexport function getEditorialReasonsTemplate({\r\n i18n,\r\n commonI18n,\r\n ajaxOptions,\r\n attributeId,\r\n valueLevel,\r\n instrumentation,\r\n permissions,\r\n}, deliveryStatus) {\r\n return new Promise((resolve) => {\r\n // send request to fetch editorial reasons\r\n getAppealRejections({\r\n attributeId, ajaxOptions, valueLevel,\r\n }).then((response) => {\r\n let reasons = [];\r\n const { value } = response || {};\r\n if (value && !_.isEmpty(value) && !_.isEmpty(value[0].Reasons)) {\r\n reasons = value[0].Reasons;\r\n }\r\n\r\n const options = {\r\n reasons,\r\n i18n,\r\n commonI18n,\r\n instrumentation,\r\n ajaxOptions,\r\n editorialRejection: {\r\n getFwdLinkId,\r\n },\r\n errI18n: i18n,\r\n locationI18n: i18n,\r\n entity: ENTITY.CUSTOMIZERFEED,\r\n deliveryStatus,\r\n permissions,\r\n };\r\n\r\n const reasonTemplates = getEditorialTemplates(options);\r\n\r\n resolve(reasonTemplates);\r\n });\r\n });\r\n}\r\n","import _ from 'underscore';\r\nimport ko from 'knockout';\r\n\r\nexport class BaseLocationRecommendationModel {\r\n constructor({\r\n deps,\r\n }) {\r\n this.locationRecommendations = ko.observable([]);\r\n this.locationImpressionGain = ko.computed(() =>\r\n _.reduce(\r\n this.locationRecommendations(),\r\n (ret, { EstimatedIncreaseInImpressions }) => ret + EstimatedIncreaseInImpressions,\r\n 0\r\n ));\r\n this.locationTrafficGain = ko.computed(() => {\r\n const idList = [];\r\n const { QueriesFiltered, QueriesPassedLocationFiltering } =\r\n _.reduce(this.locationRecommendations(), (ret, recommend) => {\r\n const campaignId = _.chain(ret).result('Campaign').result('Id').value();\r\n let passedFiltering = 0;\r\n if (!_.contains(idList, campaignId)) {\r\n idList.push(campaignId);\r\n passedFiltering = recommend.QueriesPassedLocationFiltering;\r\n }\r\n return {\r\n QueriesFiltered: ret.QueriesFiltered + recommend.QueriesFiltered,\r\n QueriesPassedLocationFiltering:\r\n ret.QueriesPassedLocationFiltering + passedFiltering,\r\n };\r\n }, { QueriesFiltered: 0, QueriesPassedLocationFiltering: 0 });\r\n\r\n const totalTraffic = QueriesPassedLocationFiltering;\r\n if (totalTraffic === 0) {\r\n return 0;\r\n }\r\n return deps.i18n.formatPercentToFixed(QueriesFiltered / totalTraffic);\r\n });\r\n }\r\n}\r\n","import ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport { BaseLocationRecommendationModel } from './base-location-recommendation-model';\r\n\r\nexport default class Model extends BaseLocationRecommendationModel {\r\n constructor({\r\n i18n,\r\n scope,\r\n isExpanded,\r\n }) {\r\n super({\r\n deps: {\r\n i18n,\r\n },\r\n });\r\n this.campaignLength = ko.computed(() => _.chain(this.locationRecommendations())\r\n .pluck('Campaign')\r\n .pluck('Id')\r\n .uniq()\r\n .size()\r\n .value());\r\n this.description = ko.computed(() => i18n.getString('Inline_Location_Recommendation_Description', {\r\n trafficGain: this.locationTrafficGain(),\r\n impressionGain: this.locationImpressionGain(),\r\n }));\r\n this.selectedItems = ko.observableArray([]);\r\n this.isActionButtonEnabled = ko.computed(() => this.selectedItems().length > 0);\r\n this.banner = ko.computed(() => {\r\n let key = 'Inline_Location_Recommendation_Account_Banner';\r\n if (_.isFinite(scope.campaignId)) {\r\n key = 'Inline_Location_Recommendation_Campaign_Banner';\r\n }\r\n return i18n.getString(key, {\r\n recommendationCount: _.size(this.locationRecommendations()),\r\n trafficGain: this.locationTrafficGain(),\r\n impressionGain: this.locationImpressionGain(),\r\n campaignNumber: this.campaignLength(),\r\n });\r\n });\r\n this.hasRecommendation = ko.computed(() => _.size(this.locationRecommendations()) > 0);\r\n this.isExpanded = ko.observable(isExpanded);\r\n this.clickCollapse = () => {\r\n this.isExpanded(!this.isExpanded());\r\n };\r\n this.criterions = ko.observableArray([]);\r\n this.recommendationsOnMap = ko.observableArray([]);\r\n this.isMapShow = ko.computed(() =>\r\n _.size(this.criterions()) > 0 || _.size(this.recommendationsOnMap()) > 0);\r\n this.showLocationsRecommendationsGrid = ko.computed(() =>\r\n this.hasRecommendation() || this.isMapShow());\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport ko from 'knockout';\r\nimport _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { withUiBlock } from '@bingads-webui/uiblocker';\r\nimport { LocationRecommendationGrid } from '@bingads-webui-campaign/location-recommendation-grid';\r\nimport inlineTemplate from './inline-template.pug';\r\nimport locationGridAccountTemplate from './location-grid-account-template.pug';\r\nimport locationGridCampaignTemplate from './location-grid-campaign-template.pug';\r\nimport locationGridTemplate from './location-grid-template.pug';\r\nimport Model from './model';\r\n\r\n// Start your code from here for component inline-location-recommendation\r\nconst recommendationType = 'NewLocationTargetOpportunity';\r\nconst channel = 'campaignsetting';\r\nconst templates = {\r\n inlineTemplate,\r\n locationGridAccountTemplate,\r\n locationGridCampaignTemplate,\r\n};\r\n\r\nfunction logViewEvent(deps, opportunitys) {\r\n const { logger, constants } = deps;\r\n _.each(opportunitys, ({ OpportunityId: id, Campaign = {} }) => {\r\n logger.logMessage(\r\n [constants.LOGCATEGORY.TRACE],\r\n constants.LOGLEVEL.INFO,\r\n 'Recommendations',\r\n {\r\n type: recommendationType,\r\n typeId: 216, // opportunity type id, correspond to recommendation type https://msasg.visualstudio.com/Bing_Ads/_git/AdInsights?path=%2Fprivate%2FMTv2%2FPlugins%2FOpportunity%2FSchema%2FOpportunityType.cs&version=GBmaster\r\n id,\r\n campaignId: Campaign.Id,\r\n isClick: false,\r\n channel,\r\n }\r\n );\r\n });\r\n}\r\n\r\nexport class InlineLocationRecommendation extends Backbone.View {\r\n initialize(options) {\r\n this.options = options;\r\n this.deps = options.deps;\r\n this.dataSource = options.dataSource;\r\n this.isAllSelected = false;\r\n this.i18n = this.deps.i18n;\r\n this.model = new Model({\r\n i18n: this.i18n,\r\n scope: options.scope,\r\n isExpanded: !!options.isExpanded,\r\n });\r\n this.alertHelper = new this.deps.AlertHelper({ i18n: this.i18n });\r\n this.isAccountLevel = !_.isFinite(options.scope.campaignId);\r\n const columns = this.isAccountLevel ? [\r\n 'Campaign',\r\n 'Location',\r\n 'Impression',\r\n 'Dismiss',\r\n ] : ['Location',\r\n 'Impression',\r\n 'Dismiss',\r\n ];\r\n this.locationRecommendationGrid = new LocationRecommendationGrid({\r\n columns,\r\n dataSource: {\r\n type: 'memory',\r\n data: [],\r\n },\r\n hasPagination: this.isAccountLevel,\r\n selectAllByDefault: !this.isAccountLevel,\r\n ...options,\r\n }).render();\r\n this.locationRecommendationGrid.on('selectChanged', selectedItems => this.model.selectedItems(selectedItems));\r\n this.locationRecommendationGrid.on('isAllSelected', (isAllSelected) => { this.isAllSelected = isAllSelected; });\r\n this.locationRecommendationGrid.on('dismiss', recommendation => this.dismissRecommendations([recommendation]));\r\n this.locationRecommendationGrid.on('mouseover:recommendation', recommendation => this.mouseOverRecommendation(recommendation));\r\n this.locationRecommendationGrid.on('mouseout:recommendation', recommendation => this.mouseOutRecommendation(recommendation));\r\n this.displayedRecommendations = [];\r\n this.locationRecommendationGrid.on('display:recommendations', (recommendations) => {\r\n if (this.model.isExpanded()) {\r\n logViewEvent(this.deps, recommendations);\r\n return;\r\n }\r\n this.displayedRecommendations = recommendations;\r\n });\r\n\r\n const isMapLoaded = window.Microsoft && window.Microsoft.Maps && window.Microsoft.Maps.loadModule;\r\n this.showMap = isMapLoaded && ((!this.isAccountLevel && this.options.isCampaignLevelLocation)\r\n || _.isFinite(options.scope.adgroupId));\r\n if (this.showMap) {\r\n const MapView = this.deps.LocationMap;\r\n this.mapView = new MapView({\r\n disableInfoBoxGroupList: ['included', 'excluded'],\r\n mapHeight: this.options.mapHeight,\r\n }).render();\r\n\r\n this.mapView.on('target:recommendation', recommendation => this.targetRecommendations([recommendation]));\r\n this.mapView.on('dismiss:recommendation', recommendation => this.dismissRecommendations([recommendation]));\r\n\r\n this.model.locationRecommendations.subscribe((recommendations) => {\r\n if (this.model.isExpanded() || this.options.showRecommendationsOnMap) {\r\n this.updateRecommendedLocations(recommendations);\r\n }\r\n });\r\n\r\n if (!this.options.showRecommendationsOnMap) {\r\n if (!this.model.isMapShow()) {\r\n this.mapView.$el.hide();\r\n }\r\n\r\n this.model.isMapShow.subscribe((show) => {\r\n if (show) {\r\n this.mapView.$el.show();\r\n } else {\r\n this.mapView.$el.hide();\r\n }\r\n });\r\n }\r\n }\r\n this.model.locationRecommendations.subscribe((recommendations) => {\r\n this.trigger('update:recommendations', recommendations);\r\n });\r\n this.model.isExpanded.subscribe((isExpanded) => {\r\n const recommendations = isExpanded ? this.model.locationRecommendations() : [];\r\n if (isExpanded) {\r\n this.trigger('expand:collapse');\r\n if (!_.isEmpty(this.displayedRecommendations)) {\r\n logViewEvent(this.deps, this.displayedRecommendations);\r\n this.displayedRecommendations = [];\r\n }\r\n } else {\r\n this.trigger('close:collapse');\r\n }\r\n this.updateRecommendedLocations(recommendations);\r\n });\r\n\r\n this.template = locationGridTemplate;\r\n if (options.template) {\r\n this.template = _.isString(options.template) ? templates[options.template] : options.template;\r\n }\r\n this.on('refresh', () => {\r\n this.refreshLocation();\r\n });\r\n }\r\n\r\n get events() {\r\n return {\r\n 'click .apply': 'apply',\r\n 'click .cancel': 'cancel',\r\n 'click .dismiss': 'dismiss',\r\n };\r\n }\r\n\r\n updateRecommendedLocations(recommendations) {\r\n this.refreshMap();\r\n if (this.mapView) {\r\n this.mapView.updateRecommendedLocations(recommendations);\r\n this.model.recommendationsOnMap(recommendations);\r\n }\r\n }\r\n\r\n refreshMap() {\r\n if (this.mapView) {\r\n this.mapView.rebindEventBus();\r\n }\r\n }\r\n\r\n refreshLocation() {\r\n const {\r\n isCampaignLevelLocation,\r\n } = this.options;\r\n if (isCampaignLevelLocation) { // only have recommendation on campaign level\r\n this.model.selectedItems([]);\r\n this.fetchRecommendations().finally(withUiBlock(this.$el));\r\n }\r\n if (this.showMap) {\r\n this.loadLocationCriterion();\r\n }\r\n }\r\n\r\n loadLocationCriterion() {\r\n const {\r\n scope: {\r\n campaignId,\r\n adgroupId,\r\n },\r\n excludedOnly,\r\n } = this.options;\r\n if (_.isUndefined(campaignId)) {\r\n return;\r\n }\r\n const schema = _.isFinite(adgroupId) ? this.deps.s$AdGroupCriterion :\r\n this.deps.s$CampaignCriterion;\r\n const criterionLevel = _.isFinite(adgroupId) ? 'adgroup' : 'campaign';\r\n const parentId = adgroupId || campaignId;\r\n this.deps.criterionLoader.load(campaignId, adgroupId, ['LocationCriterion', 'RadiusCriterion', 'LocationIntentCriterion'], schema)\r\n .then((criterions) => {\r\n let entities = _.chain(criterions)\r\n .filter(criterion =>\r\n criterion.Criterion.Type === 'Radius' || criterion.Criterion.Type === 'Location')\r\n .map(criterion =>\r\n this.deps.locationTargetConverter.buildLocationCriterionFromBiddableCampaignCriterion(\r\n criterion,\r\n criterionLevel,\r\n parentId\r\n ))\r\n .value();\r\n if (excludedOnly) {\r\n entities = entities.filter(entity => entity.SelectionStatus === 'Excluded');\r\n }\r\n this.model.criterions(entities);\r\n if (this.mapView) {\r\n this.mapView.waitUntilMapLoaded().then(() => {\r\n this.refreshMap();\r\n this.deps.jsDataCampaign.Intermediate.refresh('CampaignCriterion', entities, { destroyAll: true });\r\n });\r\n }\r\n });\r\n }\r\n\r\n fetchRecommendations() {\r\n return this.deps.recommendationRepository.getRecommendations({\r\n deps: this.deps,\r\n oppType: recommendationType,\r\n scope: this.options.scope,\r\n channel,\r\n top: this.options.scope.campaignId ? 5 : 500, // campaign level: 5; account level: 500\r\n skip: 0, // pagination on client side\r\n }).then((data) => {\r\n this.model.locationRecommendations(data.value);\r\n this.locationRecommendationGrid.trigger('update:data', data.value);\r\n }).catch(() => {\r\n this.model.locationRecommendations([]);\r\n this.locationRecommendationGrid.trigger('update:data', []);\r\n });\r\n }\r\n\r\n mouseOverRecommendation(recommendation) {\r\n const { Id } = recommendation || {};\r\n\r\n if (this.showMap && _.isFinite(Id)) {\r\n this.mapView.trigger('entity:highlight', Id);\r\n }\r\n }\r\n\r\n mouseOutRecommendation(recommendation) {\r\n const { Id } = recommendation || {};\r\n\r\n if (this.showMap && _.isFinite(Id)) {\r\n this.mapView.trigger('entity:reset', Id);\r\n }\r\n }\r\n\r\n targetRecommendations(recommends) {\r\n const recommendations = this.isAllSelected ? this.model.locationRecommendations() : recommends;\r\n const reqs = _.chain(recommendations)\r\n .map(recommend => _.pick(recommend, _.keys(this.deps.s$CampaignCriterion.properties)))\r\n .groupBy(recommend => recommend.Campaign.Id)\r\n .map(values => ({\r\n Id: values[0] && values[0].Campaign.Id,\r\n data: {\r\n CampaignCriterions: _.map(values, val => ({\r\n Campaign: _.pick(val.Campaign, 'Id'),\r\n SelectionStatus: 'Included',\r\n ..._.pick(val, ['Criterion', 'CriterionType']),\r\n })),\r\n },\r\n }))\r\n .value();\r\n let appliedRecommendations = recommendations;\r\n\r\n return Promise.map(reqs, req =>\r\n this.deps.jsDataCampaign.Campaign.update(req.Id, { reqs: [req] }, {\r\n adapter: 'bulk', cacheResponse: false, overrideResponse: true, batch: true,\r\n })).catch((e) => {\r\n // Failure as location already exists will be marked as success\r\n const failedCriterions = _.filter(e.entity.CampaignCriterions, criterion =>\r\n !!_.find(e.errors, error => error['Client Id'] === criterion['Client Id'] && error.ErrorNumber !== '1043'));\r\n\r\n appliedRecommendations = _.reject(recommendations, recommend =>\r\n !!_.find(failedCriterions, ({ Criterion }) => _.isEqual(Criterion, recommend.Criterion)));\r\n }).finally(() => {\r\n if (_.size(appliedRecommendations) > 0) {\r\n this.deps.recommendationRepository.applyRecommendations({\r\n deps: this.deps,\r\n recommendations: appliedRecommendations,\r\n recommendationType,\r\n scope: this.options.scope,\r\n isAll: this.isAllSelected &&\r\n _.size(recommendations) > 1 &&\r\n _.size(appliedRecommendations) === _.size(recommendations) &&\r\n !this.options.scope.campaignId,\r\n channel,\r\n }).then(() => {\r\n /*\r\n After sync with ad insight MT,\r\n even apply failed, ad insight still can track the recommendations,\r\n so we don't need to parse the response\r\n */\r\n this.alertHelper.showSuccess(this.i18n.getString('Apply_Location_recommendations_Success', {\r\n success: _.size(appliedRecommendations),\r\n total: _.size(recommendations),\r\n }));\r\n }).finally(() => {\r\n this.trigger('add:locations', appliedRecommendations);\r\n this.refreshLocation();\r\n this.trigger('operate:recommendations');\r\n }).finally(withUiBlock(this.$el));\r\n } else if (_.size(appliedRecommendations) === 0 &&\r\n _.size(recommendations) > 0) { // no recommendations target success\r\n this.alertHelper.showError(this.i18n.getString('Apply_Location_recommendations_Failed'));\r\n }\r\n });\r\n }\r\n\r\n dismissRecommendations(recommendations) {\r\n return this.deps.recommendationRepository.dismissRecommendations({\r\n deps: this.deps,\r\n recommendations,\r\n recommendationType,\r\n scope: this.options.scope,\r\n isAll: this.isAllSelected && _.size(recommendations) > 1 && !this.options.scope.campaignId,\r\n channel,\r\n }).then((data) => {\r\n const ret = {\r\n failed: 0,\r\n success: 0,\r\n ..._.countBy(data.Results, result => (result.ErrorCode > 0 ? 'failed' : 'success')),\r\n };\r\n this.alertHelper.showSuccess(this.i18n.getString('Dismiss_Location_recommendations_Success', {\r\n success: ret.success,\r\n total: _.size(recommendations),\r\n }));\r\n this.deps.CampaignCacheManager.invalidate('Campaign');\r\n this.refreshLocation();\r\n this.trigger('operate:recommendations');\r\n }).catch(() => {\r\n this.alertHelper.showError(this.i18n.getString('Dismiss_Location_recommendations_Failed'));\r\n }).finally(withUiBlock(this.$el));\r\n }\r\n\r\n apply() {\r\n const selectedItems = this.model.selectedItems();\r\n if (_.isEmpty(selectedItems)) {\r\n return;\r\n }\r\n this.targetRecommendations(this.model.selectedItems());\r\n }\r\n\r\n cancel(e) {\r\n this.trigger('cancel', e);\r\n }\r\n\r\n dismiss() {\r\n const selectedItems = this.model.selectedItems();\r\n if (_.isEmpty(selectedItems)) {\r\n return;\r\n }\r\n this.dismissRecommendations(this.model.selectedItems());\r\n }\r\n\r\n remove() {\r\n this.trigger('remove');\r\n if (this.mapView) {\r\n this.mapView.remove();\r\n }\r\n if (this.locationRecommendationGrid) {\r\n this.locationRecommendationGrid.remove();\r\n }\r\n super.remove();\r\n }\r\n\r\n expandCollapse() {\r\n const key = 'expandRecommendLocationsByDefault';\r\n const expandRecommendLocations = this.deps.sessionStorage.get(key);\r\n if (!expandRecommendLocations) {\r\n return;\r\n }\r\n this.deps.sessionStorage.invalidate(key);\r\n const $collpase = this.$('.alert-recommendation .alert-info-inline');\r\n if ($collpase.length > 0) {\r\n $collpase.click();\r\n }\r\n }\r\n\r\n render() {\r\n this.$el.html(this.template({\r\n i18n: this.i18n,\r\n showMap: this.showMap,\r\n }));\r\n ko.applyBindings(this.model, this.el);\r\n this.$('.location-recommendation-grid-container').append(this.locationRecommendationGrid.el);\r\n if (this.showMap) {\r\n this.$('.location-recommendation-map-container').append(this.mapView.el);\r\n }\r\n _.delay(() => this.refreshLocation(), 100);\r\n _.delay(() => this.expandCollapse(), 200);\r\n return this;\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport { decorate } from '@bingads-webui/dialog';\r\nimport { InlineLocationRecommendation } from './view';\r\n\r\nexport class InlineLocationRecommendationDialog extends Backbone.View {\r\n initialize(options) {\r\n this.options = options;\r\n this.deps = options.deps;\r\n this.isRecommendationOperated = false;\r\n this.locationAdded = false;\r\n this.recommendations = [];\r\n }\r\n\r\n render() {\r\n const View = decorate(InlineLocationRecommendation, {\r\n title: this.deps.i18n.getString('Inline_Location_Recommendation_Dialog_Title'),\r\n position: 'center',\r\n width: 1050,\r\n maxWidth: 1050,\r\n });\r\n const viewOptions = {\r\n template: 'inlineTemplate',\r\n isCampaignLevelLocation: true,\r\n showRecommendationsOnMap: true,\r\n isExpanded: true,\r\n ...this.options,\r\n };\r\n this.view = new View(viewOptions).render();\r\n this.view.on('cancel', e => this.remove(e));\r\n this.view.on('add:locations', () => { this.locationAdded = true; });\r\n this.view.on('operate:recommendations', () => { this.isRecommendationOperated = true; });\r\n this.view.on('remove', () => {\r\n if (this.locationAdded) { // refresh when add locations\r\n this.trigger('refresh:recommendations');\r\n } else if (_.isEmpty(this.recommendations) && this.isRecommendationOperated) {\r\n this.trigger('refresh:recommendations');\r\n }\r\n });\r\n this.view.on('update:recommendations', (recommendations) => {\r\n this.recommendations = recommendations;\r\n if (_.size(recommendations) === 0) { // if no recommendations, remove dialog\r\n this.remove();\r\n }\r\n });\r\n return this;\r\n }\r\n\r\n remove() {\r\n if (this.view) {\r\n this.view.remove();\r\n }\r\n super.remove();\r\n }\r\n}\r\n","/* istanbul ignore file */\r\nimport { panelDecorator } from '@bingads-webui-campaign-react/panel-decorator';\r\nimport Backbone from 'backbone';\r\nimport _ from 'underscore';\r\nimport { InlineLocationRecommendation } from './view';\r\n\r\nexport class InlineLocationRecommendationPanel extends Backbone.View {\r\n initialize(options) {\r\n this.options = options;\r\n this.deps = options.deps;\r\n this.isRecommendationOperated = false;\r\n this.locationAdded = false;\r\n this.recommendations = [];\r\n }\r\n\r\n render() {\r\n const View = panelDecorator(InlineLocationRecommendation, {\r\n i18n: this.deps.i18n,\r\n panelReadyAriaLabel: this.deps.i18n.getString('Inline location recommendation side panel opened'),\r\n });\r\n const viewOptions = {\r\n title: this.deps.i18n.getString('Inline_Location_Recommendation_Dialog_Title'),\r\n // these events should keep consistance with dialog events\r\n // this part is difficult to test since the inside instance is difficult to get from outside\r\n // ignore this for the component and will add end to end test in feature scenarios.\r\n eventsToActions: [{\r\n event: 'cancel',\r\n action: this.remove.bind(this),\r\n }, {\r\n event: 'add:locations',\r\n action: () => { this.locationAdded = true; },\r\n }, {\r\n event: 'operate:recommendations',\r\n action: () => { this.isRecommendationOperated = true; },\r\n }, {\r\n event: 'remove',\r\n action: () => {\r\n if (this.locationAdded) { // refresh when add locations\r\n this.trigger('refresh:recommendations');\r\n } else if (_.isEmpty(this.recommendations) && this.isRecommendationOperated) {\r\n this.trigger('refresh:recommendations');\r\n }\r\n },\r\n }, {\r\n event: 'update:recommendations',\r\n action: (recommendations) => {\r\n this.recommendations = recommendations;\r\n if (_.size(recommendations) === 0) { // if no recommendations, remove dialog\r\n this.remove();\r\n }\r\n },\r\n }],\r\n onClose: this.remove.bind(this),\r\n template: 'inlineTemplate',\r\n isCampaignLevelLocation: true,\r\n showRecommendationsOnMap: true,\r\n isExpanded: true,\r\n ...this.options,\r\n };\r\n this.view = new View(viewOptions).render();\r\n return this;\r\n }\r\n\r\n remove() {\r\n if (this.view) {\r\n this.view.remove();\r\n }\r\n super.remove();\r\n }\r\n}\r\n","import { ProjectionGridBaseColumn } from '@bingads-webui/projection-grid-base-column';\r\nimport locationColumnTemplate from './location-column-template.pug';\r\n\r\n/**\r\n * Displays location column.\r\n */\r\n\r\nfunction generateLocationName({\r\n i18n,\r\n criterion,\r\n}) {\r\n if (criterion.Type === 'Location') {\r\n return criterion.LocationCriterion.Name;\r\n }\r\n return i18n.getString('Inline_Location_Radius_Formatter', {\r\n lat: i18n.formatDecimalToFixed(criterion.RadiusCriterion.Latitude),\r\n long: i18n.formatDecimalToFixed(criterion.RadiusCriterion.Longitude),\r\n });\r\n}\r\n\r\nexport class Location extends ProjectionGridBaseColumn {\r\n constructor({ deps, columnOverrider, isForVNext }) {\r\n const localizedTitle = deps.i18n.getString('LocationGrid_Column_Header_Recommended_Location');\r\n\r\n super({\r\n name: 'Location',\r\n property: 'Criterion',\r\n title: 'LocationGrid_Column_Header_Recommended_Location',\r\n i18n: deps.i18n,\r\n bodyClasses: ['text-left'],\r\n helpId: '',\r\n sortable: ({ Criterion: criterion }) => generateLocationName({\r\n i18n: deps.i18n,\r\n criterion,\r\n }),\r\n helpAriaLabel: deps.i18n.getString('Click to learn more about {{item}}', { item: localizedTitle }),\r\n ...columnOverrider.Location,\r\n });\r\n this.i18n = deps.i18n;\r\n this.isForVNext = isForVNext;\r\n }\r\n\r\n template({ value }) {\r\n return locationColumnTemplate({\r\n Name: generateLocationName({\r\n i18n: this.i18n,\r\n criterion: value,\r\n }),\r\n isForVNext: this.isForVNext,\r\n });\r\n }\r\n}\r\n","import { ProjectionGridBaseColumn } from '@bingads-webui/projection-grid-base-column';\r\n\r\n/**\r\n * Displays impression column.\r\n */\r\n\r\nexport class Impression extends ProjectionGridBaseColumn {\r\n constructor({ deps, columnOverrider }) {\r\n const localizedTitle = deps.i18n.getString('LocationGrid_Column_Header_Estate_Impression');\r\n\r\n super({\r\n name: 'Impression',\r\n type: 'number',\r\n property: 'EstimatedIncreaseInImpressions',\r\n format: 'integer',\r\n title: 'LocationGrid_Column_Header_Estate_Impression',\r\n i18n: deps.i18n,\r\n helpId: 'pop_BA_LocationTargeting_EstImpr',\r\n sortable: true,\r\n helpAriaLabel: deps.i18n.getString('Click to learn more about {{item}}', { item: localizedTitle }),\r\n ...columnOverrider.Impression,\r\n });\r\n }\r\n}\r\n","import { ProjectionGridBaseColumn } from '@bingads-webui/projection-grid-base-column';\r\nimport dimissColumnTemplate from './dismiss-column-template.pug';\r\n\r\n/**\r\n * Displays dismiss column.\r\n */\r\n\r\nexport class Dismiss extends ProjectionGridBaseColumn {\r\n constructor({ deps, columnOverrider, gridRemoveAll }) {\r\n super({\r\n name: 'Dismiss',\r\n property: 'Performance',\r\n title: gridRemoveAll ? 'Location_Target_Grid_RemoveColumn' : ' ',\r\n i18n: deps.i18n,\r\n headClasses: gridRemoveAll ? ['recommendation-target-grid__removeall-header', 'text-right'] : [''],\r\n bodyClasses: ['text-right'],\r\n colClasses: ['col-selection'],\r\n html: gridRemoveAll ? `${deps.i18n.getString('Location_Target_Grid_RemoveColumn')}` : '',\r\n ...columnOverrider.Dismiss,\r\n });\r\n this.deps = deps;\r\n }\r\n\r\n template() {\r\n return dimissColumnTemplate({\r\n i18n: this.deps.i18n,\r\n });\r\n }\r\n}\r\n","import { CampaignColumn as BaseCampaignColumn } from '@bingads-webui-campaign/campaignui-common-columns';\r\n\r\nexport class Campaign extends BaseCampaignColumn {\r\n constructor({ deps, scope }) {\r\n super({\r\n i18n: deps.i18n,\r\n scope,\r\n routeTemplate: ({ cid, aid, cmpid }) => `#customer/${cid}/account/${aid}/campaign/${cmpid}/edit/locations`,\r\n isForVNext: deps.isForVNext,\r\n });\r\n }\r\n}\r\n","import Backbone from 'backbone';\r\nimport projectionGrid from 'projection-grid';\r\nimport _ from 'underscore';\r\nimport { projectionGridScopeNavigator } from '@bingads-webui-campaign/projection-grid-scope-navigator';\r\nimport { crossPageSelectAllPlugin, crossPageSelectHeadRow } from '@bingads-webui/projection-grid-cross-page-select-all';\r\nimport { placeholderPlugin } from '@bingads-webui/projection-grid-placeholder';\r\nimport { uiBlockerPlugin } from '@bingads-webui/projection-grid-uiblocker';\r\nimport { paginationPlugin } from '@bingads-webui/projection-grid-pagination';\r\nimport { a11yPlugin } from '@bingads-webui/projection-grid-a11y';\r\nimport { assistedSelectionPlugin } from '@bingads-webui/projection-grid-assisted-selection';\r\nimport { mapColumnsConfig } from '@bingads-webui/projection-grid-base-column';\r\nimport template from './template.pug';\r\nimport * as PredefinedColumns from './column';\r\n\r\nexport class LocationRecommendationGrid extends Backbone.View {\r\n get events() {\r\n return {\r\n 'click span.dismiss-recommendation': _.bind(this.onDismissClick, this),\r\n };\r\n }\r\n\r\n initialize({\r\n deps,\r\n columns = [\r\n 'Campaign',\r\n 'Location',\r\n 'Impression',\r\n 'Dismiss',\r\n ],\r\n columnOverrider = {},\r\n hasPagination = true,\r\n hasSelection = true,\r\n dataSource = {\r\n type: 'memory',\r\n primaryKey: 'OpportunityId',\r\n data: [],\r\n },\r\n pageSize = 10,\r\n scope = {},\r\n selectAllByDefault = false,\r\n tableClasses = ['table', 'table-bordered', 'table-hover'],\r\n isForVNext,\r\n gridRemoveAll,\r\n }) {\r\n this.tableClasses = tableClasses;\r\n this.selectAllByDefault = selectAllByDefault;\r\n this.deps = deps;\r\n this.hasPagination = hasPagination;\r\n this.hasSelection = hasSelection;\r\n this.dataSource = dataSource;\r\n this.pageSize = pageSize;\r\n this.isForVNext = isForVNext;\r\n this.columns = _.chain(columns)\r\n .map(col => PredefinedColumns[col])\r\n .compact()\r\n .value();\r\n this.columns = mapColumnsConfig(this.columns, {\r\n deps, scope, columnOverrider, isForVNext, gridRemoveAll,\r\n });\r\n this.gridRemoveAll = gridRemoveAll;\r\n }\r\n\r\n onRemoveAllRecommendationClick() {\r\n this.trigger('removeAllRecommendation');\r\n }\r\n\r\n onDismissClick(event) {\r\n const recommendation = this.grid.gridView.itemOfElement(event.target);\r\n this.trigger('dismiss', recommendation);\r\n return false;\r\n }\r\n\r\n mouseOverItem(event) {\r\n const recommendation = this.grid.gridView.itemOfElement(event.target);\r\n this.trigger('mouseover:recommendation', recommendation);\r\n return false;\r\n }\r\n\r\n mouseOutItem(event) {\r\n const recommendation = this.grid.gridView.itemOfElement(event.target);\r\n this.trigger('mouseout:recommendation', recommendation);\r\n return false;\r\n }\r\n\r\n render() {\r\n this.$el.html(template({\r\n hasPagination: this.hasPagination,\r\n isForVNext: this.isForVNext,\r\n }));\r\n let gridFactory = projectionGrid\r\n .factory({ vnext: true })\r\n .use(placeholderPlugin)\r\n .use(uiBlockerPlugin)\r\n .use(a11yPlugin)\r\n .use(assistedSelectionPlugin);\r\n const headRows = ['column-header-rows'];\r\n if (this.hasPagination) {\r\n gridFactory = gridFactory.use(paginationPlugin)\r\n .use(crossPageSelectAllPlugin);\r\n headRows.unshift(crossPageSelectHeadRow());\r\n }\r\n\r\n if (this.deps.isForVNext) {\r\n gridFactory = gridFactory.use(projectionGridScopeNavigator);\r\n }\r\n\r\n this.grid = gridFactory.create({\r\n name: 'location-recommendation-grid',\r\n el: this.$('.location-grid-container'),\r\n dataSource: this.dataSource,\r\n tableClasses: this.tableClasses,\r\n rows: {\r\n headRows,\r\n },\r\n events: this.gridRemoveAll ? {\r\n 'mouseover tbody': _.bind(this.mouseOverItem, this),\r\n 'mouseout tbody': _.bind(this.mouseOutItem, this),\r\n 'click .recommendation-target-grid__removeall-header a': _.bind(this.onRemoveAllRecommendationClick, this),\r\n } : {\r\n 'mouseover tbody': _.bind(this.mouseOverItem, this),\r\n 'mouseout tbody': _.bind(this.mouseOutItem, this),\r\n },\r\n columns: this.columns,\r\n plugins: {\r\n a11y: { i18n: this.deps.i18n },\r\n crossPageSelectAll: {\r\n i18n: this.deps.i18n,\r\n },\r\n placeholder: {\r\n container: this.$('.placeholder-container'),\r\n text: this.deps.i18n.getString('LocationGrid_Content_No_Recommendation'),\r\n },\r\n pagination: {\r\n el: this.$('.grid-pager.pager'),\r\n pageSize: this.pageSize,\r\n availablePageSizes: [10, 20, 50, 100],\r\n enableRandomPage: false,\r\n },\r\n projectionGridScopeNavigator: this.deps.scope,\r\n },\r\n query: {\r\n orderby: [{\r\n direction: -1,\r\n key: 'EstimatedIncreaseInImpressions',\r\n }],\r\n },\r\n i18n: this.deps.i18n,\r\n sortableHeader: {\r\n name: 'Impression',\r\n directionIndex: 1,\r\n },\r\n selection: this.hasSelection ? {\r\n enabled: true,\r\n headClasses: ['text-center'],\r\n bodyClasses: ['text-center'],\r\n } : false,\r\n });\r\n\r\n this.grid.gridView.render();\r\n\r\n if (this.selectAllByDefault) {\r\n this.grid.gridView.once('didReload', () => {\r\n _.delay(() => this.grid.gridView.selectAll(), 10);\r\n });\r\n }\r\n\r\n this.grid.gridView.on('didSelect', () => {\r\n this.trigger('selectChanged', this.grid.gridView.selectedItems());\r\n this.trigger('isAllSelected', !!(this.grid.crossPageSelectAll && this.grid.crossPageSelectAll.isAllSelected));\r\n });\r\n\r\n this.grid.gridView.on('didReload', () => {\r\n _.delay(() => {\r\n this.trigger('display:recommendations', this.grid.gridView.itemArray);\r\n }, 10);\r\n });\r\n\r\n this.on('update:data', (data) => {\r\n this.grid.dataSource.data = data;\r\n if (this.selectAllByDefault) {\r\n this.grid.gridView.once('didReload', () => {\r\n _.delay(() => this.grid.gridView.selectAll(), 10);\r\n });\r\n } else { // work around to remove select cross page banner\r\n this.grid.gridView.once('didReload', () => {\r\n _.delay(() => {\r\n this.grid.gridView.selectAll();\r\n this.grid.gridView.deselectAll();\r\n }, 10);\r\n });\r\n }\r\n\r\n this.grid.gridView.refresh(true);\r\n });\r\n\r\n return this;\r\n }\r\n}\r\n","import { AdTypes } from '@bingads-webui-campaign-react/campaign-onboarding-v2';\r\n\r\nexport const STEP_PATHS = {\r\n CAMPAIGN_SETTINGS: 'CAMPAIGN_SETTINGS',\r\n BUDGET_AND_BIDS: 'BUDGET_AND_BIDS',\r\n TARGET_SETTINGS: 'TARGET_SETTINGS',\r\n AD_GROUP_SETTINGS: 'AD_GROUP_SETTINGS',\r\n SUMMARY: 'SUMMARY',\r\n};\r\n\r\nexport const FLOWS = {\r\n SHOPPING_AUDIENCE: 'SHOPPING_AUDIENCE',\r\n SHOPPING_SEARCH: 'SHOPPING_SEARCH',\r\n};\r\n\r\nexport const AD_TYPES_TO_FLOWS = {\r\n [AdTypes.ShoppingAudience]: FLOWS.SHOPPING_AUDIENCE,\r\n [AdTypes.AudienceAndSearch]: FLOWS.SHOPPING_SEARCH,\r\n};\r\n\r\nexport const PLACEHOLDER_ID = {\r\n CampaignNegativeReferenceId: -11,\r\n};\r\n\r\nexport const CREATE_SCENARIO = {\r\n CREATE_CAMPAIGN: 'create_campaign',\r\n UPDATE_CAMPAIGN: 'update_campaign',\r\n UPDATE_ADGROUP: 'update_adGroup',\r\n};\r\n","import _ from 'underscore';\r\nimport { isAudienceShoppingCampaign } from '@bingads-webui-campaign-react/constants';\r\nimport { AdTypes } from '@bingads-webui-campaign-react/campaign-onboarding-v2';\r\nimport biddingStrategyTypes from '@bingads-webui-campaign-legacy/bidding-strategy/bidding-strategy-type';\r\n\r\nimport { FLOWS } from '../constants';\r\n\r\nexport const isSearchShoppingCampaign = flow => flow === FLOWS.SHOPPING_SEARCH;\r\n\r\nexport const isAutoBidding = (bidStrategyType) => {\r\n const autoBidding = [biddingStrategyTypes.maximizeConversions, biddingStrategyTypes.maximizeClicks, biddingStrategyTypes.maxConversionValue, biddingStrategyTypes.targetRoas, biddingStrategyTypes.costPerSale];\r\n const result = _.contains(autoBidding, bidStrategyType);\r\n\r\n return result;\r\n};\r\n\r\nexport const getBudgetBidSections = () => {\r\n const options = {\r\n basicOptions: [\r\n 'bid-and-budget',\r\n 'bid-value',\r\n ],\r\n advancedOptions: [\r\n 'bid-adjustment',\r\n ],\r\n };\r\n\r\n return options;\r\n};\r\n\r\nexport const allSettledPromiseWrapper = (promises) => {\r\n const wrappedPromises = promises.map(p => Promise.resolve(p)\r\n .then(\r\n val => ({ status: 'fulfilled', value: val }),\r\n err => ({ status: 'rejected', reason: err })\r\n ));\r\n return Promise.all(wrappedPromises);\r\n};\r\n\r\nexport const getCampaignType = (isSearch, campaignSettings) => (isSearch ? {\r\n CampaignType: 'Shopping',\r\n CampaignSubType: undefined,\r\n} : {\r\n CampaignType: 'Audience',\r\n CampaignSubType: campaignSettings ? campaignSettings.CampaignSubType : 'AudienceFeedBased',\r\n});\r\n\r\nexport const getProductTileDetails = (product) => {\r\n if (!product) {\r\n return '';\r\n }\r\n let result = '';\r\n const operateMap = {\r\n equal: '=',\r\n notequal: '≠',\r\n };\r\n const conditionValueCount = Object.keys(product).filter(key => key.startsWith('ProductCondition') || key.startsWith('ProductValue')).length;\r\n // eslint-disable-next-line no-plusplus\r\n for (let i = 1; i <= conditionValueCount / 2; i++) {\r\n const condition = product[`ProductCondition${i}`];\r\n const value = product[`ProductValue${i}`];\r\n const operatorString = product[`ProductOperator${i}`];\r\n const operator = operatorString ? (operateMap[operatorString] || operatorString) : '=';\r\n\r\n if (condition && value) {\r\n result += `${condition}${operator}${value} & `;\r\n }\r\n }\r\n\r\n return result.slice(0, -2); // remove the last &\r\n};\r\n\r\nexport const getAdTypeFromCurrentCampaign = (currentCampaign) => {\r\n if (currentCampaign && isAudienceShoppingCampaign(currentCampaign.CampaignType, currentCampaign.CampaignSubType)) {\r\n return AdTypes.ShoppingAudience;\r\n }\r\n\r\n return AdTypes.AudienceAndSearch;\r\n};\r\n\r\nexport const getNoValidStore = (productData, feedData) => (\r\n (_.isEmpty(productData) || _.isEmpty(productData.ProductCollectionAccounts) ||\r\n _.findIndex(productData.ProductCollectionAccounts, item => !item.IsGlobalStore && !item.IsCoOpStore) < 0) &&\r\n (_.isEmpty(feedData) || feedData.length <= 0)\r\n);\r\n\r\n","import { useState, useEffect, useContext } from 'react';\r\nimport _ from 'underscore';\r\nimport _preferencesService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport biddingStrategyTypes from '@bingads-webui-campaign-legacy/bidding-strategy/bidding-strategy-type';\r\n\r\nimport { isSearchShoppingCampaign } from '../step-utils';\r\n\r\nconst buildSchemaData = ({\r\n data, timeDisplayType, isAudienceShoppingCampaign, serverContext,\r\n}) => {\r\n // For AWF, some targets have to be created at ad group level\r\n const targetParentEntity = isAudienceShoppingCampaign ? data.adGroup : data.campaign;\r\n const locations = _.map(\r\n _.filter(\r\n _.get(targetParentEntity, ['locationTargets', 'currentLevelSettings', 'currentLocations'], []),\r\n loc => loc.SelectionStatus === 'Included'\r\n ),\r\n loc => loc.location\r\n );\r\n const autoBidding = [biddingStrategyTypes.maximizeConversions, biddingStrategyTypes.maximizeClicks, biddingStrategyTypes.maxConversionValue, biddingStrategyTypes.targetRoas, biddingStrategyTypes.costPerSale];\r\n\r\n return ({\r\n campaignName: {\r\n data: data.campaign.Name,\r\n },\r\n conversionGoals: {\r\n conversionGoals: data.campaign.conversionGoals,\r\n },\r\n store: {\r\n storeName: data.campaign.StoreName,\r\n },\r\n feeds: {\r\n feedLabel: data.campaign.FeedLabel,\r\n isRendered: !_.isEmpty(data.campaign.FeedLabel),\r\n },\r\n localInventory: {\r\n isLocalInventoryEnabled: data.campaign.LocalInventoryAdsEnabled,\r\n isRendered: !isAudienceShoppingCampaign,\r\n },\r\n productCollections: {\r\n isProductCollectionsEnabled: data.campaign.ShoppableAdsEnabled,\r\n isRendered: !isAudienceShoppingCampaign,\r\n },\r\n products: {\r\n productFilters: data.campaign.ProductFilters,\r\n useSelectedItem: true,\r\n },\r\n adGroupName: {\r\n data: data.adGroup.Name,\r\n },\r\n locationTargeting: {\r\n locations,\r\n targetOption: _.get(targetParentEntity, ['locationTargets', 'currentLevelSettings', 'targetOption'], null),\r\n },\r\n genderTargeting: {\r\n genders: targetParentEntity.genderTypes,\r\n isRendered: isAudienceShoppingCampaign,\r\n },\r\n ageRangeTargeting: {\r\n ageRanges: targetParentEntity.ageRanges,\r\n isRendered: isAudienceShoppingCampaign,\r\n },\r\n // PT is hidden until backend algo is ready\r\n // predictiveTargeting: {\r\n // isPredictiveTargetingEnabled: data.adGroup.UseOptimizedTargeting,\r\n // isRendered: isAudienceShoppingCampaign,\r\n // },\r\n advancedTargetingSeparator: {},\r\n startEndDates: {\r\n startDate: data.adGroup.StartDate,\r\n endDate: data.adGroup.EndDate,\r\n },\r\n adSchedule: {\r\n adSchedules: data.campaign.adSchedules && data.campaign.adSchedules.dayTimeRanges,\r\n useSearcherTimeZone: data.campaign.AdScheduleUseSearcherTimeZone,\r\n timeDisplayType,\r\n includeStartEnd: false,\r\n isRendered: !_.isEmpty(data.campaign.adSchedules),\r\n },\r\n adDistribution: {\r\n adDistribution: data.adGroup.AdDistribution,\r\n isRendered: !isAudienceShoppingCampaign,\r\n },\r\n budget: {\r\n data: data.campaign.Budget,\r\n currencyCode: serverContext.CurrentAccount.CurrencyCode,\r\n },\r\n bidStrategy: {\r\n data: data.campaign.BiddingScheme,\r\n },\r\n bidValue: {\r\n data: data.adGroup.SearchBid,\r\n currencyCode: serverContext.CurrentAccount.CurrencyCode,\r\n isRendered: data.campaign.BiddingScheme && !_.contains(autoBidding, data.campaign.BiddingScheme.Type),\r\n },\r\n });\r\n};\r\n\r\nexport const useSummarySchemaData = ({ data }) => {\r\n const { state } = useWizardService();\r\n const { flow } = state.context.wizardData;\r\n const isAudienceShoppingCampaign = !isSearchShoppingCampaign(flow);\r\n\r\n const [timeDisplayType, setTimeDisplayType] = useState('12-hour');\r\n\r\n const serverContext = useContext(ServerContext);\r\n\r\n useEffect(() => {\r\n const preferencesService = _preferencesService.default || _preferencesService;\r\n preferencesService.initialize().then(() => {\r\n const isTwelveHourDisplay = preferencesService.findByName('WebApp.CampaignUI.isTwelveHourDisplay') || {};\r\n setTimeDisplayType(_.isUndefined(isTwelveHourDisplay.Data) || isTwelveHourDisplay.Data ? '12-hour' : '24-hour');\r\n });\r\n }, []);\r\n\r\n return (data && buildSchemaData({\r\n data, timeDisplayType, isAudienceShoppingCampaign, serverContext,\r\n })) || {};\r\n};\r\n\r\n","import React, { useMemo, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Stack } from '@bingads-webui-react/fabric-control';\r\nimport { GeneratedUI } from '@bingads-webui-campaign-react/ui-generator';\r\nimport { summaryPageComponentTypes } from '@bingads-webui-campaign-react/summary-page';\r\nimport { WIZARD_EVENTS, useWizardService } from '@bingads-webui-react/wizard';\r\nimport { StepHeader } from '@bingads-webui-campaign-react/display-plus-campaigns';\r\nimport { buildSchema } from './schema';\r\nimport { useSummarySchemaData } from './use-summary-schema-data';\r\nimport { STEP_PATHS } from '../../constants';\r\n\r\nexport const SummaryStep = ({\r\n data,\r\n}) => {\r\n const schemaData = useSummarySchemaData({ data });\r\n\r\n const { send } = useWizardService();\r\n\r\n const onShoppingHeaderActionClick = useCallback(() => send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.CAMPAIGN_SETTINGS,\r\n }), [send]);\r\n\r\n const onTargetingHeaderActionClick = useCallback(() => send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.TARGET_SETTINGS,\r\n }), [send]);\r\n\r\n const onBudgetBidHeaderActionClick = useCallback(() => send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: STEP_PATHS.BUDGET_AND_BIDS,\r\n }), [send]);\r\n\r\n const options = useMemo(() => ({\r\n onShoppingHeaderActionClick,\r\n onTargetingHeaderActionClick,\r\n onBudgetBidHeaderActionClick,\r\n }), [onShoppingHeaderActionClick, onTargetingHeaderActionClick, onBudgetBidHeaderActionClick]);\r\n\r\n const schema = useMemo(() => buildSchema(options), [options]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n {data ?\r\n
\r\n \r\n
\r\n : null\r\n }\r\n
\r\n
\r\n );\r\n};\r\n\r\nSummaryStep.propTypes = {\r\n data: PropTypes.shape({}),\r\n};\r\n\r\nSummaryStep.defaultProps = {\r\n data: null,\r\n};\r\n","import { buildDefaultDataProperty } from '@bingads-webui-campaign-react/ui-generator';\r\n\r\nexport const buildSchema = options => ({\r\n separatorStyles: {\r\n marginBottom: 20,\r\n },\r\n shopping: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Shopping settings'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onShoppingHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n campaignName: buildDefaultDataProperty({\r\n // TODO: why not use type?\r\n label: _TL_('Campaign name'),\r\n dynamicProps: props => props.campaignName,\r\n }),\r\n conversionGoals: {\r\n type: 'conversion-goals',\r\n dynamicProps: props => props.conversionGoals,\r\n },\r\n hd1: {\r\n type: 'horizontal-divider',\r\n },\r\n store: {\r\n type: 'store',\r\n dynamicProps: props => props.store,\r\n },\r\n feeds: {\r\n type: 'feeds',\r\n dynamicProps: props => props.feeds,\r\n },\r\n localInventory: {\r\n type: 'local-inventory',\r\n dynamicProps: props => props.localInventory,\r\n },\r\n productCollections: {\r\n type: 'product-collections',\r\n dynamicProps: props => props.productCollections,\r\n },\r\n hd2: {\r\n type: 'horizontal-divider',\r\n },\r\n products: {\r\n type: 'products',\r\n dynamicProps: props => props.products,\r\n },\r\n },\r\n },\r\n targeting: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Targeting'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onTargetingHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n separatorStyles: {\r\n marginBottom: 8,\r\n },\r\n adGroupName: buildDefaultDataProperty({\r\n label: _TL_('Ad group name'),\r\n dynamicProps: props => props.adGroupName,\r\n }),\r\n hd1: {\r\n type: 'horizontal-divider',\r\n },\r\n locationTargeting: {\r\n type: 'location-targeting',\r\n dynamicProps: props => props.locationTargeting,\r\n },\r\n genderTargeting: {\r\n type: 'gender-targeting',\r\n dynamicProps: props => props.genderTargeting,\r\n },\r\n ageRangeTargeting: {\r\n type: 'age-range-targeting',\r\n dynamicProps: props => props.ageRangeTargeting,\r\n },\r\n // PT is hidden until backend algo is ready\r\n // predictiveTargeting: {\r\n // type: 'predictive-targeting',\r\n // dynamicProps: props => props.predictiveTargeting,\r\n // },\r\n hd2: {\r\n type: 'horizontal-divider',\r\n },\r\n startEndDates: {\r\n type: 'start-end-dates',\r\n dynamicProps: props => props.startEndDates,\r\n },\r\n adSchedule: {\r\n type: 'ad-schedule',\r\n dynamicProps: props => props.adSchedule,\r\n },\r\n adDistribution: {\r\n type: 'ad-distribution',\r\n dynamicProps: props => props.adDistribution,\r\n },\r\n },\r\n },\r\n budgetBid: {\r\n type: 'panel',\r\n header: {\r\n title: _TL_('Budget & bids'),\r\n actionButton: {\r\n label: _TL_('Edit'),\r\n iconName: 'Edit',\r\n ariaLabel: _TL_('Edit'),\r\n onClick: options.onBudgetBidHeaderActionClick,\r\n },\r\n },\r\n components: {\r\n separatorStyles: {\r\n marginBottom: 8,\r\n },\r\n budget: {\r\n type: 'budget',\r\n dynamicProps: props => props.budget,\r\n },\r\n bidStrategy: {\r\n type: 'bid-strategy',\r\n dynamicProps: props => props.bidStrategy,\r\n },\r\n bidValue: {\r\n type: 'bid-value',\r\n dynamicProps: props => props.bidValue,\r\n },\r\n },\r\n },\r\n});\r\n","// Directly reuse display-plus-campaigns/src/shared/model/campaign-criterion.js\r\n// TODO: remove later. Just a temp placeholder\r\nimport { omit, isEmpty } from 'underscore';\r\nimport { readCampaignCriterions } from '@bingads-webui-campaign-react/display-plus-campaigns';\r\nimport { CRITERION_LEVEL, getTargetCriterion as getTargetCriterionForAdGroup, modelToViewModelForTargetCriterions as modelToViewModelForTargetCriterionsBase } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { convertLocationStateToLocationSchemaCampaign } from '@bingads-webui-campaign/hotel-common-targets';\r\n\r\nimport { PLACEHOLDER_ID } from '../constants';\r\n\r\nexport {\r\n readDayTimeCriterions,\r\n viewModelToBulkModelForAdSchedules,\r\n} from '@bingads-webui-campaign-react/display-plus-campaigns';\r\nexport const RemovedDeviceBidAdjustment = -100;\r\n\r\nexport const readLocationCriterions = ({\r\n cid,\r\n aid,\r\n campaignId,\r\n}) =>\r\n readCampaignCriterions({\r\n cid,\r\n aid,\r\n campaignId,\r\n type: \"isof(Criterion,'Model.LocationCriterion') or isof(Criterion,'Model.RadiusCriterion') or isof(Criterion,'Model.LocationIntentCriterion')\",\r\n });\r\n\r\nexport const readAgeAndGenderTargetingCriterions = ({\r\n cid,\r\n aid,\r\n campaignId,\r\n}) =>\r\n readCampaignCriterions({\r\n cid,\r\n aid,\r\n campaignId,\r\n type: \"isof(Criterion,'Model.AgeCriterion') or isof(Criterion,'Model.GenderCriterion')\",\r\n });\r\n\r\nexport const readTargetingCriterions = ({\r\n cid,\r\n aid,\r\n campaignId,\r\n}) =>\r\n readCampaignCriterions({\r\n cid,\r\n aid,\r\n campaignId,\r\n type: \"isof(Criterion,'Model.AgeCriterion') or isof(Criterion,'Model.GenderCriterion') or isof(Criterion,'Model.DeviceCriterion') or isof(Criterion,'Model.GenreCriterion') or isof(Criterion, 'Model.IndustryCriterion') or isof(Criterion, 'Model.JobFunctionCriterion') or isof(Criterion, 'Model.CompanyNameCriterion') or isof(Criterion, 'Model.ContextualTarget')\",\r\n });\r\n\r\nexport const readAudienceCriterions = ({\r\n cid,\r\n aid,\r\n campaignId,\r\n}) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .AudienceAssociations\r\n .get({ top: 2000 })\r\n .toPromise();\r\n\r\n\r\nexport const modelToViewModelForCampaignLevelAudienceCriterions = ({ model }) => {\r\n const initialAudiences = model.map(audience => ({\r\n CriterionType: audience.CriterionType,\r\n Id: audience.Id,\r\n Status: audience.Status,\r\n Criterion: {\r\n AudienceId: audience.AudienceCriterion.AudienceId,\r\n AudienceName: audience.AudienceCriterion.AudienceName,\r\n AudienceType: audience.AudienceCriterion.AudienceType,\r\n BidMultiplier: audience.AudienceCriterion.BidMultiplier,\r\n Type: audience.AudienceCriterion.Type,\r\n },\r\n Campaign: audience.Campaign,\r\n BidType: audience.BidType,\r\n }));\r\n\r\n return {\r\n initialAudiences,\r\n audiences: initialAudiences,\r\n };\r\n};\r\n\r\nexport const getTargetCriterion = ({\r\n targets,\r\n type,\r\n propKey,\r\n adGroupViewModel,\r\n campaignViewModel,\r\n bidAdjustment,\r\n overrideType = undefined,\r\n}) => (adGroupViewModel ? getTargetCriterionForAdGroup({\r\n targets,\r\n type,\r\n propKey,\r\n adGroupViewModel,\r\n campaignViewModel,\r\n bidAdjustment,\r\n overrideType,\r\n}) : getTargetCriterionForCampaign({\r\n targets,\r\n type,\r\n propKey,\r\n campaignViewModel,\r\n bidAdjustment,\r\n overrideType,\r\n}));\r\n\r\nexport const viewModelToBulkModelForAudiences = ({ campaignViewModel }) => {\r\n if (campaignViewModel.data.audienceRestricted) {\r\n return [];\r\n }\r\n const audiences = campaignViewModel.data.audiences || [];\r\n const initialAudiences = campaignViewModel.data.initialAudiences || [];\r\n\r\n const added = audiences.filter(audience => !initialAudiences.find(initialAudience => initialAudience.Criterion.AudienceId === audience.Criterion.AudienceId && initialAudience.Criterion.BidMultiplier === audience.Criterion.BidMultiplier));\r\n const removed = initialAudiences.filter(initialAudience => !audiences.find(audience => audience.Criterion.AudienceId === initialAudience.Criterion.AudienceId && initialAudience.Criterion.BidMultiplier === audience.Criterion.BidMultiplier)).map(audience => ({\r\n ...audience,\r\n Status: 'Deleted',\r\n }));\r\n\r\n return [...added, ...removed].map((audience) => {\r\n const Status = isEmpty(audience.Status) ? 'Active' : audience.Status;\r\n\r\n const typePrefix = audience.Status === 'Excluded' ? 'Negative' : '';\r\n const criterionType = `${typePrefix}${audience.Criterion.AudienceType}`;\r\n\r\n if (campaignViewModel.data.Id) {\r\n return {\r\n ...audience,\r\n Status,\r\n CriterionType: criterionType,\r\n Campaign: {\r\n Id: campaignViewModel.data.Id,\r\n },\r\n };\r\n }\r\n\r\n return {\r\n ...audience,\r\n Status,\r\n CriterionType: criterionType,\r\n CampaignName: campaignViewModel.data.Name,\r\n Campaign: {\r\n Id: PLACEHOLDER_ID.CampaignNegativeReferenceId,\r\n },\r\n };\r\n });\r\n};\r\n\r\n// Supports both campaign level and ad group level\r\n// For campaign level, pass in campaignViewModel only\r\n// Expects both wrapped in { data: ...}\r\nexport const viewModelToBulkModelForTargeting = ({\r\n campaignViewModel,\r\n adGroupViewModel,\r\n}) => {\r\n const parentEntity = adGroupViewModel || campaignViewModel;\r\n\r\n // device\r\n const deviceTargets = [];\r\n\r\n const { devices } = parentEntity.data;\r\n if (Array.isArray(devices) && devices.length > 0) {\r\n devices.forEach(({\r\n Id, device, bidAdjustment, isBidAdjustmentNegative,\r\n }) => {\r\n deviceTargets.push(...getTargetCriterion({\r\n targets: [{ criterion: device, Id }],\r\n type: 'Device',\r\n propKey: 'DeviceName',\r\n campaignViewModel,\r\n adGroupViewModel,\r\n bidAdjustment: bidAdjustment * (isBidAdjustmentNegative ? -1 : 1),\r\n }));\r\n });\r\n }\r\n\r\n // age\r\n const ageTargets = parentEntity.data.ageRanges || [];\r\n const initialAgeTargets = parentEntity.data.initialAgeRanges || [];\r\n const addedAges = ageTargets.filter(target => initialAgeTargets.find(initialTarget => initialTarget.criterion === target) === undefined);\r\n const removedAges = initialAgeTargets.filter(initialTarget => ageTargets.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n const addedAgeCriterion = getTargetCriterion({\r\n targets: addedAges.map(criterion => ({ criterion })), type: 'Age', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n const removedAgeCriterion = getTargetCriterion({\r\n targets: removedAges, type: 'Age', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n\r\n const negativeAgeRanges = parentEntity.data.negativeAgeRanges || [];\r\n const removedNegativeAges = negativeAgeRanges.filter(negativeAge => addedAges.find(addedTarget => addedTarget === negativeAge.criterion)).map(target => ({ ...target, status: 'Deleted' }));\r\n const removedNegativeAgeCriterion = getTargetCriterion({\r\n targets: removedNegativeAges, type: 'NegativeAge', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n\r\n // gender\r\n const genderTypes = parentEntity.data.genderTypes || [];\r\n const initialGenderTypes = parentEntity.data.initialGenderTypes || [];\r\n const addedGenders = genderTypes.filter(target => initialGenderTypes.find(initialTarget => initialTarget.criterion === target) === undefined);\r\n const removedGenders = initialGenderTypes.filter(initialTarget => genderTypes.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n const addedGenderCriterion = getTargetCriterion({\r\n targets: addedGenders.map(criterion => ({ criterion })), type: 'Gender', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n const removedGenderCriterion = getTargetCriterion({\r\n targets: removedGenders, type: 'Gender', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n\r\n const negativeGenderTypes = parentEntity.data.negativeGenderTypes || [];\r\n const removedNegativeGenders = negativeGenderTypes.filter(negativeGender => addedGenders.find(addedTarget => addedTarget === negativeGender.criterion)).map(target => ({ ...target, status: 'Deleted' }));\r\n const removedNegativeGenderCriterion = getTargetCriterion({\r\n targets: removedNegativeGenders, type: 'NegativeGender', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n\r\n // industry\r\n let industryTargets = [];\r\n let negativeIndustryTargets = [];\r\n let initialIndustryTargets = [];\r\n let initialNegativeIndustryTargets = [];\r\n let addedIndustryTargets = [];\r\n let removedIndustryTargets = [];\r\n let addedIndustryCriterion = [];\r\n let removedIndustryCriterion = [];\r\n let negativeAddedIndustryTargets = [];\r\n let negativeRemovedIndustryTargets = [];\r\n let negativeAddedIndustryCriterion = [];\r\n let negativeRemovedIndustryCriterion = [];\r\n\r\n industryTargets = parentEntity.data.industry || [];\r\n initialIndustryTargets = parentEntity.data.initialIndustryTargets || [];\r\n\r\n negativeIndustryTargets = parentEntity.data.negativeIndustry || [];\r\n initialNegativeIndustryTargets = parentEntity.data.initialNegativeIndustryTargets || [];\r\n\r\n addedIndustryTargets = industryTargets.filter(target => initialIndustryTargets.find(initialTarget => initialTarget.criterion === target) === undefined);\r\n removedIndustryTargets = initialIndustryTargets.filter(initialTarget => industryTargets.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n addedIndustryCriterion = getTargetCriterion({\r\n targets: addedIndustryTargets.map(criterion => ({ criterion })), type: 'Industry', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n\r\n removedIndustryCriterion = getTargetCriterion({\r\n targets: removedIndustryTargets, type: 'Industry', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n\r\n negativeAddedIndustryTargets = negativeIndustryTargets.filter(target => initialNegativeIndustryTargets.find(initialTarget => initialTarget.criterion === target) === undefined);\r\n negativeRemovedIndustryTargets = initialNegativeIndustryTargets.filter(initialTarget => negativeIndustryTargets.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n negativeAddedIndustryCriterion = getTargetCriterion({\r\n targets: negativeAddedIndustryTargets.map(criterion => ({ criterion })), type: 'NegativeIndustry', propKey: 'Target', campaignViewModel, adGroupViewModel, overrideType: 'Industry',\r\n });\r\n\r\n negativeRemovedIndustryCriterion = getTargetCriterion({\r\n targets: negativeRemovedIndustryTargets, type: 'NegativeIndustry', propKey: 'Target', campaignViewModel, adGroupViewModel, overrideType: 'Industry',\r\n });\r\n\r\n // job target\r\n let jobTargets = [];\r\n let negativeJobTargets = [];\r\n let initialJobTargets = [];\r\n let initialNegativeJobTargets = [];\r\n let addedJobTargets = [];\r\n let removedJobTargets = [];\r\n let addedJobCriterion = [];\r\n let removedJobCriterion = [];\r\n let negativeAddedJobTargets = [];\r\n let negativeRemovedJobTargets = [];\r\n let negativeAddedJobCriterion = [];\r\n let negativeRemovedJobCriterion = [];\r\n\r\n jobTargets = parentEntity.data.jobTargets || [];\r\n initialJobTargets = parentEntity.data.initialJobTargets || [];\r\n\r\n negativeJobTargets = parentEntity.data.negativeJobTargets || [];\r\n initialNegativeJobTargets = parentEntity.data.initialNegativeJobTargets || [];\r\n\r\n addedJobTargets = jobTargets.filter(target => initialJobTargets.find(initialTarget => initialTarget.criterion === target) === undefined);\r\n removedJobTargets = initialJobTargets.filter(initialTarget => jobTargets.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n addedJobCriterion = getTargetCriterion({\r\n targets: addedJobTargets.map(criterion => ({ criterion })), type: 'JobFunction', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n\r\n removedJobCriterion = getTargetCriterion({\r\n targets: removedJobTargets, type: 'JobFunction', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n\r\n negativeAddedJobTargets = negativeJobTargets.filter(target => initialNegativeJobTargets.find(initialTarget => initialTarget.criterion === target) === undefined);\r\n negativeRemovedJobTargets = initialNegativeJobTargets.filter(initialTarget => negativeJobTargets.find(target => initialTarget.criterion === target) === undefined).map(target => ({ ...target, status: 'Deleted' }));\r\n negativeAddedJobCriterion = getTargetCriterion({\r\n targets: negativeAddedJobTargets.map(criterion => ({ criterion })), type: 'NegativeJobFunction', propKey: 'Target', campaignViewModel, adGroupViewModel, overrideType: 'JobFunction',\r\n });\r\n\r\n negativeRemovedJobCriterion = getTargetCriterion({\r\n targets: negativeRemovedJobTargets, type: 'NegativeJobFunction', propKey: 'Target', campaignViewModel, adGroupViewModel, overrideType: 'JobFunction',\r\n });\r\n\r\n // companyName targets\r\n let companyNameTargets = [];\r\n let negativeCompanyNameTargets = [];\r\n let initialCompanyNameTargets = [];\r\n let initialNegativeCompanyNameTargets = [];\r\n let addedCompanyNameTargets = [];\r\n let removedCompanyNameTargets = [];\r\n let addedCompanyNameCriterion = [];\r\n let removedCompanyNameCriterion = [];\r\n let negativeAddedCompanyNameTargets = [];\r\n let negativeRemovedCompanyNameTargets = [];\r\n let negativeAddedCompanyNameCriterion = [];\r\n let negativeRemovedCompanyNameCriterion = [];\r\n\r\n companyNameTargets = parentEntity.data.companyNameTargets || [];\r\n initialCompanyNameTargets = parentEntity.data.initialCompanyNameTargets || [];\r\n\r\n\r\n negativeCompanyNameTargets = parentEntity.data.negativeCompanyNameTargets || [];\r\n initialNegativeCompanyNameTargets = parentEntity.data.initialNegativeCompanyNameTargets || [];\r\n\r\n addedCompanyNameTargets = companyNameTargets.filter(target => initialCompanyNameTargets.find(initialTarget => initialTarget.Target === target.Target) === undefined);\r\n removedCompanyNameTargets = initialCompanyNameTargets.filter(initialTarget => companyNameTargets.find(target => initialTarget.Target === target.Target) === undefined).map(target => ({ ...target, criterion: target.Target, status: 'Deleted' }));\r\n\r\n addedCompanyNameCriterion = getTargetCriterion({\r\n targets: addedCompanyNameTargets.map(criterion => ({ criterion })), type: 'CompanyName', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n\r\n removedCompanyNameCriterion = getTargetCriterion({\r\n targets: removedCompanyNameTargets, type: 'CompanyName', propKey: 'Target', campaignViewModel, adGroupViewModel,\r\n });\r\n\r\n negativeAddedCompanyNameTargets = negativeCompanyNameTargets.filter(target => initialNegativeCompanyNameTargets.find(initialTarget => initialTarget.Target === target.Target) === undefined);\r\n negativeRemovedCompanyNameTargets = initialNegativeCompanyNameTargets.filter(initialTarget => negativeCompanyNameTargets.find(target => initialTarget.Target === target.Target) === undefined).map(target => ({ ...target, criterion: target.Target, status: 'Deleted' }));\r\n\r\n negativeAddedCompanyNameCriterion = getTargetCriterion({\r\n targets: negativeAddedCompanyNameTargets.map(criterion => ({ criterion })), type: 'NegativeCompanyName', propKey: 'Target', campaignViewModel, adGroupViewModel, overrideType: 'CompanyName',\r\n });\r\n\r\n negativeRemovedCompanyNameCriterion = getTargetCriterion({\r\n targets: negativeRemovedCompanyNameTargets, type: 'NegativeCompanyName', propKey: 'Target', campaignViewModel, adGroupViewModel, overrideType: 'CompanyName',\r\n });\r\n\r\n\r\n return [\r\n ...deviceTargets,\r\n ...removedNegativeAgeCriterion,\r\n ...addedAgeCriterion,\r\n ...removedAgeCriterion,\r\n ...removedNegativeGenderCriterion,\r\n ...addedGenderCriterion,\r\n ...removedGenderCriterion,\r\n ...addedIndustryCriterion,\r\n ...removedIndustryCriterion,\r\n ...negativeAddedIndustryCriterion,\r\n ...negativeRemovedIndustryCriterion,\r\n ...addedJobCriterion,\r\n ...removedJobCriterion,\r\n ...negativeAddedJobCriterion,\r\n ...negativeRemovedJobCriterion,\r\n ...addedCompanyNameCriterion,\r\n ...removedCompanyNameCriterion,\r\n ...negativeAddedCompanyNameCriterion,\r\n ...negativeRemovedCompanyNameCriterion,\r\n ];\r\n};\r\n\r\n// Supports both campaign level and ad group level\r\n// For campaign level, pass in campaignViewModel only\r\n// Expects both wrapped in { data: ...}\r\nexport function getDeviceCriterionsFull(campaignViewModel, adGroupViewModel) {\r\n const parentEntity = adGroupViewModel || campaignViewModel;\r\n\r\n const deviceTargets = parentEntity.data.deviceTypes || [];\r\n const initialDeviceTargets = parentEntity.data.initialDeviceTypes || [];\r\n\r\n const addedBackDevices = initialDeviceTargets.filter(initialTarget => deviceTargets.find(target => initialTarget.criterion === target) && initialTarget.bidAdjustment === RemovedDeviceBidAdjustment)\r\n .map((device => ({ criterion: device.criterion, Id: device.Id })));\r\n const newlyAddedDevices = deviceTargets.filter(target => initialDeviceTargets.find(initialTarget => initialTarget.criterion === target) === undefined)\r\n .filter((device => addedBackDevices.find(addedBackDevice => addedBackDevice.criterion === device) === undefined));\r\n const removedDevices = initialDeviceTargets.filter(initialTarget => deviceTargets.find(target => initialTarget.criterion === target) === undefined);\r\n const addedDevices = [...addedBackDevices, ...newlyAddedDevices.map(criterion => ({ criterion }))];\r\n\r\n return { addedDevices, removedDevices };\r\n}\r\n\r\nconst getTargetCriterionForCampaign = ({\r\n targets,\r\n type,\r\n propKey,\r\n campaignViewModel,\r\n bidAdjustment,\r\n overrideType = undefined,\r\n}) => targets.map((target) => {\r\n const criterion = {\r\n Type: overrideType || type,\r\n BidAdjustment: bidAdjustment,\r\n [`${overrideType || type}Criterion`]: {\r\n [propKey]: typeof (target.criterion) === 'object' ? target.criterion.Target : target.criterion,\r\n },\r\n };\r\n if (campaignViewModel.data.Id) {\r\n return {\r\n Id: target.Id,\r\n Status: target.status ? target.status : 'Active',\r\n Criterion: criterion,\r\n CriterionType: type,\r\n Campaign: {\r\n Id: campaignViewModel.data.Id,\r\n },\r\n };\r\n }\r\n return {\r\n Criterion: criterion,\r\n CriterionType: type,\r\n CampaignName: campaignViewModel.data.Name,\r\n Campaign: {\r\n Id: PLACEHOLDER_ID.CampaignNegativeReferenceId,\r\n },\r\n };\r\n});\r\n\r\nexport const viewModelToBulkModelForLocationTargets = ({ bundleLocationCriterions, campaignViewModel }) => {\r\n if (!campaignViewModel.data.locationTargets || campaignViewModel.data.locationRestricted) {\r\n return [];\r\n }\r\n\r\n const bulkUpsertModel = convertLocationStateToLocationSchemaCampaign(\r\n campaignViewModel.data.locationTargets,\r\n bundleLocationCriterions,\r\n {\r\n bidStrategy: { option: 'placeholder' },\r\n ...campaignViewModel.data,\r\n }\r\n );\r\n\r\n return bulkUpsertModel;\r\n};\r\n\r\nexport const modelToViewModelForTargetCriterions = ({ model }) => {\r\n const viewModel = modelToViewModelForTargetCriterionsBase({ model, level: CRITERION_LEVEL.CAMPAIGN });\r\n\r\n const deviceTypesOverride = viewModel.initialDeviceTypes && viewModel.initialDeviceTypes.map(target => ({\r\n Id: target.Id,\r\n device: target.criterion,\r\n isBidAdjustmentNegative: target.bidAdjustment < 0,\r\n bidAdjustment: Math.abs(target.bidAdjustment),\r\n }));\r\n\r\n return {\r\n ...omit(viewModel, 'initialDeviceTypes', 'deviceTypes'),\r\n devices: deviceTypesOverride,\r\n };\r\n};\r\n","/* eslint-disable no-param-reassign */\r\nimport { pick, isString, extend, isEmpty, find, get, map, clone, filter, pluck } from 'underscore';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { CampaignSubTypes } from '@bingads-webui-campaign-react/constants';\r\nimport { findTargetNodeAndAncestorsNodes } from '@bingads-webui-campaign-react/filter-options-group';\r\n\r\nimport {\r\n modelToViewModelForConversionGoals,\r\n bulkModelToViewModelForConversionGoals,\r\n modelToViewModelForLocationTargets,\r\n bulkModelToViewModelForLocationTargets,\r\n} from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport {\r\n modelToViewModelForDayTimeTargets,\r\n CRITERION_LEVEL,\r\n} from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { modelToViewModelForCampaignLevelAudienceCriterions, modelToViewModelForTargetCriterions } from './campaign-criterions';\r\n\r\n// TODO: Need to add shopping-related properties such as CPS\r\nconst whitelistedSchemaPropertyKeysForModel = [\r\n 'Budget', 'Id', 'Name', 'Status', 'TimeZone', 'BidStrategyName', 'BudgetId',\r\n 'DeliveryStatus', 'DeliveryStatusDetails', 'CampaignType', 'CampaignSubType',\r\n 'IsBidLandscapeAvailable', 'AdScheduleUseSearcherTimeZone',\r\n 'BiddingScheme',\r\n 'CampaignSettings', 'DisplayBiddingStrategyType',\r\n 'DisplayBiddingStrategyMaxCpc', 'DisplayBiddingStrategyTargetCpa', 'Languages',\r\n 'BaseCampaignName',\r\n 'VerifiedTrackingData',\r\n 'CampaignProductScope', 'LocalInventoryAdsEnabled', 'ShoppableAdsEnabled',\r\n 'Priority', 'ProviderId', 'FeedLabel', 'SalesCountry',\r\n 'TrackingUrlTemplate', 'UrlCustomParameters', 'FinalUrlSuffix', 'FeedId',\r\n 'PersonalizedOffersEnabled', 'CashbackPercent', 'CashbackScope',\r\n];\r\n\r\nconst operatorOptions = {\r\n equal: '=',\r\n notequal: '≠',\r\n};\r\n\r\nexport const viewModelToModelForConversionGoals = campaignViewModel => ({\r\n CampaignConversionGoal: campaignViewModel.data.conversionGoals && campaignViewModel.data.conversionGoals.originalConversionGoals ? campaignViewModel.data.conversionGoals.originalConversionGoals : [],\r\n});\r\n\r\nexport const viewModelToModelForCampaign = campaignViewModel => ({\r\n ...pick(campaignViewModel.data, whitelistedSchemaPropertyKeysForModel),\r\n});\r\n\r\nexport const bulkModelToViewModelForCampaign = ({\r\n campaignModel,\r\n originalCampaignModel,\r\n bundleCountries,\r\n}) => {\r\n let data = {\r\n ...pick(campaignModel, [...whitelistedSchemaPropertyKeysForModel, 'ImportProperties']),\r\n };\r\n\r\n if (data.Id && isString(data.Id)) {\r\n // eslint-disable-next-line no-param-reassign\r\n data.Id = parseInt(data.Id, 10);\r\n }\r\n\r\n data = extend(data, bulkModelToViewModelForConversionGoals({\r\n campaignModel,\r\n originalCampaignViewModel: originalCampaignModel,\r\n }));\r\n\r\n data = extend(data, bulkModelToViewModelForLocationTargets({\r\n locationTargetsModel: campaignModel.CampaignCriterions,\r\n bundleCountries,\r\n }));\r\n\r\n const campaignViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n\r\n return campaignViewModel;\r\n};\r\n\r\nconst readCampaign = (cid, aid, campaignId) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .get({\r\n select: ['Budget', 'CampaignConversionGoal/Goals'],\r\n })\r\n .toPromise();\r\n\r\nexport const loadCampaign = (cid, aid, campaignId) =>\r\n readCampaign(cid, aid, campaignId);\r\n\r\nconst getStoreNameById = (providerId, feedId, productData, feedData) => {\r\n let storeName = '';\r\n if (feedId > 0 && feedData && feedData.length > 0) {\r\n const selectedFeed = find(feedData, item => item.Id === feedId.toString());\r\n storeName = selectedFeed ? selectedFeed.Name : '';\r\n } else if (providerId > 0 && productData && productData.ProductCollectionAccounts && productData.ProductCollectionAccounts.length > 0) {\r\n const selectedProduct = find(productData.ProductCollectionAccounts, item => item.Value === providerId.toString());\r\n storeName = selectedProduct ? selectedProduct.Text : '';\r\n }\r\n\r\n return storeName;\r\n};\r\n\r\n// This will set multi values onto seperate lines.\r\nconst multilineValueInputProcessor = (valueInput, isEnhancedPAFilterP1Enabled) => {\r\n // Value input will be val1;;val2;;val3;;etc.\r\n const valuesArr = valueInput.split(';;');\r\n\r\n if (!isEnhancedPAFilterP1Enabled || valuesArr.length === 1) {\r\n return valueInput;\r\n }\r\n let output = valuesArr[0];\r\n\r\n for (let i = 1; i < valuesArr.length; i++) {\r\n output = `${output}, ${valuesArr[i]}`;\r\n }\r\n return output;\r\n};\r\n\r\n// Reference: component-react/packages/filter-options-group/src/filter-options-group/index.js\r\nconst composeProductFilter = (productFilter) => {\r\n const {\r\n PresetOperator = 'equal', PresetValue, Text, ValueOptions,\r\n } = productFilter;\r\n const operator = operatorOptions[PresetOperator] || '=';\r\n\r\n if (ValueOptions === null) {\r\n return `${Text} ${operator} ${PresetValue}`;\r\n }\r\n\r\n const selectedItems = filter(ValueOptions, valueOption => valueOption.Selected);\r\n const selectedTexts = pluck(selectedItems, 'Text').join(', ');\r\n\r\n return `${Text} ${operator} ${selectedTexts}`;\r\n};\r\n\r\nconst defaultSelectedDataSourceHelper = (dataSource, customerSelectedProductConditions, permissions, isDynamicDataFeedBasedCampaign) => {\r\n const customerSelectedProductConditionsCopy = map(customerSelectedProductConditions, clone);\r\n const defaultSelectedDataSource = [];\r\n\r\n // for each operand we get that has data.\r\n customerSelectedProductConditionsCopy.forEach((customerSelectedProductCondition) => {\r\n let selectedProductConditionItem;\r\n\r\n // First get the operand data that has a value.\r\n for (let i = 0; i < dataSource.length; i++) {\r\n const ds = dataSource[i];\r\n\r\n // We need to map the operands if this is migrated from legacy, as they may not match the values.\r\n if (!isDynamicDataFeedBasedCampaign && ds && ds.Value === customerSelectedProductCondition.Operand) {\r\n customerSelectedProductCondition.Operand = ds.Text;\r\n }\r\n const { target } = findTargetNodeAndAncestorsNodes(ds, customerSelectedProductCondition.Operand);\r\n\r\n if (target) {\r\n selectedProductConditionItem = target;\r\n break;\r\n }\r\n }\r\n\r\n // if we have found an operand with a value:\r\n if (selectedProductConditionItem) {\r\n const clonedItem = clone(selectedProductConditionItem);\r\n\r\n clonedItem.PresetOperator = customerSelectedProductCondition.Operator;\r\n // eslint-disable-next-line no-negated-condition\r\n if (!clonedItem.ValueOptions) {\r\n clonedItem.PresetValue = multilineValueInputProcessor(customerSelectedProductCondition.Attribute, permissions.IsEnhancedPAFilterP1Enabled);\r\n } else {\r\n const valueOptions = clonedItem.ValueOptions;\r\n\r\n const findHelper = (valueOption, valueB) => {\r\n if (valueOption.Value.toUpperCase() === valueB.toUpperCase()) {\r\n return true;\r\n } else if (valueOption.Text.toUpperCase() === valueB.toUpperCase()) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n // New feature, We can now select multiple values.\r\n const selectedValueArray = customerSelectedProductCondition.Attribute.split(';;');\r\n // Keep this for single-select just in case.\r\n const selectedValueOption = find(valueOptions, valueOption => findHelper(valueOption, selectedValueArray[0]));\r\n const selectedValueOptions = [];\r\n\r\n selectedValueArray.forEach((e) => {\r\n selectedValueOptions.push(find(valueOptions, valueOption => findHelper(valueOption, e)));\r\n });\r\n\r\n // If this is migrated from legacy, we will need to uncapitalize the valueoptions from all-caps.\r\n if (!isDynamicDataFeedBasedCampaign) {\r\n valueOptions.forEach((valueOption) => {\r\n valueOption.Value = valueOption.Text;\r\n });\r\n }\r\n\r\n // if this is a valueoption that is selected.\r\n if (selectedValueOption) {\r\n selectedValueOption.Selected = true;\r\n // eslint-disable-next-line no-return-assign\r\n selectedValueOptions.forEach(e => e.Selected = true);\r\n } /* else if (this.activityLogger) {\r\n // this should never happen\r\n this.activityLogger.error(`can not find user selected value option item which is ${JSON.stringify(customerSelectedProductCondition)}`);\r\n } */\r\n }\r\n\r\n defaultSelectedDataSource.push(clonedItem);\r\n } /* else if (this.activityLogger) {\r\n // this should never happen\r\n this.activityLogger.error(`can not find user selected production condition item which is ${JSON.stringify(customerSelectedProductCondition)}`);\r\n } */\r\n });\r\n\r\n return defaultSelectedDataSource;\r\n};\r\n\r\nconst getProdutFilters = (providerId, feedId, productData, feedData, permissions, isDynamicDataFeedBasedCampaign) => {\r\n const customerSelections = get(productData, ['CampaignCriterionsData', 'Criterion', 'ProductConditions'], []);\r\n const dynamicDataFeedConditionOptions = get(productData, ['DynamicDataFeedConditionOptions'], {});\r\n const productFilters = [];\r\n\r\n if (!isEmpty(customerSelections)) {\r\n let selectedConditionOptions = productData.ProductConditionOptions;\r\n\r\n if (isDynamicDataFeedBasedCampaign) {\r\n const selectedFeedId = feedId || providerId;\r\n const selectedFeed = find(feedData, item => item.Id === selectedFeedId.toString());\r\n if (!selectedFeed) {\r\n console.error(`can not find Feed data, feedId is ${feedId}`);\r\n // this.activityLogger.error(`can not find Feed data, feedId is ${feedId}`);\r\n }\r\n const selectedCategory = selectedFeed.FeedType;\r\n selectedConditionOptions = dynamicDataFeedConditionOptions[selectedCategory];\r\n }\r\n\r\n const selectedItems = defaultSelectedDataSourceHelper(selectedConditionOptions, customerSelections, permissions, isDynamicDataFeedBasedCampaign);\r\n\r\n selectedItems.forEach((item) => {\r\n const productFilter = composeProductFilter(item);\r\n productFilters.push(productFilter);\r\n });\r\n }\r\n\r\n return productFilters;\r\n};\r\n\r\nexport const modelToViewModelForCampaign = ({\r\n campaignModel,\r\n dayTimeCriterionsModel = [],\r\n locationCriterionsModel,\r\n bundleCountries,\r\n targetCriterionsModel,\r\n audienceCriterionsModel = [],\r\n productData,\r\n feedData,\r\n permissions,\r\n}) => {\r\n let data = {\r\n ...pick(campaignModel, [...whitelistedSchemaPropertyKeysForModel, 'ImportProperties']),\r\n };\r\n\r\n data = extend(data, modelToViewModelForConversionGoals(campaignModel));\r\n\r\n if (dayTimeCriterionsModel) {\r\n data = extend(data, modelToViewModelForDayTimeTargets({ model: dayTimeCriterionsModel }));\r\n }\r\n\r\n if (!isEmpty(locationCriterionsModel)) {\r\n data = extend(data, modelToViewModelForLocationTargets({ model: locationCriterionsModel, bundleCountries, campaignId: campaignModel.Id }));\r\n }\r\n\r\n if (!isEmpty(targetCriterionsModel)) {\r\n data = extend(data, modelToViewModelForTargetCriterions({ model: targetCriterionsModel, level: CRITERION_LEVEL.CAMPAIGN }));\r\n }\r\n\r\n data = extend(data, modelToViewModelForCampaignLevelAudienceCriterions({ model: audienceCriterionsModel }));\r\n\r\n if (campaignModel.CampaignSettings && campaignModel.CampaignSettings[0] && campaignModel.CampaignSettings[0]['@odata.type'] === '#Model.ShoppingSettings') {\r\n data.ProviderId = campaignModel.CampaignSettings[0].ProviderId;\r\n data.FeedId = campaignModel.CampaignSettings[0].FeedId;\r\n data.SalesCountry = campaignModel.CampaignSettings[0].SalesCountry;\r\n data.FeedLabel = campaignModel.CampaignSettings[0].FeedLabel;\r\n data.LocalInventoryAdsEnabled = campaignModel.CampaignSettings[0].LocalInventoryAdsEnabled;\r\n data.ShoppableAdsEnabled = campaignModel.CampaignSettings[0].ShoppableAdsEnabled;\r\n data.Priority = campaignModel.CampaignSettings[0].Priority;\r\n data.FeedTypeId = campaignModel.CampaignSettings[0].FeedTypeId;\r\n }\r\n\r\n data.StoreName = getStoreNameById(data.ProviderId, data.FeedId, productData, feedData);\r\n data.ProductFilters = getProdutFilters(data.ProviderId, data.FeedId, productData, feedData, permissions, campaignModel.CampaignSubType === CampaignSubTypes.AudienceDynamicFeedBased);\r\n\r\n const campaignViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n\r\n return campaignViewModel;\r\n};\r\n","// Directly reuse xandr-campaign/src/model/ad-group-criterions.js\r\nimport _ from 'underscore';\r\nimport { readAdGroupCriterions } from '@bingads-webui-campaign-react/xandr-campaign';\r\n\r\n// TODO: remove later. Just a temp placeholder\r\nexport {\r\n viewModelToBulkModelForTargeting,\r\n initialAdGroupCriterionsViewModel,\r\n modelToViewModelForAdGroupCriterions,\r\n modelToViewModelForLocationTargets,\r\n modelToViewModelForDayTimeTargets,\r\n modelToViewModelForTargetCriterions,\r\n modelToViewModelForAudienceCriterions,\r\n bulkModelToViewModelForDayTimeTargets,\r\n bulkModelToViewModelForLocationTargets,\r\n viewModelToBulkModelForLocationTargets,\r\n viewModelToBulkModelForAdSchedules,\r\n viewModelToBulkModelForAudiences,\r\n loadBundleCountries,\r\n readAdGroupCriterions,\r\n readLocationCriterions as readAdGroupLocationCriterions,\r\n readDayTimeCriterions,\r\n readTargetingCriterions as readAdGroupTargetingCriterions,\r\n readAudienceCriterions,\r\n} from '@bingads-webui-campaign-react/xandr-campaign';\r\n\r\n// Reuse display-plus-campaigns/src/shared/model/adgroup-criterions-with-bid-adjustment.js\r\nexport {\r\n viewModelToBulkModelForBidAdjustmentUI,\r\n} from '@bingads-webui-campaign-react/display-plus-campaigns';\r\n\r\nexport const readAdGroupAgeAndGenderCriterions = ({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n}) => readAdGroupCriterions({\r\n cid,\r\n aid,\r\n campaignId,\r\n adGroupId,\r\n type: \"isof(Criterion,'Model.AgeCriterion') or isof(Criterion,'Model.GenderCriterion')\",\r\n});\r\n\r\nexport const bulkModelToViewModelForProductPartitions = ({\r\n adGroupModel,\r\n}) => adGroupModel.ProductPartitions && ({\r\n ProductPartitions: adGroupModel.ProductPartitions.map(productPartition => _.omit(productPartition, 'Client Id')),\r\n});\r\n","import { pick, extend, omit, isString, isEmpty, has } from 'underscore';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport {\r\n modelToViewModelForLocationTargets,\r\n modelToViewModelForDayTimeTargets,\r\n bulkModelToViewModelForLocationTargets,\r\n bulkModelToViewModelForDayTimeTargets,\r\n modelToViewModelForTargetCriterions,\r\n modelToViewModelForAudienceCriterions,\r\n AdGroupNegativeReferenceId,\r\n} from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { bulkModelToViewModelForProductPartitions } from './ad-group-criterions';\r\n\r\n// The i18n object passed from the React context is not fully initialized with account timezone.\r\n// The parseDate and formatDate will use the browser timezone instead of account timezone, causing issues.\r\nconst globalLegacyI18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/campaign-creation-advanced');\r\n\r\nconst whitelistedSchemaPropertyKeysForModel = [\r\n 'Id', 'Name', 'Status', 'BidStrategyName', 'Campaign', 'SearchBid', 'CampaignName',\r\n 'AdScheduleUseSearcherTimeZone', 'StartDate', 'EndDate', 'FrequencyCapSettings',\r\n 'TrackingUrlTemplate', 'UrlCustomParameters', 'FinalUrlSuffix', 'UseOptimizedTargeting',\r\n 'AdDistribution', 'Medium',\r\n];\r\n\r\nconst readonlyPropertyKeysForModel = [\r\n // StartDate is not simply readonly. It can be updated in certain situations such as the current start date being in the future\r\n // Refer to the DB sproc for details.\r\n // 'StartDate',\r\n];\r\n\r\nexport const modelToViewModelForAdGroup = ({\r\n adGroupModel,\r\n campaignModel,\r\n locationCriterionsModel,\r\n dayTimeCriterionsModel,\r\n bundleCountries,\r\n targetCriterionsModel,\r\n audienceCriterionsModel,\r\n i18n,\r\n isAudienceShoppingCampaign = false,\r\n}) => {\r\n let data = pick(adGroupModel, whitelistedSchemaPropertyKeysForModel);\r\n\r\n data.CampaignSubType = campaignModel && campaignModel.CampaignSubType;\r\n data.CampaignBidStrategyName = campaignModel && campaignModel.BiddingScheme && campaignModel.BiddingScheme.Type;\r\n data.AdRotation = adGroupModel.AdRotation && adGroupModel.AdRotation.RotationType;\r\n data.ProductPartitions = adGroupModel.ProductPartitions;\r\n\r\n if (!isAudienceShoppingCampaign) {\r\n data.AdDistribution = adGroupModel.AdDistribution;\r\n }\r\n\r\n data = extend(data, modelToViewModelForDateSetting({\r\n adGroupModel,\r\n i18n,\r\n }));\r\n\r\n if (isAudienceShoppingCampaign) {\r\n data.UseOptimizedTargeting = adGroupModel.UseOptimizedTargeting;\r\n }\r\n\r\n if (locationCriterionsModel) {\r\n data = extend(data, modelToViewModelForLocationTargets({\r\n model: locationCriterionsModel,\r\n bundleCountries,\r\n adGroupId: adGroupModel.Id,\r\n }));\r\n }\r\n\r\n if (dayTimeCriterionsModel) {\r\n data = extend(data, modelToViewModelForDayTimeTargets({\r\n model: dayTimeCriterionsModel,\r\n }));\r\n }\r\n\r\n if (targetCriterionsModel) {\r\n data = extend(data, modelToViewModelForTargetCriterions({\r\n model: targetCriterionsModel,\r\n }));\r\n }\r\n\r\n if (audienceCriterionsModel) {\r\n data = extend(data, modelToViewModelForAudienceCriterions({\r\n model: audienceCriterionsModel,\r\n }));\r\n }\r\n\r\n const adGroupViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return adGroupViewModel;\r\n};\r\n\r\nexport const convertMachineDateToAccountDate = (date) => {\r\n const dateString = globalLegacyI18n.formatDate(date, {\r\n timeZone: undefined,\r\n raw: 'yyyy-MM-dd',\r\n });\r\n\r\n return globalLegacyI18n.parseDate(dateString, {\r\n timeZone: undefined,\r\n raw: 'yyyy-MM-dd',\r\n });\r\n};\r\n\r\nconst formatDateToAPIFormat = (i18n, date) => {\r\n if (date == null) {\r\n return '';\r\n }\r\n\r\n if (typeof date === 'string') {\r\n return date;\r\n }\r\n\r\n return globalLegacyI18n.formatDate(date, {\r\n raw: 'M/d/yyyy',\r\n });\r\n};\r\n\r\nconst parseDateFromAPIFormat = (i18n, date) => {\r\n if (date == null) {\r\n return null;\r\n }\r\n\r\n if (typeof date === 'string') {\r\n const dateFromMdyyyyFormat = globalLegacyI18n.parseDate(date.substring(0, 10), { raw: 'M/d/yyyy' });\r\n const dateFromyyyyMdFormat = globalLegacyI18n.parseDate(date.substring(0, 10), { raw: 'yyyy-M-d' });\r\n return dateFromMdyyyyFormat || dateFromyyyyMdFormat;\r\n }\r\n\r\n return date;\r\n};\r\n\r\nexport const modelToViewModelForDateSetting = ({ adGroupModel, i18n }) => ({\r\n StartDate: adGroupModel.StartDate ? parseDateFromAPIFormat(i18n, adGroupModel.StartDate) : undefined,\r\n EndDate: adGroupModel.EndDate ? parseDateFromAPIFormat(i18n, adGroupModel.EndDate) : undefined,\r\n});\r\n\r\nexport const viewModelToBulkModelForDateSetting = ({ i18n, adGroupViewModel }) => ({\r\n StartDate: formatDateToAPIFormat(i18n, adGroupViewModel.data.StartDate),\r\n EndDate: adGroupViewModel.data.EndDate ? formatDateToAPIFormat(i18n, adGroupViewModel.data.EndDate) : '1/1/3000',\r\n});\r\n\r\nconst bulkModelToViewModelForDateSetting = ({ adGroupModel, originalAdGroupViewModel, i18n }) => ({\r\n StartDate: adGroupModel.StartDate ? parseDateFromAPIFormat(i18n, adGroupModel.StartDate) : originalAdGroupViewModel.data.StartDate,\r\n EndDate: adGroupModel.EndDate && adGroupModel.EndDate !== '1/1/3000' ? parseDateFromAPIFormat(i18n, adGroupModel.EndDate) : undefined,\r\n});\r\n\r\nexport const bulkModelToViewModelForAdGroup = ({\r\n adGroupModel,\r\n bundleCountries,\r\n originalAdGroupViewModel,\r\n i18n,\r\n}) => {\r\n let data = pick(adGroupModel, whitelistedSchemaPropertyKeysForModel);\r\n if (data.Id && isString(data.Id)) {\r\n // eslint-disable-next-line no-param-reassign\r\n data.Id = parseInt(data.Id, 10);\r\n }\r\n\r\n data = extend(data, bulkModelToViewModelForLocationTargets({\r\n locationTargetsModel: adGroupModel.AdGroupCriterions || [],\r\n bundleCountries,\r\n }));\r\n data = extend(data, bulkModelToViewModelForDayTimeTargets({\r\n criterions: adGroupModel.AdGroupCriterions || [],\r\n }));\r\n\r\n data = extend(data, bulkModelToViewModelForDateSetting({ adGroupModel, originalAdGroupViewModel, i18n }));\r\n\r\n if (isEmpty(data.FrequencyCapSettings)) {\r\n data = extend(data, { FrequencyCapSettings: [{}] });\r\n }\r\n\r\n if (originalAdGroupViewModel.data.deal) {\r\n data = extend(data, {\r\n deal: originalAdGroupViewModel.data.deal,\r\n });\r\n }\r\n\r\n data = extend(data, bulkModelToViewModelForProductPartitions({\r\n adGroupModel,\r\n }));\r\n\r\n const adGroupViewModel = {\r\n data,\r\n isValid: true,\r\n isDirty: false,\r\n };\r\n return adGroupViewModel;\r\n};\r\n\r\nexport const viewModelToModelForAdGroup = ({ adGroupViewModel, i18n, isAudienceShoppingCampaign }) => {\r\n let model = pick(adGroupViewModel.data, whitelistedSchemaPropertyKeysForModel);\r\n\r\n model = extend(model, viewModelToBulkModelForDateSetting({ i18n, adGroupViewModel }));\r\n\r\n if (!adGroupViewModel.data.Id || adGroupViewModel.data.Id === AdGroupNegativeReferenceId) {\r\n model.Id = AdGroupNegativeReferenceId;\r\n\r\n if (isEmpty(model.FrequencyCapSettings) ||\r\n isEmpty(model.FrequencyCapSettings[0]) ||\r\n !model.FrequencyCapSettings[0].CapValue) {\r\n model = omit(model, 'FrequencyCapSettings');\r\n }\r\n } else {\r\n model = omit(model, readonlyPropertyKeysForModel);\r\n }\r\n\r\n if (has(adGroupViewModel.data, 'PricingModel')) {\r\n model.PricingModel = adGroupViewModel.data.PricingModel;\r\n }\r\n\r\n if (isAudienceShoppingCampaign) {\r\n model = omit(model, 'AdDistribution');\r\n } else if (has(adGroupViewModel.data, 'AdDistribution')) {\r\n model.AdDistribution = adGroupViewModel.data.AdDistribution;\r\n }\r\n\r\n if (has(adGroupViewModel.data, 'AdRotation')) {\r\n model.AdRotation = adGroupViewModel.data.AdRotation;\r\n }\r\n\r\n if (has(adGroupViewModel.data, 'TargetSetting')) {\r\n model.TargetSetting = adGroupViewModel.data.TargetSetting;\r\n }\r\n\r\n if (adGroupViewModel.data.CampaignBidStrategyName === 'ManualCpc' || adGroupViewModel.data.CampaignBidStrategyName === 'EnhancedCpc') {\r\n model.SearchBid = adGroupViewModel.data.SearchBid;\r\n }\r\n\r\n return model;\r\n};\r\n\r\n\r\nconst readAdGroup = (cid, aid, campaignId, adGroupId) =>\r\n edmCampaign\r\n .Customers.$withKey(cid)\r\n .Accounts.$withKey(aid)\r\n .Campaigns.$withKey(campaignId)\r\n .AdGroups.$withKey(adGroupId)\r\n .get()\r\n .toPromise();\r\n\r\nexport const loadAdGroup = (cid, aid, campaignId, adGroupId) =>\r\n readAdGroup(cid, aid, campaignId, adGroupId);\r\n","import { pick, extend } from 'underscore';\r\nimport { AdGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { ERROR_ENTITY, isBulkWrappedResponse, getBulkUploadErrorType, modelToViewModelForBulkErrors, removeReferencedEntityInvalidIdErrors } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { getErrorsPlaceholders } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { isAudienceShoppingCampaign } from '@bingads-webui-campaign-react/constants';\r\n\r\nimport { bulkModelToViewModelForAdGroup, viewModelToModelForAdGroup } from './ad-group';\r\nimport { PLACEHOLDER_ID } from '../constants';\r\nimport {\r\n viewModelToBulkModelForLocationTargets,\r\n viewModelToBulkModelForAdSchedules,\r\n viewModelToBulkModelForAudiences,\r\n} from './ad-group-criterions';\r\nimport {\r\n viewModelToBulkModelForTargeting\r\n} from './campaign-criterions';\r\n\r\nconst adGroupEDM = edmCampaign.types.resolve('Model.AdGroup');\r\nconst adGroupResource = new adGroupEDM.ResourceIdentifier();\r\n\r\nconst createOrUpdateAdGroup = (data) => {\r\n const createOrUpdateCall = data && data.Id ?\r\n adGroupResource.bulkUpdate.bind(adGroupResource) :\r\n adGroupResource.bulkCreate.bind(adGroupResource);\r\n return createOrUpdateCall(data);\r\n};\r\n\r\nconst GENERIC_ERROR_MESSAGE_KEY = _TL_(\"We've encountered an error and can't continue. Please contact support for further assistance.\");\r\n\r\nconst bulkUpsertAdGroupSettingsEntityErrorMap = {\r\n [getBulkUploadErrorType(AdGroup)]: ERROR_ENTITY.AdGroup,\r\n};\r\n\r\nexport const viewModelToBulkModelForAdGroup = ({\r\n campaignViewModel,\r\n adGroupViewModel,\r\n bundleLocationCriterions,\r\n customTargetingBulkModel = null,\r\n saveAdGroupCriterions = false,\r\n updateProductPartitionBids = false,\r\n isProductGroupAllowedForAudienceCampaign = false,\r\n i18n,\r\n}) => {\r\n const isUpdate = !!adGroupViewModel.data.Id;\r\n const doesCampaignExist = !!campaignViewModel.Id;\r\n const isAudienceCampaign = isAudienceShoppingCampaign(campaignViewModel.CampaignType, campaignViewModel.CampaignSubType);\r\n const isAudienceDynamicFeedBasedCampaign = isAudienceCampaign && campaignViewModel.CampaignSubType === 'AudienceDynamicFeedBased';\r\n // Product groups are always supported for SWF\r\n // For AudienceFeedBased, it requires an pilot\r\n // For AudienceDynamicFeedBased, it is not supported\r\n const isProductGroupSupported = !isAudienceCampaign || (isProductGroupAllowedForAudienceCampaign && !isAudienceDynamicFeedBasedCampaign);\r\n const adGroupModel = viewModelToModelForAdGroup({ adGroupViewModel, i18n, isAudienceShoppingCampaign: isAudienceCampaign });\r\n const modelToSave = {\r\n ...adGroupModel,\r\n Campaign: doesCampaignExist ? pick(campaignViewModel, 'Id') : {\r\n Id: PLACEHOLDER_ID.CampaignNegativeReferenceId,\r\n },\r\n };\r\n\r\n if (saveAdGroupCriterions) {\r\n const locationTargetsModel = viewModelToBulkModelForLocationTargets({\r\n bundleLocationCriterions,\r\n adGroupViewModel,\r\n campaignViewModel,\r\n });\r\n const adSchedulesModel = viewModelToBulkModelForAdSchedules({ adGroupViewModel, campaignViewModel });\r\n const targetingModel = customTargetingBulkModel ?\r\n customTargetingBulkModel({ adGroupViewModel, campaignViewModel }) :\r\n viewModelToBulkModelForTargeting({\r\n adGroupViewModel,\r\n campaignViewModel: {\r\n data: campaignViewModel,\r\n },\r\n });\r\n\r\n const audienceCriterionsModel = viewModelToBulkModelForAudiences({ adGroupViewModel, campaignViewModel });\r\n modelToSave.AdGroupCriterions = [\r\n ...locationTargetsModel,\r\n ...adSchedulesModel,\r\n ...targetingModel,\r\n ];\r\n modelToSave.AdGroupAudienceCriterions = audienceCriterionsModel;\r\n }\r\n\r\n // Create necessary child entities if this is a new ad group\r\n if (!isUpdate) {\r\n // Ads are implicitly created for AWF. Besides, they don't use Product Ads type\r\n if (!isAudienceCampaign) {\r\n extend(modelToSave, {\r\n ProductAds: {\r\n CampaignName: campaignViewModel.Name,\r\n AdGroupName: adGroupModel.Name,\r\n PromotionalText: '',\r\n },\r\n });\r\n }\r\n\r\n if (isProductGroupSupported) {\r\n extend(modelToSave, {\r\n ProductPartitions: [{\r\n BidAmount: adGroupModel.SearchBid,\r\n ProductCondition: 'All',\r\n ProductValue: '',\r\n CampaignName: campaignViewModel.Name,\r\n AdGroupName: adGroupModel.Name,\r\n IsExcluded: false,\r\n IsLeaf: 'Unit',\r\n }],\r\n });\r\n }\r\n }\r\n\r\n if (updateProductPartitionBids && isProductGroupSupported && adGroupViewModel.data.ProductPartitions) {\r\n extend(modelToSave, {\r\n ProductPartitions: adGroupViewModel.data.ProductPartitions.map(productPartition => ({\r\n ...productPartition,\r\n BidAmount: adGroupModel.SearchBid,\r\n })),\r\n });\r\n }\r\n\r\n return modelToSave;\r\n};\r\n\r\nexport const saveAdGroup = async ({\r\n adGroup: adGroupViewModel,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n campaign,\r\n customTargetingBulkModel = null,\r\n saveAdGroupCriterions = false,\r\n updateProductPartitionBids = false,\r\n isProductGroupAllowedForAudienceCampaign = false,\r\n}, {\r\n scenario, i18n, activityLogger,\r\n}) => {\r\n const adGroupBulkModel = viewModelToBulkModelForAdGroup({\r\n campaignViewModel: campaign,\r\n adGroupViewModel,\r\n bundleLocationCriterions,\r\n customTargetingBulkModel,\r\n updateProductPartitionBids,\r\n saveAdGroupCriterions,\r\n isProductGroupAllowedForAudienceCampaign,\r\n i18n,\r\n });\r\n\r\n try {\r\n const result = await createOrUpdateAdGroup(adGroupBulkModel);\r\n\r\n const data = {\r\n adGroup: bulkModelToViewModelForAdGroup({\r\n adGroupModel: result,\r\n originalAdGroupViewModel: adGroupViewModel,\r\n bundleCountries,\r\n i18n,\r\n }),\r\n ...getErrorsPlaceholders(),\r\n };\r\n return data;\r\n } catch (bulkOrSystemError) {\r\n if (isBulkWrappedResponse(bulkOrSystemError)) {\r\n const { entity, errors } = bulkOrSystemError;\r\n const adGroup = entity ?\r\n bulkModelToViewModelForAdGroup({\r\n adGroupModel: entity,\r\n originalAdGroupViewModel: adGroupViewModel,\r\n bundleCountries,\r\n errors,\r\n i18n,\r\n }) :\r\n adGroupViewModel;\r\n\r\n let filteredErrors = errors;\r\n if (adGroup.data.Id <= 0) {\r\n filteredErrors = removeReferencedEntityInvalidIdErrors(errors);\r\n }\r\n\r\n const serverErrors = modelToViewModelForBulkErrors(\r\n filteredErrors,\r\n bulkUpsertAdGroupSettingsEntityErrorMap,\r\n scenario,\r\n i18n,\r\n activityLogger\r\n );\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n adGroup,\r\n serverErrors,\r\n });\r\n }\r\n\r\n // Activity\r\n // eslint-disable-next-line no-console\r\n console.warn(`AdGroup bulk upsert system error: ${bulkOrSystemError.stack || bulkOrSystemError.message || bulkOrSystemError}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n\r\n return {\r\n adGroup: adGroupViewModel,\r\n systemErrors: [i18n.getString(GENERIC_ERROR_MESSAGE_KEY)],\r\n // TODO: We would want to return the criterions with Ids, but UI's bulk drops them\r\n };\r\n }\r\n};\r\n","import { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport _ from 'underscore';\r\nimport { edmCampaign } from '@bingads-webui/edm-campaign';\r\nimport { viewModelToBulkModelForConversionGoals } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { ERROR_ENTITY, isBulkWrappedResponse, getBulkUploadErrorType, modelToViewModelForBulkErrors, removeReferencedEntityInvalidIdErrors } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { getErrorsPlaceholders } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { isAudienceShoppingCampaign } from '@bingads-webui-campaign-react/constants';\r\nimport { bulkModelToViewModelForAdGroup } from './ad-group';\r\nimport { bulkModelToViewModelForCampaign, viewModelToModelForCampaign } from './campaign';\r\nimport { PLACEHOLDER_ID } from '../constants';\r\nimport { viewModelToBulkModelForAudiences, viewModelToBulkModelForTargeting, viewModelToBulkModelForLocationTargets } from './campaign-criterions';\r\nimport { viewModelToBulkModelForAdGroup } from './ad-group-bulk';\r\n\r\nconst campaignEDM = edmCampaign.types.resolve('Model.ShoppingCampaign');\r\nconst campaignResource = new campaignEDM.ResourceIdentifier();\r\n\r\nconst createOrUpdateCampaign = (data) => {\r\n const createOrUpdateCall = data && data.Id ?\r\n campaignResource.bulkUpdate.bind(campaignResource) :\r\n campaignResource.bulkCreate.bind(campaignResource);\r\n return createOrUpdateCall(data);\r\n};\r\n\r\nconst GENERIC_ERROR_MESSAGE_KEY = _TL_(\"We've encountered an error and can't continue. Please contact support for further assistance.\");\r\n\r\nconst bulkUpsertCampaignSettingsEntityErrorMap = {\r\n [getBulkUploadErrorType(Campaign)]: ERROR_ENTITY.Campaign,\r\n};\r\n\r\nexport const saveCampaign = ({\r\n campaign: campaignViewModel,\r\n adGroup: adGroupViewModel,\r\n viewModelToBulkModelForAdSchedules = null,\r\n updateCampaignStatus = true,\r\n bundleLocationCriterions,\r\n bundleCountries,\r\n}, { scenario, i18n, activityLogger }) => {\r\n const campaignModel = viewModelToModelForCampaign(campaignViewModel);\r\n const isAudienceCampaign = isAudienceShoppingCampaign(campaignViewModel.data.CampaignType, campaignViewModel.data.CampaignSubType);\r\n\r\n let conversionGoalsAssociations = {};\r\n let adSchedulesModel = [];\r\n\r\n const modelToSave = {\r\n ...campaignModel,\r\n ...conversionGoalsAssociations,\r\n };\r\n\r\n if (!updateCampaignStatus) {\r\n delete modelToSave.Status;\r\n }\r\n\r\n if (!_.isEmpty(campaignViewModel.data.conversionGoals)) {\r\n conversionGoalsAssociations = {\r\n CampaignConversionGoalAssociations: viewModelToBulkModelForConversionGoals(campaignViewModel, campaignViewModel.data.Id || PLACEHOLDER_ID.CampaignNegativeReferenceId),\r\n };\r\n _.extend(modelToSave, { ...conversionGoalsAssociations });\r\n }\r\n\r\n if (viewModelToBulkModelForAdSchedules) {\r\n adSchedulesModel = viewModelToBulkModelForAdSchedules({ campaignViewModel });\r\n }\r\n const targetingModel = viewModelToBulkModelForTargeting({ campaignViewModel });\r\n const locationModel = viewModelToBulkModelForLocationTargets({ campaignViewModel, bundleLocationCriterions });\r\n\r\n modelToSave.CampaignCriterions = [\r\n ...adSchedulesModel,\r\n ...targetingModel,\r\n ...locationModel,\r\n ];\r\n\r\n modelToSave.CampaignAudienceCriterions = viewModelToBulkModelForAudiences({ campaignViewModel });\r\n\r\n\r\n if (!modelToSave.Id) {\r\n modelToSave.Id = PLACEHOLDER_ID.CampaignNegativeReferenceId;\r\n }\r\n\r\n if (adGroupViewModel) {\r\n modelToSave.AdGroups = [\r\n viewModelToBulkModelForAdGroup({\r\n adGroupViewModel,\r\n campaignViewModel: campaignViewModel.data,\r\n i18n,\r\n saveAdGroupCriterions: isAudienceCampaign, // For AWF, targets are created at ad group level\r\n }),\r\n ];\r\n }\r\n\r\n return createOrUpdateCampaign(modelToSave)\r\n // with bulk the result will have shape of:\r\n // - { ...entityData } - in case of success;\r\n // - { entity: { ...entityData }, errors: [(EditorialError|MTError)] } - in case of error(s).\r\n .then((result) => {\r\n const data = {\r\n campaign: bulkModelToViewModelForCampaign({\r\n campaignModel: result,\r\n originalCampaignModel: campaignViewModel,\r\n bundleCountries,\r\n }),\r\n ...getErrorsPlaceholders(),\r\n };\r\n\r\n if (adGroupViewModel) {\r\n data.adGroup = bulkModelToViewModelForAdGroup({\r\n adGroupModel: result.AdGroups[0],\r\n originalAdGroupViewModel: adGroupViewModel,\r\n bundleCountries,\r\n i18n,\r\n });\r\n }\r\n\r\n return data;\r\n }, (bulkOrSystemError) => {\r\n if (isBulkWrappedResponse(bulkOrSystemError)) {\r\n const { entity, errors } = bulkOrSystemError;\r\n const campaign = entity ?\r\n bulkModelToViewModelForCampaign({\r\n campaignModel: entity,\r\n originalCampaignModel: campaignViewModel,\r\n }) :\r\n campaignViewModel;\r\n\r\n const adGroupData = {};\r\n if (adGroupViewModel) {\r\n adGroupData.adGroup = bulkModelToViewModelForAdGroup({\r\n adGroupModel: entity.AdGroups[0],\r\n originalAdGroupViewModel: adGroupViewModel,\r\n i18n,\r\n });\r\n }\r\n\r\n let filteredErrors = errors;\r\n if (campaign.data.Id <= 0) {\r\n filteredErrors = removeReferencedEntityInvalidIdErrors(errors);\r\n }\r\n\r\n const serverErrors = modelToViewModelForBulkErrors(\r\n filteredErrors,\r\n bulkUpsertCampaignSettingsEntityErrorMap,\r\n scenario,\r\n i18n,\r\n activityLogger\r\n );\r\n\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n campaign,\r\n serverErrors,\r\n ...adGroupData,\r\n });\r\n }\r\n\r\n // Activity\r\n // eslint-disable-next-line no-console\r\n console.warn(`Campaign bulk upsert system error: ${bulkOrSystemError.stack || bulkOrSystemError.message || bulkOrSystemError}`);\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({\r\n campaign: campaignViewModel,\r\n systemErrors: [i18n.getString(GENERIC_ERROR_MESSAGE_KEY)],\r\n // TODO: We would want to return the criterions with Ids, but UI's bulk drops them\r\n });\r\n });\r\n};\r\n","export const getCollapsiblePanelStyles = (components, theme) => ({\r\n border: 'none',\r\n marginBottom: 'unset',\r\n backgroundColor: 'unset',\r\n\r\n '& .panel-heading': {\r\n padding: 0,\r\n borderBottom: 'none',\r\n marginBottom: 18,\r\n\r\n '& .panel-title': {\r\n fontSize: 18,\r\n '& > a': {\r\n color: theme.palette.themePrimary,\r\n padding: 0,\r\n '&:hover, &:active': {\r\n color: theme.palette.themeDarker,\r\n textDecoration: 'none',\r\n backgroundColor: 'unset',\r\n },\r\n },\r\n\r\n '& > a:after': {\r\n transform: 'rotate(180deg)',\r\n },\r\n\r\n '& > a.collapsed:after': {\r\n transform: 'rotate(90deg)',\r\n },\r\n },\r\n },\r\n\r\n '& .panel-collapse': {\r\n '& .panel-body': {\r\n padding: 0,\r\n overflow: 'hidden',\r\n },\r\n },\r\n});\r\n\r\nexport const getPannelHeaderStyles = () => ({\r\n pannelHeader: {\r\n display: 'inline',\r\n fontSize: 18,\r\n marginBottom: 0,\r\n padding: 0,\r\n },\r\n});\r\n","import { useMemo, useCallback, useRef, useEffect } from 'react';\r\nimport {\r\n getCurrentStepId, WIZARD_EVENTS,\r\n} from '@bingads-webui-react/wizard';\r\n\r\nexport const LOG_STATUS = {\r\n LOAD_START: 'load_start',\r\n LOAD_SUCCESS: 'load_success',\r\n SAVE_START: 'save_start',\r\n SAVE_SUCCESS: 'save_success',\r\n SAVE_FAIL: 'save_fail',\r\n CANCEL: 'cancel',\r\n};\r\n\r\nexport const useWizardLog = ({\r\n activity, wizardState, isSearch, flow,\r\n}) => {\r\n const stepTime = useRef({\r\n loadStart: 0,\r\n loadEnd: 0,\r\n saveStart: 0,\r\n saveEnd: 0,\r\n });\r\n\r\n const logContent = useMemo(() => ({\r\n flow: flow || `${isSearch ? 'search' : 'audience'}-shopping/new`,\r\n step: getCurrentStepId(wizardState),\r\n stepDuration: 0,\r\n requestSpend: 0,\r\n msg: '',\r\n status: '',\r\n guid: activity.id,\r\n }), [flow, isSearch, wizardState, activity.id]);\r\n\r\n const traceLog = useCallback((logPayload) => {\r\n activity.trace(JSON.stringify(logPayload));\r\n }, [activity]);\r\n\r\n const onStepLoadedLog = useCallback(({ status, msg = '' }) => {\r\n const nowTime = Date.now();\r\n const logs = { status };\r\n if (msg) {\r\n logs.msg = msg;\r\n }\r\n if (status === LOG_STATUS.LOAD_START) {\r\n stepTime.current.loadStart = nowTime;\r\n } else if (status === LOG_STATUS.LOAD_SUCCESS) {\r\n stepTime.current.loadEnd = nowTime;\r\n logs.requestSpend = nowTime - stepTime.current.loadStart;\r\n }\r\n traceLog({\r\n ...logContent,\r\n ...logs,\r\n status,\r\n });\r\n }, [logContent, stepTime, traceLog]);\r\n\r\n const onStepSavedLog = useCallback(({ status, msg = '' }) => {\r\n const nowTime = Date.now();\r\n const logs = { status };\r\n if (msg) {\r\n logs.msg = msg;\r\n }\r\n if (status === LOG_STATUS.SAVE_START) {\r\n stepTime.current.saveStart = nowTime;\r\n } else if (status === LOG_STATUS.SAVE_SUCCESS || status === LOG_STATUS.SAVE_FAIL) {\r\n logs.requestSpend = nowTime - stepTime.current.saveStart;\r\n logs.stepDuration = nowTime - stepTime.current.loadEnd;\r\n }\r\n traceLog({\r\n ...logContent,\r\n ...logs,\r\n });\r\n }, [logContent, stepTime, traceLog]);\r\n\r\n useEffect(() => (() => {\r\n if (wizardState.event.type === WIZARD_EVENTS.CANCEL) {\r\n traceLog({\r\n ...logContent,\r\n status: LOG_STATUS.CANCEL,\r\n stepDuration: Date.now() - stepTime.current.loadEnd,\r\n });\r\n }\r\n }), [wizardState, logContent, traceLog]);\r\n\r\n return {\r\n onStepLoadedLog,\r\n onStepSavedLog,\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport { getProductScopeData } from '@bingads-webui-campaign-react/product-services';\r\nimport { getProductData as GetProductData } from '@bingads-webui-campaign/audience-campaign-shared';\r\n\r\nexport const getProductData = (params, serverContext) => {\r\n const isOdataGetProductScopeEnabled = _.get(serverContext, ['DynamicPermissions', 'OdataGetProductScope'], false);\r\n let p = null;\r\n\r\n if (!isOdataGetProductScopeEnabled) {\r\n p = GetProductData(params);\r\n\r\n return p;\r\n }\r\n\r\n const options = {\r\n dataName: 'MetaData',\r\n };\r\n\r\n if (params.salesCountry) {\r\n options.countryCode = params.salesCountry;\r\n }\r\n\r\n if (params.campaignId) {\r\n options.campaignId = params.campaignId;\r\n options.getCampaignCriterions = true;\r\n options.bypassCache = true;\r\n options.cacheResponse = false;\r\n options.shouldShowPlaceholderStoreIfExists = true;\r\n } else {\r\n options.bypassCache = false;\r\n options.cacheResponse = true;\r\n }\r\n\r\n if (params.getCampaignCriterionsOnly) {\r\n options.getCampaignCriterionsOnly = true;\r\n } else {\r\n options.getProductConditionOptions = true;\r\n options.getSalesCountryCollection = true;\r\n options.getDynamicDataFeedOptions = true;\r\n\r\n if (params.getCategoryFullData) {\r\n options.getCategoryFullData = true;\r\n }\r\n\r\n if (params.getProductTypeFullData) {\r\n options.getProductTypeFullData = true;\r\n }\r\n }\r\n\r\n p = getProductScopeData(null, serverContext, options);\r\n\r\n return p;\r\n}\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { useContext, useMemo, useCallback } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useWizardService } from '@bingads-webui-react/wizard';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ActivityContext, ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { loadBundleCountries, getErrorsPlaceholders } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { withDFMCache } from '@bingads-webui/dfm-cache';\r\nimport { mergeData } from '@bingads-webui-campaign-react/product-services';\r\nimport { getFeedData } from '@bingads-webui-campaign/audience-campaign-creation-wizard';\r\n\r\nimport {\r\n loadCampaign,\r\n loadAdGroup,\r\n readDayTimeCriterions,\r\n readLocationCriterions,\r\n readAdGroupLocationCriterions,\r\n readAgeAndGenderTargetingCriterions,\r\n readAdGroupAgeAndGenderCriterions,\r\n modelToViewModelForAdGroup,\r\n modelToViewModelForCampaign,\r\n viewModelToModelForCampaign,\r\n viewModelToModelForConversionGoals,\r\n saveAdGroup,\r\n saveCampaign,\r\n} from '../../model';\r\nimport { isSearchShoppingCampaign, allSettledPromiseWrapper } from '../step-utils';\r\nimport { useWizardLog, LOG_STATUS, getProductData } from '../../shared';\r\n\r\nconst getFeedDataWithCache = withDFMCache(getFeedData, 'getFeedScopeDFM', {});\r\n\r\nexport const useSummaryRepository = () => {\r\n const i18n = useContext(I18nContext);\r\n const { state } = useWizardService();\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n const serverContext = useContext(ServerContext);\r\n const { Permissions, DynamicPermissions } = serverContext || {};\r\n const permissions = useMemo(() => ({ dynamic: { ...DynamicPermissions }, ...Permissions }), [DynamicPermissions, Permissions]);\r\n const isPAAIMConsolidationEnabled = _.get(serverContext, ['DynamicPermissions', 'PAAIMConsolidation'], false);\r\n const isOdataGetProductScopeEnabled = _.get(serverContext, ['DynamicPermissions', 'OdataGetProductScope'], false);\r\n\r\n const scenarioContext = useContext(ScenarioContext);\r\n const activity = useContext(ActivityContext);\r\n\r\n const internalGetProductData = useCallback(params => getProductData(params, serverContext), [serverContext]);\r\n const getAudienceProductDataWithCache = withDFMCache(internalGetProductData, 'getAudienceProductScopeDFM', {});\r\n const getProductDataWithCache = withDFMCache(internalGetProductData, 'getProductScopeDFM', {});\r\n\r\n const { cid, aid } = scope.values;\r\n\r\n const { flow, isPublishing } = state.context.wizardData;\r\n const isSearch = isSearchShoppingCampaign(flow);\r\n const { onStepLoadedLog, onStepSavedLog } = useWizardLog({ activity, wizardState: state, isSearch });\r\n\r\n\r\n const load = () => {\r\n onStepLoadedLog({ status: LOG_STATUS.LOAD_START });\r\n const savedCampaign = state.context.wizardData.campaign;\r\n const savedAdGroup = state.context.wizardData.adGroup;\r\n const savedProductData = state.context.wizardData.productData;\r\n const savedFeedData = state.context.wizardData.feedData;\r\n // const adGroupId = savedAdGroup ? savedAdGroup.Id : 1180875542953561;\r\n // const campaignId = savedCampaign ? savedCampaign.Id : 946842629; feedlabel\r\n const adGroupId = savedAdGroup ? savedAdGroup.Id : null;\r\n const campaignId = savedCampaign ? savedCampaign.Id : null;\r\n // const adGroupId = savedAdGroup ? savedAdGroup.Id : 1194069858307329;//null;\r\n // const campaignId = savedCampaign ? savedCampaign.Id : 1046593706;//null; dynamicFeed\r\n\r\n const isSearchShopping = isSearch;\r\n\r\n const loadPromises = {\r\n adGroup: savedAdGroup ? Promise.resolve(savedAdGroup) : loadAdGroup(cid, aid, campaignId, adGroupId),\r\n campaign: savedCampaign ? Promise.resolve({\r\n ...viewModelToModelForCampaign({\r\n data: savedCampaign,\r\n }),\r\n ...viewModelToModelForConversionGoals({\r\n data: savedCampaign,\r\n }),\r\n }) : loadCampaign(cid, aid, campaignId),\r\n locationCriterions: isSearchShopping ? readLocationCriterions({ cid, aid, campaignId }) : readAdGroupLocationCriterions({\r\n cid, aid, campaignId, adGroupId,\r\n }),\r\n dayTimeCriterions: readDayTimeCriterions({ cid, aid, campaignId }),\r\n targetCriterions: isSearchShopping ? readAgeAndGenderTargetingCriterions({ cid, aid, campaignId }) : readAdGroupAgeAndGenderCriterions({\r\n cid, aid, campaignId, adGroupId,\r\n }),\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({ cid, aid, serverContext }),\r\n };\r\n\r\n if (!isSearchShopping) {\r\n // When refresh in local, the data-fetch-manager will get product data without campaign Id and set cache. We can't get the campaignCriterion.\r\n // TODO: include permissions for CuriseFeedForAudienceCampaign 1073\r\n loadPromises.feedData = savedFeedData ? Promise.resolve(savedFeedData) : getFeedDataWithCache({ $top: 10000 /* permissions */ });\r\n } else {\r\n loadPromises.feedData = Promise.resolve(null);\r\n }\r\n\r\n if (!savedProductData) {\r\n const params = { campaignId };\r\n\r\n if (!isSearchShopping) {\r\n params.getCategoryFullData = true;\r\n params.getProductTypeFullData = true;\r\n params.salesCountry = 'US';\r\n }\r\n\r\n if (isOdataGetProductScopeEnabled) {\r\n const p = isSearchShopping ? getProductDataWithCache(params) : getAudienceProductDataWithCache(params);\r\n loadPromises.productData = p.then(pData => mergeData(pData));\r\n } else {\r\n loadPromises.productData = isSearchShopping ? getProductDataWithCache(params) : getAudienceProductDataWithCache(params);\r\n }\r\n } else {\r\n loadPromises.productData = Promise.resolve(savedProductData);\r\n }\r\n\r\n return Promise.props(loadPromises).then(({\r\n adGroup,\r\n campaign,\r\n locationCriterions,\r\n dayTimeCriterions,\r\n targetCriterions,\r\n bundleCountriesAndLocationCriterions,\r\n productData,\r\n feedData,\r\n }) => {\r\n onStepLoadedLog({ status: LOG_STATUS.LOAD_SUCCESS });\r\n const adGroupData = modelToViewModelForAdGroup({\r\n adGroupModel: adGroup,\r\n campaignModel: campaign,\r\n i18n,\r\n isAudienceShoppingCampaign: !isSearchShopping,\r\n locationCriterionsModel: !isSearchShopping && locationCriterions ? locationCriterions.value : [],\r\n targetCriterionsModel: !isSearchShopping && targetCriterions ? targetCriterions.value : [],\r\n });\r\n\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: campaign,\r\n locationCriterionsModel: isSearchShopping && locationCriterions ? locationCriterions.value : [],\r\n dayTimeCriterionsModel: dayTimeCriterions ? dayTimeCriterions.value : [],\r\n targetCriterionsModel: isSearchShopping && targetCriterions ? targetCriterions.value : [],\r\n bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries,\r\n productData,\r\n feedData,\r\n permissions,\r\n });\r\n\r\n return {\r\n adGroup: adGroupData.data,\r\n campaign: campaignData.data,\r\n };\r\n });\r\n };\r\n\r\n const save = () => {\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_START });\r\n const savedCampaign = state.context.wizardData.campaign;\r\n const savedAdGroup = state.context.wizardData.adGroup;\r\n\r\n if (isPublishing) {\r\n savedCampaign.Status = 'Active';\r\n savedAdGroup.Status = 'Active';\r\n } else {\r\n savedCampaign.Status = 'Paused';\r\n savedAdGroup.Status = 'Paused';\r\n }\r\n\r\n const savePromises = [\r\n saveAdGroup({\r\n adGroup: { data: savedAdGroup },\r\n campaign: savedCampaign,\r\n isProductGroupAllowedForAudienceCampaign: isPAAIMConsolidationEnabled,\r\n }, {\r\n scenario: scenarioContext.name,\r\n activityLogger: scenarioContext.createActivity('saveDefaultAdGroup'),\r\n i18n,\r\n }),\r\n saveCampaign({\r\n campaign: { data: savedCampaign },\r\n }, {\r\n scenario: scenarioContext.name,\r\n activityLogger: scenarioContext.createActivity('saveDefaultCampaign'),\r\n i18n,\r\n }),\r\n ];\r\n\r\n return new Promise((resolve, reject) => {\r\n allSettledPromiseWrapper(savePromises).then((results) => {\r\n const allSuccess = _.every(results, result => result.status === 'fulfilled');\r\n\r\n if (allSuccess) {\r\n const campaignData = results[1].value.campaign.data;\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_SUCCESS, msg: `Status: ${campaignData.Status}, Id: ${campaignData.Id}` });\r\n return resolve({\r\n adGroup: results[0].value.adGroup.data,\r\n campaign: results[1].value.campaign.data,\r\n ...getErrorsPlaceholders(),\r\n });\r\n }\r\n\r\n const errors = _.map(results, (result) => {\r\n if (result.status === 'fulfilled') {\r\n return null;\r\n }\r\n\r\n const { serverErrors = {} } = result.reason;\r\n\r\n return serverErrors;\r\n });\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_FAIL, msg: errors });\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return reject({ error: _.flatten(errors.filter(val => val !== null)) });\r\n });\r\n });\r\n };\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import { getCampaignType } from '../../step-utils';\r\n\r\nexport const getPriorityOptions = i18n => [\r\n { key: 'Low', text: i18n.getString(_TL_('Low')) },\r\n { key: 'Medium', text: i18n.getString(_TL_('Medium')) },\r\n { key: 'High', text: i18n.getString(_TL_('High')) },\r\n];\r\n\r\nexport const getShoppingSettingOptions = ({\r\n isSearch,\r\n settingScenarioName,\r\n i18n,\r\n productData,\r\n feedData,\r\n campaignSettings,\r\n activity,\r\n ccJsData,\r\n onStoreSelectionChange,\r\n onSalesCountryChange,\r\n onFeedLabelChange,\r\n setProductLoading,\r\n isCPSSelected,\r\n updateProductConditionOptions,\r\n updateChildLevelProductCondition,\r\n onSelectFilterProducts,\r\n}) => {\r\n const campaignTypeConfig = getCampaignType(isSearch, campaignSettings);\r\n if (isSearch) {\r\n return {\r\n settingScenarioName,\r\n data: productData,\r\n feedData,\r\n model: campaignSettings,\r\n campaignType: campaignTypeConfig.CampaignType,\r\n campaignSubType: campaignTypeConfig.CampaignSubType,\r\n // campaignId: _.result(this.campaign, 'Id'),\r\n isStoreValid: true,\r\n activityLogger: activity,\r\n onStoreSelectionChange,\r\n onSalesCountryChange,\r\n onFeedLabelChange,\r\n setProductLoading,\r\n isSponsoredSettings: {\r\n isSponsoredCampaign: false,\r\n isSPBCampaign: false,\r\n isSPBOptInAvailable: false,\r\n shouldUseNewMmcApiForSpa: false,\r\n hideBid: false,\r\n },\r\n ccJsData,\r\n deps: {\r\n i18nNewDesign: i18n,\r\n },\r\n isCPSSelected,\r\n isAllFeedProducts: false,\r\n updateProductConditionOptions,\r\n updateChildLevelProductCondition,\r\n onSelectFilterProducts,\r\n };\r\n }\r\n return {\r\n settingScenarioName,\r\n data: productData,\r\n feedData,\r\n model: campaignSettings,\r\n campaignType: campaignTypeConfig.CampaignType,\r\n campaignSubType: campaignTypeConfig.CampaignSubType,\r\n activityLogger: activity,\r\n ccJsData,\r\n deps: {\r\n i18nNewDesign: i18n,\r\n },\r\n onSalesCountryChange,\r\n onStoreSelectionChange,\r\n onFeedLabelChange,\r\n setProductLoading,\r\n isCPSSelected,\r\n isAllFeedProducts: false,\r\n };\r\n};\r\n","import React, { useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { LegacyShoppingSettings } from '@bingads-webui-campaign-react/legacy-shopping-settings';\r\nimport { andComp, propertyIs, entityIs } from '@bingads-webui-campaign-react/form-error';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { useJsDataContext } from '@bingads-webui-cc-react/js-data-rest';\r\nimport { SettingScenarios } from '@bingads-webui-campaign-legacy/shopping-campaign/view/campaign-creation/utils';\r\n\r\nimport { getShoppingSettingOptions } from './setting-configs';\r\n\r\nconst entityIsCampaign = entityIs('campaign');\r\nconst campaignProductFilterSchemeProp = andComp(entityIsCampaign, propertyIs('ProductFilter'));\r\n\r\nconst ProductFilterWithCustomValidation = ({\r\n updateValidation, productFilterRef, productData,\r\n campaignSettings, isSearch, feedData, setProductLoading,\r\n updateProductConditionOptions, updateChildLevelProductCondition,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const ccJsData = useJsDataContext();\r\n\r\n const onChange = useCallback((newData, isValid) => {\r\n // We are not using the updated data here as we will using the backbone view ref to get the final data\r\n updateValidation(isValid ? [] : [i18n.getString(_TL_('Legacy product settings has error'))]);\r\n if (activity && !isValid) {\r\n // signal activity to parent\r\n activity.signal(`onLegacyProductFilterChange - ${JSON.stringify(newData)} - isValid: ${isValid}}`);\r\n }\r\n }, [updateValidation, activity, i18n]);\r\n\r\n const campaignSettingsProp = useMemo(() => (campaignSettings && campaignSettings.Id ? campaignSettings : undefined), [campaignSettings]);\r\n\r\n const shoppingSettingOptions = useMemo(() => getShoppingSettingOptions({\r\n isSearch,\r\n settingScenarioName: SettingScenarios.PAAIMProductSetting,\r\n i18n,\r\n productData,\r\n feedData,\r\n campaignSettings: campaignSettingsProp,\r\n activity,\r\n ccJsData,\r\n setProductLoading,\r\n updateProductConditionOptions,\r\n updateChildLevelProductCondition,\r\n }), [productData, campaignSettingsProp, activity, isSearch, ccJsData, feedData, i18n,\r\n setProductLoading, updateProductConditionOptions, updateChildLevelProductCondition]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nProductFilterWithCustomValidation.propTypes = {\r\n updateValidation: PropTypes.func.isRequired,\r\n productFilterRef: PropTypes.shape({}).isRequired,\r\n productData: PropTypes.shape({}).isRequired,\r\n campaignSettings: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n isSearch: PropTypes.bool.isRequired,\r\n feedData: PropTypes.shape({}).isRequired,\r\n setProductLoading: PropTypes.func.isRequired,\r\n updateProductConditionOptions: PropTypes.func.isRequired,\r\n updateChildLevelProductCondition: PropTypes.func.isRequired,\r\n};\r\n\r\nProductFilterWithCustomValidation.defaultProps = {\r\n campaignSettings: undefined,\r\n};\r\n\r\nexport const ValidatedProductFilterSetting = withControlErrorHandling(withUnvalidatedControlErrors(withCustomValidation(ProductFilterWithCustomValidation), { filter: campaignProductFilterSchemeProp }));\r\n\r\n","import _ from 'underscore';\r\nimport React, { useCallback, useContext, useMemo, useState, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { LegacyShoppingSettings } from '@bingads-webui-campaign-react/legacy-shopping-settings';\r\nimport { withUnvalidatedControlErrors, withControlErrorHandling } from '@bingads-webui-campaign-react/error-handling';\r\nimport { useJsDataContext } from '@bingads-webui-cc-react/js-data-rest';\r\nimport { SettingScenarios } from '@bingads-webui-campaign-legacy/shopping-campaign/view/campaign-creation/utils';\r\n\r\nimport { getShoppingSettingOptions } from './setting-configs';\r\n\r\nconst StoreSettingWithCustomValidation = ({\r\n updateValidation, storeSettingRef, productData, campaignSettings, isSearch, feedData, isCPSSelected,\r\n onStoreSelectionChange, onSalesCountryChange, onFeedLabelChange, onSelectFilterProducts,\r\n}) => {\r\n const activity = useContext(ActivityContext);\r\n const i18n = useContext(I18nContext);\r\n const ccJsData = useJsDataContext();\r\n\r\n const onChange = useCallback((newData, isValid) => {\r\n // We are not using the updated data here as we will using the backbone view ref to get the final data\r\n updateValidation(isValid ? [] : [i18n.getString(_TL_('Legacy store settings has error'))]);\r\n if (activity && !isValid) {\r\n // signal activity to parent\r\n activity.signal(`onLegacyProductFilterChange - ${JSON.stringify(newData)} - isValid: ${isValid}}`);\r\n }\r\n }, [updateValidation, activity, i18n]);\r\n\r\n const [storeSettings, setStoreSettings] = useState(undefined);\r\n\r\n useEffect(() => {\r\n if (campaignSettings && campaignSettings.Id && !storeSettings) {\r\n setStoreSettings(campaignSettings);\r\n }\r\n }, [campaignSettings, storeSettings]);\r\n\r\n const shoppingSettingOptions = useMemo(() => getShoppingSettingOptions({\r\n isSearch,\r\n settingScenarioName: SettingScenarios.PAAIMStoreSetting,\r\n i18n,\r\n // Due to we separate product filter from store setting. we should ensure storeSetting pass the validation by remove campaignCriterionsData while edit\r\n productData: _.omit(productData, 'CampaignCriterionsData'),\r\n feedData,\r\n campaignSettings: storeSettings,\r\n activity,\r\n ccJsData,\r\n onStoreSelectionChange,\r\n onSalesCountryChange,\r\n onFeedLabelChange,\r\n isCPSSelected,\r\n onSelectFilterProducts,\r\n }), [productData, storeSettings, activity, isSearch, ccJsData, feedData, i18n,\r\n onStoreSelectionChange, isCPSSelected, onSalesCountryChange, onFeedLabelChange, onSelectFilterProducts]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nStoreSettingWithCustomValidation.propTypes = {\r\n updateValidation: PropTypes.func.isRequired,\r\n storeSettingRef: PropTypes.shape({}).isRequired,\r\n productData: PropTypes.shape({}).isRequired,\r\n campaignSettings: PropTypes.shape({\r\n Id: PropTypes.number,\r\n }),\r\n isSearch: PropTypes.bool.isRequired,\r\n feedData: PropTypes.shape({}).isRequired,\r\n onStoreSelectionChange: PropTypes.func.isRequired,\r\n isCPSSelected: PropTypes.bool,\r\n onSalesCountryChange: PropTypes.func.isRequired,\r\n onFeedLabelChange: PropTypes.func.isRequired,\r\n onSelectFilterProducts: PropTypes.func.isRequired,\r\n};\r\n\r\nStoreSettingWithCustomValidation.defaultProps = {\r\n campaignSettings: undefined,\r\n isCPSSelected: false,\r\n};\r\n\r\nexport const ValidatedStoreSetting = withControlErrorHandling(withUnvalidatedControlErrors(withCustomValidation(StoreSettingWithCustomValidation)));\r\n\r\n","import React, { useCallback, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Link } from '@fluentui/react';\r\nimport { ReactTemplate } from '@bingads-webui-react/react-template';\r\nimport { getRouterDep } from '@bingads-webui-campaign-react/legacy-router-dep';\r\n\r\nexport const BMCRedirect = ({\r\n isEnabledForDynamicFeedCampaign,\r\n i18n,\r\n scope,\r\n activity,\r\n}) => {\r\n const toBMC = useCallback(() => {\r\n getRouterDep(scope).navigateToRoute('bing_merchant_center');\r\n }, [scope]);\r\n\r\n const toDynamicDataManagement = useCallback(() => {\r\n getRouterDep(scope).navigateToRoute('dynamicdata_management');\r\n }, [scope]);\r\n\r\n useEffect(() => {\r\n activity.signal('RenderBMCRedirect');\r\n }, []);\r\n\r\n return (\r\n
\r\n {text},\r\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\r\n b: text => (isEnabledForDynamicFeedCampaign ? <> or {text} : null),\r\n }}\r\n template={i18n.getString(_TL_('To create a shopping campaign, you need to create a Microsoft Merchant Center store and add your catalog. {{a}}Create a store{{/a}} {{b}}Upload a Dynamic Data Feed{{/b}}'))}\r\n />\r\n
\r\n );\r\n};\r\n\r\nBMCRedirect.propTypes = {\r\n isEnabledForDynamicFeedCampaign: PropTypes.bool.isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func.isRequired,\r\n }).isRequired,\r\n scope: PropTypes.string.isRequired,\r\n activity: PropTypes.shape({\r\n signal: PropTypes.func.isRequired,\r\n }).isRequired,\r\n};\r\n","import React, { useState, useCallback, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ChoiceGroup, Label, Stack } from '@fluentui/react';\r\nimport { HelpPopup } from '@bingads-webui-react/help-popup';\r\nimport { getPriorityOptions } from './index';\r\n\r\nexport const CampaignPriority = ({\r\n data, onDataChange, activity, i18n, ...restProps\r\n}) => {\r\n const { campaign } = data;\r\n const [priority, setPriority] = useState(campaign.Priority || 'Low');\r\n const onCampaignPriorityChange = useCallback((ev, option) => {\r\n activity.signal(`onCampaignPriorityChange: ${option.key}`);\r\n setPriority(option.key);\r\n }, [activity]);\r\n\r\n useEffect(() => {\r\n if (campaign.Priority !== priority) {\r\n onDataChange({\r\n data: {\r\n ...data,\r\n campaign: { ...data.campaign, Priority: priority },\r\n },\r\n });\r\n }\r\n }, [campaign.Priority, data, onDataChange, priority]);\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nCampaignPriority.propTypes = {\r\n data: PropTypes.shape({\r\n campaign: PropTypes.shape({\r\n Priority: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n activity: PropTypes.shape({\r\n signal: PropTypes.func,\r\n }).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n};\r\n","// import { getCollapsiblePanelStyles } from '../../shared/styles';\r\nimport _ from 'underscore';\r\nimport { merge } from '@bingads-webui/primitive-utilities';\r\nimport { creationCommonStyle } from '@bingads-webui-campaign-react/campaign-adgroup-settings-shared-styles';\r\n\r\nfunction resolveStyles({ theme }, ...styles) {\r\n const resolvedStyles = styles.map(s => (_.isFunction(s) ? s(theme) : s));\r\n\r\n if (_.some(resolvedStyles, _.isEmpty)) {\r\n throw new Error('Cannot pass in empty style!');\r\n }\r\n\r\n return resolvedStyles;\r\n}\r\n\r\nexport const getCampaignStyles = (components, theme) => ({\r\n divider: {\r\n padding: '5px 0px 0px 4px',\r\n width: '100%',\r\n borderTop: '2px solid #E0E0E0',\r\n marginTop: 30,\r\n marginBottom: 20,\r\n },\r\n budgetContainer: {\r\n '& .budget-title-container span': {\r\n fontWeight: 600,\r\n },\r\n },\r\n campaignShell: {\r\n display: 'flex',\r\n width: 966,\r\n '& .ms-ChoiceFieldGroup label': {\r\n padding: 0,\r\n fontWeight: 400,\r\n },\r\n ...merge(\r\n {},\r\n ...resolveStyles(\r\n { theme },\r\n creationCommonStyle\r\n )\r\n ),\r\n '& .local-inventory label': {\r\n display: 'flex',\r\n },\r\n '& .product-collections label': {\r\n display: 'flex',\r\n },\r\n '& .productsScope': {\r\n display: 'none',\r\n },\r\n '& .bid-strategy-details-container label': {\r\n display: 'inline-block',\r\n },\r\n '& .bid-and-budget #currencyLabelCostPerSale': {\r\n display: 'inline',\r\n },\r\n '& .allFeedProducts': {\r\n display: 'none',\r\n },\r\n },\r\n collapsiblePanel: {},\r\n estimationPart: {\r\n flexGrow: '1',\r\n position: 'sticky',\r\n marginTop: '58px',\r\n marginLeft: '30px',\r\n },\r\n urlOptionsContainer: {\r\n maxWidth: 435,\r\n },\r\n});\r\n","import React from 'react';\r\nimport { TextTitle as OriginalTextTitle } from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getPannelHeaderStyles } from './styles/collapsible-panel';\r\n\r\nconst PannelHeader = (props) => {\r\n const classes = useDefaultStyles(getPannelHeaderStyles);\r\n\r\n return (\r\n

{props.children}

\r\n );\r\n};\r\n\r\nexport const TextTitle = props => ;\r\n","import _ from 'underscore';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useContext, useState, useMemo, useCallback, useEffect } from 'react';\r\nimport classNames from 'classnames';\r\nimport { Stack } from '@fluentui/react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Loading } from '@bingads-webui-campaign-react/loading';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { FormErrorGroup, UnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { Collapse, useCollapseState, ValidatedPanel, collapseExpander } from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { RemainingCharsValidatedTextField } from '@bingads-webui-campaign-react/remaining-chars-hint';\r\nimport { campaignNameProp } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { ValidatedUrlOptionsParameter } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport { BaseExclusion, getExclusionsDetails } from '@bingads-webui-campaign/hotel-common-upsert';\r\nimport { getUrlOptionsDetails } from '@bingads-webui-campaign-react/url-options';\r\nimport {\r\n StepHeader,\r\n conversionGoalsIcon,\r\n budgetBidStrategyIcon,\r\n AudienceBudgetBidStrategy,\r\n SectionShimmer,\r\n} from '@bingads-webui-campaign-react/display-plus-campaigns';\r\nimport { ShoppingImg, UrlOptionsImg } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\nimport { ProductImg } from '@bingads-webui-campaign-react/sponsored-campaign-creation';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport { ValidatedConversionGoals } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { useWizardService, matchStepState, STEP_STATES, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport biddingStrategyTypes from '@bingads-webui-campaign-legacy/bidding-strategy/bidding-strategy-type';\r\nimport { getConversionGoalTitleDetails, getStoreTitleDetails, getBidBudgetTitleDetails } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { getStores, getCountries } from '@bingads-webui-campaign-react/store-select';\r\nimport { getMessageType } from '@bingads-webui-campaign-react/campaign-settings-utils';\r\n\r\nimport { ValidatedProductFilterSetting, ValidatedStoreSetting, BMCRedirect, CampaignPriority } from './component';\r\nimport { getCampaignStyles } from './styles';\r\nimport { isSearchShoppingCampaign, getProductTileDetails, getNoValidStore } from '../step-utils';\r\nimport { CREATE_SCENARIO } from '../../constants';\r\nimport { TextTitle } from '../../shared/pannel-header';\r\n\r\n// todo: refer to private\\ui-next\\packages\\display-plus-campaigns\\src\\steps\\campaign\\campaign-step-shell.js\r\nconst getPanelErrorProps = ({ needsAttention }) => (needsAttention ? {\r\n error: _TL_(\"* Something's wrong\"),\r\n} : {});\r\n\r\nconst getPanelOptions = () => ({\r\n basicOptions: [\r\n 'campaign-name',\r\n 'store-settings',\r\n 'product-filter',\r\n 'conversions',\r\n 'bid-and-budget',\r\n 'campaign-url-options',\r\n 'base-exclusion',\r\n ],\r\n});\r\n\r\nexport const CampaignSettingsStep = (props) => {\r\n const {\r\n data,\r\n onDataChange,\r\n error,\r\n } = props;\r\n\r\n const {\r\n campaign,\r\n productData,\r\n feedData,\r\n productFilterRef,\r\n storeSettingRef,\r\n setSiteExclusionView,\r\n setIPExclusionView,\r\n siteExclusionViewRef,\r\n ipExclusionViewRef,\r\n productConditionsRef,\r\n } = data || {};\r\n\r\n const classes = useDefaultStyles(getCampaignStyles);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const isEnabledForDynamicFeedCampaign = _.get(serverContext, ['Permissions', 'IsEnabledForDynamicFeedCampaign'], false);\r\n const isConversionAssociationWarningP3Enabled = _.get(serverContext, ['DynamicPermissions', 'ConversionAssociationWarningP3'], false);\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { cid, aid } = scope.values;\r\n\r\n const i18n = useContext(I18nContext);\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n const globalLegacyI18n = useMemo(() => window.globalLegacyI18n.get('$/i18n!legacy/global'), []);\r\n const campaignBiddingSchemeType = _.get(campaign, ['BiddingScheme', 'Type'], '');\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state, send } = useWizardService();\r\n const { wizardData } = state.context || {};\r\n const { flow, createScenario, campaignStepIsValid } = wizardData || {};\r\n const isEditMode = createScenario === CREATE_SCENARIO.UPDATE_CAMPAIGN;\r\n const currentStates = state.toStrings()[1];\r\n const isSearch = useMemo(() => isSearchShoppingCampaign(flow), [flow]);\r\n\r\n const [isCPSSelected, setIsCPSSelected] = useState(false);\r\n const { basicOptions } = getPanelOptions();\r\n const [basicOptionsShown, setBasicOptionsShown] = useState(basicOptions);\r\n const [productLoading, setProductLoading] = useState(false);\r\n\r\n const noStore = useMemo(() => getNoValidStore(productData, feedData), [productData, feedData]);\r\n\r\n // add campaign here to ensure data loaded before showing redirect to BMC\r\n const showRedirectToBMC = useMemo(() => campaign && noStore && !isEditMode, [noStore, campaign, isEditMode]);\r\n\r\n const [\r\n allCampaignSettingsSections,\r\n campaignSettingsExpandedSections,\r\n setCampaignSettingsExpandedSections,\r\n ] = useCollapseState(\r\n basicOptionsShown /* all sections */,\r\n ['campaign-name', 'conversions', 'bid-and-budget', 'store-settings',\r\n 'product-filter', 'conversions', 'campaign-url-options',\r\n 'base-exclusion'] /* initially expanded sections */\r\n );\r\n\r\n const basicSettingsExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setCampaignSettingsExpandedSections }),\r\n [setCampaignSettingsExpandedSections]\r\n );\r\n\r\n const { state: { context: { saveFailed: showAllValidationErrors } } } = useFormService();\r\n\r\n const onValidate = (result) => {\r\n if (data && data.campaign) {\r\n const resultBiddingScheme = _.get(result, ['data', 'BiddingScheme'], {});\r\n const campaignBiddingScheme = _.get(campaign, ['BiddingScheme'], {});\r\n let biddingScheme = resultBiddingScheme;\r\n\r\n if (resultBiddingScheme && !resultBiddingScheme.Type && !_.isUndefined(campaignBiddingSchemeType)) {\r\n biddingScheme = campaignBiddingScheme;\r\n }\r\n\r\n const patchData = {\r\n ...data,\r\n campaign: {\r\n ...data.campaign,\r\n ...result.data,\r\n BiddingScheme: {\r\n ...biddingScheme,\r\n },\r\n },\r\n };\r\n\r\n setBasicOptionsShown([...basicOptions]);\r\n onDataChange({\r\n data: {\r\n ...patchData,\r\n adGroup: {\r\n ...data.adGroup,\r\n },\r\n },\r\n isValid: result.isValid,\r\n });\r\n\r\n if (isConversionAssociationWarningP3Enabled && isEditMode) {\r\n const message = getMessageType(data, patchData);\r\n if (message) {\r\n const updatedData = {\r\n wizardData: {\r\n ...wizardData,\r\n customConfirmMessages: [message],\r\n },\r\n };\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, updatedData.wizardData);\r\n }\r\n }\r\n }\r\n };\r\n\r\n const onStoreSelectionChange = useCallback((store) => {\r\n if (productFilterRef.current) {\r\n productFilterRef.current.onSelectionChange(store);\r\n } else {\r\n console.log('productFilterRef.current is not available');\r\n }\r\n }, [productFilterRef]);\r\n\r\n const onFeedLabelChange = useCallback((feedLabel) => {\r\n productFilterRef.current.triggerFeedLabelChange(feedLabel);\r\n productFilterRef.current.removeProductGroup();\r\n }, [productFilterRef]);\r\n\r\n const onSalesCountryChange = useCallback((country) => {\r\n productFilterRef.current.triggerSalesCountryChange(country);\r\n }, [productFilterRef]);\r\n\r\n const onSelectFilterProducts = useCallback((isSelected) => {\r\n if (!isSelected) {\r\n productFilterRef.current.triggerFeedLabelChange(null);\r\n productFilterRef.current.triggerIsFeedFilterChecked(false);\r\n }\r\n }, [productFilterRef]);\r\n\r\n const updateProductConditionOptions = useCallback((options) => {\r\n productConditionsRef.current = options;\r\n }, [productConditionsRef]);\r\n\r\n const updateChildLevelProductCondition = useCallback((option) => {\r\n if (option) {\r\n const updatedProductCondition = _.reject(productConditionsRef.current, item => item.Value === option.Value);\r\n productConditionsRef.current = [...updatedProductCondition, option];\r\n }\r\n }, [productConditionsRef]);\r\n\r\n useEffect(() => {\r\n // since we don't call getProductScope to get the correct country product data if customer selected All products and selected country.\r\n // so we should trigger manually to let it send call when change from All products to filter product.\r\n if (!isEditMode && campaign && !campaign.CampaignProductScope && campaign.SalesCountry && productFilterRef && productFilterRef.current) {\r\n const hasFilteredProducts = productFilterRef.current.hasFilteredProducts();\r\n if (!hasFilteredProducts) {\r\n productFilterRef.current.triggerSalesCountryChange(campaign.SalesCountry);\r\n }\r\n }\r\n }, [campaign, productFilterRef, isEditMode]);\r\n\r\n const campaignNameTitleDetails = useMemo(() => {\r\n let campaignDetail = '';\r\n if (campaign) {\r\n campaignDetail = i18n.getString(_TL_('Name: {{Name}}'), { Name: campaign.Name });\r\n if (isSearch) {\r\n campaignDetail += i18n.getString(_TL_('. Priority: {{Priority}}'), { Priority: campaign.Priority });\r\n }\r\n }\r\n return campaignDetail;\r\n }, [campaign, i18n, isSearch]);\r\n\r\n const campaignUrlOptions = useMemo(() => {\r\n if (campaign) {\r\n return {\r\n TrackingUrlTemplate: campaign.TrackingUrlTemplate,\r\n FinalUrlSuffix: campaign.FinalUrlSuffix,\r\n UrlCustomParameters: campaign.UrlCustomParameters,\r\n };\r\n }\r\n\r\n return {\r\n TrackingUrlTemplate: '',\r\n FinalUrlSuffix: '',\r\n UrlCustomParameters: [],\r\n };\r\n }, [campaign]);\r\n\r\n const conversionGoalsTitleDetails = useMemo(() => getConversionGoalTitleDetails(i18n, campaign && campaign.conversionGoals), [campaign, i18n]);\r\n\r\n const storeTitleDetails = useMemo(() => {\r\n if (!campaignSettingsExpandedSections.includes('store-settings') && storeSettingRef && campaign) {\r\n const storeView = storeSettingRef.current;\r\n const storesData = {\r\n stores: getStores({ productData }),\r\n countries: getCountries({\r\n productData,\r\n legacyI18n: globalLegacyI18n,\r\n IsDomesticSimplifiedChineseEnabled: _.get(serverContext, ['Permissions', 'IsDomesticSimplifiedChineseEnabled'], false),\r\n }),\r\n errors: undefined,\r\n };\r\n return getStoreTitleDetails(i18n, storesData, storeView.viewModel.toObject(), !isSearch);\r\n }\r\n return '';\r\n }, [i18n, campaign, globalLegacyI18n, productData, serverContext, storeSettingRef, campaignSettingsExpandedSections, isSearch]);\r\n\r\n const productFilterTitleDetails = useMemo(() => {\r\n if (!campaignSettingsExpandedSections.includes('product-filter') && productFilterRef && campaign) {\r\n const productScope = productFilterRef.current.getProductScope();\r\n const hasFilteredProducts = productFilterRef.current.hasFilteredProducts();\r\n if (!hasFilteredProducts) {\r\n return i18n.getString(_TL_('All products'));\r\n }\r\n return getProductTileDetails(productScope);\r\n }\r\n return '';\r\n }, [campaign, productFilterRef, campaignSettingsExpandedSections, i18n]);\r\n\r\n const exclusionTitleDetails = useMemo(() => {\r\n if (isEditMode && !campaignSettingsExpandedSections.includes('base-exclusion')) {\r\n const exclusions = {};\r\n if (siteExclusionViewRef && siteExclusionViewRef.current) {\r\n exclusions.ExcludedSites = siteExclusionViewRef.current.getValues();\r\n }\r\n if (ipExclusionViewRef && ipExclusionViewRef.current) {\r\n exclusions.ExcludedIPs = ipExclusionViewRef.current.getValues();\r\n }\r\n return getExclusionsDetails(i18n, exclusions);\r\n }\r\n return '';\r\n }, [i18n, siteExclusionViewRef, ipExclusionViewRef, isEditMode, campaignSettingsExpandedSections]);\r\n\r\n const urlTitleDetails = useMemo(() => (isEditMode && campaign ? getUrlOptionsDetails(i18n, campaign) : ''), [isEditMode, campaign, i18n]);\r\n\r\n const budgetBidStrategyTitleDetails = useMemo(() => (\r\n isEditMode && campaign ? getBidBudgetTitleDetails(serverContext, i18n, campaign.BiddingScheme, campaign.Budget) : ''\r\n ), [campaign, i18n, serverContext, isEditMode]);\r\n\r\n const onCampaignNameChange = useCallback((ev) => {\r\n activity.signal(`onCampaignNameChange: ${_.get(ev, ['target', 'value'])}}`);\r\n }, [activity]);\r\n\r\n useEffect(() => {\r\n const prefixTitle = isEditMode ? 'onCampaignSettingPage' : 'onCampaignStep';\r\n if (activity && matchStepState(state, STEP_STATES.LOADING)) {\r\n activity.signal(`${prefixTitle}Loading - ${currentStates}`);\r\n }\r\n\r\n if (activity && matchStepState(state, STEP_STATES.SAVING)) {\r\n activity.signal(`${prefixTitle}Saving - ${currentStates}`);\r\n }\r\n }, [activity, currentStates, state, isEditMode]);\r\n\r\n useEffect(() => {\r\n if (campaign && campaign.BiddingScheme) {\r\n setIsCPSSelected(campaign.BiddingScheme.Type === biddingStrategyTypes.costPerSale);\r\n }\r\n }, [campaign]);\r\n\r\n useEffect(() => {\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { showRedirectToBMC });\r\n }, [showRedirectToBMC, send]);\r\n\r\n useEffect(() => {\r\n const isSaving = matchStepState(state, STEP_STATES.SAVING);\r\n if (isSaving && campaignStepIsValid === false && campaignSettingsExpandedSections.length === basicOptions.length) {\r\n setCampaignSettingsExpandedSections([...basicOptions]);\r\n }\r\n }, [campaignStepIsValid, setCampaignSettingsExpandedSections, basicOptions, send, state, campaignSettingsExpandedSections]);\r\n\r\n return (\r\n
\r\n { showRedirectToBMC ? :\r\n \r\n \r\n \r\n \r\n
\r\n {!isEditMode &&\r\n
\r\n \r\n \r\n \r\n
}\r\n
\r\n \r\n
\r\n \r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n {isSearch && campaign && !isCPSSelected &&\r\n \r\n }\r\n \r\n {\r\n isEditMode &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n {\r\n campaign ? (\r\n \r\n ) : ()\r\n }\r\n \r\n }\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'store-settings',\r\n }}\r\n >\r\n {campaign && storeSettingRef && }\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'product-filter',\r\n }}\r\n >\r\n {campaign && productFilterRef &&\r\n }\r\n \r\n \r\n {\r\n isEditMode &&\r\n }>\r\n {campaign &&\r\n }\r\n \r\n }\r\n {\r\n isEditMode &&\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'campaign-url-options',\r\n }}\r\n >\r\n
\r\n \r\n {i18n.getString(_TL_('Set up the tracking and redirect information for your ads.'))}\r\n \r\n {campaign &&\r\n }\r\n
\r\n \r\n }\r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: basicSettingsExpand,\r\n expandKey: 'conversions',\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};\r\n\r\nCampaignSettingsStep.propTypes = {\r\n data: PropTypes.shape({\r\n adGroup: PropTypes.shape({}),\r\n campaign: PropTypes.shape({}),\r\n productData: PropTypes.shape({}),\r\n productFilterRef: PropTypes.shape({}),\r\n feedData: PropTypes.shape({}),\r\n storeSettingRef: PropTypes.shape({}),\r\n }).isRequired,\r\n onDataChange: PropTypes.func.isRequired,\r\n error: PropTypes.arrayOf(PropTypes.string),\r\n};\r\n\r\nCampaignSettingsStep.defaultProps = {\r\n error: undefined,\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport Promise from 'bluebird';\r\nimport { useRef, useContext, useState, useEffect, useCallback, useMemo } from 'react';\r\nimport { Scopes } from '@bingads-webui-campaign-react/goal-selector';\r\nimport { generateNameSuggestionSuffix } from '@bingads-webui-campaign/audience-campaign-shared';\r\nimport { mergeData } from '@bingads-webui-campaign-react/product-services';\r\nimport { getFeedData } from '@bingads-webui-campaign/audience-campaign-creation-wizard';\r\nimport { withDFMCache } from '@bingads-webui/dfm-cache';\r\nimport { useWizardService, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { ActivityContext, ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { getErrorsPlaceholders, DeviceKeys } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { getBudgetRange } from '@bingads-webui-campaign-legacy/common-grid-config/budget/get-budget-range';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport jsdata from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport exclusionRepository from '@bingads-webui-campaign-legacy/advanced-settings/util/exclusion-repository';\r\nimport biddingStrategyTypes from '@bingads-webui-campaign-legacy/bidding-strategy/bidding-strategy-type';\r\nimport { CampaignSubTypes } from '@bingads-webui-campaign-react/constants';\r\nimport { AlertHelper } from '@bingads-webui-campaign/alert-helper';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { showBudgetBidCampaignNotifications } from '@bingads-webui-campaign/import-shared-utils';\r\n\r\nimport { isSearchShoppingCampaign, getCampaignType, allSettledPromiseWrapper, getNoValidStore } from '../step-utils';\r\nimport { saveCampaign, loadCampaign, modelToViewModelForCampaign } from '../../model';\r\nimport { CREATE_SCENARIO } from '../../constants';\r\nimport { useWizardLog, LOG_STATUS, getProductData } from '../../shared';\r\n\r\nconst getDynamicFeedData = withDFMCache(getFeedData, 'getFeedScopeDFM', {});\r\nconst AudienceCampaignNamePrefix = _TL_('Shopping_Audience');\r\nconst SearchCampaignNamePrefix = _TL_('Shopping_Search');\r\n\r\nexport const getDefaultCampaign = ({\r\n isSearch,\r\n currencyCode,\r\n i18n,\r\n}) => ({\r\n Name: generateNameSuggestionSuffix(i18n.getString(isSearch ? SearchCampaignNamePrefix : AudienceCampaignNamePrefix)),\r\n Status: 'Paused',\r\n Budget: {\r\n Amount: getBudgetRange(currencyCode).Daily.Default,\r\n Type: 'DailyStandard',\r\n },\r\n BiddingScheme: {\r\n Type: 'EnhancedCpc',\r\n },\r\n Languages: ['All'],\r\n conversionGoals: {\r\n originalConversionGoals: [],\r\n goalSelection: [],\r\n goalScopeSelection: Scopes.ACCOUNT,\r\n },\r\n BudgetId: null,\r\n ProviderId: undefined,\r\n SalesCountry: null,\r\n FeedLabel: undefined,\r\n LocalInventoryAdsEnabled: false,\r\n finalUrlExpansionOptOut: false,\r\n ShoppableAdsEnabled: false,\r\n Priority: 'Low',\r\n ...isSearch ? {\r\n devices: [{\r\n device: DeviceKeys.Computers,\r\n bidAdjustment: 0,\r\n }, {\r\n device: DeviceKeys.Tablets,\r\n bidAdjustment: 0,\r\n }, {\r\n device: DeviceKeys.Smartphones,\r\n bidAdjustment: 0,\r\n }],\r\n } : {},\r\n ...getCampaignType(isSearch),\r\n});\r\n\r\nexport const useCampaignRepository = () => {\r\n const productFilterRef = useRef();\r\n const storeSettingRef = useRef();\r\n const i18n = useContext(I18nContext);\r\n const [siteExclusionView, setSiteExclusionView] = useState(null);\r\n const [ipExclusionView, setIPExclusionView] = useState(null);\r\n const { state, send } = useWizardService();\r\n const { flow, createScenario } = state.context.wizardData;\r\n const isCampaignCreate = createScenario === CREATE_SCENARIO.CREATE_CAMPAIGN;\r\n const scenarioContext = useContext(ScenarioContext);\r\n const activity = useContext(ActivityContext);\r\n const serverContext = useContext(ServerContext);\r\n const instrumentation = useContext(InstrumentationContext);\r\n const isShoppableAdsEnabled = _.get(serverContext, ['DynamicPermissions', 'ShoppableAds'], false);\r\n const isOdataGetProductScopeEnabled = _.get(serverContext, ['DynamicPermissions', 'OdataGetProductScope'], false);\r\n const currencyCode = _.get(serverContext, ['CurrentAccount', 'CurrencyCode'], 'USD');\r\n const isSearch = isSearchShoppingCampaign(flow);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { onStepLoadedLog, onStepSavedLog } = useWizardLog({ activity, wizardState: state, isSearch });\r\n const { cid, aid } = scope.values;\r\n const [savedCampaignId, setSavedCampaignId] = useState(null);\r\n const AlertCenter = useMemo(() => new AlertHelper({ i18n }), [i18n]);\r\n const logProductApi = (spendTime, scenario) => activity.signal(`productApiSpend-${isCampaignCreate ? 'create' : 'setting'}-${isSearch ? 'search' : 'audience'}-${scenario}: ${spendTime}`);\r\n\r\n const ipExclusionViewRef = useRef();\r\n const siteExclusionViewRef = useRef();\r\n const productConditionsRef = useRef();\r\n\r\n const internalGetProductData = useCallback(params => getProductData(params, serverContext), [serverContext]);\r\n const getAudienceProductDataWithCache = withDFMCache(internalGetProductData, 'getAudienceProductScopeDFM', {});\r\n const getProductDataWithCache = withDFMCache(internalGetProductData, 'getProductScopeDFM', {});\r\n\r\n const getCampaignFromViewModel = useCallback(({ campaignModel, productData, feedData }) => modelToViewModelForCampaign({\r\n campaignModel,\r\n locationCriterionsModel: [],\r\n dayTimeCriterionsModel: [],\r\n targetCriterionsModel: [],\r\n bundleCountries: [],\r\n productData,\r\n feedData,\r\n permissions: serverContext.Permissions,\r\n }).data, [serverContext.Permissions]);\r\n\r\n useEffect(() => {\r\n if (ipExclusionView) {\r\n ipExclusionViewRef.current = ipExclusionView;\r\n }\r\n if (siteExclusionView) {\r\n siteExclusionViewRef.current = siteExclusionView;\r\n }\r\n }, [siteExclusionView, ipExclusionView]);\r\n\r\n const load = () => {\r\n onStepLoadedLog({ status: LOG_STATUS.LOAD_START });\r\n const {\r\n campaign: savedCampaign,\r\n productData: savedProductData,\r\n feedData: savedFeedData,\r\n } = state.context.wizardData;\r\n\r\n const campaignId = savedCampaign ? savedCampaign.Id : undefined;\r\n\r\n const productParams = campaignId ? { campaignId } : {};\r\n // in setting page.\r\n if (!isCampaignCreate) {\r\n const savedSalesCountry = _.get(savedCampaign, ['CampaignSettings', 0, 'SalesCountry']);\r\n const savedFeedLabel = _.get(savedCampaign, ['CampaignSettings', 0, 'FeedLabel']);\r\n\r\n if (savedSalesCountry) {\r\n productParams.salesCountry = savedSalesCountry;\r\n }\r\n if (savedFeedLabel) {\r\n productParams.feedLabel = savedFeedLabel;\r\n }\r\n if (!isSearch) {\r\n productParams.getCategoryFullData = true;\r\n productParams.getProductTypeFullData = true;\r\n productParams.salesCountry = 'US'; // For audience shopping. We only support US for now.\r\n }\r\n } else {\r\n productParams.getProductConditionOptions = true;\r\n productParams.getSalesCountryCollection = true;\r\n productParams.getDynamicDataFeedOptions = true;\r\n\r\n if (!isSearch) {\r\n productParams.getCategoryFullData = true;\r\n productParams.getProductTypeFullData = true;\r\n productParams.salesCountry = 'US'; // For audience shopping. We only support US for now.\r\n }\r\n }\r\n\r\n const loadPromises = {};\r\n if (campaignId) {\r\n if (isCampaignCreate) {\r\n loadPromises.campaign = Promise.resolve(savedCampaign);\r\n } else {\r\n loadPromises.campaign = loadCampaign(cid, aid, campaignId);\r\n }\r\n } else {\r\n loadPromises.campaign = getDefaultCampaign({ isSearch, currencyCode, i18n });\r\n }\r\n if (!isSearch) {\r\n loadPromises.feedData = savedFeedData ? Promise.resolve(savedFeedData) : getDynamicFeedData();\r\n }\r\n let productCall = null;\r\n if (!savedProductData) {\r\n const req = isSearch ? getProductDataWithCache(productParams) : getAudienceProductDataWithCache(productParams);\r\n productCall = () => {\r\n const nTime = Date.now();\r\n return req.then((pData) => {\r\n logProductApi(Date.now() - nTime, 'load');\r\n\r\n if (isOdataGetProductScopeEnabled) {\r\n const mergedData = mergeData(pData);\r\n\r\n return mergedData;\r\n }\r\n\r\n return pData;\r\n });\r\n };\r\n } else {\r\n productConditionsRef.current = savedProductData.ProductConditionOptions;\r\n productCall = () => Promise.resolve(savedProductData);\r\n }\r\n\r\n return Promise.props({\r\n ...loadPromises,\r\n productData: productCall(),\r\n }).then(({\r\n campaign,\r\n productData,\r\n feedData,\r\n }) => {\r\n onStepLoadedLog({ status: LOG_STATUS.LOAD_SUCCESS, msg: getNoValidStore(productData, feedData) ? 'NoStore' : 'HasStore' });\r\n const productDataSource = productData;\r\n productDataSource.ProductCollectionAccounts = _.filter(productData.ProductCollectionAccounts, store => !store.IsCoOpStore);\r\n productConditionsRef.current = productData.ProductConditionOptions;\r\n return {\r\n campaign: isCampaignCreate ? campaign : getCampaignFromViewModel({\r\n campaignModel: campaign,\r\n productData,\r\n feedData,\r\n }),\r\n productData: productDataSource,\r\n productConditionsRef, // when salesCountry change, we should save the productConditions and update the productData\r\n feedData: feedData || {},\r\n productFilterRef,\r\n storeSettingRef,\r\n ipExclusionViewRef,\r\n siteExclusionViewRef,\r\n setSiteExclusionView,\r\n setIPExclusionView,\r\n };\r\n });\r\n };\r\n\r\n const save = ({ data }) => {\r\n const {\r\n campaign,\r\n productData,\r\n productConditionsRef: savedProductConditions,\r\n } = data;\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_START });\r\n let model = _.extend({}, campaign);\r\n const isEditMode = campaign.Id || savedCampaignId;\r\n\r\n if (savedCampaignId) {\r\n model.Id = savedCampaignId;\r\n }\r\n\r\n // In campaign settings page, support swtich between CPS and Non-CPS.\r\n if (isEditMode) {\r\n const isCostPerSaleEnabled = _.get(serverContext, ['Permissions', 'IsCostPerSaleEnabled'], false);\r\n\r\n if (campaign.BiddingScheme && campaign.BiddingScheme.Type === biddingStrategyTypes.costPerSale) {\r\n model.PersonalizedOffersEnabled = true;\r\n model.CashbackPercent = 10;\r\n model.CashbackScope = 'Product';\r\n model.Priority = 'High';\r\n } else if (isCostPerSaleEnabled && model.CampaignSubType !== CampaignSubTypes.AudienceDynamicFeedBased) {\r\n // PersonalizedOffersEnabled should be set to true/false only when CPS pilot is enabled, otherwise it will cause PersonalizedOffersAccountNotInPilot error.\r\n model.PersonalizedOffersEnabled = false;\r\n model.CashbackPercent = 'delete_value';\r\n model.CashbackScope = 'delete_value';\r\n } else {\r\n // This is for AudienceDynamicFeedBased campaign or when CPS pilot is not enabled.\r\n delete model.PersonalizedOffersEnabled;\r\n delete model.CashbackPercent;\r\n delete model.CashbackScope;\r\n }\r\n }\r\n\r\n const storeSettingView = storeSettingRef.current;\r\n const productFilterView = productFilterRef.current;\r\n\r\n const isStoreValid = storeSettingView.validate();\r\n const isProductFilterValid = productFilterView.validate();\r\n\r\n if (!isStoreValid || !isProductFilterValid) {\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { campaignStepIsValid: false });\r\n return Promise.reject();\r\n }\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { campaignStepIsValid: true });\r\n\r\n if (!isSearch && !campaign.Id) {\r\n if (storeSettingView.isSelectedStore() || storeSettingView.selectedCategory === null) {\r\n model.CampaignSubType = CampaignSubTypes.AudienceFeedBased;\r\n } else {\r\n model.CampaignSubType = CampaignSubTypes.AudienceDynamicFeedBased;\r\n model.FeedId = storeSettingView.viewModel.FeedId();\r\n }\r\n }\r\n\r\n const storeSettingModel = storeSettingView.viewModel.toObject();\r\n // we don't need get Priority from storeSettingModel, since we separate it as an independent field.\r\n _.extend(model, _.omit(storeSettingModel, 'Priority'));\r\n\r\n const productScope = productFilterView.getProductScope();\r\n const hasFilteredProducts = productFilterView.hasFilteredProducts();\r\n\r\n let SalesCountryValue = model.SalesCountry;\r\n if (storeSettingView.isFeedProductFilterEnabled) {\r\n if (!storeSettingView.viewModel.isFeedFilterChecked()) {\r\n // choose neither feed label nor sales country\r\n model = _.omit(model, 'SalesCountry');\r\n model = _.omit(model, 'FeedLabel');\r\n SalesCountryValue = null;\r\n } else if (model.FeedLabel && model.FeedLabel.length > 0) {\r\n model = _.omit(model, 'SalesCountry');\r\n SalesCountryValue = null;\r\n } else {\r\n model = _.omit(model, 'FeedLabel');\r\n }\r\n if (isEditMode && !model.SalesCountry) {\r\n model.SalesCountry = 'delete_value';\r\n }\r\n if (isEditMode && !model.FeedLabel) {\r\n model.FeedLabel = 'delete_value';\r\n }\r\n }\r\n if (!isShoppableAdsEnabled) {\r\n model = _.omit(model, 'ShoppableAdsEnabled');\r\n }\r\n if (!isSearch) {\r\n model = _.omit(model, 'Priority');\r\n }\r\n if (hasFilteredProducts) {\r\n model.CampaignProductScope = _.defaults(productScope, {\r\n CampaignName: campaign.Name,\r\n });\r\n\r\n if (productData.CampaignCriterionsData) {\r\n model.CampaignProductScope.Id = productData.CampaignCriterionsData.Id;\r\n }\r\n } else {\r\n model = _.omit(model, 'CampaignProductScope');\r\n }\r\n const destroyProductScopeIfNeed = () => {\r\n if (productData.CampaignCriterionsData && !hasFilteredProducts) {\r\n return jsdata.CampaignProductScope.destroy(productData.CampaignCriterionsData.Id, { adapter: 'bulk', parentId: campaign.Id });\r\n }\r\n return Promise.resolve();\r\n };\r\n\r\n if (isEditMode) {\r\n model = _.omit(model, 'devices');\r\n }\r\n\r\n const saveCampaignPromise = saveCampaign({\r\n campaign: { data: model },\r\n updateCampaignStatus: isCampaignCreate,\r\n // adGroup: isEditMode ? null : { data: getAdGroup(campaign) }, // will create ad group only for first time\r\n }, {\r\n scenario: scenarioContext.name,\r\n activityLogger: scenarioContext.createActivity('saveDefaultCampaign'),\r\n i18n,\r\n });\r\n const saveExtensionsInSettingFlow = () => {\r\n if (isCampaignCreate) {\r\n return Promise.resolve();\r\n }\r\n const extensionData = {\r\n campaignId: campaign.Id,\r\n AdvanceSettings: {\r\n Exclusions: {\r\n ExcludedSites: siteExclusionView.getValues(),\r\n ExcludedIPs: ipExclusionView.getValues(),\r\n },\r\n },\r\n };\r\n return exclusionRepository.saveExtensions(extensionData, 'campaign')\r\n .then(() => {\r\n siteExclusionView.clearApiErrors();\r\n })\r\n .catch((response) => {\r\n if (response.NegativeSitesResult || response.NegativeIPsResult) {\r\n const { NegativeSitesResult: siteErrors, NegativeIPsResult: ipErrors } = response;\r\n if (siteExclusionView && siteErrors) {\r\n siteExclusionView.showErrors(siteErrors);\r\n } else {\r\n siteExclusionView.clearApiErrors();\r\n }\r\n if (ipExclusionView && ipErrors) {\r\n ipExclusionView.showErrors(ipErrors);\r\n } else {\r\n ipExclusionView.clearApiErrors();\r\n }\r\n // eslint-disable-next-line no-throw-literal\r\n throw 'exclusion error';\r\n }\r\n });\r\n };\r\n return new Promise((resolve, reject) => {\r\n allSettledPromiseWrapper([saveCampaignPromise, destroyProductScopeIfNeed(), saveExtensionsInSettingFlow()]).then((results) => {\r\n const allSuccess = _.every(results, result => result.status === 'fulfilled');\r\n if (allSuccess) {\r\n if (isEditMode) {\r\n const { activity: BudgetBidCampaignImportNotificationActivity } = instrumentation.createScenarioAndActivity({\r\n scenarioName: 'BudgetBidCampaignImportNotification',\r\n activityName: 'ShoppingCampaignSettingPage',\r\n });\r\n\r\n const { campaign: initialCampaign } = state.context.stepContexts.CAMPAIGN_SETTINGS.initialData;\r\n\r\n showBudgetBidCampaignNotifications({\r\n campaignItemList: [initialCampaign],\r\n oldBudget: initialCampaign.Budget,\r\n newBudget: campaign.Budget,\r\n oldBidStrategy: initialCampaign.BiddingScheme,\r\n newBidStrategy: campaign.BiddingScheme,\r\n activity: BudgetBidCampaignImportNotificationActivity,\r\n });\r\n }\r\n if (!isCampaignCreate) {\r\n send(WIZARD_EVENTS.EXIT);\r\n return resolve();\r\n }\r\n const campaignData = {\r\n ...results[0].value.campaign.data,\r\n SalesCountry: SalesCountryValue,\r\n FeedLabel: model.FeedLabel === 'delete_value' ? '' : model.FeedLabel,\r\n };\r\n\r\n const wizardUpdateData = {\r\n campaign: campaignData,\r\n feedData: data.feedData,\r\n productData,\r\n };\r\n const stepProps = {\r\n ...data,\r\n campaign: campaignData,\r\n productData,\r\n ...getErrorsPlaceholders(),\r\n };\r\n // if no product filtered, we don't need to get CampaignCriterions data.\r\n if (!hasFilteredProducts) {\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_SUCCESS, msg: `Status: ${campaignData.Status}, Id: ${campaignData.Id}` });\r\n wizardUpdateData.productData = { ...productData, CampaignCriterionsData: null };\r\n stepProps.productData = { ...productData, CampaignCriterionsData: null };\r\n if (model.FeedId) {\r\n return loadCampaign(cid, aid, campaignData.Id).then((fullCampaign) => {\r\n const fullCampaignData = getCampaignFromViewModel({\r\n campaignModel: fullCampaign,\r\n productData,\r\n feedData: data.feedData,\r\n });\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { ...wizardUpdateData, campaign: fullCampaignData });\r\n resolve({ ...stepProps, campaign: fullCampaignData });\r\n });\r\n }\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, wizardUpdateData);\r\n return resolve(stepProps);\r\n }\r\n\r\n const nTime = Date.now();\r\n return internalGetProductData({ campaignId: campaignData.Id, getCampaignCriterionsOnly: true }).then((pData) => {\r\n logProductApi(Date.now() - nTime, 'save');\r\n\r\n const newProductData = _.isArray(pData) ? mergeData(pData) : pData;\r\n\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_SUCCESS, msg: `Status: ${campaignData.Status}, Id: ${campaignData.Id}` });\r\n if (campaignData.CampaignProductScope && newProductData.CampaignCriterionsData) {\r\n campaignData.CampaignProductScope.Id = newProductData.CampaignCriterionsData.Id;\r\n }\r\n const updatedProductData = {\r\n ...productData,\r\n CampaignCriterionsData: newProductData.CampaignCriterionsData,\r\n ProductConditionOptions: savedProductConditions.current || productData.ProductConditionOptions,\r\n };\r\n\r\n wizardUpdateData.productData = updatedProductData;\r\n wizardUpdateData.campaign = campaignData;\r\n\r\n stepProps.productData = updatedProductData;\r\n stepProps.campaign = campaignData;\r\n\r\n // if select dynamic feed and back to edit. We need to get the ProviderId from campaign setting. which not return from bulk upsert.\r\n if (model.FeedId) {\r\n return loadCampaign(cid, aid, campaignData.Id).then((fullCampaign) => {\r\n const fullCampaignData = getCampaignFromViewModel({\r\n campaignModel: fullCampaign,\r\n productData: updatedProductData,\r\n feedData: data.feedData,\r\n });\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { ...wizardUpdateData, campaign: fullCampaignData });\r\n resolve({ ...stepProps, campaign: fullCampaignData });\r\n });\r\n }\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, wizardUpdateData);\r\n return resolve(stepProps);\r\n }).catch((error) => {\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_FAIL, msg: error });\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, wizardUpdateData);\r\n AlertCenter.showAlert(_.get(error, ['Errors', 0, 'Message']));\r\n return reject();\r\n });\r\n }\r\n\r\n // bulkupsert might be failed in some column. if campaign column is success. we should save campaignId to avoid duplicate campaign creation error.\r\n const campaignId = _.get(results[0], ['reason', 'campaign', 'data', 'Id']);\r\n if (campaignId > 0) {\r\n setSavedCampaignId(campaignId);\r\n }\r\n // const adGroupId = _.get(results[0], ['reason', 'adGroup', 'data', 'Id']);\r\n // if (adGroupId > 0) {\r\n // send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n // adGroup: results[0].reason.adGroup.data,\r\n // });\r\n // }\r\n\r\n const errors = _.map(results, (result) => {\r\n if (result.status === 'fulfilled') {\r\n return null;\r\n }\r\n\r\n const { serverErrors = {} } = result.reason;\r\n\r\n return serverErrors;\r\n });\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_FAIL, msg: results });\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return reject({ error: _.flatten(errors.filter(val => val !== null)) });\r\n });\r\n });\r\n };\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport { getCollapsiblePanelStyles } from '../../shared';\r\nimport { isSearchShoppingCampaign } from '../step-utils';\r\n\r\nexport const getAdGroupStyles = (components, theme) => ({\r\n collapsiblePanel: getCollapsiblePanelStyles(components, theme),\r\n toggle: {\r\n marginBottom: '0px',\r\n alignSelf: 'center',\r\n },\r\n adgroupShell: {\r\n '& .base-options-stack': {\r\n // width: '100%',\r\n },\r\n '& .collapse-container': {\r\n width: 'inherit',\r\n },\r\n '& .contextual-target': {\r\n maxWidth: '1000px',\r\n },\r\n '& .ms-ChoiceFieldGroup label': {\r\n padding: 0,\r\n fontWeight: 400,\r\n },\r\n },\r\n urlOptionsContainer: {\r\n maxWidth: 435,\r\n },\r\n});\r\n\r\nexport const getTargetingPanels = (flow) => {\r\n if (!isSearchShoppingCampaign(flow)) {\r\n return {\r\n basicOptions: [\r\n 'location-target',\r\n 'gender-target',\r\n 'age-target',\r\n // 'predictive-targeting',\r\n ],\r\n advancedOptions: [\r\n 'audience-target',\r\n 'company-target',\r\n 'industry-target',\r\n 'job-target',\r\n // // PT cannot be disabled until algorithm team fix an issue\r\n // 'predictive-targeting-control',\r\n ],\r\n moreOptions: [\r\n 'start-end-dates',\r\n 'ad-schedule',\r\n ],\r\n };\r\n }\r\n\r\n return {\r\n basicOptions: [\r\n 'location-target',\r\n // 'gender-target',\r\n // 'age-target',\r\n ],\r\n advancedOptions: [\r\n 'device-target',\r\n // 'audience-target',\r\n // 'company-target',\r\n // 'industry-target',\r\n // 'job-target',\r\n ],\r\n moreOptions: [\r\n 'start-end-dates',\r\n 'ad-schedule',\r\n 'ad-distribution',\r\n ],\r\n };\r\n};\r\n\r\nexport const getAdGroupSettingsPanels = (flow, showBid) => {\r\n if (!isSearchShoppingCampaign(flow)) {\r\n return {\r\n basicOptions: _.compact([\r\n 'ad-group-name',\r\n showBid ? 'bid-value' : null,\r\n 'url-options',\r\n 'start-end-dates',\r\n 'ad-rotation',\r\n ]),\r\n };\r\n }\r\n\r\n return {\r\n basicOptions: _.compact([\r\n 'ad-group-name',\r\n showBid ? 'bid-value' : null,\r\n 'url-options',\r\n 'start-end-dates',\r\n 'ad-distribution',\r\n 'ad-rotation',\r\n ]),\r\n };\r\n};\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport { ValidatedTargetDevices } from '@bingads-webui-campaign-react/sponsored-campaign-creation';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\n\r\nexport const convertToGridTargetDetails = devices => ({\r\n useParentLevel: false,\r\n parentLevelSettings: [],\r\n currentLevelSettings: devices ? devices.map(({\r\n device, bidAdjustment, Id, isBidAdjustmentNegative,\r\n }) => ({\r\n targeted: _TL_('Targeted'),\r\n device,\r\n bidAdjustmentDropdown: isBidAdjustmentNegative ? _TL_('Decrease by') : _TL_('Increase by'),\r\n bidAdjustmentInput: Math.abs(bidAdjustment),\r\n Id,\r\n })) : [],\r\n});\r\n\r\nconst convertFromGridTargetDetails = device => ({\r\n devices: device && device.currentLevelSettings && Array.isArray(device.currentLevelSettings) ?\r\n device.currentLevelSettings.map(({\r\n device: deviceName, bidAdjustmentDropdown, bidAdjustmentInput, Id,\r\n }) => {\r\n const isBidAdjustmentNegative = bidAdjustmentDropdown === 'Decrease by';\r\n\r\n return {\r\n device: deviceName,\r\n bidAdjustment: parseFloat(bidAdjustmentInput),\r\n // Needs another boolean to indicate the dropdown selection.\r\n // If we use `bidAdjustment < 0`, users cannot change the dropdown when the bidAdjustment is 0\r\n isBidAdjustmentNegative,\r\n Id,\r\n };\r\n }) : [],\r\n});\r\n\r\nconst InternalDeviceTargets = ({\r\n validationProps, updateValidation, ...restProps\r\n}) => {\r\n const { data: deviceTargets } = validationProps;\r\n\r\n const onChange = useCallback((errors, newData) => {\r\n const { device } = newData || {};\r\n updateValidation(errors, convertFromGridTargetDetails(device));\r\n }, [updateValidation]);\r\n\r\n const mappedData = useMemo(() => convertToGridTargetDetails(deviceTargets), [deviceTargets]);\r\n\r\n return ();\r\n};\r\n\r\nexport const DeviceTargets = withCustomValidation(InternalDeviceTargets);\r\n\r\n","import React, { useContext, useState, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport {\r\n Collapse,\r\n useCollapseState,\r\n ValidatedBootstrapPanel,\r\n ValidatedPanel,\r\n ValidatedFixedPanel,\r\n TextTitle,\r\n} from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { Panel as BootstrapPanel } from 'react-bootstrap';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { CampaignSubTypes } from '@bingads-webui-campaign-react/constants';\r\nimport {\r\n ValidatedAudiencePicker,\r\n formatAudience,\r\n} from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { MessageBarType, MessageBar } from '@fluentui/react';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ValidatedCompanyPicker, formatCompany } from '@bingads-webui-campaign-react/display-plus-campaigns/src/steps/adgroup/components/company-target';\r\nimport { ValidatedIndustryPicker, formatIndustry } from '@bingads-webui-campaign-react/display-plus-campaigns/src/steps/adgroup/components/industry-target';\r\nimport { ValidatedJobFunctionPicker, formatJobFunction } from '@bingads-webui-campaign-react/display-plus-campaigns/src/steps/adgroup/components/job-function-target';\r\nimport { SectionShimmer, PredictiveTargetingControlHeader, ERROR_ENTITY } from '@bingads-webui-campaign-react/display-plus-campaigns';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { andComp, entityIs, propertyIs } from '@bingads-webui-campaign-react/form-error';\r\nimport { getGridTargetTitleDetails } from '@bingads-webui-campaign/hotel-common-upsert';\r\nimport { DeviceImg } from '@bingads-webui-campaign-react/sponsored-campaign-creation';\r\n\r\nimport { getAdGroupStyles, getTargetingPanels } from '../utils';\r\nimport { isSearchShoppingCampaign } from '../../step-utils';\r\nimport { DeviceTargets as ValidatedTargetDevices, convertToGridTargetDetails } from './device-target';\r\n\r\nconst getPanelErrorProps = ({ needsAttention }) => (needsAttention ? {\r\n error: _TL_(\"* Something's wrong\"),\r\n} : {});\r\n\r\nconst ServerValidatedTargetDevice = withControlErrorHandling(withUnvalidatedControlErrors(ValidatedTargetDevices, {\r\n filter: andComp(entityIs(ERROR_ENTITY.Campaign), propertyIs('device')),\r\n}));\r\n\r\nconst TargetingPreferencesInternal = ({\r\n data,\r\n flow,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const serverContext = useContext(ServerContext);\r\n const isAudienceCampaing = !isSearchShoppingCampaign(flow);\r\n\r\n const {\r\n campaign,\r\n adGroup,\r\n } = data || {};\r\n\r\n const [optimizedTargetingEnabled, setOptimizedTargetingEnabled] = useState(false);\r\n\r\n const { advancedOptions } = getTargetingPanels(flow, serverContext);\r\n\r\n const {\r\n devices: campaignDeviceTargets,\r\n audiences: campaignAudiences,\r\n industry: campaignIndustry,\r\n negativeIndustry: campaignNegativeIndustry,\r\n jobTargets: campaignJobTargets,\r\n negativeJobTargets: campaignNegativeJobTargets,\r\n companyNameTargets: campaignCompanyNameTargets,\r\n negativeCompanyNameTargets: campaignNegativeCompanyNameTargets,\r\n BiddingScheme: biddingScheme,\r\n } = campaign || {};\r\n const { Type: bidStrategyType } = biddingScheme || {};\r\n\r\n const {\r\n audiences: adGroupAudiences,\r\n industry: adGroupIndustry,\r\n negativeIndustry: adGroupNegativeIndustry,\r\n jobTargets: adGroupJobTargets,\r\n negativeJobTargets: adGroupNegativeJobTargets,\r\n companyNameTargets: adGroupCompanyNameTargets,\r\n negativeCompanyNameTargets: adGroupNegativeCompanyNameTargets,\r\n } = adGroup || {};\r\n\r\n const audiences = isAudienceCampaing ? adGroupAudiences : campaignAudiences;\r\n const industry = isAudienceCampaing ? adGroupIndustry : campaignIndustry;\r\n const negativeIndustry = isAudienceCampaing ? adGroupNegativeIndustry : campaignNegativeIndustry;\r\n const jobTargets = isAudienceCampaing ? adGroupJobTargets : campaignJobTargets;\r\n const negativeJobTargets = isAudienceCampaing ? adGroupNegativeJobTargets : campaignNegativeJobTargets;\r\n const companyNameTargets = isAudienceCampaing ? adGroupCompanyNameTargets : campaignCompanyNameTargets;\r\n const negativeCompanyNameTargets = isAudienceCampaing ? adGroupNegativeCompanyNameTargets : campaignNegativeCompanyNameTargets;\r\n\r\n const classes = useDefaultStyles(getAdGroupStyles);\r\n const [\r\n allAdGroupTargetingSections,\r\n adgroupTargetingExpandedSections,\r\n setAdGroupTargetingExpandedSections,\r\n ] = useCollapseState(\r\n advancedOptions /* all sections */,\r\n [] /* initially expanded sections */\r\n );\r\n\r\n const getCampaignSubType = useMemo(() => {\r\n if (isAudienceCampaing) {\r\n return CampaignSubTypes.AudienceFeedBased;\r\n }\r\n return null;\r\n }, [isAudienceCampaing]);\r\n\r\n const adGroupTargetingSections = () => (\r\n \r\n }\r\n >\r\n {\r\n audiences ? (\r\n \r\n ) : ()\r\n }\r\n \r\n }\r\n >\r\n {\r\n campaignDeviceTargets ? (\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 \r\n \r\n )\r\n : \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n {!optimizedTargetingEnabled ?\r\n i18n.getString(_TL_('Predictive targeting is automatically enabled. You can disable it by setting a targeting preference.'))\r\n : i18n.getString(_TL_('Turning off predictive targeting significantly limits our ability to help you reach the best audience for your campaign.'))\r\n }\r\n \r\n \r\n \r\n );\r\n\r\n return (\r\n <>\r\n (\r\n <>\r\n \r\n \r\n {i18n.getString(_TL_('Targeting preferences (optional)'))}\r\n \r\n \r\n \r\n \r\n
\r\n {adGroupTargetingSections()}\r\n
\r\n
\r\n
\r\n \r\n )}\r\n />\r\n \r\n );\r\n};\r\n\r\nTargetingPreferencesInternal.propTypes = {\r\n data: PropTypes.shape({\r\n locationTargets: PropTypes.shape({}),\r\n adGroup: PropTypes.shape({\r\n locationTargets: PropTypes.shape({}),\r\n deviceTypes: PropTypes.shape({}),\r\n }),\r\n }).isRequired,\r\n};\r\n\r\nexport const TargetingPreferences = TargetingPreferencesInternal;\r\n","import React, { useCallback, useContext, useMemo } from 'react';\r\nimport { Stack, ChoiceGroup, MessageBar, MessageBarType } from '@fluentui/react';\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\n\r\nconst getAdRotationStyles = (components, theme) => ({\r\n AdRotationMessageBar: {\r\n backgroundColor: theme.palette.themeLighterAlt,\r\n },\r\n});\r\n\r\nconst AdRotation = ({\r\n updateValidation,\r\n validationProps,\r\n}) => {\r\n const {\r\n data,\r\n } = validationProps || {};\r\n // Must have an initial value or the Fluent UI will take the choice group as uncontrolled\r\n const { AdRotation: adRotation = 'OptimizeForClicks' } = data || {};\r\n const i18n = useContext(I18nContext);\r\n const classes = useDefaultStyles(getAdRotationStyles);\r\n\r\n const adRotationOptions = useMemo(() => [{\r\n key: 'OptimizeForClicks',\r\n text: i18n.getString(_TL_('Optimize - prioritize ads that perform well')),\r\n }, {\r\n key: 'RotateAdsEvenly',\r\n text: i18n.getString(_TL_('Rotate ads more evenly - include all ads, even those with a lower CTR')),\r\n }], [i18n]);\r\n\r\n const onChange = useCallback((ev, option) => {\r\n updateValidation([], {\r\n AdRotation: option.key,\r\n });\r\n }, [updateValidation]);\r\n\r\n return (\r\n
{i18n.getString(_TL_('Which ads do you want to show?'))}
\r\n \r\n \r\n {i18n.getString(_TL_('This ad rotation setting will be ignored if you use an automated bidding bid strategy, as automated bidding prioritizes better-performing ads.'))}\r\n \r\n
);\r\n};\r\n\r\nexport const ValidatedAdRotation = withCustomValidation(AdRotation);\r\n","import React, { useContext, useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\nimport { Stack } from '@fluentui/react';\r\nimport { Alert } from '@bingads-webui-react/alert';\r\nimport { Panel as BootstrapPanel } from 'react-bootstrap';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { AdGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { SEARCH_TYPE } from '@bingads-webui-react/bing-maps';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { FormErrorGroup, UnmappedFormErrors, andComp, anyComp, entityIs, propertyIs } from '@bingads-webui-campaign-react/form-error';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { Collapse, TextTitle, ValidatedBootstrapPanel, ValidatedFixedPanel, ValidatedPanel, collapseExpander, useCollapseState, getPanelErrorProps } from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ValidatedLocationTargetSetting } from '@bingads-webui-campaign-react/step-wizard-controls';\r\nimport { getAdScheduleDetails, getLocationTargetTitleDetails } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { ValidatedLegacyDateSetting } from '@bingads-webui-campaign/date-setting';\r\nimport { ValidatedLegacyAdSchedule } from '@bingads-webui-campaign/ad-schedule';\r\nimport { AgeRange, Gender, formatAgeRanges, formatGenders } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { StepHeader, ERROR_ENTITY, adScheduleIcon, ageTargetIcon, genderTargetIcon, locationTargetIcon, startDateEndDateIcon, SectionShimmer, getTargetSettingsFromCriterions, PredictiveTargetingHeader } from '@bingads-webui-campaign-react/display-plus-campaigns';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\n\r\nimport {\r\n TargetingPreferences,\r\n} from './components';\r\nimport { getTargetingPanels, getAdGroupStyles } from './utils';\r\nimport { isSearchShoppingCampaign } from '../step-utils';\r\nimport { ValidatedLegacyAdDistribution } from './components/ad-distribution';\r\n\r\nconst campaignLocationCriterions = anyComp(\r\n entityIs(ERROR_ENTITY.CampaignLocation),\r\n entityIs(ERROR_ENTITY.CampaignRadius),\r\n entityIs(ERROR_ENTITY.CampaignNegativeLocation),\r\n entityIs(ERROR_ENTITY.CampaignLocationIntent)\r\n);\r\n\r\nconst ServerValidatedLocationTargetSetting = withControlErrorHandling(withUnvalidatedControlErrors(\r\n ValidatedLocationTargetSetting,\r\n { filter: campaignLocationCriterions }\r\n));\r\n\r\nconst ServerValidatedLocationTargetSettingForAdGroup = withControlErrorHandling(withUnvalidatedControlErrors(\r\n ValidatedLocationTargetSetting,\r\n {\r\n filter: anyComp(\r\n entityIs(ERROR_ENTITY.AdGroupLocation),\r\n entityIs(ERROR_ENTITY.AdGroupRadius),\r\n entityIs(ERROR_ENTITY.AdGroupNegativeLocation),\r\n entityIs(ERROR_ENTITY.AdGroupLocationIntent)\r\n ),\r\n }\r\n));\r\n\r\nconst ServerValidatedAdDistributionSetting = withControlErrorHandling(withUnvalidatedControlErrors(\r\n ValidatedLegacyAdDistribution,\r\n {\r\n filter: andComp(entityIs(ERROR_ENTITY.AdGroup), propertyIs('adDistribution')),\r\n }\r\n));\r\n\r\nconst adGroupLevelTargetListForAudienceFlow = [\r\n 'locationTargets', 'genderTypes', 'ageRanges', 'companyNameTargets', 'negativeCompanyNameTargets',\r\n 'industry', 'negativeIndustry', 'jobTargets', 'negativeJobTargets', 'audiences',\r\n];\r\nconst adGroupPropertyList = [\r\n 'UseOptimizedTargeting', 'StartDate', 'EndDate', 'AdDistribution',\r\n];\r\n\r\nconst TargetStepInternal = ({\r\n data,\r\n onDataChange,\r\n scope,\r\n error,\r\n flowType,\r\n permissions,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n const classes = useDefaultStyles(getAdGroupStyles);\r\n const { state: { context: { saveFailed: showAllValidationErrors } } } = useFormService();\r\n const isAudienceCampaign = !isSearchShoppingCampaign(flowType);\r\n const { AgeGenderDisclaimer: isAgeGenderDisclaimerEnabled } = _.result(permissions, 'dynamic', {});\r\n\r\n const {\r\n campaign,\r\n adGroup,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n } = data || {};\r\n const {\r\n locationTargets: campaignLocationTargets,\r\n genderTypes: campaignGenderTypes,\r\n ageRanges: campaignAgeRanges,\r\n } = campaign || {};\r\n const {\r\n locationTargets: adGroupLocationTargets,\r\n genderTypes: adGroupGenderTypes,\r\n ageRanges: adGroupAgeRanges,\r\n } = adGroup || {};\r\n const genderTypes = isAudienceCampaign ? adGroupGenderTypes : campaignGenderTypes;\r\n const ageRanges = isAudienceCampaign ? adGroupAgeRanges : campaignAgeRanges;\r\n const locationTargets = isAudienceCampaign ? adGroupLocationTargets : campaignLocationTargets;\r\n\r\n const serverContext = useContext(ServerContext);\r\n const { basicOptions, moreOptions } = getTargetingPanels(flowType, serverContext);\r\n const [\r\n allTargetSettingsSections,\r\n targetSettingsExpandedSections,\r\n setTargetSettingsExpandedSections,\r\n ] = useCollapseState(\r\n basicOptions /* all sections */,\r\n ['ad-group-name', 'location-target', 'predictive-targeting'] /* initially expanded sections */\r\n );\r\n const [\r\n allMoreSettingsSections,\r\n moreSettingsExpandedSections,\r\n setMoreSettingsExpandedSections,\r\n ] = useCollapseState(\r\n moreOptions /* all sections */,\r\n ['start-end-dates', 'ad-schedule', 'ad-distribution'] /* initially expanded sections */\r\n );\r\n const allBasicExpand = useMemo(\r\n () => collapseExpander({ setActiveKeys: setTargetSettingsExpandedSections }),\r\n [setTargetSettingsExpandedSections]\r\n );\r\n const [adScheduleView, setAdScheduleView] = React.useState(null);\r\n const [adDistributionView, setAdDistributionView] = React.useState(null);\r\n\r\n const onValidate = (result) => {\r\n if (data && data.campaign) {\r\n // Certain targets have to be created at ad group level for AWF\r\n const targets = _.pick(result.data, adGroupLevelTargetListForAudienceFlow);\r\n const adGroupProperties = _.pick(result.data, adGroupPropertyList);\r\n const campaignData = _.omit(result.data, adGroupLevelTargetListForAudienceFlow, adGroupPropertyList);\r\n\r\n const mergedData = {\r\n ...data,\r\n campaign: {\r\n ...data.campaign,\r\n ...campaignData,\r\n ...isAudienceCampaign ? {} : targets,\r\n },\r\n adGroup: {\r\n ...data.adGroup,\r\n ...isAudienceCampaign ? targets : {},\r\n ...adGroupProperties,\r\n },\r\n };\r\n\r\n if (isAudienceCampaign) {\r\n mergedData.adGroup.TargetSetting = getTargetSettingsFromCriterions(mergedData.adGroup); // For AWF, the default is target and bid\r\n }\r\n\r\n onDataChange({\r\n data: mergedData,\r\n isValid: result.isValid,\r\n });\r\n }\r\n };\r\n\r\n const locationTargetProps = {\r\n validationProps: {\r\n data: locationTargets,\r\n },\r\n allowNegativeLocationTargeting: true,\r\n isRadiusExcludeEnabled: false,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n hideIntent: isAudienceCampaign,\r\n defaultSelectedSearchType: SEARCH_TYPE.Boundary,\r\n bidStrategyType: 'placeholder',\r\n scope,\r\n strings: {\r\n description: i18n.getString(_TL_('For example, a country/region, state/province, or ZIP/postal code.')),\r\n },\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\n
\r\n
\r\n
\r\n \r\n \r\n \r\n }\r\n >\r\n {\r\n isAudienceCampaign ? (\r\n \r\n ) : (\r\n \r\n )\r\n }\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allBasicExpand,\r\n expandKey: 'gender-target',\r\n }}\r\n >\r\n {\r\n genderTypes ? () : ()\r\n }\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allBasicExpand,\r\n expandKey: 'age-target',\r\n }}\r\n >\r\n {\r\n ageRanges ? () : ()\r\n }\r\n \r\n {\r\n isAudienceCampaign && (\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 \r\n \r\n {i18n.getString(_TL_('More options'))}\r\n \r\n \r\n \r\n \r\n
\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n {\r\n data && data.adGroup ? (\r\n \r\n ) : ()\r\n }\r\n \r\n }\r\n >\r\n {\r\n campaign ? (\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 />\r\n
\r\n {\r\n isAgeGenderDisclaimerEnabled && (\r\n not use individuals’ demographics—such as age, gender, location, etc.—for the purpose of personalizing advertising, segmenting, or profiling customers.'))}\r\n level=\"Info\"\r\n icon={(
)}\r\n dismissible={false}\r\n />\r\n )\r\n }\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport const TargetStep = withPermissions(withScope(TargetStepInternal));\r\n","import React, { useContext, useMemo, useCallback } from 'react';\r\nimport _ from 'underscore';\r\nimport classNames from 'classnames';\r\nimport { Stack } from '@fluentui/react';\r\nimport { Collapse, ValidatedFixedPanel, ValidatedPanel, collapseExpander, useCollapseState, getPanelErrorProps } from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { FormErrorGroup, UnmappedFormErrors, andComp, entityIs, propertyIs } from '@bingads-webui-campaign-react/form-error';\r\nimport { withControlErrorHandling, withUnvalidatedControlErrors } from '@bingads-webui-campaign-react/error-handling';\r\nimport { ValidatedLegacyDateSetting } from '@bingads-webui-campaign/date-setting';\r\nimport { AdGroup } from '@bingads-webui/campaign-odata-schemas';\r\nimport { RemainingCharsValidatedTextField } from '@bingads-webui-campaign-react/remaining-chars-hint';\r\nimport { ERROR_ENTITY } from '@bingads-webui-campaign-react/xandr-video-campaign-shared-components';\r\nimport { AudienceBidValue, SectionShimmer, bidValueIcon, startDateEndDateIcon } from '@bingads-webui-campaign-react/display-plus-campaigns';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { ValidatedUrlOptionsParameter } from '@bingads-webui-campaign-react/validated-url-input';\r\nimport { UrlOptionsImg } from '@bingads-webui-campaign-react/perf-max-step-wizard';\r\n\r\nimport { getAdGroupSettingsPanels, getAdGroupStyles } from './utils';\r\nimport { ValidatedLegacyAdDistribution } from './components/ad-distribution';\r\nimport { ValidatedAdRotation } from './components';\r\nimport { isSearchShoppingCampaign, isAutoBidding } from '../step-utils';\r\nimport { TextTitle } from '../../shared/pannel-header';\r\n\r\nconst ServerValidatedAdDistributionSetting = withControlErrorHandling(withUnvalidatedControlErrors(\r\n ValidatedLegacyAdDistribution,\r\n {\r\n filter: andComp(entityIs(ERROR_ENTITY.AdGroup), propertyIs('adDistribution')),\r\n }\r\n));\r\n\r\nconst AdGroupSettingsInternal = ({\r\n data,\r\n onDataChange,\r\n error,\r\n flowType,\r\n}) => {\r\n const i18n = useContext(I18nContext);\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n const classes = useDefaultStyles(getAdGroupStyles);\r\n const { state: { context: { saveFailed: showAllValidationErrors } } } = useFormService();\r\n const serverContext = useContext(ServerContext);\r\n\r\n const {\r\n adGroup,\r\n } = data || {};\r\n const { CeilingValue, FloorValue } = serverContext.ProductGroupBidRange || {};\r\n const bidStrategyType = _.get(data, ['campaign', 'BiddingScheme', 'Type'], '');\r\n const showBid = !isAutoBidding(bidStrategyType);\r\n\r\n const { basicOptions } = getAdGroupSettingsPanels(flowType, showBid);\r\n const [adDistributionView, setAdDistributionView] = React.useState(null);\r\n const [\r\n allAdGroupSettingsSections,\r\n adGroupSettingsExpandedSections,\r\n setAdGroupSettingsExpandedSections,\r\n ] = useCollapseState(basicOptions, basicOptions); // all expanded by default\r\n const allBasicExpanded = useMemo(\r\n () => collapseExpander({ setActiveKeys: setAdGroupSettingsExpandedSections }),\r\n [setAdGroupSettingsExpandedSections]\r\n );\r\n const isSearchShopping = isSearchShoppingCampaign(flowType);\r\n\r\n const onValidate = useCallback((result) => {\r\n if (data && data.adGroup) {\r\n onDataChange({\r\n data: {\r\n ...data,\r\n adGroup: {\r\n ...data.adGroup,\r\n ...result.data,\r\n SearchBid: data.adGroup.SearchBid,\r\n CpmBid: data.adGroup.CpmBid,\r\n },\r\n },\r\n isValid: result.isValid,\r\n });\r\n }\r\n }, [onDataChange, data]);\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\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n {\r\n adGroup ? (\r\n \r\n ) : \r\n }\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n {\r\n adGroup ? (\r\n \r\n ) : ()\r\n }\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n actuationProps={{\r\n expand: allBasicExpanded,\r\n expandKey: 'url-options',\r\n }}\r\n >\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 adGroup ?\r\n : \r\n }\r\n
\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n \r\n \r\n {\r\n isSearchShopping && (\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
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport const AdGroupSettings = withScope(AdGroupSettingsInternal);\r\n","/* eslint-disable */\r\nimport Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useWizardService, WIZARD_EVENTS, getWizardData } from '@bingads-webui-react/wizard';\r\nimport {\r\n loadBundleCountries,\r\n getErrorsPlaceholders,\r\n readTargetingCriterions as readAdGroupTargetingCriterions,\r\n readAudienceCriterions as readAdGroupAudienceCriterions,\r\n readLocationCriterions as readAdGroupLocationCriterions,\r\n modelToViewModelForLocationTargets,\r\n AdGroupNegativeReferenceId,\r\n} from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ActivityContext, ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { isAudienceShoppingCampaign } from '@bingads-webui-campaign-react/constants';\r\nimport { defaultBidForShoppingCampaign } from '@bingads-webui-campaign-legacy/budget/shared/defaultBid';\r\n\r\nimport {\r\n readTargetingCriterions,\r\n readDayTimeCriterions,\r\n readLocationCriterions,\r\n readAudienceCriterions\r\n} from '../../model/campaign-criterions';\r\nimport { allSettledPromiseWrapper, isSearchShoppingCampaign } from '../step-utils';\r\nimport { useWizardLog, LOG_STATUS } from '../../shared';\r\nimport {\r\n loadCampaign,\r\n modelToViewModelForAdGroup,\r\n modelToViewModelForCampaign,\r\n viewModelToModelForCampaign,\r\n viewModelToModelForConversionGoals,\r\n viewModelToBulkModelForAdSchedules,\r\n saveCampaign,\r\n saveAdGroup,\r\n convertMachineDateToAccountDate,\r\n} from '../../model';\r\nimport { CREATE_SCENARIO } from '../../constants';\r\n\r\nconst getAdGroup = ({\r\n campaign,\r\n locationCriterionsModel,\r\n bundleCountries,\r\n}) => {\r\n const isSearch = !isAudienceShoppingCampaign(campaign.CampaignType, campaign.CampaignSubType);\r\n const adgroup = {\r\n CampaignName: campaign.Name,\r\n CampaignSubType: campaign.CampaignSubType,\r\n CampaignBidStrategyName: campaign.BiddingScheme && campaign.BiddingScheme.Type,\r\n Name: 'Ad group #1',\r\n PricingModel: 'CPC',\r\n Medium: 'Search',\r\n Status: 'Paused', // Keep the ad group paused before go live so that we can update start date\r\n StartDate: convertMachineDateToAccountDate(new Date()), // Always use account timezone\r\n SearchBid: defaultBidForShoppingCampaign(),\r\n adSchedules: {\r\n dayTimeRangs: [],\r\n },\r\n ...modelToViewModelForLocationTargets({\r\n model: locationCriterionsModel,\r\n bundleCountries,\r\n adGroupId: AdGroupNegativeReferenceId,\r\n }),\r\n ...isSearch ? {} : {\r\n ageRanges: [\r\n 'EighteenToTwentyFive',\r\n 'TwentyFiveToThirtyFive',\r\n 'ThirtyFiveToFifty',\r\n 'FiftyToSixtyFive',\r\n 'SixtyFiveAndAbove',\r\n 'Unknown',\r\n ],\r\n initialAgeRanges: [],\r\n negativeAgeRanges: [],\r\n genderTypes: [\r\n 'Female',\r\n 'Male',\r\n 'Unknown',\r\n ],\r\n initialGenderTypes: [],\r\n negativeGenderTYpes: [],\r\n audiences: [],\r\n initialAudiences: [],\r\n initialIndustryTargets: [],\r\n industry: [],\r\n initialNegativeIndustryTargets: [],\r\n negativeIndustry: [],\r\n initialJobTargets: [],\r\n jobTargets: [],\r\n initialNegativeJobTargets: [],\r\n negativeJobTargets: [],\r\n initialCompanyNameTargets: [],\r\n companyNameTargets: [],\r\n initialNegativeCompanyNameTargets: [],\r\n negativeCompanyNameTargets: [],\r\n UseOptimizedTargeting: true,\r\n TargetSetting: 'Age;Gender',\r\n },\r\n };\r\n if (campaign.Id) {\r\n adgroup.Campaign = {\r\n Id: campaign.Id,\r\n };\r\n }\r\n return adgroup;\r\n};\r\n\r\nexport const useTargetRepository = () => {\r\n const i18n = useContext(I18nContext);\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { cid, aid } = scope.values;\r\n\r\n const { state, send } = useWizardService();\r\n const { flow, createScenario } = getWizardData(state);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const scenarioContext = useContext(ScenarioContext);\r\n const isPAAIMConsolidationEnabled = _.get(serverContext, ['DynamicPermissions', 'PAAIMConsolidation'], false);\r\n\r\n const activity = useContext(ActivityContext);\r\n const isSearch = isSearchShoppingCampaign(flow);\r\n const isCampaignCreate = createScenario === CREATE_SCENARIO.CREATE_CAMPAIGN;\r\n const { onStepLoadedLog, onStepSavedLog } = useWizardLog({ activity, wizardState: state, isSearch });\r\n\r\n const load = () => {\r\n onStepLoadedLog({ status: LOG_STATUS.LOAD_START });\r\n const savedCampaign = state.context.wizardData.campaign;\r\n const savedAdGroup = state.context.wizardData.adGroup;\r\n\r\n const adGroupId = savedAdGroup ? savedAdGroup.Id : null;\r\n const campaignId = savedCampaign ? savedCampaign.Id : null; // awf: 946842344, swf: 946842546\r\n\r\n const loadPromises = {\r\n bundleCountriesAndLocationCriterions: loadBundleCountries({ cid, aid, serverContext }),\r\n adGroup: savedAdGroup ? Promise.resolve(savedAdGroup) : Promise.resolve(),\r\n // saved campaigns are viewmodels\r\n campaign: savedCampaign ? Promise.resolve({\r\n ...viewModelToModelForCampaign({\r\n data: savedCampaign\r\n }),\r\n ...viewModelToModelForConversionGoals({\r\n data: savedCampaign\r\n })\r\n }) : loadCampaign(cid, aid, campaignId),\r\n dayTimeCriterions: readDayTimeCriterions({ cid, aid, campaignId }),\r\n locationCriterions: isSearch ? readLocationCriterions({ cid, aid, campaignId }) : (adGroupId ? readAdGroupLocationCriterions({ cid, aid, campaignId, adGroupId }) : Promise.resolve({ value: [] })),\r\n targetCriterions: isSearch ? readTargetingCriterions({ cid, aid, campaignId }) : (adGroupId ? readAdGroupTargetingCriterions({ cid, aid, campaignId, adGroupId }) : Promise.resolve({ value: [] })),\r\n audienceCriterions: isSearch ? readAudienceCriterions({ cid, aid, campaignId }) : (adGroupId ? readAdGroupAudienceCriterions({ cid, aid, campaignId, adGroupId }) : Promise.resolve({ value: [] })),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n adGroup,\r\n campaign,\r\n locationCriterions,\r\n bundleCountriesAndLocationCriterions,\r\n dayTimeCriterions,\r\n targetCriterions,\r\n audienceCriterions,\r\n }) => {\r\n onStepLoadedLog({ status: LOG_STATUS.LOAD_SUCCESS });\r\n const adGroupData = adGroup ? modelToViewModelForAdGroup({\r\n adGroupModel: adGroup,\r\n campaignModel: campaign,\r\n i18n,\r\n isAudienceShoppingCampaign: !isSearch,\r\n locationCriterionsModel: !isSearch && locationCriterions ? locationCriterions.value : [],\r\n bundleCountries: !isSearch ? bundleCountriesAndLocationCriterions.bundleCountries : [],\r\n targetCriterionsModel: !isSearch && targetCriterions ? targetCriterions.value : [],\r\n audienceCriterionsModel: !isSearch && audienceCriterions ? audienceCriterions.value : [],\r\n }) : { data: getAdGroup({ campaign, locationCriterionsModel: locationCriterions.value, bundleCountries: bundleCountriesAndLocationCriterions.bundleCountries }), isValid: true, isDirty: false };\r\n const campaignData = modelToViewModelForCampaign({\r\n campaignModel: campaign,\r\n dayTimeCriterionsModel: dayTimeCriterions ? dayTimeCriterions.value : [],\r\n locationCriterionsModel: isSearch && locationCriterions ? locationCriterions.value : [],\r\n bundleCountries: isSearch ? bundleCountriesAndLocationCriterions.bundleCountries : [],\r\n targetCriterionsModel: isSearch && targetCriterions ? targetCriterions.value : [],\r\n audienceCriterionsModel: isSearch && audienceCriterions ? audienceCriterions.value : [],\r\n });\r\n\r\n // Only set the default value for AdRotation if it not in the creation wizard\r\n if (!isCampaignCreate) {\r\n adGroupData.data.AdRotation = adGroupData.data.AdRotation || 'OptimizeForClicks';\r\n }\r\n\r\n return {\r\n adGroup: adGroupData.data,\r\n campaign: campaignData.data,\r\n ...bundleCountriesAndLocationCriterions,\r\n ...getErrorsPlaceholders(),\r\n }\r\n });\r\n };\r\n\r\n const save = ({ data }) => {\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_START });\r\n const {\r\n campaign,\r\n adGroup,\r\n bundleCountries,\r\n bundleLocationCriterions,\r\n } = data;\r\n\r\n const saveCampaignPromise = saveCampaign({\r\n campaign: { data: campaign },\r\n viewModelToBulkModelForAdSchedules,\r\n updateCampaignStatus: isCampaignCreate,\r\n bundleLocationCriterions: isSearch ? bundleLocationCriterions : null,\r\n bundleCountries: isSearch ? bundleCountries : null,\r\n }, {\r\n scenario: scenarioContext.name,\r\n activityLogger: scenarioContext.createActivity('saveDefaultCampaign'),\r\n i18n,\r\n });\r\n\r\n const saveAdGroupPromise = saveAdGroup({\r\n adGroup: { data: adGroup },\r\n campaign,\r\n bundleCountries: isSearch ? null : bundleCountries,\r\n bundleLocationCriterions: isSearch ? null : bundleLocationCriterions,\r\n saveAdGroupCriterions: !isSearch,\r\n isProductGroupAllowedForAudienceCampaign: isPAAIMConsolidationEnabled,\r\n }, {\r\n scenario: scenarioContext.name,\r\n activityLogger: scenarioContext.createActivity('saveAdGroup'),\r\n i18n,\r\n serverContext,\r\n });\r\n\r\n const savePromises = [saveCampaignPromise, saveAdGroupPromise];\r\n\r\n return new Promise((resolve, reject) => {\r\n allSettledPromiseWrapper(savePromises).then((results) => {\r\n const allSuccess = _.every(results, result => result.status === 'fulfilled');\r\n\r\n if (allSuccess) {\r\n\r\n const campaignData = results[0].value.campaign.data;\r\n const adGroupData = results[1].value.adGroup.data;\r\n\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_SUCCESS, msg: `Status: ${campaignData.Status}, Id: ${campaignData.Id}` });\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n campaign: campaignData,\r\n adGroup: adGroupData,\r\n });\r\n\r\n return resolve({\r\n adGroup: adGroupData,\r\n campaign: campaignData,\r\n ...getErrorsPlaceholders(),\r\n });\r\n }\r\n\r\n const errors = _.map(results, (result) => {\r\n if (result.status === 'fulfilled') {\r\n return null;\r\n }\r\n\r\n const { serverErrors = {} } = result.reason;\r\n\r\n return serverErrors;\r\n });\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_FAIL, msg: results });\r\n return reject({ error: _.flatten(errors.filter(val => val !== null)) });\r\n });\r\n });\r\n };\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};","import { getCollapsiblePanelStyles } from '../../shared/styles/collapsible-panel';\r\n\r\nexport const getStyles = (components, theme) => ({\r\n divider: {\r\n padding: '5px 0px 0px 4px',\r\n width: '100%',\r\n borderTop: '2px solid #E0E0E0',\r\n marginTop: 30,\r\n marginBottom: 20,\r\n },\r\n budgetContainer: {\r\n '& .budget-title-container span': {\r\n fontWeight: 600,\r\n },\r\n },\r\n budgetBidShell: {\r\n display: 'flex',\r\n width: 966,\r\n '& .checkbox-inline, & .checkbox>label, & .radio-inline, & .radio>label, & label.checkbox, & label.radio': {\r\n '&:focus-within': {\r\n outline: 'none',\r\n },\r\n },\r\n '& .bid-and-budget #currencyLabelCostPerSale': {\r\n display: 'inline',\r\n },\r\n },\r\n collapsiblePanel: getCollapsiblePanelStyles(components, theme),\r\n});\r\n","import React, { useContext, useMemo, useState, useEffect } from 'react';\r\nimport classNames from 'classnames';\r\nimport _ from 'underscore';\r\n\r\nimport { Stack } from '@fluentui/react';\r\nimport { useDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { useWizardService, matchStepState, STEP_STATES, getWizardData } from '@bingads-webui-react/wizard';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { useFormService } from '@bingads-webui-react/form';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { buildLegacyI18n } from '@bingads-webui/build-legacy-i18n';\r\nimport { ValidationStringMap } from '@bingads-webui/validation-string-map';\r\nimport { Collapse, useCollapseState, ValidatedPanel, getPanelErrorProps } from '@bingads-webui-campaign/wizard-jumbo-card';\r\nimport { Campaign } from '@bingads-webui/campaign-odata-schemas';\r\nimport { ValidationGroup } from '@bingads-webui-react/validation';\r\nimport { FormErrorGroup, UnmappedFormErrors } from '@bingads-webui-campaign-react/form-error';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { AttentionBeaconGroup } from '@bingads-webui-campaign-react/attention-beacon';\r\nimport { ActuationGroup } from '@bingads-webui-campaign-react/actuator';\r\nimport {\r\n AudienceBudgetBidStrategy,\r\n AudienceBidValue,\r\n StepHeader,\r\n SectionShimmer,\r\n bidValueIcon,\r\n budgetBidStrategyIcon,\r\n} from '@bingads-webui-campaign-react/display-plus-campaigns';\r\nimport { getBidBudgetTitleDetails } from '@bingads-webui-campaign-react/wizard-shared-components';\r\nimport { formatBidValue } from '@bingads-webui-campaign-react/summary-page';\r\n\r\nimport { getStyles } from './styles';\r\nimport { getBudgetBidSections, isAutoBidding } from '../step-utils';\r\nimport { TextTitle } from '../../shared/pannel-header';\r\n\r\nexport const BudgetBidStep = ({\r\n data,\r\n onDataChange,\r\n error,\r\n}) => {\r\n const classes = useDefaultStyles(getStyles);\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state } = useWizardService();\r\n const { facInfo } = getWizardData(state);\r\n const currentStates = state.toStrings()[1];\r\n const { state: { context: { saveFailed: showAllValidationErrors } } } = useFormService();\r\n\r\n const {\r\n campaign,\r\n adGroup,\r\n } = data || {};\r\n\r\n const i18n = useContext(I18nContext);\r\n const legacyI18n = useMemo(() => buildLegacyI18n(i18n, [ValidationStringMap]), [i18n]);\r\n const biddingSchemeType = _.get(campaign, ['BiddingScheme', 'Type'], '');\r\n\r\n const [sharedBudgetView, setSharedBudgetView] = useState(null);\r\n const serverContext = useContext(ServerContext);\r\n const { CeilingValue, FloorValue } = serverContext.ProductGroupBidRange || {};\r\n\r\n const { basicOptions } = getBudgetBidSections();\r\n const [optionsShown, setOptionsShown] = useState(basicOptions);\r\n\r\n const onValidate = (result) => {\r\n if (campaign) {\r\n let adGroupData = {};\r\n const biddingScheme = _.get(result, ['data', 'BiddingScheme'], {});\r\n const currentBiddingSchemeType = biddingScheme.Type || biddingSchemeType;\r\n\r\n if (isAutoBidding(currentBiddingSchemeType)) {\r\n // for auto bidding strategies we hide the bid panel\r\n const filterOutBidPanel = optionsShown.filter(option => option !== 'bid-value');\r\n adGroupData = {\r\n SearchBid: null,\r\n };\r\n setOptionsShown([...filterOutBidPanel]);\r\n } else {\r\n setOptionsShown([...basicOptions]);\r\n\r\n if (result.data) {\r\n adGroupData = {\r\n SearchBid: result.data.SearchBid,\r\n };\r\n }\r\n }\r\n\r\n if (!_.isUndefined(biddingScheme.BidStrategyId)) {\r\n campaign.BidStrategyName = biddingScheme.BidStrategyName;\r\n }\r\n\r\n onDataChange({\r\n data: {\r\n ...data,\r\n campaign: {\r\n ...campaign,\r\n ...result.data,\r\n },\r\n adGroup: {\r\n ...adGroup,\r\n PricingModel: result.data.BiddingScheme && result.data.BiddingScheme.Type,\r\n ...adGroupData,\r\n },\r\n },\r\n isValid: result.isValid,\r\n });\r\n }\r\n };\r\n\r\n const [\r\n allBudgetBidSections,\r\n budgetBidExpandedSections,\r\n setBudgetBidExpandedSections,\r\n ] = useCollapseState(\r\n optionsShown /* all sections */,\r\n ['bid-and-budget', 'bid-value'] /* initially expanded sections */\r\n );\r\n\r\n const budgetBidStrategyTitleDetails = useMemo(() => (\r\n campaign ? getBidBudgetTitleDetails(serverContext, i18n, campaign.BiddingScheme, campaign.Budget) : ''\r\n ), [campaign, i18n, serverContext]);\r\n\r\n const bidTitleDetails = useMemo(() => (\r\n adGroup ? formatBidValue(i18n, adGroup.SearchBid, serverContext.CurrentAccount.CurrencyCode) : ''\r\n ), [adGroup, i18n, serverContext]);\r\n\r\n useEffect(() => {\r\n if (facInfo && facInfo.current.isFACCouponActive && sharedBudgetView) {\r\n sharedBudgetView.budgetView.ko_model.updateFeatureAdoptionCoupon({\r\n showFACHint: true,\r\n couponValue: facInfo.current.facCouponValue,\r\n });\r\n }\r\n }, [facInfo, sharedBudgetView]);\r\n\r\n useEffect(() => {\r\n if (activity && matchStepState(state, STEP_STATES.LOADING)) {\r\n activity.signal(`onBudgetBidStepLoading - ${currentStates}`);\r\n }\r\n\r\n if (activity && matchStepState(state, STEP_STATES.SAVING)) {\r\n activity.signal(`onBudgetBidStepSaving - ${currentStates}`);\r\n }\r\n }, [activity, currentStates, state]);\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\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n {\r\n campaign ? (\r\n \r\n ) : ()\r\n }\r\n \r\n }\r\n attentionBeaconProps={{ getExtraProps: getPanelErrorProps }}\r\n >\r\n {\r\n adGroup ? (\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};\r\n","import Promise from 'bluebird';\r\nimport _ from 'underscore';\r\nimport { useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useWizardService, getWizardData, WIZARD_EVENTS } from '@bingads-webui-react/wizard';\r\nimport { ScopeContext } from '@bingads-webui-react/scope-service';\r\nimport { ActivityContext, ScenarioContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { ServerContext } from '@bingads-webui-campaign-react/server-context';\r\nimport { getErrorsPlaceholders } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport biddingStrategyTypes from '@bingads-webui-campaign-legacy/bidding-strategy/bidding-strategy-type';\r\nimport { CampaignSubTypes } from '@bingads-webui-campaign-react/constants';\r\nimport { defaultBidForShoppingCampaign } from '@bingads-webui-campaign-legacy/budget/shared/defaultBid';\r\n\r\nimport {\r\n loadCampaign,\r\n loadAdGroup,\r\n modelToViewModelForAdGroup,\r\n saveAdGroup,\r\n saveCampaign,\r\n} from '../../model';\r\nimport { isSearchShoppingCampaign } from '../step-utils';\r\nimport { useWizardLog, LOG_STATUS } from '../../shared';\r\n\r\nexport const useBudgetBidRepository = () => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const serverContext = useContext(ServerContext);\r\n const scenarioContext = useContext(ScenarioContext);\r\n const activity = useContext(ActivityContext);\r\n const isPAAIMConsolidationEnabled = _.get(serverContext, ['DynamicPermissions', 'PAAIMConsolidation'], false);\r\n\r\n const { scope } = useContext(ScopeContext) || {};\r\n const { cid, aid } = scope.values;\r\n\r\n const { state, send } = useWizardService();\r\n const { flow } = getWizardData(state);\r\n const isAudienceShoppingCampaign = !isSearchShoppingCampaign(flow);\r\n const { onStepLoadedLog, onStepSavedLog } = useWizardLog({ activity, wizardState: state, isSearch: !isAudienceShoppingCampaign });\r\n\r\n const load = () => {\r\n onStepLoadedLog({ status: LOG_STATUS.LOAD_START });\r\n const savedCampaign = state.context.wizardData.campaign;\r\n const savedAdGroup = state.context.wizardData.adGroup;\r\n\r\n const adGroupId = savedAdGroup ? savedAdGroup.Id : null;\r\n const campaignId = savedCampaign ? savedCampaign.Id : null;\r\n\r\n const loadPromises = {\r\n adGroup: savedAdGroup ? Promise.resolve(savedAdGroup) : loadAdGroup(cid, aid, campaignId, adGroupId),\r\n campaign: savedCampaign ? Promise.resolve(savedCampaign) : loadCampaign(cid, aid, campaignId),\r\n };\r\n\r\n return Promise.props(loadPromises).then(({\r\n adGroup,\r\n campaign,\r\n }) => {\r\n onStepLoadedLog({ status: LOG_STATUS.LOAD_SUCCESS });\r\n const adGroupData = modelToViewModelForAdGroup({\r\n adGroupModel: {\r\n ...adGroup,\r\n SearchBid: adGroup.SearchBid !== undefined ? adGroup.SearchBid : defaultBidForShoppingCampaign(),\r\n },\r\n campaignModel: campaign,\r\n i18n,\r\n isAudienceShoppingCampaign,\r\n });\r\n\r\n return {\r\n adGroup: adGroupData.data,\r\n campaign,\r\n ...getErrorsPlaceholders(),\r\n };\r\n });\r\n };\r\n\r\n\r\n const save = ({ data }) => {\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_START });\r\n const { adGroup, campaign } = data;\r\n campaign.Status = 'Paused';\r\n const isCostPerSaleEnabled = _.get(serverContext, ['Permissions', 'IsCostPerSaleEnabled'], false);\r\n\r\n if (campaign.BiddingScheme && campaign.BiddingScheme.Type === biddingStrategyTypes.costPerSale) {\r\n campaign.PersonalizedOffersEnabled = true;\r\n campaign.CashbackPercent = 10;\r\n campaign.CashbackScope = 'Product';\r\n campaign.Priority = 'High';\r\n } else if (isCostPerSaleEnabled && campaign.CampaignSubType !== CampaignSubTypes.AudienceDynamicFeedBased) {\r\n // PersonalizedOffersEnabled should be set to true/false only when CPS pilot is enabled, otherwise it will cause PersonalizedOffersAccountNotInPilot error.\r\n campaign.PersonalizedOffersEnabled = false;\r\n campaign.CashbackPercent = 'delete_value';\r\n campaign.CashbackScope = 'delete_value';\r\n } else {\r\n // This is for AudienceDynamicFeedBased campaign or when CPS pilot is not enabled.\r\n delete campaign.PersonalizedOffersEnabled;\r\n delete campaign.CashbackPercent;\r\n delete campaign.CashbackScope;\r\n }\r\n\r\n const saveAdGroupsPromise = () => saveAdGroup({\r\n adGroup: { data: adGroup },\r\n campaign,\r\n updateProductPartitionBids: true,\r\n isProductGroupAllowedForAudienceCampaign: isPAAIMConsolidationEnabled,\r\n }, {\r\n scenario: scenarioContext.name,\r\n activityLogger: scenarioContext.createActivity('saveAdGroup'),\r\n i18n,\r\n serverContext,\r\n });\r\n\r\n const saveCampaignPromise = () => saveCampaign({\r\n campaign: { data: campaign },\r\n }, {\r\n scenario: scenarioContext.name,\r\n activityLogger: scenarioContext.createActivity('saveDefaultCampaign'),\r\n i18n,\r\n });\r\n\r\n // Save campaign first, then save ad groups.\r\n // When change from CPS to some other bidding strategy,\r\n // we need to save campaign first, to prevent BidCannotBeManagedForBiddingScheme error in adgroup save.\r\n return saveCampaignPromise().then(campaignResult => saveAdGroupsPromise().then((adGroupResult) => {\r\n const campaignData = campaignResult.campaign.data;\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_SUCCESS, msg: `Status: ${campaignData.Status}, Id: ${campaignData.Id}` });\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, {\r\n campaign: campaignData,\r\n adGroup: adGroupResult.adGroup.data,\r\n });\r\n\r\n return Promise.resolve({\r\n adGroup: adGroupResult.adGroup.data,\r\n campaign: campaignData,\r\n ...getErrorsPlaceholders(),\r\n });\r\n })).catch((error) => {\r\n const { serverErrors = {} } = error;\r\n onStepSavedLog({ status: LOG_STATUS.SAVE_FAIL, msg: serverErrors });\r\n // eslint-disable-next-line prefer-promise-reject-errors\r\n return Promise.reject({ error: serverErrors });\r\n });\r\n };\r\n\r\n return {\r\n load,\r\n save,\r\n };\r\n};\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport { Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { getNeedConfirming } from '@bingads-webui-campaign-react/campaign-settings-utils';\r\n\r\nimport {\r\n CampaignSettingsStep,\r\n TargetStep,\r\n BudgetBidStep,\r\n SummaryStep,\r\n useCampaignRepository,\r\n useBudgetBidRepository,\r\n useSummaryRepository,\r\n useTargetRepository,\r\n} from './index';\r\nimport { STEP_PATHS, CREATE_SCENARIO } from '../constants';\r\nimport { AdGroupSettings } from './adgroup-settings';\r\n\r\nexport const getStepConfig = ({ flowType, createScenario, permissions = {} }) => {\r\n if (createScenario === CREATE_SCENARIO.CREATE_CAMPAIGN) {\r\n return [{\r\n id: STEP_PATHS.CAMPAIGN_SETTINGS,\r\n view: props => ,\r\n repository: useCampaignRepository,\r\n viewProps: { flowType },\r\n }, {\r\n id: STEP_PATHS.TARGET_SETTINGS,\r\n view: props => ,\r\n repository: useTargetRepository,\r\n viewProps: { flowType },\r\n }, {\r\n id: STEP_PATHS.BUDGET_AND_BIDS,\r\n view: props => ,\r\n repository: useBudgetBidRepository,\r\n viewProps: { flowType },\r\n },\r\n {\r\n id: STEP_PATHS.SUMMARY,\r\n view: props => ,\r\n repository: useSummaryRepository,\r\n }];\r\n }\r\n\r\n if (createScenario === CREATE_SCENARIO.UPDATE_CAMPAIGN) {\r\n const stepConfig = {\r\n id: STEP_PATHS.CAMPAIGN_SETTINGS,\r\n view: props => ,\r\n repository: useCampaignRepository,\r\n viewProps: { flowType, createScenario },\r\n };\r\n\r\n if (_.get(permissions, ['dynamic', 'ConversionAssociationWarningP3'], false)) {\r\n stepConfig.machineOptions = {\r\n guards: {\r\n needsConfirming: context => getNeedConfirming(permissions, context),\r\n },\r\n };\r\n }\r\n\r\n return [stepConfig];\r\n }\r\n\r\n return [{\r\n id: STEP_PATHS.AD_GROUP_SETTINGS,\r\n view: props => ,\r\n repository: useTargetRepository,\r\n viewProps: { flowType, createScenario },\r\n }];\r\n};\r\n\r\n// for now. AWF and SWF share the same step list. if they are different, we can return different step list based on the flow\r\nexport const getStepListConfig = ({ i18n, createScenario }) => {\r\n if (createScenario === CREATE_SCENARIO.CREATE_CAMPAIGN) {\r\n return [{\r\n id: STEP_PATHS.CAMPAIGN_SETTINGS,\r\n title: i18n.getString(_TL_('Shopping settings')),\r\n },\r\n {\r\n id: STEP_PATHS.TARGET_SETTINGS,\r\n title: i18n.getString(_TL_('Targeting')),\r\n },\r\n {\r\n id: STEP_PATHS.BUDGET_AND_BIDS,\r\n title: i18n.getString(_TL_('Budget & bids')),\r\n },\r\n {\r\n id: STEP_PATHS.SUMMARY,\r\n title: i18n.getString(_TL_('Summary')),\r\n }];\r\n }\r\n\r\n if (createScenario === CREATE_SCENARIO.UPDATE_CAMPAIGN) {\r\n return [{\r\n id: STEP_PATHS.CAMPAIGN_SETTINGS,\r\n title: i18n.getString(_TL_('Campaign Settings')),\r\n }];\r\n }\r\n\r\n return [{\r\n id: STEP_PATHS.AD_GROUP_SETTINGS,\r\n title: i18n.getString(_TL_('Ad Group Settings')),\r\n }];\r\n};\r\n\r\nexport const getFlow = ({ createScenario }) => {\r\n if (createScenario === CREATE_SCENARIO.CREATE_CAMPAIGN) {\r\n return [\r\n STEP_PATHS.CAMPAIGN_SETTINGS,\r\n STEP_PATHS.TARGET_SETTINGS,\r\n STEP_PATHS.BUDGET_AND_BIDS,\r\n STEP_PATHS.SUMMARY,\r\n ];\r\n }\r\n\r\n if (createScenario === CREATE_SCENARIO.UPDATE_CAMPAIGN) {\r\n return [STEP_PATHS.CAMPAIGN_SETTINGS];\r\n }\r\n\r\n return [STEP_PATHS.AD_GROUP_SETTINGS];\r\n};\r\n\r\nexport const getFirstStep = ({ createScenario }) => {\r\n switch (createScenario) {\r\n case CREATE_SCENARIO.CREATE_CAMPAIGN:\r\n case CREATE_SCENARIO.UPDATE_CAMPAIGN:\r\n return STEP_PATHS.CAMPAIGN_SETTINGS;\r\n\r\n case CREATE_SCENARIO.UPDATE_ADGROUP:\r\n return STEP_PATHS.AD_GROUP_SETTINGS;\r\n\r\n default:\r\n throw new Error('Unexpected scenario!');\r\n }\r\n};\r\nexport const getDestinationWhenDone = ({ createScenario }) => {\r\n switch (createScenario) {\r\n case CREATE_SCENARIO.CREATE_CAMPAIGN:\r\n return 'campaigns';\r\n case CREATE_SCENARIO.UPDATE_ADGROUP:\r\n return 'ads';\r\n\r\n default:\r\n return 'adgroups';\r\n }\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useMemo, useCallback, useContext } from 'react';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Constants } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport { ResponsiveStepList } from '@bingads-webui-react/step-progress-indicator';\r\nimport { useResponsiveSize } from '@bingads-webui-react/with-responsive-size';\r\nimport {\r\n useWizardService,\r\n getCurrentStepId,\r\n getCurrentFlow,\r\n WIZARD_EVENTS,\r\n} from '@bingads-webui-react/wizard';\r\n\r\nimport { getStepListConfig } from './step-config';\r\n\r\nexport const StepList = () => {\r\n const { state, send } = useWizardService();\r\n const i18n = useContext(I18nContext);\r\n\r\n const currentStepId = getCurrentStepId(state);\r\n const currentFlow = getCurrentFlow(state);\r\n const displayMode = useResponsiveSize(Constants.ResponsiveSizeBreakpoints);\r\n const { flow, createScenario } = state.context.wizardData;\r\n\r\n const stepListConfig = useMemo(() => getStepListConfig({\r\n i18n, flow, currentStepId, createScenario,\r\n }), [currentStepId, flow, i18n, createScenario]);\r\n\r\n const getDefaultOnItemClickFn = useCallback((step) => {\r\n let toStep;\r\n if (currentFlow.includes(step.id)) {\r\n toStep = step;\r\n } else if (!_.isEmpty(step.steps)) {\r\n const firstSubStep = _.find(step.steps, s => currentFlow.includes(s.id));\r\n if (firstSubStep) {\r\n toStep = firstSubStep;\r\n }\r\n }\r\n if (toStep && toStep.isBehind) {\r\n return () => {\r\n send(WIZARD_EVENTS.NAVIGATE_TO, {\r\n stepId: toStep.id,\r\n });\r\n };\r\n }\r\n return undefined;\r\n }, [currentFlow, send]);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\n","import _ from 'underscore';\r\nimport React, { useContext, useCallback, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { Stack, PrimaryButton, DefaultButton } from '@fluentui/react';\r\nimport {\r\n useWizardService,\r\n getIsFirstStep,\r\n getIsLastStep,\r\n getCurrentStepId,\r\n matchStepState,\r\n STEP_STATES,\r\n WIZARD_EVENTS,\r\n} from '@bingads-webui-react/wizard';\r\nimport { CancelButton } from '@bingads-webui-react/wizard-ui-library';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { STEP_PATHS } from './constants';\r\n\r\nconst SaveAndPublishButton = ({ adoptCoupon }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n if (activity) {\r\n activity.signal('onSaveAndPublishClicked');\r\n }\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isPublishing: true });\r\n adoptCoupon();\r\n send(WIZARD_EVENTS.SAVE_AND_EXIT);\r\n }, [activity, send, adoptCoupon]);\r\n\r\n const buttonText = useMemo(() => {\r\n const currentStep = getCurrentStepId(state);\r\n\r\n if (currentStep === STEP_PATHS.SUMMARY) {\r\n return i18n.getString(_TL_('Go live'));\r\n }\r\n\r\n return i18n.getString(_TL_('Save'));\r\n }, [i18n, state]);\r\n\r\n return (\r\n \r\n {buttonText}\r\n \r\n );\r\n};\r\n\r\nexport const SaveAndExitButton = ({ adoptCoupon }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n if (activity) {\r\n activity.signal('onSaveAndExitButtonClicked');\r\n }\r\n send(WIZARD_EVENTS.UPDATE_WIZARD_DATA, { isAdGroupSaving: true });\r\n adoptCoupon();\r\n send(WIZARD_EVENTS.SAVE_AND_EXIT);\r\n }, [activity, send, adoptCoupon]);\r\n\r\n return (\r\n \r\n {i18n.getString(_TL_('Save and exit'))}\r\n \r\n );\r\n};\r\n\r\nexport const NextButton = ({ buttonText, disabled }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onNextClicked = useCallback(() => {\r\n send(WIZARD_EVENTS.SAVE_AND_NEXT);\r\n }, [send]);\r\n\r\n return (\r\n \r\n {buttonText || i18n.getString(_TL_('Next'))}\r\n \r\n );\r\n};\r\n\r\nexport const BackButton = ({ buttonText }) => {\r\n const i18n = useContext(I18nContext);\r\n\r\n const { state, send } = useWizardService();\r\n const isBlocking = matchStepState(state, STEP_STATES.FETCHING) || matchStepState(state, STEP_STATES.LOADING) || matchStepState(state, STEP_STATES.SAVING);\r\n\r\n const onBackClicked = useCallback(() => {\r\n send(WIZARD_EVENTS.BACK);\r\n }, [send]);\r\n\r\n return (\r\n \r\n {buttonText || i18n.getString(_TL_('Back'))}\r\n \r\n );\r\n};\r\nBackButton.propTypes = {\r\n buttonText: PropTypes.string,\r\n};\r\nBackButton.defaultProps = {\r\n buttonText: undefined,\r\n};\r\n\r\n\r\nNextButton.propTypes = {\r\n buttonText: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n};\r\nNextButton.defaultProps = {\r\n buttonText: undefined,\r\n disabled: false,\r\n};\r\n\r\nexport const StepFooter = ({\r\n nextButtonText,\r\n nextDisabled,\r\n backButtonText,\r\n cancelButtonText,\r\n adoptCoupon,\r\n}) => {\r\n const { state } = useWizardService();\r\n const { showRedirectToBMC } = state.context.wizardData;\r\n const isFirstStep = getIsFirstStep(state);\r\n const isLastStep = getIsLastStep(state);\r\n\r\n const currentStep = getCurrentStepId(state);\r\n\r\n return (\r\n <>\r\n {!showRedirectToBMC ?\r\n \r\n {!isFirstStep && }\r\n {(!isLastStep ? : )}\r\n {currentStep === STEP_PATHS.TARGET_SETTINGS && }\r\n {isFirstStep && }\r\n \r\n :\r\n \r\n \r\n \r\n }\r\n \r\n );\r\n};\r\nStepFooter.propTypes = {\r\n nextButtonText: PropTypes.string,\r\n nextDisabled: PropTypes.bool,\r\n backButtonText: PropTypes.string,\r\n cancelButtonText: PropTypes.string,\r\n adoptCoupon: PropTypes.func,\r\n};\r\nStepFooter.defaultProps = {\r\n nextButtonText: undefined,\r\n nextDisabled: false,\r\n backButtonText: undefined,\r\n cancelButtonText: undefined,\r\n adoptCoupon: _.noop,\r\n};\r\n","import _ from 'underscore';\r\nimport React, { useMemo, useContext, useEffect, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n Wizard,\r\n LayoutContainer,\r\n Layout,\r\n StepContainer,\r\n} from '@bingads-webui-react/wizard';\r\nimport {\r\n BusyBlocker,\r\n DefaultTemplate,\r\n CancelWizardDialog,\r\n ConfirmWizardDialog,\r\n} from '@bingads-webui-react/wizard-ui-library';\r\nimport { WizardPerfMarker } from '@bingads-webui-campaign/wizard-performance-marker';\r\nimport { Scenario, Activity } from '@bingads-webui-react/hoc-with-signal';\r\nimport { InstrumentationContext } from '@bingads-webui-react/hoc-with-instrumentation';\r\nimport { PerformanceMarkerProvider } from '@bingads-webui-campaign-react/performance-marker-provider';\r\nimport { withSiteMap, getRoutePathById } from '@bingads-webui-campaign-react/with-site-map';\r\nimport { withScope } from '@bingads-webui-react/scope-service';\r\nimport { MmpFetchProvider } from '@bingads-webui-campaign-react/xandr-campaign';\r\nimport { withPermissions } from '@bingads-webui-react/hoc-with-permissions';\r\nimport { setClarityTag } from '@bingads-webui-universal/clarity';\r\nimport { useShoppingFAC, ShoppingFACScenario } from '@bingads-webui-campaign-react/shopping-coupon-callout';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\nimport { useConfirmDialogConfigWithLogger } from '@bingads-webui-campaign-react/campaign-settings-wizard-v1-utils';\r\n\r\nimport { getStepConfig, StepList, getFlow, getFirstStep, getDestinationWhenDone, getAdTypeFromCurrentCampaign, isSearchShoppingCampaign } from './steps';\r\nimport { AD_TYPES_TO_FLOWS, CREATE_SCENARIO } from './constants';\r\nimport { StepFooter } from './footer';\r\n\r\nconst StandardShoppingCampaignWizardInternal = (props) => {\r\n const {\r\n siteMap, scope, perfMarker,\r\n campaignType: adType,\r\n createScenario = CREATE_SCENARIO.CREATE_CAMPAIGN,\r\n currentCampaign = undefined,\r\n currentAdGroup = undefined,\r\n serverContext,\r\n permissions,\r\n } = props;\r\n\r\n const isConversionAssociationWarningP3Enabled = _.get(permissions, ['dynamic', 'ConversionAssociationWarningP3'], false);\r\n const isCampaignCreation = createScenario === CREATE_SCENARIO.CREATE_CAMPAIGN;\r\n const isCampaignUpdate = createScenario === CREATE_SCENARIO.UPDATE_CAMPAIGN;\r\n const routeToNavigateToWhenDone = getRoutePathById(siteMap, getDestinationWhenDone({ createScenario }));\r\n const i18n = useContext(I18nContext);\r\n\r\n const instrumentation = useContext(InstrumentationContext);\r\n\r\n const wizardType = adType || getAdTypeFromCurrentCampaign(currentCampaign);\r\n\r\n const wizardPerfMarker = useMemo(() => (\r\n perfMarker.createChild(`StandardShoppingWizard-${wizardType}`)\r\n ), [perfMarker, wizardType]);\r\n\r\n const flowType = AD_TYPES_TO_FLOWS[wizardType];\r\n const initialStep = getFirstStep({ createScenario });\r\n\r\n const facCouponInfoRef = useRef({\r\n isFACCouponActive: false,\r\n facCouponValue: null,\r\n });\r\n\r\n const {\r\n isActive: isFACCouponActive,\r\n ShoppingFACCallout,\r\n adoptCouponFromActiveStatus,\r\n facCoupon,\r\n } = useShoppingFAC();\r\n\r\n const showFACCallout = useMemo(\r\n () => isSearchShoppingCampaign(flowType) && isCampaignCreation && _.get(serverContext, ['DynamicPermissions', 'FACForShopping'], false),\r\n [flowType, isCampaignCreation, serverContext]\r\n );\r\n\r\n useEffect(() => {\r\n facCouponInfoRef.current.isFACCouponActive = isFACCouponActive;\r\n facCouponInfoRef.current.facCouponValue = facCoupon && facCoupon.value;\r\n }, [isFACCouponActive, facCoupon]);\r\n\r\n const config = useMemo(() => ({\r\n id: 'standard-shopping-wizard',\r\n initialStep,\r\n steps: getStepConfig({ flowType, createScenario, permissions }),\r\n initialFlowFactors: { flow: flowType },\r\n initialWizardData: {\r\n flow: flowType,\r\n createScenario,\r\n campaign: currentCampaign,\r\n facInfo: facCouponInfoRef,\r\n adGroup: currentAdGroup,\r\n },\r\n getFlow: () => getFlow({ createScenario }),\r\n actions: {\r\n onDone: () => scope.save(routeToNavigateToWhenDone),\r\n onExited: () => scope.save(routeToNavigateToWhenDone),\r\n },\r\n attachStepActivities: true,\r\n }), [flowType, initialStep, routeToNavigateToWhenDone, scope, createScenario, currentCampaign, currentAdGroup, facCouponInfoRef, permissions]);\r\n\r\n useEffect(() => {\r\n setClarityTag({ StandardShopping: flowType });\r\n }, [flowType]);\r\n\r\n return (\r\n \r\n \r\n \r\n {showFACCallout && }\r\n \r\n \r\n \r\n \r\n {createScenario === CREATE_SCENARIO.CREATE_CAMPAIGN && }\r\n \r\n }\r\n nextButtonText={i18n.getString(_TL_('Save & go to next step'))}\r\n />\r\n \r\n \r\n {\r\n isConversionAssociationWarningP3Enabled && isCampaignUpdate\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\nStandardShoppingCampaignWizardInternal.propTypes = {\r\n siteMap: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n save: PropTypes.func.isRequired,\r\n }).isRequired,\r\n perfMarker: PropTypes.shape({\r\n createChild: PropTypes.func.isRequired,\r\n }).isRequired,\r\n campaignType: PropTypes.string.isRequired,\r\n createScenario: PropTypes.string,\r\n currentCampaign: PropTypes.shape({}),\r\n serverContext: PropTypes.shape({}).isRequired,\r\n currentAdGroup: PropTypes.shape({}),\r\n permissions: PropTypes.shape({}),\r\n};\r\n\r\nStandardShoppingCampaignWizardInternal.defaultProps = {\r\n currentCampaign: undefined,\r\n createScenario: CREATE_SCENARIO.CREATE_CAMPAIGN,\r\n currentAdGroup: undefined,\r\n permissions: {},\r\n};\r\n\r\nexport const StandardShoppingCampaignWizard = withPermissions(withScope(withSiteMap(StandardShoppingCampaignWizardInternal)));\r\n","import React, { useCallback, useContext, useMemo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { withCustomValidation } from '@bingads-webui-react/validation';\r\nimport { ActivityContext } from '@bingads-webui-react/hoc-with-signal';\r\nimport { AdDistribution } from '@bingads-webui-campaign/ad-distribution';\r\n\r\nconst defaultGetOptions = (initialAdDistribution, onChange) => ({\r\n AdDistribution: initialAdDistribution || 'BingYahooAndSearchPartners',\r\n campaignType: 'shopping',\r\n campaignSubType: undefined,\r\n Languages: [],\r\n isSPBCampaign: false,\r\n onChange,\r\n});\r\n\r\nconst LegacyAdDistributionWithCustomValidation = ({\r\n setAdDistributionView, updateValidation, validationProps, getOptions,\r\n}) => {\r\n const {\r\n data,\r\n } = validationProps || {};\r\n const {\r\n AdDistribution: adDistribution,\r\n } = data || {};\r\n\r\n const activity = useContext(ActivityContext);\r\n\r\n const onChange = useCallback((newData) => {\r\n updateValidation([], { AdDistribution: newData });\r\n\r\n if (activity) {\r\n // signal activity to parent\r\n activity.signal(`onLegacyAdDistributionChange - ${JSON.stringify(newData)}`);\r\n }\r\n }, [updateValidation, activity]);\r\n\r\n const options = useMemo(() => getOptions(adDistribution, onChange), [adDistribution, getOptions, onChange]);\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nLegacyAdDistributionWithCustomValidation.propTypes = {\r\n validationProps: PropTypes.shape({\r\n data: PropTypes.shape({}),\r\n }).isRequired,\r\n updateValidation: PropTypes.func.isRequired,\r\n setAdDistributionView: PropTypes.func.isRequired,\r\n getOptions: PropTypes.func,\r\n};\r\n\r\nLegacyAdDistributionWithCustomValidation.defaultProps = {\r\n getOptions: defaultGetOptions,\r\n};\r\n\r\nexport const ValidatedLegacyAdDistribution = withCustomValidation(LegacyAdDistributionWithCustomValidation);\r\n","/* eslint-disable no-unused-expressions */\r\n/* eslint-disable jsx-a11y/no-static-element-interactions */\r\nimport React from 'react';\r\nimport { result } from 'underscore';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst setTranslateX = (el, value) => {\r\n // eslint-disable-next-line no-param-reassign\r\n el && el.style && (el.style.transform = `matrix(1, 0, 0, 1, ${value}, 0)`);\r\n};\r\nconst getTranslateX = (el) => {\r\n const matrix = el.style.transform.replace(/\\s/g, '');\r\n const arr = matrix.split(',');\r\n const translateX = result(arr, 4, '0');\r\n return parseInt(translateX, 10);\r\n};\r\n\r\nexport class VirtualScrollbar extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n this.view = React.createRef();\r\n this.child = React.createRef();\r\n this.isDown = false;\r\n this.prev = 0;\r\n }\r\n\r\n componentDidMount() {\r\n this.view.current.addEventListener('scroll', this.onViewScroll);\r\n document.addEventListener('mousemove', this.onMouseMove);\r\n document.addEventListener('mouseup', this.onMouseUp);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.view.current.removeEventListener('scroll', this.onViewScroll);\r\n document.removeEventListener('mousemove', this.onMouseMove);\r\n document.removeEventListener('mouseup', this.onMouseUp);\r\n }\r\n\r\n onMouseUp = () => {\r\n this.isDown = false;\r\n }\r\n\r\n onMouseDown = (e) => {\r\n this.isDown = true;\r\n\r\n let offsetLeft;\r\n if (this.child.current.style.transform) {\r\n offsetLeft = getTranslateX(this.child.current);\r\n } else {\r\n offsetLeft = 0;\r\n }\r\n this.prev = offsetLeft - e.clientX;\r\n }\r\n\r\n onMouseMove = (e) => {\r\n if (this.isDown) {\r\n let offsetX = e.clientX + this.prev;\r\n const thumbWidth = (this.props.width * this.props.width) / this.props.viewWidth;\r\n\r\n // set virtual bar\r\n if (offsetX < 0) {\r\n offsetX = 0;\r\n } else if (offsetX > this.props.width - thumbWidth) {\r\n offsetX = this.props.width - thumbWidth;\r\n }\r\n setTranslateX(this.child.current, offsetX);\r\n\r\n // set physical bar\r\n const viewOffsetX = (offsetX / this.props.width) * this.props.viewWidth;\r\n this.view.current.scrollLeft = viewOffsetX;\r\n }\r\n }\r\n\r\n onViewScroll = (e) => {\r\n const viewOffsetX = e.target.scrollLeft;\r\n const offsetX = (viewOffsetX / this.props.viewWidth) * this.props.width;\r\n setTranslateX(this.child.current, offsetX);\r\n }\r\n\r\n render() {\r\n const parentStyle = {\r\n ...this.props.style,\r\n width: this.props.width,\r\n height: this.props.height,\r\n };\r\n\r\n const childStyle = {\r\n width: (this.props.width * this.props.width) / this.props.viewWidth,\r\n height: this.props.height,\r\n userSelect: 'none',\r\n };\r\n\r\n return (\r\n
\r\n
{React.cloneElement(this.props.children, { ref: this.view })}
\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nVirtualScrollbar.propTypes = {\r\n height: PropTypes.number,\r\n width: PropTypes.number.isRequired,\r\n viewWidth: PropTypes.number.isRequired,\r\n children: PropTypes.element.isRequired,\r\n // eslint-disable-next-line react/forbid-prop-types\r\n style: PropTypes.object,\r\n};\r\n\r\nVirtualScrollbar.defaultProps = {\r\n height: 15,\r\n style: {},\r\n};\r\n","/* eslint-disable no-nested-ternary */\r\n/* eslint-disable react/forbid-prop-types */\r\n/* eslint-disable no-underscore-dangle */\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { extend, defaults, delay } from 'underscore';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { VirtualScrollbar } from './virtual-scrollbar';\r\n\r\nconst SCROLLBAR_HEIGHT = 17;\r\nconst MARGIN_RIGHT = 17;\r\nconst VIRTUAL_SCROLLBAR_HEIGHT = 14;\r\n\r\nconst getTablePageStyles = () => extend({\r\n scrollBarView: {\r\n marginRight: MARGIN_RIGHT,\r\n overflow: 'auto',\r\n scrollbarWidth: 'none',\r\n '&::-webkit-scrollbar': {\r\n display: 'none',\r\n },\r\n },\r\n});\r\n\r\nclass UnStyledScrollbar extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n this.unmounted = false;\r\n this.pgridView = props.pgridView;\r\n this.state = { bottom: '0', positionStatic: false };\r\n }\r\n\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n render() {\r\n if (this.props.pgridView) {\r\n const $table = this.props.pgridView.$el.find('.table-container');\r\n if ($table.length > 0) {\r\n delay(() => {\r\n if (this.unmounted) {\r\n return;\r\n }\r\n\r\n let bottom;\r\n let positionStatic;\r\n const $tfoot = $table.find('tfoot');\r\n\r\n if ($tfoot && $tfoot.offset().top !== 0) { // if tfoot visible\r\n bottom = $tfoot.height() - VIRTUAL_SCROLLBAR_HEIGHT;\r\n } else {\r\n bottom = 'auto';\r\n }\r\n if ($tfoot.children().length === 0) { // if tfoot has no child\r\n positionStatic = 'static';\r\n }\r\n\r\n if (bottom !== this.state.bottom || this.state.positionStatic !== positionStatic) {\r\n this.setState({ bottom, positionStatic });\r\n }\r\n }, 100);\r\n }\r\n }\r\n\r\n const fixedBottomOffset = this.props.containerOverflowX ? SCROLLBAR_HEIGHT : 0;\r\n\r\n const parentStyle = defaults(\r\n { display: this.props.shouldDisplay ? 'block' : 'none' },\r\n { position: this.props.positionFixed ? 'fixed' : this.state.positionStatic ? 'static' : 'absolute' },\r\n { bottom: this.props.positionFixed ? fixedBottomOffset : this.state.bottom },\r\n { width: this.props.width }\r\n );\r\n\r\n return (\r\n \r\n
\r\n {this.props.children}\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nUnStyledScrollbar.propTypes = {\r\n children: PropTypes.object.isRequired,\r\n pgridView: PropTypes.object,\r\n classes: PropTypes.object.isRequired,\r\n shouldDisplay: PropTypes.bool,\r\n positionFixed: PropTypes.bool,\r\n gridViewWidth: PropTypes.number,\r\n width: PropTypes.number,\r\n containerOverflowX: PropTypes.bool,\r\n gridPaddingLeft: PropTypes.number,\r\n};\r\n\r\nUnStyledScrollbar.defaultProps = {\r\n pgridView: null,\r\n shouldDisplay: false,\r\n positionFixed: false,\r\n gridViewWidth: 0,\r\n width: 0,\r\n containerOverflowX: false,\r\n gridPaddingLeft: 32,\r\n};\r\n\r\nexport const Scrollbar = withDefaultStyles(UnStyledScrollbar, getTablePageStyles);\r\n","/* eslint-disable react/sort-comp,react/forbid-prop-types */\r\nimport classNames from 'classnames';\r\nimport React, { Fragment } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n result,\r\n chain,\r\n reduce,\r\n extend,\r\n max,\r\n throttle,\r\n map,\r\n contains,\r\n keys,\r\n isEmpty,\r\n isString,\r\n} from 'underscore';\r\nimport $ from 'jquery';\r\nimport { ResizeObserver as ResizeObserverPollyFill } from '@juggle/resize-observer';\r\n\r\nimport { Constants } from '@bingads-webui-theme-2018/theme-fluent';\r\nimport { DisclaimerBanner } from '@bingads-webui-campaign-react/help';\r\nimport { ContentFooter } from '@bingads-webui-campaign-react/content-footer';\r\nimport { withDefaultStyles } from '@bingads-webui-react/with-default-styles';\r\nimport { getBidLandscapeStyle } from '@bingads-webui-campaign/bid-landscape-style';\r\nimport { getBudgetSuggestionPopupStyle } from '@bingads-webui-campaign/budget-suggestion-popup-style';\r\nimport { getInlineOpportunityStyle } from '@bingads-webui-campaign/inline-opportunity-style';\r\nimport { helpbuttonStyle, uiblockerStyle } from '@bingads-webui-campaign-react/common-styles';\r\nimport { gridPaddingLeft } from '@bingads-webui-campaign-react/grid-view-wrapper';\r\nimport { getHeightIncludeAbsolutePositionedElements } from '@bingads-webui-campaign-react/virtual-scrollbar-recalculate-trigger';\r\nimport { Scrollbar } from './scrollbar';\r\n\r\nconst SCROLLBAR_WIDTH = 17;\r\n\r\nconst getShadowWidthOutofYBorder = ($el) => {\r\n const boxShadow = $el.css('box-shadow');\r\n if (boxShadow === 'none') {\r\n return 0;\r\n }\r\n\r\n const pixels = map(boxShadow.match(/([+-.0-9]+)(?=px)/g), v => Number(v));\r\n // only handle one shadow\r\n // offset-y + blur radius + spread radius\r\n return pixels[1] + pixels[2] + pixels[3];\r\n};\r\n\r\nconst getTableView = (props) => {\r\n const p$gridViewContainer = props.backboneGridView || props.pgridView;\r\n const tableView = result(p$gridViewContainer, '_tableView') ||\r\n chain(p$gridViewContainer)\r\n .result('grid')\r\n .result('gridView')\r\n .result('_tableView')\r\n .value() ||\r\n chain(p$gridViewContainer)\r\n .result('grid')\r\n .result('grid')\r\n .result('gridView')\r\n .result('_tableView')\r\n .value();\r\n\r\n return tableView;\r\n};\r\n\r\nconst getTableWidth = ($table) => {\r\n const tableWidth = reduce(\r\n $table.find('.column-header').toArray(),\r\n (memo, i) => memo + i.getBoundingClientRect().width,\r\n 0\r\n );\r\n return tableWidth;\r\n};\r\n\r\nconst getTablePageStyles = (_, { palette = {} }) => extend(\r\n {\r\n pageContainer: {\r\n display: 'flex',\r\n flex: '1 0 1px',\r\n flexDirection: 'column',\r\n overflow: 'auto',\r\n },\r\n gridContainer: {\r\n overflowX: 'hidden',\r\n overflowY: 'hidden',\r\n },\r\n gridViewContainer: {\r\n marginRight: 15,\r\n },\r\n contentFooter: {\r\n display: 'flex',\r\n flexDirection: 'column-reverse',\r\n width: '100%',\r\n position: 'static',\r\n marginTop: 'auto',\r\n },\r\n resizeMarker: {\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n bottom: 0,\r\n right: 0,\r\n zIndex: '-1',\r\n visibility: 'hidden',\r\n },\r\n },\r\n {\r\n '@global': extend(\r\n uiblockerStyle({ palette }),\r\n getBidLandscapeStyle(palette),\r\n getBudgetSuggestionPopupStyle(palette),\r\n getInlineOpportunityStyle(palette),\r\n helpbuttonStyle({ palette }),\r\n {\r\n // [TODO] Move to theme-fluent/src/components/grid-shared/global.js\r\n '.grid-noresult, .grid-noresult-empty, .noresult': {\r\n display: 'none',\r\n },\r\n '.virtual-scrollbar-container': {\r\n '& .parent-bar': {\r\n backgroundColor: '#f1f1f1',\r\n },\r\n '& .child-bar': {\r\n backgroundColor: '#c1c1c1',\r\n '&:hover': {\r\n backgroundColor: '#a8a8a8',\r\n },\r\n },\r\n },\r\n }\r\n ),\r\n }\r\n);\r\n\r\nclass TablePageContainer extends React.PureComponent {\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n gridPopupHeight: -1,\r\n gridViewWidth: -1,\r\n\r\n // In case of no IntersectionObserver support on browser, use this\r\n // default virtualscrollbar state, position: fixed, bottom: 0\r\n virtualScrollbarFixed: true,\r\n virtualScrollbarInView: true,\r\n\r\n containerOverflowX: false,\r\n };\r\n\r\n this.gridEventMap = {};\r\n this.lastVirtualScrollLeft = 0;\r\n this.letPopUpScrollHorizontal = false;\r\n\r\n this.viewport = React.createRef();\r\n this.gridAndStickyContainer = React.createRef();\r\n this.topOfGridContainer = React.createRef();\r\n this.stickyContainer = React.createRef();\r\n this.gridAndDisclaimContainer = React.createRef();\r\n\r\n // Use the feature of 'IntersectionObserver' to update the horizontal virtual scrollbar\r\n this.topMarker = { el: null, isInView: null };\r\n this.bottomMarker = { el: null, isInView: null, isHiddenInView: null };\r\n\r\n if (window && 'IntersectionObserver' in window) {\r\n this.intersectionObserver = new IntersectionObserver(this.handleIntersectionChange.bind(this), {\r\n root: null,\r\n rootMargin: '0px',\r\n threshold: [0, 1],\r\n });\r\n } else {\r\n // All supported browsers are providing this feature, this is a fallback for backword compatibility\r\n this.intersectionObserver = null;\r\n }\r\n\r\n this.resizeMarker = React.createRef();\r\n this.lastResizerWidth = 0;\r\n if (window && 'ResizeObserver' in window) {\r\n this.resizeObserver = new ResizeObserver(throttle(this.handleResizeChange.bind(this), 250));\r\n } else {\r\n // All supported browsers are providing this feature, if not, switch to polly fill\r\n this.resizeObserver = new ResizeObserverPollyFill(throttle(this.handleResizeChange.bind(this), 250));\r\n }\r\n\r\n const SMALL_PADDING_LEFT_CLASS = 'small-padding-left';\r\n let shouldUseSmallPadding = false;\r\n if (isString(this.props.customClasses.tablePageContainer)) {\r\n shouldUseSmallPadding = this.props.customClasses.tablePageContainer.includes(SMALL_PADDING_LEFT_CLASS);\r\n } else {\r\n shouldUseSmallPadding = contains(this.props.customClasses.tablePageContainer, SMALL_PADDING_LEFT_CLASS);\r\n }\r\n\r\n this.paddingLeft = shouldUseSmallPadding ? 0 : gridPaddingLeft;\r\n }\r\n\r\n getChildBarScrollLeftValue() {\r\n if (this.state.gridViewWidth === -1) {\r\n return 0;\r\n }\r\n const childBar = $('.child-bar');\r\n // align with scrollbar;\r\n const viewWidth = this.state.gridViewWidth + this.paddingLeft + SCROLLBAR_WIDTH;\r\n\r\n if (childBar) {\r\n const parentWidth = this.state.stickyTopOfGridWidth;\r\n const childOffset = childBar.position().left;\r\n return (childOffset / parentWidth) * viewWidth;\r\n }\r\n return 0;\r\n }\r\n\r\n handleResizeChange(entries) {\r\n // For now, we only observe one entry and we only compare one threshold.\r\n const entry = entries[0];\r\n const threshold = this.props.tablePageMinWidth;\r\n\r\n // Decide whether to adjust virtual scrollbar\r\n const { width } = entry.contentRect;\r\n if ((this.lastResizerWidth === 0 || this.lastResizerWidth >= threshold) && width < threshold) {\r\n this.setState({\r\n containerOverflowX: true,\r\n });\r\n }\r\n\r\n if (this.lastResizerWidth < threshold && width >= threshold) {\r\n this.setState({\r\n containerOverflowX: false,\r\n });\r\n }\r\n\r\n this.lastResizerWidth = width;\r\n\r\n // notify gridView\r\n // FIXME: the below logic is also used by inline chart, we should have other ways to trigger the grid re-render\r\n const p$gridViewContainer = this.props.backboneGridView || this.props.pgridView;\r\n if (p$gridViewContainer) {\r\n const tableView = getTableView(this.props);\r\n if (tableView) {\r\n tableView.trigger('didChangeBound'); // eslint-disable-line no-underscore-dangle\r\n }\r\n }\r\n\r\n if (this.viewport && this.viewport.current) {\r\n let event;\r\n const eventName = 'scroll';\r\n if (typeof Event === 'function') {\r\n event = new Event(eventName);\r\n } else {\r\n // IE 11 patch\r\n event = document.createEvent('Event');\r\n event.initEvent(eventName, false, false);\r\n }\r\n\r\n this.viewport.current.dispatchEvent(event);\r\n }\r\n }\r\n\r\n handleIntersectionChange(entries) {\r\n let handleScrollbar = false;\r\n\r\n entries.forEach((entry) => {\r\n if (entry.target && entry.target === this.topMarker.el) {\r\n // Sometimes the top marker (the thead) has zero intersection height, which will cause the intersectionRation to be 0\r\n this.topMarker.isInView = entry.isIntersecting; // (entry.intersectionRatio !== 0);\r\n\r\n handleScrollbar = true;\r\n }\r\n if (entry.target && entry.target === this.bottomMarker.el) {\r\n this.bottomMarker.isInView = (entry.intersectionRatio !== 0);\r\n this.bottomMarker.isHiddenInView = false;\r\n\r\n handleScrollbar = true;\r\n }\r\n });\r\n\r\n if (handleScrollbar) {\r\n this.handleScrollbar();\r\n }\r\n }\r\n\r\n handleScrollbar() {\r\n if (this.bottomMarker.isInView) {\r\n // Append the scrollbar at the end of the table\r\n this.setState({\r\n virtualScrollbarFixed: false,\r\n virtualScrollbarInView: true,\r\n });\r\n } else if (this.topMarker.isInView) {\r\n // Detach the scrollbar and make it fixed, with bottom: 0\r\n this.setState({\r\n virtualScrollbarFixed: true,\r\n virtualScrollbarInView: true,\r\n });\r\n } else {\r\n // The grid is completely pushed out of viewport by top of grid panel, hide scrollbar.\r\n // Note: it is also possible that the bottom marker element is hidden (display: none)\r\n // we will get a chance to evaluate that again before rendering.\r\n this.setState({\r\n virtualScrollbarInView: false,\r\n });\r\n }\r\n }\r\n\r\n handlePopup(prevPopupHeight) {\r\n const popupHeight = this.getInlineEditPopupHeight();\r\n if (!prevPopupHeight || popupHeight !== prevPopupHeight) {\r\n this.setState({ gridPopupHeight: popupHeight });\r\n }\r\n if (this.letPopUpScrollHorizontal) {\r\n this.onScrollbarsViewUpdate();\r\n }\r\n }\r\n\r\n handleScroll(prevState = {}) {\r\n const p$gridViewContainer = this.props.backboneGridView || this.props.pgridView;\r\n if (p$gridViewContainer) {\r\n // when parentElement is null, grid view is not in dom yet.\r\n // Calling getBoundingClientRect will cause unspecified error in IE.\r\n // no need to handle scroll at this moment.\r\n if (p$gridViewContainer.$el.get(0).parentElement === null) {\r\n return;\r\n }\r\n\r\n const viewportRect = this.viewport.current.getBoundingClientRect();\r\n const topOfGridRect = this.topOfGridContainer.current.getBoundingClientRect();\r\n const gridAndStickyRect = this.gridAndStickyContainer.current.getBoundingClientRect();\r\n const stickyContainer = this.stickyContainer.current.getBoundingClientRect();\r\n\r\n // we have two different modes for positioning sticky top of grid content depending on scroll position\r\n // check here if the sticky top of grid content would have already been visible in the viewport without\r\n // sticky behavior (just based on element placement)\r\n const shouldAdjustStickyTopOfGrid = gridAndStickyRect.top < viewportRect.top;\r\n\r\n\r\n // only display virtual scrollbar if grid has horizontal overflow and...\r\n const tableWidth = getTableWidth(p$gridViewContainer.$('table')); // Sovle the Mac Safari issue\r\n const gridViewHasHorizontalOverflow = Math.round(tableWidth) > Math.round(viewportRect.width) - this.paddingLeft;\r\n let emptyHeight = Math.round(viewportRect.height) - Math.round(gridAndStickyRect.height) - Math.round(topOfGridRect.height);\r\n emptyHeight = shouldAdjustStickyTopOfGrid ? emptyHeight + stickyContainer.height : emptyHeight;\r\n const gridViewHasVerticalOverflow = emptyHeight < 0;\r\n\r\n const newState = {\r\n stickyTopOfGridTopOffset: shouldAdjustStickyTopOfGrid ? viewportRect.top : 0,\r\n stickyTopOfGridPosition: shouldAdjustStickyTopOfGrid ? 'fixed' : 'relative',\r\n stickyTopOfGridWidth: Math.floor(viewportRect.width - (gridViewHasVerticalOverflow ? SCROLLBAR_WIDTH : 0)),\r\n stickyTopOfGridHeight: stickyContainer.height,\r\n gridViewHasHorizontalOverflow,\r\n gridViewHasVerticalOverflow,\r\n shouldAdjustStickyTopOfGrid,\r\n };\r\n\r\n const scrollStateKeys = keys(newState);\r\n\r\n const modifiedState = reduce(scrollStateKeys, (memo, stateKey) => {\r\n if (prevState[stateKey] !== newState[stateKey]) {\r\n memo[stateKey] = newState[stateKey]; // eslint-disable-line no-param-reassign\r\n }\r\n\r\n return memo;\r\n }, {});\r\n\r\n if (!isEmpty(modifiedState)) {\r\n this.setState(modifiedState);\r\n }\r\n }\r\n\r\n // Also adjust the grid+disclaimer height based on popupheight.\r\n this.handlePopup(prevState.gridPopupHeight);\r\n }\r\n\r\n componentDidMount() {\r\n if (this.resizeObserver && this.resizeMarker && this.resizeMarker.current) {\r\n this.resizeObserver.observe(this.resizeMarker.current);\r\n }\r\n this.setScrollPosition();\r\n this.handleScroll();\r\n $(this.viewport.current).on('resizeContainerBasedOnPopupHeight', (event, options) => {\r\n // Assume here is the reset,\r\n this.letPopUpScrollHorizontal = options ? options.letPopUpScrollHorizontal : false;\r\n if (this.letPopUpScrollHorizontal) {\r\n this.lastVirtualScrollLeft = this.getChildBarScrollLeftValue();\r\n }\r\n this.handlePopup();\r\n });\r\n }\r\n\r\n componentWillUnmount() {\r\n const p$gridView = (this.props.backboneGridView && this.props.backboneGridView.grid && this.props.backboneGridView.grid.gridView) || this.props.pgridView;\r\n if (p$gridView) {\r\n p$gridView.off('didUpdate');\r\n }\r\n\r\n if (this.intersectionObserver) {\r\n if (this.topMarker.el) {\r\n this.intersectionObserver.unobserve(this.topMarker.el);\r\n }\r\n\r\n if (this.bottomMarker.el) {\r\n this.intersectionObserver.unobserve(this.bottomMarker.el);\r\n }\r\n\r\n this.intersectionObserver = null;\r\n }\r\n\r\n if (this.resizeObserver && this.resizeMarker && this.resizeMarker.current) {\r\n this.resizeObserver.unobserve(this.resizeMarker.current);\r\n }\r\n\r\n $(this.viewport.current).off('resizeContainerBasedOnPopupHeight');\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n if (this.state.stickyTopOfGridPosition === 'fixed' && prevState.stickyTopOfGridPosition !== 'fixed') {\r\n const stickyContainer = this.stickyContainer.current.getBoundingClientRect();\r\n this.shiftThePopUp(stickyContainer.height);\r\n } else if (this.state.stickyTopOfGridPosition !== 'fixed' && prevState.stickyTopOfGridPosition === 'fixed') {\r\n const stickyContainer = this.stickyContainer.current.getBoundingClientRect();\r\n this.shiftThePopUp(-stickyContainer.height);\r\n }\r\n this.setScrollPosition(prevProps);\r\n this.handleScroll(prevState);\r\n }\r\n\r\n onScrollbarsViewUpdate() {\r\n const $popup = $(this.props.inlineEditPopupSelector);\r\n const currentLeft = this.getChildBarScrollLeftValue();\r\n if ($popup.length) {\r\n const cssLeft = parseFloat($popup.css('left'));\r\n const newLeft = cssLeft - (currentLeft - this.lastVirtualScrollLeft);\r\n $popup.css('left', `${newLeft}px`);\r\n }\r\n this.lastVirtualScrollLeft = currentLeft;\r\n }\r\n\r\n shiftThePopUp(height) {\r\n let $popup = $(this.props.inlineEditPopupSelector);\r\n if (!$popup.attr('style')) {\r\n $popup = $(this.props.inlineEditPopupSelector).closest('[style*=\"absolute\"]');\r\n }\r\n if ($popup.length) {\r\n const cssTop = parseFloat($popup.css('top'));\r\n const newTop = cssTop + height;\r\n $popup.css('top', `${newTop}px`);\r\n }\r\n }\r\n\r\n setScrollPosition(prevProps) {\r\n if (this.props.forceResetScrollFlag !== (prevProps && prevProps.forceResetScrollFlag)) {\r\n this.viewport.current.scrollTop = 0;\r\n }\r\n }\r\n\r\n getInlineEditPopupHeight() {\r\n // TODO: should also check filter editor popup\r\n const popup = document.querySelector(this.props.inlineEditPopupSelector);\r\n const popupHeight = getHeightIncludeAbsolutePositionedElements(popup);\r\n\r\n if (popupHeight) {\r\n const popupTop = $(popup).offset().top - $('.grid-and-disclaim-container').offset().top;\r\n return popupTop + popupHeight + getShadowWidthOutofYBorder($(popup));\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n render() {\r\n const p$gridView = (this.props.backboneGridView && this.props.backboneGridView.grid && this.props.backboneGridView.grid.gridView) || this.props.pgridView;\r\n\r\n if (p$gridView && this.intersectionObserver) {\r\n // Find a chance to initiate the intersection observing\r\n const thead = p$gridView.$('thead').get(0);\r\n if (thead && thead !== this.topMarker.el) {\r\n if (this.topMarker.el) {\r\n this.intersectionObserver.unobserve(this.topMarker.el);\r\n }\r\n this.topMarker.el = thead;\r\n this.intersectionObserver.observe(this.topMarker.el);\r\n }\r\n\r\n const tfoot = p$gridView.$('tfoot').get(0);\r\n if (tfoot && tfoot !== this.bottomMarker.el) {\r\n if (this.bottomMarker.el) {\r\n this.intersectionObserver.unobserve(this.bottomMarker.el);\r\n }\r\n this.bottomMarker.el = tfoot;\r\n this.intersectionObserver.observe(this.bottomMarker.el);\r\n }\r\n }\r\n\r\n if (p$gridView && !this.gridEventMap[p$gridView.cid]) {\r\n p$gridView.on('didUpdate', () => {\r\n const tableWidth = getTableWidth(p$gridView.$el.find('table'));\r\n // // only for safari. The root cause is we should set a width for the fixed-layout table\r\n // window.safari && p$gridView.$el.find('table').css('min-width', tableWidth);\r\n\r\n this.setState({\r\n // get notified when grid width changed by column-resize plugin\r\n gridViewWidth: tableWidth,\r\n });\r\n });\r\n\r\n this.gridEventMap[p$gridView.cid] = true;\r\n }\r\n\r\n const CustomDisclaimerBanner = this.props.CustomDisclaimerBanner || DisclaimerBanner;\r\n\r\n const stickyStyle = { position: this.state.stickyTopOfGridPosition, top: this.state.stickyTopOfGridTopOffset, zIndex: Constants.ZIndexContentComponents.GridToolbar + 1 };\r\n\r\n // Do the final adjustment before rendering the virtual scrollbar\r\n let { virtualScrollbarFixed, virtualScrollbarInView } = this.state;\r\n\r\n if (this.state.shouldAdjustStickyTopOfGrid) {\r\n stickyStyle.width = this.state.stickyTopOfGridWidth;\r\n }\r\n\r\n if (this.intersectionObserver) {\r\n if (!this.bottomMarker.isInView && this.bottomMarker.el) {\r\n // By the time when we handle intersection change, the client rect is not always updated\r\n const bottomMarkerRect = this.bottomMarker.el.getBoundingClientRect();\r\n if (bottomMarkerRect.top === 0 && bottomMarkerRect.height === 0) {\r\n // The 'tfoot' is hidden, no-result is shown\r\n this.bottomMarker.isHiddenInView = true;\r\n\r\n virtualScrollbarFixed = false;\r\n virtualScrollbarInView = true;\r\n }\r\n }\r\n }\r\n\r\n const gridAndDisclaimContainerHeight = this.gridAndDisclaimContainer.current ? this.gridAndDisclaimContainer.current.getBoundingClientRect().height : 0;\r\n\r\n return (\r\n \r\n
\r\n this.handleScroll()}\r\n style={{ minWidth: this.props.tablePageMinWidth }}\r\n >\r\n
\r\n {this.props.topOfGridContent}\r\n
\r\n
\r\n {/* Scrollbar container (of whom grid view is a descendant) is position:relative to allow offseting the virtual scrollbars.\r\n Normal stacking order causes elements who are position:relative to be stacked in the order in which they appear in the DOM, so toolbar will always be\r\n hidden behind the scrollbar container. Setting a z-index here to prevent scrollbar container (i.e. the grid view) from occluding the sticky toolbar */}\r\n
\r\n {this.props.stickyTopOfGridContent}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {this.props.gridView}\r\n
\r\n \r\n
\r\n
\r\n
\r\n {\r\n // customer-scope grids don't have timeZone info\r\n // Disclaimer banner will show if either timeZone or CustomDisclaimerBanner valid in props\r\n (this.props.timeZone || this.props.CustomDisclaimerBanner) && (\r\n
\r\n \r\n
\r\n )\r\n }\r\n
\r\n
\r\n {!this.props.disableFooter &&\r\n
\r\n \r\n
\r\n }\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nTablePageContainer.propTypes = {\r\n topOfGridContent: PropTypes.node,\r\n stickyTopOfGridContent: PropTypes.node,\r\n classes: PropTypes.object.isRequired,\r\n customClasses: PropTypes.object,\r\n timeZone: PropTypes.number,\r\n gridView: PropTypes.object.isRequired,\r\n backboneGridView: PropTypes.object,\r\n pgridView: PropTypes.object,\r\n forceResetScrollFlag: PropTypes.bool,\r\n tablePageMinWidth: PropTypes.number,\r\n disableFooter: PropTypes.bool,\r\n CustomDisclaimerBanner: PropTypes.elementType,\r\n inlineEditPopupSelector: PropTypes.string,\r\n};\r\n\r\nTablePageContainer.defaultProps = {\r\n customClasses: {},\r\n topOfGridContent: null,\r\n backboneGridView: null,\r\n pgridView: null,\r\n forceResetScrollFlag: false,\r\n tablePageMinWidth: 1032,\r\n timeZone: null,\r\n disableFooter: false,\r\n CustomDisclaimerBanner: null,\r\n inlineEditPopupSelector: '.grid-and-disclaim-container [role=dialog]',\r\n stickyTopOfGridContent: null,\r\n};\r\n\r\n\r\nexport const StyledTablePageContainer = withDefaultStyles(TablePageContainer, getTablePageStyles);\r\n","import { isFunction, isUndefined, has, defer, isEmpty, extend } from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Promise from 'bluebird';\r\n\r\nimport { getToolbarPlugin } from '@bingads-webui-campaign-react/toolbar-plugin';\r\nimport { ToolbarContainer } from '@bingads-webui-campaign-react/toolbar-container';\r\nimport { getCrossPageSelectPlugin } from '@bingads-webui-campaign-react/cross-page-select-plugin';\r\n/* global Map */\r\n// Ad-hoc synchronization\r\nclass Latch {\r\n constructor() {\r\n this.onInitialized = new Promise((resolve) => {\r\n this.resolveOnInitialized = () => {\r\n this.isInitialized = true;\r\n resolve();\r\n };\r\n });\r\n this.isInitialized = false;\r\n this.isScheduled = {};\r\n }\r\n\r\n release() {\r\n return this.resolveOnInitialized();\r\n }\r\n\r\n schedule(callback) {\r\n if (this.isInitialized) return callback();\r\n if (has(this.isScheduled, callback)) return null;\r\n\r\n this.isScheduled[callback] = true;\r\n\r\n return this.onInitialized.then(() => defer(callback));\r\n }\r\n}\r\n\r\nexport const withTablePageStateManager = ({ getToolbarConfig }) =>\r\n (WrappedComponent) => {\r\n class GridPageStateManager extends React.PureComponent {\r\n static propTypes = {\r\n permissions: PropTypes.shape({}).isRequired,\r\n scope: PropTypes.shape({\r\n values: PropTypes.shape({}),\r\n location: PropTypes.shape({\r\n pathname: PropTypes.string,\r\n }),\r\n }).isRequired,\r\n siteMap: PropTypes.arrayOf(PropTypes.shape({\r\n id: PropTypes.string,\r\n })).isRequired,\r\n i18n: PropTypes.shape({\r\n getString: PropTypes.func,\r\n }).isRequired,\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n this.initial(props);\r\n this.unmounted = false;\r\n }\r\n\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n onGridInjected = ({ deselectAll, ...rest }) => {\r\n this.deselectAll = deselectAll;\r\n this.lazyInjected = rest;\r\n\r\n this.lazyInjected.backboneGridView.once('willReload', () => {\r\n this.onInitialized.release();\r\n });\r\n };\r\n\r\n onClearSelection = () => {\r\n this.setState({\r\n showToolbarSelected: false,\r\n showToolbarUnselected: true,\r\n });\r\n\r\n if (isFunction(this.deselectAll)) {\r\n this.deselectAll();\r\n }\r\n };\r\n\r\n initial(props) {\r\n const { scope } = props;\r\n const crossPageSelectPlugin = getCrossPageSelectPlugin({\r\n updateGridSelectionState: this.updateGridSelectionState,\r\n });\r\n let isOpenCreatePanel = false;\r\n isOpenCreatePanel = !!scope.values.isOpenCreatePanel;\r\n if (isOpenCreatePanel) {\r\n delete scope.values.isOpenCreatePanel;\r\n scope.history.replace({\r\n pathname: scope.history.location.pathname,\r\n search: scope.stringify(),\r\n });\r\n }\r\n const { onSelectCrossPage } = crossPageSelectPlugin;\r\n const { toolbarSelectedConfig, toolbarUnselectedConfig, toolbarDynamicSelectedConfigCallback } = getToolbarConfig({\r\n ...props,\r\n isOpenCreatePanel,\r\n updateGridOptions: this.updateGridOptions.bind(this),\r\n onSelectCrossPage,\r\n showTopOfGridPanel: this.showTopOfGridPanel,\r\n lazyInject: () => this.lazyInjected, // call back to get lazy created dependencies, such as backboneGridView, filterService\r\n });\r\n\r\n this.crossPageSelectPlugin = crossPageSelectPlugin;\r\n this.toolbarSelectedConfig = toolbarSelectedConfig;\r\n this.toolbarUnselectedConfig = toolbarUnselectedConfig;\r\n this.toolbarDynamicSelectedConfigCallback = toolbarDynamicSelectedConfigCallback;\r\n this.toolbarDynamicSelectedConfig = new Map();\r\n this.initialSetGridNum = true;\r\n if (!this.state) {\r\n this.state = {\r\n isOpenCreatePanel,\r\n forceHideInlineChart: false,\r\n forceHideToolbar: false,\r\n panelView: null,\r\n showInlineChart: true,\r\n showToolbarSelected: false,\r\n showToolbarUnselected: true,\r\n showTopGridPanel: false,\r\n toolbarSelectedConfig: this.toolbarSelectedConfig,\r\n toolbarUnselectedConfig: this.toolbarUnselectedConfig,\r\n forceResetScrollFlag: false,\r\n selectionCount: 0,\r\n totalCount: 0,\r\n isMultiPage: false,\r\n isSinglePageAllSelected: false,\r\n isCrossPageAllSelected: false,\r\n };\r\n } else {\r\n this.setState({\r\n toolbarSelectedConfig: this.toolbarSelectedConfig,\r\n toolbarUnselectedConfig: this.toolbarUnselectedConfig,\r\n });\r\n }\r\n this.createToolbar();\r\n }\r\n\r\n updateGridOptions(gridOptions) {\r\n this.setState({\r\n gridOptions,\r\n });\r\n }\r\n\r\n createToolbar() {\r\n this.toolbarPlugin = getToolbarPlugin({\r\n overrideWith: this.showTopOfGridPanel,\r\n resetVisibility: ({ forceHideToolbar }) => {\r\n this.setState({\r\n forceHideToolbar,\r\n showTopGridPanel: forceHideToolbar,\r\n });\r\n },\r\n resetGraphVisibility: () => {\r\n this.setState({\r\n forceHideInlineChart: false,\r\n });\r\n },\r\n resetToolbarMode: ({ showToolbarSelected, showToolbarUnselected }) => {\r\n this.setState({\r\n showToolbarSelected,\r\n showToolbarUnselected,\r\n });\r\n },\r\n toolbarConfig: {\r\n toolbarSelectedConfig: this.state.toolbarSelectedConfig,\r\n // this.toolbarDynamicSelectedConfigCallback can mute so trigger it as lambda expression from here to ensure newest function is always used\r\n toolbarDynamicSelectedConfigCallback: isFunction(this.toolbarDynamicSelectedConfigCallback) && (params => this.toolbarDynamicSelectedConfigCallback(params)),\r\n toolbarUnselectedConfig: this.state.toolbarUnselectedConfig,\r\n },\r\n updateToolbarDynamicSelectedConfig: ({ dynamicSelectedConfig }) => {\r\n this.toolbarDynamicSelectedConfig = dynamicSelectedConfig;\r\n this.updateToolbar();\r\n },\r\n updateToolbar: this.updateToolbar,\r\n });\r\n\r\n this.onInitialized = new Latch();\r\n }\r\n\r\n updateToolbar = () => {\r\n const doUpdate = () => {\r\n if (this.unmounted) {\r\n return;\r\n }\r\n\r\n // Merge the selected config with the dynamic selected config. Map.set() adds or updates an element so it will\r\n // respect the order of elements if the key existed previously from selected config, otherwise add it to the end.\r\n const toolbarSelectedConfigMerged = new Map();\r\n this.toolbarSelectedConfig.forEach((value, key) => toolbarSelectedConfigMerged.set(key, value));\r\n this.toolbarDynamicSelectedConfig.forEach((dynamicValue, key) => {\r\n const mergedValue = extend({}, toolbarSelectedConfigMerged.get(key), dynamicValue);\r\n toolbarSelectedConfigMerged.set(key, mergedValue);\r\n });\r\n\r\n const toolbarSelectedConfig = new Map();\r\n const toolbarUnselectedConfig = new Map();\r\n toolbarSelectedConfigMerged.forEach((value, key) => {\r\n if (!isEmpty(value)) {\r\n toolbarSelectedConfig.set(key, value);\r\n }\r\n });\r\n this.toolbarUnselectedConfig.forEach((value, key) => toolbarUnselectedConfig.set(key, value));\r\n this.setState({\r\n toolbarSelectedConfig,\r\n toolbarUnselectedConfig,\r\n });\r\n };\r\n\r\n this.onInitialized.schedule(doUpdate);\r\n };\r\n\r\n resetToolbarVisibility = ({ forceHideToolbar }) => {\r\n this.setState({ forceHideToolbar });\r\n };\r\n\r\n showTopOfGridPanel = (viewInstance, config = {}) => {\r\n if (viewInstance) {\r\n this.setState(prevState => ({\r\n panelView: viewInstance,\r\n showTopGridPanel: true,\r\n forceHideInlineChart: true,\r\n forceHideToolbar: config.forceHideToolbar !== undefined ? config.forceHideToolbar : true,\r\n forceResetScrollFlag: config.forceResetScrollFlag !== undefined ? config.forceResetScrollFlag : !prevState.forceResetScrollFlag,\r\n showTopGridPanelAndContent: config.showTopGridPanelAndContent !== undefined ? config.showTopGridPanelAndContent : false,\r\n }));\r\n } else {\r\n this.setState(prevState => ({\r\n panelView: null,\r\n showTopGridPanel: false,\r\n forceHideInlineChart: false,\r\n forceHideToolbar: false,\r\n forceResetScrollFlag: config.forceResetScrollFlag !== undefined ? config.forceResetScrollFlag : !prevState.forceResetScrollFlag,\r\n showTopGridPanelAndContent: false,\r\n }));\r\n }\r\n };\r\n\r\n showInlineChartView = () => {\r\n this.setState({ showInlineChart: true });\r\n };\r\n\r\n updateGridSelectionState = ({\r\n selectionCount,\r\n totalCount,\r\n isMultiPage,\r\n isSinglePageAllSelected,\r\n isCrossPageAllSelected,\r\n }) => {\r\n const doUpdate = () => {\r\n if (this.unmounted) {\r\n return;\r\n }\r\n\r\n // for performance consideration, we do not need to update totalCount if no rows is selected\r\n const newTotal = selectionCount === 0 && this.initialSetGridNum ? 0 : totalCount;\r\n if (selectionCount || totalCount) {\r\n this.initialSetGridNum = false;\r\n }\r\n this.setState({\r\n selectionCount,\r\n totalCount: newTotal,\r\n isMultiPage,\r\n isSinglePageAllSelected,\r\n isCrossPageAllSelected,\r\n });\r\n };\r\n\r\n this.onInitialized.schedule(doUpdate);\r\n };\r\n\r\n updateSelectedToolbarConfig = (newSelectedConfig) => {\r\n this.toolbarSelectedConfig = newSelectedConfig;\r\n this.updateToolbar();\r\n };\r\n\r\n updateUnselectedToolbarConfig = (newUnselectedConfig) => {\r\n this.toolbarUnselectedConfig = newUnselectedConfig;\r\n this.updateToolbar();\r\n };\r\n\r\n /**\r\n * This will force all the config toolbar (selected/unselected/dynamicSelectedCallback) to get updated by\r\n * passing the page newest props in parameter of the getToolbarConfig function and reload current configuration.\r\n * @param {object} newProps It can also accept some object to merge to current props so getToolbarConfig(context) is more rich\r\n * @return {void}\r\n */\r\n forceInitToolbarConfig = (newProps = {}) => {\r\n this.initial({ ...this.props, ...newProps });\r\n this.updateToolbar();\r\n };\r\n\r\n renderToolbarContainer = (options = {}) => {\r\n const {\r\n forceHideToolbar,\r\n isCrossPageAllSelected,\r\n isMultiPage,\r\n isSinglePageAllSelected,\r\n selectionCount,\r\n showToolbarSelected,\r\n showToolbarUnselected,\r\n toolbarSelectedConfig,\r\n toolbarUnselectedConfig,\r\n totalCount,\r\n } = this.state;\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n render() {\r\n const {\r\n showInlineChart,\r\n forceHideInlineChart,\r\n showTopGridPanel,\r\n showTopGridPanelAndContent,\r\n } = this.state;\r\n\r\n return (\r\n \r\n );\r\n }\r\n }\r\n\r\n return GridPageStateManager;\r\n };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { I18nContext } from '@bingads-webui-react/i18n-context';\r\n\r\n// Since there's not a way of appending to I18nModel right now\r\n// using this method. Will talk with yuzhong about support for this\r\nconst getData = i18n => i18n.p$data.value().resource.data;\r\n\r\nconst mergeI18n = (target, parentI18n) => {\r\n Object.assign(getData(target), getData(parentI18n));\r\n};\r\n\r\n/* This is to merge the parent and child i18n(App and Feature) */\r\nexport const withMergedI18n = (Component, childI18n) => {\r\n const HoC = props => (\r\n \r\n {(parentI18n = props.i18n) => {\r\n mergeI18n(childI18n, parentI18n);\r\n return (\r\n \r\n \r\n \r\n );\r\n }}\r\n \r\n );\r\n\r\n HoC.propTypes = {\r\n i18n: PropTypes.shape({}),\r\n };\r\n\r\n HoC.defaultProps = {\r\n i18n: undefined,\r\n };\r\n\r\n return HoC;\r\n};\r\n","import Promise from 'bluebird';\r\n// eslint-disable-next-line\r\nimport { loadMap } from '@bingads-webui-campaign-legacy/dashboard-page/service/load-map';\r\nimport { withMergedI18n } from './i18n-utils';\r\n\r\nfunction loadLegacyI18n({\r\n hasMultipleCultures = false,\r\n}) {\r\n const loadLegacyI18nWebpack = hasMultipleCultures ? window.globalLegacyI18n.loadI18nWithMultipleCultures : window.globalLegacyI18n.loadI18n;\r\n\r\n return loadLegacyI18nWebpack();\r\n}\r\n\r\nfunction loadGoogleApi() {\r\n return new Promise((resolve) => {\r\n // eslint-disable-next-line no-undef\r\n __non_webpack_require__([\r\n 'ext/google/gsi',\r\n ], () => {\r\n resolve();\r\n });\r\n });\r\n}\r\n\r\nexport function loadPageWebpack({\r\n importFeature,\r\n importL10n,\r\n hasLegacyI18n = false,\r\n hasMultipleCultures = false,\r\n hasBingMap = false,\r\n hasGoogleApi = false,\r\n}) {\r\n const nop = Promise.resolve();\r\n const FeaturePromise = Promise.all([\r\n importL10n(),\r\n hasLegacyI18n ? loadLegacyI18n({ hasMultipleCultures }) : nop,\r\n hasBingMap ? loadMap() : nop,\r\n hasGoogleApi ? loadGoogleApi() : nop,\r\n ])\r\n .then(result => result[0].default)\r\n .then(i18n => importFeature()\r\n .then(Feature => withMergedI18n(Feature, i18n)));\r\n\r\n return FeaturePromise;\r\n}\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\n\r\nimport dateUtil from '@bingads-webui-component-legacy/humanize/date';\r\nimport appState from '@bingads-webui-component-legacy/state/index';\r\nimport { getSegPreference, getSegType } from '@bingads-webui-component-legacy/bingads-grid/service/segmentation-preferences';\r\nimport segmentTimeChecker from '@bingads-webui-component-legacy/bingads-grid/shared/timeRangeChecker';\r\nimport { fetchPaginationConfig } from '@bingads-webui-component-legacy/bingads-grid/service/fetch-pagination';\r\nimport appConfig from '@bingads-webui-component-legacy/config/index';\r\nimport * as preferenceStoreFactory from '@bingads-webui-component-legacy/bingads-grid/service/filter-preferences';\r\nimport * as customColumnPreference from '@bingads-webui-component-legacy/bingads-grid/service/custom-column-preferences';\r\nimport dataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\nimport jsData from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport sessionStore from '@bingads-webui-component-legacy/js-data-storage/session-storage';\r\nimport azureUrlRewrite from '@bingads-webui-static-legacy/app/component/azureUrlRewrite';\r\nimport { Account } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport CacheService from '@bingads-webui-static-legacy/cache-service';\r\nimport edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\n\r\n\r\nconst accountSchema = Account;\r\nconst schemaI18nCampaign = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\nconst legacyGlobalI18n = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\nconst accountSummaryi18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/accounts-summary');\r\n\r\n\r\nexport const lazyLoadDeps = {\r\n dateUtil,\r\n appState,\r\n getSegPreference,\r\n getSegType,\r\n segmentTimeChecker,\r\n fetchPaginationConfig,\r\n appConfig,\r\n accountSchema,\r\n schemaI18nCampaign,\r\n legacyGlobalI18n,\r\n accountSummaryi18n,\r\n preferenceStoreFactory,\r\n customColumnPreference,\r\n dataContextManager,\r\n jsData,\r\n sessionStore,\r\n azureUrlRewrite,\r\n CacheService,\r\n edm: edmCampaign,\r\n};\r\n","/* eslint-disable import/extensions */\r\n/* eslint-disable import/no-unresolved */\r\n\r\nimport * as alerts from '@bingads-webui-campaign-legacy/alerts-popup/view/alertsPopup';\r\nimport * as urls from '@bingads-webui-campaign-legacy/app/urls';\r\nimport * as stateManagerHelper from '@bingads-webui-campaign-legacy/bingadsgrid/service/state-manager-helper';\r\nimport * as customerHierachyPlugin from '@bingads-webui-campaign-legacy/bingadsgrid/vnext/plugin/customer-hierarchy-plugin';\r\nimport * as inlineDownloadPlugin from '@bingads-webui-campaign-legacy/bingadsgrid/vnext/plugin/inline-download';\r\nimport * as primaryContactsBulkEditPlugin from '@bingads-webui-campaign-legacy/bingadsgrid/vnext/plugin/primary-contacts-bulk-edit-plugin';\r\nimport * as bulkActionAccountsGrid from '@bingads-webui-campaign-legacy/bulk-action-accounts-grid/index';\r\nimport * as bulkTransferAccounts from '@bingads-webui-campaign-legacy/bulk-transfer-accounts/index';\r\nimport * as bulkUnlinkAccounts from '@bingads-webui-campaign-legacy/bulk-unlink-accounts/index';\r\nimport * as qualityScoreClickHandler from '@bingads-webui-campaign-legacy/common-grid-config/column/quality-score/quality-score-click-handler';\r\nimport qualityScoreTemplate from '@bingads-webui-campaign-legacy/common-grid-config/column/quality-score/quality-score-template.pug';\r\nimport sortableHeaderTemplate from '@bingads-webui-campaign-legacy/common-grid-config/column/sortableHeaderTemplate.pug';\r\nimport * as updateFilterSchema from '@bingads-webui-campaign-legacy/common-grid-config/filter/update-filter-schema-for-pilot-features';\r\nimport * as jsDataRawPlugin from '@bingads-webui-campaign-legacy/common-grid-plugins/js-data-raw-data';\r\nimport freqColumnTemplate from '@bingads-webui-campaign-legacy/scheduled-import/template/freq-column.pug';\r\nimport importLogNameTemplate from '@bingads-webui-campaign-legacy/scheduled-import/template/import-log-name.pug';\r\nimport creatorColumnTemplate from '@bingads-webui-campaign-legacy/scheduled-import/template/creator-column.pug';\r\nimport * as importSummaryCol from '@bingads-webui-campaign-legacy/scheduled-import/view/shared-column-configs/import-summary-col';\r\nimport * as singleUnlinkAccounts from '@bingads-webui-campaign-legacy/single-unlink-accounts/index';\r\nimport * as columnChooserPreference from '@bingads-webui-component-legacy/bingads-grid/service/column-chooser-preferences';\r\nimport * as customColumnPreference from '@bingads-webui-component-legacy/bingads-grid/service/custom-column-preferences';\r\nimport * as legacyColumnChooserPreference from '@bingads-webui-component-legacy/bingads-grid/service/legacy-column-chooser-preferences';\r\nimport * as linkedAccountsPreference from '@bingads-webui-component-legacy/bingads-grid/service/linked-accounts-preferences';\r\nimport * as segmentationPreference from '@bingads-webui-component-legacy/bingads-grid/service/segmentation-preferences';\r\nimport * as clientcenterUrlHelper from '@bingads-webui-component-legacy/bingads-grid/shared/clientcenter-url-helper';\r\nimport * as column from '@bingads-webui-component-legacy/bingads-grid/shared/column';\r\nimport * as icons from '@bingads-webui-component-legacy/bingads-grid/shared/icons';\r\nimport * as schemaUtil from '@bingads-webui-component-legacy/bingads-grid/shared/schema-util';\r\nimport config from '@bingads-webui-component-legacy/config/index';\r\nimport * as edmCampaign from '@bingads-webui-component-legacy/edm-campaign/index';\r\nimport * as eventDispatcher from '@bingads-webui-component-legacy/event-dispatcher/index';\r\nimport jsDataCampaign from '@bingads-webui-component-legacy/js-data-campaign/index';\r\nimport * as preferenceService from '@bingads-webui-component-legacy/preference/service/index';\r\nimport state from '@bingads-webui-component-legacy/state/index';\r\nimport instrumentation from '@bingads-webui-static-legacy/instrumentation/index';\r\nimport * as campaignInstrumentation from '@bingads-webui-campaign-legacy/instrumentation/index';\r\nimport legacyRouter from '@bingads-webui-component-legacy/legacy-router/index';\r\nimport * as i18nErrors from '@bingads-webui-component-legacy/api-errors-campaign/index';\r\nimport * as LabelAssociationView from '@bingads-webui-campaign-legacy/common-grid-plugins/label/label-association-view';\r\nimport { Account, AccountInactiveReason } from '@bingads-webui-campaign/campaign-ui-schemas';\r\nimport CacheService from '@bingads-webui-static-legacy/cache-service';\r\nimport SummaryDataContextManager from '@bingads-webui-static-legacy/summary/SummaryDataContextManager';\r\n\r\nimport { lazyLoadDeps } from './performance-lazy-deps';\r\n\r\n\r\nexport { loadInlineChartWithWebpack } from '@bingads-webui-campaign-react/inline-chart-factory-webpack';\r\n\r\nconst i18nGlobal = window.globalLegacyI18n.get('component/i18n/loader!legacy/global');\r\nconst accountSummaryi18n = window.globalLegacyI18n.get('@bingads-webui/i18n-amd-loader!campaignui/feature/accounts-summary');\r\n\r\nconst accountSchema = Account;\r\nconst accountInactiveReasonSchema = AccountInactiveReason;\r\nconst campaignSchema = window.globalLegacyI18n.get('$/schema-i18n!campaign');\r\n\r\nexport const accountsGridLegacyDepsListWebpack = {\r\n '$/i18n!legacy/global': i18nGlobal,\r\n '$/schema!campaign/Account': accountSchema,\r\n '$/schema!campaign/deps/AccountInactiveReason': accountInactiveReasonSchema,\r\n '$/schema-i18n!campaign': campaignSchema,\r\n '@bingads-webui/i18n-amd-loader!campaignui/feature/accounts-summary': accountSummaryi18n,\r\n 'campaignui/feature/alerts-popup/view/alertsPopup': alerts,\r\n 'campaignui/feature/app/urls': urls,\r\n 'campaignui/feature/bingadsgrid/service/state-manager-helper': stateManagerHelper,\r\n 'campaignui/feature/bingadsgrid/vnext/plugin/customer-hierarchy-plugin': customerHierachyPlugin,\r\n 'campaignui/feature/bingadsgrid/vnext/plugin/inline-download': inlineDownloadPlugin,\r\n 'campaignui/feature/bingadsgrid/vnext/plugin/primary-contacts-bulk-edit-plugin': primaryContactsBulkEditPlugin,\r\n 'campaignui/feature/bulk-action-accounts-grid/index': bulkActionAccountsGrid,\r\n 'campaignui/feature/bulk-transfer-accounts/index': bulkTransferAccounts,\r\n 'campaignui/feature/bulk-unlink-accounts/index': bulkUnlinkAccounts,\r\n 'campaignui/feature/common-grid-config/column/quality-score/quality-score-click-handler': qualityScoreClickHandler,\r\n 'campaignui/feature/common-grid-config/column/quality-score/quality-score-template': qualityScoreTemplate,\r\n 'campaignui/feature/common-grid-config/column/sortableHeaderTemplate': sortableHeaderTemplate,\r\n 'campaignui/feature/common-grid-config/filter/update-filter-schema-for-pilot-features': updateFilterSchema,\r\n 'campaignui/feature/common-grid-plugins/js-data-raw-data': jsDataRawPlugin,\r\n 'campaignui/feature/scheduled-import/template/freq-column': freqColumnTemplate,\r\n 'campaignui/feature/scheduled-import/template/import-log-name': importLogNameTemplate,\r\n 'campaignui/feature/scheduled-import/template/creator-column': creatorColumnTemplate,\r\n 'campaignui/feature/scheduled-import/view/shared-column-configs/import-summary-col': importSummaryCol,\r\n 'campaignui/feature/single-unlink-accounts/index': singleUnlinkAccounts,\r\n 'component/bingads-grid/service/column-chooser-preferences': columnChooserPreference,\r\n 'component/bingads-grid/service/custom-column-preferences': customColumnPreference,\r\n 'component/bingads-grid/service/legacy-column-chooser-preferences': legacyColumnChooserPreference,\r\n 'component/bingads-grid/service/linked-accounts-preferences': linkedAccountsPreference,\r\n 'component/bingads-grid/service/segmentation-preferences': segmentationPreference,\r\n 'component/bingads-grid/shared/clientcenter-url-helper': clientcenterUrlHelper,\r\n 'component/bingads-grid/shared/column': column,\r\n 'component/bingads-grid/shared/icons': icons,\r\n 'component/bingads-grid/shared/schema-util': schemaUtil,\r\n 'component/config/index': config,\r\n 'component/edm-campaign/index': edmCampaign,\r\n 'component/event-dispatcher/index': eventDispatcher,\r\n 'component/js-data-campaign/index': jsDataCampaign,\r\n 'component/preference/service/index': preferenceService,\r\n 'component/state/index': state,\r\n 'module/service/instrumentation/index': instrumentation,\r\n 'campaignui/feature/instrumentation/index': campaignInstrumentation,\r\n 'component/legacy-router/index': legacyRouter,\r\n 'component/api-errors-campaign/index': i18nErrors,\r\n 'campaignui/feature/common-grid-plugins/label/label-association-view': LabelAssociationView,\r\n 'Services/CacheService': CacheService,\r\n SummaryDataContextManager,\r\n};\r\n\r\nexport const lazyLoadDep = () => lazyLoadDeps;\r\n\r\nexport const getBulkUnlinkAccounts = () => bulkUnlinkAccounts.default;\r\nexport const getBulkTransferAccounts = () => bulkTransferAccounts.default;\r\nexport const getBulkActionAccountsGrid = () => bulkActionAccountsGrid;\r\nexport const getjsDataCampaign = () => jsDataCampaign;\r\n","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (alertId, href, text) {pug_html = pug_html + \"\\u003Ca\" + (pug.attr(\"href\", href, true, true)+pug.attr(\"onclick\", 'window.App.views.alertCenter.dismiss(\"' + alertId + '\")', true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";}.call(this,\"alertId\" in locals_for_with?locals_for_with.alertId:typeof alertId!==\"undefined\"?alertId:undefined,\"href\" in locals_for_with?locals_for_with.href:typeof href!==\"undefined\"?href:undefined,\"text\" in locals_for_with?locals_for_with.text:typeof text!==\"undefined\"?text:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, viewModel) {pug_mixins[\"previewGrid\"] = pug_interp = function(columns){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showPreview\\\"\\u003E\\u003Cdiv data-bind=\\\"html: changeText\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"if: results().length > 0, visible: results().length > 0\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: previewGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: results\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\" data-bind=\\\"foreach: $data.data\\\"\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index1 = 0, $$l = $$obj.length; pug_index1 < $$l; pug_index1++) {\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index1 in $$obj) {\n $$l++;\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\nvar pageTitle = viewModel.isNewAudienceEnabled ? i18n.getString('AudiencesAssociation_BulkEditAssociation_Audience_Title') : i18n.getString('AudiencesAssociation_BulkEditAssociation_Title');\npug_html = pug_html + (\"\\u003Cdiv class=\\\"panel\\\"\\u003E\\u003Cdiv class=\\\"panel-heading bulkAssociation\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\"\\u003E\" + (pug.escape(null == (pug_interp = pageTitle) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\" + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp));\nvar header1 = i18n.getString('BulkEdit_AudienceAssociation_EntityNameHeader_Campaign')\nvar header2 = i18n.getString('BulkEdit_AudienceAssociation_OldAssociationHeader')\nvar header3 = i18n.getString('BulkEdit_AudienceAssociation_NewAssociationHeader')\npug_mixins[\"previewGrid\"]([header1, header2, header3]);\nvar header5 = i18n.getString('BulkEdit_AudienceAssociation_EntityNameHeader_Campaign')\nvar header6 = i18n.getString('BulkEdit_AudienceAssociation_OldAssociationHeader')\nvar header7 = i18n.getString('BulkEdit_AudienceAssociation_AttemptedAssociationHeader')\npug_mixins[\"errorsGrid\"]([header5, header6, header7], true);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"viewModel\" in locals_for_with?locals_for_with.viewModel:typeof viewModel!==\"undefined\"?viewModel:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (PageContext, i18n) {pug_mixins[\"previewGrid\"] = pug_interp = function(columns){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showPreview\\\"\\u003E\\u003Cdiv data-bind=\\\"html: changeText\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"if: results().length > 0, visible: results().length > 0\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: previewGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: results\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\" data-bind=\\\"foreach: $data.data\\\"\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index1 = 0, $$l = $$obj.length; pug_index1 < $$l; pug_index1++) {\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index1 in $$obj) {\n $$l++;\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this); event.stopPropagation();\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"pull-left control-label\\\" for=\\\"bulkedit-action\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_Action')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-2\\\"\\u003E\\u003Cselect class=\\\"form-control\\\" id=\\\"bulkedit-action\\\" data-bind=\\\"options: actions, optionsText: "Text", optionsValue: "Value", value: selectedAction, disable: isDisabled\\\"\\u003E\\u003C\\u002Fselect\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-inline\\\"\\u003E\\u003Cspan class=\\\"control-label pull-left\\\" id=\\\"bulkedit-budget-label\\\" data-bind=\\\"text: getLifetimeBudgetLabel()\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-6 form-inline\\\" data-bind=\\\"visible: showSetPanel\\\"\\u003E\\u003Cinput class=\\\"bulkEdit-bid form-control\\\" type=\\\"text\\\" aria-labelledby=\\\"bulkedit-budget-label\\\" data-bind=\\\"value: budgetValue, valueUpdate: "input", disable: isDisabled\\\"\\u003E\\u003Cspan class=\\\"control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = PageContext.AccountCurrencyCode) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\npug_mixins[\"popupHelp\"](\"pop_BA_BulkEditBudgetSet\", i18n.getString('BulkEdit_ChangeBudget_SetBudget'), i18n);\npug_html = pug_html + \"\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorMessage\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-7 form-inline\\\" data-bind=\\\"visible: showChangeByPanel\\\"\\u003E\\u003Cinput class=\\\"bulkEdit-bid form-control\\\" type=\\\"text\\\" aria-labelledby=\\\"bulkedit-budget-label\\\" data-bind=\\\"value: budgetValue, valueUpdate: "input", disable: isDisabled\\\"\\u003E\\u003Cselect class=\\\"bulkEdit-units form-control\\\" aria-labelledby=\\\"bulkedit-budget-label\\\" data-bind=\\\"options: units, optionsText: "Text", optionsValue: "Value", value: selectedUnit, disable: isDisabled\\\"\\u003E\\u003C\\u002Fselect\\u003E\\u003Clabel class=\\\"bulkEdit-limit-label checkbox-inline\\\"\\u003E\\u003Cinput class=\\\"bulkEdit-limit\\\" type=\\\"checkbox\\\" data-bind=\\\"css: { checked: useLimitValue }, checked: useLimitValue, disable: isDisabled\\\"\\u003E\\u003Cspan id=\\\"bulkedit-limitbudgetlabel\\\" data-bind=\\\"html: limitBudgetLabelText\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Flabel\\u003E\\u003Cdiv style=\\\"display: inline-block; vertical-align: top;\\\"\\u003E\\u003Cinput class=\\\"bulkEdit-bid form-control\\\" type=\\\"text\\\" aria-labelledby=\\\"bulkedit-limitbudgetlabel\\\" data-bind=\\\"value: limitValue, enable: !isDisabled() ? useLimitValue : false, valueUpdate: "input"\\\"\\u003E\\u003Clabel class=\\\"bulk-edit-currency control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = PageContext.AccountCurrencyCode) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Clabel class=\\\"control-label\\\" data-bind=\\\"visible: showIncreaseBudgetHelp\\\"\\u003E\";\npug_mixins[\"popupHelp\"](\"pop_BA_BulkEditBudgetIncrease\", i18n.getString('AutomatedRules_RuleAuthoring_IncreaseBudget'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Clabel class=\\\"control-label\\\" data-bind=\\\"visible: !showIncreaseBudgetHelp()\\\"\\u003E\";\npug_mixins[\"popupHelp\"](\"pop_BA_BulkEditBudgetDecrease\", i18n.getString('AutomatedRules_RuleAuthoring_DecreaseBudget'), i18n);\npug_html = pug_html + (\"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: limitValueErrorMessage\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorMessage\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\" + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp));\nvar header1 = i18n.getString('BulkEdit_Campaign_EntityNameHeader')\nvar header2 = i18n.getString('BulkEdit_Campaign_OldBudgetHeader')\nvar header3 = i18n.getString('BulkEdit_Campaign_NewBudgetHeader')\npug_mixins[\"previewGrid\"]([header1, header2, header3]);\nvar header5 = i18n.getString('BulkEdit_Campaign_EntityNameHeader')\nvar header6 = i18n.getString('BulkEdit_Campaign_OldBudgetHeader')\nvar header7 = i18n.getString('BulkEdit_Campaign_AttemptedBudgetHeader')\npug_mixins[\"errorsGrid\"]([header5, header6, header7]);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"PageContext\" in locals_for_with?locals_for_with.PageContext:typeof PageContext!==\"undefined\"?PageContext:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (PageContext, i18n) {pug_mixins[\"previewGrid\"] = pug_interp = function(columns){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showPreview\\\"\\u003E\\u003Cdiv data-bind=\\\"html: changeText\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"if: results().length > 0, visible: results().length > 0\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: previewGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: results\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\" data-bind=\\\"foreach: $data.data\\\"\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index1 = 0, $$l = $$obj.length; pug_index1 < $$l; pug_index1++) {\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index1 in $$obj) {\n $$l++;\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this); event.stopPropagation();\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"pull-left control-label\\\" for=\\\"bulkedit-action\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_Action')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-2\\\"\\u003E\\u003Cselect class=\\\"form-control\\\" id=\\\"bulkedit-action\\\" data-bind=\\\"options: actions, optionsText: "Text", optionsValue: "Value", value: selectedAction, disable: isDisabled\\\"\\u003E\\u003C\\u002Fselect\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-inline\\\"\\u003E\\u003Cspan class=\\\"control-label pull-left\\\" id=\\\"bulkedit-budget-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_Campaign_MonthlyCashbackBudget')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-6 form-inline\\\" data-bind=\\\"visible: showSetPanel\\\"\\u003E\\u003Cinput class=\\\"bulkEdit-bid form-control\\\" type=\\\"text\\\" aria-labelledby=\\\"bulkedit-budget-label\\\" data-bind=\\\"value: budgetValue, valueUpdate: "input", disable: isDisabled\\\"\\u003E\\u003Cspan class=\\\"control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = PageContext.AccountCurrencyCode) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\npug_mixins[\"popupHelp\"](\"pop_BA_BulkEditBudgetSet\", i18n.getString('BulkEdit_ChangeBudget_SetBudget'), i18n);\npug_html = pug_html + \"\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorMessage\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-7 form-inline\\\" data-bind=\\\"visible: showChangeByPanel\\\"\\u003E\\u003Cinput class=\\\"bulkEdit-bid form-control\\\" type=\\\"text\\\" aria-labelledby=\\\"bulkedit-budget-label\\\" data-bind=\\\"value: budgetValue, valueUpdate: "input", disable: isDisabled\\\"\\u003E\\u003Cselect class=\\\"bulkEdit-units form-control\\\" aria-labelledby=\\\"bulkedit-budget-label\\\" data-bind=\\\"options: units, optionsText: "Text", optionsValue: "Value", value: selectedUnit, disable: isDisabled\\\"\\u003E\\u003C\\u002Fselect\\u003E\\u003Clabel class=\\\"bulkEdit-limit-label checkbox-inline\\\"\\u003E\\u003Cinput class=\\\"bulkEdit-limit\\\" type=\\\"checkbox\\\" data-bind=\\\"css: { checked: useLimitValue }, checked: useLimitValue, disable: isDisabled\\\"\\u003E\\u003Cspan id=\\\"bulkedit-limitbudgetlabel\\\" data-bind=\\\"html: limitBudgetLabelText\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Flabel\\u003E\\u003Cinput class=\\\"bulkEdit-bid form-control\\\" type=\\\"text\\\" aria-labelledby=\\\"bulkedit-limitbudgetlabel\\\" data-bind=\\\"value: limitValue, enable: !isDisabled() ? useLimitValue : false, valueUpdate: "input"\\\"\\u003E\\u003Clabel class=\\\"bulk-edit-currency control-label\\\"\\u003E\" + (pug.escape(null == (pug_interp = PageContext.AccountCurrencyCode) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Clabel class=\\\"control-label\\\" data-bind=\\\"visible: showIncreaseBudgetHelp\\\"\\u003E\";\npug_mixins[\"popupHelp\"](\"pop_BA_BulkEditBudgetIncrease\", i18n.getString('AutomatedRules_RuleAuthoring_IncreaseBudget'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Clabel class=\\\"control-label\\\" data-bind=\\\"visible: !showIncreaseBudgetHelp()\\\"\\u003E\";\npug_mixins[\"popupHelp\"](\"pop_BA_BulkEditBudgetDecrease\", i18n.getString('AutomatedRules_RuleAuthoring_DecreaseBudget'), i18n);\npug_html = pug_html + (\"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorMessage\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\" + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp));\nvar header1 = i18n.getString('BulkEdit_Campaign_EntityNameHeader')\nvar header2 = i18n.getString('BulkEdit_Campaign_OldCashbackBudgetHeader')\nvar header3 = i18n.getString('BulkEdit_Campaign_NewCashbackBudgetHeader')\npug_mixins[\"previewGrid\"]([header1, header2, header3]);\nvar header5 = i18n.getString('BulkEdit_Campaign_EntityNameHeader')\nvar header6 = i18n.getString('BulkEdit_Campaign_OldCashbackBudgetHeader')\nvar header7 = i18n.getString('BulkEdit_Campaign_AttemptedCashbackBudgetHeader')\npug_mixins[\"errorsGrid\"]([header5, header6, header7]);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"PageContext\" in locals_for_with?locals_for_with.PageContext:typeof PageContext!==\"undefined\"?PageContext:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"previewGrid\"] = pug_interp = function(columns){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showPreview\\\"\\u003E\\u003Cdiv data-bind=\\\"html: changeText\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"if: results().length > 0, visible: results().length > 0\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: previewGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: results\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\" data-bind=\\\"foreach: $data.data\\\"\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index1 = 0, $$l = $$obj.length; pug_index1 < $$l; pug_index1++) {\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index1 in $$obj) {\n $$l++;\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"changeCashbackPercentBase\"] = pug_interp = function(i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ch2 class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fh2\\u003E\\u003Cdiv class=\\\"panel-body form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Clabel class=\\\"pull-left control-label\\\" id=\\\"actionLabel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_Action')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"col-sm-2\\\"\\u003E\\u003Cselect class=\\\"form-control\\\" data-bind=\\\"options: actions, optionsText: "Text", optionsValue: "Value", value: selectedAction, disable: isDisabled\\\" aria-labelledby=\\\"actionLabel\\\"\\u003E\\u003C\\u002Fselect\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-6 form-inline\\\" data-bind=\\\"visible: showSetPanel\\\"\\u003E\\u003Cinput class=\\\"bulkEdit-bid form-control\\\" type=\\\"text\\\" data-bind=\\\"value: cashbackPercentValue, valueUpdate: "input", disable: isDisabled\\\" aria-describedby=\\\"percentLabel\\\"\\u003E\\u003Cspan class=\\\"control-label\\\" id=\\\"currencyLabel1\\\" data-bind=\\\"html: selectedUnit\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorMessage\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- ko if: cashbackPercentDescription() != null--\\u003E\\u003Cdiv class=\\\"alert alert-info\\\" role=\\\"alert\\\"\\u003E\\u003Cdiv class=\\\"alert-image\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"alert__content\\\"\\u003E\\u003Cspan class=\\\"alert__message\\\" data-bind=\\\"html: cashbackPercentDescription\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel\\\"\\u003E\";\npug_mixins[\"changeCashbackPercentBase\"](i18n);\npug_html = pug_html + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp);\nvar header1 = i18n.getString('BulkEdit_Campaign_EntityNameHeader')\nvar header2 = i18n.getString('BulkEdit_OldCashbackPercentHeader')\nvar header3 = i18n.getString('BulkEdit_NewCashbackPercentHeader')\npug_mixins[\"previewGrid\"]([header1, header2, header3]);\nvar header5 = i18n.getString('BulkEdit_Campaign_EntityNameHeader')\nvar header6 = i18n.getString('BulkEdit_OldCashbackPercentHeader')\nvar header7 = i18n.getString('BulkEdit_AttemptedCashbackPercentHeader')\npug_mixins[\"errorsGrid\"]([header5, header6, header7], true);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"previewGrid\"] = pug_interp = function(columns){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showPreview\\\"\\u003E\\u003Cdiv data-bind=\\\"html: changeText\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"if: results().length > 0, visible: results().length > 0\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: previewGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: results\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\" data-bind=\\\"foreach: $data.data\\\"\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index1 = 0, $$l = $$obj.length; pug_index1 < $$l; pug_index1++) {\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index1 in $$obj) {\n $$l++;\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + (\"\\u003Cdiv class=\\\"panel\\\" data-bind=\\\"visible: showPanel\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\" + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp));\nvar header1 = i18n.getString('BulkEdit_Campaign_EntityNameHeader')\nvar header2 = i18n.getString('BulkEdit_OldStatusHeader')\nvar header3 = i18n.getString('BulkEdit_NewStatusHeader')\npug_mixins[\"previewGrid\"]([header1, header2, header3]);\nvar header5 = i18n.getString('BulkEdit_Campaign_EntityNameHeader')\nvar header6 = i18n.getString('BulkEdit_OldStatusHeader')\nvar header7 = i18n.getString('BulkEdit_AttemptedStatusHeader')\npug_mixins[\"errorsGrid\"]([header5, header6, header7]);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel copy-paste-container\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group col-sm-12\\\"\\u003E\\u003Cul\\u003E\\u003Cli\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-bind=\\\"checked: pauseAfterPasting\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_PasteAds_PauseAfterPasting')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nvar showStopButton = false\npug_html = pug_html + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp);\nvar entityNameHeader = i18n.getString('BulkEdit_Ad_EntityNameHeader')\nvar copiedHeader = i18n.getString('BulkEdit_Copied_Header')\nvar pastedHeader = i18n.getString('BulkEdit_Pasted_Header')\npug_mixins[\"errorsGrid\"]([entityNameHeader, copiedHeader, pastedHeader]);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this); event.stopPropagation();\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + (\"\\u003Cdiv class=\\\"panel copy-paste-container\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group col-sm-12\\\"\\u003E\\u003Cul data-bind=\\\"visible: showCheckBoxes()\\\"\\u003E\\u003Cli\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-bind=\\\"checked: pauseAfterPasting\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_PasteAdGroups_PauseAfterPasting')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003Cli\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-bind=\\\"checked: adjustStartAndEndDates\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Adjust_StartEndDates')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_CopyPaste_StartEndDate_AdGroup', i18n.getString('Adjust_StartEndDates'), i18n);\npug_html = pug_html + (\"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"form-horizontal bulkeditdate\\\" data-bind=\\\"visible: adjustStartAndEndDates()\\\"\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1 copyPaste-radio-topBottomPadding adGroup-startEndDate-spacing\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('DateFilter_Label_StartDate')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-2 start-date-picker\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1 copyPaste-radio-topBottomPadding adGroup-startEndDate-spacing\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('DateFilter_Label_EndDate')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-2 copyPaste-radio-topBottomPadding copyPaste-radio-label\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"radio\\\" value=\\\"None\\\" data-bind=\\\"checked: endDateModification\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Schedule_NoEndDate')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-1 copyPaste-radio-topBottomPadding copyPaste-radio-label endBy-before-date-picker\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"radio\\\" value=\\\"Selected\\\" data-bind=\\\"checked: endDateModification\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('EndBy')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-2 date-picker-within-radio end-date-picker form-control-static\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-3 copyPaste-radio-topBottomPadding copyPaste-radio-label\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"radio\\\" value=\\\"CopyDuration\\\" data-bind=\\\"checked: endDateModification\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UseOriginalDuration')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_CopyPaste_OrigDuration_AdGroup', i18n.getString('UseOriginalDuration'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorMessage\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nvar showStopButton = true\npug_html = pug_html + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp);\nvar entityNameHeader = i18n.getString('BulkEdit_AdGroup_EntityNameHeader')\nvar copiedHeader = i18n.getString('BulkEdit_Copied_Header')\nvar pastedHeader = i18n.getString('BulkEdit_Pasted_Header')\npug_mixins[\"errorsGrid\"]([entityNameHeader, copiedHeader, pastedHeader]);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this); event.stopPropagation();\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + (\"\\u003Cdiv class=\\\"panel copy-paste-container\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group col-sm-12\\\"\\u003E\\u003Cul data-bind=\\\"visible: showCheckBoxes()\\\"\\u003E\\u003Cli\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-bind=\\\"checked: pauseAfterPasting\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_PasteAssetGroups_PauseAfterPasting')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003Cli\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-bind=\\\"checked: adjustStartAndEndDates\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Adjust_StartEndDates')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_CopyPaste_StartEndDate_AssetGroup', i18n.getString('Adjust_StartEndDates'), i18n);\npug_html = pug_html + (\"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"form-horizontal bulkeditdate\\\" data-bind=\\\"visible: adjustStartAndEndDates()\\\"\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1 copyPaste-radio-topBottomPadding adGroup-startEndDate-spacing\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('DateFilter_Label_StartDate')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-2 start-date-picker\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1 copyPaste-radio-topBottomPadding adGroup-startEndDate-spacing\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('DateFilter_Label_EndDate')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-2 copyPaste-radio-topBottomPadding copyPaste-radio-label\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"radio\\\" value=\\\"None\\\" data-bind=\\\"checked: endDateModification\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Schedule_NoEndDate')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-1 copyPaste-radio-topBottomPadding copyPaste-radio-label endBy-before-date-picker\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"radio\\\" value=\\\"Selected\\\" data-bind=\\\"checked: endDateModification\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('EndBy')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-2 date-picker-within-radio end-date-picker form-control-static\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-3 copyPaste-radio-topBottomPadding copyPaste-radio-label\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"radio\\\" value=\\\"CopyDuration\\\" data-bind=\\\"checked: endDateModification\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UseOriginalDuration')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_CopyPaste_OrigDuration_AssetGroup', i18n.getString('UseOriginalDuration'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorMessage\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nvar showStopButton = true\npug_html = pug_html + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp);\nvar entityNameHeader = i18n.getString('BulkEdit_AssetGroup_EntityNameHeader')\nvar copiedHeader = i18n.getString('BulkEdit_Copied_Header')\nvar pastedHeader = i18n.getString('BulkEdit_Pasted_Header')\npug_mixins[\"errorsGrid\"]([entityNameHeader, copiedHeader, pastedHeader]);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this); event.stopPropagation();\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + (\"\\u003Cdiv class=\\\"panel copy-paste-container\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group col-sm-12\\\"\\u003E\\u003Cul data-bind=\\\"visible: showCheckBoxes()\\\"\\u003E\\u003Cli\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-bind=\\\"checked: pauseAfterPasting\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_PasteCampaigns_PauseAfterPasting')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003Cli\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-bind=\\\"checked: adjustStartAndEndDates\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Adjust_StartEndDates')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_CopyPaste_StartEndDate_Campaign', i18n.getString('Adjust_StartEndDates'), i18n);\npug_html = pug_html + (\"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"form-horizontal bulkeditdate\\\" data-bind=\\\"visible: adjustStartAndEndDates()\\\"\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1 copyPaste-radio-topBottomPadding\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('DateFilter_Label_StartDate')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-2 start-date-picker\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1 copyPaste-radio-topBottomPadding\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('DateFilter_Label_EndDate')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-2 copyPaste-radio-topBottomPadding copyPaste-radio-label\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"radio\\\" value=\\\"None\\\" data-bind=\\\"checked: endDateModification\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Schedule_NoEndDate')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-1 copyPaste-radio-topBottomPadding copyPaste-radio-label endBy-before-date-picker\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"radio\\\" value=\\\"Selected\\\" data-bind=\\\"checked: endDateModification\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('EndBy')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-2 date-picker-within-radio end-date-picker form-control-static\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group radio\\\"\\u003E\\u003Cdiv class=\\\"col-sm-1\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-3 copyPaste-radio-topBottomPadding copyPaste-radio-label\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"radio\\\" value=\\\"CopyDuration\\\" data-bind=\\\"checked: endDateModification\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('UseOriginalDuration')) ? \"\" : pug_interp)));\npug_mixins[\"popupHelp\"]('pop_BA_CopyPaste_OrigDuration_Campaign', i18n.getString('UseOriginalDuration'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorMessage\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nvar showStopButton = true\npug_html = pug_html + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp);\nvar entityNameHeader = i18n.getString('BulkEdit_Campaign_EntityNameHeader')\nvar copiedHeader = i18n.getString('BulkEdit_Copied_Header')\nvar pastedHeader = i18n.getString('BulkEdit_Pasted_Header')\npug_mixins[\"errorsGrid\"]([entityNameHeader, copiedHeader, pastedHeader]);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel copy-paste-container\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"form-group col-sm-12\\\"\\u003E\\u003Cul\\u003E\\u003Cli\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-bind=\\\"checked: includeBids\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_PasteKeywords_IncludeBids')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003Cli data-bind=\\\"visible: !disableKeywordDestinationUrl\\\"\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-bind=\\\"checked: includeDestinationURLs\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_PasteKeywords_IncludeDestinationURLs')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003Cli\\u003E\\u003Cdiv class=\\\"checkbox\\\"\\u003E\\u003Clabel\\u003E\\u003Cinput type=\\\"checkbox\\\" data-bind=\\\"checked: pauseAfterPasting\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_PasteKeywords_PauseAfterPasting')) ? \"\" : pug_interp)) + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fli\\u003E\\u003C\\u002Ful\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\nvar showStopButton = false\npug_html = pug_html + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp);\nvar entityNameHeader = i18n.getString('BulkEdit_Keyword_EntityNameHeader')\nvar copiedHeader = i18n.getString('BulkEdit_Copied_Header')\nvar pastedHeader = i18n.getString('BulkEdit_Pasted_Header')\npug_mixins[\"errorsGrid\"]([entityNameHeader, copiedHeader, pastedHeader]);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, viewModel) {pug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showButtonBar\\\"\\u003E\\u003Cbutton class=\\\"btn btn-primary\\\" id=\\\"save\\\"\\u003E\" + (pug.escape(null == (pug_interp = viewModel.actionButtonText()) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003Cbutton class=\\\"btn btn-default\\\" id=\\\"preview\\\" data-bind=\\\"visible : showPreviewButton\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_PreviewChanges')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003Cbutton class=\\\"btn btn-default\\\" id=\\\"cancel\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_Cancel')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showCloseButton\\\"\\u003E\\u003Cbutton class=\\\"btn btn-default\\\" id=\\\"close\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_Close')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"viewModel\" in locals_for_with?locals_for_with.viewModel:typeof viewModel!==\"undefined\"?viewModel:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors\\\"\\u003E\\u003Cdiv data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText, href:"javascript:void(0)"\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Ftr\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.name\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.error\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + (\"\\u003Cdiv class=\\\"panel\\\" data-bind=\\\"visible: showPanel\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\" + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp));\nvar header1 = i18n.getString('label_association_error_grid_header_entity')\nvar header2 = i18n.getString('label_association_error_grid_header_text')\npug_mixins[\"errorsGrid\"]([header1, header2]);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, viewModel) {pug_mixins[\"previewGrid\"] = pug_interp = function(columns){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showPreview\\\"\\u003E\\u003Cdiv data-bind=\\\"html: changeText\\\" role=\\\"alert\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"if: results().length > 0, visible: results().length > 0\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: previewGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.previewGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: results\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\" data-bind=\\\"foreach: $data.data\\\"\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index1 = 0, $$l = $$obj.length; pug_index1 < $$l; pug_index1++) {\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index1 in $$obj) {\n $$l++;\n var column = $$obj[pug_index1];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel\\\"\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"section-container form-horizontal\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nvar header1 = viewModel.entityHeaderName()\nvar header2 = i18n.getString('BulkEdit_BidStrategy_CurrentBidStrategy')\nvar header3 = i18n.getString('BulkEdit_BidStrategy_NewBidStrategy')\npug_mixins[\"previewGrid\"]([header1, header2, header3]);\npug_mixins[\"errorsGrid\"]([header1], true);\npug_html = pug_html + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"viewModel\" in locals_for_with?locals_for_with.viewModel:typeof viewModel!==\"undefined\"?viewModel:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_mixins[\"errorsGrid\"] = pug_interp = function(columns, errorColumnIsHtml){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && !isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: errorCountString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Ca class=\\\"errorCountLink\\\" data-bind=\\\"html: errorCountLinkText\\\" href=\\\"javascript:void(0)\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cbr\\u003E\\u003Cdiv class=\\\"previewTable grid\\\" data-bind=\\\"visible: showErrorGrid\\\"\\u003E\\u003Ctable\\u003E\\u003Cthead\\u003E\\u003C!--ko if: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\" data-bind=\\\"foreach: errorsGrids\\\"\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\" data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--ko if: $index() === $parent.errorsGrids().length - 1--\\u003E\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C!--ko ifnot: $root.errorsGrids--\\u003E\\u003Ctr class=\\\"grid-header-row\\\"\\u003E\";\n// iterate columns\n;(function(){\n var $$obj = columns;\n if ('number' == typeof $$obj.length) {\n for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) {\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var pug_index0 in $$obj) {\n $$l++;\n var column = $$obj[pug_index0];\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = column) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003Cth class=\\\"grid-header-cell grid-disabledsort\\\"\\u003E\\u003Cdiv class=\\\"grid-header-textcontainer\\\"\\u003E\\u003Ca class=\\\"grid-header-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_InlineError_ErrorHeader')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fth\\u003E\\u003C\\u002Ftr\\u003E\\u003C!--\\u002Fko--\\u003E\\u003C\\u002Fthead\\u003E\\u003Ctbody data-bind=\\\"foreach: inlineErrors\\\"\\u003E\\u003Ctr class=\\\"grid-row\\\"\\u003E\\u003C!-- ko foreach: $data.data--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003C!-- ko if: $data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"html: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C!-- ko if: !$data.isHtml--\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" data-bind=\\\"text: $data.value\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003C\\u002Ftd\\u003E\\u003C!-- \\u002Fko--\\u003E\\u003Ctd class=\\\"grid-cell\\\"\\u003E\\u003Cdiv class=\\\"grid-content-container\\\" role=\\\"alert\\\"\\u003E\\u003C!-- ko foreach: $data.combinedErrors --\\u003E\";\nif (errorColumnIsHtml) {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"html: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan data-bind=\\\"text: $data\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003C!-- \\u002Fko --\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftbody\\u003E\\u003C\\u002Ftable\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-footer\\\" data-bind=\\\"visible: showErrors() && isCampaignAdGroupCopyPasteOperation()\\\"\\u003E\\u003Cdiv class=\\\"error\\\" data-bind=\\\"html: completedWithErrorsBulkEditResultsString\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_mixins[\"popupHelp\"] = pug_interp = function(popupId, ariaLabelContext, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nvar templateString = (i18n && i18n.get && i18n.get('Click to learn more about {{item}}')) || (i18n && i18n.getString && i18n.getString('Click to learn more about {{item}}')) || null\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"helpbutton\\\"\"+\" type=\\\"helppopup\\\" role=\\\"button\\\"\"+pug.attr(\"topic\", popupId, true, true)+pug.attr(\"data-help\", true, true, true)+\" onclick=\\\"PopupController.PopupJsClick(this); event.stopPropagation();\\\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", templateString ? templateString.replace('{{item}}', ariaLabelContext) : ariaLabelContext, true, true)) + \"\\u003E\\u003C\\u002Fa\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"panel\\\"\\u003E\\u003C!-- RSA Auto Assets settings--\\u003E\\u003Cdiv class=\\\"panel-heading\\\" role=\\\"heading\\\" aria-level=\\\"2\\\"\\u003E\\u003Cdiv class=\\\"panel-title\\\" data-bind=\\\"html: titleText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"panel-body form-horizontal\\\"\\u003E\\u003Cdiv class=\\\"col-sm-12 rsa-auto-assets-setting-container\\\"\\u003E\\u003Cdiv class=\\\"rsa-auto-assets-switch-container\\\"\\u003E\\u003Clabel class=\\\"checkbox-inline\\\"\\u003E\\u003Cinput class=\\\"rsa-auto-assets-switch\\\" type=\\\"checkbox\\\" data-bind=\\\"checked: isRsaAutoAssetsSettingChecked\\\"\\u003E\\u003Cspan class=\\\"text\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CampaignSetting_RsaAutoAssets_Enable')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\npug_mixins[\"popupHelp\"]('pop_BA_RSA_AutoAssets', i18n.getString('CampaignSetting_RsaAutoAssets_Enable'), i18n);\npug_html = pug_html + \"\\u003C\\u002Flabel\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C!-- Bulk edit progress--\\u003E\" + (null == (pug_interp = require(\"../status.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C!-- Bulk edit error grid--\\u003E\";\nvar campaignHeader = i18n.getString('BulkEdit_Campaign_EntityNameHeader')\npug_mixins[\"errorsGrid\"]([campaignHeader]);\npug_html = pug_html + \"\\u003C!-- Footer--\\u003E\" + (null == (pug_interp = require(\"../footer.pug\").call(this, locals)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, showStopButton) {pug_html = pug_html + \"\\u003Cdiv class=\\\"panel-body\\\" data-bind=\\\"visible: showProgress\\\" role=\\\"alert\\\"\\u003E\";\nvar link = '' + i18n.getString('BulkEdit_GoToBulkEditsPage') + ''\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"html: statusText\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"bulk-edit-progress-bar\\\"\\u003E\\u003Cdiv class=\\\"progress\\\"\\u003E\\u003Cdiv class=\\\"progress-bar\\\" data-bind=\\\"style:{width: completePercentage}, attr:{"aria-valuenow": completePercentage}\\\" role=\\\"progressbar\\\" aria-valuemin=\\\"0%\\\" aria-valuemax=\\\"100%\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"bulkeditlink\\\"\\u003E\" + (null == (pug_interp = i18n.getString('BulkEdit_RunInBackground_Description').replace('{0}', link)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003Cbutton class=\\\"btn btn-default\\\" id=\\\"runInBackground\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('BulkEdit_RunInBackground')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\";\nif (showStopButton) {\npug_html = pug_html + \"\\u003Cbutton class=\\\"btn btn-default\\\" id=\\\"stopCopyPaste\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Preview_Button_Stop')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"showStopButton\" in locals_for_with?locals_for_with.showStopButton:typeof showStopButton!==\"undefined\"?showStopButton:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;pug_html = pug_html + \"\\u003Cdiv class=\\\"modal popup-container fade\\\" role=\\\"dialog\\\"\\u003E\\u003Cdiv class=\\\"popup-dialog\\\"\\u003E\\u003Cdiv class=\\\"popup-content center-block\\\" draggable=\\\"true\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, itemViewModel) {pug_mixins[\"dynamicSearchAdPreviewTemplate\"] = pug_interp = function(item, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"dynamic-search-ad-preview-shared-template\\\"\\u003E\\u003Cdiv\\u003E\\u003Cspan class=\\\"previewTitleAdNoLink\\\"\\u003E\" + (pug.escape(null == (pug_interp = item.convertedTitle) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\\u003Ca class=\\\"previewUrlAd\\\"\\u003E\" + (pug.escape(null == (pug_interp = item.convertedDisplayUrl) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"dynamic-search-ad-preview-text\\\"\\u003E\" + (pug.escape(null == (pug_interp = item.Text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n};\npug_html = pug_html + \"\\u003Cdiv class=\\\"previewAd\\\"\\u003E\";\npug_mixins[\"dynamicSearchAdPreviewTemplate\"](itemViewModel, i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"itemViewModel\" in locals_for_with?locals_for_with.itemViewModel:typeof itemViewModel!==\"undefined\"?itemViewModel:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, itemViewModel, withContainer) {pug_mixins[\"responsiveAdPreviewTemplate\"] = pug_interp = function(item, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Cdiv class=\\\"responsive-ad-preview-shared-template\\\" style=\\\"display: flex;\\\"\\u003E\";\nif (!item.isVideo && !item.LandscapeImageMediaUrl && !item.isMultimediaAd && (!item.isMultimediaAdinMSANEnabled || !item.LandscapeImageMediaUrl)) {\npug_html = pug_html + \"\\u003Cp\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('AdType_ResponsiveAd')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fp\\u003E\";\n}\nelse {\nif (item.isVideo) {\nif (item.LandscapeImageMediaUrl) {\npug_html = pug_html + \"\\u003Cdiv style=\\\"display: inline-block;float: left;\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (item.isVerticalVideo) {\npug_html = pug_html + \"\\u003Cimg\" + (\" class=\\\"verticalVideoThumbnail\\\"\"+pug.attr(\"src\", item.LandscapeImageMediaUrl, true, true)+\" align=\\\"left\\\" alt=\\\"\\\" width=\\\"34\\\" height=\\\"60\\\"\"+pug.attr(\"data-video-id\", item.IdString, true, true)) + \"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-play\\\" style=\\\"position: relative; left: -34px; top: 20px;width: 0px; font-size: 18px;display: inline-block;color: white\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cimg\" + (pug.attr(\"src\", item.LandscapeImageMediaUrl, true, true)+\" align=\\\"left\\\" alt=\\\"\\\" width=\\\"114\\\" height=\\\"60\\\"\"+pug.attr(\"data-video-id\", item.IdString, true, true)) + \"\\u003E\\u003Cspan class=\\\"glyphicon glyphicon-play\\\" style=\\\"position: relative; left: -70px; top: 20px;width: 0px; font-size: 24px;display: inline-block;color: white\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\n}\nelse\nif ((item.campaignSubType === 'BrandAwarenessVideoAds' && !item.shouldShowActionNeededForGoogleImprotVideoAd)) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"video-preview-div\\\" style=\\\"float: left;width: 114px;height: 60px;margin-right: 10px;display: flex;align-items: center; border-radius: 6px; justify-content: center; background: #F3F2F1; border: 1px solid;\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Video_Preview_Processing')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"video-preview-div\\\" style=\\\"float: left;width: 114px;height: 60px;margin-right: 10px;display: flex;align-items: center;\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('Video_Preview_Unavailable')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse\nif (!item.isPlaceholderMMA) {\npug_html = pug_html + \"\\u003Cdiv style=\\\"display: flex; flex-direction: column;\\\"\\u003E\\u003Cimg\" + (pug.attr(\"src\", item.LandscapeImageMediaUrl, true, true)+\" align=\\\"left\\\" alt=\\\"\\\"\") + \"\\u003E\";\nif ((item.imageCount && item.imageCount > 1)) {\npug_html = pug_html + \"\\u003Cspan class=\\\"moreHint\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('RSA_Count_More').replace('{{count}}', item.imageCount - 1)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv style=\\\"flex: 1; display: flex;flex-direction: column;\\\"\\u003E\";\nif (!item.isPlaceholderMMA) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"previewTitle\\\"\\u003E\\u003Ca\" + (\" class=\\\"previewTitleAd\\\"\"+\" target=\\\"_blank\\\"\"+pug.attr(\"href\", item.convertedFinalUrl, true, true)+\" onclick=\\\"event.stopPropagation();\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = item.Headline) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\nif ((item.HeadlineCount && item.HeadlineCount > 1)) {\npug_html = pug_html + \"\\u003Cspan class=\\\"moreHint\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('RSA_Count_More').replace('{{count}}', item.HeadlineCount - 1)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv\\u003E\\u003Ca class=\\\"previewUrlAd\\\"\\u003E\" + (pug.escape(null == (pug_interp = item.convertedDisplayUrl) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"previewText\\\"\\u003E\\u003Cspan class=\\\"previewTextAd\\\"\\u003E\" + (pug.escape(null == (pug_interp = item.Text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\nif ((item.TextCount && item.TextCount > 1)) {\npug_html = pug_html + \"\\u003Cspan class=\\\"moreHint\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('RSA_Count_More').replace('{{count}}', item.TextCount - 1)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan class=\\\"previewTextAd\\\"\\u003E\" + (pug.escape(null == (pug_interp = item.Headline) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n};\nif (withContainer) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"previewAd\\\"\\u003E\";\npug_mixins[\"responsiveAdPreviewTemplate\"](itemViewModel, i18n);\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_mixins[\"responsiveAdPreviewTemplate\"](itemViewModel, i18n);\n}}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"itemViewModel\" in locals_for_with?locals_for_with.itemViewModel:typeof itemViewModel!==\"undefined\"?itemViewModel:undefined,\"withContainer\" in locals_for_with?locals_for_with.withContainer:typeof withContainer!==\"undefined\"?withContainer:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (budgetId, budgetType, enabledBidlandscape, hasBidlandscapeIcon, i18n, targetCpaValue) {if (targetCpaValue) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status-column\\\"\\u003E\" + (pug.escape(null == (pug_interp = targetCpaValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nif (hasBidlandscapeIcon&&budgetType) {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"status-column\",\"iconba\",\"iconba-Financial\",\"bidlandscape_icon\",\"spritedimagealign\",\"spritedimage\",\"clickable\",enabledBidlandscape?'enabled':'disabled'], [false,false,false,false,false,false,false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"id\", `campainBidLandscape${budgetId}`, true, true)+pug.attr(\"aria-label\", i18n.getString('Campaign_BidLandscape_Title'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"budgetId\" in locals_for_with?locals_for_with.budgetId:typeof budgetId!==\"undefined\"?budgetId:undefined,\"budgetType\" in locals_for_with?locals_for_with.budgetType:typeof budgetType!==\"undefined\"?budgetType:undefined,\"enabledBidlandscape\" in locals_for_with?locals_for_with.enabledBidlandscape:typeof enabledBidlandscape!==\"undefined\"?enabledBidlandscape:undefined,\"hasBidlandscapeIcon\" in locals_for_with?locals_for_with.hasBidlandscapeIcon:typeof hasBidlandscapeIcon!==\"undefined\"?hasBidlandscapeIcon:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"targetCpaValue\" in locals_for_with?locals_for_with.targetCpaValue:typeof targetCpaValue!==\"undefined\"?targetCpaValue:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (budgetId, budgetType, enabledBidlandscape, hasBidlandscapeIcon, i18n, targetRoasValue) {if (targetRoasValue) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status-column\\\"\\u003E\" + (pug.escape(null == (pug_interp = targetRoasValue) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nif (hasBidlandscapeIcon&&budgetType) {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"status-column\",\"iconba\",\"iconba-Financial\",\"bidlandscape_icon\",\"spritedimagealign\",\"spritedimage\",\"clickable\",enabledBidlandscape?'enabled':'disabled'], [false,false,false,false,false,false,false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"id\", `campainBidLandscape${budgetId}`, true, true)+pug.attr(\"aria-label\", i18n.getString('Campaign_BidLandscape_Title'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"budgetId\" in locals_for_with?locals_for_with.budgetId:typeof budgetId!==\"undefined\"?budgetId:undefined,\"budgetType\" in locals_for_with?locals_for_with.budgetType:typeof budgetType!==\"undefined\"?budgetType:undefined,\"enabledBidlandscape\" in locals_for_with?locals_for_with.enabledBidlandscape:typeof enabledBidlandscape!==\"undefined\"?enabledBidlandscape:undefined,\"hasBidlandscapeIcon\" in locals_for_with?locals_for_with.hasBidlandscapeIcon:typeof hasBidlandscapeIcon!==\"undefined\"?hasBidlandscapeIcon:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"targetRoasValue\" in locals_for_with?locals_for_with.targetRoasValue:typeof targetRoasValue!==\"undefined\"?targetRoasValue:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (model) {if (model) {\npug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = model.budgetName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cdiv\\u003E\";\nif (model.isBudgetCenterEntryEnabled) {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"combinedBudgetGridCellValue budgetCenterEntry\\\"\"+pug.attr(\"data-budgetamount\", model.budgetAmount, true, true)+pug.attr(\"data-budgettype\", model.budgetType, true, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = model.budgetAmount) ? \"\" : pug_interp)) + \"\\u002F\" + (pug.escape(null == (pug_interp = model.budgetTypeText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"combinedBudgetGridCellValue\\\"\"+pug.attr(\"data-budgetamount\", model.budgetAmount, true, true)+pug.attr(\"data-budgettype\", model.budgetType, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = model.budgetAmount) ? \"\" : pug_interp)) + \"\\u002F\" + (pug.escape(null == (pug_interp = model.budgetTypeText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nif (model.AssociatedExperiment) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"status_icon gridDetailsImage spritedimagealign experiment-budget-ellipsis\\\" tabindex=\\\"0\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nif (model.hasBidlandscapeIcon&&model.budgetType) {\npug_html = pug_html + \"\\u003Cbr\\u003E\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"iconba\",\"iconba-Financial\",\"bidlandscape_icon\",\"spritedimagealign\",\"spritedimage\",\"clickable\",model.enabledBidlandscape?'enabled':'disabled'], [false,false,false,false,false,false,true]), false, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"id\", `campainBidLandscape${model.budgetId}`, true, true)+pug.attr(\"aria-label\", model.i18n.getString('Campaign_BidLandscape_Title'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"model\" in locals_for_with?locals_for_with.model:typeof model!==\"undefined\"?model:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (Languages, i18n) {if (Languages && Languages.length > 0) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"languages-list\\\"\\u003E\";\n// iterate Languages\n;(function(){\n var $$obj = Languages;\n if ('number' == typeof $$obj.length) {\n for (var index = 0, $$l = $$obj.length; index < $$l; index++) {\n var language = $$obj[index];\nvar joiner = index > 0 ? ', ': '';\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = joiner + i18n.getString('Language_'+Languages[index])) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n }\n } else {\n var $$l = 0;\n for (var index in $$obj) {\n $$l++;\n var language = $$obj[index];\nvar joiner = index > 0 ? ', ': '';\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = joiner + i18n.getString('Language_'+Languages[index])) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n }\n }\n}).call(this);\n\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"Languages\" in locals_for_with?locals_for_with.Languages:typeof Languages!==\"undefined\"?Languages:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (CampaignMigrationStatus, CampaignType, i18n) {if (CampaignType) {\npug_html = pug_html + \"\\u003Cdiv\\u003E\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CampaignType_'+CampaignType)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\nif (CampaignMigrationStatus) {\npug_html = pug_html + \"\\u003Cdiv\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CampaignMigrationStatus_'+CampaignMigrationStatus)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"CampaignMigrationStatus\" in locals_for_with?locals_for_with.CampaignMigrationStatus:typeof CampaignMigrationStatus!==\"undefined\"?CampaignMigrationStatus:undefined,\"CampaignType\" in locals_for_with?locals_for_with.CampaignType:typeof CampaignType!==\"undefined\"?CampaignType:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (value) {if (value.$total) {\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value.$total.text) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"campaign-column-name\\\"\\u003E\";\nif (value.BaseCampaignName) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"base-campaign-name\\\"\\u003E\" + (pug.escape(null == (pug_interp = value.BaseCampaignName) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\nvar skipNavigation = value.skipScopeNavigation ? 'true' : 'false';\nif (value.isForVNext) {\npug_html = pug_html + \"\\u003Ca\" + (pug.attr(\"class\", pug.classes([\"scope-navigator\",value.className], [false,true]), false, true)+pug.attr(\"href\", value.href, true, true)+pug.attr(\"data-campaignid\", value.Id, true, true)+pug.attr(\"data-skipscopenavigation\", skipNavigation, true, true)+pug.attr(\"aria-label\", value.ariaLabel, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"campaign_link\\\"\"+pug.attr(\"href\", value.href, true, true)+pug.attr(\"id\", value.Id, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value.name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";\n}}.call(this,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (ariaLabel, cpid, display, pathname, value) {if (display) {\nif (value) {\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"scope-navigator\\\"\"+pug.attr(\"data-campaignid\", cpid, true, true)+pug.attr(\"data-pathname\", pathname, true, true)+pug.attr(\"aria-label\", ariaLabel, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan class=\\\"clickable optimization_score_with_popover\\\" role=\\\"button\\\"\\u003E\" + (pug.escape(null == (pug_interp = ' - ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\n}\nelse {\npug_html = pug_html + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp));\n}}.call(this,\"ariaLabel\" in locals_for_with?locals_for_with.ariaLabel:typeof ariaLabel!==\"undefined\"?ariaLabel:undefined,\"cpid\" in locals_for_with?locals_for_with.cpid:typeof cpid!==\"undefined\"?cpid:undefined,\"display\" in locals_for_with?locals_for_with.display:typeof display!==\"undefined\"?display:undefined,\"pathname\" in locals_for_with?locals_for_with.pathname:typeof pathname!==\"undefined\"?pathname:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (issue, recommendation, status) {pug_html = pug_html + \"\\u003Cdiv\\u003E\";\nif (issue > 0) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"performance-insights-status\\\"\\u003E\\u003Cspan class=\\\"iconba iconba-Warning\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = status) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse\nif (recommendation > 0) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"performance-insights-status\\\"\\u003E\\u003Cspan class=\\\"iconba iconba-Lightbulb\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = status) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cdiv class=\\\"performance-insights-null-status\\\"\\u003E\" + (pug.escape(null == (pug_interp = status) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"issue\" in locals_for_with?locals_for_with.issue:typeof issue!==\"undefined\"?issue:undefined,\"recommendation\" in locals_for_with?locals_for_with.recommendation:typeof recommendation!==\"undefined\"?recommendation:undefined,\"status\" in locals_for_with?locals_for_with.status:typeof status!==\"undefined\"?status:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, scope) {var linkText = i18n.getString('CampaignsLandscapeProgress_Footer_Link');\nvar closeText = i18n.getString('CampaignsLandscapeProgress_Footer_Close');\nvar link = `${linkText}`;\nvar close = `${closeText}`;\npug_html = pug_html + \"\\u003Cdiv class=\\\"campaign-landscape-progress\\\"\\u003E\\u003Cspan class=\\\"loading-image\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cdiv class=\\\"title\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('CampaignsLandscapeProgress_Title')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"footer\\\"\\u003E\" + (null == (pug_interp = i18n.getString('CampaignsLandscapeProgress_Footer').replace('{0}', link).replace('{1}', close)) ? \"\" : pug_interp) + \"\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"scope\" in locals_for_with?locals_for_with.scope:typeof scope!==\"undefined\"?scope:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"campaign-languages-inline-editor\\\"\\u003E\\u003Cdiv class=\\\"display-inline\\\"\\u003E\\u003Cdiv class=\\\"campaign-language-editor\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cinput\" + (\" class=\\\"grid-edit-menu grid-popupeditor-save btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Save'), true, true)+\" data-bind=\\\"enable: isValid\\\"\") + \"\\u003E\\u003Cinput\" + (\" class=\\\"grid-popupeditor-cancel btn btn-default grid-edit-menu\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Cancel'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (deliveryStatus, i18n, showRequestPermissionBtn) {pug_html = pug_html + \"\\u003Cdiv class=\\\"request-permission-custom-template\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString(`Message_DeliveryStatus_${deliveryStatus}`)) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\nif (showRequestPermissionBtn) {\npug_html = pug_html + \"\\u003Cbutton id=\\\"requestLinkedInPermission\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('RequestPermission')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fbutton\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"deliveryStatus\" in locals_for_with?locals_for_with.deliveryStatus:typeof deliveryStatus!==\"undefined\"?deliveryStatus:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"showRequestPermissionBtn\" in locals_for_with?locals_for_with.showRequestPermissionBtn:typeof showRequestPermissionBtn!==\"undefined\"?showRequestPermissionBtn:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, value) {pug_mixins[\"helpLink\"] = pug_interp = function(topic, displayText, ariaLabelContext){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\npug_html = pug_html + \"\\u003Ca\" + (\" class=\\\"HelpTopic\\\"\"+pug.attr(\"query\", 'help:' + topic, true, true)+\" href=\\\"javascript:void(0);\\\"\"+pug.attr(\"aria-label\", (ariaLabelContext || ' ') + ' ' + displayText, true, true)) + \"\\u003E\" + (pug.escape(null == (pug_interp = displayText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fa\\u003E\";\n};\npug_mixins[\"scoreMap\"] = pug_interp = function(score, i18n){\nvar block = (this && this.block), attributes = (this && this.attributes) || {};\nswitch (score){\ncase 0 :\npug_html = pug_html + (pug.escape(null == (pug_interp = i18n.getString('QualityScore_NA')) ? \"\" : pug_interp));\n break;\ncase 1:\npug_html = pug_html + \"\\u003Cdiv class=\\\"qs-Poor\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('QualityScore_Poor')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n break;\ncase 2:\npug_html = pug_html + \"\\u003Cdiv class=\\\"qs-Ok\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('QualityScore_Ok')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n break;\ncase 3:\npug_html = pug_html + \"\\u003Cdiv class=\\\"qs-Good\\\"\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('QualityScore_Good')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";\n break;\ndefault:\npug_html = pug_html + (pug.escape(null == (pug_interp = '') ? \"\" : pug_interp));\n break;\n}\n};\npug_html = pug_html + \"\\u003Ctable class=\\\"qs-Values\\\" cellpadding=\\\"2\\\" cellspacing=\\\"0\\\" border=\\\"0\\\"\\u003E\\u003Ctr\\u003E\\u003Ctd\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('QualityScoreFlyOut_KeywordRelevance')) ? \"\" : pug_interp)) + \"\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"leftPadFour\\\"\\u003E\";\npug_mixins[\"scoreMap\"](value.QualityScore.KeywordRelevance, i18n);\npug_html = pug_html + \"\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003Ctr\\u003E\\u003Ctd\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('QualityScoreFlyOut_LandingPageRelevance')) ? \"\" : pug_interp)) + \"\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"leftPadFour\\\"\\u003E\";\npug_mixins[\"scoreMap\"](value.QualityScore.LandingPageRelevance, i18n);\npug_html = pug_html + \"\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003Ctr\\u003E\\u003Ctd\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('QualityScoreFlyOut_LandingPageQuality')) ? \"\" : pug_interp)) + \"\\u003C\\u002Ftd\\u003E\\u003Ctd class=\\\"leftPadFour\\\"\\u003E\";\npug_mixins[\"scoreMap\"](value.QualityScore.LandingPageQuality, i18n);\npug_html = pug_html + \"\\u003C\\u002Ftd\\u003E\\u003C\\u002Ftr\\u003E\\u003C\\u002Ftable\\u003E\";\npug_mixins[\"helpLink\"]('127yek', i18n.getString('QualityScoreFlyOut_HelpLink'), i18n.getString('QualityScoreFlyOut_HelpText'));}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, value) {pug_html = pug_html + \"\\u003Cdiv class=\\\"quality-score-popup-title\\\"\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('QualityScoreFlyOut_TotalScoreHeading')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = value.QualityScore.OverallQualityScore) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = ' ') ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = i18n.getString('QualityScoreFlyOut_TotalScore')) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"value\" in locals_for_with?locals_for_with.value:typeof value!==\"undefined\"?value:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (Id, Value, ValueSetAtLevel, editorialStatus, editorialStatusText, i18n, showInheritIcon) {pug_html = pug_html + \"\\u003Cdiv class=\\\"rsa-ad-customizer-attibute-column\\\"\\u003E\\u003Cdiv class=\\\"rsa-ad-customizer-attribute-container\\\"\\u003E\";\nif (showInheritIcon) {\npug_html = pug_html + \"\\u003Cspan class=\\\"iconba iconba-TreeLevelArrow\\\" role=\\\"img\\\" aria-hidden=\\\"true\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cspan class=\\\"attribute-value\\\"\\u003E\" + (pug.escape(null == (pug_interp = Value) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\nvar appealble= editorialStatus === 'ApprovedLimited' || editorialStatus === 'Rejected';\nif (appealble) {\npug_html = pug_html + \"\\u003Cdiv\" + (pug.attr(\"class\", pug.classes([\"delivery-info\",`${appealble ? 'trigger-popup' : ''}`], [false,true]), false, true)+pug.attr(\"data-status\", editorialStatus, true, true)+pug.attr(\"data-valuelevel\", ValueSetAtLevel, true, true)) + \"\\u003E\";\nif (editorialStatus === 'Rejected') {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"editorial-status status-icon iconba iconba-ErrorBadge\\\"\"+pug.attr(\"title\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+pug.attr(\"aria-label\", i18n.getString('DeliveryStatusIcon_Tooltip_Error'), true, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"editorial-status status-icon iconba iconba-Warning\\\"\"+pug.attr(\"title\", i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)+pug.attr(\"aria-label\", i18n.getString('DeliveryStatusIcon_Tooltip_Warning'), true, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"status-column editorial-status clickable editorial_delivery_status_with_inline_appeals\\\"\"+pug.attr(\"data-entityId\", Id, true, true)+\" title=\\\"\\\"\"+pug.attr(\"id\", `reasonImage#${Id}`, true, true)+\" tabindex=\\\"0\\\" role=\\\"button\\\"\") + \"\\u003E\" + (pug.escape(null == (pug_interp = editorialStatusText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\nelse {\npug_html = pug_html + \"\\u003Cspan class=\\\"status-column editorial-status\\\"\\u003E\" + (pug.escape(null == (pug_interp = editorialStatusText) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"Id\" in locals_for_with?locals_for_with.Id:typeof Id!==\"undefined\"?Id:undefined,\"Value\" in locals_for_with?locals_for_with.Value:typeof Value!==\"undefined\"?Value:undefined,\"ValueSetAtLevel\" in locals_for_with?locals_for_with.ValueSetAtLevel:typeof ValueSetAtLevel!==\"undefined\"?ValueSetAtLevel:undefined,\"editorialStatus\" in locals_for_with?locals_for_with.editorialStatus:typeof editorialStatus!==\"undefined\"?editorialStatus:undefined,\"editorialStatusText\" in locals_for_with?locals_for_with.editorialStatusText:typeof editorialStatusText!==\"undefined\"?editorialStatusText:undefined,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"showInheritIcon\" in locals_for_with?locals_for_with.showInheritIcon:typeof showInheritIcon!==\"undefined\"?showInheritIcon:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cdiv class=\\\"inline-location-recommendation-container form-group\\\" style=\\\"margin-left: -7.5px\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"form-group inline-location-recommendation-description\\\" style=\\\"margin-top: 20px; margin-bottom: 20px;\\\"\\u003E\\u003Cspan data-bind=\\\"text: description\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\"\\u003E\\u003Cdiv class=\\\"location-recommendation-grid-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group\\\" style=\\\"padding-top: 10px\\\"\\u003E\\u003Cinput\" + (\" class=\\\"apply btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Inline_Location_Recommendation_Apply'), true, true)+\" data-bind=\\\"css: {disabled: !isActionButtonEnabled()}\\\"\") + \"\\u003E\\u003Cinput\" + (\" class=\\\"cancel btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Inline_Location_Recommendation_Cancel'), true, true)) + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"col-sm-6\\\" style=\\\"margin-bottom: 10px\\\"\\u003E\\u003Cdiv class=\\\"location-recommendation-map-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, showMap) {pug_html = pug_html + \"\\u003Cdiv class=\\\"location-recommendation-container form-group\\\" data-bind=\\\"visible: hasRecommendation\\\"\\u003E\";\nif (showMap) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-12\\\"\\u003E\\u003Cdiv class=\\\"location-recommendation-map-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-recommendation\\\" style=\\\"line-height: 10px\\\"\\u003E\\u003Cdiv class=\\\"alert-info-inline collapsed\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#location-recommendation-body-container\\\" data-bind=\\\"click: clickCollapse\\\"\\u003E\\u003Ca class=\\\"spritedimagealign\\\" data-bind=\\\"css: isExpanded() ? "expandedImage" : "expanderImage"\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cspan class=\\\"recommendation-icon\\\"\\u003E \\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"clickable\\\" tabindex=\\\"0\\\" data-bind=\\\"html: banner\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"location-recommendation-body collapse\\\" id=\\\"location-recommendation-body-container\\\"\\u003E\\u003Cdiv class=\\\"form-group row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-12\\\"\\u003E\\u003Cinput\" + (\" class=\\\"apply btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Inline_Location_Recommendation_Apply'), true, true)+\" data-bind=\\\"css: {disabled: !isActionButtonEnabled()}\\\"\") + \"\\u003E\\u003Cinput\" + (\" class=\\\"dismiss btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Inline_Location_Recommendation_Dismiss'), true, true)+\" data-bind=\\\"css: {disabled: !isActionButtonEnabled()}\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"location-recommendation-grid-container\\\" style=\\\"min-width: 1020px\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"showMap\" in locals_for_with?locals_for_with.showMap:typeof showMap!==\"undefined\"?showMap:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, showMap) {pug_html = pug_html + \"\\u003Cdiv class=\\\"location-recommendation-container form-group\\\" data-bind=\\\"visible: hasRecommendation\\\"\\u003E\";\nif (showMap) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-12\\\"\\u003E\\u003Cdiv class=\\\"location-recommendation-map-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv class=\\\"alert alert-recommendation\\\" style=\\\"line-height: 10px\\\"\\u003E\\u003Cdiv class=\\\"alert-info-inline collapsed\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#location-recommendation-body-container\\\" data-bind=\\\"click: clickCollapse\\\"\\u003E\\u003Ca class=\\\"spritedimagealign\\\" data-bind=\\\"css: isExpanded() ? "expandedImage" : "expanderImage"\\\"\\u003E\\u003C\\u002Fa\\u003E\\u003Cspan class=\\\"recommendation-icon\\\"\\u003E \\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"clickable\\\" tabindex=\\\"0\\\" data-bind=\\\"html: banner\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"location-recommendation-body collapse\\\" id=\\\"location-recommendation-body-container\\\"\\u003E\\u003Cdiv class=\\\"form-group row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"location-recommendation-grid-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-12\\\"\\u003E\\u003Cinput\" + (\" class=\\\"apply btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Inline_Location_Recommendation_Apply'), true, true)+\" data-bind=\\\"css: {disabled: !isActionButtonEnabled()}\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"showMap\" in locals_for_with?locals_for_with.showMap:typeof showMap!==\"undefined\"?showMap:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n, showMap) {pug_html = pug_html + \"\\u003Cdiv class=\\\"location-recommendation-container form-group\\\" data-bind=\\\"visible: showLocationsRecommendationsGrid\\\"\\u003E\";\nif (showMap) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-12\\\"\\u003E\\u003Cdiv class=\\\"location-recommendation-map-container\\\" style=\\\"margin-top: 25px; margin-bottom: 25px;\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003Cdiv data-bind=\\\"visible: hasRecommendation\\\"\\u003E\\u003Cdiv class=\\\"alert alert-recommendation\\\" style=\\\"line-height: 10px; margin: 0; padding-top: 10px; padding-bottom: 10px; border: 1px solid;\\\"\\u003E\\u003Cdiv class=\\\"alert-info-inline collapsed\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#location-recommendation-body-container\\\" data-bind=\\\"click: clickCollapse\\\"\\u003E\\u003Cspan class=\\\"glyphicon\\\" data-bind=\\\"css: isExpanded() ? "glyphicon-chevron-up" : "glyphicon-chevron-down"\\\" style=\\\"padding-right: 10px;\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"recommendation-light-bulb\\\" style=\\\"padding-right: 5px;\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003Cspan class=\\\"clickable recommendation-detail-info\\\" tabindex=\\\"0\\\" data-bind=\\\"html: banner\\\"\\u003E\\u003C\\u002Fspan\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"location-recommendation-body panel collapse\\\" id=\\\"location-recommendation-body-container\\\" style=\\\"padding: 15px 0 0 15px;\\\"\\u003E\\u003Cdiv class=\\\"form-group row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-6\\\"\\u003E\\u003Cdiv class=\\\"location-recommendation-grid-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"form-group row\\\"\\u003E\\u003Cdiv class=\\\"col-sm-12\\\" style=\\\"padding-top: 5px; padding-bottom: 5px;\\\"\\u003E\\u003Cinput\" + (\" class=\\\"apply btn btn-primary\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Inline_Location_Recommendation_Apply'), true, true)+\" data-bind=\\\"css: {disabled: !isActionButtonEnabled()}\\\"\") + \"\\u003E\\u003Cinput\" + (\" class=\\\"dismiss btn btn-default\\\"\"+\" type=\\\"button\\\"\"+pug.attr(\"value\", i18n.getString('Inline_Location_Recommendation_Dismiss'), true, true)+\" data-bind=\\\"css: {disabled: !isActionButtonEnabled()}\\\"\") + \"\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\\u003C\\u002Fdiv\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined,\"showMap\" in locals_for_with?locals_for_with.showMap:typeof showMap!==\"undefined\"?showMap:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (i18n) {pug_html = pug_html + \"\\u003Cspan\" + (\" class=\\\"glyphicon glyphicon-remove dismiss-recommendation itemAction-remove clickable\\\"\"+\" tabindex=\\\"0\\\" role=\\\"button\\\"\"+pug.attr(\"title\", i18n.getString('LocationGrid_Column_TD_Dimiss'), true, true)+pug.attr(\"aria-label\", i18n.getString('LocationGrid_Column_TD_Dimiss'), true, true)) + \"\\u003E\\u003C\\u002Fspan\\u003E\";}.call(this,\"i18n\" in locals_for_with?locals_for_with.i18n:typeof i18n!==\"undefined\"?i18n:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (Name, isForVNext) {if (isForVNext) {\npug_html = pug_html + \"\\u003Cspan class=\\\"custormerInsightsLocation\\\"\\u003E\\u003C\\u002Fspan\\u003E\";\n}\npug_html = pug_html + \"\\u003Cspan\\u003E\" + (pug.escape(null == (pug_interp = Name) ? \"\" : pug_interp)) + \"\\u003C\\u002Fspan\\u003E\";}.call(this,\"Name\" in locals_for_with?locals_for_with.Name:typeof Name!==\"undefined\"?Name:undefined,\"isForVNext\" in locals_for_with?locals_for_with.isForVNext:typeof isForVNext!==\"undefined\"?isForVNext:undefined));;return pug_html;};\nmodule.exports = template;","var pug = require(\"!../../../../node_modules/.pnpm/pug@2.0.4/node_modules/pug-runtime/index.js\");\n\nfunction template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;;var locals_for_with = (locals || {});(function (hasPagination) {pug_html = pug_html + \"\\u003Cdiv class=\\\"location-recommendation-grid-container bingadsgrid\\\"\\u003E\\u003Cdiv class=\\\"location-grid-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\\u003Cdiv class=\\\"placeholder-container\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\nif (hasPagination) {\npug_html = pug_html + \"\\u003Cdiv class=\\\"grid-pager pager\\\"\\u003E\\u003C\\u002Fdiv\\u003E\";\n}\npug_html = pug_html + \"\\u003C\\u002Fdiv\\u003E\";}.call(this,\"hasPagination\" in locals_for_with?locals_for_with.hasPagination:typeof hasPagination!==\"undefined\"?hasPagination:undefined));;return pug_html;};\nmodule.exports = template;","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 556906;\nmodule.exports = webpackEmptyContext;"],"names":["maxAdTitleLength","maxAdDescriptionLength","maxTextDisplayUrlLength","maxUrlLength","maxAppStoreIdLength","maxEditorialAppealJustificationLength","i18n","window","globalLegacyI18n","get","mapEditorialErrorCode","apiErrorCode","rawErrorCode","getString","_mapSingleCountryErrors","countryErrors","countryName","Key","countryKey","errors","_","Value","error","message","Error","RawEditorialErrorCode","_mapSingleEditorialError","mapCampaignApiErrorCode","errorCode","args","i18nArgs","concat","getStringOrDefault","apply","mapEditorialErrors","flatten","length","grouppedErrors","pluck","value","mapCampaignApiErrorCodeShort","isValidString","build","pattern","param","url","key","list","str","encodeURIComponent","JSON","stringify","replace","RegExp","check","reg","exec","isOptional","defaults","schedule","undefined","task","asyncInterface","timeout","cancellationToken","overlapping","Task","options","this","prototype","start","isRunning","_scheduleNext","stop","next","clearTimeout","current","setTimeout","_iteration","previous","completed","iteration","_startTask","_scheduleTimeout","isAwait","isOverlapped","callback","_callback","token","then","data","trigger","stopTask","_processTimeout","backbone","createTask","run","app","interpolate","templateConfig","urlTmpls","getJobs","getSingleJob","getJobResults","filterSuffix","exports","getHistory","skip","take","odata","top","response","items","mapJobObject","total","catch","errorResponseBody","item","Code","alert","alertHelper","migrationMsg","showError","job","CreationTime","Date","CompletionTime","getJobsByIds","jobIds","jobsData","Id","jobModels","singleModel","jobId","id","accountInUrl","attributes","Entity","jobData","statusFilter","entity","filter","resultsStatus","OnlyErrors","OnlySuccessful","model","BaseModel","extend","$","BatchAction","Actions","Poller","_options","successiveFailureCount","recurringTask","scheduler","_taskIteration","on","_successHandler","_errorHandler","maxSuccessiveFailureCount","_jobModels","_getPendingJobs","repository","eventArgs","self","set","success","bulkEditStatus","inProgress","pendingStart","successHandler","pendingJobModels","jobs","models","status","completedWithErrors","failed","cacheManager","updateContext","poller","JobModel","osd","activePollers","AppEventDelegator","_AppEventDelegator","vNextCacheNotify","context","skipEntityCallPaths","successEmitter","onProgressNotification","currentStatus","totalCount","successCount","errorCount","ko_model","getProgressText","statusText","onJobSuccess","refresh","refreshGrid","completedWithErrorsBulkEditResultsString","onJobFailure","showErrors","showButtonBar","showCloseButton","gridHelper","grid","operationCancelled","handleUserError","legacy_jquery","ajaxError","Backbone","initialize","StatusPoller","isSkipEntityCache","onOperationSuccess","onOperationFailure","instrumentationActivity","activity","eventDelegator","render","$el","html","template","PageContext","viewModel","isForVNext","ko","click","submitJob","previewChanges","cancelJob","hideProgress","hideView","stopCopyPaste","attr","firstVisibleEnabledElement","find","focus","events","legacyRouter","navigateToRoute","empty","onBulkEditViewHide","cacheService","showPreview","CurrentCustomer","CurrentAccount","getCurrentFilter","filters","idBased","ignoreRowSelection","allPageSelected","filterService","pgridPlugins","filterServiceFilters","getCombinedFilter","FilterExpressions","filterMetadataToLegacy","filterState","pluginFilters","getAllFilters","getFilters","getIdFilter","additionalFilterExpressions","getCustomFilter","customFilter","getFilterURLParam","filterConverter","convertToURLParam","getCurrentSelection","simulateResults","query","campaignId","adGroupId","dateRangeQs","getCampaignId","getAdGroupId","getDateRangeQuery","Number","getUrlParameter","appState","dateRange","ui","Controls","DateRangeFilter","getParsedDateRange","App","state","getMonth","getDate","getFullYear","end","e","getDateRangeQueryArgs","pageSize","getPageSize","getCurrentPage","getSortInfo","addendum","filterURLParam","onValidateFailure","bind","makeChanges","isValuesArrayEmpty","filterExpressions","isEmpty","Values","hasSelectedEntities","validate","isDisabled","unset","getSelectedEntityIds","accountValueInUrl","_scope","setAction","currentFilter","logger","logMessage","constants","LOGCATEGORY","TRACE","LOGLEVEL","INFO","ex","gridFilterSerializer","toDescription","clearErrorSummary","actionMap","registerActionMapExtension","updateSummaryDataContext","save","entityName","element","index","ActionType","Property","AssociationList","ExclusionList","toLowerCase","indexOf","results","formatPreviewResults","currentPageChangeCount","showProgress","showCheckBoxes","showPanel","responseJSON","code","msg","errorMapper","appendErrorSummary","withUiBlock","asLoggingStart","setting","ACTIVITYNAME","BulkEditSessions","SCENARIONAME","visibility","maxInlineErrorCount","done","combinedErrors","localizeErrors","formatErrors","inlineErrors","off","showErrorGrid","toastErrors","fail","CurrentTabId","getContext","Set","add","forEach","toast","userErrors","customColumnErrors","map","userError","ErrorCode","compact","gridView","views","alertCenter","toastWarning","updateSelectedEntityCount","count","selectedEntityCount","entityResult","apiErrorMessages","Errors","editorialErrors","EditorialErrors","transformErrors","editorialErrorMessages","selectedRowIds","getSelectedRowIds","i18nAmdLoader","OUT_OF_RANGE","INVALID","budgetType","actionOptions","actions","Text","Increase","Decrease","unitOptions","AccountCurrencyCode","budgetTypeOptions","regEx","validateNumber","usePercentValidation","budgetValidation","isValidDecimal","minValue","maxValue","budgetRange","getBudgetRange","Daily","Min","MAX_VALUE","Max","Lifetime","parseDecimal","toString","match","Base","call","selectedAction","limitValueErrorMessage","subscribe","errorMessage","budgetTypes","selectedBudget","newBudgetType","isDailyBudget","isLifetimeBudget","getLifetimeBudgetLabel","showSetPanel","showChangeByPanel","showIncreaseBudgetHelp","units","selectedUnit","budget","budgetValue","read","write","owner","limit","limitValue","useLimitValue","limitBudgetLabelText","titleText","result","selectedUnitPreferenceName","CurrentUser","formatBudget","rows","EntityKey","push","isHtml","Changes","decimalNumber","fromFloatToString","OriginalValue","NewValue","view","BaseView","instrumentation","bulkEditCampaignBudget","create","ChangeBudgetViewModel","Persistence","arguments","helpDirective","action","fromLocalToFloat","budgetAmount","numericActionTypes","setAmount","changeByPercent","changeByAmount","Limit","filterHelper","SelectedColumn","SelectedOperator","dailyAccelerated","dailyStandard","lifetimeBudgetStandard","BudgetRange","DailyRange","FloorValue","CeilingValue","bulkEditCampaignCashbackBudget","ChangeCashbackBudgetViewModel","formatBid","newValueText","newValue","fromFloatToPercentString","originalValue","entityType","isCampaignBulkEdit","cashbackPercentDescription","numericActionType","getCashbackPercentValueByAction","campaignStatus","Deleted","Active","formatStatus","StatusViewModel","bulkEditUrl","isCrossPageAllSelected","alertId","actionLink","actionLinkTemplate","href","text","show","dismissible","level","DestinationParentEntityIds","EditCopy","Description","disableKeywordDestinationUrl","Permissions","IsKeywordDestinationURLDisabled","titleStrings","ViewModel","startDatePicker","endDatePicker","_this","contentType","includeBids","includeDestinationURLs","pauseAfterPasting","showPreviewButton","actionButtonText","adjustStartAndEndDates","endDateModification","isCampaignAdGroupCopyPasteOperation","content","type","culture","config","format","title","getState","selectedDate","validateTab","pasteOptions","flag","tabs","secondary","progress","adTemplate","keywordTemplate","campaignTemplate","adGroupTemplate","assetGroupTemplate","clipboard","formatCampaignAdGroup","campaign","adgroup","perfMarker","datePicker","minDate","nextYear","setFullYear","CopyPasteViewModel","willRender","tmp","getChild","that","enable","shouldEnable","CurrentAdGroup","setActionWithinAdGroup","CurrentCampaign","setActionOutsideAdGroup","setActionWithAdGroupId","setActionWithDates","adgroupId","option","StartDate","EndDate","EndDateAction","tab","entityKey","secondaryKey","copyFromCampaign","copyFromAdGroup","pasteToCampaign","pasteToAdGroup","change","isCampaignsTab","getClipboardName","RangeStartDate","toISOString","RangeEndDate","tabIdToClipboardType","Campaign","Campaigns","AdGroup","Adgroups","Ads","Keywords","Assetgroups","strings","wrongTab","wrongType","copyOneSuccess_OldUI","copyNSuccess_OldUI","copyOneSuccess_NewUI","copyNSuccess_NewUI","FilterHelper","isValid","expectedType","copy","copyPerfMarker","createChild","willInit","selectedItemsLength","getSelectedRowsCount","selectedRows","getSelectedRows","i","CampaignType","Toast","LocalStorage","getTotalRowsCount","getFiltersIncludeWaterfall","IsCampaignAdGroupCopyPasteEnabled","paste","pastePerfMarker","CopyPasteView","CopyPasteModel","ids","substring","getIdFilterNoEntityType","getProductGroupIdFilter","isOnAdGroupLevel","pageContext","completeIds","row","idGroups","lastGroup","compositeIds","group","join","hasInvalidParam","CampaignId","AdGroupId","getPerformanceTargetIdFilter","getAdGroupIdFilterExcludingContentOnly","Medium","getCampaignIdFilter","r","getAudienceIdFilter","shouldExclude","Status","_inlineErrors","err","errorObject","errorKey","name","deserialize","parse","getId","parseInt","getChanged","stats","changed","after","getByScope","labels","Account","Customer","label","Scope","_stats","_entity","scope","_loadDirectlyLinkedAccounts","loadDirectlyLinkedAccounts","_isManagementRequest","isManagementRequest","Model","getSelectionScope","instrumentationSettings","LabelAssociation","renderBulkEditJobView","added","removed","currentCustomerId","getAdded","getRemoved","addedByScope","removedByScope","selectionInfo","allPages","RequestProperties","settingView","entityHeaderName","_settingView","allowedEntities","parseType","matches","biddingStrategyType","isBulkEdit","i18nNewDesign","campaignType","campaignSubType","getCampaignTypeGlobalFilter","changeBiddingStrategyViewModel","el","keyName","safeJSON","Name","originalIBS","originalPBS","isRsaAutoAssetsSettingChecked","SearchString","Options","completePercentage","Math","floor","errorCountString","errorCountLinkText","changeText","i18nAudience","SetAmount","cashbackPercent","cashbackPercentValue","doesIncludeExcludeItems","doesIncludeExcludeItemsText","remove","noCashback","POUtils","from","params","from_version","$format","$inlinecount","$count","$filter","imagePath","enums","alertEntity","none","import","migration","budgetOpportunity","keywordOpportunity","disapproved","maintenance","accountSuspended","introBingAdsforioS","incompatibleBrowsers","adBlockWarning","productsLimitation","alertType","info","warn","accountStatus","creditHold","lockedForUpdate","pendingPaymentInstrument","draft","active","inActive","deleted","proposed","pendingCreditCheck","noHold","soldToOnly","creditWarning","hold","locked","noLock","userPaused","suspended","writeOff","paused","taxOnHold","userHold","accountInactiveReason","notSet","pausedDueToSystemIssue","pausedZeroBalance","pausedNoValidiO","processing","pendingPaymentMethod","pendingNewCustomer","inactive","handler","event","PopupController","PopupJsClick","stopPropagation","$scope","jquery","editBudget","fieldId","combinedBudget","editor","BudgetAmount","val","SimplifiedBudgetLimitType","getBudget","control","currentValue","dn","fromLocalToStringStrict","convertDateToStandardFormat","dateString","dateUtils","toKendo","selectedColumn","popOption","PeriodComparisonOption","test","changePercent","slice","popPrefix","filterMetadata","filterExpression","field","operator","split","category","column","convertToPoPField","opr","subExpressions","valueItem","decimal","logic","convertForLambdaExpression","indexToDelete","lambdaMappedResult","partialUrl","columnName","mapToShorterVersion","secondLogic","mappedOperatorAndValue","lambdaExpressionMapping","convert","filterExpressionsCopy","lamdaExpressionUrlPart","odata_params","kendo","transports","parameterMap","odata_4","expression","container","popupContentContainer","containerSelector","contentSelector","dialogSelector","blocked","drag_start","originalEvent","dataTransfer","setData","clientX","clientY","drag_over","preventDefault","draggable","draggableItem","draggableContainer","eventStart","getData","moveOnYAxis","moveOnXAxis","originOffset","offset","left","drop","bindDraggable","preparePopupContainer","oldBlocker","Template","insertBefore","append","document","unbind","closePopupByClick","removeClass","addClass","$target","target","closest","closePopup","uiBlocker","unblock","renderHtml","height","children","child","css","defaultHeight","close","block","resizeBlockingImg","showLoadingPanel","IncreaseBid","DecreaseBid","BestBid","FirstPageBid","ExcludeBid","excludeBid","All","monthly","Paused","Suspended","InProgress","EnumPaused","EnumBudgetPaused","EnumBudgetUserPaused","cb","once","go","gridDom","unbindRowSelection","rowSelectionChanged","selectedKeys","crossPageSelectAll","isAllSelected","totalCountRows","getTotalRecordCount","selectedItems","getSelectedRowItems","deselectAll","toggleAllRows","pagination","pageNumber","getColumnValue","rowId","itemWithKey","sortParams","sortInfo","sort","ColumnId","Direction","direction","orderby","hideToolbar","toolbar","gridToolbarGroup","hideAllToolbars","showToolbar","showAllToolbars","hideGroupMenu","loadPage","lolexModule","require","root","factory","module","samsam","formatio","lolex","define","mod","deps","fn","amd","m","o","Object","div","createElement","isNaN","getClass","isArguments","object","callee","isElement","nodeType","appendChild","removeChild","keys","prop","ks","hasOwnProperty","isDate","getTime","valueOf","isNegZero","Infinity","identical","obj1","obj2","arrayContains","array","subset","l","j","k","deepEqual","objects1","objects2","paths1","paths2","compared","isObject","Boolean","String","getIndex","objects","obj","path1","path2","type1","type2","isDate1","isDate2","value1","value2","isObject1","isObject2","index1","index2","newPath1","newPath2","class1","class2","keys1","keys2","matcher","getAttribute","excludeConstructors","quoteStrings","limitChildrenCount","specialObjects","functionName","func","displayName","constructorName","f","constructor","excludes","isCircular","ascii","processed","indent","qs","Formatio","opt","global","pieces","min","properties","cons","prefix","is","attrName","tagName","attrs","pairs","nodeName","nodeValue","formatted","innerHTML","substr","configure","t","n","s","u","glbl","setInterval","clearInterval","setImmediate","clearImmediate","NOOP","timeoutResult","addTimerReturnsObject","NativeDate","uniqueTimerId","parseTime","parsed","ms","pow","getEpoch","epoch","TypeError","inRange","to","timer","callAt","mirrorDateProperties","source","now","clock","toSource","UTC","toUTCString","createDate","ClockDate","year","month","date","hour","minute","second","addTimer","timers","createdAt","delay","duringTick","ref","unref","compareTimers","a","b","immediate","firstTimerInRange","callTimer","exception","interval","eval","timerType","clearTimer","timerId","ttype","uninstall","method","methods","hadOwnProperty","ignore","hijackMethod","createClock","timeouts","Array","tick","oldNow","firstException","tickFrom","tickTo","reset","setSystemTime","newNow","difference","install","toFake","sinon","sinonGlobal","hasOwn","parentNode","isDOMNode","isReallyNaN","mirrorProperties","isRestorable","restore","hasES5Support","makeApi","wrapMethod","property","checkWrappedMethod","wrappedMethod","calledBefore","verb","returns","stackTrace","stack","owned","methodDesc","wrappedMethodDesc","getPropertyDescriptor","types","objectKeys","defineProperty","proto","F","isMatcher","ignoreCase","multiline","aString","aLength","bLength","functionToString","getCall","callCount","thisValue","descriptor","getOwnPropertyDescriptor","getPrototypeOf","getConfig","custom","defaultConfig","injectIntoThis","injectInto","useFakeTimers","useFakeServer","timesInWords","calledInOrder","spies","called","orderByFirstCall","aCall","bCall","callId","createStubInstance","stub","hasDontEnumBug","toLocaleString","isPrototypeOf","propertyIsEnumerable","unique","sources","loadDependencies","typeOf","string","assertType","actual","matchObject","expectation","exp","act","createPropertyMatcher","propertyTest","messagePrefix","onlyProperty","or","m2","m1","and","any","defined","truthy","falsy","same","instanceOf","has","bool","number","regexp","valueFormatter","formatter","getFormatioFormatter","throwYieldError","proxy","callProto","calledOn","calledWith","calledWithMatch","calledWithExactly","notCalledWith","notCalledWithMatch","returned","returnValue","threw","calledWithNew","other","calledAfter","callArg","pos","callArgOn","callArgWith","callArgOnWith","yieldOn","yieldTo","yieldToOn","getStackFrames","callStr","createSpyCall","spy","proxyCall","invokeCallback","yield","spyCall","matchingFake","fakes","strict","incrementCallCount","notCalled","calledOnce","calledTwice","calledThrice","createCallProperties","firstCall","secondCall","thirdCall","lastCall","vars","createProxy","proxyLength","p","invoke","isSinonProxy","uuid","spyApi","invoking","returnValues","thisValues","exceptions","callIds","stacks","spyLength","instantiateFake","matching","named","getCalls","calls","spyFn","withArgs","original","fake","matchingAguments","parent","margs","printf","spyInstance","specifyer","formatters","delegateToCalls","matchAny","currentCall","c","C","stringifiedCall","isNode","isAMD","nextTick","process","throwsException","callCallback","behavior","callArgAt","argumentList","reverse","callArgProp","getCallback","getCallbackError","callbackAsync","callbackContext","callbackArguments","isPresent","returnArgAt","returnThis","returnValueDefined","onCall","onFirstCall","onSecondCall","onThirdCall","callsArg","callsArgOn","callsArgWith","callsArgOnWith","yields","yieldsRight","yieldsOn","yieldsTo","yieldsToOn","throws","returnsArg","returnsThis","createAsyncVersion","syncFnName","walkInternal","iterator","originalObj","seen","getOwnPropertyNames","walk","wrapper","stubLength","propOwner","getDefaultBehavior","stubInstance","defaultBehavior","getCurrentBehavior","getParentBehaviour","behaviors","functionStub","orig","resetBehavior","createBehavior","behaviorMethod","mock","each","collection","arrayEquals","arr1","arr2","compareLength","mockObject","expects","expectations","proxies","invokeMethod","verify","messages","met","pass","available","expectationsWithMatchingArgs","currentArgs","expectedArguments","expectsExactArgCount","allowsCall","exhausted","unshift","times","receivedMaxCalls","maxCalls","verifyMatcher","possibleMatcher","arg","minCalls","methodName","verifyCallAllowed","atLeast","num","limitsSet","atMost","never","exactly","twice","thrice","expectedThis","withExactArgs","max","expectedCallCountInWords","assert","getFakes","fakeCollection","splice","verifyAndRestore","stubbedObj","inject","col","lol","llx","shift","epxorts","core","Event","bubbles","cancelable","initEvent","defaultPrevented","ProgressEvent","progressEventRaw","loaded","lengthComputable","CustomEvent","customData","detail","EventTarget","addEventListener","listener","eventListeners","removeEventListener","listeners","dispatchEvent","handleEvent","realSetTimeout","logError","throwLoggedError","log","useImmediateExceptions","xdr","XDomainRequest","FakeXDomainRequest","readyState","UNSENT","requestBody","requestHeaders","onCreate","open","responseText","sendFlag","readyStateChange","OPENED","eventName","LOADING","DONE","isTimeout","errorFlag","send","x","verifyState","onSend","abort","aborted","setResponseBody","body","verifyRequestSent","verifyResponseBodyType","chunkSize","respond","simulatetimeout","useFakeXDomainRequest","keepOnCreate","supportsXDR","GlobalXDomainRequest","workingXDR","globalScope","supportsProgress","supportsCustomEvent","supportsFormData","FormData","supportsArrayBuffer","ArrayBuffer","supportsBlob","Blob","sinonXhr","XMLHttpRequest","GlobalXMLHttpRequest","GlobalActiveXObject","ActiveXObject","supportsActiveX","supportsXHR","workingXHR","supportsCORS","unsafeHeaders","Connection","Cookie","Cookie2","Expect","Host","Referer","TE","Trailer","Upgrade","Via","UploadProgress","load","FakeXMLHttpRequest","upload","responseType","withCredentials","xhr","getHeader","headers","header","h","addFilter","IE6Re","convertToArrayBuffer","buffer","Uint8Array","charCode","charCodeAt","isXmlContentType","clearResponse","responseXML","async","username","password","useFilters","xhrArgs","some","defake","readyStateChangeEvent","onreadystatechange","setRequestHeader","setResponseHeaders","verifyRequestOpened","responseHeaders","HEADERS_RECEIVED","onerror","getResponseHeader","getAllResponseHeaders","verifyHeadersReceived","isTextResponse","blobOptions","parseXML","convertResponseBody","statusCodes","uploadProgress","downloadProgress","uploadError","useFakeXMLHttpRequest","objId","fakeXhr","copyAttrs","navigator","userAgent","stateChange","DOMParser","parseFromString","xmlDoc","loadXML","responseArray","wloc","location","rCurrLoc","protocol","host","request","requestUrl","reqMethod","reqUrl","rmeth","matchMethod","matchUrl","matchOne","getHTTPMethod","ru","fakeServer","server","requests","xhrObj","addRequest","whitelist","handleRequest","respondImmediately","autoRespond","responding","autoRespondAfter","fakeHTTPMethods","queue","processRequest","respondWith","responses","Server","fakeServerWithClock","resetClock","longestTimeout","clockSetTimeout","clockSetInterval","returnVal","exposeValue","sandbox","injectedKeys","serverPrototype","restoreContext","prepareSandboxFromConfig","exposed","sinonSandboxedTest","oldDone","res","createTest","setUp","tearDown","testCase","tests","testName","rPrefix","verifyIsStub","failAssertion","mirrorPropAsAssertion","exposedName","toUpperCase","failException","callOrder","expected","expose","includeFail","addTargetedTriggerFunc","triggerId","featureName","areaName","targetId","_userVoice","UserVoice","account","AccountNumber","ticket_custom_fields","smartvote_enabled","screenshot_enabled","contact_menu_label","contact_title","contact_message_placeholder","contact_skip_instant_answers_button","contact_details_title","contact_submit_button","contact_success_title","contact_success_body","email_address_label","email_address_placeholder","mode","addTrigger","addTargetedTrigger","resizeQueryString","responsiveAdPreviewTemplate","_ref","itemViewModel","withContainer","isMMAV2Enabled","isVideo","imageUrlToUse","OriginalImageMediaUrl","LandscapeImageMediaUrl","indexOfResizeInfo","dynamicSearchAdPreviewTemplate","domain","newVM","convertedTitle","convertedDisplayUrl","DisplayUrl","Path1","Path2","path","getDisplayUrl","getCombinedPath","store","DS","CustomerAdapter","_createClass","_classCallCheck","mockData","raw","Promise","registerAdapter","default","dummyDataSource","defineResource","idAttribute","primaryKey","schema","required","filterable","skipLocalization","enum","Budget","nullable","Amount","chooseType","Languages","DeliveryStatus","PerformanceMetrics","Impressions","Clicks","CTR","Conversions","Spend","AverageCPC","AveragePosition","AverageCPM","CPA","WebsiteCoverage","AuctionWonPercent","sovcolumn","isPercentValue","AuctionLostToBudgetPercent","AuctionLostToRankPercent","AuctionLostToLandingPercent","AuctionLostToAdQualityPercent","AuctionLostToBidPercent","ClickSharePercent","RevenueOnAdSpend","AdvertiserReportedRevenue","ConversionRate","alias","legacy","Labels","maxLength","ColorCode","AssociationCounts","CampaignCount","AdGroupCount","AdCount","KeywordCount","isRelatedEntity","PhonePerformanceMetrics","$schema","QualityScore","UpdatedOnLastImport","HasAuctionInsight","TrackingUrlTemplate","UrlCustomParameters","BiddingScheme","NativeBidAdjustment","DisplayBiddingStrategyType","DisplayBiddingStrategyMaxCpc","DisplayBiddingStrategyTargetCpa","DsaTargets","DomainCategorys","NegativeAdGroupDsaTargets","Categories","DsaSearchTerms","entitySet","toJSON","noop","getCampaignsGridFactory","ProgressView","_Backbone$View","_callSuper","_inherits","dialog","dialogProgress","bulkEditChange","ACTION_TYPE","CampaignWideBid","BidScaling","TROAS","TCPA","currencyCode","appConfig","addScenario","scenario","senario","campaignLandscapeEditBid","applyError","unexpectedError","i18nErrors","AlertHelper","getParams","timeFormat","timeZone","startDate","formatDate","endDate","QueryString","actionType","Selection","PreviewCompositeIds","defaultApply","campaignBidLandscapeView","noWidBidData","trackingId","valueToApply","landscapeType","campaignSelectMode","hash","additionalBuget","keepCurrentBudget","currentBudget","startDateString","endDateString","isCustomBid","currentSelectedId","landscapePointsLength","selectedData","dataArray","curValue","Type","campaignData","toUpdated","_objectSpread","jsdataCampaign","update","adapter","cacheResponse","finally","progressView","Dialog","backdrop","keyboard","setContent","paramsAdGroup","paramsKeyword","completeCB","progressCB","bulkEdit","failedCB","cid","customerId","aid","accountId","post","Request","Hash","campaignBidLandscapeTrack","IsBidLandscapeAvailable","updated","trace","impressions","mlImpressions","clicks","cost","conversion","conversionValue","additionalBugetNeeds","onCallReturnedForBidLandscape","dataToShow","Nodata","BidLandscapePoints","CampaignBidLandscapeType","formatRes","generateGuid","currentTargetValue","CampaignBidLandscape","parentItem","CurrentValue","CurrentTargetValue","EntityName","CurrencyCode","_ref2","markInputValueInvalid","newBidStr","bidRange","floorPrice","ceilingPrice","floorPriceStr","formatDecimalToFixed","ceilingPriceStr","validateSearchBid","showActivity","FetchedCampaignBidLandscape","ariaData","ActionName","UIData","selectMode","bidList","hasData","setState","showPopup","positioningMethod","positioningOptions","anchorPosition","width","contentView","classes","anchor","openCampaignBidLandscape","_ref3","bulkChange","willFetchData","mccPerfFluxPopupContainerId","dismissFlucCallout","calloutElement","getElementById","ReactDOM","budgetCenterHelpContainerId","dismissBudgetCenterHelpCallout","isEnglishOnlyChatSupportedLocale","locale","lowerLocale","toLocaleLowerCase","includes","conversionDeliveryStatusContainerId","dismissConversionStatusCallout","filterEnterKeyDown","eventHandler","keyCode","Enter","_len","_key","BingAdsWebUIComponentLegacyRouterIndex","commonI18n","legacyGlobalI18n","locationTargeti18n","permissions","IsExperimentsOpenBetaEnabled","IsSmartShoppingCampaignEnabled","IsAccountLabelsEnabled","IsDeferredHoveringPopupEnabled","budgetLimit","autobiddingLimitedStatus","linkedInPermissionRequired","customTemplateDeliveryStatus","disclaimerEditorialStatus","popupContentKey","keyVault","hoveringPopup","CampaignsGrid","_DeterministicWrapper","router","preferenceConfig","gridConfig","serverContext","_ref$isForVNext","getPlugins","getGridConfig","_ref$enableCopyPaste","enableCopyPaste","pageName","_ref$preexecuteFlag","preexecuteFlag","theme","azureUrlRewrite","preferenceService","newI18n","gridRemoved","internalConfig","merge","gridName","validateOrder","columns","pgridFactory","plugins","disclaimerRepos","SharedRepository","DisclaimerAdExtension","afterChangeComitted","appealAggregator","rejectionPopupContainerSelector","popoverId","conversionActivity","createScenarioAndActivity","scenarioName","activityName","updateGridQuery","bulkEditGridOptions","Hotkeys","CopyPaste","onClick","setup","changes","_isRendered","handleSortChange","PageReady","pageIsReady","setPageNumberToState","eventDispatcher","listenTo","onWunderbarChange","deliveryStatusPopupFactory","CampaignDeliveryStatusPopupFactory","inlineEditCashbackSetting","_this2","initializeCombinedFilterPromise","_superPropGet","CampaignCashback","Percent","MonthlyBudget","CouponsEnabled","PersonalizedOffersEnabled","inlineEdit","TopPanelCashbackSettings","CashbackPercent","CashbackMonthlyBudget","CashbackScope","campaignName","showTopPanelCashbackSettingEditor","_this3","editorView","overrideWith","scrollTo","_this4","targetEntity","getTargetEntity","filterOnLabelClick","navigateToManagePage","handleShowRejectionReasonEnter","showLandscapeDisabledHelpInfo","handleShowRejectionReasonLeave","hideRejectionReason","relatedTarget","hideFluctuationInsightsTooltip","hideBudgetCenterHelpTooltip","showBudgetCenterHelpInfo","showConversionDeliveryStatusWarning","showRejectionReason","showPerformanceInsightsPopup","_defineProperty","containerDOM","querySelector","styles","mergeStyleSets","callout","padding","fontSize","marginBottom","_jsxs","Callout","className","directionalHint","DirectionalHint","rightCenter","role","_jsx","variant","optimizationScorePopoverShown","goalDeliveryStatus","GoalStatusDetails","isConnectWithExpertEnabled","marginTop","rowGap","display","flexDirection","ctaButton","ctaFooter","paddingTop","borderTop","color","placement","getBoundingClientRect","right","innerWidth","textStrings","NoEligibleGoal","_TL_","description","learnMoreHref","learnMoreText","TagUnverified","TagInactive","NoRecentOfflineConversion","ConsentModeWarning","goalStatus","GoalDeliveryStatus","insertPopoverContainer","tooltipProps","parentView","currentTarget","onClose","onMouseLeave","closeButton","focusLockContent","_Fragment","classnames","DefaultButton","customEvent","CopilotToggleCustomEvent","eventType","eventSource","eventData","ActionId","liveAgentParameters","LiveAgentQueue","ShoppingAndUET","problemDescription","uetStatus","getLocale","Link","GridTooltip","renderConversionDeliveryStatusTooltip","dynamic","AdsCopilotConversionTrackingLiveAgent","conversionDeliveryStatusPopoverShown","budgetSplitView","BudgetSplitView","GridCustomizedPopupEditor","editorPositionFactory","getEditorPositionAsideAnchor","renderBelow","bidLandscapePerfMarker","showLabelsPopup","isMCCLabelEnabled","_this5","keyOfElement","selectedItem","editorialStatus","attributeId","valueLevel","editorial","toggleCountryList","_ref4","showRejectionReasons","registerCountryListEvent","deliveryStatusDetails","getCustomTemplate","getEditorialReasonsTemplate","ajaxOptions","oDataToken","campaign_id","account_id","customer_id","sessionId","SessionId","deliveryStatus","useCustomTemplate","afterRender","popup","adsGrid","AppealAggregatorClass","AppealAggregator","controller","submit","menuToFollow","requestExceptionFromPopup","openBulkEditor","values","bulkEditor","hide","selectRow","appealView","RequestDisclaimerExceptionCallBack","_this6","actionLinks","DeliveryStatusDetails","getRoutePathById","uri","URI","appendScopeParameter","addQuery","NoEligibleAdGroups","ShoppingCampaignNoOffersPresent","_ref5","DeliveryStatusPopupFactory","showRejectionPopup","isSmartShoppingCampaignEnabled","percentSymbol","DecimalFormatter","AdExtensionInlineAppeal","requestPermissionTemplate","showRequestPermissionBtn","getRequestPermission","association","findAll","where","disclaimerData","errI18n","locationI18n","extension","resolve","cmpid","adExtensionId","version","Version","queryify","http","__RequestVerificationToken","RejectionReasons","IsAppealable","reasonTemplates","getEditorialTemplates","reasons","Reason","ReasonCode","Location","LanguageToCountries","PublisherCountries","RejectionCountries","editorialRejection","ENTITY","EXTENSION","isAppealable","getReasonTemplates","getBudgetLandscapeHelpInfoTemplate","getAutobiddingLimitedHelpInfoTemplate","popupView","RequestDisclaimerExceptionCallBackFromPopup","showBudgetLandscape","clickEvent","deliveryStatusList","classList","applyAutobiddingSuggestion","inContextRepairRecommedationType","notificationApi","showWarning","suggestedValue","_this7","MaxCpc","showInfo","processErrors","_this8","SharedBudgetModel","_this9","TargetRoas","TargetCpa","CampaignDeliveryStatusDetails","detailStatus","RecommendedValue","applyDeliveryStatus","applyAutobiddingSuggestionForMaxCPCRestriction","applyAutobiddingSuggestionForBudgetRestriction","applyAutobiddingSuggestionForUnAttainableTarget","stopImmediatePropagation","showBudgetLandscapePopup","showInlineOpportunityPanel","showBudgetLandscapeHelpInfo","showQualityScoreDetail","monitorViewportChange","bidlandscapeDisabled","_ref6","destroyAll","renderFluctuationInsightsTooltip","_this10","dateFilter","getCurrentDateRange","_ref7","createElementBasedFluctuationPopupFactory","_ref8","getFluctuationPopupStyle","palette","triggerButton","onFlucDismiss","_ref9","isLastFluc","forceCampaignsGridRefresh","azure","metrics","fromScenario","canViewAllInsights","asyncLoadFluctuationConfig","fluctuationTypeIds","onDismiss","getFluctuationPopupStyles","toIANATimeZone","fromLegacyTimeZone","monthString","skeleton","monthlyBudgetAmount","formatCurrency","renderBudgetCenterHelpTooltip","_ref10","closePerformanceInsightsPopup","PerformanceInsightsToolTipCard","popupManager","releaseLock","forceAcquireLock","renderPerformanceInsightsPopup","DeterministicWrapperView","CampaignIdColumn","_CampaignuiBaseColumn","sortable","CampaignuiBaseColumn","handleErrors","CampaignLanguageInlineEditor","_ref$languages","languages","_ref$i18n","languageSelector","MultiLanguageSelector","inEditMode","selectedLanguages","getSelectedLanguages","SelectedLanguages","getLanguageSetForSelector","languagesSet","Language","IsSimplifiedChineseLanguageEnabledInMultipleLanguage","IsAdsGlobalizationPhase1Enabled","IsAdsGlobalizationPhase2Enabled","IsAdsGlobalizationPhase2JapanEnabled","IsAdsGlobalizationPhase6Enabled","IsDomesticSimplifiedChineseEnabled","IsAdsGlobalizationPhase9Enabled","IsAdsGlobalizationPhase9VIEnabled","CampaignLanguagesColumn","editable","helpId","enableEdit","helpAriaLabel","position","newPosition","languageInlineEditorView","updatedItem","inlineEditSave","fieldName","resource","jsData","editorViewCallbackAfterUpdate","customBlockerTarget","groupClass","cellPosition","parentContainerSelector","CampaignTypeColumn","IsRenameHotelToLodgingEnabled","CampaignMigrationStatus","CampaignColumn","IsBAACompetitionBSCAuctionInsightsEnabled","IsExperimentsEnabled","bodyClasses","_this$scope","$total","BaseCampaignName","isSmartCampaign","isPMaxCampaign","isAppCampaign","ariaLabel","experimentName","skipScopeNavigation","InlineEditableColumnPrompt","saveModel","itemArray","rowItem","updatedRowItem","StatusIconColumn","_BaseStatusIconColumn","statusOptions","importNotificationCallback","showPausedCampaignNotifications","campaignItemList","updateStatus","BaseStatusIconColumn","BidStrategyTargetCPAColumn","_options$helpId","CampaignSubType","isAutoBiddingLimited","_getBidLandscapeConfi","getBidLandscapeConfigs","enabledBidLandscape","hasBidLandscapeIcon","targetCpaValue","budgetId","enabledBidlandscape","hasBidlandscapeIcon","BidStrategyName","cloneDeep","flattenedSchema","NumberRange","targetCpa","targetCpaInlineEditorView","curTargetCpa","currencySymbol","getCurrencySymbol","currencySymbolClassName","bidObject","setErrors","BidStrategyTargetROASColumn","targetRoasValue","targetRoasInlineEditorView","curTargetRoas","toFixed","BidStrategyManualCPIColumn","_ref$helpId","ManualCPI","ManualCpi","manualCpi","manualCpiInlineEditorView","curTargetCpi","BidStrategyManualCPCColumn","ManualCPC","ManualCpc","manualCpc","manualCpcInlineEditorView","curTargetCpc","getDateSaveAction","props","isDateType","StartDateColumn","UseCampaignLevelDates","getCurrentDate","saveDate","allowNoDate","convertUTCDateToMachineDate","updater","maxDate","DateInlineEditableColumnPrompt","EndDateColumn","displayDate","getLaterDate","_item$Budget","_item$Budget2","localizedStartDate","getMaxDate","customClass","BidStrategyTargetImpressionShareColumn","TargetImpressionShare","TargetAdPosition","fields","valueProperty","targetImpressionShareInlineEditorView","curTargetImpressionShare","curTargetAdPosition","targetAdPositionInlineEditorView","PopupEditor","hasLabels","OptimizationScoreColumn","cpid","OptimizationScore","newProps","pathname","OptimizationScoreTemplate","cached","percentToFixedFormatter","digits","PerformanceInsightsColumn","performanceInsights","issue","recommendation","PerformanceInsightsTemplate","DeliveryColumnForCampaign","_DeliveryColumn","DeliveryColumn","IsViewThroughConversionEnabled","IsAudienceSOVEnabled","IsAvgPositionDeprecationPhase1Enabled","IsAvgPositionDeprecationPhase2Enabled","IsPersonalizedOffersEnabled","IsPersonalizedOffersV2Enabled","IsPersonalizedOffersV3Enabled","IsViewThroughConversionsRevenueEnabled","IsPersonalizedOffersV4Enabled","IsOptimizationScoreInCampaignsGridEnabled","_Permissions$dynamic","IsPerformanceInsightsEnabled","IsPartialConversionsEnabled","PartialConversions","IsColumnConversionEnabled","ColumnConversion","CPSReporting","InstallPerformanceColumns","ConvValueRules","CampaignLifetimeBudget","MaeLifetimeBudgetExclusion","usePartialConversions","isPortfolioBidStrategyEnabled","isAppAdsCampaignPhaseOneEnabled","isUnifiedAppAdsEnabled","isCampaignLifetimeBudgetEnabled","isCampaignTypeAllowed","IsEnhancedShoppingCampaignAllowed","IsDynamicSearchAdsV1Enabled","IsAIMCampaignEnabled","getBuilder","builder","ColumnsConfigBuilder","addCategory","addColumns","BudgetColumn","LifetimeBudgetColumn","BidStrategyNameColumn","BidStrategyTypeColumn","QualityScoreColumn","LabelsColumn","CampaignCashbackScopeColumn","CashbackBudgetColumn","CampaignCashbackPercentColumn","CampaignCouponColumn","addPerformanceCategoryForCampaign","withFluctuations","addConversionsCategory","withPartialConversions","isCPSEnabled","isInstallColumnsEnabled","isConversionValueRuleColumnsEnabled","addCompetitiveCategoryForCampaignOrAdGroups","IsCallMeteringAllowed","addCallDetailsCategoryForCampaigns","setLockedColumns","setSelectedColumns","ColumnClicksWithFluctuation","ColumnImpressionsWithFluctuation","ColumnCTR","ColumnAverageCPC","ColumnSpendWithFluctuation","ColumnConversionsCredit","ColumnConversions","ColumnViewThroughConversionsCredit","ColumnViewThroughConversions","ColumnAveragePosition","ColumnTopImpressionRate","ColumnAbsoluteTopImpressionRate","schemaI18n","dataSource","customHeaderOffset","addDateChangeListener","viewport","_ref$isDataFetchManag","isDataFetchManagerSource","_ref$gridName","getGridName","tableName","_permissions$dynamic","enableGridFlexLayout","scrolling","virtualized","InlineSharedBudgetEditor","InlineBudgetEditor","budgetTemplate","isCampaign","showExperiment","getColumnsConfig","legacyGridName","tableClasses","tableAttributes","selection","headRows","crossPageSelectHeadRow","popColumns","sortableHeader","sortableHeaderTemplate","layout","navigation","$call","parameters","mockEdm","identifyEntitySet","s$i18n","jsdataRawDataPlugin","commonJsdataRawDataPlugin","getRawData","rawDataAccessor","ds","_rawData","dfmRawData","getCampaignsPlugins","p$daterange","campaignTabPerfMarker","processReportRule","gridId","aggregatedRowsPlugin","aggregatedRowsPluginBuilder","overallI18nKey","filteredI18nKey","waterfallFilterI18nKey","customConfig","showPmaxRow","showLinkedInRow","columnChooserConfig","customColumnConfig","IsCustomColumnsInCampaignsSupported","_campaignMetricCatego","campaignMetricCategoriesFactory","enabled","metricCategories","segmentCategories","getColumnChooserConfig","patchQuery","Columns","SelectedColumns","LegacyColumns","LegacySelectedColumns","LegacyGridFlag","CustomColumns","AdCustomizerAttribute","CampaignAdCustomizerAttribute","RSAAdCustomizerAttributeColumn","enableRSAAdCustomizer","ReportEmailRule","inlineDownloadConfig","DownloadView","isAvailable","customToolbarIcon","plugin","perfMarkerPlugin","marker","paginationPlugin","availablePageSizes","enableRandomPage","pageNumberLabelText","pageSizeText","totalPageCountText","resetPageNumberOnSort","auctionInsightPlugin","route","crossPageSelectNotAllowedI18nKey","shouldNavigateToCompetitionTab","IsBAACompetitionEnabled","sessionStore","inlineDownloadWithoutFilterstatePlugin","segmentPlugin","isOdataActionSource","edm","getSegType","setSegType","cultureShortDatePattern","ShortDatePattern","cellTemplates","segmentationTypes","IsVerticalAdsReportingPhase1Enabled","_toConsumableArray","campaignSegmentationTypeEnum","segmentationType","bidStrategy","ChangeBiddingStrategyView","ChangeBiddingStrategyModel","IsReadOnlyUser","editablePlugin","uiBlockerPlugin","performanceLogPlugin","periodOverPeriodPlugin","columnChooserPlugin","dateFilterPlugin","inlineErrorPlugin","errorIconClasses","assistedSelectionPlugin","a11yPlugin","createCampaignsGrid","_ref$getAdditionalPlu","getAdditionalPlugins","setupDataSourceErrorHandling","setUpErrorHandling","DateInlineEditView","_DeterministicView","CampaignsDatePicker","noDateLabel","dateLabel","setChild","customizedInlineEditTemplate","getSelectedDate","newSelectedDate","convertMachineDateToUTCDate","errorMapping","errorContent","querySelectorAll","DeterministicView","_ref$customClass","_ref$updater","dateEditorView","sn","datepicker","adsActivity","inlineDateChange","signal","CalloutWithLock","lockKey","_objectWithoutProperties","_excluded","CalloutWithLockInner","withLock","force","defaultProps","useEffect","_document$querySelect","_document$querySelect2","_document$querySelect3","_document$querySelect4","InlineEditor","_React$useState","React","isUsingInheritedValue","_React$useState2","_slicedToArray","selectedKey","setSelectedKey","_React$useState3","dataType","customedValue","_React$useState4","setCustomedValue","choiceGroup","maxWidth","selectors","paddingLeft","wordBreak","textField","fieldGroup","inheritedValueName","inheritedValueLevel","labelId","onRenderField","optionPops","inheritedValue","ChoiceGroup","onChange","ev","attributeName","Stack","horizontal","tokens","childrenGap","TextField","Item","align","PrimaryButton","cancel","AdCustomizerAttributeInlineEditor","currentLevel","formattedValue","columnConfig","Datatype","gridType","dataTypeI18nKey","rawName","RSAAdCustomizerAttribute","findAttribute","RSAAdCustomizerAttributes","AdCustomizerAttributeInlineEditorView","ValueSetAtLevel","InheritedValue","InheritedValueSetAtLevel","additionalPayload","AdCustomizerAttributeValue","CampaignCacheManager","invalidate","attribute","SchemaI18n","defaultValue","showInheritIcon","EditorialStatus","editorialStatusText","odataURLMap","Keyword","odataURL","EntityIds","getAppealRejections","Reasons","getFwdLinkId","CUSTOMIZERFEED","BaseLocationRecommendationModel","locationRecommendations","locationImpressionGain","ret","EstimatedIncreaseInImpressions","locationTrafficGain","idList","_$reduce","recommend","passedFiltering","QueriesPassedLocationFiltering","QueriesFiltered","totalTraffic","formatPercentToFixed","_BaseLocationRecommen","isExpanded","campaignLength","uniq","size","trafficGain","impressionGain","isActionButtonEnabled","banner","recommendationCount","campaignNumber","hasRecommendation","clickCollapse","criterions","recommendationsOnMap","isMapShow","showLocationsRecommendationsGrid","recommendationType","channel","templates","inlineTemplate","locationGridAccountTemplate","locationGridCampaignTemplate","logViewEvent","opportunitys","OpportunityId","_ref$Campaign","typeId","isClick","InlineLocationRecommendation","isAccountLevel","locationRecommendationGrid","LocationRecommendationGrid","hasPagination","selectAllByDefault","dismissRecommendations","mouseOverRecommendation","mouseOutRecommendation","displayedRecommendations","recommendations","isMapLoaded","Microsoft","Maps","loadModule","showMap","isCampaignLevelLocation","MapView","LocationMap","mapView","disableInfoBoxGroupList","mapHeight","targetRecommendations","showRecommendationsOnMap","updateRecommendedLocations","locationGridTemplate","refreshLocation","refreshMap","rebindEventBus","fetchRecommendations","loadLocationCriterion","_this$options","_this$options$scope","excludedOnly","s$AdGroupCriterion","s$CampaignCriterion","criterionLevel","parentId","criterionLoader","entities","criterion","Criterion","locationTargetConverter","buildLocationCriterionFromBiddableCampaignCriterion","SelectionStatus","waitUntilMapLoaded","jsDataCampaign","Intermediate","recommendationRepository","getRecommendations","oppType","recommends","reqs","groupBy","CampaignCriterions","appliedRecommendations","req","overrideResponse","batch","failedCriterions","ErrorNumber","applyRecommendations","isAll","showSuccess","Results","sessionStorage","$collpase","expandCollapse","InlineLocationRecommendationDialog","isRecommendationOperated","locationAdded","View","decorate","viewOptions","InlineLocationRecommendationPanel","panelDecorator","panelReadyAriaLabel","eventsToActions","generateLocationName","LocationCriterion","lat","RadiusCriterion","Latitude","long","Longitude","_ProjectionGridBaseCo","columnOverrider","localizedTitle","locationColumnTemplate","ProjectionGridBaseColumn","Impression","Dismiss","gridRemoveAll","headClasses","colClasses","dimissColumnTemplate","_BaseCampaignColumn","routeTemplate","BaseCampaignColumn","onDismissClick","_ref$columns","_ref$columnOverrider","_ref$hasPagination","_ref$hasSelection","hasSelection","_ref$dataSource","_ref$pageSize","_ref$scope","_ref$selectAllByDefau","_ref$tableClasses","PredefinedColumns","mapColumnsConfig","itemOfElement","gridFactory","projectionGrid","vnext","use","placeholderPlugin","crossPageSelectAllPlugin","projectionGridScopeNavigator","mouseOverItem","mouseOutItem","onRemoveAllRecommendationClick","a11y","placeholder","directionIndex","selectAll","STEP_PATHS","FLOWS","AD_TYPES_TO_FLOWS","AdTypes","ShoppingAudience","AudienceAndSearch","PLACEHOLDER_ID","CREATE_SCENARIO","CREATE_CAMPAIGN","UPDATE_CAMPAIGN","UPDATE_ADGROUP","isSearchShoppingCampaign","flow","isAutoBidding","bidStrategyType","autoBidding","biddingStrategyTypes","maximizeConversions","maximizeClicks","maxConversionValue","targetRoas","costPerSale","allSettledPromiseWrapper","promises","wrappedPromises","reason","all","getCampaignType","isSearch","campaignSettings","getNoValidStore","productData","feedData","ProductCollectionAccounts","IsGlobalStore","IsCoOpStore","useSummarySchemaData","useWizardService","wizardData","isAudienceShoppingCampaign","_useState","useState","_useState2","timeDisplayType","setTimeDisplayType","useContext","ServerContext","preferencesService","_preferencesService","isTwelveHourDisplay","findByName","Data","targetParentEntity","adGroup","locations","loc","conversionGoals","storeName","StoreName","feeds","feedLabel","FeedLabel","isRendered","localInventory","isLocalInventoryEnabled","LocalInventoryAdsEnabled","productCollections","isProductCollectionsEnabled","ShoppableAdsEnabled","products","productFilters","ProductFilters","useSelectedItem","adGroupName","locationTargeting","targetOption","genderTargeting","genders","genderTypes","ageRangeTargeting","ageRanges","advancedTargetingSeparator","startEndDates","adSchedule","adSchedules","dayTimeRanges","useSearcherTimeZone","AdScheduleUseSearcherTimeZone","includeStartEnd","adDistribution","AdDistribution","bidValue","SearchBid","buildSchemaData","SummaryStep","schemaData","onShoppingHeaderActionClick","useCallback","WIZARD_EVENTS","NAVIGATE_TO","stepId","onTargetingHeaderActionClick","onBudgetBidHeaderActionClick","useMemo","separatorStyles","shopping","actionButton","iconName","components","buildDefaultDataProperty","dynamicProps","hd1","hd2","targeting","budgetBid","buildSchema","StepHeader","GeneratedUI","customComponentTypes","summaryPageComponentTypes","readLocationCriterions","readCampaignCriterions","readAgeAndGenderTargetingCriterions","readTargetingCriterions","readAudienceCriterions","edmCampaign","Customers","$withKey","Accounts","AudienceAssociations","toPromise","getTargetCriterion","targets","propKey","adGroupViewModel","campaignViewModel","bidAdjustment","_ref6$overrideType","overrideType","getTargetCriterionForAdGroup","getTargetCriterionForCampaign","viewModelToBulkModelForTargeting","parentEntity","deviceTargets","devices","isArray","device","isBidAdjustmentNegative","removedIndustryTargets","addedIndustryCriterion","removedIndustryCriterion","negativeRemovedIndustryTargets","negativeAddedIndustryCriterion","negativeRemovedIndustryCriterion","ageTargets","initialAgeTargets","initialAgeRanges","addedAges","initialTarget","removedAges","addedAgeCriterion","removedAgeCriterion","removedNegativeAges","negativeAgeRanges","negativeAge","addedTarget","removedNegativeAgeCriterion","initialGenderTypes","addedGenders","removedGenders","addedGenderCriterion","removedGenderCriterion","removedNegativeGenders","negativeGenderTypes","negativeGender","removedNegativeGenderCriterion","industryTargets","negativeIndustryTargets","initialIndustryTargets","initialNegativeIndustryTargets","addedIndustryTargets","negativeAddedIndustryTargets","industry","negativeIndustry","removedJobTargets","addedJobCriterion","removedJobCriterion","negativeRemovedJobTargets","negativeAddedJobCriterion","negativeRemovedJobCriterion","jobTargets","negativeJobTargets","initialJobTargets","initialNegativeJobTargets","addedJobTargets","negativeAddedJobTargets","removedCompanyNameTargets","addedCompanyNameCriterion","removedCompanyNameCriterion","negativeRemovedCompanyNameTargets","negativeAddedCompanyNameCriterion","negativeRemovedCompanyNameCriterion","companyNameTargets","negativeCompanyNameTargets","initialCompanyNameTargets","initialNegativeCompanyNameTargets","addedCompanyNameTargets","negativeAddedCompanyNameTargets","Target","_ref10$overrideType","BidAdjustment","CriterionType","CampaignName","whitelistedSchemaPropertyKeysForModel","operatorOptions","equal","notequal","viewModelToModelForConversionGoals","CampaignConversionGoal","originalConversionGoals","viewModelToModelForCampaign","pick","bulkModelToViewModelForCampaign","campaignModel","originalCampaignModel","bundleCountries","isString","bulkModelToViewModelForConversionGoals","originalCampaignViewModel","bulkModelToViewModelForLocationTargets","locationTargetsModel","isDirty","loadCampaign","select","readCampaign","getProdutFilters","providerId","feedId","isDynamicDataFeedBasedCampaign","customerSelections","dynamicDataFeedConditionOptions","selectedConditionOptions","ProductConditionOptions","selectedFeedId","selectedFeed","console","FeedType","customerSelectedProductConditions","customerSelectedProductConditionsCopy","clone","defaultSelectedDataSource","customerSelectedProductCondition","selectedProductConditionItem","Operand","findTargetNodeAndAncestorsNodes","clonedItem","PresetOperator","Operator","ValueOptions","valueOptions","findHelper","valueOption","valueB","selectedValueArray","Attribute","selectedValueOption","selectedValueOptions","Selected","PresetValue","valueInput","isEnhancedPAFilterP1Enabled","valuesArr","output","multilineValueInputProcessor","IsEnhancedPAFilterP1Enabled","defaultSelectedDataSourceHelper","productFilter","_productFilter$Preset","selectedTexts","composeProductFilter","modelToViewModelForCampaign","_ref2$dayTimeCriterio","dayTimeCriterionsModel","locationCriterionsModel","targetCriterionsModel","_ref2$audienceCriteri","audienceCriterionsModel","modelToViewModelForConversionGoals","modelToViewModelForDayTimeTargets","modelToViewModelForLocationTargets","_ref12","modelToViewModelForTargetCriterionsBase","CRITERION_LEVEL","CAMPAIGN","deviceTypesOverride","initialDeviceTypes","abs","omit","modelToViewModelForTargetCriterions","initialAudiences","audience","AudienceId","AudienceCriterion","AudienceName","AudienceType","BidMultiplier","BidType","audiences","modelToViewModelForCampaignLevelAudienceCriterions","CampaignSettings","ProviderId","FeedId","SalesCountry","Priority","FeedTypeId","selectedProduct","getStoreNameById","CampaignSubTypes","AudienceDynamicFeedBased","readAdGroupAgeAndGenderCriterions","readAdGroupCriterions","readonlyPropertyKeysForModel","modelToViewModelForAdGroup","adGroupModel","_ref$isAudienceShoppi","CampaignBidStrategyName","AdRotation","RotationType","ProductPartitions","modelToViewModelForDateSetting","UseOptimizedTargeting","modelToViewModelForAudienceCriterions","convertMachineDateToAccountDate","parseDate","formatDateToAPIFormat","parseDateFromAPIFormat","dateFromMdyyyyFormat","dateFromyyyyMdFormat","viewModelToBulkModelForDateSetting","bulkModelToViewModelForAdGroup","originalAdGroupViewModel","AdGroupCriterions","bulkModelToViewModelForDayTimeTargets","bulkModelToViewModelForDateSetting","FrequencyCapSettings","deal","productPartition","bulkModelToViewModelForProductPartitions","loadAdGroup","AdGroups","readAdGroup","adGroupResource","ResourceIdentifier","createOrUpdateAdGroup","bulkUpdate","bulkCreate","bulkUpsertAdGroupSettingsEntityErrorMap","getBulkUploadErrorType","ERROR_ENTITY","viewModelToBulkModelForAdGroup","bundleLocationCriterions","_ref$customTargetingB","customTargetingBulkModel","_ref$saveAdGroupCrite","saveAdGroupCriterions","_ref$updateProductPar","updateProductPartitionBids","_ref$isProductGroupAl","isProductGroupAllowedForAudienceCampaign","isUpdate","doesCampaignExist","isAudienceCampaign","isAudienceDynamicFeedBasedCampaign","isProductGroupSupported","AdGroupNegativeReferenceId","CapValue","PricingModel","TargetSetting","viewModelToModelForAdGroup","modelToSave","viewModelToBulkModelForLocationTargets","adSchedulesModel","viewModelToBulkModelForAdSchedules","targetingModel","viewModelToBulkModelForAudiences","AdGroupAudienceCriterions","ProductAds","AdGroupName","PromotionalText","BidAmount","ProductCondition","ProductValue","IsExcluded","IsLeaf","saveAdGroup","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_ref2$customTargeting","_ref2$saveAdGroupCrit","_ref2$updateProductPa","_ref2$isProductGroupA","activityLogger","adGroupBulkModel","filteredErrors","serverErrors","wrap","_context","prev","sent","getErrorsPlaceholders","abrupt","t0","isBulkWrappedResponse","removeReferencedEntityInvalidIdErrors","modelToViewModelForBulkErrors","reject","systemErrors","_x","_x2","campaignResource","bulkUpsertCampaignSettingsEntityErrorMap","saveCampaign","_ref$viewModelToBulkM","_ref$updateCampaignSt","updateCampaignStatus","conversionGoalsAssociations","CampaignConversionGoalAssociations","viewModelToBulkModelForConversionGoals","locationModel","_ref11","locationTargets","locationRestricted","convertLocationStateToLocationSchemaCampaign","CampaignAudienceCriterions","audienceRestricted","initialAudience","typePrefix","criterionType","bulkOrSystemError","adGroupData","getCollapsiblePanelStyles","border","backgroundColor","borderBottom","themePrimary","themeDarker","textDecoration","transform","overflow","getPannelHeaderStyles","pannelHeader","LOG_STATUS","LOAD_START","LOAD_SUCCESS","SAVE_START","SAVE_SUCCESS","SAVE_FAIL","CANCEL","useWizardLog","wizardState","stepTime","useRef","loadStart","loadEnd","saveStart","saveEnd","logContent","step","getCurrentStepId","stepDuration","requestSpend","guid","traceLog","logPayload","onStepLoadedLog","_ref2$msg","nowTime","logs","onStepSavedLog","_ref3$msg","getProductData","GetProductData","dataName","salesCountry","countryCode","getCampaignCriterions","bypassCache","shouldShowPlaceholderStoreIfExists","getCampaignCriterionsOnly","getProductConditionOptions","getSalesCountryCollection","getDynamicDataFeedOptions","getCategoryFullData","getProductTypeFullData","getProductScopeData","getFeedDataWithCache","withDFMCache","getFeedData","useSummaryRepository","I18nContext","ScopeContext","DynamicPermissions","isPAAIMConsolidationEnabled","isOdataGetProductScopeEnabled","scenarioContext","ScenarioContext","ActivityContext","internalGetProductData","getAudienceProductDataWithCache","getProductDataWithCache","_scope$values","_state$context$wizard","isPublishing","_useWizardLog","savedCampaign","savedAdGroup","savedProductData","savedFeedData","isSearchShopping","loadPromises","locationCriterions","readAdGroupLocationCriterions","dayTimeCriterions","readDayTimeCriterions","targetCriterions","bundleCountriesAndLocationCriterions","loadBundleCountries","$top","pData","mergeData","savePromises","createActivity","_result$reason$server","getPriorityOptions","getShoppingSettingOptions","settingScenarioName","ccJsData","onStoreSelectionChange","onSalesCountryChange","onFeedLabelChange","setProductLoading","isCPSSelected","updateProductConditionOptions","updateChildLevelProductCondition","onSelectFilterProducts","campaignTypeConfig","isStoreValid","isSponsoredSettings","isSponsoredCampaign","isSPBCampaign","isSPBOptInAvailable","shouldUseNewMmcApiForSpa","hideBid","isAllFeedProducts","entityIsCampaign","entityIs","campaignProductFilterSchemeProp","andComp","propertyIs","ProductFilterWithCustomValidation","updateValidation","productFilterRef","useJsDataContext","newData","campaignSettingsProp","shoppingSettingOptions","SettingScenarios","PAAIMProductSetting","LegacyShoppingSettings","shoppingSettingsRef","ValidatedProductFilterSetting","withControlErrorHandling","withUnvalidatedControlErrors","withCustomValidation","StoreSettingWithCustomValidation","storeSettingRef","storeSettings","setStoreSettings","PAAIMStoreSetting","ValidatedStoreSetting","BMCRedirect","isEnabledForDynamicFeedCampaign","toBMC","getRouterDep","toDynamicDataManagement","ReactTemplate","CampaignPriority","onDataChange","restProps","priority","setPriority","onCampaignPriorityChange","Label","verticalAlign","HelpPopup","topic","ariaLabelledBy","resolveStyles","resolvedStyles","getCampaignStyles","divider","budgetContainer","fontWeight","campaignShell","creationCommonStyle","collapsiblePanel","estimationPart","flexGrow","marginLeft","urlOptionsContainer","PannelHeader","useDefaultStyles","TextTitle","OriginalTextTitle","as","getPanelErrorProps","needsAttention","CampaignSettingsStep","setSiteExclusionView","setIPExclusionView","siteExclusionViewRef","ipExclusionViewRef","productConditionsRef","isConversionAssociationWarningP3Enabled","legacyI18n","buildLegacyI18n","ValidationStringMap","campaignBiddingSchemeType","_useWizardService","createScenario","campaignStepIsValid","isEditMode","currentStates","toStrings","setIsCPSSelected","basicOptions","_useState3","_useState4","basicOptionsShown","setBasicOptionsShown","_useState5","_useState6","productLoading","noStore","showRedirectToBMC","_useCollapseState","useCollapseState","_useCollapseState2","allCampaignSettingsSections","campaignSettingsExpandedSections","setCampaignSettingsExpandedSections","basicSettingsExpand","collapseExpander","setActiveKeys","showAllValidationErrors","useFormService","saveFailed","onSelectionChange","triggerFeedLabelChange","removeProductGroup","country","triggerSalesCountryChange","isSelected","triggerIsFeedFilterChecked","updatedProductCondition","CampaignProductScope","hasFilteredProducts","campaignNameTitleDetails","campaignDetail","campaignUrlOptions","FinalUrlSuffix","conversionGoalsTitleDetails","getConversionGoalTitleDetails","storeTitleDetails","storeView","storesData","stores","getStores","countries","getCountries","getStoreTitleDetails","toObject","productFilterTitleDetails","productScope","getProductScope","product","operateMap","conditionValueCount","startsWith","condition","operatorString","getProductTileDetails","exclusionTitleDetails","exclusions","ExcludedSites","getValues","ExcludedIPs","getExclusionsDetails","urlTitleDetails","getUrlOptionsDetails","budgetBidStrategyTitleDetails","getBidBudgetTitleDetails","onCampaignNameChange","prefixTitle","matchStepState","STEP_STATES","SAVING","UPDATE_WIZARD_DATA","classNames","ActuationGroup","actuationProps","isActive","AttentionBeaconGroup","FormErrorGroup","formErrorProps","ValidationGroup","validationProps","onValidate","resultBiddingScheme","campaignBiddingScheme","biddingScheme","patchData","getMessageType","updatedData","customConfirmMessages","UnmappedFormErrors","Collapse","allPanelItems","checkItems","skipItemsTypeCheck","activeKeys","ValidatedPanel","titleKey","topicKey","details","attentionBeaconProps","getExtraProps","RemainingCharsValidatedTextField","campaignNameProp","onBlur","icon","budgetBidStrategyIcon","AudienceBudgetBidStrategy","SectionShimmer","ShoppingImg","expand","expandKey","ProductImg","Loading","isVisible","BaseExclusion","showSiteExclusion","showIPExclusion","UrlOptionsImg","ValidatedUrlOptionsParameter","initialValue","conversionGoalsIcon","ValidatedConversionGoals","getDynamicFeedData","useCampaignRepository","siteExclusionView","ipExclusionView","isCampaignCreate","InstrumentationContext","isShoppableAdsEnabled","savedCampaignId","setSavedCampaignId","AlertCenter","logProductApi","spendTime","getCampaignFromViewModel","_state$context$wizard2","productParams","savedSalesCountry","savedFeedLabel","generateNameSuggestionSuffix","Default","goalSelection","goalScopeSelection","Scopes","ACCOUNT","BudgetId","finalUrlExpansionOptOut","DeviceKeys","Computers","Tablets","Smartphones","getDefaultCampaign","productCall","nTime","productDataSource","savedProductConditions","isCostPerSaleEnabled","storeSettingView","productFilterView","isProductFilterValid","isSelectedStore","selectedCategory","AudienceFeedBased","storeSettingModel","SalesCountryValue","isFeedProductFilterEnabled","isFeedFilterChecked","CampaignCriterionsData","saveCampaignPromise","saveExtensionsInSettingFlow","extensionData","AdvanceSettings","Exclusions","exclusionRepository","saveExtensions","clearApiErrors","NegativeSitesResult","NegativeIPsResult","siteErrors","ipErrors","jsdata","destroy","BudgetBidCampaignImportNotificationActivity","initialCampaign","stepContexts","CAMPAIGN_SETTINGS","initialData","showBudgetBidCampaignNotifications","oldBudget","newBudget","oldBidStrategy","newBidStrategy","EXIT","wizardUpdateData","stepProps","fullCampaign","fullCampaignData","newProductData","updatedProductData","showAlert","getAdGroupStyles","toggle","alignSelf","adgroupShell","getTargetingPanels","advancedOptions","moreOptions","convertToGridTargetDetails","useParentLevel","parentLevelSettings","currentLevelSettings","targeted","bidAdjustmentDropdown","bidAdjustmentInput","DeviceTargets","deviceName","parseFloat","convertFromGridTargetDetails","mappedData","ValidatedTargetDevices","ServerValidatedTargetDevice","TargetingPreferences","isAudienceCampaing","optimizedTargetingEnabled","setOptimizedTargetingEnabled","campaignDeviceTargets","campaignAudiences","campaignIndustry","campaignNegativeIndustry","campaignJobTargets","campaignNegativeJobTargets","campaignCompanyNameTargets","campaignNegativeCompanyNameTargets","adGroupAudiences","adGroupIndustry","adGroupNegativeIndustry","adGroupJobTargets","adGroupNegativeJobTargets","adGroupCompanyNameTargets","adGroupNegativeCompanyNameTargets","allAdGroupTargetingSections","adgroupTargetingExpandedSections","setAdGroupTargetingExpandedSections","getCampaignSubType","ValidatedBootstrapPanel","defaultExpanded","BootstrapPanel","Heading","Title","Body","panelKey","formatAudience","ValidatedAudiencePicker","supportExclusion","DeviceImg","getGridTargetTitleDetails","formatCompany","ValidatedCompanyPicker","BrandAwarenessVideoAds","formatIndustry","ValidatedIndustryPicker","formatJobFunction","ValidatedJobFunctionPicker","ValidatedFixedPanel","PredictiveTargetingControlHeader","onToggleEnabledChanged","MessageBar","messageBarType","MessageBarType","warning","isMultiline","getAdRotationStyles","AdRotationMessageBar","themeLighterAlt","ValidatedAdRotation","_ref3$AdRotation","adRotation","adRotationOptions","campaignLocationCriterions","anyComp","CampaignLocation","CampaignRadius","CampaignNegativeLocation","CampaignLocationIntent","ServerValidatedLocationTargetSetting","ValidatedLocationTargetSetting","ServerValidatedLocationTargetSettingForAdGroup","AdGroupLocation","AdGroupRadius","AdGroupNegativeLocation","AdGroupLocationIntent","ServerValidatedAdDistributionSetting","ValidatedLegacyAdDistribution","adGroupLevelTargetListForAudienceFlow","adGroupPropertyList","TargetStep","withPermissions","withScope","flowType","isAgeGenderDisclaimerEnabled","AgeGenderDisclaimer","campaignLocationTargets","campaignGenderTypes","campaignAgeRanges","adGroupLocationTargets","adGroupGenderTypes","adGroupAgeRanges","_getTargetingPanels","allTargetSettingsSections","targetSettingsExpandedSections","setTargetSettingsExpandedSections","_useCollapseState3","_useCollapseState4","allMoreSettingsSections","moreSettingsExpandedSections","setMoreSettingsExpandedSections","allBasicExpand","adScheduleView","setAdScheduleView","adDistributionView","setAdDistributionView","locationTargetProps","allowNegativeLocationTargeting","isRadiusExcludeEnabled","hideIntent","defaultSelectedSearchType","SEARCH_TYPE","Boundary","adGroupProperties","mergedData","getTargetSettingsFromCriterions","getLocationTargetTitleDetails","locationTargetIcon","formatGenders","genderTargetIcon","Gender","hideUnknown","formatAgeRanges","ageTargetIcon","AgeRange","PredictiveTargetingHeader","startDateEndDateIcon","ValidatedLegacyDateSetting","TimeZone","Timezone","isCreate","adScheduleIcon","getAdScheduleDetails","ValidatedLegacyAdSchedule","isCreation","hideMinuteOptions","hideUseCampaignSetting","getTranslatedOption","Alert","AdGroupSettings","ProductGroupBidRange","_getAdGroupSettingsPa","showBid","getAdGroupSettingsPanels","allAdGroupSettingsSections","adGroupSettingsExpandedSections","setAdGroupSettingsExpandedSections","allBasicExpanded","CpmBid","bidValueIcon","AudienceBidValue","ceilingValue","floorValue","getAdGroup","defaultBidForShoppingCampaign","dayTimeRangs","negativeGenderTYpes","useTargetRepository","_getWizardData","getWizardData","readAdGroupTargetingCriterions","audienceCriterions","readAdGroupAudienceCriterions","getStyles","budgetBidShell","outline","BudgetBidStep","facInfo","biddingSchemeType","sharedBudgetView","setSharedBudgetView","optionsShown","setOptionsShown","allBudgetBidSections","budgetBidExpandedSections","setBudgetBidExpandedSections","bidTitleDetails","formatBidValue","isFACCouponActive","budgetView","updateFeatureAdoptionCoupon","showFACHint","couponValue","facCouponValue","currentBiddingSchemeType","filterOutBidPanel","BidStrategyId","setBudgetView","useBudgetBidRepository","campaignResult","adGroupResult","_error$serverErrors","getStepConfig","_ref$permissions","Activity","viewProps","stepConfig","machineOptions","guards","needsConfirming","getNeedConfirming","StepList","currentStepId","currentFlow","getCurrentFlow","displayMode","useResponsiveSize","Constants","ResponsiveSizeBreakpoints","stepListConfig","getStepListConfig","getDefaultOnItemClickFn","toStep","steps","firstSubStep","isBehind","ResponsiveStepList","getOnItemClickFn","SaveAndPublishButton","adoptCoupon","isBlocking","FETCHING","onNextClicked","SAVE_AND_EXIT","buttonText","disabled","SaveAndExitButton","_useWizardService2","isAdGroupSaving","NextButton","_useWizardService3","SAVE_AND_NEXT","BackButton","_useWizardService4","onBackClicked","BACK","StepFooter","nextButtonText","nextDisabled","backButtonText","cancelButtonText","isFirstStep","getIsFirstStep","isLastStep","getIsLastStep","currentStep","CancelButton","StandardShoppingCampaignWizardInternal","siteMap","adType","_props$createScenario","_props$currentCampaig","currentCampaign","_props$currentAdGroup","currentAdGroup","isCampaignCreation","isCampaignUpdate","routeToNavigateToWhenDone","getDestinationWhenDone","wizardType","getAdTypeFromCurrentCampaign","wizardPerfMarker","initialStep","getFirstStep","facCouponInfoRef","_useShoppingFAC","useShoppingFAC","ShoppingFACCallout","adoptCouponFromActiveStatus","facCoupon","showFACCallout","initialFlowFactors","initialWizardData","getFlow","onDone","onExited","attachStepActivities","setClarityTag","StandardShopping","PerformanceMarkerProvider","immediateDone","Scenario","ShoppingFACScenario","FACShoppingInSearchCampaignNew","MmpFetchProvider","Wizard","WizardPerfMarker","wizardName","wizardMarker","LayoutContainer","DefaultTemplate","Layout","component","StepContainer","footerProps","BusyBlocker","loadingText","CancelWizardDialog","ConfirmWizardDialog","useConfirmDialogConfigWithLogger","StandardShoppingCampaignWizard","withSiteMap","LegacyAdDistributionWithCustomValidation","getOptions","initialAdDistribution","setTranslateX","style","VirtualScrollbar","_React$PureComponent","onMouseUp","isDown","onMouseDown","offsetLeft","arr","translateX","getTranslateX","onMouseMove","offsetX","thumbWidth","viewWidth","viewOffsetX","scrollLeft","onViewScroll","parentStyle","childStyle","userSelect","UnStyledScrollbar","unmounted","pgridView","bottom","positionStatic","$table","$tfoot","fixedBottomOffset","containerOverflowX","shouldDisplay","positionFixed","gridViewWidth","gridPaddingLeft","scrollBarView","Scrollbar","withDefaultStyles","marginRight","scrollbarWidth","getTableWidth","reduce","toArray","memo","TablePageContainer","gridPopupHeight","virtualScrollbarFixed","virtualScrollbarInView","gridEventMap","lastVirtualScrollLeft","letPopUpScrollHorizontal","gridAndStickyContainer","topOfGridContainer","stickyContainer","gridAndDisclaimContainer","topMarker","isInView","bottomMarker","isHiddenInView","intersectionObserver","IntersectionObserver","handleIntersectionChange","rootMargin","threshold","resizeMarker","lastResizerWidth","resizeObserver","ResizeObserver","throttle","handleResizeChange","ResizeObserverPollyFill","SMALL_PADDING_LEFT_CLASS","shouldUseSmallPadding","customClasses","tablePageContainer","contains","childBar","parentWidth","stickyTopOfGridWidth","entries","entry","tablePageMinWidth","contentRect","backboneGridView","tableView","p$gridViewContainer","chain","getTableView","createEvent","handleScrollbar","isIntersecting","intersectionRatio","prevPopupHeight","popupHeight","getInlineEditPopupHeight","onScrollbarsViewUpdate","prevState","parentElement","viewportRect","topOfGridRect","gridAndStickyRect","shouldAdjustStickyTopOfGrid","tableWidth","gridViewHasHorizontalOverflow","round","emptyHeight","gridViewHasVerticalOverflow","newState","stickyTopOfGridTopOffset","stickyTopOfGridPosition","stickyTopOfGridHeight","scrollStateKeys","modifiedState","stateKey","handlePopup","observe","setScrollPosition","handleScroll","getChildBarScrollLeftValue","p$gridView","unobserve","prevProps","shiftThePopUp","$popup","inlineEditPopupSelector","currentLeft","newLeft","newTop","forceResetScrollFlag","scrollTop","getHeightIncludeAbsolutePositionedElements","boxShadow","pixels","v","getShadowWidthOutofYBorder","thead","tfoot","CustomDisclaimerBanner","DisclaimerBanner","stickyStyle","zIndex","ZIndexContentComponents","GridToolbar","_this$state","bottomMarkerRect","gridAndDisclaimContainerHeight","Fragment","pageContainer","onScroll","minWidth","topOfGridContent","stickyTopOfGridContent","gridContainer","gridViewContainer","noResultSelector","timezone","disableFooter","contentFooter","ContentFooter","StyledTablePageContainer","_ref$palette","flex","overflowX","overflowY","uiblockerStyle","getBidLandscapeStyle","getBudgetSuggestionPopupStyle","getInlineOpportunityStyle","helpbuttonStyle","Latch","onInitialized","resolveOnInitialized","isInitialized","isScheduled","defer","withTablePageStateManager","getToolbarConfig","WrappedComponent","GridPageStateManager","onGridInjected","rest","lazyInjected","release","onClearSelection","showToolbarSelected","showToolbarUnselected","isFunction","updateToolbar","toolbarSelectedConfigMerged","Map","toolbarSelectedConfig","toolbarDynamicSelectedConfig","dynamicValue","mergedValue","toolbarUnselectedConfig","resetToolbarVisibility","forceHideToolbar","showTopOfGridPanel","viewInstance","panelView","showTopGridPanel","forceHideInlineChart","showTopGridPanelAndContent","showInlineChartView","showInlineChart","updateGridSelectionState","selectionCount","isMultiPage","isSinglePageAllSelected","newTotal","initialSetGridNum","updateSelectedToolbarConfig","newSelectedConfig","updateUnselectedToolbarConfig","newUnselectedConfig","forceInitToolbarConfig","initial","renderToolbarContainer","_this2$state","ToolbarContainer","isUndefined","onClear","isOpenCreatePanel","crossPageSelectPlugin","getCrossPageSelectPlugin","history","search","onSelectCrossPage","_getToolbarConfig","updateGridOptions","lazyInject","toolbarDynamicSelectedConfigCallback","createToolbar","gridOptions","toolbarPlugin","getToolbarPlugin","resetVisibility","resetGraphVisibility","resetToolbarMode","toolbarConfig","updateToolbarDynamicSelectedConfig","dynamicSelectedConfig","p$data","withMergedI18n","Component","childI18n","HoC","Consumer","parentI18n","assign","mergeI18n","Provider","loadLegacyI18n","_ref$hasMultipleCultu","hasMultipleCultures","loadI18nWithMultipleCultures","loadI18n","loadPageWebpack","importFeature","importL10n","_ref2$hasLegacyI18n","hasLegacyI18n","_ref2$hasMultipleCult","_ref2$hasBingMap","hasBingMap","_ref2$hasGoogleApi","hasGoogleApi","nop","loadMap","__non_webpack_require__","Feature","accountSchema","schemaI18nCampaign","accountSummaryi18n","lazyLoadDeps","dateUtil","getSegPreference","segmentTimeChecker","fetchPaginationConfig","preferenceStoreFactory","customColumnPreference","dataContextManager","CacheService","i18nGlobal","accountsGridLegacyDepsListWebpack","AccountInactiveReason","alerts","urls","stateManagerHelper","customerHierachyPlugin","inlineDownloadPlugin","primaryContactsBulkEditPlugin","bulkActionAccountsGrid","bulkTransferAccounts","bulkUnlinkAccounts","qualityScoreClickHandler","qualityScoreTemplate","updateFilterSchema","jsDataRawPlugin","freqColumnTemplate","importLogNameTemplate","creatorColumnTemplate","importSummaryCol","singleUnlinkAccounts","columnChooserPreference","legacyColumnChooserPreference","linkedAccountsPreference","segmentationPreference","clientcenterUrlHelper","icons","schemaUtil","campaignInstrumentation","LabelAssociationView","SummaryDataContextManager","lazyLoadDep","getBulkUnlinkAccounts","getBulkTransferAccounts","getBulkActionAccountsGrid","getjsDataCampaign","pug","locals","pug_interp","pug_html","locals_for_with","escape","pug_mixins","$$obj","pug_index0","$$l","errorColumnIsHtml","pug_index1","pageTitle","isNewAudienceEnabled","header1","header2","header3","header5","header6","header7","popupId","ariaLabelContext","templateString","entityNameHeader","copiedHeader","pastedHeader","campaignHeader","showStopButton","link","isMultimediaAd","isMultimediaAdinMSANEnabled","isVerticalVideo","IdString","shouldShowActionNeededForGoogleImprotVideoAd","isPlaceholderMMA","imageCount","Headline","convertedFinalUrl","HeadlineCount","TextCount","budgetName","isBudgetCenterEntryEnabled","budgetTypeText","AssociatedExperiment","joiner","skipNavigation","linkText","closeText","displayText","score","KeywordRelevance","LandingPageRelevance","LandingPageQuality","OverallQualityScore","appealble","webpackEmptyContext"],"sourceRoot":""}