customer-chat-sdk 1.4.8 → 1.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"CustomerSDK.d.ts","sourceRoot":"","sources":["../../src/core/CustomerSDK.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAIvD;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAEnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAA;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACzC;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,WAAW,CAA2B;IAC9C,OAAO,CAAC,iBAAiB,CAAiC;IAC1D,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,UAAU,CAA0B;IAC5C,OAAO,CAAC,MAAM,CAAyB;IACvC,OAAO,CAAC,kBAAkB,CAAyC;IACnE,OAAO,CAAC,YAAY,CAA+B;;IAInD;;;;;;OAMG;IACG,IAAI,CACR,MAAM,EAAE,SAAS,EACjB,kBAAkB,CAAC,EAAE,yBAAyB,EAC9C,YAAY,CAAC,EAAE,eAAe,GAC7B,OAAO,CAAC,UAAU,CAAC;IA6GtB;;OAEG;IACH,OAAO,CAAC,6BAA6B;IA6BrC;;;OAGG;IACH,uBAAuB,CAAC,UAAU,EAAE,MAAM,G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Ac;IA8B5B;;OAEG;IACH,gBAAgB,CAAC,UAAU,GAAE,MAAM,GAAG,MAAU,EAAE,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,IAAI;IAsB7G;;OAEG;IACH,iBAAiB,IAAI,IAAI;IAIzB;;OAEG;IACH,OAAO,IAAI,IAAI;CAoBhB"}
@@ -29679,21 +29679,24 @@ let CustomerSDK$1 = class CustomerSDK {
29679
29679
  agent: config.agent,
29680
29680
  timestamp: Date.now()
29681
29681
  };
29682
- // 初始化图标管理器(支持传送目标)
29683
- const iconTarget = config.target || undefined;
29684
- const iconPosition = config.iconPosition || undefined;
29685
- this.iconManager = new IconManager(iconPosition, this.debug, iconTarget, {
29686
- sideAttach: config.sideAttach,
29687
- sideHideRatio: config.sideHideRatio,
29688
- magnetic: config.magnetic,
29689
- magneticDirection: config.magneticDirection,
29690
- margin: config.margin,
29691
- autoAttachDelay: config.autoAttachDelay
29692
- });
29693
- await this.iconManager.show();
29694
- // 设置图标点击回调(如果提供了)
29695
- if (initCallback?.onIconClick) {
29696
- this.iconManager.onClick(initCallback.onIconClick);
29682
+ // 仅当 showIcon === true 时创建并显示图标(默认不显示)
29683
+ const showIcon = config.showIcon === true;
29684
+ if (showIcon) {
29685
+ const iconTarget = config.target || undefined;
29686
+ const iconPosition = config.iconPosition || undefined;
29687
+ this.iconManager = new IconManager(iconPosition, this.debug, iconTarget, {
29688
+ sideAttach: config.sideAttach,
29689
+ sideHideRatio: config.sideHideRatio,
29690
+ magnetic: config.magnetic,
29691
+ magneticDirection: config.magneticDirection,
29692
+ margin: config.margin,
29693
+ autoAttachDelay: config.autoAttachDelay
29694
+ });
29695
+ await this.iconManager.show();
29696
+ // 设置图标点击回调(如果提供了)
29697
+ if (initCallback?.onIconClick) {
29698
+ this.iconManager.onClick(initCallback.onIconClick);
29699
+ }
29697
29700
  }
29698
29701
  // 初始化截图管理器(如果配置了截图)
29699
29702
  if (config.screenshot) {
@@ -29675,21 +29675,24 @@ let CustomerSDK$1 = class CustomerSDK {
29675
29675
  agent: config.agent,
29676
29676
  timestamp: Date.now()
29677
29677
  };
29678
- // 初始化图标管理器(支持传送目标)
29679
- const iconTarget = config.target || undefined;
29680
- const iconPosition = config.iconPosition || undefined;
29681
- this.iconManager = new IconManager(iconPosition, this.debug, iconTarget, {
29682
- sideAttach: config.sideAttach,
29683
- sideHideRatio: config.sideHideRatio,
29684
- magnetic: config.magnetic,
29685
- magneticDirection: config.magneticDirection,
29686
- margin: config.margin,
29687
- autoAttachDelay: config.autoAttachDelay
29688
- });
29689
- await this.iconManager.show();
29690
- // 设置图标点击回调(如果提供了)
29691
- if (initCallback?.onIconClick) {
29692
- this.iconManager.onClick(initCallback.onIconClick);
29678
+ // 仅当 showIcon === true 时创建并显示图标(默认不显示)
29679
+ const showIcon = config.showIcon === true;
29680
+ if (showIcon) {
29681
+ const iconTarget = config.target || undefined;
29682
+ const iconPosition = config.iconPosition || undefined;
29683
+ this.iconManager = new IconManager(iconPosition, this.debug, iconTarget, {
29684
+ sideAttach: config.sideAttach,
29685
+ sideHideRatio: config.sideHideRatio,
29686
+ magnetic: config.magnetic,
29687
+ magneticDirection: config.magneticDirection,
29688
+ margin: config.margin,
29689
+ autoAttachDelay: config.autoAttachDelay
29690
+ });
29691
+ await this.iconManager.show();
29692
+ // 设置图标点击回调(如果提供了)
29693
+ if (initCallback?.onIconClick) {
29694
+ this.iconManager.onClick(initCallback.onIconClick);
29695
+ }
29693
29696
  }
29694
29697
  // 初始化截图管理器(如果配置了截图)
29695
29698
  if (config.screenshot) {
@@ -35,4 +35,4 @@ e.mode.CTRGladman=function(){var A=e.lib.BlockCipherMode.extend();function t(A){
35
35
 
36
36
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
37
  */
38
- function(){var A=e,t=A.lib,n=t.WordArray,r=t.Hasher,o=A.algo,i=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),a=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),l=n.create([0,1518500249,1859775393,2400959708,2840853838]),u=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(A,e){for(var t=0;t<16;t++){var n=e+t,r=A[n];A[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o,h,m,C,Q,y,U,F,b,v,E,H=this._hash.words,I=l.words,x=u.words,S=i.words,L=s.words,D=a.words,M=c.words;for(y=o=H[0],U=h=H[1],F=m=H[2],b=C=H[3],v=Q=H[4],t=0;t<80;t+=1)E=o+A[e+S[t]]|0,E+=t<16?g(h,m,C)+I[0]:t<32?d(h,m,C)+I[1]:t<48?B(h,m,C)+I[2]:t<64?f(h,m,C)+I[3]:w(h,m,C)+I[4],E=(E=p(E|=0,D[t]))+Q|0,o=Q,Q=C,C=p(m,10),m=h,h=E,E=y+A[e+L[t]]|0,E+=t<16?w(U,F,b)+x[0]:t<32?f(U,F,b)+x[1]:t<48?B(U,F,b)+x[2]:t<64?d(U,F,b)+x[3]:g(U,F,b)+x[4],E=(E=p(E|=0,M[t]))+v|0,y=v,v=b,b=p(F,10),F=U,U=E;E=H[1]+m+b|0,H[1]=H[2]+C+v|0,H[2]=H[3]+Q+y|0,H[3]=H[4]+o+U|0,H[4]=H[0]+h+F|0,H[0]=E},_doFinalize:function(){var A=this._data,e=A.words,t=8*this._nDataBytes,n=8*A.sigBytes;e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=16711935&(t<<8|t>>>24)|4278255360&(t<<24|t>>>8),A.sigBytes=4*(e.length+1),this._process();for(var r=this._hash,o=r.words,i=0;i<5;i++){var s=o[i];o[i]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return r},clone:function(){var A=r.clone.call(this);return A._hash=this._hash.clone(),A}});function g(A,e,t){return A^e^t}function d(A,e,t){return A&e|~A&t}function B(A,e,t){return(A|~e)^t}function f(A,e,t){return A&t|e&~t}function w(A,e,t){return A^(e|~t)}function p(A,e){return A<<e|A>>>32-e}A.RIPEMD160=r._createHelper(h),A.HmacRIPEMD160=r._createHmacHelper(h)}(),e.RIPEMD160)}(xr)),Dr(),Mr||(Mr=1,function(A){var e,t,n,r,o,i,s,a,c;A.exports=(c=Yn(),pr(),Dr(),n=(t=(e=c).lib).Base,r=t.WordArray,i=(o=e.algo).SHA256,s=o.HMAC,a=o.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:i,iterations:25e4}),init:function(A){this.cfg=this.cfg.extend(A)},compute:function(A,e){for(var t=this.cfg,n=s.create(t.hasher,A),o=r.create(),i=r.create([1]),a=o.words,c=i.words,l=t.keySize,u=t.iterations;a.length<l;){var h=n.update(e).finalize(i);n.reset();for(var g=h.words,d=g.length,B=h,f=1;f<u;f++){B=n.finalize(B),n.reset();for(var w=B.words,p=0;p<d;p++)g[p]^=w[p]}o.concat(h),c[0]++}return o.sigBytes=4*l,o}}),e.PBKDF2=function(A,e,t){return a.create(t).compute(A,e)},c.PBKDF2)}(kr)),Rr(),Vr(),Wr(),Jr(),Zr(),qr(),Ao||(Ao=1,function(A){var e,t;A.exports=(t=Yn(),Vr(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(A,e){this._cipher.encryptBlock(A,e)}}),e.Decryptor=e.extend({processBlock:function(A,e){this._cipher.decryptBlock(A,e)}}),e),t.mode.ECB)}(eo)),to||(to=1,function(A){var e;A.exports=(e=Yn(),Vr(),e.pad.AnsiX923={pad:function(A,e){var t=A.sigBytes,n=4*e,r=n-t%n,o=t+r-1;A.clamp(),A.words[o>>>2]|=r<<24-o%4*8,A.sigBytes+=r},unpad:function(A){var e=255&A.words[A.sigBytes-1>>>2];A.sigBytes-=e}},e.pad.Ansix923)}(no)),ro||(ro=1,function(A){var e;A.exports=(e=Yn(),Vr(),e.pad.Iso10126={pad:function(A,t){var n=4*t,r=n-A.sigBytes%n;A.concat(e.lib.WordArray.random(r-1)).concat(e.lib.WordArray.create([r<<24],1))},unpad:function(A){var e=255&A.words[A.sigBytes-1>>>2];A.sigBytes-=e}},e.pad.Iso10126)}(oo)),io||(io=1,function(A){var e;A.exports=(e=Yn(),Vr(),e.pad.Iso97971={pad:function(A,t){A.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(A,t)},unpad:function(A){e.pad.ZeroPadding.unpad(A),A.sigBytes--}},e.pad.Iso97971)}(so)),ao||(ao=1,function(A){var e;A.exports=(e=Yn(),Vr(),e.pad.ZeroPadding={pad:function(A,e){var t=4*e;A.clamp(),A.sigBytes+=t-(A.sigBytes%t||t)},unpad:function(A){var e=A.words,t=A.sigBytes-1;for(t=A.sigBytes-1;t>=0;t--)if(e[t>>>2]>>>24-t%4*8&255){A.sigBytes=t+1;break}}},e.pad.ZeroPadding)}(co)),lo||(lo=1,function(A){var e;A.exports=(e=Yn(),Vr(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding)}(uo)),ho||(ho=1,function(A){var e,t,n,r;A.exports=(r=Yn(),Vr(),t=(e=r).lib.CipherParams,n=e.enc.Hex,e.format.Hex={stringify:function(A){return A.ciphertext.toString(n)},parse:function(A){var e=n.parse(A);return t.create({ciphertext:e})}},r.format.Hex)}(go)),Bo||(Bo=1,function(A){var e;A.exports=(e=Yn(),ir(),hr(),Rr(),Vr(),function(){var A=e,t=A.lib.BlockCipher,n=A.algo,r=[],o=[],i=[],s=[],a=[],c=[],l=[],u=[],h=[],g=[];!function(){for(var A=[],e=0;e<256;e++)A[e]=e<128?e<<1:e<<1^283;var t=0,n=0;for(e=0;e<256;e++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,r[t]=d,o[d]=t;var B=A[t],f=A[B],w=A[f],p=257*A[d]^16843008*d;i[t]=p<<24|p>>>8,s[t]=p<<16|p>>>16,a[t]=p<<8|p>>>24,c[t]=p,p=16843009*w^65537*f^257*B^16843008*t,l[d]=p<<24|p>>>8,u[d]=p<<16|p>>>16,h[d]=p<<8|p>>>24,g[d]=p,t?(t=B^A[A[A[w^B]]],n^=A[A[n]]):t=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],B=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var A=this._keyPriorReset=this._key,e=A.words,t=A.sigBytes/4,n=4*((this._nRounds=t+6)+1),o=this._keySchedule=[],i=0;i<n;i++)i<t?o[i]=e[i]:(c=o[i-1],i%t?t>6&&i%t==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=r[(c=c<<8|c>>>24)>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=d[i/t|0]<<24),o[i]=o[i-t]^c);for(var s=this._invKeySchedule=[],a=0;a<n;a++){if(i=n-a,a%4)var c=o[i];else c=o[i-4];s[a]=a<4||i<=4?c:l[r[c>>>24]]^u[r[c>>>16&255]]^h[r[c>>>8&255]]^g[r[255&c]]}}},encryptBlock:function(A,e){this._doCryptBlock(A,e,this._keySchedule,i,s,a,c,r)},decryptBlock:function(A,e){var t=A[e+1];A[e+1]=A[e+3],A[e+3]=t,this._doCryptBlock(A,e,this._invKeySchedule,l,u,h,g,o),t=A[e+1],A[e+1]=A[e+3],A[e+3]=t},_doCryptBlock:function(A,e,t,n,r,o,i,s){for(var a=this._nRounds,c=A[e]^t[0],l=A[e+1]^t[1],u=A[e+2]^t[2],h=A[e+3]^t[3],g=4,d=1;d<a;d++){var B=n[c>>>24]^r[l>>>16&255]^o[u>>>8&255]^i[255&h]^t[g++],f=n[l>>>24]^r[u>>>16&255]^o[h>>>8&255]^i[255&c]^t[g++],w=n[u>>>24]^r[h>>>16&255]^o[c>>>8&255]^i[255&l]^t[g++],p=n[h>>>24]^r[c>>>16&255]^o[l>>>8&255]^i[255&u]^t[g++];c=B,l=f,u=w,h=p}B=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^t[g++],f=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^t[g++],w=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^t[g++],p=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^t[g++],A[e]=B,A[e+1]=f,A[e+2]=w,A[e+3]=p},keySize:8});A.AES=t._createHelper(B)}(),e.AES)}(fo)),mo(),Co||(Co=1,function(A){var e;A.exports=(e=Yn(),ir(),hr(),Rr(),Vr(),function(){var A=e,t=A.lib.StreamCipher,n=A.algo,r=n.RC4=t.extend({_doReset:function(){for(var A=this._key,e=A.words,t=A.sigBytes,n=this._S=[],r=0;r<256;r++)n[r]=r;r=0;for(var o=0;r<256;r++){var i=r%t,s=e[i>>>2]>>>24-i%4*8&255;o=(o+n[r]+s)%256;var a=n[r];n[r]=n[o],n[o]=a}this._i=this._j=0},_doProcessBlock:function(A,e){A[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var A=this._S,e=this._i,t=this._j,n=0,r=0;r<4;r++){t=(t+A[e=(e+1)%256])%256;var o=A[e];A[e]=A[t],A[t]=o,n|=A[(A[e]+A[t])%256]<<24-8*r}return this._i=e,this._j=t,n}A.RC4=t._createHelper(r);var i=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var A=this.cfg.drop;A>0;A--)o.call(this)}});A.RC4Drop=t._createHelper(i)}(),e.RC4)}(Qo)),yo||(yo=1,function(A){var e;A.exports=(e=Yn(),ir(),hr(),Rr(),Vr(),function(){var A=e,t=A.lib.StreamCipher,n=A.algo,r=[],o=[],i=[],s=n.Rabbit=t.extend({_doReset:function(){for(var A=this._key.words,e=this.cfg.iv,t=0;t<4;t++)A[t]=16711935&(A[t]<<8|A[t]>>>24)|4278255360&(A[t]<<24|A[t]>>>8);var n=this._X=[A[0],A[3]<<16|A[2]>>>16,A[1],A[0]<<16|A[3]>>>16,A[2],A[1]<<16|A[0]>>>16,A[3],A[2]<<16|A[1]>>>16],r=this._C=[A[2]<<16|A[2]>>>16,4294901760&A[0]|65535&A[1],A[3]<<16|A[3]>>>16,4294901760&A[1]|65535&A[2],A[0]<<16|A[0]>>>16,4294901760&A[2]|65535&A[3],A[1]<<16|A[1]>>>16,4294901760&A[3]|65535&A[0]];for(this._b=0,t=0;t<4;t++)a.call(this);for(t=0;t<8;t++)r[t]^=n[t+4&7];if(e){var o=e.words,i=o[0],s=o[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=c>>>16|4294901760&l,h=l<<16|65535&c;for(r[0]^=c,r[1]^=u,r[2]^=l,r[3]^=h,r[4]^=c,r[5]^=u,r[6]^=l,r[7]^=h,t=0;t<4;t++)a.call(this)}},_doProcessBlock:function(A,e){var t=this._X;a.call(this),r[0]=t[0]^t[5]>>>16^t[3]<<16,r[1]=t[2]^t[7]>>>16^t[5]<<16,r[2]=t[4]^t[1]>>>16^t[7]<<16,r[3]=t[6]^t[3]>>>16^t[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),A[e+n]^=r[n]},blockSize:4,ivSize:2});function a(){for(var A=this._X,e=this._C,t=0;t<8;t++)o[t]=e[t];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,t=0;t<8;t++){var n=A[t]+e[t],r=65535&n,s=n>>>16,a=((r*r>>>17)+r*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);i[t]=a^c}A[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,A[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,A[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,A[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,A[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,A[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,A[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,A[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}A.Rabbit=t._createHelper(s)}(),e.Rabbit)}(Uo)),Fo||(Fo=1,function(A){var e;A.exports=(e=Yn(),ir(),hr(),Rr(),Vr(),function(){var A=e,t=A.lib.StreamCipher,n=A.algo,r=[],o=[],i=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var A=this._key.words,e=this.cfg.iv,t=this._X=[A[0],A[3]<<16|A[2]>>>16,A[1],A[0]<<16|A[3]>>>16,A[2],A[1]<<16|A[0]>>>16,A[3],A[2]<<16|A[1]>>>16],n=this._C=[A[2]<<16|A[2]>>>16,4294901760&A[0]|65535&A[1],A[3]<<16|A[3]>>>16,4294901760&A[1]|65535&A[2],A[0]<<16|A[0]>>>16,4294901760&A[2]|65535&A[3],A[1]<<16|A[1]>>>16,4294901760&A[3]|65535&A[0]];this._b=0;for(var r=0;r<4;r++)a.call(this);for(r=0;r<8;r++)n[r]^=t[r+4&7];if(e){var o=e.words,i=o[0],s=o[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=c>>>16|4294901760&l,h=l<<16|65535&c;for(n[0]^=c,n[1]^=u,n[2]^=l,n[3]^=h,n[4]^=c,n[5]^=u,n[6]^=l,n[7]^=h,r=0;r<4;r++)a.call(this)}},_doProcessBlock:function(A,e){var t=this._X;a.call(this),r[0]=t[0]^t[5]>>>16^t[3]<<16,r[1]=t[2]^t[7]>>>16^t[5]<<16,r[2]=t[4]^t[1]>>>16^t[7]<<16,r[3]=t[6]^t[3]>>>16^t[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),A[e+n]^=r[n]},blockSize:4,ivSize:2});function a(){for(var A=this._X,e=this._C,t=0;t<8;t++)o[t]=e[t];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,t=0;t<8;t++){var n=A[t]+e[t],r=65535&n,s=n>>>16,a=((r*r>>>17)+r*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);i[t]=a^c}A[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,A[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,A[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,A[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,A[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,A[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,A[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,A[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}A.RabbitLegacy=t._createHelper(s)}(),e.RabbitLegacy)}(bo)),Ho(),e)}(Wn);var Io=Wn.exports;let xo=class{constructor(){this.iconManager=null,this.screenshotManager=null,this.debug=!1,this.deviceId=null,this.initResult=null,this.config=null,this.screenshotCallback=null,this.initCallback=null}async init(A,t,n){try{this.config=A,this.screenshotCallback=t||null,this.initCallback=n||null,this.debug=A.debug??!1;const r=await this.getRawDeviceId();this.debug&&console.log("Raw Device ID:",r);const o=A.referrer||document.referrer||document.location.href;let i="";try{i=new URL(o).hostname}catch(A){i=""}this.deviceId=Io.MD5(r+i).toString(),this.debug&&(console.log("MD5 Device ID (for frontend):",this.deviceId),console.log("Referrer used:",o));const s={deviceId:this.deviceId,referrer:o,agent:A.agent,timestamp:Date.now()},a=A.target||void 0,c=A.iconPosition||void 0;if(this.iconManager=new e(c,this.debug,a,{sideAttach:A.sideAttach,sideHideRatio:A.sideHideRatio,magnetic:A.magnetic,magneticDirection:A.magneticDirection,margin:A.margin,autoAttachDelay:A.autoAttachDelay}),await this.iconManager.show(),n?.onIconClick&&this.iconManager.onClick(n.onIconClick),A.screenshot){const e="string"==typeof a?document.querySelector(a):a||document.body,n=t?.sendData;this.debug&&(console.log("[CustomerSDK] 初始化截图管理器:"),console.log(" screenshotCallback:",t?"存在":"null/undefined",t),console.log(" screenshotCallback?.sendData:",t?.sendData?"存在":"null/undefined",typeof t?.sendData,t?.sendData),console.log(" sendToExternal:",n?"存在":"undefined",typeof n,n),console.log(" 即将传递给 ScreenshotManager 的参数:",{targetElement:e?"存在":"null",screenshot:A.screenshot?"存在":"null",sendToExternal:n?"存在":"undefined"})),this.screenshotManager=new dt(e,A.screenshot,n),t?.onConfig&&this.setupScreenshotConfigListener(t.onConfig)}return this.initResult=s,this.debug&&console.log("CustomerSDK initialized successfully (icon + screenshot only)"),s}catch(A){throw console.error("Failed to initialize CustomerSDK:",A),A}}setupScreenshotConfigListener(A){const e=e=>{try{if(!e.data||"checkScreenshot"!==e.data.type)return;this.debug&&console.log("[CustomerSDK] Received screenshot config message:",e.data),e.data.data&&"string"==typeof e.data.data&&A(e.data.data)}catch(A){this.debug&&console.error("[CustomerSDK] Error handling screenshot config message:",A)}};window.addEventListener("message",e),this._screenshotConfigHandler=e}triggerScreenshotConfig(A){this.screenshotManager?this.screenshotManager.handleScreenshotConfig(A):this.debug&&console.warn("[CustomerSDK] ScreenshotManager not initialized")}hideIcon(){this.iconManager?.hide()}showIcon(){this.iconManager?.show()}onIconClick(A){this.iconManager?.onClick(A)}getScreenshotManager(){return this.screenshotManager}getIconManager(){return this.iconManager}getDeviceId(){return this.deviceId}getInitResult(){return this.initResult}async updateToken(A,e,t){if(!this.config)throw new Error("SDK not initialized. Call init() first.");this.debug&&console.log("Updating token:",A?"Token provided":"Token removed");const n={...this.config,token:A&&""!==A.trim()?A:void 0};return this.destroy(),await this.init(n,e||this.screenshotCallback||void 0,t||this.initCallback||void 0)}async getRawDeviceId(){this.debug&&console.log("🔍 Starting to get device fingerprint...");try{this.debug&&console.log("📦 Loading FingerprintJS...");const A=await Gn.load();this.debug&&console.log("🎯 Getting device fingerprint...");const e=await A.get();return this.debug&&(console.log("✅ FingerprintJS result:",e),console.log("🆔 Device ID obtained:",e.visitorId)),e.visitorId}catch(A){this.debug&&console.warn("❌ Failed to get device fingerprint, using fallback:",A);const e="device_"+Date.now()+"_"+Math.random().toString(36).substr(2,9);return this.debug&&console.log("🆔 Fallback Device ID:",e),e}}showNotification(A=1,e={}){this.iconManager?(this.iconManager.showNotification({badgeCount:"string"==typeof A?0:A,badgeText:"string"==typeof A?A:"",pulse:e.pulse||!1}),e.autoHide&&e.autoHide>0&&setTimeout(()=>{this.iconManager?.clearNotification()},e.autoHide)):this.debug&&console.warn("SDK not initialized")}clearNotification(){this.iconManager?.clearNotification()}destroy(){this.iconManager?.hide(),this.screenshotManager?.destroy(),this._screenshotConfigHandler&&(window.removeEventListener("message",this._screenshotConfigHandler),this._screenshotConfigHandler=null),this.iconManager=null,this.screenshotManager=null,this.initResult=null,this.deviceId=null,this.debug&&console.log("CustomerSDK destroyed")}},So=null;function Lo(){return So||(So=new xo),So}const Do=async(A,e,t)=>{const n=Lo();return await n.init(A,e,t)},Mo=()=>{Lo().showIcon()},ko=()=>{Lo().hideIcon()},Ko=A=>{Lo().setIconPosition(A)},To=A=>{Lo().setIconCoordinates(A)},Ro=A=>{Lo().setIconStyle(A)},Po=A=>{Lo().onIconClick(A)},Oo=A=>{Lo().setIconHTML(A)},Vo=A=>{Lo().setIconImage(A)},No=A=>{Lo().showNotification(A)},Go=()=>{Lo().clearNotification()},Wo=A=>{Lo().triggerScreenshotConfig(A)},_o=()=>{Lo().destroy(),So=null},Xo=()=>Lo().getDeviceId(),Jo=()=>Lo(),Yo=xo;var $o={init:Do,showIcon:Mo,hideIcon:ko,setIconPosition:Ko,setIconCoordinates:To,setIconStyle:Ro,onIconClick:Po,setIconHTML:Oo,setIconImage:Vo,showNotification:No,clearNotification:Go,triggerScreenshotConfig:Wo,destroy:_o,getDeviceId:Xo,getInstance:Jo,CustomerSDK:Yo};A.CustomerSDK=Yo,A.clearNotification=Go,A.default=$o,A.destroy=_o,A.getDeviceId=Xo,A.getInstance=Jo,A.hideIcon=ko,A.init=Do,A.onIconClick=Po,A.setIconCoordinates=To,A.setIconHTML=Oo,A.setIconImage=Vo,A.setIconPosition=Ko,A.setIconStyle=Ro,A.showIcon=Mo,A.showNotification=No,A.triggerScreenshotConfig=Wo,Object.defineProperty(A,"__esModule",{value:!0})});
38
+ function(){var A=e,t=A.lib,n=t.WordArray,r=t.Hasher,o=A.algo,i=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),a=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),l=n.create([0,1518500249,1859775393,2400959708,2840853838]),u=n.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(A,e){for(var t=0;t<16;t++){var n=e+t,r=A[n];A[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o,h,m,C,Q,y,U,F,b,v,E,H=this._hash.words,I=l.words,x=u.words,S=i.words,L=s.words,D=a.words,M=c.words;for(y=o=H[0],U=h=H[1],F=m=H[2],b=C=H[3],v=Q=H[4],t=0;t<80;t+=1)E=o+A[e+S[t]]|0,E+=t<16?g(h,m,C)+I[0]:t<32?d(h,m,C)+I[1]:t<48?B(h,m,C)+I[2]:t<64?f(h,m,C)+I[3]:w(h,m,C)+I[4],E=(E=p(E|=0,D[t]))+Q|0,o=Q,Q=C,C=p(m,10),m=h,h=E,E=y+A[e+L[t]]|0,E+=t<16?w(U,F,b)+x[0]:t<32?f(U,F,b)+x[1]:t<48?B(U,F,b)+x[2]:t<64?d(U,F,b)+x[3]:g(U,F,b)+x[4],E=(E=p(E|=0,M[t]))+v|0,y=v,v=b,b=p(F,10),F=U,U=E;E=H[1]+m+b|0,H[1]=H[2]+C+v|0,H[2]=H[3]+Q+y|0,H[3]=H[4]+o+U|0,H[4]=H[0]+h+F|0,H[0]=E},_doFinalize:function(){var A=this._data,e=A.words,t=8*this._nDataBytes,n=8*A.sigBytes;e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=16711935&(t<<8|t>>>24)|4278255360&(t<<24|t>>>8),A.sigBytes=4*(e.length+1),this._process();for(var r=this._hash,o=r.words,i=0;i<5;i++){var s=o[i];o[i]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return r},clone:function(){var A=r.clone.call(this);return A._hash=this._hash.clone(),A}});function g(A,e,t){return A^e^t}function d(A,e,t){return A&e|~A&t}function B(A,e,t){return(A|~e)^t}function f(A,e,t){return A&t|e&~t}function w(A,e,t){return A^(e|~t)}function p(A,e){return A<<e|A>>>32-e}A.RIPEMD160=r._createHelper(h),A.HmacRIPEMD160=r._createHmacHelper(h)}(),e.RIPEMD160)}(xr)),Dr(),Mr||(Mr=1,function(A){var e,t,n,r,o,i,s,a,c;A.exports=(c=Yn(),pr(),Dr(),n=(t=(e=c).lib).Base,r=t.WordArray,i=(o=e.algo).SHA256,s=o.HMAC,a=o.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:i,iterations:25e4}),init:function(A){this.cfg=this.cfg.extend(A)},compute:function(A,e){for(var t=this.cfg,n=s.create(t.hasher,A),o=r.create(),i=r.create([1]),a=o.words,c=i.words,l=t.keySize,u=t.iterations;a.length<l;){var h=n.update(e).finalize(i);n.reset();for(var g=h.words,d=g.length,B=h,f=1;f<u;f++){B=n.finalize(B),n.reset();for(var w=B.words,p=0;p<d;p++)g[p]^=w[p]}o.concat(h),c[0]++}return o.sigBytes=4*l,o}}),e.PBKDF2=function(A,e,t){return a.create(t).compute(A,e)},c.PBKDF2)}(kr)),Rr(),Vr(),Wr(),Jr(),Zr(),qr(),Ao||(Ao=1,function(A){var e,t;A.exports=(t=Yn(),Vr(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(A,e){this._cipher.encryptBlock(A,e)}}),e.Decryptor=e.extend({processBlock:function(A,e){this._cipher.decryptBlock(A,e)}}),e),t.mode.ECB)}(eo)),to||(to=1,function(A){var e;A.exports=(e=Yn(),Vr(),e.pad.AnsiX923={pad:function(A,e){var t=A.sigBytes,n=4*e,r=n-t%n,o=t+r-1;A.clamp(),A.words[o>>>2]|=r<<24-o%4*8,A.sigBytes+=r},unpad:function(A){var e=255&A.words[A.sigBytes-1>>>2];A.sigBytes-=e}},e.pad.Ansix923)}(no)),ro||(ro=1,function(A){var e;A.exports=(e=Yn(),Vr(),e.pad.Iso10126={pad:function(A,t){var n=4*t,r=n-A.sigBytes%n;A.concat(e.lib.WordArray.random(r-1)).concat(e.lib.WordArray.create([r<<24],1))},unpad:function(A){var e=255&A.words[A.sigBytes-1>>>2];A.sigBytes-=e}},e.pad.Iso10126)}(oo)),io||(io=1,function(A){var e;A.exports=(e=Yn(),Vr(),e.pad.Iso97971={pad:function(A,t){A.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(A,t)},unpad:function(A){e.pad.ZeroPadding.unpad(A),A.sigBytes--}},e.pad.Iso97971)}(so)),ao||(ao=1,function(A){var e;A.exports=(e=Yn(),Vr(),e.pad.ZeroPadding={pad:function(A,e){var t=4*e;A.clamp(),A.sigBytes+=t-(A.sigBytes%t||t)},unpad:function(A){var e=A.words,t=A.sigBytes-1;for(t=A.sigBytes-1;t>=0;t--)if(e[t>>>2]>>>24-t%4*8&255){A.sigBytes=t+1;break}}},e.pad.ZeroPadding)}(co)),lo||(lo=1,function(A){var e;A.exports=(e=Yn(),Vr(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding)}(uo)),ho||(ho=1,function(A){var e,t,n,r;A.exports=(r=Yn(),Vr(),t=(e=r).lib.CipherParams,n=e.enc.Hex,e.format.Hex={stringify:function(A){return A.ciphertext.toString(n)},parse:function(A){var e=n.parse(A);return t.create({ciphertext:e})}},r.format.Hex)}(go)),Bo||(Bo=1,function(A){var e;A.exports=(e=Yn(),ir(),hr(),Rr(),Vr(),function(){var A=e,t=A.lib.BlockCipher,n=A.algo,r=[],o=[],i=[],s=[],a=[],c=[],l=[],u=[],h=[],g=[];!function(){for(var A=[],e=0;e<256;e++)A[e]=e<128?e<<1:e<<1^283;var t=0,n=0;for(e=0;e<256;e++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,r[t]=d,o[d]=t;var B=A[t],f=A[B],w=A[f],p=257*A[d]^16843008*d;i[t]=p<<24|p>>>8,s[t]=p<<16|p>>>16,a[t]=p<<8|p>>>24,c[t]=p,p=16843009*w^65537*f^257*B^16843008*t,l[d]=p<<24|p>>>8,u[d]=p<<16|p>>>16,h[d]=p<<8|p>>>24,g[d]=p,t?(t=B^A[A[A[w^B]]],n^=A[A[n]]):t=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],B=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var A=this._keyPriorReset=this._key,e=A.words,t=A.sigBytes/4,n=4*((this._nRounds=t+6)+1),o=this._keySchedule=[],i=0;i<n;i++)i<t?o[i]=e[i]:(c=o[i-1],i%t?t>6&&i%t==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=r[(c=c<<8|c>>>24)>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=d[i/t|0]<<24),o[i]=o[i-t]^c);for(var s=this._invKeySchedule=[],a=0;a<n;a++){if(i=n-a,a%4)var c=o[i];else c=o[i-4];s[a]=a<4||i<=4?c:l[r[c>>>24]]^u[r[c>>>16&255]]^h[r[c>>>8&255]]^g[r[255&c]]}}},encryptBlock:function(A,e){this._doCryptBlock(A,e,this._keySchedule,i,s,a,c,r)},decryptBlock:function(A,e){var t=A[e+1];A[e+1]=A[e+3],A[e+3]=t,this._doCryptBlock(A,e,this._invKeySchedule,l,u,h,g,o),t=A[e+1],A[e+1]=A[e+3],A[e+3]=t},_doCryptBlock:function(A,e,t,n,r,o,i,s){for(var a=this._nRounds,c=A[e]^t[0],l=A[e+1]^t[1],u=A[e+2]^t[2],h=A[e+3]^t[3],g=4,d=1;d<a;d++){var B=n[c>>>24]^r[l>>>16&255]^o[u>>>8&255]^i[255&h]^t[g++],f=n[l>>>24]^r[u>>>16&255]^o[h>>>8&255]^i[255&c]^t[g++],w=n[u>>>24]^r[h>>>16&255]^o[c>>>8&255]^i[255&l]^t[g++],p=n[h>>>24]^r[c>>>16&255]^o[l>>>8&255]^i[255&u]^t[g++];c=B,l=f,u=w,h=p}B=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^t[g++],f=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^t[g++],w=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^t[g++],p=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^t[g++],A[e]=B,A[e+1]=f,A[e+2]=w,A[e+3]=p},keySize:8});A.AES=t._createHelper(B)}(),e.AES)}(fo)),mo(),Co||(Co=1,function(A){var e;A.exports=(e=Yn(),ir(),hr(),Rr(),Vr(),function(){var A=e,t=A.lib.StreamCipher,n=A.algo,r=n.RC4=t.extend({_doReset:function(){for(var A=this._key,e=A.words,t=A.sigBytes,n=this._S=[],r=0;r<256;r++)n[r]=r;r=0;for(var o=0;r<256;r++){var i=r%t,s=e[i>>>2]>>>24-i%4*8&255;o=(o+n[r]+s)%256;var a=n[r];n[r]=n[o],n[o]=a}this._i=this._j=0},_doProcessBlock:function(A,e){A[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var A=this._S,e=this._i,t=this._j,n=0,r=0;r<4;r++){t=(t+A[e=(e+1)%256])%256;var o=A[e];A[e]=A[t],A[t]=o,n|=A[(A[e]+A[t])%256]<<24-8*r}return this._i=e,this._j=t,n}A.RC4=t._createHelper(r);var i=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var A=this.cfg.drop;A>0;A--)o.call(this)}});A.RC4Drop=t._createHelper(i)}(),e.RC4)}(Qo)),yo||(yo=1,function(A){var e;A.exports=(e=Yn(),ir(),hr(),Rr(),Vr(),function(){var A=e,t=A.lib.StreamCipher,n=A.algo,r=[],o=[],i=[],s=n.Rabbit=t.extend({_doReset:function(){for(var A=this._key.words,e=this.cfg.iv,t=0;t<4;t++)A[t]=16711935&(A[t]<<8|A[t]>>>24)|4278255360&(A[t]<<24|A[t]>>>8);var n=this._X=[A[0],A[3]<<16|A[2]>>>16,A[1],A[0]<<16|A[3]>>>16,A[2],A[1]<<16|A[0]>>>16,A[3],A[2]<<16|A[1]>>>16],r=this._C=[A[2]<<16|A[2]>>>16,4294901760&A[0]|65535&A[1],A[3]<<16|A[3]>>>16,4294901760&A[1]|65535&A[2],A[0]<<16|A[0]>>>16,4294901760&A[2]|65535&A[3],A[1]<<16|A[1]>>>16,4294901760&A[3]|65535&A[0]];for(this._b=0,t=0;t<4;t++)a.call(this);for(t=0;t<8;t++)r[t]^=n[t+4&7];if(e){var o=e.words,i=o[0],s=o[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=c>>>16|4294901760&l,h=l<<16|65535&c;for(r[0]^=c,r[1]^=u,r[2]^=l,r[3]^=h,r[4]^=c,r[5]^=u,r[6]^=l,r[7]^=h,t=0;t<4;t++)a.call(this)}},_doProcessBlock:function(A,e){var t=this._X;a.call(this),r[0]=t[0]^t[5]>>>16^t[3]<<16,r[1]=t[2]^t[7]>>>16^t[5]<<16,r[2]=t[4]^t[1]>>>16^t[7]<<16,r[3]=t[6]^t[3]>>>16^t[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),A[e+n]^=r[n]},blockSize:4,ivSize:2});function a(){for(var A=this._X,e=this._C,t=0;t<8;t++)o[t]=e[t];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,t=0;t<8;t++){var n=A[t]+e[t],r=65535&n,s=n>>>16,a=((r*r>>>17)+r*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);i[t]=a^c}A[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,A[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,A[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,A[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,A[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,A[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,A[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,A[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}A.Rabbit=t._createHelper(s)}(),e.Rabbit)}(Uo)),Fo||(Fo=1,function(A){var e;A.exports=(e=Yn(),ir(),hr(),Rr(),Vr(),function(){var A=e,t=A.lib.StreamCipher,n=A.algo,r=[],o=[],i=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var A=this._key.words,e=this.cfg.iv,t=this._X=[A[0],A[3]<<16|A[2]>>>16,A[1],A[0]<<16|A[3]>>>16,A[2],A[1]<<16|A[0]>>>16,A[3],A[2]<<16|A[1]>>>16],n=this._C=[A[2]<<16|A[2]>>>16,4294901760&A[0]|65535&A[1],A[3]<<16|A[3]>>>16,4294901760&A[1]|65535&A[2],A[0]<<16|A[0]>>>16,4294901760&A[2]|65535&A[3],A[1]<<16|A[1]>>>16,4294901760&A[3]|65535&A[0]];this._b=0;for(var r=0;r<4;r++)a.call(this);for(r=0;r<8;r++)n[r]^=t[r+4&7];if(e){var o=e.words,i=o[0],s=o[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=c>>>16|4294901760&l,h=l<<16|65535&c;for(n[0]^=c,n[1]^=u,n[2]^=l,n[3]^=h,n[4]^=c,n[5]^=u,n[6]^=l,n[7]^=h,r=0;r<4;r++)a.call(this)}},_doProcessBlock:function(A,e){var t=this._X;a.call(this),r[0]=t[0]^t[5]>>>16^t[3]<<16,r[1]=t[2]^t[7]>>>16^t[5]<<16,r[2]=t[4]^t[1]>>>16^t[7]<<16,r[3]=t[6]^t[3]>>>16^t[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),A[e+n]^=r[n]},blockSize:4,ivSize:2});function a(){for(var A=this._X,e=this._C,t=0;t<8;t++)o[t]=e[t];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,t=0;t<8;t++){var n=A[t]+e[t],r=65535&n,s=n>>>16,a=((r*r>>>17)+r*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);i[t]=a^c}A[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,A[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,A[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,A[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,A[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,A[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,A[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,A[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}A.RabbitLegacy=t._createHelper(s)}(),e.RabbitLegacy)}(bo)),Ho(),e)}(Wn);var Io=Wn.exports;let xo=class{constructor(){this.iconManager=null,this.screenshotManager=null,this.debug=!1,this.deviceId=null,this.initResult=null,this.config=null,this.screenshotCallback=null,this.initCallback=null}async init(A,t,n){try{this.config=A,this.screenshotCallback=t||null,this.initCallback=n||null,this.debug=A.debug??!1;const r=await this.getRawDeviceId();this.debug&&console.log("Raw Device ID:",r);const o=A.referrer||document.referrer||document.location.href;let i="";try{i=new URL(o).hostname}catch(A){i=""}this.deviceId=Io.MD5(r+i).toString(),this.debug&&(console.log("MD5 Device ID (for frontend):",this.deviceId),console.log("Referrer used:",o));const s={deviceId:this.deviceId,referrer:o,agent:A.agent,timestamp:Date.now()};if(!0===A.showIcon){const t=A.target||void 0,r=A.iconPosition||void 0;this.iconManager=new e(r,this.debug,t,{sideAttach:A.sideAttach,sideHideRatio:A.sideHideRatio,magnetic:A.magnetic,magneticDirection:A.magneticDirection,margin:A.margin,autoAttachDelay:A.autoAttachDelay}),await this.iconManager.show(),n?.onIconClick&&this.iconManager.onClick(n.onIconClick)}if(A.screenshot){const e="string"==typeof iconTarget?document.querySelector(iconTarget):iconTarget||document.body,n=t?.sendData;this.debug&&(console.log("[CustomerSDK] 初始化截图管理器:"),console.log(" screenshotCallback:",t?"存在":"null/undefined",t),console.log(" screenshotCallback?.sendData:",t?.sendData?"存在":"null/undefined",typeof t?.sendData,t?.sendData),console.log(" sendToExternal:",n?"存在":"undefined",typeof n,n),console.log(" 即将传递给 ScreenshotManager 的参数:",{targetElement:e?"存在":"null",screenshot:A.screenshot?"存在":"null",sendToExternal:n?"存在":"undefined"})),this.screenshotManager=new dt(e,A.screenshot,n),t?.onConfig&&this.setupScreenshotConfigListener(t.onConfig)}return this.initResult=s,this.debug&&console.log("CustomerSDK initialized successfully (icon + screenshot only)"),s}catch(A){throw console.error("Failed to initialize CustomerSDK:",A),A}}setupScreenshotConfigListener(A){const e=e=>{try{if(!e.data||"checkScreenshot"!==e.data.type)return;this.debug&&console.log("[CustomerSDK] Received screenshot config message:",e.data),e.data.data&&"string"==typeof e.data.data&&A(e.data.data)}catch(A){this.debug&&console.error("[CustomerSDK] Error handling screenshot config message:",A)}};window.addEventListener("message",e),this._screenshotConfigHandler=e}triggerScreenshotConfig(A){this.screenshotManager?this.screenshotManager.handleScreenshotConfig(A):this.debug&&console.warn("[CustomerSDK] ScreenshotManager not initialized")}hideIcon(){this.iconManager?.hide()}showIcon(){this.iconManager?.show()}onIconClick(A){this.iconManager?.onClick(A)}getScreenshotManager(){return this.screenshotManager}getIconManager(){return this.iconManager}getDeviceId(){return this.deviceId}getInitResult(){return this.initResult}async updateToken(A,e,t){if(!this.config)throw new Error("SDK not initialized. Call init() first.");this.debug&&console.log("Updating token:",A?"Token provided":"Token removed");const n={...this.config,token:A&&""!==A.trim()?A:void 0};return this.destroy(),await this.init(n,e||this.screenshotCallback||void 0,t||this.initCallback||void 0)}async getRawDeviceId(){this.debug&&console.log("🔍 Starting to get device fingerprint...");try{this.debug&&console.log("📦 Loading FingerprintJS...");const A=await Gn.load();this.debug&&console.log("🎯 Getting device fingerprint...");const e=await A.get();return this.debug&&(console.log("✅ FingerprintJS result:",e),console.log("🆔 Device ID obtained:",e.visitorId)),e.visitorId}catch(A){this.debug&&console.warn("❌ Failed to get device fingerprint, using fallback:",A);const e="device_"+Date.now()+"_"+Math.random().toString(36).substr(2,9);return this.debug&&console.log("🆔 Fallback Device ID:",e),e}}showNotification(A=1,e={}){this.iconManager?(this.iconManager.showNotification({badgeCount:"string"==typeof A?0:A,badgeText:"string"==typeof A?A:"",pulse:e.pulse||!1}),e.autoHide&&e.autoHide>0&&setTimeout(()=>{this.iconManager?.clearNotification()},e.autoHide)):this.debug&&console.warn("SDK not initialized")}clearNotification(){this.iconManager?.clearNotification()}destroy(){this.iconManager?.hide(),this.screenshotManager?.destroy(),this._screenshotConfigHandler&&(window.removeEventListener("message",this._screenshotConfigHandler),this._screenshotConfigHandler=null),this.iconManager=null,this.screenshotManager=null,this.initResult=null,this.deviceId=null,this.debug&&console.log("CustomerSDK destroyed")}},So=null;function Lo(){return So||(So=new xo),So}const Do=async(A,e,t)=>{const n=Lo();return await n.init(A,e,t)},Mo=()=>{Lo().showIcon()},ko=()=>{Lo().hideIcon()},Ko=A=>{Lo().setIconPosition(A)},To=A=>{Lo().setIconCoordinates(A)},Ro=A=>{Lo().setIconStyle(A)},Po=A=>{Lo().onIconClick(A)},Oo=A=>{Lo().setIconHTML(A)},Vo=A=>{Lo().setIconImage(A)},No=A=>{Lo().showNotification(A)},Go=()=>{Lo().clearNotification()},Wo=A=>{Lo().triggerScreenshotConfig(A)},_o=()=>{Lo().destroy(),So=null},Xo=()=>Lo().getDeviceId(),Jo=()=>Lo(),Yo=xo;var $o={init:Do,showIcon:Mo,hideIcon:ko,setIconPosition:Ko,setIconCoordinates:To,setIconStyle:Ro,onIconClick:Po,setIconHTML:Oo,setIconImage:Vo,showNotification:No,clearNotification:Go,triggerScreenshotConfig:Wo,destroy:_o,getDeviceId:Xo,getInstance:Jo,CustomerSDK:Yo};A.CustomerSDK=Yo,A.clearNotification=Go,A.default=$o,A.destroy=_o,A.getDeviceId=Xo,A.getInstance=Jo,A.hideIcon=ko,A.init=Do,A.onIconClick=Po,A.setIconCoordinates=To,A.setIconHTML=Oo,A.setIconImage=Vo,A.setIconPosition=Ko,A.setIconStyle=Ro,A.showIcon=Mo,A.showNotification=No,A.triggerScreenshotConfig=Wo,Object.defineProperty(A,"__esModule",{value:!0})});
@@ -4,6 +4,7 @@ export interface SDKConfig {
4
4
  referrer?: string;
5
5
  debug?: boolean;
6
6
  screenshot?: ScreenshotOptions;
7
+ showIcon?: boolean;
7
8
  iconPosition?: IconPosition;
8
9
  target?: HTMLElement | string;
9
10
  sideAttach?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAE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AS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,CAAA;IAE7B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM,CAAA;IACtC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAGD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;CAClB;AAGD,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAEnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAA;CAC/B;AAGD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACzC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customer-chat-sdk",
3
- "version": "1.4.8",
3
+ "version": "1.4.9",
4
4
  "description": "Customer Service SDK - One-line integration for customer support chat",
5
5
  "main": "dist/customer-sdk.cjs.js",
6
6
  "module": "dist/customer-sdk.esm.js",