找回密码
 立即注册
搜索
热搜: 丝袜 魅魔 黑丝
查看: 7|回复: 0

19264035_IdentityV与♂♀(R18向)

[复制链接]

13万

主题

343

回帖

22万

积分

管理员

站长

UID
1
积分
224400
余额
13 R
Moe币
84881
在线时间
279 小时
注册时间
2025-12-28
最后登录
2026-11-9
发表于 2026-9-3 23:00:59 | 显示全部楼层 |阅读模式
V}},dt(vt.asn1.DERSequence,vt.asn1.DERAbstractStructured),vt.asn1.DERSet=function(t){vt.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var r=this.asn1Array[e];t.push(r.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},dt(vt.asn1.DERSet,vt.asn1.DERAbstractStructured),vt.asn1.DERTaggedObject=function(t){vt.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,r){this.hT=e,this.isExplicit=t,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},dt(vt.asn1.DERTaggedObject,vt.asn1.ASN1Object);var yt,gt,bt=(yt=function(t,e){return(yt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}yt(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),mt=function(t){function e(r){var n=t.call(this)||this;return r&&("string"==typeof r?n.parseKey(r):(e.hasPrivateKeyProperty(r)||e.hasPublicKeyProperty(r))&&n.parsePropertiesFrom(r)),n}return bt(e,t),e.prototype.parseKey=function(t){try{var e=0,r=0,n=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?d(t):v.unarmor(t),i=E.decode(n);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){e=i.sub[1].getHexStringValue(),this.n=I(e,16),r=i.sub[2].getHexStringValue(),this.e=parseInt(r,16);var o=i.sub[3].getHexStringValue();this.d=I(o,16);var s=i.sub[4].getHexStringValue();this.p=I(s,16);var a=i.sub[5].getHexStringValue();this.q=I(a,16);var u=i.sub[6].getHexStringValue();this.dmp1=I(u,16);var c=i.sub[7].getHexStringValue();this.dmq1=I(c,16);var l=i.sub[8].getHexStringValue();this.coeff=I(l,16)}else{if(2!==i.sub.length)return!1;if(i.sub[0].sub){var f=i.sub[1].sub[0];e=f.sub[0].getHexStringValue(),this.n=I(e,16),r=f.sub[1].getHexStringValue(),this.e=parseInt(r,16)}else e=i.sub[0].getHexStringValue(),this.n=I(e,16),r=i.sub[1].getHexStringValue(),this.e=parseInt(r,16)}return!0}catch(h){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new vt.asn1.DERInteger({int:0}),new vt.asn1.DERInteger({bigint:this.n}),new vt.asn1.DERInteger({int:this.e}),new vt.asn1.DERInteger({bigint:this.d}),new vt.asn1.DERInteger({bigint:this.p}),new vt.asn1.DERInteger({bigint:this.q}),new vt.asn1.DERInteger({bigint:this.dmp1}),new vt.asn1.DERInteger({bigint:this.dmq1}),new vt.asn1.DERInteger({bigint:this.coeff})]};return new vt.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return f(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new vt.asn1.DERSequence({array:[new vt.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new vt.asn1.DERNull]}),e=new vt.asn1.DERSequence({array:[new vt.asn1.DERInteger({bigint:this.n}),new vt.asn1.DERInteger({int:this.e})]}),r=new vt.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new vt.asn1.DERSequence({array:[t,r]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return f(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var r="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(r,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return(t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n")+"-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return(t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n")+"-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(ht),wt=r(606),_t=void 0!==wt?null===(gt=wt.env)||void 0===gt?void 0:"3.5.4":void 0,St=function(){function t(t){void 0===t&&(t={}),this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=t.key||null}return t.prototype.setKey=function(t){t?(this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new mt(t)):!this.key&&this.log&&console.error("A key was not set.")},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(h(t))}catch(e){return!1}},t.prototype.encrypt=function(t){try{return f(this.getKey().encrypt(t))}catch(e){return!1}},t.prototype.encryptOAEP=function(t){try{return f(this.getKey().encrypt(t,ft))}catch(e){return!1}},t.prototype.sign=function(t,e,r){void 0===e&&(e=function(t){return t}),void 0===r&&(r="");try{return f(this.getKey().sign(t,e,r))}catch(n){return!1}},t.prototype.signSha256=function(t){return this.sign(t,(function(t){return $(Y(t))}),"sha256")},t.prototype.verify=function(t,e,r){void 0===r&&(r=function(t){return t});try{return this.getKey().verify(t,h(e),r)}catch(n){return!1}},t.prototype.verifySha256=function(t,e){return this.verify(t,e,(function(t){return $(Y(t))}))},t.prototype.getKey=function(t){if(!this.key){if(this.key=new mt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=_t,t}()}(),n.default}()),at.exports}function ct(){if(ot)return st;ot=1;var t=st&&st.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))},e=st&&st.__generator||function(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(u){a=[6,u],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},r=st&&st.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(st,"__esModule",{value:!0}),st.getJSEncrypt=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){return[2,n.default]}))}))};var n=r(ut());return st}var lt,ft,ht,pt,dt,vt={},yt={exports:{}};function gt(){return lt||(lt=1,yt.exports=function(){function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(){r=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(I){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,s=Object.create(i.prototype),a=new A(n||[]);return o(s,"_invoke",{value:D(t,r,a)}),s}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",v="executing",y="completed",g={};function b(){}function m(){}function w(){}var _={};l(_,a,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(j([])));E&&E!==n&&i.call(E,a)&&(_=E);var x=w.prototype=b.prototype=Object.create(_);function T(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(n,o,s,a){var u=h(t[n],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&i.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(l).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var n;o(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,n){r(t,i,e,n)}))}return n=n?n.then(o,o):o()}})}function D(e,r,n){var i=p;return function(o,s){if(i===v)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw s;return{value:t,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=k(a,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?y:d,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function k(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var s=o.arg;return s?s.done?(r[e.resultName]=s.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function j(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function r(){for(;++n<e.length;)if(i.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return m.prototype=w,o(x,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:m,configurable:!0}),m.displayName=l(w,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},T(O.prototype),l(O.prototype,u,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new O(f(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},T(x),l(x,c,"Generator"),l(x,a,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=j,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return a.type="throw",a.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;R(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:j(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(c){return void r(c)}a.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var s=t.apply(e,r);function a(t){i(s,n,o,a,u,"next",t)}function u(t){i(s,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,w(n.key),n)}}function u(t,e,r){return e&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e,r){return(e=w(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=l(t);if(e){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}(this,r)}}function d(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=d(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},v.apply(this,arguments)}function y(t,e,r,n){return(y="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(t,e,r,n){var i,o=d(t,e);if(o){if((i=Object.getOwnPropertyDescriptor(o,e)).set)return i.set.call(n,r),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(n,e)){if(!i.writable)return!1;i.value=r,Object.defineProperty(n,e,i)}else c(n,e,r);return!0})(t,e,r,n)}function g(t,e,r,n,i){if(!y(t,e,r,n||t)&&i)throw new TypeError("failed to set property");return r}function b(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,s,a=[],u=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e);else for(;!(u=(n=o.call(r)).done)&&(a.push(n.value),a.length!==e);u=!0);}catch(l){c=!0,i=l}finally{try{if(!u&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function w(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function _(t,e){Error.call(this),this.result=S[t]||t,this.msg=e||E[t]}var S={DB_ERROR:"DBError",CRYPTO_ERROR:"CryptoError",INVALID_ARGUMENT:"InvalidArgument",ANDRIOD_INIT_FAIL:"AndroidInitFail"},E={DB_ERROR:"打开数据库失败",CRYPTO_ERROR:"加密过程出错",INVALID_ARGUMENT:"入参格式错误",ANDRIOD_INIT_FAIL:"安卓初始化失败"},x={};Object.keys(S).forEach((function(t){x[t]={value:t}})),Object.defineProperties(_,x);var T,O,D=function(t,e,r){if(void 0===t)throw new _(_.INVALID_ARGUMENT,r);if(n(t)!==e)throw new _(_.INVALID_ARGUMENT,r);return!0},k=function(t){if("undefined"!=typeof document){var e={};try{e=document.cookie.split(";").map((function(t){return t.trim().split("=")})).reduce((function(t,e){var r=b(e,2),n=r[0],i=r[1];return t[n]=decodeURIComponent(i),t}),{})}catch(r){}return e[t]||null}},P=Object.prototype.toString,R=Object.getPrototypeOf,A=(T=Object.create(null),function(t){var e=P.call(t);return T[e]||(T[e]=e.slice(8,-1).toLowerCase())}),j=function(t){return t=t.toLowerCase(),function(e){return A(e)===t}},I=Array.isArray,B=(O="undefined",function(t){return n(t)===O}),C=function(t){return null!==t&&"object"===n(t)},N=j("Date"),M=j("URLSearchParams");function L(t,e){var r,i,o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,s=void 0!==o&&o;if(null!=t)if("object"!==n(t)&&(t=[t]),I(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{var a,u=s?Object.getOwnPropertyNames(t):Object.keys(t),c=u.length;for(r=0;r<c;r++)a=u[r],e.call(null,t[a],a,t)}}var V={isString:function(t){return"string"==typeof t},isArray:I,isUndefined:B,isDate:N,isURLSearchParams:M,isObject:C,mergeConfig:function(t,r){r=r||{};var n=e({},t);return Object.keys(r).forEach((function(t){t in n&&C(r[t])?n[t]=e(e({},n[t]),r[t]):n[t]=r[t]})),n},forEach:L,inherits:function(t,e,r,n){t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:function(t,e,r,n){var i,o,s,a={};if(e=e||{},null==t)return e;do{for(o=(i=Object.getOwnPropertyNames(t)).length;o-- >0;)s=i[o],n&&!n(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==r&&R(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},toObjectSet:function(t,e){var r={},n=function(t){t.forEach((function(t){r[t]=!0}))};return I(t)?n(t):n(String(t).split(e)),r},toJSONObject:function(t){var e=new Array(10);return function t(r,n){if(C(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[n]=r;var i=I(r)?[]:{};return L(r,(function(e,r){var o=t(e,n+1);!B(o)&&(i[r]=o)})),e[n]=void 0,i}}return r}(t,0)},isAbsoluteURL:function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},combineURLs:function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}};function H(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}V.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:V.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var q=H.prototype,U={};function F(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(t){U[t]={value:t}})),Object.defineProperties(H,U),Object.defineProperty(q,"isAxiosError",{value:!0}),H.from=function(t,e,r,n,i,o){var s=Object.create(q);return V.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(function(t){return"isAxiosError"!==t})),H.call(s,t.message,e,r,n,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};var K=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),z="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){var n,i,o=t.data,s=t.headers,a=t.responseType,u=new XMLHttpRequest,c=(n=t.baseURL,i=t.url,n&&!V.isAbsoluteURL(i)?V.combineURLs(n,i):i);function l(t){var e="json"===a;return t&&V.isString(t)&&e?JSON.parse(t):t}function f(){if(u){var n=(o="getAllResponseHeaders"in u&&u.getAllResponseHeaders(),h={},o&&o.split("\n").forEach((function(t){f=t.indexOf(":"),s=t.substring(0,f).trim().toLowerCase(),c=t.substring(f+1).trim(),!s||h[s]&&K[s]||("set-cookie"===s?h[s]?h[s].push(c):h[s]=[c]:h[s]=h[s]?h[s]+", "+c:c)})),h),i=a&&"text"!==a&&"json"!==a?u.response:u.responseText;!function(t,e,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new H("Request failed with status code "+r.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t)}),(function(t){r(t)}),{data:i&&l(i),status:u.status,statusText:u.statusText,headers:n,config:t,request:u}),u=null}var o,s,c,f,h}u.open(t.method.toUpperCase(),function(t,e,r){if(!e)return t;var n,i=r&&r.serialize;if(i)n=i(e,r);else if(V.isURLSearchParams(e))n=e.toString();else{var o=[];V.forEach(e,(function(t,e){null!=t&&(V.isArray(t)?e+="[]":t=[t],V.forEach(t,(function(t){V.isDate(t)?t=t.toISOString():V.isObject(t)&&(t=JSON.stringify(t)),o.push(F(e)+"="+F(t))})))})),n=o.join("&")}if(n){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+n}return t}(c,t.params,t.paramsSerializer),!0),u.timeout=t.timeout,"onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(f)},u.onabort=function(){u&&(r(new H("Request aborted",H.ECONNABORTED,t,u)),u=null)},u.onerror=function(){r(new H("Network Error",H.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";r(new H(e,t,u)),u=null},"setRequestHeader"in u&&V.forEach(s,(function(t,e){u.setRequestHeader(e,t)})),V.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),a&&"json"!==a&&(u.responseType=t.responseType),u.send(o||null)}))},G={adapter:["xhr","http"],timeout:2e4,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,withCredentials:!0,responseType:"json",validateStatus:function(t){return t>=200&&t<300},headers:{Accept:"application/json, text/plain, */*"}},W=function(){function t(){s(this,t),this.defaults=G}return u(t,[{key:"request",value:function(t,e){var r;"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=V.mergeConfig(this.defaults,e)).method=(e.method||this.defaults.method||"get").toLowerCase();try{r=z(e)}catch(n){return Promise.reject(n)}return r}}]),t}();V.forEach(["delete","get","head","options"],(function(t){W.prototype[t]=function(e,r){return this.request(V.mergeConfig(r||{},{method:t,url:e,data:(r||{}).data}))}})),V.forEach(["post","put","patch"],(function(t){W.prototype[t]=function(e,r,n){return this.request(V.mergeConfig(n||{},{method:t,headers:{"Content-Type":"application/json"},url:e,data:JSON.stringify(r)}))}}));var J,X,Z=new W,Y={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn",LOG:"log"},$=function(){function t(e){s(this,t),this.level=e||Y.INFO}return u(t,[{key:"log",value:function(t){this.shouldLog(t)}},{key:"shouldLog",value:function(t){var e=Object.values(Y);return e.indexOf(t)>=e.indexOf(this.level)}},{key:"debug",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[Y.DEBUG].concat(e))}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[Y.ERROR].concat(e))}},{key:"info",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[Y.INFO].concat(e))}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.log.apply(this,[Y.WARN].concat(e))}}]),t}(),Q=new $(Y.DEBUG),tt=!1,et=[],rt=function t(){tt||et.length>0&&(tt=!0,it().then((function(t){nt()})).catch((function(t){nt(null,t)})).finally((function(){tt=!1,t()})))},nt=function(t,e){et.forEach((function(t){e?t.reject(e):t.resolve("update ksosid success")})),et=[]},it=function(){return(J=J||o(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){var r=window.location.hostname.split(".").slice(-2).join(".");Z.post("https://account.".concat(r,"/passport/secure/api/grant_token"),{grant_type:"refresh_token"}).then((function(e){t(e)})).catch((function(r){var n=(r.response||{}).data||r,i=n.result,o=n.msg;"TokenExpired"===i.result?(Q.info("token is expired when refresh token"),t({result:"ok",msg:"update ksosid success"})):e(new _(i,o))}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)},ot=function(){return(X=X||o(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){et.push({resolve:t,reject:e}),rt()})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)},st=function(t){function e(){s(this,e)}return u(e,[{key:"checkKsoSid",value:function(){return(t=t||o(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){!k("exp")&&k("_ku")?ot().then((function(){t("update ksosid success")})).catch((function(t){e(t)})):!k("nexp")&&k("_ku")?(t("get ksosid success,need refresh"),ot()):t("get ksosid success")})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}]),e}(),at=function(t,e){return t>>>e|t<<32-e},ut=function t(e){for(var r,n,i=Math.pow,o=i(2,32),s="length",a="",u=[],c=8*e[s],l=t.h=t.h||[],f=t.k=t.k||[],h=f[s],p={},d=2;h<64;d++)if(!p[d]){for(r=0;r<313;r+=d)p[r]=d;l[h]=i(d,.5)*o|0,f[h++]=i(d,1/3)*o|0}for(e+="€";e[s]%64-56;)e+="\0";for(r=0;r<e[s];r++){if((n=e.charCodeAt(r))>>8)return;u[r>>2]|=n<<(3-r)%4*8}for(u[u[s]]=c/o|0,u[u[s]]=c,n=0;n<u[s];){var v=u.slice(n,n+=16),y=l;for(l=l.slice(0,8),r=0;r<64;r++){var g=v[r-15],b=v[r-2],m=l[0],w=l[4],_=l[7]+(at(w,6)^at(w,11)^at(w,25))+(w&l[5]^~w&l[6])+f[r]+(v[r]=r<16?v[r]:v[r-16]+(at(g,7)^at(g,18)^g>>>3)+v[r-7]+(at(b,17)^at(b,19)^b>>>10)|0);(l=[_+((at(m,2)^at(m,13)^at(m,22))+(m&l[1]^m&l[2]^l[1]&l[2]))|0].concat(l))[4]=l[4]+_|0}for(r=0;r<8;r++)l[r]=l[r]+y[r]|0}for(r=0;r<8;r++)for(n=3;n+1;n--){var S=l[r]>>8*n&255;a+=(S<16?0:"")+S.toString(16)}return a},ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",lt=function(t){for(var e="",r=0;r<t;r++){var n=Math.floor(66*Math.random());e+=ct.charAt(n)}return e},ft=function(t){var e=ut(t),r=new Uint8Array(e.match(/[\da-f]{2}/gi).map((function(t){return parseInt(t,16)})));return ht(r)},ht=function(t){var e=new Uint8Array(t);return pt(String.fromCharCode.apply(null,e))},pt=function(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},dt=function(t,e,n){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(a,t);var i=p(a);function a(){var t,e,r;return s(this,a),r=i.call(this),k("_ku")?g((t=h(r),l(a.prototype)),"supportKsosid",!0,t,!0):g((e=h(r),l(a.prototype)),"supportKsosid",!1,e,!0),r}return u(a,[{key:"signPopToken",value:function(t,n){return(e=e||o(r().mark((function t(e,n){var i=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){D(e,"string","method格式错误"),D(n,"string","uri格式错误"),v(l(a.prototype),"checkKsoSid",i).call(i).then((function(e){t("empty")})).catch((function(t){r(t)}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},{key:"generatePKCEParam",value:function(){return(n=n||o(r().mark((function t(){var e,n,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Math.floor(86*Math.random())+43,n=lt(e),i=ft(n),t.abrupt("return",{code_verifier:n,code_challenge:i});case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}]),a}(st),vt=new dt,yt=function(){function t(){s(this,t)}return u(t,[{key:"_checkAndroidInit",value:function(){return new Promise((function(t,e){if(window.ksointernalaccountapi)return t(!0);var r=0,n=setInterval((function(){return r++,window.ksointernalaccountapi?(clearInterval(n),t(!0)):r>15?(clearInterval(n),e(new _(_.ANDRIOD_INIT_FAIL))):void 0}),10)}))}},{key:"_execClientSdk",value:function(t){var e=this,r=t.eventName,n=t.params;return new Promise((function(t,i){e._checkAndroidInit().then((function(){var e=Object.assign({},n,{kwtid:k("kwtid")});window.ksointernalaccountapi[r](e,(function(e){if("ok"===e.result)return t(e.data);var r=e.result,n=e.msg;return i(new _(r,n))}))})).catch((function(t){return i(t)}))}))}},{key:"signPopToken",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k("cv");return new Promise((function(i,o){r._execClientSdk({eventName:"signPopToken",params:{method:t,uri:e,cv:n}}).then((function(t){i(t)})).catch((function(t){o(t)}))}))}},{key:"generatePKCEParam",value:function(){var t=this;return new Promise((function(e,r){t._execClientSdk({eventName:"generatePKCEParam"}).then((function(t){e(t)})).catch((function(t){r(t)}))}))}},{key:"loginCallback",value:function(t,e,r){var n=this;return new Promise((function(i,o){n._execClientSdk({eventName:"loginCallback",params:{codeVerifier:t,authCode:e,action:r}}).then((function(t){i(t)})).catch((function(t){o(t)}))}))}},{key:"hasClientAPI",value:function(t){var e=this;return new Promise((function(r,n){e._checkAndroidInit().then((function(){window.ksointernalaccountapi&&window.ksointernalaccountapi[t]?r(!0):r(!1)})).catch((function(t){n(t)}))}))}}]),t}(),gt=u((function t(){if(s(this,t),window.ksointernalaccountapi||window.ksointernalaccountnativeandroidapi){var e=new yt;return e.supportKsosid=!0,e}return vt}));return"undefined"!=typeof window?new gt:{}}()),yt.exports}function bt(){if(ft)return vt;ft=1;var t=vt&&vt.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))},e=vt&&vt.__generator||function(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(u){a=[6,u],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},r=vt&&vt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vt,"__esModule",{value:!0}),vt.getKsoAccountSDK=function(){return t(this,void 0,void 0,(function(){var t,r,i,o;return e(this,(function(e){return(null===(o=null===(i=null===(r=null===(t=window.__WPSPLUGIN__)||void 0===t?void 0:t.pluginMgr)||void 0===r?void 0:r.helper)||void 0===i?void 0:i.util)||void 0===o?void 0:o.getKSOAccSDK)?[2,window.__WPSPLUGIN__.pluginMgr.helper.util.getKSOAccSDK()]:[2,n.default]}))}))};var n=r(gt());return vt}function mt(){return ht||(ht=1,Object.defineProperty(m,"__esModule",{value:!0}),m.ksoAccSDK=m.jsencrypt=m.cryptojs=void 0,"undefined"!=typeof CLIENT_TYPE&&"wo"===CLIENT_TYPE?(m.cryptojs=_(),m.jsencrypt=x(),m.ksoAccSDK=D()):(m.cryptojs=nt(),m.jsencrypt=ct(),m.ksoAccSDK=bt())),m}function wt(){if(pt)return b;pt=1;var t=b&&b.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))},e=b&&b.__generator||function(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(u){a=[6,u],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(b,"__esModule",{value:!0}),b.decrypt=function(n,i){return t(this,void 0,void 0,(function(){var t,o,s,a;return e(this,(function(e){switch(e.label){case 0:return n=n instanceof Object?JSON.stringify(n):n,[4,r.cryptojs.getCryptoJS()];case 1:return t=e.sent(),o=t.Utf8,s=t.AES,a=t.Pkcs7,[2,s.decrypt(n,o.parse(i.key),{iv:o.parse(i.iv),padding:a}).toString(o)]}}))}))},b.randomString=n,b.setHeaderParams=function(i){return t(this,void 0,void 0,(function(){var t,o,s,a,u,c,l,f,h,p,d;return e(this,(function(e){switch(e.label){case 0:return t=i._config,o=i._charset,s=i.aes,Object.assign(s,{key:n(o,32),iv:n(o,16)}),a={private_key:btoa(s.key),iv:s.iv},a=JSON.stringify(a),[4,r.jsencrypt.getJSEncrypt()];case 1:return u=e.sent(),[4,r.cryptojs.getCryptoJS()];case 2:return c=e.sent(),l=c.Base64,f=c.Utf8,h=new u,p=t.public_key||t.publicKey||"",d=l.parse(p).toString(f),h.setPublicKey(d),a=h.encrypt(a),Object.assign(s,{"Encryption-Parameters":a}),[2,s]}}))}))},b.setDataEncrypt=function(n,i){return t(this,void 0,void 0,(function(){var t,o,s,a,u,c,l,f;return e(this,(function(e){switch(e.label){case 0:return n?(n=n instanceof Object?JSON.stringify(n):n,[4,r.cryptojs.getCryptoJS()]):[3,2];case 1:t=e.sent(),o=t.Base64,s=t.Utf8,a=t.AES,u=t.Pkcs7,c=s.parse(i.key),l=s.parse(i.iv),f=a.encrypt(n,c,{iv:l,padding:u}),n=o.stringify(f.ciphertext),e.label=2;case 2:return[2,n]}}))}))};var r=mt();function n(t,e){for(var r="",n=0;n<e;n++){r+=t[Math.ceil(Math.random()*(t.length-1))]}return r}return b}function _t(){if(dt)return h;dt=1;var t=h&&h.__assign||function(){return t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},t.apply(this,arguments)},e=h&&h.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))},r=h&&h.__generator||function(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(u){a=[6,u],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},o=h&&h.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(h,"__esModule",{value:!0}),h.initConfig=function(n){return e(this,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:if(function(){if(d.public_key)return!((d.expires||0)<Date.now());return!1}())return[2,d];r.label=1;case 1:return r.trys.push([1,8,9,10]),v?[4,v]:[3,3];case 2:return r.sent(),[3,6];case 3:return n?[3,5]:[4,v=E()];case 4:return r.sent(),[3,6];case 5:d=t({},n),r.label=6;case 6:return g=d.ttl?.9*d.ttl:g,[4,v=w()];case 7:return r.sent(),[3,10];case 8:return e=r.sent(),console.error(e),[3,10];case 9:return v=null,[7];case 10:return[2,d]}}))}))},h.getEncryptConfig=function(){return d},h.setLoadEncryptError=function(t){l=t,t&&!f&&(f=setTimeout((function(){l=!1,f=null}),a.ENCRYPT_RETRY_TIME))},h.getLoadEncryptError=function(){return l},h.setStartTiming=S,h.refreshEncryptInfo=E,h.encrypt=function(n){return e(this,void 0,void 0,(function(){var e,i,o,s;return r(this,(function(r){switch(r.label){case 0:return e=n.content,i=n.isEncryptHeaders,s={},[4,(a=e,(0,c.setDataEncrypt)(a,b))];case 1:return s.content=r.sent(),o=s,!i&&l||(o=t(t({},o),{"X-Encryption-Algorithm":"AESCBC","X-Encryption-App-Key":"ai","X-Encryption-Param":b["Encryption-Parameters"],"X-Encryption-Public-Key":d.public_key,"X-Encryption-ID":d.id,"Content-Type":"text/plain"})),[2,o]}var a}))}))},h.decrypt=function(t){return e(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,(0,c.decrypt)(t,b)];case 1:return[2,e.sent()]}}))}))},h.setNetworkRequestFunction=function(t){m=t},h.createDecryptWithSnapshot=function(){var t=this,n={key:b.key,iv:b.iv,"Encryption-Parameters":b["Encryption-Parameters"]};return function(i){return e(t,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,(0,c.decrypt)(i,n)];case 1:return[2,t.sent()]}}))}))}};var s=o(y()),a=n(),u=i(),c=wt(),l=!1,f=null,p=a.CHARSET,d={algorithm:"",public_key:"",expires:0,id:"",ttl:0},v=null,g=324e4,b={key:"",iv:"","Encryption-Parameters":""},m=null;function w(){return e(this,void 0,void 0,(function(){var t;return r(this,(function(e){switch(e.label){case 0:return[4,(0,c.setHeaderParams)({_config:d,_charset:p,aes:b})];case 1:return t=e.sent(),Object.assign(b,t),[2]}}))}))}var _=null;function S(){var t=this;_||(_=setTimeout((function(){return e(t,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return _=null,[4,E()];case 1:return t.sent(),[2]}}))}))}),g))}function E(){return e(this,void 0,void 0,(function(){var e,n,i,o;return r(this,(function(r){switch(r.label){case 0:if(!m)return console.error("[ai sdk refreshEncryptInfo error] Network request function not injected"),[2];r.label=1;case 1:return r.trys.push([1,3,4,5]),e=(0,u.getSmartBaseUrlV5)(a.ENCRYPT_V5_PATH),n=s.default.getAiServerHeadersV5(),i={method:"GET",headers:n,timeout:3e4,url:e+a.ENCRYPT_V5_PATH},[4,v=m(i)];case 2:if(!(o=r.sent()).data)throw new Error("invalid config");return(d=t({},o.data)).ttl&&(g=.9*d.ttl),w(),[3,5];case 3:return r.sent(),[3,5];case 4:return S(),[7];case 5:return[2]}}))}))}return h}var St,Et={},xt={},Tt={};var Ot,Dt={},kt={},Pt={};function Rt(){if(Ot)return Pt;function t(){var t,e,r,n=null===(e=null===(t=window.Extention)||void 0===t?void 0:t.Webview)||void 0===e?void 0:e.getID();return null===(r=null==n?void 0:n.result)||void 0===r?void 0:r.ID}return Ot=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.getWebviewId=t,Pt.hijackCallback=function(e){var r=t();return function(t){t.view_id===r&&e(t)}},Pt}var At,jt={};var It,Bt,Ct={};function Nt(){if(Bt)return kt;Bt=1;var t=kt&&kt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kt,"__esModule",{value:!0});var e=Rt(),r=function(){if(At)return jt;At=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.getOfficeType=function(){var e,r,n,i,o,s=null===(o=null===(i=null===(n=null===(r=null===(e=window.Extention)||void 0===e?void 0:e.Base)||void 0===r?void 0:r.WpsOffice)||void 0===n?void 0:n.getAppName())||void 0===i?void 0:i.result)||void 0===o?void 0:o.appname;return s||t.OfficeType.unknown};var t=a();return jt}(),n=t(function(){if(It)return Ct;It=1,Object.defineProperty(Ct,"__esModule",{value:!0});var t=Rt(),e=function(){function e(){this.copilot=null}return e.prototype.destroyCopilot=function(){var t;null===(t=this.copilot)||void 0===t||t.destroy(),this.copilot=null},e.prototype.createCopilot=function(e){var r;if(void 0===e&&(e=!1),this.copilot)throw new Error("请在项目初始化时, 最开始调用此方法");var n=(0,t.getWebviewId)();this.copilot=null===(r=window.Extention)||void 0===r?void 0:r.CommonAI.createCopilot({view_id:n,open_intercept:e})},e.prototype.getCopilot=function(){return this.copilot||this.createCopilot(),this.copilot},e}();return Ct.default=new e,Ct}()),i=function(t){var e,r,n;null===(n=null===(r=null===(e=window.Extention)||void 0===e?void 0:e.TaskPanelCopilot)||void 0===r?void 0:r.removeDocumentActivedListener)||void 0===n||n.call(r,t)},o={getFileId:function(){var t,e,r=n.default.getCopilot();return(null==r?void 0:r.getSessFileId)?null===(e=null===(t=null==r?void 0:r.getSessFileId())||void 0===t?void 0:t.result)||void 0===e?void 0:e.sess_file_id:""},getOfficeType:r.getOfficeType,getDocumentInfo:function(){var t,e,r=null===(e=null===(t=window.Extention)||void 0===t?void 0:t.TaskPanelCopilot)||void 0===e?void 0:e.getActiveDocumentInfo();return(null==r?void 0:r.code)?null==r?void 0:r.result:{cloud_file_id:"",integrity_check_value:""}},addDocumentActivedListener:function(t){var r,n,o,s=(0,e.hijackCallback)(t);i(s),null===(o=null===(n=null===(r=window.Extention)||void 0===r?void 0:r.TaskPanelCopilot)||void 0===n?void 0:n.addDocumentActivedListener)||void 0===o||o.call(n,s)},removeDocumentActivedListener:i,addDocBecomeCloudDocListener:function(t){var r;try{var n=(0,e.getWebviewId)();null===(r=window.Extention)||void 0===r||r.TaskPanelCopilot.addDocBecomeCloudDocListener({view_id:n},t)}catch(i){}},removeDocBecomeCloudDocListener:function(t){var r,n=(0,e.getWebviewId)();null===(r=window.Extention)||void 0===r||r.TaskPanelCopilot.removeDocBecomeCloudDocListener({view_id:n},t)}};return kt.default=o,kt}var Mt,Lt={};var Vt,Ht,qt,Ut,Ft={};function Kt(){return Ht||(Ht=1,function(e){var r=Dt&&Dt.__assign||function(){return r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},n=Dt&&Dt.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{u(n.next(t))}catch(e){o(e)}}function a(t){try{u(n.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))},i=Dt&&Dt.__generator||function(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(u){a=[6,u],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},o=Dt&&Dt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKInfo=e.getFileInfo=e.getNetworkInfo=e.safeStringify=e.getCommonInfo=e.report=void 0,e.handleErrorAndReport=d,e.handlePromise=function(t,e){return n(this,void 0,void 0,(function(){var n;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,t];case 1:return[2,i.sent()];case 2:throw n=i.sent(),d(r(r({},e),{error:n})),n;case 3:return[2]}}))}))};var s=o(t()),a=o(Nt()),c=o(u()),l=o(function(){if(Mt)return Lt;Mt=1,Object.defineProperty(Lt,"__esModule",{value:!0});var t=function(){function t(){}return t.prototype.init=function(){},t.prototype.report=function(t,e){var r;void 0===e&&(e={}),null===(r=window.collectionAI)||void 0===r||r.call(window,t,e)},t}();return Lt.default=new t,Lt}()),f=o(function(){if(Vt)return Ft;Vt=1,Object.defineProperty(Ft,"__esModule",{value:!0});var t=function(){function t(){}return t.prototype.init=function(){},t.prototype.report=function(t,e,r){var n;void 0===e&&(e={}),void 0===r&&(r=1),null===(n=window.Extention)||void 0===n||n.Report.sendInfo(t,e,r)},t}();return Ft.default=new t,Ft}()),h="aisdk_common_trace";e.report=s.default.isKdocs?l.default.report:f.default.report;var p=function(){var t,e,r,n,i;return s.default.isKdocs?window.__WPSENV__.user_id||"":s.default.isWps&&(null===(i=null===(n=null===(r=null===(e=null===(t=null===window||void 0===window?void 0:window.Extention)||void 0===t?void 0:t.Account)||void 0===e?void 0:e.getUserInfo)||void 0===r?void 0:r.call(e))||void 0===n?void 0:n.result)||void 0===i?void 0:i.userId)||""};e.getCommonInfo=function(){var t,e,r,n,i=window.Extention?null===(n=null===(r=null===(e=(t=window.Extention.PluginManager).getPluginInfo)||void 0===e?void 0:e.call(t))||void 0===r?void 0:r.result)||void 0===n?void 0:n.name:"";return{platform:s.default.getClientType(),ua:window.navigator.userAgent,version:s.default.getWpsVersion(),start_time:Date.now(),userid:p(),plugin_name:i,error:""}};e.safeStringify=function(t){if(null==t||"function"==typeof t)return"";try{return JSON.stringify(t)}catch(e){return"Unable to stringify data"}};e.getNetworkInfo=function(t){var r,n=t.startTime,i=t.requestParams,o=t.responseData,s=Date.now()-n,a=(null===(r=null==i?voi
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|M男之家

GMT+8, 2026-11-12 22:57 , Processed in 0.040846 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表