text: !function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("Geetest requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";if(void 0===t)throw new Error("Geetest requires browser environment");var n=t.document,o=t.Math,r=n.getElementsByTagName("head")[0];function i(t){this._obj=t}function a(t){var e=this;new i(t)._each(function(t,n){e[t]=n})}i.prototype={_each:function(t){var e=this._obj;for(var n in e)e.hasOwnProperty(n)&&t(n,e[n]);return this}},a.prototype={api_server:"api.geetest.com",protocol:"http://",type_path:"/gettype.php",fallback_config:{slide:{static_servers:["static.geetest.com","dn-staticdown.qbox.me"],type:"slide",slide:"/static/js/geetest.0.0.0.js"},fullpage:{static_servers:["static.geetest.com","dn-staticdown.qbox.me"],type:"fullpage",fullpage:"/static/js/fullpage.0.0.0.js"}},_get_fallback_config:function(){return c(this.type)?this.fallback_config[this.type]:this.new_captcha?this.fallback_config.fullpage:this.fallback_config.slide},_extend:function(t){var e=this;new i(t)._each(function(t,n){e[t]=n})}};var c=function(t){return"string"==typeof t},s={},f={},u=function(t,e,n,o){e=function(t){return t.replace(/^https?:\/\/|\/$/g,"")}(e);var r=function(t){return 0!==(t=t.replace(/\/+/g,"/")).indexOf("/")&&(t="/"+t),t}(n)+function(t){if(!t)return"";var e="?";return new i(t)._each(function(t,n){(c(n)||function(t){return"number"==typeof t}(n)||function(t){return"boolean"==typeof t}(n))&&(e=e+encodeURIComponent(t)+"="+encodeURIComponent(n)+"&")}),"?"===e&&(e=""),e.replace(/&$/,"")}(o);return e&&(r=t+e+r),r},l=function(t,e,o,i,a){var c=function(s){!function(t,e){var o=n.createElement("script");o.charset="UTF-8",o.async=!0,o.onerror=function(){e(!0)};var i=!1;o.onload=o.onreadystatechange=function(){i||o.readyState&&"loaded"!==o.readyState&&"complete"!==o.readyState||(i=!0,setTimeout(function(){e(!1)},0))},o.src=t,r.appendChild(o)}(u(t,e[s],o,i),function(t){t?s>=e.length-1?a(!0):c(s+1):a(!1)})};c(0)},p=function(e,n,r,i){if("object"==typeof(a=r.getLib)&&null!==a)return r._extend(r.getLib),void i(r);var a;if(r.offline)i(r._get_fallback_config());else{var c="geetest_"+(parseInt(1e4*o.random())+(new Date).valueOf());t[c]=function(e){"success"===e.status?i(e.data):e.status?i(r._get_fallback_config()):i(e),t[c]=void 0;try{delete t[c]}catch(t){}},l(r.protocol,e,n,{gt:r.gt,callback:c},function(t){t&&i(r._get_fallback_config())})}},d=function(t,e){var n={networkError:"网络错误"};if("function"!=typeof e.onError)throw new Error(n[t]);e.onError(n[t])};t.Geetest&&(f.slide="loaded");var h=function(e,n){var o=new a(e);e.https?o.protocol="https://":e.protocol||(o.protocol=t.location.protocol+"//"),p([o.api_server||o.apiserver],o.type_path,o,function(e){var r=e.type,i=function(){o._extend(e),n(new t.Geetest(o))};s[r]=s[r]||[];var a=f[r]||"init";"init"===a?(f[r]="loading",s[r].push(i),l(o.protocol,e.static_servers||e.domains,e[r]||e.path,null,function(t){if(t)f[r]="fail",d("networkError",o);else{f[r]="loaded";for(var e=s[r],n=0,i=e.length;n<i;n+=1){var a=e[n];"function"==typeof a&&a()}s[r]=[]}})):"loaded"===a?i():"fail"===a?d("networkError",o):"loading"===a&&s[r].push(i)})};return t.initGeetest=h,h});