text: "use strict";(function(){function t(){return void 0===n._deviceDataId&&(n._deviceDataId=r.codec.base64.fromBits(r.random.randomWords(6,0)).replace(/[\+\/]/g,"0")),n._deviceDataId}function e(t,e,o){setTimeout(function(){if(!document.getElementById(o)){var n=document.createElement("iframe")
  n.id=o,n.width=1,n.height=1,n.frameBorder=0,n.scrolling="no",n.src=t,document.body.appendChild(n)
  var r=document.createElement("img")
  r.src=e,r.width=1,r.height=1,n.appendChild(r)}},50)}function o(){var o,r="?m="+(OpenPay.sandboxMode?n._sandboxCollectorId:n._collectorId)+"&s="+encodeURIComponent(t())
  o=OpenPay.developMode?n._developHostname:OpenPay.sandboxMode?n._sandboxHostname:n._hostname
  var i=o+n._collectorImg+r,s=o+n._collectorIframe+r
  return e(s,i,"_op_data_r"),t()}var n=function(){}
  n._hostname="https://api.openpay.mx/",n._sandboxHostname="https://sandbox-api.openpay.mx/",n._developHostname="https://dev-api.openpay.mx/",n._collectorIframe="logo.htm",n._collectorImg="logo.gif",n._collectorId=203e3,n._sandboxCollectorId=203e3,n._deviceDataId=void 0,n.setup=function(e,n){if(e){var r=document.getElementById(e).appendChild(document.createElement("input"))
  r.type="hidden",r.value=t(),r.name=n?n:"deviceDataId",r.id=n?n:"deviceDataId"}return o()},OpenPay.deviceData=n
  var r={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(t){this.toString=function(){return"CORRUPT: "+this.message},this.message=t},invalid:function(t){this.toString=function(){return"INVALID: "+this.message},this.message=t},bug:function(t){this.toString=function(){return"BUG: "+this.message},this.message=t},notReady:function(t){this.toString=function(){return"NOT READY: "+this.message},this.message=t}}}
  "undefined"!=typeof module&&module.exports&&(module.exports=r),r.cipher.aes=function(t){this._tables[0][0][0]||this._precompute()
  var e,o,n,i,s,a=this._tables[0][4],h=this._tables[1],c=t.length,l=1
  if(4!==c&&6!==c&&8!==c)throw new r.exception.invalid("invalid aes key size")
  for(this._key=[i=t.slice(0),s=[]],e=c;4*c+28>e;e++)n=i[e-1],(e%c===0||8===c&&e%c===4)&&(n=a[n>>>24]<<24^a[n>>16&255]<<16^a[n>>8&255]<<8^a[255&n],e%c===0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),i[e]=i[e-c]^n
  for(o=0;e;o++,e--)n=i[3&o?e:e-4],s[o]=4>=e||4>o?n:h[0][a[n>>>24]]^h[1][a[n>>16&255]]^h[2][a[n>>8&255]]^h[3][a[255&n]]},r.cipher.aes.prototype={encrypt:function(t){return this._crypt(t,0)},decrypt:function(t){return this._crypt(t,1)},_tables:[[[],[],[],[],[]],[[],[],[],[],[]]],_precompute:function(){var t,e,o,n,r,i,s,a,h,c=this._tables[0],l=this._tables[1],d=c[4],_=l[4],u=[],f=[]
  for(t=0;256>t;t++)f[(u[t]=t<<1^283*(t>>7))^t]=t
  for(e=o=0;!d[e];e^=n||1,o=f[o]||1)for(s=o^o<<1^o<<2^o<<3^o<<4,s=s>>8^255&s^99,d[e]=s,_[s]=e,i=u[r=u[n=u[e]]],h=16843009*i^65537*r^257*n^16843008*e,a=257*u[s]^16843008*s,t=0;4>t;t++)c[t][e]=a=a<<24^a>>>8,l[t][s]=h=h<<24^h>>>8
  for(t=0;5>t;t++)c[t]=c[t].slice(0),l[t]=l[t].slice(0)},_crypt:function(t,e){if(4!==t.length)throw new r.exception.invalid("invalid aes block size")
  var o,n,i,s,a=this._key[e],h=t[0]^a[0],c=t[e?3:1]^a[1],l=t[2]^a[2],d=t[e?1:3]^a[3],_=a.length/4-2,u=4,f=[0,0,0,0],p=this._tables[e],m=p[0],g=p[1],y=p[2],v=p[3],E=p[4]
  for(s=0;_>s;s++)o=m[h>>>24]^g[c>>16&255]^y[l>>8&255]^v[255&d]^a[u],n=m[c>>>24]^g[l>>16&255]^y[d>>8&255]^v[255&h]^a[u+1],i=m[l>>>24]^g[d>>16&255]^y[h>>8&255]^v[255&c]^a[u+2],d=m[d>>>24]^g[h>>16&255]^y[c>>8&255]^v[255&l]^a[u+3],u+=4,h=o,c=n,l=i
  for(s=0;4>s;s++)f[e?3&-s:s]=E[h>>>24]<<24^E[c>>16&255]<<16^E[l>>8&255]<<8^E[255&d]^a[u++],o=h,h=c,c=l,l=d,d=o
  return f}},r.bitArray={bitSlice:function(t,e,o){return t=r.bitArray._shiftRight(t.slice(e/32),32-(31&e)).slice(1),void 0===o?t:r.bitArray.clamp(t,o-e)},extract:function(t,e,o){var n,r=Math.floor(-e-o&31)
  return n=-32&(e+o-1^e)?t[e/32|0]<<32-r^t[e/32+1|0]>>>r:t[e/32|0]>>>r,n&(1<<o)-1},concat:function(t,e){if(0===t.length||0===e.length)return t.concat(e)
  var o=t[t.length-1],n=r.bitArray.getPartial(o)
  return 32===n?t.concat(e):r.bitArray._shiftRight(e,n,0|o,t.slice(0,t.length-1))},bitLength:function(t){var e,o=t.length
  return 0===o?0:(e=t[o-1],32*(o-1)+r.bitArray.getPartial(e))},clamp:function(t,e){if(32*t.length<e)return t
  t=t.slice(0,Math.ceil(e/32))
  var o=t.length
  return e=31&e,o>0&&e&&(t[o-1]=r.bitArray.partial(e,t[o-1]&2147483648>>e-1,1)),t},partial:function(t,e,o){return 32===t?e:(o?0|e:e<<32-t)+1099511627776*t},getPartial:function(t){return Math.round(t/1099511627776)||32},equal:function(t,e){if(r.bitArray.bitLength(t)!==r.bitArray.bitLength(e))return!1
  var o,n=0
  for(o=0;o<t.length;o++)n|=t[o]^e[o]
  return 0===n},_shiftRight:function(t,e,o,n){var i,s,a=0
  for(void 0===n&&(n=[]);e>=32;e-=32)n.push(o),o=0
  if(0===e)return n.concat(t)
  for(i=0;i<t.length;i++)n.push(o|t[i]>>>e),o=t[i]<<32-e
  return a=t.length?t[t.length-1]:0,s=r.bitArray.getPartial(a),n.push(r.bitArray.partial(e+s&31,e+s>32?o:n.pop(),1)),n},_xor4:function(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]}},r.codec.utf8String={fromBits:function(t){var e,o,n="",i=r.bitArray.bitLength(t)
  for(e=0;i/8>e;e++)0===(3&e)&&(o=t[e/4]),n+=String.fromCharCode(o>>>24),o<<=8
  return decodeURIComponent(escape(n))},toBits:function(t){t=unescape(encodeURIComponent(t))
  var e,o=[],n=0
  for(e=0;e<t.length;e++)n=n<<8|t.charCodeAt(e),3===(3&e)&&(o.push(n),n=0)
  return 3&e&&o.push(r.bitArray.partial(8*(3&e),n)),o}},r.codec.base64={_chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(t,e,o){var n,i="",s=0,a=r.codec.base64._chars,h=0,c=r.bitArray.bitLength(t)
  for(o&&(a=a.substr(0,62)+"-_"),n=0;6*i.length<c;)i+=a.charAt((h^t[n]>>>s)>>>26),6>s?(h=t[n]<<6-s,s+=26,n++):(h<<=6,s-=6)
  for(;3&i.length&&!e;)i+="="
  return i},toBits:function(t,e){t=t.replace(/\s|=/g,"")
  var o,n,i=[],s=0,a=r.codec.base64._chars,h=0
  for(e&&(a=a.substr(0,62)+"-_"),o=0;o<t.length;o++){if(n=a.indexOf(t.charAt(o)),0>n)throw new r.exception.invalid("this isn't base64!")
  s>26?(s-=26,i.push(h^n>>>s),h=n<<32-s):(s+=6,h^=n<<32-s)}return 56&s&&i.push(r.bitArray.partial(56&s,h,1)),i}},r.codec.base64url={fromBits:function(t){return r.codec.base64.fromBits(t,1,1)},toBits:function(t){return r.codec.base64.toBits(t,1)}},r.hash.sha256=function(t){this._key[0]||this._precompute(),t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},r.hash.sha256.hash=function(t){return(new r.hash.sha256).update(t).finalize()},r.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=r.codec.utf8String.toBits(t))
  var e,o=this._buffer=r.bitArray.concat(this._buffer,t),n=this._length,i=this._length=n+r.bitArray.bitLength(t)
  for(e=512+n&-512;i>=e;e+=512)this._block(o.splice(0,16))
  return this},finalize:function(){var t,e=this._buffer,o=this._h
  for(e=r.bitArray.concat(e,[r.bitArray.partial(1,1)]),t=e.length+2;15&t;t++)e.push(0)
  for(e.push(Math.floor(this._length/4294967296)),e.push(0|this._length);e.length;)this._block(e.splice(0,16))
  return this.reset(),o},_init:[],_key:[],_precompute:function(){function t(t){return 4294967296*(t-Math.floor(t))|0}var e,o=0,n=2
  t:for(;64>o;n++){for(e=2;n>=e*e;e++)if(n%e===0)continue t
  8>o&&(this._init[o]=t(Math.pow(n,.5))),this._key[o]=t(Math.pow(n,1/3)),o++}},_block:function(t){var e,o,n,r,i=t.slice(0),s=this._h,a=this._key,h=s[0],c=s[1],l=s[2],d=s[3],_=s[4],u=s[5],f=s[6],p=s[7]
  for(e=0;64>e;e++)16>e?o=i[e]:(n=i[e+1&15],r=i[e+14&15],o=i[15&e]=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+i[15&e]+i[e+9&15]|0),o=o+p+(_>>>6^_>>>11^_>>>25^_<<26^_<<21^_<<7)+(f^_&(u^f))+a[e],p=f,f=u,u=_,_=d+o|0,d=l,l=c,c=h,h=o+(c&l^d&(c^l))+(c>>>2^c>>>13^c>>>22^c<<30^c<<19^c<<10)|0
  s[0]=s[0]+h|0,s[1]=s[1]+c|0,s[2]=s[2]+l|0,s[3]=s[3]+d|0,s[4]=s[4]+_|0,s[5]=s[5]+u|0,s[6]=s[6]+f|0,s[7]=s[7]+p|0}},r.prng=function(t){this._pools=[new r.hash.sha256],this._poolEntropy=[0],this._reseedCount=0,this._robins={},this._eventId=0,this._collectorIds={},this._collectorIdNext=0,this._strength=0,this._poolStrength=0,this._nextReseed=0,this._key=[0,0,0,0,0,0,0,0],this._counter=[0,0,0,0],this._cipher=void 0,this._defaultParanoia=t,this._collectorsStarted=!1,this._callbacks={progress:{},seeded:{}},this._callbackI=0,this._NOT_READY=0,this._READY=1,this._REQUIRES_RESEED=2,this._MAX_WORDS_PER_BURST=65536,this._PARANOIA_LEVELS=[0,48,64,96,128,192,256,384,512,768,1024],this._MILLISECONDS_PER_RESEED=3e4,this._BITS_PER_RESEED=80},r.prng.prototype={randomWords:function(t,e){var o,n,i=[],s=this.isReady(e)
  if(s===this._NOT_READY)throw new r.exception.notReady("generator isn't seeded")
  for(s&this._REQUIRES_RESEED&&this._reseedFromPools(!(s&this._READY)),o=0;t>o;o+=4)(o+1)%this._MAX_WORDS_PER_BURST===0&&this._gate(),n=this._gen4words(),i.push(n[0],n[1],n[2],n[3])
  return this._gate(),i.slice(0,t)},setDefaultParanoia:function(t,e){if(0===t&&"Setting paranoia=0 will ruin your security; use it only for testing"!==e)throw"Setting paranoia=0 will ruin your security; use it only for testing"
  this._defaultParanoia=t},addEntropy:function(t,e,o){o=o||"user"
  var n,i,s,a,h=(new Date).valueOf(),c=this._robins[o],l=this.isReady(),d=0
  switch(n=this._collectorIds[o],void 0===n&&(n=this._collectorIds[o]=this._collectorIdNext++),void 0===c&&(c=this._robins[o]=0),this._robins[o]=(this._robins[o]+1)%this._pools.length,typeof t){case"number":void 0===e&&(e=1),this._pools[c].update([n,this._eventId++,1,e,h,1,0|t])
  break
  case"object":if(a=Object.prototype.toString.call(t),"[object Uint32Array]"===a){for(s=[],i=0;i<t.length;i++)s.push(t[i])
  t=s}else for("[object Array]"!==a&&(d=1),i=0;i<t.length&&!d;i++)"number"!=typeof t[i]&&(d=1)
  if(!d){if(void 0===e)for(e=0,i=0;i<t.length;i++)for(s=t[i];s>0;)e++,s>>>=1
  this._pools[c].update([n,this._eventId++,2,e,h,t.length].concat(t))}break
  case"string":void 0===e&&(e=t.length),this._pools[c].update([n,this._eventId++,3,e,h,t.length]),this._pools[c].update(t)
  break
  default:d=1}if(d)throw new r.exception.bug("random: addEntropy only supports number, array of numbers or string")
  this._poolEntropy[c]+=e,this._poolStrength+=e,l===this._NOT_READY&&(this.isReady()!==this._NOT_READY&&this._fireEvent("seeded",Math.max(this._strength,this._poolStrength)),this._fireEvent("progress",this.getProgress()))},isReady:function(t){var e=this._PARANOIA_LEVELS[void 0!==t?t:this._defaultParanoia]
  return this._strength&&this._strength>=e?this._poolEntropy[0]>this._BITS_PER_RESEED&&(new Date).valueOf()>this._nextReseed?this._REQUIRES_RESEED|this._READY:this._READY:this._poolStrength>=e?this._REQUIRES_RESEED|this._NOT_READY:this._NOT_READY},getProgress:function(t){var e=this._PARANOIA_LEVELS[t?t:this._defaultParanoia]
  return this._strength>=e?1:this._poolStrength>e?1:this._poolStrength/e},startCollectors:function(){if(!this._collectorsStarted){if(this._eventListener={loadTimeCollector:this._bind(this._loadTimeCollector),mouseCollector:this._bind(this._mouseCollector),keyboardCollector:this._bind(this._keyboardCollector),accelerometerCollector:this._bind(this._accelerometerCollector)},window.addEventListener)window.addEventListener("load",this._eventListener.loadTimeCollector,!1),window.addEventListener("mousemove",this._eventListener.mouseCollector,!1),window.addEventListener("keypress",this._eventListener.keyboardCollector,!1),window.addEventListener("devicemotion",this._eventListener.accelerometerCollector,!1)
  else{if(!document.attachEvent)throw new r.exception.bug("can't attach event")
  document.attachEvent("onload",this._eventListener.loadTimeCollector),document.attachEvent("onmousemove",this._eventListener.mouseCollector),document.attachEvent("keypress",this._eventListener.keyboardCollector)}this._collectorsStarted=!0}},stopCollectors:function(){this._collectorsStarted&&(window.removeEventListener?(window.removeEventListener("load",this._eventListener.loadTimeCollector,!1),window.removeEventListener("mousemove",this._eventListener.mouseCollector,!1),window.removeEventListener("keypress",this._eventListener.keyboardCollector,!1),window.removeEventListener("devicemotion",this._eventListener.accelerometerCollector,!1)):document.detachEvent&&(document.detachEvent("onload",this._eventListener.loadTimeCollector),document.detachEvent("onmousemove",this._eventListener.mouseCollector),document.detachEvent("keypress",this._eventListener.keyboardCollector)),this._collectorsStarted=!1)},addEventListener:function(t,e){this._callbacks[t][this._callbackI++]=e},removeEventListener:function(t,e){var o,n,r=this._callbacks[t],i=[]
  for(n in r)r.hasOwnProperty(n)&&r[n]===e&&i.push(n)
  for(o=0;o<i.length;o++)n=i[o],delete r[n]},_bind:function(t){var e=this
  return function(){t.apply(e,arguments)}},_gen4words:function(){for(var t=0;4>t&&(this._counter[t]=this._counter[t]+1|0,!this._counter[t]);t++);return this._cipher.encrypt(this._counter)},_gate:function(){this._key=this._gen4words().concat(this._gen4words()),this._cipher=new r.cipher.aes(this._key)},_reseed:function(t){this._key=r.hash.sha256.hash(this._key.concat(t)),this._cipher=new r.cipher.aes(this._key)
  for(var e=0;4>e&&(this._counter[e]=this._counter[e]+1|0,!this._counter[e]);e++);},_reseedFromPools:function(t){var e,o=[],n=0
  for(this._nextReseed=o[0]=(new Date).valueOf()+this._MILLISECONDS_PER_RESEED,e=0;16>e;e++)o.push(4294967296*Math.random()|0)
  for(e=0;e<this._pools.length&&(o=o.concat(this._pools[e].finalize()),n+=this._poolEntropy[e],this._poolEntropy[e]=0,t||!(this._reseedCount&1<<e));e++);this._reseedCount>=1<<this._pools.length&&(this._pools.push(new r.hash.sha256),this._poolEntropy.push(0)),this._poolStrength-=n,n>this._strength&&(this._strength=n),this._reseedCount++,this._reseed(o)},_keyboardCollector:function(){this._addCurrentTimeToEntropy(1)},_mouseCollector:function(t){var e=t.x||t.clientX||t.offsetX||0,o=t.y||t.clientY||t.offsetY||0
  r.random.addEntropy([e,o],2,"mouse"),this._addCurrentTimeToEntropy(0)},_loadTimeCollector:function(){this._addCurrentTimeToEntropy(2)},_addCurrentTimeToEntropy:function(t){window&&window.performance&&"function"==typeof window.performance.now?r.random.addEntropy(window.performance.now(),t,"loadtime"):r.random.addEntropy((new Date).valueOf(),t,"loadtime")},_accelerometerCollector:function(t){var e=t.accelerationIncludingGravity.x||t.accelerationIncludingGravity.y||t.accelerationIncludingGravity.z
  if(window.orientation){var o=window.orientation
  "number"==typeof o&&r.random.addEntropy(o,1,"accelerometer")}e&&r.random.addEntropy(e,2,"accelerometer"),this._addCurrentTimeToEntropy(0)},_fireEvent:function(t,e){var o,n=r.random._callbacks[t],i=[]
  for(o in n)n.hasOwnProperty(o)&&i.push(n[o])
  for(o=0;o<i.length;o++)i[o](e)}},r.random=new r.prng(6),function(){try{var t,e,o
  if("undefined"!=typeof module&&module.exports&&(e=require("crypto"))&&e.randomBytes)t=e.randomBytes(128),t=new Uint32Array(new Uint8Array(t).buffer),r.random.addEntropy(t,1024,"crypto.randomBytes")
  else if(window&&Uint32Array){if(o=new Uint32Array(32),window.crypto&&window.crypto.getRandomValues)window.crypto.getRandomValues(o)
  else{if(!window.msCrypto||!window.msCrypto.getRandomValues)return
  window.msCrypto.getRandomValues(o)}r.random.addEntropy(o,1024,"crypto.getRandomValues")}}catch(n){console.log("There was an error collecting entropy from the browser:"),console.log(n)}}()}).call(this)
  