@univerjs/preset-docs-core 0.8.2-nightly.202506221606 → 0.8.2-nightly.202506241607
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.
- package/lib/umd/index.js +1 -1
- package/package.json +9 -9
package/lib/umd/index.js
CHANGED
|
@@ -15,7 +15,7 @@ ${i}
|
|
|
15
15
|
Version 1.10.0
|
|
16
16
|
https://localforage.github.io/localForage
|
|
17
17
|
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
18
|
-
*/var R6;function Q0(){return R6||(R6=1,function(e,t){(function(n){e.exports=n()})(function(){return function n(r,i,l){function o(m,b){if(!i[m]){if(!r[m]){var d=typeof Se=="function"&&Se;if(!b&&d)return d(m,!0);if(c)return c(m,!0);var w=new Error("Cannot find module '"+m+"'");throw w.code="MODULE_NOT_FOUND",w}var y=i[m]={exports:{}};r[m][0].call(y.exports,function(S){var T=r[m][1][S];return o(T||S)},y,y.exports,n,r,i,l)}return i[m].exports}for(var c=typeof Se=="function"&&Se,v=0;v<l.length;v++)o(l[v]);return o}({1:[function(n,r,i){(function(l){var o=l.MutationObserver||l.WebKitMutationObserver,c;if(o){var v=0,m=new o(S),b=l.document.createTextNode("");m.observe(b,{characterData:!0}),c=function(){b.data=v=++v%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var d=new l.MessageChannel;d.port1.onmessage=S,c=function(){d.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?c=function(){var D=l.document.createElement("script");D.onreadystatechange=function(){S(),D.onreadystatechange=null,D.parentNode.removeChild(D),D=null},l.document.documentElement.appendChild(D)}:c=function(){setTimeout(S,0)};var w,y=[];function S(){w=!0;for(var D,I,V=y.length;V;){for(I=y,y=[],D=-1;++D<V;)I[D]();V=y.length}w=!1}r.exports=T;function T(D){y.push(D)===1&&!w&&c()}}).call(this,typeof Me<"u"?Me:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(n,r,i){var l=n(1);function o(){}var c={},v=["REJECTED"],m=["FULFILLED"],b=["PENDING"];r.exports=d;function d(M){if(typeof M!="function")throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,M!==o&&T(this,M)}d.prototype.catch=function(M){return this.then(null,M)},d.prototype.then=function(M,x){if(typeof M!="function"&&this.state===m||typeof x!="function"&&this.state===v)return this;var $=new this.constructor(o);if(this.state!==b){var X=this.state===m?M:x;y($,X,this.outcome)}else this.queue.push(new w($,M,x));return $};function w(M,x,$){this.promise=M,typeof x=="function"&&(this.onFulfilled=x,this.callFulfilled=this.otherCallFulfilled),typeof $=="function"&&(this.onRejected=$,this.callRejected=this.otherCallRejected)}w.prototype.callFulfilled=function(M){c.resolve(this.promise,M)},w.prototype.otherCallFulfilled=function(M){y(this.promise,this.onFulfilled,M)},w.prototype.callRejected=function(M){c.reject(this.promise,M)},w.prototype.otherCallRejected=function(M){y(this.promise,this.onRejected,M)};function y(M,x,$){l(function(){var X;try{X=x($)}catch(B){return c.reject(M,B)}X===M?c.reject(M,new TypeError("Cannot resolve promise with itself")):c.resolve(M,X)})}c.resolve=function(M,x){var $=D(S,x);if($.status==="error")return c.reject(M,$.value);var X=$.value;if(X)T(M,X);else{M.state=m,M.outcome=x;for(var B=-1,G=M.queue.length;++B<G;)M.queue[B].callFulfilled(x)}return M},c.reject=function(M,x){M.state=v,M.outcome=x;for(var $=-1,X=M.queue.length;++$<X;)M.queue[$].callRejected(x);return M};function S(M){var x=M&&M.then;if(M&&(typeof M=="object"||typeof M=="function")&&typeof x=="function")return function(){x.apply(M,arguments)}}function T(M,x){var $=!1;function X(J){$||($=!0,c.reject(M,J))}function B(J){$||($=!0,c.resolve(M,J))}function G(){x(B,X)}var q=D(G);q.status==="error"&&X(q.value)}function D(M,x){var $={};try{$.value=M(x),$.status="success"}catch(X){$.status="error",$.value=X}return $}d.resolve=I;function I(M){return M instanceof this?M:c.resolve(new this(o),M)}d.reject=V;function V(M){var x=new this(o);return c.reject(x,M)}d.all=O;function O(M){var x=this;if(Object.prototype.toString.call(M)!=="[object Array]")return this.reject(new TypeError("must be an array"));var $=M.length,X=!1;if(!$)return this.resolve([]);for(var B=new Array($),G=0,q=-1,J=new this(o);++q<$;)K(M[q],q);return J;function K(W,Y){x.resolve(W).then(e1,function(l1){X||(X=!0,c.reject(J,l1))});function e1(l1){B[Y]=l1,++G===$&&!X&&(X=!0,c.resolve(J,B))}}}d.race=U;function U(M){var x=this;if(Object.prototype.toString.call(M)!=="[object Array]")return this.reject(new TypeError("must be an array"));var $=M.length,X=!1;if(!$)return this.resolve([]);for(var B=-1,G=new this(o);++B<$;)q(M[B]);return G;function q(J){x.resolve(J).then(function(K){X||(X=!0,c.resolve(G,K))},function(K){X||(X=!0,c.reject(G,K))})}}},{1:1}],3:[function(n,r,i){(function(l){typeof l.Promise!="function"&&(l.Promise=n(2))}).call(this,typeof Me<"u"?Me:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(n,r,i){var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function o(s,g){if(!(s instanceof g))throw new TypeError("Cannot call a class as a function")}function c(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var v=c();function m(){try{if(!v||!v.open)return!1;var s=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),g=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!s||g)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function b(s,g){s=s||[],g=g||{};try{return new Blob(s,g)}catch(p){if(p.name!=="TypeError")throw p;for(var u=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,L=new u,_=0;_<s.length;_+=1)L.append(s[_]);return L.getBlob(g.type)}}typeof Promise>"u"&&n(3);var d=Promise;function w(s,g){g&&s.then(function(u){g(null,u)},function(u){g(u)})}function y(s,g,u){typeof g=="function"&&s.then(g),typeof u=="function"&&s.catch(u)}function S(s){return typeof s!="string"&&(console.warn(s+" used as a key, but it is not a string."),s=String(s)),s}function T(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var D="local-forage-detect-blob-support",I=void 0,V={},O=Object.prototype.toString,U="readonly",M="readwrite";function x(s){for(var g=s.length,u=new ArrayBuffer(g),L=new Uint8Array(u),_=0;_<g;_++)L[_]=s.charCodeAt(_);return u}function $(s){return new d(function(g){var u=s.transaction(D,M),L=b([""]);u.objectStore(D).put(L,"key"),u.onabort=function(_){_.preventDefault(),_.stopPropagation(),g(!1)},u.oncomplete=function(){var _=navigator.userAgent.match(/Chrome\/(\d+)/),p=navigator.userAgent.match(/Edge\//);g(p||!_||parseInt(_[1],10)>=43)}}).catch(function(){return!1})}function X(s){return typeof I=="boolean"?d.resolve(I):$(s).then(function(g){return I=g,I})}function B(s){var g=V[s.name],u={};u.promise=new d(function(L,_){u.resolve=L,u.reject=_}),g.deferredOperations.push(u),g.dbReady?g.dbReady=g.dbReady.then(function(){return u.promise}):g.dbReady=u.promise}function G(s){var g=V[s.name],u=g.deferredOperations.pop();if(u)return u.resolve(),u.promise}function q(s,g){var u=V[s.name],L=u.deferredOperations.pop();if(L)return L.reject(g),L.promise}function J(s,g){return new d(function(u,L){if(V[s.name]=V[s.name]||r1(),s.db)if(g)B(s),s.db.close();else return u(s.db);var _=[s.name];g&&_.push(s.version);var p=v.open.apply(v,_);g&&(p.onupgradeneeded=function(E){var N=p.result;try{N.createObjectStore(s.storeName),E.oldVersion<=1&&N.createObjectStore(D)}catch(k){if(k.name==="ConstraintError")console.warn('The database "'+s.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+s.storeName+'" already exists.');else throw k}}),p.onerror=function(E){E.preventDefault(),L(p.error)},p.onsuccess=function(){var E=p.result;E.onversionchange=function(N){N.target.close()},u(E),G(s)}})}function K(s){return J(s,!1)}function W(s){return J(s,!0)}function Y(s,g){if(!s.db)return!0;var u=!s.db.objectStoreNames.contains(s.storeName),L=s.version<s.db.version,_=s.version>s.db.version;if(L&&(s.version!==g&&console.warn('The database "'+s.name+`" can't be downgraded from version `+s.db.version+" to version "+s.version+"."),s.version=s.db.version),_||u){if(u){var p=s.db.version+1;p>s.version&&(s.version=p)}return!0}return!1}function e1(s){return new d(function(g,u){var L=new FileReader;L.onerror=u,L.onloadend=function(_){var p=btoa(_.target.result||"");g({__local_forage_encoded_blob:!0,data:p,type:s.type})},L.readAsBinaryString(s)})}function l1(s){var g=x(atob(s.data));return b([g],{type:s.type})}function C1(s){return s&&s.__local_forage_encoded_blob}function b1(s){var g=this,u=g._initReady().then(function(){var L=V[g._dbInfo.name];if(L&&L.dbReady)return L.dbReady});return y(u,s,s),u}function y1(s){B(s);for(var g=V[s.name],u=g.forages,L=0;L<u.length;L++){var _=u[L];_._dbInfo.db&&(_._dbInfo.db.close(),_._dbInfo.db=null)}return s.db=null,K(s).then(function(p){return s.db=p,Y(s)?W(s):p}).then(function(p){s.db=g.db=p;for(var E=0;E<u.length;E++)u[E]._dbInfo.db=p}).catch(function(p){throw q(s,p),p})}function a1(s,g,u,L){L===void 0&&(L=1);try{var _=s.db.transaction(s.storeName,g);u(null,_)}catch(p){if(L>0&&(!s.db||p.name==="InvalidStateError"||p.name==="NotFoundError"))return d.resolve().then(function(){if(!s.db||p.name==="NotFoundError"&&!s.db.objectStoreNames.contains(s.storeName)&&s.version<=s.db.version)return s.db&&(s.version=s.db.version+1),W(s)}).then(function(){return y1(s).then(function(){a1(s,g,u,L-1)})}).catch(u);u(p)}}function r1(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function u1(s){var g=this,u={db:null};if(s)for(var L in s)u[L]=s[L];var _=V[u.name];_||(_=r1(),V[u.name]=_),_.forages.push(g),g._initReady||(g._initReady=g.ready,g.ready=b1);var p=[];function E(){return d.resolve()}for(var N=0;N<_.forages.length;N++){var k=_.forages[N];k!==g&&p.push(k._initReady().catch(E))}var A=_.forages.slice(0);return d.all(p).then(function(){return u.db=_.db,K(u)}).then(function(P){return u.db=P,Y(u,g._defaultConfig.version)?W(u):P}).then(function(P){u.db=_.db=P,g._dbInfo=u;for(var F=0;F<A.length;F++){var Q=A[F];Q!==g&&(Q._dbInfo.db=u.db,Q._dbInfo.version=u.version)}})}function L1(s,g){var u=this;s=S(s);var L=new d(function(_,p){u.ready().then(function(){a1(u._dbInfo,U,function(E,N){if(E)return p(E);try{var k=N.objectStore(u._dbInfo.storeName),A=k.get(s);A.onsuccess=function(){var P=A.result;P===void 0&&(P=null),C1(P)&&(P=l1(P)),_(P)},A.onerror=function(){p(A.error)}}catch(P){p(P)}})}).catch(p)});return w(L,g),L}function I1(s,g){var u=this,L=new d(function(_,p){u.ready().then(function(){a1(u._dbInfo,U,function(E,N){if(E)return p(E);try{var k=N.objectStore(u._dbInfo.storeName),A=k.openCursor(),P=1;A.onsuccess=function(){var F=A.result;if(F){var Q=F.value;C1(Q)&&(Q=l1(Q));var t1=s(Q,F.key,P++);t1!==void 0?_(t1):F.continue()}else _()},A.onerror=function(){p(A.error)}}catch(F){p(F)}})}).catch(p)});return w(L,g),L}function Z1(s,g,u){var L=this;s=S(s);var _=new d(function(p,E){var N;L.ready().then(function(){return N=L._dbInfo,O.call(g)==="[object Blob]"?X(N.db).then(function(k){return k?g:e1(g)}):g}).then(function(k){a1(L._dbInfo,M,function(A,P){if(A)return E(A);try{var F=P.objectStore(L._dbInfo.storeName);k===null&&(k=void 0);var Q=F.put(k,s);P.oncomplete=function(){k===void 0&&(k=null),p(k)},P.onabort=P.onerror=function(){var t1=Q.error?Q.error:Q.transaction.error;E(t1)}}catch(t1){E(t1)}})}).catch(E)});return w(_,u),_}function B1(s,g){var u=this;s=S(s);var L=new d(function(_,p){u.ready().then(function(){a1(u._dbInfo,M,function(E,N){if(E)return p(E);try{var k=N.objectStore(u._dbInfo.storeName),A=k.delete(s);N.oncomplete=function(){_()},N.onerror=function(){p(A.error)},N.onabort=function(){var P=A.error?A.error:A.transaction.error;p(P)}}catch(P){p(P)}})}).catch(p)});return w(L,g),L}function F1(s){var g=this,u=new d(function(L,_){g.ready().then(function(){a1(g._dbInfo,M,function(p,E){if(p)return _(p);try{var N=E.objectStore(g._dbInfo.storeName),k=N.clear();E.oncomplete=function(){L()},E.onabort=E.onerror=function(){var A=k.error?k.error:k.transaction.error;_(A)}}catch(A){_(A)}})}).catch(_)});return w(u,s),u}function T4(s){var g=this,u=new d(function(L,_){g.ready().then(function(){a1(g._dbInfo,U,function(p,E){if(p)return _(p);try{var N=E.objectStore(g._dbInfo.storeName),k=N.count();k.onsuccess=function(){L(k.result)},k.onerror=function(){_(k.error)}}catch(A){_(A)}})}).catch(_)});return w(u,s),u}function x4(s,g){var u=this,L=new d(function(_,p){if(s<0){_(null);return}u.ready().then(function(){a1(u._dbInfo,U,function(E,N){if(E)return p(E);try{var k=N.objectStore(u._dbInfo.storeName),A=!1,P=k.openKeyCursor();P.onsuccess=function(){var F=P.result;if(!F){_(null);return}s===0||A?_(F.key):(A=!0,F.advance(s))},P.onerror=function(){p(P.error)}}catch(F){p(F)}})}).catch(p)});return w(L,g),L}function Z4(s){var g=this,u=new d(function(L,_){g.ready().then(function(){a1(g._dbInfo,U,function(p,E){if(p)return _(p);try{var N=E.objectStore(g._dbInfo.storeName),k=N.openKeyCursor(),A=[];k.onsuccess=function(){var P=k.result;if(!P){L(A);return}A.push(P.key),P.continue()},k.onerror=function(){_(k.error)}}catch(P){_(P)}})}).catch(_)});return w(u,s),u}function k4(s,g){g=T.apply(this,arguments);var u=this.config();s=typeof s!="function"&&s||{},s.name||(s.name=s.name||u.name,s.storeName=s.storeName||u.storeName);var L=this,_;if(!s.name)_=d.reject("Invalid arguments");else{var p=s.name===u.name&&L._dbInfo.db,E=p?d.resolve(L._dbInfo.db):K(s).then(function(N){var k=V[s.name],A=k.forages;k.db=N;for(var P=0;P<A.length;P++)A[P]._dbInfo.db=N;return N});s.storeName?_=E.then(function(N){if(N.objectStoreNames.contains(s.storeName)){var k=N.version+1;B(s);var A=V[s.name],P=A.forages;N.close();for(var F=0;F<P.length;F++){var Q=P[F];Q._dbInfo.db=null,Q._dbInfo.version=k}var t1=new d(function(n1,c1){var s1=v.open(s.name,k);s1.onerror=function(M1){var le=s1.result;le.close(),c1(M1)},s1.onupgradeneeded=function(){var M1=s1.result;M1.deleteObjectStore(s.storeName)},s1.onsuccess=function(){var M1=s1.result;M1.close(),n1(M1)}});return t1.then(function(n1){A.db=n1;for(var c1=0;c1<P.length;c1++){var s1=P[c1];s1._dbInfo.db=n1,G(s1._dbInfo)}}).catch(function(n1){throw(q(s,n1)||d.resolve()).catch(function(){}),n1})}}):_=E.then(function(N){B(s);var k=V[s.name],A=k.forages;N.close();for(var P=0;P<A.length;P++){var F=A[P];F._dbInfo.db=null}var Q=new d(function(t1,n1){var c1=v.deleteDatabase(s.name);c1.onerror=function(){var s1=c1.result;s1&&s1.close(),n1(c1.error)},c1.onblocked=function(){console.warn('dropInstance blocked for database "'+s.name+'" until all open connections are closed')},c1.onsuccess=function(){var s1=c1.result;s1&&s1.close(),t1(s1)}});return Q.then(function(t1){k.db=t1;for(var n1=0;n1<A.length;n1++){var c1=A[n1];G(c1._dbInfo)}}).catch(function(t1){throw(q(s,t1)||d.resolve()).catch(function(){}),t1})})}return w(_,g),_}var A4={_driver:"asyncStorage",_initStorage:u1,_support:m(),iterate:I1,getItem:L1,setItem:Z1,removeItem:B1,clear:F1,length:T4,key:x4,keys:Z4,dropInstance:k4};function $4(){return typeof openDatabase=="function"}var N1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P4="~~local_forage_type~",G6=/^~~local_forage_type~([^~]+)~/,De="__lfsc__:",f3=De.length,h3="arbf",C3="blob",W6="si08",Y6="ui08",X6="uic8",q6="si16",J6="si32",Q6="ur16",K6="ui32",en="fl32",tn="fl64",nn=f3+h3.length,rn=Object.prototype.toString;function on(s){var g=s.length*.75,u=s.length,L,_=0,p,E,N,k;s[s.length-1]==="="&&(g--,s[s.length-2]==="="&&g--);var A=new ArrayBuffer(g),P=new Uint8Array(A);for(L=0;L<u;L+=4)p=N1.indexOf(s[L]),E=N1.indexOf(s[L+1]),N=N1.indexOf(s[L+2]),k=N1.indexOf(s[L+3]),P[_++]=p<<2|E>>4,P[_++]=(E&15)<<4|N>>2,P[_++]=(N&3)<<6|k&63;return A}function v3(s){var g=new Uint8Array(s),u="",L;for(L=0;L<g.length;L+=3)u+=N1[g[L]>>2],u+=N1[(g[L]&3)<<4|g[L+1]>>4],u+=N1[(g[L+1]&15)<<2|g[L+2]>>6],u+=N1[g[L+2]&63];return g.length%3===2?u=u.substring(0,u.length-1)+"=":g.length%3===1&&(u=u.substring(0,u.length-2)+"=="),u}function U4(s,g){var u="";if(s&&(u=rn.call(s)),s&&(u==="[object ArrayBuffer]"||s.buffer&&rn.call(s.buffer)==="[object ArrayBuffer]")){var L,_=De;s instanceof ArrayBuffer?(L=s,_+=h3):(L=s.buffer,u==="[object Int8Array]"?_+=W6:u==="[object Uint8Array]"?_+=Y6:u==="[object Uint8ClampedArray]"?_+=X6:u==="[object Int16Array]"?_+=q6:u==="[object Uint16Array]"?_+=Q6:u==="[object Int32Array]"?_+=J6:u==="[object Uint32Array]"?_+=K6:u==="[object Float32Array]"?_+=en:u==="[object Float64Array]"?_+=tn:g(new Error("Failed to get type for BinaryArray"))),g(_+v3(L))}else if(u==="[object Blob]"){var p=new FileReader;p.onload=function(){var E=P4+s.type+"~"+v3(this.result);g(De+C3+E)},p.readAsArrayBuffer(s)}else try{g(JSON.stringify(s))}catch(E){console.error("Couldn't convert value into a JSON string: ",s),g(null,E)}}function B4(s){if(s.substring(0,f3)!==De)return JSON.parse(s);var g=s.substring(nn),u=s.substring(f3,nn),L;if(u===C3&&G6.test(g)){var _=g.match(G6);L=_[1],g=g.substring(_[0].length)}var p=on(g);switch(u){case h3:return p;case C3:return b([p],{type:L});case W6:return new Int8Array(p);case Y6:return new Uint8Array(p);case X6:return new Uint8ClampedArray(p);case q6:return new Int16Array(p);case Q6:return new Uint16Array(p);case J6:return new Int32Array(p);case K6:return new Uint32Array(p);case en:return new Float32Array(p);case tn:return new Float64Array(p);default:throw new Error("Unkown type: "+u)}}var g3={serialize:U4,deserialize:B4,stringToBuffer:on,bufferToString:v3};function an(s,g,u,L){s.executeSql("CREATE TABLE IF NOT EXISTS "+g.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],u,L)}function F4(s){var g=this,u={db:null};if(s)for(var L in s)u[L]=typeof s[L]!="string"?s[L].toString():s[L];var _=new d(function(p,E){try{u.db=openDatabase(u.name,String(u.version),u.description,u.size)}catch(N){return E(N)}u.db.transaction(function(N){an(N,u,function(){g._dbInfo=u,p()},function(k,A){E(A)})},E)});return u.serializer=g3,_}function R1(s,g,u,L,_,p){s.executeSql(u,L,_,function(E,N){N.code===N.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[g.storeName],function(k,A){A.rows.length?p(k,N):an(k,g,function(){k.executeSql(u,L,_,p)},p)},p):p(E,N)},p)}function j4(s,g){var u=this;s=S(s);var L=new d(function(_,p){u.ready().then(function(){var E=u._dbInfo;E.db.transaction(function(N){R1(N,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[s],function(k,A){var P=A.rows.length?A.rows.item(0).value:null;P&&(P=E.serializer.deserialize(P)),_(P)},function(k,A){p(A)})})}).catch(p)});return w(L,g),L}function z4(s,g){var u=this,L=new d(function(_,p){u.ready().then(function(){var E=u._dbInfo;E.db.transaction(function(N){R1(N,E,"SELECT * FROM "+E.storeName,[],function(k,A){for(var P=A.rows,F=P.length,Q=0;Q<F;Q++){var t1=P.item(Q),n1=t1.value;if(n1&&(n1=E.serializer.deserialize(n1)),n1=s(n1,t1.key,Q+1),n1!==void 0){_(n1);return}}_()},function(k,A){p(A)})})}).catch(p)});return w(L,g),L}function ln(s,g,u,L){var _=this;s=S(s);var p=new d(function(E,N){_.ready().then(function(){g===void 0&&(g=null);var k=g,A=_._dbInfo;A.serializer.serialize(g,function(P,F){F?N(F):A.db.transaction(function(Q){R1(Q,A,"INSERT OR REPLACE INTO "+A.storeName+" (key, value) VALUES (?, ?)",[s,P],function(){E(k)},function(t1,n1){N(n1)})},function(Q){if(Q.code===Q.QUOTA_ERR){if(L>0){E(ln.apply(_,[s,k,u,L-1]));return}N(Q)}})})}).catch(N)});return w(p,u),p}function G4(s,g,u){return ln.apply(this,[s,g,u,1])}function W4(s,g){var u=this;s=S(s);var L=new d(function(_,p){u.ready().then(function(){var E=u._dbInfo;E.db.transaction(function(N){R1(N,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[s],function(){_()},function(k,A){p(A)})})}).catch(p)});return w(L,g),L}function Y4(s){var g=this,u=new d(function(L,_){g.ready().then(function(){var p=g._dbInfo;p.db.transaction(function(E){R1(E,p,"DELETE FROM "+p.storeName,[],function(){L()},function(N,k){_(k)})})}).catch(_)});return w(u,s),u}function X4(s){var g=this,u=new d(function(L,_){g.ready().then(function(){var p=g._dbInfo;p.db.transaction(function(E){R1(E,p,"SELECT COUNT(key) as c FROM "+p.storeName,[],function(N,k){var A=k.rows.item(0).c;L(A)},function(N,k){_(k)})})}).catch(_)});return w(u,s),u}function q4(s,g){var u=this,L=new d(function(_,p){u.ready().then(function(){var E=u._dbInfo;E.db.transaction(function(N){R1(N,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[s+1],function(k,A){var P=A.rows.length?A.rows.item(0).key:null;_(P)},function(k,A){p(A)})})}).catch(p)});return w(L,g),L}function J4(s){var g=this,u=new d(function(L,_){g.ready().then(function(){var p=g._dbInfo;p.db.transaction(function(E){R1(E,p,"SELECT key FROM "+p.storeName,[],function(N,k){for(var A=[],P=0;P<k.rows.length;P++)A.push(k.rows.item(P).key);L(A)},function(N,k){_(k)})})}).catch(_)});return w(u,s),u}function Q4(s){return new d(function(g,u){s.transaction(function(L){L.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(_,p){for(var E=[],N=0;N<p.rows.length;N++)E.push(p.rows.item(N).name);g({db:s,storeNames:E})},function(_,p){u(p)})},function(L){u(L)})})}function K4(s,g){g=T.apply(this,arguments);var u=this.config();s=typeof s!="function"&&s||{},s.name||(s.name=s.name||u.name,s.storeName=s.storeName||u.storeName);var L=this,_;return s.name?_=new d(function(p){var E;s.name===u.name?E=L._dbInfo.db:E=openDatabase(s.name,"","",0),s.storeName?p({db:E,storeNames:[s.storeName]}):p(Q4(E))}).then(function(p){return new d(function(E,N){p.db.transaction(function(k){function A(t1){return new d(function(n1,c1){k.executeSql("DROP TABLE IF EXISTS "+t1,[],function(){n1()},function(s1,M1){c1(M1)})})}for(var P=[],F=0,Q=p.storeNames.length;F<Q;F++)P.push(A(p.storeNames[F]));d.all(P).then(function(){E()}).catch(function(t1){N(t1)})},function(k){N(k)})})}):_=d.reject("Invalid arguments"),w(_,g),_}var e5={_driver:"webSQLStorage",_initStorage:F4,_support:$4(),iterate:z4,getItem:j4,setItem:G4,removeItem:W4,clear:Y4,length:X4,key:q4,keys:J4,dropInstance:K4};function t5(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function sn(s,g){var u=s.name+"/";return s.storeName!==g.storeName&&(u+=s.storeName+"/"),u}function n5(){var s="_localforage_support_test";try{return localStorage.setItem(s,!0),localStorage.removeItem(s),!1}catch{return!0}}function r5(){return!n5()||localStorage.length>0}function i5(s){var g=this,u={};if(s)for(var L in s)u[L]=s[L];return u.keyPrefix=sn(s,g._defaultConfig),r5()?(g._dbInfo=u,u.serializer=g3,d.resolve()):d.reject()}function o5(s){var g=this,u=g.ready().then(function(){for(var L=g._dbInfo.keyPrefix,_=localStorage.length-1;_>=0;_--){var p=localStorage.key(_);p.indexOf(L)===0&&localStorage.removeItem(p)}});return w(u,s),u}function a5(s,g){var u=this;s=S(s);var L=u.ready().then(function(){var _=u._dbInfo,p=localStorage.getItem(_.keyPrefix+s);return p&&(p=_.serializer.deserialize(p)),p});return w(L,g),L}function l5(s,g){var u=this,L=u.ready().then(function(){for(var _=u._dbInfo,p=_.keyPrefix,E=p.length,N=localStorage.length,k=1,A=0;A<N;A++){var P=localStorage.key(A);if(P.indexOf(p)===0){var F=localStorage.getItem(P);if(F&&(F=_.serializer.deserialize(F)),F=s(F,P.substring(E),k++),F!==void 0)return F}}});return w(L,g),L}function s5(s,g){var u=this,L=u.ready().then(function(){var _=u._dbInfo,p;try{p=localStorage.key(s)}catch{p=null}return p&&(p=p.substring(_.keyPrefix.length)),p});return w(L,g),L}function c5(s){var g=this,u=g.ready().then(function(){for(var L=g._dbInfo,_=localStorage.length,p=[],E=0;E<_;E++){var N=localStorage.key(E);N.indexOf(L.keyPrefix)===0&&p.push(N.substring(L.keyPrefix.length))}return p});return w(u,s),u}function u5(s){var g=this,u=g.keys().then(function(L){return L.length});return w(u,s),u}function d5(s,g){var u=this;s=S(s);var L=u.ready().then(function(){var _=u._dbInfo;localStorage.removeItem(_.keyPrefix+s)});return w(L,g),L}function f5(s,g,u){var L=this;s=S(s);var _=L.ready().then(function(){g===void 0&&(g=null);var p=g;return new d(function(E,N){var k=L._dbInfo;k.serializer.serialize(g,function(A,P){if(P)N(P);else try{localStorage.setItem(k.keyPrefix+s,A),E(p)}catch(F){(F.name==="QuotaExceededError"||F.name==="NS_ERROR_DOM_QUOTA_REACHED")&&N(F),N(F)}})})});return w(_,u),_}function h5(s,g){if(g=T.apply(this,arguments),s=typeof s!="function"&&s||{},!s.name){var u=this.config();s.name=s.name||u.name,s.storeName=s.storeName||u.storeName}var L=this,_;return s.name?_=new d(function(p){s.storeName?p(sn(s,L._defaultConfig)):p(s.name+"/")}).then(function(p){for(var E=localStorage.length-1;E>=0;E--){var N=localStorage.key(E);N.indexOf(p)===0&&localStorage.removeItem(N)}}):_=d.reject("Invalid arguments"),w(_,g),_}var C5={_driver:"localStorageWrapper",_initStorage:i5,_support:t5(),iterate:l5,getItem:a5,setItem:f5,removeItem:d5,clear:o5,length:u5,key:s5,keys:c5,dropInstance:h5},v5=function(g,u){return g===u||typeof g=="number"&&typeof u=="number"&&isNaN(g)&&isNaN(u)},g5=function(g,u){for(var L=g.length,_=0;_<L;){if(v5(g[_],u))return!0;_++}return!1},cn=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"},ae={},un={},j1={INDEXEDDB:A4,WEBSQL:e5,LOCALSTORAGE:C5},m5=[j1.INDEXEDDB._driver,j1.WEBSQL._driver,j1.LOCALSTORAGE._driver],Oe=["dropInstance"],m3=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Oe),p5={description:"",driver:m5.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function b5(s,g){s[g]=function(){var u=arguments;return s.ready().then(function(){return s[g].apply(s,u)})}}function p3(){for(var s=1;s<arguments.length;s++){var g=arguments[s];if(g)for(var u in g)g.hasOwnProperty(u)&&(cn(g[u])?arguments[0][u]=g[u].slice():arguments[0][u]=g[u])}return arguments[0]}var L5=function(){function s(g){o(this,s);for(var u in j1)if(j1.hasOwnProperty(u)){var L=j1[u],_=L._driver;this[u]=_,ae[_]||this.defineDriver(L)}this._defaultConfig=p3({},p5),this._config=p3({},this._defaultConfig,g),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return s.prototype.config=function(u){if((typeof u>"u"?"undefined":l(u))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var L in u){if(L==="storeName"&&(u[L]=u[L].replace(/\W/g,"_")),L==="version"&&typeof u[L]!="number")return new Error("Database version must be a number.");this._config[L]=u[L]}return"driver"in u&&u.driver?this.setDriver(this._config.driver):!0}else return typeof u=="string"?this._config[u]:this._config},s.prototype.defineDriver=function(u,L,_){var p=new d(function(E,N){try{var k=u._driver,A=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!u._driver){N(A);return}for(var P=m3.concat("_initStorage"),F=0,Q=P.length;F<Q;F++){var t1=P[F],n1=!g5(Oe,t1);if((n1||u[t1])&&typeof u[t1]!="function"){N(A);return}}var c1=function(){for(var le=function(y5){return function(){var M5=new Error("Method "+y5+" is not implemented by the current driver"),dn=d.reject(M5);return w(dn,arguments[arguments.length-1]),dn}},b3=0,_5=Oe.length;b3<_5;b3++){var L3=Oe[b3];u[L3]||(u[L3]=le(L3))}};c1();var s1=function(le){ae[k]&&console.info("Redefining LocalForage driver: "+k),ae[k]=u,un[k]=le,E()};"_support"in u?u._support&&typeof u._support=="function"?u._support().then(s1,N):s1(!!u._support):s1(!0)}catch(M1){N(M1)}});return y(p,L,_),p},s.prototype.driver=function(){return this._driver||null},s.prototype.getDriver=function(u,L,_){var p=ae[u]?d.resolve(ae[u]):d.reject(new Error("Driver not found."));return y(p,L,_),p},s.prototype.getSerializer=function(u){var L=d.resolve(g3);return y(L,u),L},s.prototype.ready=function(u){var L=this,_=L._driverSet.then(function(){return L._ready===null&&(L._ready=L._initDriver()),L._ready});return y(_,u,u),_},s.prototype.setDriver=function(u,L,_){var p=this;cn(u)||(u=[u]);var E=this._getSupportedDrivers(u);function N(){p._config.driver=p.driver()}function k(F){return p._extend(F),N(),p._ready=p._initStorage(p._config),p._ready}function A(F){return function(){var Q=0;function t1(){for(;Q<F.length;){var n1=F[Q];return Q++,p._dbInfo=null,p._ready=null,p.getDriver(n1).then(k).catch(t1)}N();var c1=new Error("No available storage method found.");return p._driverSet=d.reject(c1),p._driverSet}return t1()}}var P=this._driverSet!==null?this._driverSet.catch(function(){return d.resolve()}):d.resolve();return this._driverSet=P.then(function(){var F=E[0];return p._dbInfo=null,p._ready=null,p.getDriver(F).then(function(Q){p._driver=Q._driver,N(),p._wrapLibraryMethodsWithReady(),p._initDriver=A(E)})}).catch(function(){N();var F=new Error("No available storage method found.");return p._driverSet=d.reject(F),p._driverSet}),y(this._driverSet,L,_),this._driverSet},s.prototype.supports=function(u){return!!un[u]},s.prototype._extend=function(u){p3(this,u)},s.prototype._getSupportedDrivers=function(u){for(var L=[],_=0,p=u.length;_<p;_++){var E=u[_];this.supports(E)&&L.push(E)}return L},s.prototype._wrapLibraryMethodsWithReady=function(){for(var u=0,L=m3.length;u<L;u++)b5(this,m3[u])},s.prototype.createInstance=function(u){return new s(u)},s}(),w5=new L5;r.exports=w5},{3:3}]},{},[4])(4)})}(o3)),o3.exports}var K0=Q0();const x1=J0(K0);class a3{getItem(t){return x1.getItem(t)}setItem(t,n){return x1.setItem(t,n)}removeItem(t){return x1.removeItem(t)}clear(){return x1.clear()}key(t){return x1.key(t)}keys(){return x1.keys()}iterate(t){return x1.iterate(t)}}var e4=Object.getOwnPropertyDescriptor,t4=(e,t,n,r)=>{for(var i=r>1?void 0:r?e4(t,n):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(i=o(i)||i);return i},T6=(e,t)=>(n,r)=>t(n,r,e);f.DesktopMessageService=class extends h.Disposable{constructor(t,n){super(),this._injector=t,this._uiPartsService=n,this._initUIPart()}_initUIPart(){this.disposeWithMe(this._uiPartsService.registerComponent(o1.GLOBAL,()=>R.connectInjector(Z.Messager,this._injector)))}dispose(){Z.removeMessage()}show(t){let n=t;return typeof t.id>"u"&&(n=Object.assign({},t,{id:`message-${Date.now()}`})),Z.message(n),h.toDisposable(()=>Z.removeMessage(n.id))}remove(t){Z.removeMessage(t)}removeAll(){Z.removeMessage()}},f.DesktopMessageService=t4([T6(0,h.Inject(h.Injector)),T6(1,_1)],f.DesktopMessageService);function n4(){const e=R.useDependency(h.ThemeService),t=R.useObservable(e.darkMode$);return C.jsx(Z.Toaster,{theme:t?"dark":"light"})}const r4={show:e=>{const{type:t="message",title:n,content:r,duration:i,closable:l=!0,position:o="top-right"}=e;Z.toast[t](n,{position:o,description:r,duration:i,closeButton:l})}};var i4=Object.getOwnPropertyDescriptor,o4=(e,t,n,r)=>{for(var i=r>1?void 0:r?i4(t,n):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(i=o(i)||i);return i},x6=(e,t)=>(n,r)=>t(n,r,e);f.DesktopNotificationService=class extends h.Disposable{constructor(t,n){super(),this._injector=t,this._uiPartsService=n,this._initUIPart()}show(t){return r4.show(t),h.toDisposable(()=>{})}_initUIPart(){this.disposeWithMe(this._uiPartsService.registerComponent(o1.GLOBAL,()=>R.connectInjector(n4,this._injector)))}},f.DesktopNotificationService=o4([x6(0,h.Inject(h.Injector)),x6(1,_1)],f.DesktopNotificationService);class l3{constructor(){j(this,"_sidebarOptions",{});j(this,"sidebarOptions$",new z.Subject);j(this,"scrollEvent$",new z.Subject);j(this,"_container")}get visible(){return this._sidebarOptions.visible||!1}get options(){return this._sidebarOptions}open(t){return this._sidebarOptions={...t,id:t.id,visible:!0},this.sidebarOptions$.next(this._sidebarOptions),h.toDisposable(()=>{this.close()})}close(t){t&&this._sidebarOptions.id!==t||(this._sidebarOptions={...this._sidebarOptions,visible:!1},this.sidebarOptions$.next(this._sidebarOptions),this._sidebarOptions.onClose&&this._sidebarOptions.onClose())}getContainer(){return this._container}setContainer(t){this._container=t}}var a4=Object.getOwnPropertyDescriptor,l4=(e,t,n,r)=>{for(var i=r>1?void 0:r?a4(t,n):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(i=o(i)||i);return i},s4=(e,t)=>(n,r)=>t(n,r,e);f.DesktopZenZoneService=class{constructor(t){j(this,"visible$",new z.BehaviorSubject(!1));j(this,"componentKey$",new z.ReplaySubject);j(this,"_temporaryHidden$",new z.BehaviorSubject(!1));j(this,"temporaryHidden$",this._temporaryHidden$.asObservable());j(this,"_visible",!1);this._componentManager=t}get visible(){return this._visible}get temporaryHidden(){return this._temporaryHidden$.getValue()}dispose(){this.visible$.next(!1),this.visible$.complete(),this.componentKey$.complete()}hide(){this._temporaryHidden$.next(!0)}show(){this._temporaryHidden$.next(!1)}set(t,n){return this._componentManager.register(t,n),this.componentKey$.next(t),h.toDisposable(()=>{this._componentManager.delete(t),this.visible$.complete(),this.componentKey$.complete()})}open(){this._visible=!0,this.visible$.next(!0)}close(){this._visible=!1,this.visible$.next(!1)}},f.DesktopZenZoneService=l4([s4(0,h.Inject(v1))],f.DesktopZenZoneService);var c4=Object.defineProperty,u4=Object.getOwnPropertyDescriptor,d4=(e,t,n)=>t in e?c4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f4=(e,t,n,r)=>{for(var i=r>1?void 0:r?u4(t,n):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(i=o(i)||i);return i},h4=(e,t)=>(n,r)=>t(n,r,e),C4=(e,t,n)=>d4(e,t+"",n);const v4="UNIVER_MOBILE_UI_PLUGIN";f.UniverMobileUIPlugin=class extends h.Plugin{constructor(t,n){super(),this._config=t,this._injector=n}onStarting(){h.mergeOverrideWithDependencies([[v1],[W1],[he],[_1,{useClass:Fe}],[H1,{useClass:f.DesktopLayoutService}],[re],[P1,{useClass:f.ShortcutService}],[Ce,{useClass:Be}],[S1,{useClass:f.MenuManagerService}],[ie,{useClass:Ye}],[i3,{useClass:f.BrowserClipboardService,lazy:!0}],[oe,{useClass:f.DesktopNotificationService,lazy:!0}],[ye,{useClass:f.DesktopGalleryService,lazy:!0}],[_e,{useClass:f.DesktopDialogService,lazy:!0}],[we,{useClass:f.DesktopConfirmService,lazy:!0}],[$1,{useClass:l3,lazy:!0}],[Le,{useClass:f.DesktopZenZoneService,lazy:!0}],[be,{useClass:f.DesktopGlobalZoneService,lazy:!0}],[fe,{useClass:f.DesktopMessageService,lazy:!0}],[h.ILocalStorageService,{useClass:a3,lazy:!0}],[e3,{useClass:f.DesktopBeforeCloseService}],[me,{useClass:ze}],[ge],[te,{useFactory:n=>n.createInstance(Ke,this._config),deps:[h.Injector]}],[f.SharedController],[f.ErrorController]],this._config.override).forEach(n=>this._injector.add(n)),this._injector.get(te),this._injector.get(f.ErrorController)}},C4(f.UniverMobileUIPlugin,"pluginName",v4),f.UniverMobileUIPlugin=f4([h.DependentOn(z1.UniverRenderEnginePlugin),h4(1,h.Inject(h.Injector))],f.UniverMobileUIPlugin);class Z6 extends h.Disposable{openFile(t){return new Promise(n=>{var i,l;const r=document.createElement("input");r.type="file",r.accept=(i=t==null?void 0:t.accept)!=null?i:"",r.multiple=(l=t==null?void 0:t.multiple)!=null?l:!1,r.onchange=o=>{const c=o.target.files;c&&n(Array.from(c))},r.click()})}downloadFile(t,n){const r=document.createElement("a");r.download=n,r.href=window.URL.createObjectURL(t),r.click()}}const k6=h.createIdentifier("univer-ui.local-file.service"),g4=e=>{const n=R.useDependency($1).getContainer();a.useEffect(()=>{if(n)return n.addEventListener("mousedown",e),()=>{n.removeEventListener("mousedown",e)}},[e,n])},m4=a.memo(e=>{var T,D;const{layer:t,id:n,position:r}=e,i=R.useDependency(h.IUniverInstanceService),l=a.useRef(null),o=a.useRef(null),c=a.useRef(`transform: rotate(${r==null?void 0:r.rotate}deg) translate(${r==null?void 0:r.startX}px, ${r==null?void 0:r.startY}px)`),v=a.useRef((T=r==null?void 0:r.startY)!=null?T:0),m=a.useRef((D=r==null?void 0:r.startX)!=null?D:0),b=typeof t.componentKey=="string"?R.useDependency(v1).get(t.componentKey):t.componentKey,d=a.useMemo(()=>({data:t.data,...t.props}),[t.data,t.props]),w={width:`${r.width-4}px`,height:`${r.height-4}px`,left:`${r.absolute.left?0:"auto"}`,top:`${r.absolute.top?0:"auto"}`,right:`${r.absolute.left?"auto":0}`,bottom:`${r.absolute.top?"auto":0}`};c.current=`rotate(${r.rotate}deg)`,v.current=r.startY,m.current=r.startX;const y=i.getUnit(t.unitId),S=a.useMemo(()=>b?C.jsx(b,{...d,unitId:t.unitId,unit:y,floatDomId:t.id,context:{root:o}}):null,[b,d]);return r?C.jsx("div",{ref:l,className:"univer-absolute univer-z-10 univer-origin-center univer-overflow-hidden",style:{top:v.current,left:m.current,width:Math.max(r.endX-r.startX-2,0),height:Math.max(r.endY-r.startY-2,0),transform:c.current},onPointerMove:I=>{t.onPointerMove(I.nativeEvent)},onPointerDown:I=>{t.onPointerDown(I.nativeEvent)},onPointerUp:I=>{t.onPointerUp(I.nativeEvent)},onWheel:I=>{t.onWheel(I.nativeEvent)},children:C.jsx("div",{ref:o,id:n,className:"univer-absolute univer-overflow-hidden",style:{...w},children:S})}):null});var p4=Object.defineProperty,b4=Object.getOwnPropertyDescriptor,L4=(e,t,n)=>t in e?p4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w4=(e,t,n,r)=>{for(var i=r>1?void 0:r?b4(t,n):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(i=o(i)||i);return i},s3=(e,t)=>(n,r)=>t(n,r,e),_4=(e,t,n)=>L4(e,t+"",n);const A6="UNIVER_UI_PLUGIN",$6="DISABLE_AUTO_FOCUS";f.UniverUIPlugin=class extends h.Plugin{constructor(t=F9,n,r,i){super(),this._config=t,this._contextService=n,this._injector=r,this._configService=i;const{menu:l,...o}=h.merge({popupRootId:`univer-popup-portal-${h.generateRandomId(6)}`},F9,this._config);o.disableAutoFocus&&this._contextService.setContextValue($6,!0),l&&this._configService.setConfig("menu",l,{merge:!0}),this._configService.setConfig(Y1,o)}onStarting(){h.registerDependencies(this._injector,h.mergeOverrideWithDependencies([[v1],[re],[W1],[he],[_1,{useClass:Fe}],[H1,{useClass:f.DesktopLayoutService}],[P1,{useClass:f.ShortcutService}],[Ce,{useClass:Be}],[S1,{useClass:f.MenuManagerService}],[ie,{useClass:Ye}],[i3,{useClass:f.BrowserClipboardService,lazy:!0}],[oe,{useClass:f.DesktopNotificationService,lazy:!0}],[ye,{useClass:f.DesktopGalleryService,lazy:!0}],[_e,{useClass:f.DesktopDialogService,lazy:!0}],[we,{useClass:f.DesktopConfirmService,lazy:!0}],[$1,{useClass:l3,lazy:!0}],[Le,{useClass:f.DesktopZenZoneService,lazy:!0}],[be,{useClass:f.DesktopGlobalZoneService,lazy:!0}],[fe,{useClass:f.DesktopMessageService,lazy:!0}],[h.ILocalStorageService,{useClass:a3,lazy:!0}],[e3,{useClass:f.DesktopBeforeCloseService}],[k6,{useClass:Z6}],[me,{useClass:ze}],[ge],[te,{useFactory:t=>t.createInstance(f.DesktopUIController,this._config),deps:[h.Injector]}],[f.SharedController],[f.ErrorController],[f.ShortcutPanelController]])),h.touchDependencies(this._injector,[[te],[f.ErrorController]])}onReady(){h.touchDependencies(this._injector,[[f.SharedController]])}onSteady(){h.touchDependencies(this._injector,[[f.ShortcutPanelController]])}},_4(f.UniverUIPlugin,"pluginName",A6),f.UniverUIPlugin=w4([h.DependentOn(z1.UniverRenderEnginePlugin),s3(1,h.IContextService),s3(2,h.Inject(h.Injector)),s3(3,h.IConfigService)],f.UniverUIPlugin);function Ie(e){return e.length===0?e:e.replace(/^\s+|\s+$/gm,"")}const y4=.75,P6=78,U6=9,B6="rgba(0,0,0,0)",F6="rgb(0,0,0)";function c3(e){var c;let t=e.childNodes;if(t.length===0)return e.textContent;if(t[0].nodeName==="DIV"&&(t=t[0].childNodes),t.length===1&&t[0].nodeName==="#text")return t[0].textContent;const n=[];let r=0,i=0,l=e.textContent||"";l+=`\r
|
|
18
|
+
*/var R6;function Q0(){return R6||(R6=1,function(e,t){(function(n){e.exports=n()})(function(){return function n(r,i,l){function o(m,b){if(!i[m]){if(!r[m]){var d=typeof Se=="function"&&Se;if(!b&&d)return d(m,!0);if(c)return c(m,!0);var w=new Error("Cannot find module '"+m+"'");throw w.code="MODULE_NOT_FOUND",w}var y=i[m]={exports:{}};r[m][0].call(y.exports,function(S){var T=r[m][1][S];return o(T||S)},y,y.exports,n,r,i,l)}return i[m].exports}for(var c=typeof Se=="function"&&Se,v=0;v<l.length;v++)o(l[v]);return o}({1:[function(n,r,i){(function(l){var o=l.MutationObserver||l.WebKitMutationObserver,c;if(o){var v=0,m=new o(S),b=l.document.createTextNode("");m.observe(b,{characterData:!0}),c=function(){b.data=v=++v%2}}else if(!l.setImmediate&&typeof l.MessageChannel<"u"){var d=new l.MessageChannel;d.port1.onmessage=S,c=function(){d.port2.postMessage(0)}}else"document"in l&&"onreadystatechange"in l.document.createElement("script")?c=function(){var D=l.document.createElement("script");D.onreadystatechange=function(){S(),D.onreadystatechange=null,D.parentNode.removeChild(D),D=null},l.document.documentElement.appendChild(D)}:c=function(){setTimeout(S,0)};var w,y=[];function S(){w=!0;for(var D,I,V=y.length;V;){for(I=y,y=[],D=-1;++D<V;)I[D]();V=y.length}w=!1}r.exports=T;function T(D){y.push(D)===1&&!w&&c()}}).call(this,typeof Me<"u"?Me:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(n,r,i){var l=n(1);function o(){}var c={},v=["REJECTED"],m=["FULFILLED"],b=["PENDING"];r.exports=d;function d(M){if(typeof M!="function")throw new TypeError("resolver must be a function");this.state=b,this.queue=[],this.outcome=void 0,M!==o&&T(this,M)}d.prototype.catch=function(M){return this.then(null,M)},d.prototype.then=function(M,x){if(typeof M!="function"&&this.state===m||typeof x!="function"&&this.state===v)return this;var $=new this.constructor(o);if(this.state!==b){var X=this.state===m?M:x;y($,X,this.outcome)}else this.queue.push(new w($,M,x));return $};function w(M,x,$){this.promise=M,typeof x=="function"&&(this.onFulfilled=x,this.callFulfilled=this.otherCallFulfilled),typeof $=="function"&&(this.onRejected=$,this.callRejected=this.otherCallRejected)}w.prototype.callFulfilled=function(M){c.resolve(this.promise,M)},w.prototype.otherCallFulfilled=function(M){y(this.promise,this.onFulfilled,M)},w.prototype.callRejected=function(M){c.reject(this.promise,M)},w.prototype.otherCallRejected=function(M){y(this.promise,this.onRejected,M)};function y(M,x,$){l(function(){var X;try{X=x($)}catch(B){return c.reject(M,B)}X===M?c.reject(M,new TypeError("Cannot resolve promise with itself")):c.resolve(M,X)})}c.resolve=function(M,x){var $=D(S,x);if($.status==="error")return c.reject(M,$.value);var X=$.value;if(X)T(M,X);else{M.state=m,M.outcome=x;for(var B=-1,G=M.queue.length;++B<G;)M.queue[B].callFulfilled(x)}return M},c.reject=function(M,x){M.state=v,M.outcome=x;for(var $=-1,X=M.queue.length;++$<X;)M.queue[$].callRejected(x);return M};function S(M){var x=M&&M.then;if(M&&(typeof M=="object"||typeof M=="function")&&typeof x=="function")return function(){x.apply(M,arguments)}}function T(M,x){var $=!1;function X(J){$||($=!0,c.reject(M,J))}function B(J){$||($=!0,c.resolve(M,J))}function G(){x(B,X)}var q=D(G);q.status==="error"&&X(q.value)}function D(M,x){var $={};try{$.value=M(x),$.status="success"}catch(X){$.status="error",$.value=X}return $}d.resolve=I;function I(M){return M instanceof this?M:c.resolve(new this(o),M)}d.reject=V;function V(M){var x=new this(o);return c.reject(x,M)}d.all=O;function O(M){var x=this;if(Object.prototype.toString.call(M)!=="[object Array]")return this.reject(new TypeError("must be an array"));var $=M.length,X=!1;if(!$)return this.resolve([]);for(var B=new Array($),G=0,q=-1,J=new this(o);++q<$;)K(M[q],q);return J;function K(W,Y){x.resolve(W).then(e1,function(l1){X||(X=!0,c.reject(J,l1))});function e1(l1){B[Y]=l1,++G===$&&!X&&(X=!0,c.resolve(J,B))}}}d.race=U;function U(M){var x=this;if(Object.prototype.toString.call(M)!=="[object Array]")return this.reject(new TypeError("must be an array"));var $=M.length,X=!1;if(!$)return this.resolve([]);for(var B=-1,G=new this(o);++B<$;)q(M[B]);return G;function q(J){x.resolve(J).then(function(K){X||(X=!0,c.resolve(G,K))},function(K){X||(X=!0,c.reject(G,K))})}}},{1:1}],3:[function(n,r,i){(function(l){typeof l.Promise!="function"&&(l.Promise=n(2))}).call(this,typeof Me<"u"?Me:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(n,r,i){var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function o(s,g){if(!(s instanceof g))throw new TypeError("Cannot call a class as a function")}function c(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var v=c();function m(){try{if(!v||!v.open)return!1;var s=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),g=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!s||g)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function b(s,g){s=s||[],g=g||{};try{return new Blob(s,g)}catch(p){if(p.name!=="TypeError")throw p;for(var u=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,L=new u,_=0;_<s.length;_+=1)L.append(s[_]);return L.getBlob(g.type)}}typeof Promise>"u"&&n(3);var d=Promise;function w(s,g){g&&s.then(function(u){g(null,u)},function(u){g(u)})}function y(s,g,u){typeof g=="function"&&s.then(g),typeof u=="function"&&s.catch(u)}function S(s){return typeof s!="string"&&(console.warn(s+" used as a key, but it is not a string."),s=String(s)),s}function T(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var D="local-forage-detect-blob-support",I=void 0,V={},O=Object.prototype.toString,U="readonly",M="readwrite";function x(s){for(var g=s.length,u=new ArrayBuffer(g),L=new Uint8Array(u),_=0;_<g;_++)L[_]=s.charCodeAt(_);return u}function $(s){return new d(function(g){var u=s.transaction(D,M),L=b([""]);u.objectStore(D).put(L,"key"),u.onabort=function(_){_.preventDefault(),_.stopPropagation(),g(!1)},u.oncomplete=function(){var _=navigator.userAgent.match(/Chrome\/(\d+)/),p=navigator.userAgent.match(/Edge\//);g(p||!_||parseInt(_[1],10)>=43)}}).catch(function(){return!1})}function X(s){return typeof I=="boolean"?d.resolve(I):$(s).then(function(g){return I=g,I})}function B(s){var g=V[s.name],u={};u.promise=new d(function(L,_){u.resolve=L,u.reject=_}),g.deferredOperations.push(u),g.dbReady?g.dbReady=g.dbReady.then(function(){return u.promise}):g.dbReady=u.promise}function G(s){var g=V[s.name],u=g.deferredOperations.pop();if(u)return u.resolve(),u.promise}function q(s,g){var u=V[s.name],L=u.deferredOperations.pop();if(L)return L.reject(g),L.promise}function J(s,g){return new d(function(u,L){if(V[s.name]=V[s.name]||r1(),s.db)if(g)B(s),s.db.close();else return u(s.db);var _=[s.name];g&&_.push(s.version);var p=v.open.apply(v,_);g&&(p.onupgradeneeded=function(E){var N=p.result;try{N.createObjectStore(s.storeName),E.oldVersion<=1&&N.createObjectStore(D)}catch(k){if(k.name==="ConstraintError")console.warn('The database "'+s.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+s.storeName+'" already exists.');else throw k}}),p.onerror=function(E){E.preventDefault(),L(p.error)},p.onsuccess=function(){var E=p.result;E.onversionchange=function(N){N.target.close()},u(E),G(s)}})}function K(s){return J(s,!1)}function W(s){return J(s,!0)}function Y(s,g){if(!s.db)return!0;var u=!s.db.objectStoreNames.contains(s.storeName),L=s.version<s.db.version,_=s.version>s.db.version;if(L&&(s.version!==g&&console.warn('The database "'+s.name+`" can't be downgraded from version `+s.db.version+" to version "+s.version+"."),s.version=s.db.version),_||u){if(u){var p=s.db.version+1;p>s.version&&(s.version=p)}return!0}return!1}function e1(s){return new d(function(g,u){var L=new FileReader;L.onerror=u,L.onloadend=function(_){var p=btoa(_.target.result||"");g({__local_forage_encoded_blob:!0,data:p,type:s.type})},L.readAsBinaryString(s)})}function l1(s){var g=x(atob(s.data));return b([g],{type:s.type})}function C1(s){return s&&s.__local_forage_encoded_blob}function b1(s){var g=this,u=g._initReady().then(function(){var L=V[g._dbInfo.name];if(L&&L.dbReady)return L.dbReady});return y(u,s,s),u}function y1(s){B(s);for(var g=V[s.name],u=g.forages,L=0;L<u.length;L++){var _=u[L];_._dbInfo.db&&(_._dbInfo.db.close(),_._dbInfo.db=null)}return s.db=null,K(s).then(function(p){return s.db=p,Y(s)?W(s):p}).then(function(p){s.db=g.db=p;for(var E=0;E<u.length;E++)u[E]._dbInfo.db=p}).catch(function(p){throw q(s,p),p})}function a1(s,g,u,L){L===void 0&&(L=1);try{var _=s.db.transaction(s.storeName,g);u(null,_)}catch(p){if(L>0&&(!s.db||p.name==="InvalidStateError"||p.name==="NotFoundError"))return d.resolve().then(function(){if(!s.db||p.name==="NotFoundError"&&!s.db.objectStoreNames.contains(s.storeName)&&s.version<=s.db.version)return s.db&&(s.version=s.db.version+1),W(s)}).then(function(){return y1(s).then(function(){a1(s,g,u,L-1)})}).catch(u);u(p)}}function r1(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function u1(s){var g=this,u={db:null};if(s)for(var L in s)u[L]=s[L];var _=V[u.name];_||(_=r1(),V[u.name]=_),_.forages.push(g),g._initReady||(g._initReady=g.ready,g.ready=b1);var p=[];function E(){return d.resolve()}for(var N=0;N<_.forages.length;N++){var k=_.forages[N];k!==g&&p.push(k._initReady().catch(E))}var A=_.forages.slice(0);return d.all(p).then(function(){return u.db=_.db,K(u)}).then(function(P){return u.db=P,Y(u,g._defaultConfig.version)?W(u):P}).then(function(P){u.db=_.db=P,g._dbInfo=u;for(var F=0;F<A.length;F++){var Q=A[F];Q!==g&&(Q._dbInfo.db=u.db,Q._dbInfo.version=u.version)}})}function L1(s,g){var u=this;s=S(s);var L=new d(function(_,p){u.ready().then(function(){a1(u._dbInfo,U,function(E,N){if(E)return p(E);try{var k=N.objectStore(u._dbInfo.storeName),A=k.get(s);A.onsuccess=function(){var P=A.result;P===void 0&&(P=null),C1(P)&&(P=l1(P)),_(P)},A.onerror=function(){p(A.error)}}catch(P){p(P)}})}).catch(p)});return w(L,g),L}function I1(s,g){var u=this,L=new d(function(_,p){u.ready().then(function(){a1(u._dbInfo,U,function(E,N){if(E)return p(E);try{var k=N.objectStore(u._dbInfo.storeName),A=k.openCursor(),P=1;A.onsuccess=function(){var F=A.result;if(F){var Q=F.value;C1(Q)&&(Q=l1(Q));var t1=s(Q,F.key,P++);t1!==void 0?_(t1):F.continue()}else _()},A.onerror=function(){p(A.error)}}catch(F){p(F)}})}).catch(p)});return w(L,g),L}function Z1(s,g,u){var L=this;s=S(s);var _=new d(function(p,E){var N;L.ready().then(function(){return N=L._dbInfo,O.call(g)==="[object Blob]"?X(N.db).then(function(k){return k?g:e1(g)}):g}).then(function(k){a1(L._dbInfo,M,function(A,P){if(A)return E(A);try{var F=P.objectStore(L._dbInfo.storeName);k===null&&(k=void 0);var Q=F.put(k,s);P.oncomplete=function(){k===void 0&&(k=null),p(k)},P.onabort=P.onerror=function(){var t1=Q.error?Q.error:Q.transaction.error;E(t1)}}catch(t1){E(t1)}})}).catch(E)});return w(_,u),_}function B1(s,g){var u=this;s=S(s);var L=new d(function(_,p){u.ready().then(function(){a1(u._dbInfo,M,function(E,N){if(E)return p(E);try{var k=N.objectStore(u._dbInfo.storeName),A=k.delete(s);N.oncomplete=function(){_()},N.onerror=function(){p(A.error)},N.onabort=function(){var P=A.error?A.error:A.transaction.error;p(P)}}catch(P){p(P)}})}).catch(p)});return w(L,g),L}function F1(s){var g=this,u=new d(function(L,_){g.ready().then(function(){a1(g._dbInfo,M,function(p,E){if(p)return _(p);try{var N=E.objectStore(g._dbInfo.storeName),k=N.clear();E.oncomplete=function(){L()},E.onabort=E.onerror=function(){var A=k.error?k.error:k.transaction.error;_(A)}}catch(A){_(A)}})}).catch(_)});return w(u,s),u}function T4(s){var g=this,u=new d(function(L,_){g.ready().then(function(){a1(g._dbInfo,U,function(p,E){if(p)return _(p);try{var N=E.objectStore(g._dbInfo.storeName),k=N.count();k.onsuccess=function(){L(k.result)},k.onerror=function(){_(k.error)}}catch(A){_(A)}})}).catch(_)});return w(u,s),u}function x4(s,g){var u=this,L=new d(function(_,p){if(s<0){_(null);return}u.ready().then(function(){a1(u._dbInfo,U,function(E,N){if(E)return p(E);try{var k=N.objectStore(u._dbInfo.storeName),A=!1,P=k.openKeyCursor();P.onsuccess=function(){var F=P.result;if(!F){_(null);return}s===0||A?_(F.key):(A=!0,F.advance(s))},P.onerror=function(){p(P.error)}}catch(F){p(F)}})}).catch(p)});return w(L,g),L}function Z4(s){var g=this,u=new d(function(L,_){g.ready().then(function(){a1(g._dbInfo,U,function(p,E){if(p)return _(p);try{var N=E.objectStore(g._dbInfo.storeName),k=N.openKeyCursor(),A=[];k.onsuccess=function(){var P=k.result;if(!P){L(A);return}A.push(P.key),P.continue()},k.onerror=function(){_(k.error)}}catch(P){_(P)}})}).catch(_)});return w(u,s),u}function k4(s,g){g=T.apply(this,arguments);var u=this.config();s=typeof s!="function"&&s||{},s.name||(s.name=s.name||u.name,s.storeName=s.storeName||u.storeName);var L=this,_;if(!s.name)_=d.reject("Invalid arguments");else{var p=s.name===u.name&&L._dbInfo.db,E=p?d.resolve(L._dbInfo.db):K(s).then(function(N){var k=V[s.name],A=k.forages;k.db=N;for(var P=0;P<A.length;P++)A[P]._dbInfo.db=N;return N});s.storeName?_=E.then(function(N){if(N.objectStoreNames.contains(s.storeName)){var k=N.version+1;B(s);var A=V[s.name],P=A.forages;N.close();for(var F=0;F<P.length;F++){var Q=P[F];Q._dbInfo.db=null,Q._dbInfo.version=k}var t1=new d(function(n1,c1){var s1=v.open(s.name,k);s1.onerror=function(M1){var le=s1.result;le.close(),c1(M1)},s1.onupgradeneeded=function(){var M1=s1.result;M1.deleteObjectStore(s.storeName)},s1.onsuccess=function(){var M1=s1.result;M1.close(),n1(M1)}});return t1.then(function(n1){A.db=n1;for(var c1=0;c1<P.length;c1++){var s1=P[c1];s1._dbInfo.db=n1,G(s1._dbInfo)}}).catch(function(n1){throw(q(s,n1)||d.resolve()).catch(function(){}),n1})}}):_=E.then(function(N){B(s);var k=V[s.name],A=k.forages;N.close();for(var P=0;P<A.length;P++){var F=A[P];F._dbInfo.db=null}var Q=new d(function(t1,n1){var c1=v.deleteDatabase(s.name);c1.onerror=function(){var s1=c1.result;s1&&s1.close(),n1(c1.error)},c1.onblocked=function(){console.warn('dropInstance blocked for database "'+s.name+'" until all open connections are closed')},c1.onsuccess=function(){var s1=c1.result;s1&&s1.close(),t1(s1)}});return Q.then(function(t1){k.db=t1;for(var n1=0;n1<A.length;n1++){var c1=A[n1];G(c1._dbInfo)}}).catch(function(t1){throw(q(s,t1)||d.resolve()).catch(function(){}),t1})})}return w(_,g),_}var A4={_driver:"asyncStorage",_initStorage:u1,_support:m(),iterate:I1,getItem:L1,setItem:Z1,removeItem:B1,clear:F1,length:T4,key:x4,keys:Z4,dropInstance:k4};function $4(){return typeof openDatabase=="function"}var N1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",P4="~~local_forage_type~",G6=/^~~local_forage_type~([^~]+)~/,De="__lfsc__:",f3=De.length,h3="arbf",C3="blob",W6="si08",Y6="ui08",X6="uic8",q6="si16",J6="si32",Q6="ur16",K6="ui32",en="fl32",tn="fl64",nn=f3+h3.length,rn=Object.prototype.toString;function on(s){var g=s.length*.75,u=s.length,L,_=0,p,E,N,k;s[s.length-1]==="="&&(g--,s[s.length-2]==="="&&g--);var A=new ArrayBuffer(g),P=new Uint8Array(A);for(L=0;L<u;L+=4)p=N1.indexOf(s[L]),E=N1.indexOf(s[L+1]),N=N1.indexOf(s[L+2]),k=N1.indexOf(s[L+3]),P[_++]=p<<2|E>>4,P[_++]=(E&15)<<4|N>>2,P[_++]=(N&3)<<6|k&63;return A}function v3(s){var g=new Uint8Array(s),u="",L;for(L=0;L<g.length;L+=3)u+=N1[g[L]>>2],u+=N1[(g[L]&3)<<4|g[L+1]>>4],u+=N1[(g[L+1]&15)<<2|g[L+2]>>6],u+=N1[g[L+2]&63];return g.length%3===2?u=u.substring(0,u.length-1)+"=":g.length%3===1&&(u=u.substring(0,u.length-2)+"=="),u}function U4(s,g){var u="";if(s&&(u=rn.call(s)),s&&(u==="[object ArrayBuffer]"||s.buffer&&rn.call(s.buffer)==="[object ArrayBuffer]")){var L,_=De;s instanceof ArrayBuffer?(L=s,_+=h3):(L=s.buffer,u==="[object Int8Array]"?_+=W6:u==="[object Uint8Array]"?_+=Y6:u==="[object Uint8ClampedArray]"?_+=X6:u==="[object Int16Array]"?_+=q6:u==="[object Uint16Array]"?_+=Q6:u==="[object Int32Array]"?_+=J6:u==="[object Uint32Array]"?_+=K6:u==="[object Float32Array]"?_+=en:u==="[object Float64Array]"?_+=tn:g(new Error("Failed to get type for BinaryArray"))),g(_+v3(L))}else if(u==="[object Blob]"){var p=new FileReader;p.onload=function(){var E=P4+s.type+"~"+v3(this.result);g(De+C3+E)},p.readAsArrayBuffer(s)}else try{g(JSON.stringify(s))}catch(E){console.error("Couldn't convert value into a JSON string: ",s),g(null,E)}}function B4(s){if(s.substring(0,f3)!==De)return JSON.parse(s);var g=s.substring(nn),u=s.substring(f3,nn),L;if(u===C3&&G6.test(g)){var _=g.match(G6);L=_[1],g=g.substring(_[0].length)}var p=on(g);switch(u){case h3:return p;case C3:return b([p],{type:L});case W6:return new Int8Array(p);case Y6:return new Uint8Array(p);case X6:return new Uint8ClampedArray(p);case q6:return new Int16Array(p);case Q6:return new Uint16Array(p);case J6:return new Int32Array(p);case K6:return new Uint32Array(p);case en:return new Float32Array(p);case tn:return new Float64Array(p);default:throw new Error("Unkown type: "+u)}}var g3={serialize:U4,deserialize:B4,stringToBuffer:on,bufferToString:v3};function an(s,g,u,L){s.executeSql("CREATE TABLE IF NOT EXISTS "+g.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],u,L)}function F4(s){var g=this,u={db:null};if(s)for(var L in s)u[L]=typeof s[L]!="string"?s[L].toString():s[L];var _=new d(function(p,E){try{u.db=openDatabase(u.name,String(u.version),u.description,u.size)}catch(N){return E(N)}u.db.transaction(function(N){an(N,u,function(){g._dbInfo=u,p()},function(k,A){E(A)})},E)});return u.serializer=g3,_}function R1(s,g,u,L,_,p){s.executeSql(u,L,_,function(E,N){N.code===N.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[g.storeName],function(k,A){A.rows.length?p(k,N):an(k,g,function(){k.executeSql(u,L,_,p)},p)},p):p(E,N)},p)}function j4(s,g){var u=this;s=S(s);var L=new d(function(_,p){u.ready().then(function(){var E=u._dbInfo;E.db.transaction(function(N){R1(N,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[s],function(k,A){var P=A.rows.length?A.rows.item(0).value:null;P&&(P=E.serializer.deserialize(P)),_(P)},function(k,A){p(A)})})}).catch(p)});return w(L,g),L}function z4(s,g){var u=this,L=new d(function(_,p){u.ready().then(function(){var E=u._dbInfo;E.db.transaction(function(N){R1(N,E,"SELECT * FROM "+E.storeName,[],function(k,A){for(var P=A.rows,F=P.length,Q=0;Q<F;Q++){var t1=P.item(Q),n1=t1.value;if(n1&&(n1=E.serializer.deserialize(n1)),n1=s(n1,t1.key,Q+1),n1!==void 0){_(n1);return}}_()},function(k,A){p(A)})})}).catch(p)});return w(L,g),L}function ln(s,g,u,L){var _=this;s=S(s);var p=new d(function(E,N){_.ready().then(function(){g===void 0&&(g=null);var k=g,A=_._dbInfo;A.serializer.serialize(g,function(P,F){F?N(F):A.db.transaction(function(Q){R1(Q,A,"INSERT OR REPLACE INTO "+A.storeName+" (key, value) VALUES (?, ?)",[s,P],function(){E(k)},function(t1,n1){N(n1)})},function(Q){if(Q.code===Q.QUOTA_ERR){if(L>0){E(ln.apply(_,[s,k,u,L-1]));return}N(Q)}})})}).catch(N)});return w(p,u),p}function G4(s,g,u){return ln.apply(this,[s,g,u,1])}function W4(s,g){var u=this;s=S(s);var L=new d(function(_,p){u.ready().then(function(){var E=u._dbInfo;E.db.transaction(function(N){R1(N,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[s],function(){_()},function(k,A){p(A)})})}).catch(p)});return w(L,g),L}function Y4(s){var g=this,u=new d(function(L,_){g.ready().then(function(){var p=g._dbInfo;p.db.transaction(function(E){R1(E,p,"DELETE FROM "+p.storeName,[],function(){L()},function(N,k){_(k)})})}).catch(_)});return w(u,s),u}function X4(s){var g=this,u=new d(function(L,_){g.ready().then(function(){var p=g._dbInfo;p.db.transaction(function(E){R1(E,p,"SELECT COUNT(key) as c FROM "+p.storeName,[],function(N,k){var A=k.rows.item(0).c;L(A)},function(N,k){_(k)})})}).catch(_)});return w(u,s),u}function q4(s,g){var u=this,L=new d(function(_,p){u.ready().then(function(){var E=u._dbInfo;E.db.transaction(function(N){R1(N,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[s+1],function(k,A){var P=A.rows.length?A.rows.item(0).key:null;_(P)},function(k,A){p(A)})})}).catch(p)});return w(L,g),L}function J4(s){var g=this,u=new d(function(L,_){g.ready().then(function(){var p=g._dbInfo;p.db.transaction(function(E){R1(E,p,"SELECT key FROM "+p.storeName,[],function(N,k){for(var A=[],P=0;P<k.rows.length;P++)A.push(k.rows.item(P).key);L(A)},function(N,k){_(k)})})}).catch(_)});return w(u,s),u}function Q4(s){return new d(function(g,u){s.transaction(function(L){L.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(_,p){for(var E=[],N=0;N<p.rows.length;N++)E.push(p.rows.item(N).name);g({db:s,storeNames:E})},function(_,p){u(p)})},function(L){u(L)})})}function K4(s,g){g=T.apply(this,arguments);var u=this.config();s=typeof s!="function"&&s||{},s.name||(s.name=s.name||u.name,s.storeName=s.storeName||u.storeName);var L=this,_;return s.name?_=new d(function(p){var E;s.name===u.name?E=L._dbInfo.db:E=openDatabase(s.name,"","",0),s.storeName?p({db:E,storeNames:[s.storeName]}):p(Q4(E))}).then(function(p){return new d(function(E,N){p.db.transaction(function(k){function A(t1){return new d(function(n1,c1){k.executeSql("DROP TABLE IF EXISTS "+t1,[],function(){n1()},function(s1,M1){c1(M1)})})}for(var P=[],F=0,Q=p.storeNames.length;F<Q;F++)P.push(A(p.storeNames[F]));d.all(P).then(function(){E()}).catch(function(t1){N(t1)})},function(k){N(k)})})}):_=d.reject("Invalid arguments"),w(_,g),_}var e5={_driver:"webSQLStorage",_initStorage:F4,_support:$4(),iterate:z4,getItem:j4,setItem:G4,removeItem:W4,clear:Y4,length:X4,key:q4,keys:J4,dropInstance:K4};function t5(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function sn(s,g){var u=s.name+"/";return s.storeName!==g.storeName&&(u+=s.storeName+"/"),u}function n5(){var s="_localforage_support_test";try{return localStorage.setItem(s,!0),localStorage.removeItem(s),!1}catch{return!0}}function r5(){return!n5()||localStorage.length>0}function i5(s){var g=this,u={};if(s)for(var L in s)u[L]=s[L];return u.keyPrefix=sn(s,g._defaultConfig),r5()?(g._dbInfo=u,u.serializer=g3,d.resolve()):d.reject()}function o5(s){var g=this,u=g.ready().then(function(){for(var L=g._dbInfo.keyPrefix,_=localStorage.length-1;_>=0;_--){var p=localStorage.key(_);p.indexOf(L)===0&&localStorage.removeItem(p)}});return w(u,s),u}function a5(s,g){var u=this;s=S(s);var L=u.ready().then(function(){var _=u._dbInfo,p=localStorage.getItem(_.keyPrefix+s);return p&&(p=_.serializer.deserialize(p)),p});return w(L,g),L}function l5(s,g){var u=this,L=u.ready().then(function(){for(var _=u._dbInfo,p=_.keyPrefix,E=p.length,N=localStorage.length,k=1,A=0;A<N;A++){var P=localStorage.key(A);if(P.indexOf(p)===0){var F=localStorage.getItem(P);if(F&&(F=_.serializer.deserialize(F)),F=s(F,P.substring(E),k++),F!==void 0)return F}}});return w(L,g),L}function s5(s,g){var u=this,L=u.ready().then(function(){var _=u._dbInfo,p;try{p=localStorage.key(s)}catch{p=null}return p&&(p=p.substring(_.keyPrefix.length)),p});return w(L,g),L}function c5(s){var g=this,u=g.ready().then(function(){for(var L=g._dbInfo,_=localStorage.length,p=[],E=0;E<_;E++){var N=localStorage.key(E);N.indexOf(L.keyPrefix)===0&&p.push(N.substring(L.keyPrefix.length))}return p});return w(u,s),u}function u5(s){var g=this,u=g.keys().then(function(L){return L.length});return w(u,s),u}function d5(s,g){var u=this;s=S(s);var L=u.ready().then(function(){var _=u._dbInfo;localStorage.removeItem(_.keyPrefix+s)});return w(L,g),L}function f5(s,g,u){var L=this;s=S(s);var _=L.ready().then(function(){g===void 0&&(g=null);var p=g;return new d(function(E,N){var k=L._dbInfo;k.serializer.serialize(g,function(A,P){if(P)N(P);else try{localStorage.setItem(k.keyPrefix+s,A),E(p)}catch(F){(F.name==="QuotaExceededError"||F.name==="NS_ERROR_DOM_QUOTA_REACHED")&&N(F),N(F)}})})});return w(_,u),_}function h5(s,g){if(g=T.apply(this,arguments),s=typeof s!="function"&&s||{},!s.name){var u=this.config();s.name=s.name||u.name,s.storeName=s.storeName||u.storeName}var L=this,_;return s.name?_=new d(function(p){s.storeName?p(sn(s,L._defaultConfig)):p(s.name+"/")}).then(function(p){for(var E=localStorage.length-1;E>=0;E--){var N=localStorage.key(E);N.indexOf(p)===0&&localStorage.removeItem(N)}}):_=d.reject("Invalid arguments"),w(_,g),_}var C5={_driver:"localStorageWrapper",_initStorage:i5,_support:t5(),iterate:l5,getItem:a5,setItem:f5,removeItem:d5,clear:o5,length:u5,key:s5,keys:c5,dropInstance:h5},v5=function(g,u){return g===u||typeof g=="number"&&typeof u=="number"&&isNaN(g)&&isNaN(u)},g5=function(g,u){for(var L=g.length,_=0;_<L;){if(v5(g[_],u))return!0;_++}return!1},cn=Array.isArray||function(s){return Object.prototype.toString.call(s)==="[object Array]"},ae={},un={},j1={INDEXEDDB:A4,WEBSQL:e5,LOCALSTORAGE:C5},m5=[j1.INDEXEDDB._driver,j1.WEBSQL._driver,j1.LOCALSTORAGE._driver],Oe=["dropInstance"],m3=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Oe),p5={description:"",driver:m5.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function b5(s,g){s[g]=function(){var u=arguments;return s.ready().then(function(){return s[g].apply(s,u)})}}function p3(){for(var s=1;s<arguments.length;s++){var g=arguments[s];if(g)for(var u in g)g.hasOwnProperty(u)&&(cn(g[u])?arguments[0][u]=g[u].slice():arguments[0][u]=g[u])}return arguments[0]}var L5=function(){function s(g){o(this,s);for(var u in j1)if(j1.hasOwnProperty(u)){var L=j1[u],_=L._driver;this[u]=_,ae[_]||this.defineDriver(L)}this._defaultConfig=p3({},p5),this._config=p3({},this._defaultConfig,g),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return s.prototype.config=function(u){if((typeof u>"u"?"undefined":l(u))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var L in u){if(L==="storeName"&&(u[L]=u[L].replace(/\W/g,"_")),L==="version"&&typeof u[L]!="number")return new Error("Database version must be a number.");this._config[L]=u[L]}return"driver"in u&&u.driver?this.setDriver(this._config.driver):!0}else return typeof u=="string"?this._config[u]:this._config},s.prototype.defineDriver=function(u,L,_){var p=new d(function(E,N){try{var k=u._driver,A=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!u._driver){N(A);return}for(var P=m3.concat("_initStorage"),F=0,Q=P.length;F<Q;F++){var t1=P[F],n1=!g5(Oe,t1);if((n1||u[t1])&&typeof u[t1]!="function"){N(A);return}}var c1=function(){for(var le=function(y5){return function(){var M5=new Error("Method "+y5+" is not implemented by the current driver"),dn=d.reject(M5);return w(dn,arguments[arguments.length-1]),dn}},b3=0,_5=Oe.length;b3<_5;b3++){var L3=Oe[b3];u[L3]||(u[L3]=le(L3))}};c1();var s1=function(le){ae[k]&&console.info("Redefining LocalForage driver: "+k),ae[k]=u,un[k]=le,E()};"_support"in u?u._support&&typeof u._support=="function"?u._support().then(s1,N):s1(!!u._support):s1(!0)}catch(M1){N(M1)}});return y(p,L,_),p},s.prototype.driver=function(){return this._driver||null},s.prototype.getDriver=function(u,L,_){var p=ae[u]?d.resolve(ae[u]):d.reject(new Error("Driver not found."));return y(p,L,_),p},s.prototype.getSerializer=function(u){var L=d.resolve(g3);return y(L,u),L},s.prototype.ready=function(u){var L=this,_=L._driverSet.then(function(){return L._ready===null&&(L._ready=L._initDriver()),L._ready});return y(_,u,u),_},s.prototype.setDriver=function(u,L,_){var p=this;cn(u)||(u=[u]);var E=this._getSupportedDrivers(u);function N(){p._config.driver=p.driver()}function k(F){return p._extend(F),N(),p._ready=p._initStorage(p._config),p._ready}function A(F){return function(){var Q=0;function t1(){for(;Q<F.length;){var n1=F[Q];return Q++,p._dbInfo=null,p._ready=null,p.getDriver(n1).then(k).catch(t1)}N();var c1=new Error("No available storage method found.");return p._driverSet=d.reject(c1),p._driverSet}return t1()}}var P=this._driverSet!==null?this._driverSet.catch(function(){return d.resolve()}):d.resolve();return this._driverSet=P.then(function(){var F=E[0];return p._dbInfo=null,p._ready=null,p.getDriver(F).then(function(Q){p._driver=Q._driver,N(),p._wrapLibraryMethodsWithReady(),p._initDriver=A(E)})}).catch(function(){N();var F=new Error("No available storage method found.");return p._driverSet=d.reject(F),p._driverSet}),y(this._driverSet,L,_),this._driverSet},s.prototype.supports=function(u){return!!un[u]},s.prototype._extend=function(u){p3(this,u)},s.prototype._getSupportedDrivers=function(u){for(var L=[],_=0,p=u.length;_<p;_++){var E=u[_];this.supports(E)&&L.push(E)}return L},s.prototype._wrapLibraryMethodsWithReady=function(){for(var u=0,L=m3.length;u<L;u++)b5(this,m3[u])},s.prototype.createInstance=function(u){return new s(u)},s}(),w5=new L5;r.exports=w5},{3:3}]},{},[4])(4)})}(o3)),o3.exports}var K0=Q0();const x1=J0(K0);class a3{getItem(t){return x1.getItem(t)}setItem(t,n){return x1.setItem(t,n)}removeItem(t){return x1.removeItem(t)}clear(){return x1.clear()}key(t){return x1.key(t)}keys(){return x1.keys()}iterate(t){return x1.iterate(t)}}var e4=Object.getOwnPropertyDescriptor,t4=(e,t,n,r)=>{for(var i=r>1?void 0:r?e4(t,n):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(i=o(i)||i);return i},T6=(e,t)=>(n,r)=>t(n,r,e);f.DesktopMessageService=class extends h.Disposable{constructor(t,n){super(),this._injector=t,this._uiPartsService=n,this._initUIPart()}_initUIPart(){this.disposeWithMe(this._uiPartsService.registerComponent(o1.GLOBAL,()=>R.connectInjector(Z.Messager,this._injector)))}dispose(){Z.removeMessage()}show(t){let n=t;return typeof t.id>"u"&&(n=Object.assign({},t,{id:`message-${Date.now()}`})),Z.message(n),h.toDisposable(()=>Z.removeMessage(n.id))}remove(t){Z.removeMessage(t)}removeAll(){Z.removeMessage()}},f.DesktopMessageService=t4([T6(0,h.Inject(h.Injector)),T6(1,_1)],f.DesktopMessageService);function n4(){const e=R.useDependency(h.ThemeService),t=R.useObservable(e.darkMode$);return C.jsx(Z.Toaster,{theme:t?"dark":"light"})}const r4={show:e=>{const{type:t="message",title:n,content:r,duration:i,closable:l=!0,position:o="top-right"}=e;Z.toast[t](n,{position:o,description:r,duration:i,closeButton:l})}};var i4=Object.getOwnPropertyDescriptor,o4=(e,t,n,r)=>{for(var i=r>1?void 0:r?i4(t,n):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(i=o(i)||i);return i},x6=(e,t)=>(n,r)=>t(n,r,e);f.DesktopNotificationService=class extends h.Disposable{constructor(t,n){super(),this._injector=t,this._uiPartsService=n,this._initUIPart()}show(t){return r4.show(t),h.toDisposable(()=>{})}_initUIPart(){this.disposeWithMe(this._uiPartsService.registerComponent(o1.GLOBAL,()=>R.connectInjector(n4,this._injector)))}},f.DesktopNotificationService=o4([x6(0,h.Inject(h.Injector)),x6(1,_1)],f.DesktopNotificationService);class l3{constructor(){j(this,"_sidebarOptions",{});j(this,"sidebarOptions$",new z.Subject);j(this,"scrollEvent$",new z.Subject);j(this,"_container")}get visible(){return this._sidebarOptions.visible||!1}get options(){return this._sidebarOptions}open(t){return this._sidebarOptions={...t,id:t.id,visible:!0},this.sidebarOptions$.next(this._sidebarOptions),h.toDisposable(()=>{this.close()})}close(t){t&&this._sidebarOptions.id!==t||(this._sidebarOptions={...this._sidebarOptions,visible:!1},this.sidebarOptions$.next(this._sidebarOptions),this._sidebarOptions.onClose&&this._sidebarOptions.onClose())}getContainer(){return this._container}setContainer(t){this._container=t}}var a4=Object.getOwnPropertyDescriptor,l4=(e,t,n,r)=>{for(var i=r>1?void 0:r?a4(t,n):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(i=o(i)||i);return i},s4=(e,t)=>(n,r)=>t(n,r,e);f.DesktopZenZoneService=class{constructor(t){j(this,"visible$",new z.BehaviorSubject(!1));j(this,"componentKey$",new z.ReplaySubject);j(this,"_temporaryHidden$",new z.BehaviorSubject(!1));j(this,"temporaryHidden$",this._temporaryHidden$.asObservable());j(this,"_visible",!1);this._componentManager=t}get visible(){return this._visible}get temporaryHidden(){return this._temporaryHidden$.getValue()}dispose(){this.visible$.next(!1),this.visible$.complete(),this.componentKey$.complete()}hide(){this._temporaryHidden$.next(!0)}show(){this._temporaryHidden$.next(!1)}set(t,n){return this._componentManager.register(t,n),this.componentKey$.next(t),h.toDisposable(()=>{this._componentManager.delete(t),this.visible$.complete(),this.componentKey$.complete()})}open(){this._visible=!0,this.visible$.next(!0)}close(){this._visible=!1,this.visible$.next(!1)}},f.DesktopZenZoneService=l4([s4(0,h.Inject(v1))],f.DesktopZenZoneService);var c4=Object.defineProperty,u4=Object.getOwnPropertyDescriptor,d4=(e,t,n)=>t in e?c4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f4=(e,t,n,r)=>{for(var i=r>1?void 0:r?u4(t,n):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(i=o(i)||i);return i},h4=(e,t)=>(n,r)=>t(n,r,e),C4=(e,t,n)=>d4(e,t+"",n);const v4="UNIVER_MOBILE_UI_PLUGIN";f.UniverMobileUIPlugin=class extends h.Plugin{constructor(t,n){super(),this._config=t,this._injector=n}onStarting(){h.mergeOverrideWithDependencies([[v1],[W1],[he],[_1,{useClass:Fe}],[H1,{useClass:f.DesktopLayoutService}],[re],[P1,{useClass:f.ShortcutService}],[Ce,{useClass:Be}],[S1,{useClass:f.MenuManagerService}],[ie,{useClass:Ye}],[i3,{useClass:f.BrowserClipboardService,lazy:!0}],[oe,{useClass:f.DesktopNotificationService,lazy:!0}],[ye,{useClass:f.DesktopGalleryService,lazy:!0}],[_e,{useClass:f.DesktopDialogService,lazy:!0}],[we,{useClass:f.DesktopConfirmService,lazy:!0}],[$1,{useClass:l3,lazy:!0}],[Le,{useClass:f.DesktopZenZoneService,lazy:!0}],[be,{useClass:f.DesktopGlobalZoneService,lazy:!0}],[fe,{useClass:f.DesktopMessageService,lazy:!0}],[h.ILocalStorageService,{useClass:a3,lazy:!0}],[e3,{useClass:f.DesktopBeforeCloseService}],[me,{useClass:ze}],[ge],[te,{useFactory:n=>n.createInstance(Ke,this._config),deps:[h.Injector]}],[f.SharedController],[f.ErrorController]],this._config.override).forEach(n=>this._injector.add(n)),this._injector.get(te),this._injector.get(f.ErrorController)}},C4(f.UniverMobileUIPlugin,"pluginName",v4),f.UniverMobileUIPlugin=f4([h.DependentOn(z1.UniverRenderEnginePlugin),h4(1,h.Inject(h.Injector))],f.UniverMobileUIPlugin);class Z6 extends h.Disposable{openFile(t){return new Promise(n=>{var i,l;const r=document.createElement("input");r.type="file",r.accept=(i=t==null?void 0:t.accept)!=null?i:"",r.multiple=(l=t==null?void 0:t.multiple)!=null?l:!1,r.onchange=o=>{const c=o.target.files;c&&n(Array.from(c))},r.click()})}downloadFile(t,n){const r=document.createElement("a");r.download=n,r.href=window.URL.createObjectURL(t),r.click()}}const k6=h.createIdentifier("univer-ui.local-file.service"),g4=e=>{const n=R.useDependency($1).getContainer();a.useEffect(()=>{if(n)return n.addEventListener("mousedown",e),()=>{n.removeEventListener("mousedown",e)}},[e,n])},m4=a.memo(e=>{var T,D;const{layer:t,id:n,position:r}=e,i=R.useDependency(h.IUniverInstanceService),l=a.useRef(null),o=a.useRef(null),c=a.useRef(`transform: rotate(${r==null?void 0:r.rotate}deg) translate(${r==null?void 0:r.startX}px, ${r==null?void 0:r.startY}px)`),v=a.useRef((T=r==null?void 0:r.startY)!=null?T:0),m=a.useRef((D=r==null?void 0:r.startX)!=null?D:0),b=typeof t.componentKey=="string"?R.useDependency(v1).get(t.componentKey):t.componentKey,d=a.useMemo(()=>({data:t.data,...t.props}),[t.data,t.props]),w={width:`${r.width-4}px`,height:`${r.height-4}px`,left:`${r.absolute.left?0:"auto"}`,top:`${r.absolute.top?0:"auto"}`,right:`${r.absolute.left?"auto":0}`,bottom:`${r.absolute.top?"auto":0}`};c.current=`rotate(${r.rotate}deg)`,v.current=r.startY,m.current=r.startX;const y=i.getUnit(t.unitId),S=a.useMemo(()=>b?C.jsx(b,{...d,unitId:t.unitId,unit:y,floatDomId:t.id,context:{root:o}}):null,[b,d]);return r?C.jsx("div",{ref:l,className:"univer-absolute univer-z-10 univer-origin-center univer-overflow-hidden",style:{top:v.current,left:m.current,width:Math.max(r.endX-r.startX-2,0),height:Math.max(r.endY-r.startY-2,0),transform:c.current},onPointerMove:I=>{t.onPointerMove(I.nativeEvent)},onPointerDown:I=>{t.onPointerDown(I.nativeEvent)},onPointerUp:I=>{t.onPointerUp(I.nativeEvent)},onWheel:I=>{t.onWheel(I.nativeEvent)},children:C.jsx("div",{ref:o,id:n,className:"univer-absolute univer-overflow-hidden",style:{...w},children:S})}):null});var p4=Object.defineProperty,b4=Object.getOwnPropertyDescriptor,L4=(e,t,n)=>t in e?p4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w4=(e,t,n,r)=>{for(var i=r>1?void 0:r?b4(t,n):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(i=o(i)||i);return i},s3=(e,t)=>(n,r)=>t(n,r,e),_4=(e,t,n)=>L4(e,t+"",n);const A6="UNIVER_UI_PLUGIN",$6="DISABLE_AUTO_FOCUS";f.UniverUIPlugin=class extends h.Plugin{constructor(t=F9,n,r,i){super(),this._config=t,this._contextService=n,this._injector=r,this._configService=i;const{menu:l,...o}=h.merge({popupRootId:`univer-popup-portal-${h.generateRandomId(6)}`},F9,this._config);o.disableAutoFocus&&this._contextService.setContextValue($6,!0),l&&this._configService.setConfig("menu",l,{merge:!0}),this._configService.setConfig(Y1,o)}onStarting(){h.registerDependencies(this._injector,h.mergeOverrideWithDependencies([[v1],[re],[W1],[he],[_1,{useClass:Fe}],[H1,{useClass:f.DesktopLayoutService}],[P1,{useClass:f.ShortcutService}],[Ce,{useClass:Be}],[S1,{useClass:f.MenuManagerService}],[ie,{useClass:Ye}],[i3,{useClass:f.BrowserClipboardService,lazy:!0}],[oe,{useClass:f.DesktopNotificationService,lazy:!0}],[ye,{useClass:f.DesktopGalleryService,lazy:!0}],[_e,{useClass:f.DesktopDialogService,lazy:!0}],[we,{useClass:f.DesktopConfirmService,lazy:!0}],[$1,{useClass:l3,lazy:!0}],[Le,{useClass:f.DesktopZenZoneService,lazy:!0}],[be,{useClass:f.DesktopGlobalZoneService,lazy:!0}],[fe,{useClass:f.DesktopMessageService,lazy:!0}],[h.ILocalStorageService,{useClass:a3,lazy:!0}],[e3,{useClass:f.DesktopBeforeCloseService}],[k6,{useClass:Z6}],[me,{useClass:ze}],[ge],[te,{useFactory:t=>t.createInstance(f.DesktopUIController,this._config),deps:[h.Injector]}],[f.SharedController],[f.ErrorController],[f.ShortcutPanelController]],this._config.override)),h.touchDependencies(this._injector,[[te],[f.ErrorController]])}onReady(){h.touchDependencies(this._injector,[[f.SharedController]])}onSteady(){h.touchDependencies(this._injector,[[f.ShortcutPanelController]])}},_4(f.UniverUIPlugin,"pluginName",A6),f.UniverUIPlugin=w4([h.DependentOn(z1.UniverRenderEnginePlugin),s3(1,h.IContextService),s3(2,h.Inject(h.Injector)),s3(3,h.IConfigService)],f.UniverUIPlugin);function Ie(e){return e.length===0?e:e.replace(/^\s+|\s+$/gm,"")}const y4=.75,P6=78,U6=9,B6="rgba(0,0,0,0)",F6="rgb(0,0,0)";function c3(e){var c;let t=e.childNodes;if(t.length===0)return e.textContent;if(t[0].nodeName==="DIV"&&(t=t[0].childNodes),t.length===1&&t[0].nodeName==="#text")return t[0].textContent;const n=[];let r=0,i=0,l=e.textContent||"";l+=`\r
|
|
19
19
|
`;for(let v=0;v<t.length;v++){let m=t[`${v}`],b;m.nodeName==="#text"?(b=(c=m.textContent)!=null?c:"",m=m.parentElement):b=m.innerText;const d=He(m);z6(b).forEach(y=>{const S=y.length;i+=S,r=i-S;const T=h.Tools.generateRandomId(6);n.push({sId:T,st:r,ed:i-1,ts:d})})}return h.Tools.generateRandomId(6),{id:h.Tools.generateRandomId(6),body:{dataStream:l,textRuns:n},documentStyle:{}}}function He(e,t=""){var o,c;let n=(c=(o=e==null?void 0:e.style)==null?void 0:o.cssText)!=null?c:"";if(n+=t,n=n.replace(/[\r\n]+/g,""),n.length===0)return{};const r=n.split(";"),i={},l={t:"",r:"",b:"",l:""};return r.forEach(v=>{var w;const m=v.toLowerCase(),b=Ie(m.substr(0,m.indexOf(":"))),d=Ie(m.substr(m.indexOf(":")+1));if(b==="font-weight")d==="bold"||d==="700"?i.bl=1:i.bl=0;else if(b==="font-style")d==="italic"?i.it=1:i.it=0;else if(b==="font-family"){const y=Ie(v),S=N4(y);i.ff=S}else if(b==="font-size"){let y=Number.parseInt(d);n.indexOf("vertical-align")>-1&&(n.indexOf("sub")>-1||n.indexOf("sup")>-1)&&(y*=2),d.indexOf("px")!==-1&&(y=V4(Number.parseInt(d,10))),i.fs=y}else if(b==="color"){const y=new h.ColorKit(d);i.cl={rgb:y.isValid?y.toRgbString():"rgb(0,0,0)"}}else if(b==="background"||b==="background-color"){const y=new h.ColorKit(d);if(y){const S=y.toRgbString();S!==B6&&S!==F6&&(i.bg={rgb:y.toRgbString()})}}else if(b==="text-decoration-line")d==="underline"?(i.ul||(i.ul={s:1}),i.ul.s=1):d==="line-through"?(i.st||(i.st={s:1}),i.st.s=1):d==="overline"&&(i.ol||(i.ol={s:1}),i.ol.s=1);else if(b==="text-decoration-color")i.hasOwnProperty("ul")&&(i.ul||(i.ul={s:1,cl:{rgb:d}}),i.ul.cl={rgb:d}),i.hasOwnProperty("st")&&(i.st||(i.st={s:1,cl:{rgb:d}}),i.st.cl={rgb:d}),i.hasOwnProperty("ol")&&(i.ol||(i.ol={s:1,cl:{rgb:d}}),i.ol.cl={rgb:d});else if(b==="text-decoration-style")i.hasOwnProperty("ul")&&(i.ul||(i.ul={s:1,t:Number(d)}),i.ul.t=Number(d)),i.hasOwnProperty("st")&&(i.st||(i.st={s:1,t:Number(d)}),i.st.t=Number(d)),i.hasOwnProperty("ol")&&(i.ol||(i.ol={s:1,t:Number(d)}),i.ol.t=Number(d));else if(b==="text-decoration"||b==="univer-strike"){const y=(w=d.split(" "))==null?void 0:w[0];y==="underline"?(i.ul||(i.ul={s:1}),i.ul.s=1):y==="line-through"?(i.st||(i.st={s:1}),i.st.s=1):y==="overline"&&(i.ol||(i.ol={s:1}),i.ol.s=1)}if(b==="univer-underline"&&(i.ul={s:1}),b==="vertical-align"&&(d==="sub"?i.va=h.BaselineOffset.SUBSCRIPT:d==="super"?i.va=h.BaselineOffset.SUPERSCRIPT:d==="top"?i.vt=1:d==="middle"?i.vt=2:d==="bottom"?i.vt=3:i.va=h.BaselineOffset.NORMAL),b==="transform"){const y=d.split(")"),S=y.findIndex(T=>T.includes("rotate"));if(S>-1){const T=y[S].match(/\d+/g);let D=0,I=0;T!=null&&T.length&&(D=+T[0]),e!=null&&e.dataset.vertical&&(I=+e.dataset.vertical),i.tr={a:D,v:I}}}if(b==="text-align"&&(d==="left"?i.ht=1:d==="center"?i.ht=2:d==="right"?i.ht=3:d==="justify"?i.ht=4:i.ht=0),i.tb!==1&&(b==="overflow-wrap"||b==="word-wrap"?d==="break-word"&&(i.tb=3):b==="text-overflow"?d==="clip"&&(i.tb=2):b==="text-break"&&d==="overflow"&&(i.tb=1)),b==="white-space"&&(d==="nowrap"?i.tb=1:d==="normal"?i.tb=3:d==="clip"&&(i.tb=2)),b==="border-color"){const y=j6(d,")");if(i.bd)for(const S in y)i.bd[S].cl.rgb=y[S];else{i.bd={b:{cl:{rgb:"#000"},s:0},t:{cl:{rgb:"#000"},s:0},l:{cl:{rgb:"#000"},s:0},r:{cl:{rgb:"#000"},s:0}};for(const S in y)i.bd[S].cl.rgb=y[S]}}if(b==="border-width"||b==="border-style"){const y=j6(d," ");for(const S in y)l[S]+=` ${y[S]}`;i.bd?(i.bd.b.s=h.getBorderStyleType(l.b),i.bd.t.s=h.getBorderStyleType(l.t),i.bd.l.s=h.getBorderStyleType(l.l),i.bd.r.s=h.getBorderStyleType(l.r)):i.bd={b:{cl:{rgb:"#000"},s:h.getBorderStyleType(l.b)},t:{cl:{rgb:"#000"},s:h.getBorderStyleType(l.t)},l:{cl:{rgb:"#000"},s:h.getBorderStyleType(l.l)},r:{cl:{rgb:"#000"},s:h.getBorderStyleType(l.r)}}}if(b==="border-bottom"||b==="border-top"||b==="border-left"||b==="border-right"||b==="border"){i.bd||(i.bd={});const y=d.split(" "),S=`${y[0]} ${y[1]}`;y.splice(0,2);const T=y.join("");if(h.getBorderStyleType(S)!==h.BorderStyleTypes.NONE&&T){const I={cl:{rgb:T},s:h.getBorderStyleType(S)};b==="border-bottom"?i.bd.b=d==="none"?null:I:b==="border-top"?i.bd.t=d==="none"?null:I:b==="border-left"?i.bd.l=d==="none"?null:I:b==="border-right"?i.bd.r=d==="none"?null:I:b==="border"&&(i.bd={r:d==="none"?null:I,t:d==="none"?null:I,b:d==="none"?null:I,l:d==="none"?null:I})}}else if(b==="--data-rotate"){const y=/[+-]?\d+/,S=d.match(y);d==="(0deg ,1)"?i.tr={a:0,v:1}:S&&(i.tr={a:Number(S[0])})}}),Object.keys(i).forEach(v=>{typeof i[v]=="object"&&!Object.keys(i[v]).length&&delete i[v]}),i}function j6(e,t){let n;t===" "?n=e.trim().split(t):n=e.trim().split(t).slice(0,-1),n.forEach(i=>`${i.trim()})`);let r={};return n.length===1?r={t:n[0],r:n[0],b:n[0],l:n[0]}:n.length===2?r={t:n[0],r:n[1],b:n[0],l:n[1]}:n.length===3?r={t:n[0],r:n[1],b:n[2],l:n[1]}:n.length===4&&(r={t:n[0],r:n[1],b:n[2],l:n[3]}),r}function z6(e){if(e==="")return[e];const t=/(?:(\n+.+)|(.+))/g;return e.match(t).map(i=>i.replace(/\n/g,`\r
|
|
20
20
|
`))}function M4(e){const t=document.createElement("DIV"),n=[];t.innerHTML=e;const r=t.querySelectorAll("table col");if(!r.length)return[];for(let i=0;i<r.length;i++){const l=r[i],o=l.getAttribute("span");if(o&&+o>1)for(let c=0;c<+o;c++){const v=Ee(l.getAttribute("width"),72);n.push(v)}else{const c=Ee(l.getAttribute("width"),72);n.push(c)}}return n}function Ee(e,t){if(!e)return t;let n;return e.includes("pt")?n=z1.ptToPx(Number.parseFloat(e)):e.includes("px")?n=Number.parseFloat(e):n=Number.parseFloat(e)*72/96,n}function S4(e){const t=document.createElement("DIV"),n=[];t.innerHTML=e;const r=t.querySelectorAll("table tr");if(!r.length)return[];for(let i=0;i<r.length;i++){const o=r[i].querySelectorAll("td");let c=Ee(o[0].style.height,19);for(let v=0;v<o.length;v++){const m=o[v].getAttribute("rowSpan");if(!(m&&+m>1)){c=Ee(o[v].style.height,19);break}}n.push(c)}return n}function I4(e){let t=[];const n=document.createElement("DIV");if(n.innerHTML=e,t=new Array(n.querySelectorAll("table tr").length),!t.length)return[];let r=0;const i=n.querySelectorAll("table tr");i[0].querySelectorAll("td").forEach(c=>{let v=0;const m=c.getAttribute("colSpan");m!==null?v=+m:v=1,r+=v});for(let c=0;c<t.length;c++)t[c]=new Array(r);let o=0;return i.forEach(c=>{let v=0;c.querySelectorAll("td").forEach(m=>{var y,S;const b={};if(m.querySelectorAll("span").length||m.querySelectorAll("font").length){const T=c3(m);typeof T!="string"&&(b.p=T)}const d=m.innerText;d.trim().length===0?b.v="":b.v=d;const w=He(m);for(h.Tools.isPlainObject(w)&&(b.s=w);v<r&&t[o][v]!=null;)v++;if(v!==r){if(t[o][v]==null){t[o][v]=b;const T=(y=Number(m.getAttribute("rowSpan")))!=null?y:1,D=(S=Number(m.getAttribute("colSpan")))!=null?S:1;if(T>1||D>1){const I={rs:+T-1,cs:+D-1,r:o,c:v};t[o][v].mc=I;for(let V=0;V<T;V++)for(let O=0;O<D;O++)V===0&&O===0||(t[o+V][v+O]={mc:null})}}v++}}),o++}),t}function H4(e){const t=[],n=document.createElement("DIV");n.innerHTML=e;const i=e.replace(/\r/g,"").split(`
|
|
21
21
|
`),l=i[0].split(" ").length;for(let o=0;o<i.length;o++)i[o].split(" ").length<l||t.push(i[o].split(" "));for(let o=0;o<t.length;o++)for(let c=0;c<t[o].length;c++)t[o][c].length?t[o][c]={v:t[o][c]||"",m:t[o][c]||""}:t[o][c]=null;return t}function E4(e,t){e.length,e[0].length;let n=0,r=0;t&&(n=t.startRow,r=t.startColumn);const i=[];for(let l=0;l<e.length;l++)for(let o=0;o<e[l].length;o++)if(e[l][o]&&typeof e[l][o]=="object"&&"mc"in e[l][o])if(e[l][o].mc){const c=e[l][o].mc,v=c.r+n,m=v+c.rs,b=c.c+r,d=b+c.cs;i.push({startRow:v,endRow:m,startColumn:b,endColumn:d}),delete e[l][o].mc}else e[l][o]=null;return{data:e,mergeData:i}}function D4(e){var m;let t=[];const n=document.createElement("html");n.innerHTML=e;const r=(m=n.querySelector("style"))==null?void 0:m.innerText;if(!r)return;const i=O4(r);if(t=new Array(n.querySelectorAll("table tr").length),!t.length)return[];let l=0;const o=n.querySelectorAll("table tr");o[0].querySelectorAll("td").forEach(b=>{let d=0;const w=b.getAttribute("colSpan");w!==null?d=+w:d=1,l+=d});for(let b=0;b<t.length;b++)t[b]=new Array(l);let v=0;return o.forEach(b=>{let d=0;b.querySelectorAll("td").forEach(w=>{var I,V;const y={};if(w.querySelectorAll("span").length||w.querySelectorAll("font").length){const O=c3(w);typeof O!="string"&&(y.p=O)}const S=w.innerText;S.trim().length===0?y.v="":y.v=S;let T="";for(const O in i)w.classList.contains(O)&&(T+=i[O]);const D=He(w,T);for(h.Tools.isPlainObject(D)&&(y.s=D);d<l&&t[v][d]!=null;)d++;if(d!==l){if(t[v][d]==null){t[v][d]=y;const O=(I=Number(w.getAttribute("rowSpan")))!=null?I:1,U=(V=Number(w.getAttribute("colSpan")))!=null?V:1;if(O>1||U>1){const M={rs:+O-1,cs:+U-1,r:v,c:d};t[v][d].mc=M;for(let x=0;x<O;x++)for(let $=0;$<U;$++)x===0&&$===0||(t[v+x][d+$]={mc:null})}}d++}}),v++}),t}function O4(e){const t={},n=e.replaceAll("<!--","").replaceAll("-->","").trim(),r=n==null?void 0:n.replaceAll(" ","").replaceAll(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/preset-docs-core",
|
|
3
|
-
"version": "0.8.2-nightly.
|
|
3
|
+
"version": "0.8.2-nightly.202506241607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
@@ -58,16 +58,16 @@
|
|
|
58
58
|
"rxjs": ">=7.0.0"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@univerjs/design": "0.8.2-nightly.
|
|
62
|
-
"@univerjs/docs": "0.8.2-nightly.
|
|
63
|
-
"@univerjs/docs-ui": "0.8.2-nightly.
|
|
64
|
-
"@univerjs/engine-formula": "0.8.2-nightly.
|
|
65
|
-
"@univerjs/engine-render": "0.8.2-nightly.
|
|
66
|
-
"@univerjs/network": "0.8.2-nightly.
|
|
67
|
-
"@univerjs/ui": "0.8.2-nightly.
|
|
61
|
+
"@univerjs/design": "0.8.2-nightly.202506241607",
|
|
62
|
+
"@univerjs/docs": "0.8.2-nightly.202506241607",
|
|
63
|
+
"@univerjs/docs-ui": "0.8.2-nightly.202506241607",
|
|
64
|
+
"@univerjs/engine-formula": "0.8.2-nightly.202506241607",
|
|
65
|
+
"@univerjs/engine-render": "0.8.2-nightly.202506241607",
|
|
66
|
+
"@univerjs/network": "0.8.2-nightly.202506241607",
|
|
67
|
+
"@univerjs/ui": "0.8.2-nightly.202506241607"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@univerjs/core": "0.8.2-nightly.
|
|
70
|
+
"@univerjs/core": "0.8.2-nightly.202506241607",
|
|
71
71
|
"react": "18.3.1",
|
|
72
72
|
"react-dom": "18.3.1",
|
|
73
73
|
"rxjs": "7.8.2",
|