{"version":3,"sources":["webpack:///./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack:///./src/components/FormularioContato/index.js","webpack:///./src/components/FormularioContato/utils.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///./node_modules/@babel/runtime/regenerator/index.js"],"names":["asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","this","args","arguments","apply","err","undefined","timeoutMsgEmail","timeoutMsgTelefone","timeoutMsgCatalogo","formOrcamento","intl","useIntl","useState","enviandoFormulario","setEnviandoFormulario","exibeMsgSucesso","setExibeMsgSucesso","nome","setNome","email","setEmail","emailVazio","setEmailVazio","emailInvalido","setEmailInvalido","telefone","setTelefone","telefoneVazio","setTelefoneVazio","opcoesProdutos","vazio","catalogo","setCatalogo","catalogoVazio","setCatalogoVazio","mensagem","setMensagem","useEffect","interesseParam","URLSearchParams","window","location","search","get","configInteresse","Object","values","find","opcao","param","document","querySelector","setAttribute","formularioValido","valores","clearTimeout","setTimeout","validaEmail","enviaFormulario","a","bodyEmail","data","From","To","Subject","Body","searchParams","keys","map","prop","encodeURIComponent","join","fetch","method","headers","body","rawResponse","text","formularioEnviado","tentaEnviarFormulario","event","type","preventDefault","role","className","id","dir","noValidate","name","size","aria-required","aria-invalid","placeholder","formatMessage","onChange","e","target","style","color","fontStyle","onBlur","label","cols","rows","marginTop","marginBottom","height","onClick","onKeyDown","clear","textAlign","visibility","display","expresso","mobile","impresso","personalizado","desenhos","runtime","exports","Op","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","defineProperty","enumerable","configurable","writable","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","makeInvokeMethod","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","result","__await","unwrapped","TypeError","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","constructor","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","async","iter","toString","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","Function"],"mappings":"gIAAA,SAASA,EAAmBC,EAAKC,EAASC,EAAQC,EAAOC,EAAQC,EAAKC,GACpE,IACE,IAAIC,EAAOP,EAAIK,GAAKC,GAChBE,EAAQD,EAAKC,MACjB,MAAOC,GAEP,YADAP,EAAOO,GAILF,EAAKG,KACPT,EAAQO,GAERG,QAAQV,QAAQO,GAAOI,KAAKT,EAAOC,GAIxB,SAASS,EAAkBC,GACxC,OAAO,WACL,IAAIC,EAAOC,KACPC,EAAOC,UACX,OAAO,IAAIP,SAAQ,SAAUV,EAASC,GACpC,IAAIF,EAAMc,EAAGK,MAAMJ,EAAME,GAEzB,SAASd,EAAMK,GACbT,EAAmBC,EAAKC,EAASC,EAAQC,EAAOC,EAAQ,OAAQI,GAGlE,SAASJ,EAAOgB,GACdrB,EAAmBC,EAAKC,EAASC,EAAQC,EAAOC,EAAQ,QAASgB,GAGnEjB,OAAMkB,O,6DCtBG,gBAAwB,IAmCjCC,EACAC,EACAC,EArCYC,EAAoB,EAApBA,cACVC,EAAOC,oBADuB,EAGgBC,oBAAS,GAAtDC,EAH6B,KAGTC,EAHS,OAIUF,oBAAS,GAAhDG,EAJ6B,KAIZC,EAJY,OAKZJ,mBAAS,IAA1BK,EAL6B,KAKvBC,EALuB,OA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EAAMQ,WACnB,GAAoB,UAAhBnC,EAAO/E,KAAkB,CAC3B,IAAIwJ,EAASzE,EAAO1K,IACpB4M,EAAcP,GAEhB,OAAO8C,GAMX,MAAM,IAAInF,MAAM,0BAGlBoF,cAAe,SAASrC,EAAUf,EAAYE,GAa5C,OAZAxL,KAAKwJ,SAAW,CACdzB,SAAUjF,EAAOuJ,GACjBf,WAAYA,EACZE,QAASA,GAGS,SAAhBxL,KAAKyE,SAGPzE,KAAKV,SA7rBPe,GAgsBOsJ,IAQJpC,EA7sBK,CAotBiBoH,EAAOpH,SAGtC,IACEqH,mBAAqBtH,EACrB,MAAOuH,GAUPC,SAAS,IAAK,yBAAdA,CAAwCxH,K,qBC1uB1CqH,EAAOpH,QAAU,EAAQ","file":"9baebe3741cf8a343b33f069108a6e3dae9268ad-3462ccce9376d53ab212.js","sourcesContent":["function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","import React, { useEffect, useState } from 'react';\nimport { useIntl } from 'gatsby-plugin-intl';\nimport { opcoesProdutos } from './utils';\nimport { validaEmail } from '../../libs/util/utils';\n\nconst PAGINA_ENVIA_EMAIL = 'https://ideia2001.com.br/EnviaEmailIdeia2001.asp';\nconst EMAIL_COMERCIAL = 'comercial@ideia2001.com.br';\nconst EMAIL_CONTATO = 'contato@ideia2001.com.br';\n\nexport default ({ formOrcamento }) => {\n const intl = useIntl();\n\n const [enviandoFormulario, setEnviandoFormulario] = useState(false);\n const [exibeMsgSucesso, setExibeMsgSucesso] = useState(false);\n const [nome, setNome] = useState('');\n const [email, setEmail] = useState('');\n const [emailVazio, setEmailVazio] = useState(false);\n const [emailInvalido, setEmailInvalido] = useState(false);\n const [telefone, setTelefone] = useState('');\n const [telefoneVazio, setTelefoneVazio] = useState(false);\n const [catalogo, setCatalogo] = useState(opcoesProdutos.vazio.value);\n const [catalogoVazio, setCatalogoVazio] = useState(false);\n const [mensagem, setMensagem] = useState('');\n\n // seta catalogo de acordo com o parametro interesse na url\n useEffect(() => {\n const params = new URLSearchParams(window.location.search);\n const interesseParam = params.get('interesse');\n\n if (!interesseParam) return;\n\n const configInteresse = Object\n .values(opcoesProdutos)\n .find((opcao) => opcao.param === interesseParam);\n\n if (!configInteresse) return;\n\n setCatalogo(configInteresse.value);\n }, []);\n\n useEffect(() => {\n document.querySelector('.wpcf7-form').setAttribute('action', 'https://ideia2001.com.br/enviaEmail.asp');\n }, []);\n\n let timeoutMsgEmail;\n let timeoutMsgTelefone;\n let timeoutMsgCatalogo;\n\n const limpaCampos = () => {\n setNome('');\n setEmail('');\n setTelefone('');\n if (formOrcamento) setCatalogo(opcoesProdutos.vazio.value);\n setMensagem('');\n };\n\n const formularioValido = (valores) => {\n if (!valores.email) {\n setEmailVazio(true);\n clearTimeout(timeoutMsgEmail);\n timeoutMsgEmail = setTimeout(() => {\n setEmailVazio(false);\n }, 3000);\n return false;\n }\n if (!valores.telefone) {\n setTelefoneVazio(true);\n clearTimeout(timeoutMsgTelefone);\n timeoutMsgTelefone = setTimeout(() => {\n setTelefoneVazio(false);\n }, 3000);\n return false;\n }\n if (formOrcamento && catalogo === opcoesProdutos.vazio.value) {\n setCatalogoVazio(true);\n clearTimeout(timeoutMsgCatalogo);\n timeoutMsgCatalogo = setTimeout(() => {\n setCatalogoVazio(false);\n }, 3000);\n return false;\n }\n if (!validaEmail(valores.email)) {\n setEmailInvalido(true);\n clearTimeout(timeoutMsgEmail);\n timeoutMsgEmail = setTimeout(() => {\n setEmailInvalido(false);\n }, 3000);\n return false;\n }\n return true;\n };\n\n const enviaFormulario = async (valores) => {\n setEnviandoFormulario(true);\n let bodyEmail = '';\n if (valores.nome) bodyEmail = `${bodyEmail}Nome: ${valores.nome}
`;\n if (valores.email) bodyEmail = `${bodyEmail}E-mail: ${valores.email}
`;\n if (valores.telefone) bodyEmail = `${bodyEmail}Telefone: ${valores.telefone}
`;\n if (valores.catalogo) bodyEmail = `${bodyEmail}Catálogo: ${valores.catalogo}
`;\n if (valores.mensagem) bodyEmail = `${bodyEmail}Mensagem: ${valores.mensagem}`;\n const data = {\n From: formOrcamento ? EMAIL_COMERCIAL : EMAIL_CONTATO,\n To: formOrcamento ? EMAIL_COMERCIAL : EMAIL_CONTATO,\n Subject: 'Ideia 2001 ' + (valores.nome || ''),\n Body: bodyEmail,\n };\n\n const searchParams = Object.keys(data)\n .map((prop) => `${encodeURIComponent(prop)}=${encodeURIComponent(data[prop])}`)\n .join('&');\n\n try {\n const rawResponse = await window.fetch(PAGINA_ENVIA_EMAIL, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',\n },\n body: searchParams,\n });\n\n return rawResponse.text();\n } catch (e) {\n return '';\n }\n };\n\n const formularioEnviado = () => {\n limpaCampos();\n setEnviandoFormulario(false);\n setExibeMsgSucesso(true);\n setTimeout(() => {\n setExibeMsgSucesso(false);\n }, 3000);\n };\n\n const tentaEnviarFormulario = async (event) => {\n if (event.type === 'keydown' && (event.key === 'Tab' || event.key === 'Shift')) {\n return;\n }\n\n event.preventDefault();\n\n const valores = {\n nome,\n email,\n telefone,\n catalogo: formOrcamento ? catalogo : '',\n mensagem,\n };\n if (formularioValido(valores)) {\n await enviaFormulario(valores);\n formularioEnviado();\n }\n };\n\n return (\n
\n
\n

\n \n setNome(e.target.value)}\n />\n \n
\n \n setEmail(e.target.value)}\n />\n {emailVazio ? (\n {intl.formatMessage({ id: 'E-mail deve ser preenchido' })}\n ) : null}\n {emailInvalido ? (\n {intl.formatMessage({ id: 'E-mail inválido' })}\n ) : null}\n \n
\n \n setTelefone(e.target.value)}\n />\n {telefoneVazio ? (\n {intl.formatMessage({ id: 'Telefone deve ser preenchido' })}\n ) : null}\n \n
\n\n {formOrcamento ? (\n <>\n \n setCatalogo(e.target.value)}\n onChange={(e) => setCatalogo(e.target.value)}\n >\n {Object.values(opcoesProdutos).map((opcao) => (\n \n {intl.formatMessage({ id: opcao.label })}\n \n ))}\n \n {catalogoVazio ? (\n {intl.formatMessage({ id: 'Produto deve ser preenchido' })}\n ) : null}\n \n
\n \n ) : null}\n\n \n setMensagem(e.target.value)}\n >\n \n
\n \n

\n
\n \n
\n
\n {intl.formatMessage({ id: 'Agradecemos a sua mensagem' })}.\n
\n
\n
\n );\n};\n","export const opcoesProdutos = {\n vazio: {\n value: \"Selecione um produto\",\n label: \"Selecione um produto\",\n param: \"vazio\",\n },\n expresso: {\n value: \"Catálogo Expresso Instalado\",\n label: \"Catálogo Expresso Instalado\",\n param: \"expresso\",\n },\n mobile: {\n value: \"Catálogo Expresso Mobile\",\n label: \"Catálogo Expresso Mobile\",\n param: \"mobile\",\n },\n impresso: {\n value: \"Catálogo Impresso\",\n label: \"Catálogo Impresso\",\n param: \"impresso\",\n },\n personalizado: {\n value: \"Catálogo Personalizado\",\n label: \"Catálogo Personalizado\",\n param: \"personalizado\",\n },\n desenhos: {\n value: \"Desenhos e Ilustrações Técnicas\",\n label: \"Desenhos e Ilustrações Técnicas\",\n param: \"desenhos\",\n },\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = require(\"regenerator-runtime\");\n"],"sourceRoot":""}