/** * Kakao Javascript SDK for Kakao Open Platform Service - v1.39.14 * * Copyright 2017 Kakao Corp. * *   * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * * * OSS Notice | KakaoSDK-Javascript * * This application is Copyright © Kakao Corp. All rights reserved. * The following sets forth attribution notices for third party software that may be contained in this application. * If you have any questions or concerns, please contact us at opensource@kakaocorp.com * * * cpto-js * * https://github.com/brix/crypto-js * * Copyright 2009-2013 Jeff Mott * Copyright 2013-2016 Evan Vosberg * * MIT License * * * easyXDM * * https://github.com/oyvindkinsey/easyXDM/ * * Copyright 2009-2011 Øyvind Sean Kinsey, oyvind@kinsey.no * * MIT License * * * ES6-Promise * * https://github.com/stefanpenner/es6-promise * * Copyright 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors * * MIT License * * * Underscore * * https://github.com/jashkenas/underscore * * Copyright 2009-2017 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * * MIT License * * * Web2App Library * * https://github.com/kakao/web2app * * Copyright 2015 Kakao Corp. http://www.kakaocorp.com * * MIT License * * * `````````` * MIT License * * Copyright (c) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * `````````` */ var _slicedToArray=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=undefined;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}!function(e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Kakao=e()}(function(){return function p(o,a,s){function c(t,e){if(!a[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=a[t]={exports:{}};o[t][0].call(i.exports,function(e){return c(o[t][1][e]||e)},i,i.exports,p,o,a,s)}return a[t].exports}for(var u="function"==typeof require&&require,e=0;e',t.onclick=function(){g(e)}},login:function(e){g(e=u.processRules(e,a.login,"Auth.login"))},loginForm:function(e){e=u.processRules(e,a.login,"Auth.loginForm");var t,n=c.getRandomString()+c.getRandomString(),r="&prompt=login";e.redirectUri?location.href=x(e)+r:(t=A(e,n)+r,d.openLoginPopup(t))},autoLogin:function(e){var t,n;e=u.processRules(e,a.autoLogin,"Auth.autoLogin"),l.isIOSKakaoTalkWebView()||l.isAndroidKakaoTalkWebView()?(t=c.getRandomString()+c.getRandomString(),n=c.extend({},d.makeAuthParams(e),{redirect_uri:u.URL.talkLoginRedirectUri,response_type:"code",state:t,ka:u.KAKAO_AGENT,origin:p,prompt:"none"}),_(e,t,d.makeAuthUrl(n))):d.runAuthCallback(e,{error:"auto_login",error_description:"Auto-login is only supported by KakaoTalk InAppBrowser",error_code:"400",status:"error"}),i.dispatch("LOGIN_START")},logout:function(e){e=e||c.emptyFunc,u.validate(e,c.isFunction,"Auth.logout"),Kakao.API.request({url:"/v1/user/logout",always:function(){n.setAccessToken(null),i.dispatch("LOGOUT"),e(!0)}})},issueAccessToken:function(t){t=u.processRules(t,a.issueAccessToken,"Auth.issueAccessToken"),e||(e=f.getProxy({},function(e){T(t,e)}),s.push(function(){e.destroy(),e=null})),e.getAccessToken(t.code,u.RUNTIME.appKey,t.redirectUri)},selectStoryChannel:function(e){e=u.processRules(e,a.selectStoryChannel,"Auth.selectStoryChannel"),r||(r=f.getProxy({},function(e){var t=O(e,I);d.runAuthCallback(t,e)}),s.push(function(){r.destroy(),r=null}));var t=c.getRandomString();I[t]=e;var n=c.extend({},d.makeAuthParams(e),{state:t,proxy:"easyXDM_Kakao_"+r.channel+"_provider",token:e.extendedToken||""});d.openLoginPopup(u.URL.storySelectChannel+"?"+c.buildQueryString(n))}}}},{"../browserProxy.js":38,"../common":39,"../eventObserver":40,"../poller":42,"../util":43,"../webviewchecker":44,"./common":8,"./kakaotalk":10,"./proxy":13,"./rules":14,"./secret":15}],12:[function(e,t,n){function _(e,t){e.state&&(t.state=e.state),e.redirectUri?location.href=e.redirectUri+"?"+w.buildQueryString(t):T.runAuthCallback(e,t)}var w,S,A,x,O,T,I;t.exports=(w=e("../util"),S=e("../common"),A=e("../eventObserver"),x=e("../poller")(1e3,600),O=e("./rules"),T=e("./common"),I=e("./ajax"),{authorize:function(t){if((t=S.processRules(t,O.authorize,"Auth.authorize")).autoLogin&&!/KAKAOTALK/i.test(S.UA.ua))return _(t,{error:"auto_login",error_description:"NOT_SUPPORTED_BROWSER"}),!1;var e,n,r,i,o,a,s,c,u,l,p,d,f=(Math.random().toString(36).slice(2)+S.RUNTIME.appKey+Date.now().toString(36)).slice(0,60),m=w.extend({},T.makeAuthParams(t),T.makeAuthExtraParams(t),{redirect_uri:t.redirectUri||S.URL.redirectUri,response_type:"code",auth_tran_id:f}),h=w.extend({},m,{ka:S.KAKAO_AGENT,is_popup:t.isPopup}),g=(e=t,n=!(!S.UA.os.ios&&!S.UA.os.android)&&!/KAKAOTALK/i.test(S.UA.ua),r=!e.reauthenticate&&"login"!==e.prompts,n&&r&&e.throughTalk&&!e.autoLogin),y=t.throughSyncplugin&&/KAKAOTALK/i.test(S.UA.ua)&&/ch-home/i.test(S.UA.ua),v=T.makeAuthUrl(h),k=g?(i=t,o=m,a=v,s=w.extend({},o,{is_popup:!0}),c=function c(){var e=["intent:#Intent","action=com.kakao.talk.intent.action.CAPRI_LOGGED_IN_ACTIVITY","launchFlags=0x08880000","S.com.kakao.sdk.talk.appKey="+S.RUNTIME.appKey,"S.com.kakao.sdk.talk.redirectUri="+s.redirect_uri,"S.com.kakao.sdk.talk.kaHeader="+S.KAKAO_AGENT,"S.com.kakao.sdk.talk.extraparams="+encodeURIComponent(JSON.stringify(s))];return i.state&&e.push("S.com.kakao.sdk.talk.state="+i.state),e.concat(["S.browser_fallback_url="+encodeURIComponent(a),"end;"]).join(";")},u=function u(){var e=T.makeAuthUrl(s),t=i.isPopup?e:a,n=e+"&ka="+encodeURIComponent(S.KAKAO_AGENT),r=S.URL.talkInappScheme+"?url="+encodeURIComponent(n);return""+S.URL.universalKakaoLink+encodeURIComponent(r)+"&web="+encodeURIComponent(t)},(S.UA.os.android?c:u)()):v,b=null;y?(l=m,p=w.extend({},l,{ka:S.KAKAO_AGENT,is_popup:!0,approval_window_type:"v4_bizplugin"}),d=encodeURIComponent(w.buildQueryString(p)),location.href=S.URL.talkSyncpluginScheme+"&query="+d):t.isPopup?b=T.openLoginPopup(k):location.href=k,(g||y||t.isPopup)&&x.start(function(){var e;f&&(e={client_id:S.RUNTIME.appKey,auth_tran_id:f,ka:S.KAKAO_AGENT},I.checkAuthorize(S.URL.authDomain+"/apiweb/code.json?"+w.buildQueryString(e),function(e){!function(e,t){if(200===t.status&&t.response){var n=JSON.parse(t.response);if("ok"===n.status&&n.code)return _(e,{code:n.code}),!0;if("error"===n.status&&("500"===n.error_code||"600"===n.error_code||"700"===n.error_code))return _(e,{error:n.error,error_description:n.error_description}),"700"===n.error_code&&(location.href=S.URL.authDomain+"/error/network"),!0}return!1}(t,e)||(x.stop(),b&&b.close&&b.close()),!g&&b&&b.closed&&x.stop()}))},function(){_(t,{error:"timeout",error_description:"LOGIN_TIMEOUT"})}),A.dispatch("LOGIN_START")}})},{"../common":39,"../eventObserver":40,"../poller":42,"../util":43,"./ajax":7,"./common":8,"./rules":14}],13:[function(e,t,n){var r,i,o;t.exports=(r=e("../util"),i=e("../common"),o=e("../../vendor/easyXDM"),{getProxy:function(t,n){return r.extend(t,{remote:i.URL.loginWidget,channel:r.getRandomString()}),i.guardCreateEasyXDM(function(){var e=new o.Rpc(t,{local:{postResponse:n,getKakaoAgent:function(){return i.KAKAO_AGENT}},remote:{getCode:{},getAccessToken:{},setClient:{},setStateToken:{},deleteAuthCookie:{}}});return e.channel=t.channel,e})}})},{"../../vendor/easyXDM":46,"../common":39,"../util":43}],14:[function(e,t,n){var r,i,o,a;t.exports=(r=e("../util"),i={success:r.emptyFunc,fail:r.emptyFunc,always:r.emptyFunc},o=r.extend({throughTalk:!0,persistAccessToken:!0,persistRefreshToken:!1},i),a={success:r.isFunction,fail:r.isFunction,always:r.isFunction,persistAccessToken:r.isBoolean,persistRefreshToken:r.isBoolean,approvalType:r.isOneOf(["project"]),scope:r.isString,throughTalk:r.isBoolean,plusFriendPublicId:r.isString,channelPublicId:r.isString,serviceTerms:r.isString,redirectUri:r.isString,state:r.isString,deviceType:r.isOneOf(["watch","tv"])},{createLoginButton:{required:{container:r.passesOneOf([r.isElement,r.isString])},optional:r.extend({lang:r.isOneOf(["en","kr"]),size:r.isOneOf(["small","medium","large"])},a),defaults:r.extend({lang:"kr",size:"medium"},o)},login:{optional:a,defaults:o},authorize:{optional:{redirectUri:r.isString,approvalType:r.isOneOf(["project"]),scope:r.isString,throughTalk:r.isBoolean,plusFriendPublicId:r.isString,channelPublicId:r.isString,serviceTerms:r.isString,isPopup:r.isBoolean,state:r.isString,autoLogin:r.isBoolean,deviceType:r.isOneOf(["watch","tv"]),prompts:r.isOneOf(["login","none"]),reauthenticate:r.isBoolean,throughSyncplugin:r.isBoolean,success:r.isFunction,fail:r.isFunction,always:r.isFunction},defaults:{throughTalk:!0,isPopup:!1,reauthenticate:!1,throughSyncplugin:!0,success:r.emptyFunc,fail:r.emptyFunc,always:r.emptyFunc}},autoLogin:{optional:{success:r.isFunction,fail:r.isFunction,always:r.isFunction},defaults:i},issueAccessToken:{required:{code:r.isString,redirectUri:r.isString},optional:{success:r.isFunction,fail:r.isFunction,always:r.isFunction},defaults:i},selectStoryChannel:{optional:{extendedToken:r.isString,success:r.isFunction,fail:r.isFunction,always:r.isFunction},defaults:i}})},{"../util":43}],15:[function(e,t,n){function o(){return c.RUNTIME.appKey}function r(){var e,t;return c.RUNTIME.accessToken||(c.RUNTIME.accessToken=(e=a(),(t=s.localStorage.getItem(e))?function(e,t){return u.AES.decrypt(e,t).toString(u.enc.Utf8)}(t,o()):null)),c.RUNTIME.accessToken}function a(){var e;return i.accessTokenKey||(i.accessTokenKey="kakao_"+(e="kat"+o(),u.MD5(e).toString())),i.accessTokenKey}var s,c,u,i;t.exports=(s=e("../util"),c=e("../common"),u=e("../../vendor/CryptoJS"),i={},{getAppKey:o,getAccessToken:r,setAccessToken:function(e){var t,n,r,i=!(1i?t():(e(),n(e,t))},r)}(e,t)},stop:function(){a=!0,clearTimeout(s)}}}},{}],43:[function(e,t,n){t.exports=function(){var s={},a={},n=Array.prototype,e=Object.prototype,r=n.slice,i=n.concat,o=e.toString,c=e.hasOwnProperty,u=n.forEach,t=n.map,l=n.filter,p=n.every,d=n.some,f=n.indexOf,m=Array.isArray,h=Object.keys,g=s.each=function(e,t,n){if(null==e)return e;if(u&&e.forEach===u)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r>>2]|=(n[i>>>2]>>>24-i%4*8&255)<<24-(r+i)%4*8;else if(65535>>2]=n[i>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=s.ceil(t/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-r%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},a=i.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(n,t)}},u=i.Utf8={stringify:function(e){try{return decodeURIComponent(escape(a.stringify(e)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(e){return a.parse(unescape(encodeURIComponent(e)))}},l=t.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,n=t.words,r=t.sigBytes,i=this.blockSize,o=r/(4*i);if(e=(o=e?s.ceil(o):s.max((0|o)-this._minBufferSize,0))*i,r=s.min(4*e,r),e){for(var a=0;a>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;a<4&&i+.75*a>>6*(3-a)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,n=this._map;!(o=n.charAt(64))||-1!=(o=e.indexOf(o))&&(t=o);for(var r,i,o=[],a=0,s=0;s>>6-s%4*2,o[a>>>2]|=(r|i)<<24-a%4*8,a++)}return c.create(o,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(o){function S(e,t,n,r,i,o,a){return((e=e+(t&n|~t&r)+i+a)<>>32-o)+t}function A(e,t,n,r,i,o,a){return((e=e+(t&r|n&~r)+i+a)<>>32-o)+t}function x(e,t,n,r,i,o,a){return((e=e+(t^n^r)+i+a)<>>32-o)+t}function O(e,t,n,r,i,o,a){return((e=e+(n^(t|~r))+i+a)<>>32-o)+t}for(var e=I,t=(r=e.lib).WordArray,n=r.Hasher,r=e.algo,T=[],i=0;i<64;i++)T[i]=4294967296*o.abs(o.sin(i+1))|0;r=r.MD5=n.extend({_doReset:function(){this._hash=new t.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=e[i=t+n];e[i]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var n=this._hash.words,i=e[t+0],r=e[t+1],o=e[t+2],a=e[t+3],s=e[t+4],c=e[t+5],u=e[t+6],l=e[t+7],p=e[t+8],d=e[t+9],f=e[t+10],m=e[t+11],h=e[t+12],g=e[t+13],y=e[t+14],v=e[t+15],k=S(k=n[0],w=n[1],_=n[2],b=n[3],i,7,T[0]),b=S(b,k,w,_,r,12,T[1]),_=S(_,b,k,w,o,17,T[2]),w=S(w,_,b,k,a,22,T[3]),k=S(k,w,_,b,s,7,T[4]),b=S(b,k,w,_,c,12,T[5]),_=S(_,b,k,w,u,17,T[6]),w=S(w,_,b,k,l,22,T[7]),k=S(k,w,_,b,p,7,T[8]),b=S(b,k,w,_,d,12,T[9]),_=S(_,b,k,w,f,17,T[10]),w=S(w,_,b,k,m,22,T[11]),k=S(k,w,_,b,h,7,T[12]),b=S(b,k,w,_,g,12,T[13]),_=S(_,b,k,w,y,17,T[14]),k=A(k,w=S(w,_,b,k,v,22,T[15]),_,b,r,5,T[16]),b=A(b,k,w,_,u,9,T[17]),_=A(_,b,k,w,m,14,T[18]),w=A(w,_,b,k,i,20,T[19]),k=A(k,w,_,b,c,5,T[20]),b=A(b,k,w,_,f,9,T[21]),_=A(_,b,k,w,v,14,T[22]),w=A(w,_,b,k,s,20,T[23]),k=A(k,w,_,b,d,5,T[24]),b=A(b,k,w,_,y,9,T[25]),_=A(_,b,k,w,a,14,T[26]),w=A(w,_,b,k,p,20,T[27]),k=A(k,w,_,b,g,5,T[28]),b=A(b,k,w,_,o,9,T[29]),_=A(_,b,k,w,l,14,T[30]),k=x(k,w=A(w,_,b,k,h,20,T[31]),_,b,c,4,T[32]),b=x(b,k,w,_,p,11,T[33]),_=x(_,b,k,w,m,16,T[34]),w=x(w,_,b,k,y,23,T[35]),k=x(k,w,_,b,r,4,T[36]),b=x(b,k,w,_,s,11,T[37]),_=x(_,b,k,w,l,16,T[38]),w=x(w,_,b,k,f,23,T[39]),k=x(k,w,_,b,g,4,T[40]),b=x(b,k,w,_,i,11,T[41]),_=x(_,b,k,w,a,16,T[42]),w=x(w,_,b,k,u,23,T[43]),k=x(k,w,_,b,d,4,T[44]),b=x(b,k,w,_,h,11,T[45]),_=x(_,b,k,w,v,16,T[46]),k=O(k,w=x(w,_,b,k,o,23,T[47]),_,b,i,6,T[48]),b=O(b,k,w,_,l,10,T[49]),_=O(_,b,k,w,y,15,T[50]),w=O(w,_,b,k,c,21,T[51]),k=O(k,w,_,b,h,6,T[52]),b=O(b,k,w,_,a,10,T[53]),_=O(_,b,k,w,f,15,T[54]),w=O(w,_,b,k,r,21,T[55]),k=O(k,w,_,b,p,6,T[56]),b=O(b,k,w,_,v,10,T[57]),_=O(_,b,k,w,u,15,T[58]),w=O(w,_,b,k,g,21,T[59]),k=O(k,w,_,b,s,6,T[60]),b=O(b,k,w,_,m,10,T[61]),_=O(_,b,k,w,o,15,T[62]),w=O(w,_,b,k,d,21,T[63]);n[0]=n[0]+k|0,n[1]=n[1]+w|0,n[2]=n[2]+_|0,n[3]=n[3]+b|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32;var i=o.floor(n/4294967296);for(t[15+(64+r>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t[14+(64+r>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process(),t=(e=this._hash).words,n=0;n<4;n++)r=t[n],t[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);return e},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),e.MD5=n._createHelper(r),e.HmacMD5=n._createHmacHelper(r)}(Math),i=(r=I).lib,o=i.Base,u=i.WordArray,a=(i=r.algo).EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:i.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=(a=this.cfg).hasher.create(),r=u.create(),i=r.words,o=a.keySize,a=a.iterations;i.length>>2]}},e.BlockCipher=o.extend({cfg:o.cfg.extend({mode:s,padding:u}),reset:function(){o.reset.call(this);var e,t=(n=this.cfg).iv,n=n.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode=e.call(n,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var l=e.CipherParams=t.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),s=(d.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?a.create([1398893684,1701076831]).concat(e).concat(t):t).toString(r)},parse:function(e){var t,n=(e=r.parse(e)).words;return 1398893684==n[0]&&1701076831==n[1]&&(t=a.create(n.slice(2,4)),n.splice(0,4),e.sigBytes-=16),l.create({ciphertext:e,salt:t})}},p=e.SerializableCipher=t.extend({cfg:t.extend({format:s}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r);return t=i.finalize(t),i=i.cfg,l.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),d=(d.kdf={}).OpenSSL={execute:function(e,t,n,r){return r=r||a.random(8),e=i.create({keySize:t+n}).compute(e,r),n=a.create(e.words.slice(t),4*n),e.sigBytes=4*t,l.create({key:e,iv:n,salt:r})}},f=e.PasswordBasedCipher=p.extend({cfg:p.cfg.extend({kdf:d}),encrypt:function(e,t,n,r){return n=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,(e=p.encrypt.call(this,e,t,n.key,r)).mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,p.decrypt.call(this,e,t,n.key,r)}})}(),function(){for(var e=I,t=e.lib.BlockCipher,n=e.algo,a=[],r=[],i=[],o=[],s=[],c=[],u=[],l=[],p=[],d=[],f=[],m=0;m<256;m++)f[m]=m<128?m<<1:m<<1^283;for(var h=0,g=0,m=0;m<256;m++){var y=(y=g^g<<1^g<<2^g<<3^g<<4)>>>8^255&y^99;a[h]=y;var v=f[r[y]=h],k=f[v],b=f[k],_=257*f[y]^16843008*y;i[h]=_<<24|_>>>8,o[h]=_<<16|_>>>16,s[h]=_<<8|_>>>24,c[h]=_,_=16843009*b^65537*k^257*v^16843008*h,u[y]=_<<24|_>>>8,l[y]=_<<16|_>>>16,p[y]=_<<8|_>>>24,d[y]=_,h?(h=v^f[f[f[b^v]]],g^=f[f[g]]):h=g=1}var w=[0,1,2,4,8,16,32,64,128,27,54],n=n.AES=t.extend({_doReset:function(){for(var e,t=(r=this._key).words,n=r.sigBytes/4,r=4*((this._nRounds=n+6)+1),i=this._keySchedule=[],o=0;o>>24]<<24|a[e>>>16&255]<<16|a[e>>>8&255]<<8|a[255&e]):(e=a[(e=e<<8|e>>>24)>>>24]<<24|a[e>>>16&255]<<16|a[e>>>8&255]<<8|a[255&e],e^=w[o/n|0]<<24),i[o]=i[o-n]^e)}for(t=this._invKeySchedule=[],n=0;n>>24]]^l[a[e>>>16&255]]^p[a[e>>>8&255]]^d[a[255&e]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,i,o,s,c,a)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,l,p,d,r),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var c=this._nRounds,u=e[t]^n[0],l=e[t+1]^n[1],p=e[t+2]^n[2],d=e[t+3]^n[3],f=4,m=1;m>>24]^i[l>>>16&255]^o[p>>>8&255]^a[255&d]^n[f++],g=r[l>>>24]^i[p>>>16&255]^o[d>>>8&255]^a[255&u]^n[f++],y=r[p>>>24]^i[d>>>16&255]^o[u>>>8&255]^a[255&l]^n[f++],d=r[d>>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&p]^n[f++],u=h,l=g,p=y;h=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[p>>>8&255]<<8|s[255&d])^n[f++],g=(s[l>>>24]<<24|s[p>>>16&255]<<16|s[d>>>8&255]<<8|s[255&u])^n[f++],y=(s[p>>>24]<<24|s[d>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^n[f++],d=(s[d>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&p])^n[f++],e[t]=h,e[t+1]=g,e[t+2]=y,e[t+3]=d},keySize:8});e.AES=t._createHelper(n)}(),I)},{}],46:[function(e,t,n){t.exports=(function(h,l,p,g,d,f){var c,u,m,y,v,k=this||h,b=Math.floor(1e4*Math.random()),_=Function.prototype,w=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/,n=/[\-\w]+\/\.\.\//,r=/([^:])\/\//g,S="",A={},t=h.easyXDM,x="easyXDM_",O=!1;function T(e,t){var n=_typeof(e[t]);return"function"==n||"object"==n&&e[t]||"unknown"==n}function I(){var e,t,n="Shockwave Flash",r="application/x-shockwave-flash";if(P(navigator.plugins)||"object"!=_typeof(navigator.plugins[n])||(e=navigator.plugins[n].description)&&!P(navigator.mimeTypes)&&navigator.mimeTypes[r]&&navigator.mimeTypes[r].enabledPlugin&&(u=e.match(/\d+/g)),!u)try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),u=Array.prototype.slice.call(t.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1),t=null}catch(a){}if(u){var i=parseInt(u[0],10),o=parseInt(u[1],10);return m=9'):(r=l.createElement("IFRAME")).name=e.props.name,r.id=r.name=e.props.name,delete e.props.name,"string"==typeof e.container&&(e.container=l.getElementById(e.container)),e.container||(B(r.style,{position:"absolute",top:"-2000px",left:"0px"}),e.container=l.body);var i=e.props.src;if(e.props.src="javascript:false",B(r,e.props),r.border=r.frameBorder=0,r.allowTransparency=!0,e.container.appendChild(r),e.onLoad&&y(r,"load",e.onLoad),e.usePost){var o,a=e.container.appendChild(l.createElement("form"));if(a.target=r.name,a.action=i,a.method="POST","object"===_typeof(e.usePost))for(var s in e.usePost)e.usePost.hasOwnProperty(s)&&(c?o=l.createElement(''):(o=l.createElement("INPUT")).name=s,o.value=e.usePost[s],a.appendChild(o));a.submit(),a.parentNode.removeChild(a)}else r.src=i;return e.props.src=i,r}function M(e){var t,n=e.protocol;if(e.isHost=e.isHost||P(K.xdm_p),O=e.hash||!1,e.props||(e.props={}),e.isHost)e.remote=U(e.remote),e.channel=e.channel||"default"+b++,e.secret=Math.random().toString(16).substring(2),P(n)&&(n=C(p.href)==C(e.remote)?"4":T(h,"postMessage")||T(l,"postMessage")?"1":e.swf&&T(h,"ActiveXObject")&&I()?"6":"Gecko"===navigator.product&&"frameElement"in h&&-1==navigator.userAgent.indexOf("WebKit")?"5":e.remoteHelper?"2":"0");else if(e.channel=K.xdm_c.replace(/["'<>\\]/g,""),e.secret=K.xdm_s,e.remote=K.xdm_e.replace(/["'<>\\]/g,""),n=K.xdm_p,e.acl&&!function(e,t){"string"==typeof e&&(e=[e]);for(var n=e.length;n--;){var r="^"===e[n].substr(0,1)&&"$"===e[n].substr(e[n].length-1,1)?e[n]:"^"+e[n].replace(/[-[\]/{}()+.\^$|]/g,"\\$&").replace(/(\*)/g,".$1").replace(/\?/g,".")+"$";if((r=new RegExp(r)).test(t))return 1}}(e.acl,e.remote))throw new Error("Access denied for "+e.remote);switch(e.protocol=n){case"0":if(B(e,{interval:100,delay:2e3,useResize:!0,useParent:!1,usePolling:!1},!0),e.isHost){if(!e.local){for(var r,i=p.protocol+"//"+p.host,o=l.body.getElementsByTagName("img"),a=o.length;a--;)if((r=o[a]).src.substring(0,i.length)===i){e.local=r.src;break}e.local||(e.local=h)}var s={xdm_c:e.channel,xdm_p:0};e.local===h?(e.usePolling=!0,e.useParent=!0,e.local=p.protocol+"//"+p.host+p.pathname+p.search,s.xdm_e=e.local,s.xdm_pa=1):s.xdm_e=U(e.local),e.container&&(e.useResize=!1,s.xdm_po=1),e.remote=L(e.remote,s)}else B(e,{useParent:!P(K.xdm_pa),usePolling:!P(K.xdm_po),useResize:!e.useParent&&e.useResize});t=[new A.stack.HashTransport(e),new A.stack.ReliableBehavior({}),new A.stack.QueueBehavior({encode:!0,maxLength:4e3-e.remote.length}),new A.stack.VerifyBehavior({initiate:e.isHost})];break;case"1":t=[new A.stack.PostMessageTransport(e)];break;case"2":e.isHost&&(e.remoteHelper=U(e.remoteHelper)),t=[new A.stack.NameTransport(e),new A.stack.QueueBehavior,new A.stack.VerifyBehavior({initiate:e.isHost})];break;case"3":t=[new A.stack.NixTransport(e)];break;case"4":t=[new A.stack.SameOriginTransport(e)];break;case"5":t=[new A.stack.FrameElementTransport(e)];break;case"6":u||I(),t=[new A.stack.FlashTransport(e)]}return t.push(new A.stack.QueueBehavior({lazy:e.lazy,remove:!0})),t}function q(e){for(var t,n={incoming:function(e,t){this.up.incoming(e,t)},outgoing:function(e,t){this.down.outgoing(e,t)},callback:function(e){this.up.callback(e)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}},r=0,i=e.length;r<\/script>')}},j={},A.Fn={set:function(e,t){j[e]=t},get:function(e,t){if(j.hasOwnProperty(e)){var n=j[e];return t&&delete j[e],n}}},A.Socket=function(n){var t=q(M(n).concat([{incoming:function(e,t){n.onMessage(e,t)},callback:function(e){n.onReady&&n.onReady(e)}}])),r=C(n.remote);this.origin=C(n.remote),this.destroy=function(){t.destroy()},this.postMessage=function(e){t.outgoing(e,r)},t.init()},A.Rpc=function(t,e){if(e.local)for(var n in e.local){var r;!e.local.hasOwnProperty(n)||"function"==typeof(r=e.local[n])&&(e.local[n]={method:r})}var i=q(M(t).concat([new A.stack.RpcBehavior(this,e),{callback:function(e){t.onReady&&t.onReady(e)}}]));this.origin=C(t.remote),this.context=t.context||null,this.destroy=function(){i.destroy()},i.init()},A.stack.SameOriginTransport=function(e){var t,n,r,i;return t={outgoing:function(e,t,n){r(e),n&&n()},destroy:function(){n&&(n.parentNode.removeChild(n),n=null)},onDOMReady:function(){i=C(e.remote),e.isHost?(B(e.props,{src:L(e.remote,{xdm_e:p.protocol+"//"+p.host+p.pathname,xdm_c:e.channel,xdm_p:4}),name:x+e.channel+"_provider"}),n=F(e),A.Fn.set(e.channel,function(e){return r=e,g(function(){t.up.callback(!0)},0),function(e){t.up.incoming(e,i)}})):(r=function(){var e=parent;if(""!==S)for(var t=0,n=S.split(".");t"}return n={outgoing:function(e,t,n){a.postMessage(i.channel,e.toString()),n&&n()},destroy:function(){try{a.destroyChannel(i.channel)}catch(e){}a=null,r&&(r.parentNode.removeChild(r),r=null)},onDOMReady:function(){o=i.remote,A.Fn.set("flash_"+i.channel+"_init",function(){g(function(){n.up.callback(!0)})}),A.Fn.set("flash_"+i.channel+"_onMessage",c),i.swf=U(i.swf);var e=R(i.swf),t=function t(){A.stack.FlashTransport[e].init=!0,(a=A.stack.FlashTransport[e].swf).createChannel(i.channel,i.secret,C(i.remote),i.isHost),i.isHost&&(m&&i.swfNoThrottle&&B(i.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"}),B(i.props,{src:L(i.remote,{xdm_e:C(p.href),xdm_c:i.channel,xdm_p:6,xdm_s:i.secret}),name:x+i.channel+"_provider"}),r=F(i))};A.stack.FlashTransport[e]&&A.stack.FlashTransport[e].init?t():A.stack.FlashTransport[e]?A.stack.FlashTransport[e].queue.push(t):(A.stack.FlashTransport[e]={queue:[t]},u(e))},init:function(){E(n.onDOMReady,n)}}},A.stack.PostMessageTransport=function(r){var n,t,i,o;function a(e){var t;"string"!=typeof e.data||(t=function(e){if(e.origin)return C(e.origin);if(e.uri)return C(e.uri);if(e.domain)return p.protocol+"//"+e.domain;throw"Unable to retrieve the origin of the event"}(e))==o&&"string"==typeof e.data&&e.data.substring(0,r.channel.length+1)==r.channel+" "&&n.up.incoming(e.data.substring(r.channel.length+1),t)}function s(e){e.data==r.channel+"-ready"&&(i="postMessage"in t.contentWindow?t.contentWindow:t.contentWindow.document,v(h,"message",s),y(h,"message",a),g(function(){n.up.callback(!0)},0))}return n={outgoing:function(e,t,n){i.postMessage(r.channel+" "+e,t||o),n&&n()},destroy:function(){v(h,"message",s),v(h,"message",a),t&&(i=null,t.parentNode.removeChild(t),t=null)},onDOMReady:function(){"file://"===(o=C(r.remote))&&(o="*"),r.isHost?(y(h,"message",s),B(r.props,{src:L(r.remote,{xdm_e:C(p.href),xdm_c:r.channel,xdm_p:1}),name:x+r.channel+"_provider"}),t=F(r)):(y(h,"message",a),(i="postMessage"in h.parent?h.parent:h.parent.document).postMessage(r.channel+"-ready",o),g(function(){n.up.callback(!0)},0))},init:function(){E(n.onDOMReady,n)}}},A.stack.FrameElementTransport=function(e){var t,n,r,i;return t={outgoing:function(e,t,n){r.call(this,e),n&&n()},destroy:function(){n&&(n.parentNode.removeChild(n),n=null)},onDOMReady:function(){i=C(e.remote),e.isHost?(B(e.props,{src:L(e.remote,{xdm_e:C(p.href),xdm_c:e.channel,xdm_p:5}),name:x+e.channel+"_provider"}),(n=F(e)).fn=function(e){return delete n.fn,r=e,g(function(){t.up.callback(!0)},0),function(e){t.up.incoming(e,i)}}):(l.referrer&&C(l.referrer)!=K.xdm_e&&(h.top.location=K.xdm_e),r=h.frameElement.fn(function(e){t.up.incoming(e,i)}),t.up.callback(!0))},init:function(){E(t.onDOMReady,t)}}},A.stack.NameTransport=function(r){var t,i,o,e,a,s,c,u;function l(e){var t=r.remoteHelper+(i?"#_3":"#_2")+r.channel;o.contentWindow.sendMessage(e,t)}function p(){i?2!=++a&&i||t.up.callback(!0):(l("ready"),t.up.callback(!0))}function d(e){t.up.incoming(e,c)}function f(){s&&g(function(){s(!0)},0)}return t={outgoing:function(e,t,n){s=n,l(e)},destroy:function(){o.parentNode.removeChild(o),o=null,i&&(e.parentNode.removeChild(e),e=null)},onDOMReady:function(){i=r.isHost,a=0,c=C(r.remote),r.local=U(r.local),i?(A.Fn.set(r.channel,function(e){i&&"ready"===e&&(A.Fn.set(r.channel,d),p())}),u=L(r.remote,{xdm_e:r.local,xdm_c:r.channel,xdm_p:2}),B(r.props,{src:u+"#"+r.channel,name:x+r.channel+"_provider"}),e=F(r)):(r.remoteHelper=r.remote,A.Fn.set(r.channel,d));var n=function n(){var e=o||this;v(e,"load",n),A.Fn.set(r.channel+"_load",f),function t(){"function"==typeof e.contentWindow.sendMessage?p():g(t,50)}()};o=F({props:{src:r.local+"#_4"+r.channel},onLoad:n})},init:function(){E(t.onDOMReady,t)}}},A.stack.HashTransport=function(i){var o,a,e,s,c,u,l,p,d,f;function t(){var e,t,n;l&&(t="",-1!=(n=(e=l.location.href).indexOf("#"))&&(t=e.substring(n)),t&&t!=c&&(c=t,o.up.incoming(c.substring(c.indexOf("_")+1),f)))}function m(){e=setInterval(t,s)}return o={outgoing:function(e,t){var n,r;n=e,p&&(r=i.remote+"#"+u+++"_"+n,(a||!d?p.contentWindow:p).location=r)},destroy:function(){h.clearInterval(e),!a&&d||p.parentNode.removeChild(p),p=null},onDOMReady:function(){var t,n;a=i.isHost,s=i.interval,c="#"+i.channel,u=0,d=i.useParent,f=C(i.remote),a?(B(i.props,{src:i.remote,name:x+i.channel+"_provider"}),d?i.onLoad=function(){l=h,m(),o.up.callback(!0)}:(t=0,n=i.delay/50,function r(){if(++t>n)throw new Error("Unable to reference listenerwindow");try{l=p.contentWindow.frames[x+i.channel+"_consumer"]}catch(e){}l?(m(),o.up.callback(!0)):g(r,50)}()),p=F(i)):(l=h,m(),d?(p=parent,o.up.callback(!0)):(B(i,{props:{src:i.remote+"#"+i.channel+new Date,name:x+i.channel+"_consumer"},onLoad:function(){o.up.callback(!0)}}),p=F(i)))},init:function(){E(o.onDOMReady,o)}}},A.stack.ReliableBehavior=function(e){var i,o,a=0,s=0,c="";return i={incoming:function(e,t){var n=e.indexOf("_"),r=e.substring(0,n).split(",");e=e.substring(n+1),r[0]==a&&(c="",o&&o(!0)),0