(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-0f6a2a85"],{

/***/ "6c61":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"2af3f160-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/popup/App/GetAdKeyword.vue?vue&type=template&id=5c19ed41&scoped=true&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ad-keyword-container"},[_c('h4',{staticClass:"ad-header"},[_vm._v("提取广告ID")]),(_vm.step === 0)?_c('section',{staticClass:"no-ad-page ad-section"},[_c('h5',{staticClass:"tips"},[_vm._v("提示")]),_vm._m(0)]):(_vm.step === 1)?_c('section',{staticClass:"ad-section"},[_c('h5',{staticClass:"tips"},[_vm._v("请验证")]),_c('p',[_vm._v("当前页面中的广告活动和广告组如下：")]),_c('p',[_vm._v("广告活动："+_vm._s(_vm.adActivityName))]),_c('P',[_vm._v("广告组："+_vm._s(_vm.adGroupName))]),_c('p',[_vm._v("请确认和抢位任务中选择的广告活动和广告组是否一致；")]),_c('br'),_c('p',[_vm._v("确认一致后请输入抢位任务中的验证码继续获取；")]),_c('p',[_vm._v("如不一致，请关闭插件、打开和抢位任务中一致的广告活动和广告组后再获取。")]),_c('div',{staticClass:"verify-code"},[_vm._v("\n      验证码："),_c('el-input',{staticClass:"verify-input",model:{value:(_vm.inputVerifyCode),callback:function ($$v) {_vm.inputVerifyCode=$$v},expression:"inputVerifyCode"}}),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.getAdData}},[_vm._v("继续")])],1)],1):(_vm.step === 2)?_c('section',{staticClass:"ad-section"},[_c('p',[_vm._v("广告活动："+_vm._s(_vm.adActivityName))]),_c('p',[_vm._v("广告组："+_vm._s(_vm.adGroupName))]),_c('div',{staticClass:"ad-list"},[_c('span',[_vm._v("广告：")]),_c('ul',_vm._l((_vm.adList),function(item,key){return _c('ol',{key:key},[_vm._v(_vm._s(item.asin)+"   "+_vm._s(item.id))])}),0)]),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.handleCopy}},[_vm._v("复制")])],1):_vm._e()])}
var staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_vm._v("\n      1、当前打开的不是广告列表页面，请打开指定广告组的广告列表页面后再使用插件；\n    "),_c('br'),_vm._v("2、该功能需结合关键词抢位一起使用，仅用于提取广告ID。\n    ")])}]


// CONCATENATED MODULE: ./src/popup/App/GetAdKeyword.vue?vue&type=template&id=5c19ed41&scoped=true&

// EXTERNAL MODULE: ./src/utils/util.js
var util = __webpack_require__("ca00");

// EXTERNAL MODULE: ./src/config.js
var config = __webpack_require__("db49");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/popup/App/GetAdKeyword.vue?vue&type=script&lang=js&
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }

function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//



/* harmony default export */ var GetAdKeywordvue_type_script_lang_js_ = ({
  name: 'GetAdKeyWord',
  data: function data() {
    return {
      step: '',
      // 0:当前打开不是广告列表页面、1：请验证、2：已验证，显示数据
      inputVerifyCode: '',
      adActivityName: '',
      adGroupName: '',
      adGroupId: '',
      adList: []
    };
  },
  methods: {
    adInit: function adInit() {
      var _this = this;

      // 获取当前打开tab,判断是否是广告组页面
      var url;
      chrome.tabs.query({
        active: true
      }, /*#__PURE__*/function () {
        var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(tabs) {
          var url, _iterator, _step, item, campaigns, adPage, _yield$nativeRequest$, adActivity, _yield$nativeRequest$2, adGroupName;

          return _regeneratorRuntime().wrap(function _callee$(_context) {
            while (1) {
              switch (_context.prev = _context.next) {
                case 0:
                  _iterator = _createForOfIteratorHelper(tabs);
                  _context.prev = 1;

                  _iterator.s();

                case 3:
                  if ((_step = _iterator.n()).done) {
                    _context.next = 11;
                    break;
                  }

                  item = _step.value;
                  console.log('url', item.url, item);

                  if (!(item.url && item.url.match(/\/cm\/sp\/campaigns\/\w+\/ad-groups\/\w+\/ads\?entityId=\w+/))) {
                    _context.next = 9;
                    break;
                  }

                  url = item.url;
                  return _context.abrupt("break", 11);

                case 9:
                  _context.next = 3;
                  break;

                case 11:
                  _context.next = 16;
                  break;

                case 13:
                  _context.prev = 13;
                  _context.t0 = _context["catch"](1);

                  _iterator.e(_context.t0);

                case 16:
                  _context.prev = 16;

                  _iterator.f();

                  return _context.finish(16);

                case 19:
                  if (url) {
                    _context.next = 22;
                    break;
                  }

                  _this.step = 0;
                  return _context.abrupt("return");

                case 22:
                  campaigns = url.match(/\/campaigns\/(\w+)\//)[1];
                  _this.campaignId = campaigns;
                  _this.host = url.match(/^(https?:\/\/[^/]+)/)[0];
                  _this.groups = url.match(/\/ad-groups\/(\w+)\//)[1];
                  _this.entityId = url.match(/entityId=(\w+)/)[1]; // 获取csrfToken

                  _context.next = 29;
                  return Object(util["z" /* nativeRequest */])(url, 'get').catch(function (e) {
                    return console.log(e);
                  });

                case 29:
                  adPage = _context.sent;
                  _this.csrfToken = adPage.match(/csrfToken:\s*"(.*?)"/)[1];
                  console.log('csrfTokencsrfTokencsrfToken', _this.csrfToken); // 获取广告活动、广告组名称

                  _context.next = 34;
                  return Object(util["z" /* nativeRequest */])("".concat(_this.host, "/cm/api/sp/campaigns/").concat(campaigns, "?entityId=").concat(_this.entityId), 'get', {}, {
                    'x-csrf-token': _this.csrfToken
                  }).catch(function (e) {
                    return console.log("\u83B7\u53D6\u5E7F\u544A\u6D3B\u52A8\u5931\u8D25---".concat(e));
                  });

                case 34:
                  _yield$nativeRequest$ = _context.sent;
                  adActivity = _yield$nativeRequest$.campaign;
                  _context.next = 38;
                  return Object(util["z" /* nativeRequest */])("".concat(_this.host, "/cm/api/sp/adgroups/").concat(_this.groups, "?entityId=").concat(_this.entityId), 'get', {}, {
                    'x-csrf-token': _this.csrfToken
                  }).catch(function (e) {
                    return console.log("\u83B7\u53D6\u5E7F\u544A\u7EC4\u5931\u8D25---".concat(e));
                  });

                case 38:
                  _yield$nativeRequest$2 = _context.sent;
                  adGroupName = _yield$nativeRequest$2.name;
                  _this.step = 1;
                  _this.adActivityName = adActivity.name;
                  _this.adGroupName = adGroupName;

                case 43:
                case "end":
                  return _context.stop();
              }
            }
          }, _callee, null, [[1, 13, 16, 19]]);
        }));

        return function (_x) {
          return _ref.apply(this, arguments);
        };
      }());
    },
    getAdData: function getAdData() {
      var _this2 = this;

      return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
        var verifyCodeRes, url, requestHearderId, res;
        return _regeneratorRuntime().wrap(function _callee2$(_context2) {
          while (1) {
            switch (_context2.prev = _context2.next) {
              case 0:
                if (_this2.inputVerifyCode) {
                  _context2.next = 3;
                  break;
                }

                _this2.$message.warning('请输入验证码，此验证码可在添加抢位任务的页面中获取');

                return _context2.abrupt("return");

              case 3:
                _context2.next = 5;
                return Object(util["z" /* nativeRequest */])("".concat(config["e" /* adApi */], "external/grab/verify"), 'post', {
                  code: _this2.inputVerifyCode
                }).catch(function (e) {});

              case 5:
                verifyCodeRes = _context2.sent;

                if (!(!verifyCodeRes || !verifyCodeRes.successful)) {
                  _context2.next = 9;
                  break;
                }

                _this2.$message.warning(verifyCodeRes ? verifyCodeRes.message : '验证码校验失败，请重试');

                return _context2.abrupt("return");

              case 9:
                url = "".concat(_this2.host, "/cm/api/sp/adgroups/").concat(_this2.groups, "/ads"); // 监听请求添加referer

                _context2.next = 12;
                return Object(util["I" /* setRequestHearder */])([{
                  name: 'Referer',
                  value: "".concat(_this2.host, "/cm/sp/campaigns/").concat(_this2.campaignId, "/ad-groups/").concat(_this2.groups, "/ads?entityId=").concat(_this2.entityId)
                }, {
                  name: 'origin',
                  value: _this2.host
                }], "".concat(url, "*"));

              case 12:
                requestHearderId = _context2.sent;
                _context2.next = 15;
                return Object(util["z" /* nativeRequest */])("".concat(url, "?entityId=").concat(_this2.entityId, "&"), 'post', {
                  pageOffset: 0,
                  pageSize: 300,
                  sort: null,
                  period: "LIFETIME",
                  startDateUTC: Date.now() - 10 * 365 * 24 * 60 * 60 * 1000,
                  endDateUTC: Date.now(),
                  filters: [{
                    "field": "AD_STATE",
                    "not": false,
                    "operator": "EXACT",
                    "values": ["ENABLED", "PAUSED", "ARCHIVED"]
                  }],
                  // timeSeriesInterval: "MONTH",
                  programType: "SP",
                  fields: ["AD_STATE", "AD_NAME", "AD_ELIGIBILITY_STATUS", "AD_ASIN", "AD_SKU", "IMPRESSIONS", "CLICKS", "SPEND", "CTR", "CPC", "ORDERS", "SALES", "ACOS", "ROAS"] // version: "V2"

                }, {
                  'x-csrf-token': _this2.csrfToken
                }).catch(function (e) {
                  return console.log("\u83B7\u53D6\u5E7F\u544A\u6570\u636E\u5931\u8D25---".concat(e));
                });

              case 15:
                res = _context2.sent;
                // 移除请求头监听
                requestHearderId && Object(util["D" /* removeDeclarativeNetRequestRules */])([requestHearderId]);
                _this2.step = 2;
                _this2.adList = res ? res.ads : [];

              case 19:
              case "end":
                return _context2.stop();
            }
          }
        }, _callee2);
      }))();
    },
    handleCopy: function handleCopy() {
      /* 获取文本内容 */
      var copyText = document.createElement("textarea");
      copyText.value = ["\u5E7F\u544A\u6D3B\u52A8\uFF1A".concat(this.adActivityName, "\n"), "\u5E7F\u544A\u7EC4\uFF1A".concat(this.adGroupName, "\n")].concat(_toConsumableArray(this.adList.map(function (_ref2) {
        var asin = _ref2.asin,
            id = _ref2.id;
        return "".concat(asin, "  ").concat(id, "\n");
      }))).join('');
      /* 选择复制内容 */

      copyText.select();
      /* 复制内容到文本域 */

      navigator.clipboard.writeText(copyText.value);
      this.$message.success('复制成功');
    }
  },
  created: function created() {
    this.adInit();
  }
});
// CONCATENATED MODULE: ./src/popup/App/GetAdKeyword.vue?vue&type=script&lang=js&
 /* harmony default export */ var App_GetAdKeywordvue_type_script_lang_js_ = (GetAdKeywordvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./src/popup/App/GetAdKeyword.vue?vue&type=style&index=0&id=5c19ed41&lang=scss&scoped=true&
var GetAdKeywordvue_type_style_index_0_id_5c19ed41_lang_scss_scoped_true_ = __webpack_require__("ad48");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./src/popup/App/GetAdKeyword.vue






/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  App_GetAdKeywordvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  "5c19ed41",
  null
  
)

/* harmony default export */ var GetAdKeyword = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ "80a4":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "ad48":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GetAdKeyword_vue_vue_type_style_index_0_id_5c19ed41_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("80a4");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GetAdKeyword_vue_vue_type_style_index_0_id_5c19ed41_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GetAdKeyword_vue_vue_type_style_index_0_id_5c19ed41_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ })

}]);