@social-mail/social-mail-client 1.2.788 → 1.2.790

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.
@@ -29013,7 +29013,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/sleep", "@web-atoms/core/di
29013
29013
  });
29014
29014
  }
29015
29015
  });
29016
- WebComponents.path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.159`;
29016
+ WebComponents.path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.160`;
29017
29017
  }
29018
29018
  };
29019
29019
  });
@@ -1392,7 +1392,7 @@ html, body {
1392
1392
  & .warning {
1393
1393
  background-color: lightyellow;
1394
1394
  }
1395
- `.installLocal()}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/services/NotificationPopup");System.register(["tslib","../../App","../../Atom","../../core/AtomLoader","../../core/AtomUri","../../core/FormattedError","../../core/FormattedString","../../core/types","../../di/Inject","../../di/RegisterSingleton","../../di/ServiceCollection","../../services/JsonService","../../services/NavigationService","../../view-model/AtomWindowViewModel","../../web/core/AtomUI","../controls/AtomAlertWindow","../controls/AtomNotification","../controls/AtomWindow","../styles/AtomPopupStyle","../styles/AtomStyleSheet","../styles/StyleBuilder","./NotificationPopup","./PopupService"],(function(_export,_context){"use strict";var __awaiter,__decorate,__metadata,__param,App,Atom,AtomLoader,AtomUri,FormattedError,FormattedString,CancelToken,Inject,RegisterSingleton,Scope,ServiceCollection,JsonService,NavigationService,AtomWindowViewModel,AtomUI,AtomAlertWindow,AtomNotification,AtomWindow,AtomPopupStyle,AtomStyleSheet,cssNumberToString,NotificationPopup,PopupService,WindowService;return{setters:[function(_tslib){__awaiter=_tslib.__awaiter;__decorate=_tslib.__decorate;__metadata=_tslib.__metadata;__param=_tslib.__param},function(_App){App=_App.App},function(_Atom){Atom=_Atom.Atom},function(_coreAtomLoader){AtomLoader=_coreAtomLoader.AtomLoader},function(_coreAtomUri){AtomUri=_coreAtomUri.AtomUri},function(_coreFormattedError){FormattedError=_coreFormattedError.default},function(_coreFormattedString){FormattedString=_coreFormattedString.default},function(_coreTypes){CancelToken=_coreTypes.CancelToken},function(_diInject){Inject=_diInject.Inject},function(_diRegisterSingleton){RegisterSingleton=_diRegisterSingleton.RegisterSingleton},function(_diServiceCollection){Scope=_diServiceCollection.Scope;ServiceCollection=_diServiceCollection.ServiceCollection},function(_servicesJsonService){JsonService=_servicesJsonService.JsonService},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_viewModelAtomWindowViewModel){AtomWindowViewModel=_viewModelAtomWindowViewModel.AtomWindowViewModel},function(_webCoreAtomUI){AtomUI=_webCoreAtomUI.AtomUI},function(_controlsAtomAlertWindow){AtomAlertWindow=_controlsAtomAlertWindow.default},function(_controlsAtomNotification){AtomNotification=_controlsAtomNotification.default},function(_controlsAtomWindow){AtomWindow=_controlsAtomWindow.AtomWindow},function(_stylesAtomPopupStyle){AtomPopupStyle=_stylesAtomPopupStyle.AtomPopupStyle},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet},function(_stylesStyleBuilder){cssNumberToString=_stylesStyleBuilder.cssNumberToString},function(_NotificationPopup){NotificationPopup=_NotificationPopup.default},function(_PopupService){PopupService=_PopupService.default}],execute:function(){_export("WindowService",WindowService=class WindowService extends NavigationService{get title(){return window.document.title}set title(v){window.document.title=v}get location(){return new AtomUri(location.href)}set location(v){location.href=v.toString()}constructor(app,jsonService){super(app);this.jsonService=jsonService;this.popups=[];this.hostForElementFunc=[];this.lastPopupID=0;this.screen=app.screen;let st="desktop";if(/mobile|android|ios/i.test(window.navigator.userAgent)){st="mobile";if(/tablet/i.test(window.navigator.userAgent)){st="tablet"}}this.screen.screenType=st;if(window){const update=e=>{this.refreshScreen()};if(st!=="mobile"){window.addEventListener("resize",update);window.addEventListener("scroll",update);document.body.addEventListener("scroll",update);document.body.addEventListener("resize",update)}setTimeout((()=>{update(null)}),1e3)}}registerHostForWindow(f){this.hostForElementFunc.push(f);return{dispose:()=>{this.hostForElementFunc.remove(f)}}}navigate(url){location.href=url}back(){window.history.back()}register(id,type){ServiceCollection.instance.register(type,null,Scope.Transient,id)}confirm(message,title){return PopupService.confirm({message,title})}alert(message,title){if(!(message instanceof FormattedString||typeof message==="string")){if(message instanceof FormattedError){message=message.formattedMessage}else{message=message.message?message.message:message.toString()}}return PopupService.alert({message,title})}refresh(){location.reload()}getHostForElement(){const ce=PopupService.lastTarget;if(!ce){return null}for(const iterator of this.hostForElementFunc){const e=iterator(ce);if(e){return e}}return null}refreshScreen(){const height=this.screen.height=window.innerHeight||document.body.clientHeight;const width=this.screen.width=window.innerWidth||document.body.clientWidth;this.screen.scrollLeft=window.scrollX||document.body.scrollLeft||0;this.screen.scrollTop=window.scrollY||document.body.scrollTop||0;this.screen.orientation=width>height?"landscape":"portrait"}notify(message,title,type,delay){return __awaiter(this,void 0,void 0,(function*(){try{const notification=NotificationPopup({message,type});const cancelToken=new CancelToken(delay!==null&&delay!==void 0?delay:5e3);yield notification.showWindow(notification,{title,cancelToken})}catch(ex){console.error(ex)}}))}openWindow(url,options){return __awaiter(this,void 0,void 0,(function*(){yield Atom.delay(1);const lastTarget=PopupService.lastTarget;const{view:popup,returnPromise,disposables}=yield AtomLoader.loadView(url,this.app,true,(()=>this.app.resolve(AtomWindowViewModel,true)));if(options&&options.onInit){options.onInit(popup)}const cancelToken=options.cancelToken;if(cancelToken){if(cancelToken.cancelled){this.app.callLater((()=>{this.remove(popup,true)}))}cancelToken.registerForCancel((()=>{this.remove(popup,true)}))}const e=popup.element;let isPopup=true;if(popup instanceof AtomWindow){isPopup=false;e.style.opacity="0"}popup.registerDisposable({dispose:()=>{PopupService.lastTarget=lastTarget}});if(isPopup){const root=popup.element;const last=PopupService.lastTarget;const closePopup=et=>{let target=et.target;while(target){if(target===root||target===last){return}target=target.parentElement}this.remove(popup,true)};document.body.addEventListener("click",closePopup);popup.registerDisposable({dispose:()=>{document.body.removeEventListener("click",closePopup)}})}e._logicalParent=lastTarget;e.sourceUrl=url;const pvm=popup.viewModel;if(pvm){let ce=PopupService.lastTarget;if(ce){while(!ce.atomControl){ce=ce.parentElement;if(!ce){break}}if(ce&&ce.atomControl&&ce.atomControl.viewModel){pvm.parent=ce.atomControl.viewModel}}}const theme=this.app.get(AtomStyleSheet).getNamedStyle(AtomPopupStyle);e.style.zIndex=1e4+this.lastPopupID+"";const isNotification=popup instanceof AtomNotification;if(isPopup){const sr=AtomUI.screenOffset(PopupService.lastTarget);const x=sr.x;const y=sr.y;const h=sr.height;e.style.position="absolute";e.style.left=x+"px";e.style.top=y+h+"px";e.classList.add(theme.name);this.popups.push(popup);disposables.add((()=>{this.popups.remove(popup)}));document.body.appendChild(e);if(isNotification){e.style.opacity="0";this.centerElement(popup)}}else{const eHost=(options===null||options===void 0?void 0:options.modal)?null:this.getHostForElement();if(eHost){eHost.appendChild(e)}else{const host=document.createElement("div");document.body.appendChild(host);host.style.position="absolute";host.appendChild(e);disposables.add({dispose(){host.remove()}});this.refreshScreen();popup.bind(host,"styleLeft",[["this","scrollLeft"]],false,cssNumberToString,this.screen);popup.bind(host,"styleTop",[["this","scrollTop"]],false,cssNumberToString,this.screen);popup.bind(host,"styleWidth",[["this","width"]],false,cssNumberToString,this.screen);popup.bind(host,"styleHeight",[["this","height"]],false,cssNumberToString,this.screen)}}popup.bindEvent(document.body,"keyup",(keyboardEvent=>{if(keyboardEvent.key==="Escape"){this.app.runAsync((()=>this.remove(popup)))}}));disposables.add({dispose:()=>{e.innerHTML="";e.remove()}});return yield returnPromise}))}centerElement(c){const e=c.element;const parent=e.parentElement;if(parent===window||parent===document.body){setTimeout((()=>{const ew=(document.body.offsetWidth-e.offsetWidth)/2;const eh=window.scrollY+(window.innerHeight-e.offsetHeight)/2;e.style.left=`${ew}px`;e.style.top=`${eh}px`;e.style.removeProperty("opacity")}),200);return}if(parent.offsetWidth<=0||parent.offsetHeight<=0){setTimeout((()=>{this.centerElement(c)}),100);return}if(e.offsetWidth<=0||e.offsetHeight<=0){setTimeout((()=>{this.centerElement(c)}),100);return}const x=(parent.offsetWidth-e.offsetWidth)/2;const y=(parent.offsetHeight-e.offsetHeight)/2;e.style.left=`${x}px`;e.style.top=`${y}px`;e.style.removeProperty("opacity")}});WindowService.alertWindow=AtomAlertWindow;_export("WindowService",WindowService=__decorate([RegisterSingleton,__param(0,Inject),__param(1,Inject),__metadata("design:paramtypes",[App,JsonService])],WindowService))}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/services/WindowService");System.register(["tslib","../../App","../../core/Colors","../../di/Inject","../../di/RegisterSingleton","../../services/NavigationService","../styles/AtomStyleSheet"],(function(_export,_context){"use strict";var __decorate,__metadata,__param,App,Colors,Inject,RegisterSingleton,NavigationService,AtomStyleSheet,AtomTheme;return{setters:[function(_tslib){__decorate=_tslib.__decorate;__metadata=_tslib.__metadata;__param=_tslib.__param},function(_App){App=_App.App},function(_coreColors){Colors=_coreColors.default},function(_diInject){Inject=_diInject.Inject},function(_diRegisterSingleton){RegisterSingleton=_diRegisterSingleton.RegisterSingleton},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet}],execute:function(){_export("AtomTheme",AtomTheme=class AtomTheme extends AtomStyleSheet{constructor(app,navigationService){super(app,"atom-theme");this.navigationService=navigationService;this.bgColor=Colors.white;this.color=Colors.gray;this.hoverColor=Colors.lightGray;this.activeColor=Colors.lightBlue;this.selectedBgColor=Colors.blue;this.selectedColor=Colors.white;this.padding=5;setTimeout((()=>{window.addEventListener("resize",(()=>{setTimeout((()=>{this.pushUpdate()}),10)}));document.body.addEventListener("resize",(()=>{setTimeout((()=>{this.pushUpdate()}),10)}))}),1e3)}});_export("AtomTheme",AtomTheme=__decorate([RegisterSingleton,__param(0,Inject),__param(1,Inject),__metadata("design:paramtypes",[App,NavigationService])],AtomTheme))}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/styles/AtomTheme");System.register(["../App","../core/AtomOnce","../core/AtomUri","../di/ServiceCollection","../services/BusyIndicatorService","../services/NavigationService","./services/WebBusyIndicatorService","./services/WindowService","./styles/AtomStyleSheet","./styles/AtomTheme"],(function(_export,_context){"use strict";var App,AtomOnce,AtomUri,ServiceCollection,BusyIndicatorService,NavigationService,WebBusyIndicatorService,WindowService,AtomStyleSheet,AtomTheme,WebApp;_export("default",void 0);return{setters:[function(_App){App=_App.App},function(_coreAtomOnce){AtomOnce=_coreAtomOnce.AtomOnce},function(_coreAtomUri){AtomUri=_coreAtomUri.AtomUri},function(_diServiceCollection){ServiceCollection=_diServiceCollection.ServiceCollection},function(_servicesBusyIndicatorService){BusyIndicatorService=_servicesBusyIndicatorService.BusyIndicatorService},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_servicesWebBusyIndicatorService){WebBusyIndicatorService=_servicesWebBusyIndicatorService.WebBusyIndicatorService},function(_servicesWindowService){WindowService=_servicesWindowService.WindowService},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet},function(_stylesAtomTheme){AtomTheme=_stylesAtomTheme.AtomTheme}],execute:function(){_export("default",WebApp=class WebApp extends App{get parentElement(){return document.body}get root(){return this.mRoot}set root(v){const old=this.mRoot;if(old){old.dispose()}this.mRoot=v;if(!v){return}const pe=this.parentElement;const de=Array.from(pe.children);for(const iterator of de){iterator.remove()}pe.appendChild(v.element)}get theme(){return this.get(AtomStyleSheet)}set theme(v){this.put(AtomTheme,v);this.put(AtomStyleSheet,v)}get contextId(){var _a;(_a=this.mContextId)!==null&&_a!==void 0?_a:this.mContextId=parseInt((this.url.hash.contextId||"0").toString(),10);if(!this.mContextId){for(let index=0;index<100;index++){const cid=`contextId${index}`;const cidData=sessionStorage.getItem(`contextId${index}`);if(!cidData){this.mContextId=index;sessionStorage.setItem(cid,cid);this.url.hash.contextId=index;this.syncUrl();break}}}return`contextId_${this.mContextId}`}constructor(){super();this.hashUpdater=new AtomOnce;this.url=new AtomUri(location.href);this.put(NavigationService,this.resolve(WindowService));this.put(WebApp,this);this.put(BusyIndicatorService,this.resolve(WebBusyIndicatorService));ServiceCollection.instance.registerSingleton(AtomStyleSheet,(sp=>sp.resolve(AtomTheme)));window.addEventListener("hashchange",(()=>{this.hashUpdater.run((()=>{this.url=new AtomUri(location.href)}))}));this.initPromise=new Promise(((resolve,reject)=>{this.onReady(resolve)}))}updateDefaultStyle(textContent){if(this.styleElement){if(this.styleElement.textContent===textContent){return}}const ss=document.createElement("style");ss.textContent=textContent;if(this.styleElement){this.styleElement.remove()}document.head.appendChild(ss);this.styleElement=ss}syncUrl(){this.hashUpdater.run((()=>{const currentUrl=new AtomUri(location.href);const sourceHash=this.url.hash;const keyValues=[];let modified=false;for(const key in sourceHash){if(/^\_\$\_/.test(key)){continue}if(sourceHash.hasOwnProperty(key)){const element=sourceHash[key];const cv=currentUrl.hash[key];if(element!==undefined){keyValues.push({key,value:element})}if(cv===element){continue}modified=true}}if(!modified){return}const hash=keyValues.map((s=>`${s.key}=${encodeURIComponent(s.value)}`)).join("&");location.hash=hash}))}invokeReady(){if(document.readyState==="complete"){super.invokeReady();return}document.addEventListener("readystatechange",(e=>{super.invokeReady()}))}});(function(){if(typeof window.CustomEvent==="function"){return false}function CustomEvent(event,params){params=params||{bubbles:false,cancelable:false,detail:null};const evt=document.createEvent("CustomEvent");evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail);return evt}window.CustomEvent=CustomEvent})()}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/WebApp");System.register(["tslib","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/services/FetchBuilder"],(function(_export,_context){"use strict";var __awaiter,sleep,FetchBuilder,CustomElementsProxy,WebComponents,webComponentsInstalled,addAttributes;_export("WebComponents",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter},function(_webAtomsCoreDistCoreSleep){sleep=_webAtomsCoreDistCoreSleep.default},function(_webAtomsCoreDistServicesFetchBuilder){FetchBuilder=_webAtomsCoreDistServicesFetchBuilder.default}],execute:function(){webComponentsInstalled=Symbol("webComponentsInstalled");CustomElementsProxy=class CustomElementsProxy{constructor(elements=[]){this.elements=elements}define(name,factory){this.elements.push({name,factory})}};addAttributes=(target,values)=>{Object.defineProperty(target.prototype,"editableAttributes",{enumerable:true,configurable:true,get(){return values(this)}})};_export("WebComponents",WebComponents=class WebComponents{static run(frame,doc){return __awaiter(this,void 0,void 0,(function*(){if(doc[webComponentsInstalled]){return}doc[webComponentsInstalled]=true;const url=this.path+"/dist/editable.js";frame.sandbox.add("allow-scripts");const text=yield FetchBuilder.get(url).asText();const proxy=new CustomElementsProxy;const win=doc.defaultView;const globals={window:win,document:win.document,Object:win.Object,Promise,console:win.console,Boolean:win.Boolean,String:win.String,Number:win.Number,Math:win.Math,Date:win.Date,Proxy:win.Proxy,Map:win.Map,Array:win.Array,RegExp:win.RegExp,PromiseRejectionEvent:win.PromiseRejectionEvent,setTimeout:(cb,n)=>setTimeout(cb,n),setInterval:(cb,n)=>setInterval(cb,n),clearTimeout:n=>clearTimeout(n),clearInterval:n=>clearInterval(n),Reflect:win.Reflect,requestAnimationFrame:win.requestAnimationFrame,requestIdleCallback:win.requestIdleCallback,Symbol:win.Symbol,HTMLElement:win.HTMLElement,MutationObserver:class extends win.MutationObserver{constructor(a){super(a)}},IntersectionObserver:class extends win.IntersectionObserver{constructor(a){super(a)}},customElements:proxy};win.HTMLElement.prototype.addEventListener=function(type,listener,options){return win.EventTarget.prototype.addEventListener.call(this,type,listener,options)};const keys=Object.keys(globals);const init=`${keys.map((x=>`var ${x} = globalWindow[${JSON.stringify(x)}]`)).join(";\n")}`;const sourceMappingURL=this.path+"/dist/editable.js.map";const script=`\n "use strict";\n ${init};\n Symbol.dispose ||= Symbol("dispose");\n ;${text.replace("//# sourceMappingURL=editable.js.map","//# sourceMappingURL="+sourceMappingURL)}\n `;const fx=new doc.defaultView.Function("globalWindow",script);fx.call(win,globals);addAttributes(win.HTMLElement,(()=>[{name:"title",type:"string",display:"Tool Tip"},{name:"lang",type:"lang",display:"Language"}]));addAttributes(win.HTMLAnchorElement,(()=>[{name:"href",type:"string",display:"Link"},{name:"target",type:"string",suggest:["_blank"],display:"Target"}]));addAttributes(win.HTMLImageElement,(()=>[{name:"src",type:"image",display:"Image"},{name:"alt",type:"string",display:"Alt"}]));addAttributes(win.HTMLVideoElement,(()=>[{name:"src",type:"video",display:"Video"},{name:"poster",type:"image",display:"Poster"},{name:"autoplay",type:"boolean",display:"Auto Play"},{name:"loop",type:"boolean",display:"Loop"},{name:"muted",type:"boolean",display:"Muted"}]));yield sleep(10);for(const{name,factory}of proxy.elements){doc.defaultView.customElements.define(name,factory)}frame.sandbox.remove("allow-scripts")}))}});WebComponents.path=`//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.159`}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/webComponentsPath");System.register(["@web-atoms/core/dist/style/styled","../../../common/TestMode"],(function(_export,_context){"use strict";var styled,AppLocation,channelViewStyle;return{setters:[function(_webAtomsCoreDistStyleStyled){styled=_webAtomsCoreDistStyleStyled.default},function(_commonTestMode){AppLocation=_commonTestMode.AppLocation}],execute:function(){styled.css`
1395
+ `.installLocal()}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/services/NotificationPopup");System.register(["tslib","../../App","../../Atom","../../core/AtomLoader","../../core/AtomUri","../../core/FormattedError","../../core/FormattedString","../../core/types","../../di/Inject","../../di/RegisterSingleton","../../di/ServiceCollection","../../services/JsonService","../../services/NavigationService","../../view-model/AtomWindowViewModel","../../web/core/AtomUI","../controls/AtomAlertWindow","../controls/AtomNotification","../controls/AtomWindow","../styles/AtomPopupStyle","../styles/AtomStyleSheet","../styles/StyleBuilder","./NotificationPopup","./PopupService"],(function(_export,_context){"use strict";var __awaiter,__decorate,__metadata,__param,App,Atom,AtomLoader,AtomUri,FormattedError,FormattedString,CancelToken,Inject,RegisterSingleton,Scope,ServiceCollection,JsonService,NavigationService,AtomWindowViewModel,AtomUI,AtomAlertWindow,AtomNotification,AtomWindow,AtomPopupStyle,AtomStyleSheet,cssNumberToString,NotificationPopup,PopupService,WindowService;return{setters:[function(_tslib){__awaiter=_tslib.__awaiter;__decorate=_tslib.__decorate;__metadata=_tslib.__metadata;__param=_tslib.__param},function(_App){App=_App.App},function(_Atom){Atom=_Atom.Atom},function(_coreAtomLoader){AtomLoader=_coreAtomLoader.AtomLoader},function(_coreAtomUri){AtomUri=_coreAtomUri.AtomUri},function(_coreFormattedError){FormattedError=_coreFormattedError.default},function(_coreFormattedString){FormattedString=_coreFormattedString.default},function(_coreTypes){CancelToken=_coreTypes.CancelToken},function(_diInject){Inject=_diInject.Inject},function(_diRegisterSingleton){RegisterSingleton=_diRegisterSingleton.RegisterSingleton},function(_diServiceCollection){Scope=_diServiceCollection.Scope;ServiceCollection=_diServiceCollection.ServiceCollection},function(_servicesJsonService){JsonService=_servicesJsonService.JsonService},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_viewModelAtomWindowViewModel){AtomWindowViewModel=_viewModelAtomWindowViewModel.AtomWindowViewModel},function(_webCoreAtomUI){AtomUI=_webCoreAtomUI.AtomUI},function(_controlsAtomAlertWindow){AtomAlertWindow=_controlsAtomAlertWindow.default},function(_controlsAtomNotification){AtomNotification=_controlsAtomNotification.default},function(_controlsAtomWindow){AtomWindow=_controlsAtomWindow.AtomWindow},function(_stylesAtomPopupStyle){AtomPopupStyle=_stylesAtomPopupStyle.AtomPopupStyle},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet},function(_stylesStyleBuilder){cssNumberToString=_stylesStyleBuilder.cssNumberToString},function(_NotificationPopup){NotificationPopup=_NotificationPopup.default},function(_PopupService){PopupService=_PopupService.default}],execute:function(){_export("WindowService",WindowService=class WindowService extends NavigationService{get title(){return window.document.title}set title(v){window.document.title=v}get location(){return new AtomUri(location.href)}set location(v){location.href=v.toString()}constructor(app,jsonService){super(app);this.jsonService=jsonService;this.popups=[];this.hostForElementFunc=[];this.lastPopupID=0;this.screen=app.screen;let st="desktop";if(/mobile|android|ios/i.test(window.navigator.userAgent)){st="mobile";if(/tablet/i.test(window.navigator.userAgent)){st="tablet"}}this.screen.screenType=st;if(window){const update=e=>{this.refreshScreen()};if(st!=="mobile"){window.addEventListener("resize",update);window.addEventListener("scroll",update);document.body.addEventListener("scroll",update);document.body.addEventListener("resize",update)}setTimeout((()=>{update(null)}),1e3)}}registerHostForWindow(f){this.hostForElementFunc.push(f);return{dispose:()=>{this.hostForElementFunc.remove(f)}}}navigate(url){location.href=url}back(){window.history.back()}register(id,type){ServiceCollection.instance.register(type,null,Scope.Transient,id)}confirm(message,title){return PopupService.confirm({message,title})}alert(message,title){if(!(message instanceof FormattedString||typeof message==="string")){if(message instanceof FormattedError){message=message.formattedMessage}else{message=message.message?message.message:message.toString()}}return PopupService.alert({message,title})}refresh(){location.reload()}getHostForElement(){const ce=PopupService.lastTarget;if(!ce){return null}for(const iterator of this.hostForElementFunc){const e=iterator(ce);if(e){return e}}return null}refreshScreen(){const height=this.screen.height=window.innerHeight||document.body.clientHeight;const width=this.screen.width=window.innerWidth||document.body.clientWidth;this.screen.scrollLeft=window.scrollX||document.body.scrollLeft||0;this.screen.scrollTop=window.scrollY||document.body.scrollTop||0;this.screen.orientation=width>height?"landscape":"portrait"}notify(message,title,type,delay){return __awaiter(this,void 0,void 0,(function*(){try{const notification=NotificationPopup({message,type});const cancelToken=new CancelToken(delay!==null&&delay!==void 0?delay:5e3);yield notification.showWindow(notification,{title,cancelToken})}catch(ex){console.error(ex)}}))}openWindow(url,options){return __awaiter(this,void 0,void 0,(function*(){yield Atom.delay(1);const lastTarget=PopupService.lastTarget;const{view:popup,returnPromise,disposables}=yield AtomLoader.loadView(url,this.app,true,(()=>this.app.resolve(AtomWindowViewModel,true)));if(options&&options.onInit){options.onInit(popup)}const cancelToken=options.cancelToken;if(cancelToken){if(cancelToken.cancelled){this.app.callLater((()=>{this.remove(popup,true)}))}cancelToken.registerForCancel((()=>{this.remove(popup,true)}))}const e=popup.element;let isPopup=true;if(popup instanceof AtomWindow){isPopup=false;e.style.opacity="0"}popup.registerDisposable({dispose:()=>{PopupService.lastTarget=lastTarget}});if(isPopup){const root=popup.element;const last=PopupService.lastTarget;const closePopup=et=>{let target=et.target;while(target){if(target===root||target===last){return}target=target.parentElement}this.remove(popup,true)};document.body.addEventListener("click",closePopup);popup.registerDisposable({dispose:()=>{document.body.removeEventListener("click",closePopup)}})}e._logicalParent=lastTarget;e.sourceUrl=url;const pvm=popup.viewModel;if(pvm){let ce=PopupService.lastTarget;if(ce){while(!ce.atomControl){ce=ce.parentElement;if(!ce){break}}if(ce&&ce.atomControl&&ce.atomControl.viewModel){pvm.parent=ce.atomControl.viewModel}}}const theme=this.app.get(AtomStyleSheet).getNamedStyle(AtomPopupStyle);e.style.zIndex=1e4+this.lastPopupID+"";const isNotification=popup instanceof AtomNotification;if(isPopup){const sr=AtomUI.screenOffset(PopupService.lastTarget);const x=sr.x;const y=sr.y;const h=sr.height;e.style.position="absolute";e.style.left=x+"px";e.style.top=y+h+"px";e.classList.add(theme.name);this.popups.push(popup);disposables.add((()=>{this.popups.remove(popup)}));document.body.appendChild(e);if(isNotification){e.style.opacity="0";this.centerElement(popup)}}else{const eHost=(options===null||options===void 0?void 0:options.modal)?null:this.getHostForElement();if(eHost){eHost.appendChild(e)}else{const host=document.createElement("div");document.body.appendChild(host);host.style.position="absolute";host.appendChild(e);disposables.add({dispose(){host.remove()}});this.refreshScreen();popup.bind(host,"styleLeft",[["this","scrollLeft"]],false,cssNumberToString,this.screen);popup.bind(host,"styleTop",[["this","scrollTop"]],false,cssNumberToString,this.screen);popup.bind(host,"styleWidth",[["this","width"]],false,cssNumberToString,this.screen);popup.bind(host,"styleHeight",[["this","height"]],false,cssNumberToString,this.screen)}}popup.bindEvent(document.body,"keyup",(keyboardEvent=>{if(keyboardEvent.key==="Escape"){this.app.runAsync((()=>this.remove(popup)))}}));disposables.add({dispose:()=>{e.innerHTML="";e.remove()}});return yield returnPromise}))}centerElement(c){const e=c.element;const parent=e.parentElement;if(parent===window||parent===document.body){setTimeout((()=>{const ew=(document.body.offsetWidth-e.offsetWidth)/2;const eh=window.scrollY+(window.innerHeight-e.offsetHeight)/2;e.style.left=`${ew}px`;e.style.top=`${eh}px`;e.style.removeProperty("opacity")}),200);return}if(parent.offsetWidth<=0||parent.offsetHeight<=0){setTimeout((()=>{this.centerElement(c)}),100);return}if(e.offsetWidth<=0||e.offsetHeight<=0){setTimeout((()=>{this.centerElement(c)}),100);return}const x=(parent.offsetWidth-e.offsetWidth)/2;const y=(parent.offsetHeight-e.offsetHeight)/2;e.style.left=`${x}px`;e.style.top=`${y}px`;e.style.removeProperty("opacity")}});WindowService.alertWindow=AtomAlertWindow;_export("WindowService",WindowService=__decorate([RegisterSingleton,__param(0,Inject),__param(1,Inject),__metadata("design:paramtypes",[App,JsonService])],WindowService))}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/services/WindowService");System.register(["tslib","../../App","../../core/Colors","../../di/Inject","../../di/RegisterSingleton","../../services/NavigationService","../styles/AtomStyleSheet"],(function(_export,_context){"use strict";var __decorate,__metadata,__param,App,Colors,Inject,RegisterSingleton,NavigationService,AtomStyleSheet,AtomTheme;return{setters:[function(_tslib){__decorate=_tslib.__decorate;__metadata=_tslib.__metadata;__param=_tslib.__param},function(_App){App=_App.App},function(_coreColors){Colors=_coreColors.default},function(_diInject){Inject=_diInject.Inject},function(_diRegisterSingleton){RegisterSingleton=_diRegisterSingleton.RegisterSingleton},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet}],execute:function(){_export("AtomTheme",AtomTheme=class AtomTheme extends AtomStyleSheet{constructor(app,navigationService){super(app,"atom-theme");this.navigationService=navigationService;this.bgColor=Colors.white;this.color=Colors.gray;this.hoverColor=Colors.lightGray;this.activeColor=Colors.lightBlue;this.selectedBgColor=Colors.blue;this.selectedColor=Colors.white;this.padding=5;setTimeout((()=>{window.addEventListener("resize",(()=>{setTimeout((()=>{this.pushUpdate()}),10)}));document.body.addEventListener("resize",(()=>{setTimeout((()=>{this.pushUpdate()}),10)}))}),1e3)}});_export("AtomTheme",AtomTheme=__decorate([RegisterSingleton,__param(0,Inject),__param(1,Inject),__metadata("design:paramtypes",[App,NavigationService])],AtomTheme))}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/styles/AtomTheme");System.register(["../App","../core/AtomOnce","../core/AtomUri","../di/ServiceCollection","../services/BusyIndicatorService","../services/NavigationService","./services/WebBusyIndicatorService","./services/WindowService","./styles/AtomStyleSheet","./styles/AtomTheme"],(function(_export,_context){"use strict";var App,AtomOnce,AtomUri,ServiceCollection,BusyIndicatorService,NavigationService,WebBusyIndicatorService,WindowService,AtomStyleSheet,AtomTheme,WebApp;_export("default",void 0);return{setters:[function(_App){App=_App.App},function(_coreAtomOnce){AtomOnce=_coreAtomOnce.AtomOnce},function(_coreAtomUri){AtomUri=_coreAtomUri.AtomUri},function(_diServiceCollection){ServiceCollection=_diServiceCollection.ServiceCollection},function(_servicesBusyIndicatorService){BusyIndicatorService=_servicesBusyIndicatorService.BusyIndicatorService},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_servicesWebBusyIndicatorService){WebBusyIndicatorService=_servicesWebBusyIndicatorService.WebBusyIndicatorService},function(_servicesWindowService){WindowService=_servicesWindowService.WindowService},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet},function(_stylesAtomTheme){AtomTheme=_stylesAtomTheme.AtomTheme}],execute:function(){_export("default",WebApp=class WebApp extends App{get parentElement(){return document.body}get root(){return this.mRoot}set root(v){const old=this.mRoot;if(old){old.dispose()}this.mRoot=v;if(!v){return}const pe=this.parentElement;const de=Array.from(pe.children);for(const iterator of de){iterator.remove()}pe.appendChild(v.element)}get theme(){return this.get(AtomStyleSheet)}set theme(v){this.put(AtomTheme,v);this.put(AtomStyleSheet,v)}get contextId(){var _a;(_a=this.mContextId)!==null&&_a!==void 0?_a:this.mContextId=parseInt((this.url.hash.contextId||"0").toString(),10);if(!this.mContextId){for(let index=0;index<100;index++){const cid=`contextId${index}`;const cidData=sessionStorage.getItem(`contextId${index}`);if(!cidData){this.mContextId=index;sessionStorage.setItem(cid,cid);this.url.hash.contextId=index;this.syncUrl();break}}}return`contextId_${this.mContextId}`}constructor(){super();this.hashUpdater=new AtomOnce;this.url=new AtomUri(location.href);this.put(NavigationService,this.resolve(WindowService));this.put(WebApp,this);this.put(BusyIndicatorService,this.resolve(WebBusyIndicatorService));ServiceCollection.instance.registerSingleton(AtomStyleSheet,(sp=>sp.resolve(AtomTheme)));window.addEventListener("hashchange",(()=>{this.hashUpdater.run((()=>{this.url=new AtomUri(location.href)}))}));this.initPromise=new Promise(((resolve,reject)=>{this.onReady(resolve)}))}updateDefaultStyle(textContent){if(this.styleElement){if(this.styleElement.textContent===textContent){return}}const ss=document.createElement("style");ss.textContent=textContent;if(this.styleElement){this.styleElement.remove()}document.head.appendChild(ss);this.styleElement=ss}syncUrl(){this.hashUpdater.run((()=>{const currentUrl=new AtomUri(location.href);const sourceHash=this.url.hash;const keyValues=[];let modified=false;for(const key in sourceHash){if(/^\_\$\_/.test(key)){continue}if(sourceHash.hasOwnProperty(key)){const element=sourceHash[key];const cv=currentUrl.hash[key];if(element!==undefined){keyValues.push({key,value:element})}if(cv===element){continue}modified=true}}if(!modified){return}const hash=keyValues.map((s=>`${s.key}=${encodeURIComponent(s.value)}`)).join("&");location.hash=hash}))}invokeReady(){if(document.readyState==="complete"){super.invokeReady();return}document.addEventListener("readystatechange",(e=>{super.invokeReady()}))}});(function(){if(typeof window.CustomEvent==="function"){return false}function CustomEvent(event,params){params=params||{bubbles:false,cancelable:false,detail:null};const evt=document.createEvent("CustomEvent");evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail);return evt}window.CustomEvent=CustomEvent})()}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/WebApp");System.register(["tslib","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/services/FetchBuilder"],(function(_export,_context){"use strict";var __awaiter,sleep,FetchBuilder,CustomElementsProxy,WebComponents,webComponentsInstalled,addAttributes;_export("WebComponents",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter},function(_webAtomsCoreDistCoreSleep){sleep=_webAtomsCoreDistCoreSleep.default},function(_webAtomsCoreDistServicesFetchBuilder){FetchBuilder=_webAtomsCoreDistServicesFetchBuilder.default}],execute:function(){webComponentsInstalled=Symbol("webComponentsInstalled");CustomElementsProxy=class CustomElementsProxy{constructor(elements=[]){this.elements=elements}define(name,factory){this.elements.push({name,factory})}};addAttributes=(target,values)=>{Object.defineProperty(target.prototype,"editableAttributes",{enumerable:true,configurable:true,get(){return values(this)}})};_export("WebComponents",WebComponents=class WebComponents{static run(frame,doc){return __awaiter(this,void 0,void 0,(function*(){if(doc[webComponentsInstalled]){return}doc[webComponentsInstalled]=true;const url=this.path+"/dist/editable.js";frame.sandbox.add("allow-scripts");const text=yield FetchBuilder.get(url).asText();const proxy=new CustomElementsProxy;const win=doc.defaultView;const globals={window:win,document:win.document,Object:win.Object,Promise,console:win.console,Boolean:win.Boolean,String:win.String,Number:win.Number,Math:win.Math,Date:win.Date,Proxy:win.Proxy,Map:win.Map,Array:win.Array,RegExp:win.RegExp,PromiseRejectionEvent:win.PromiseRejectionEvent,setTimeout:(cb,n)=>setTimeout(cb,n),setInterval:(cb,n)=>setInterval(cb,n),clearTimeout:n=>clearTimeout(n),clearInterval:n=>clearInterval(n),Reflect:win.Reflect,requestAnimationFrame:win.requestAnimationFrame,requestIdleCallback:win.requestIdleCallback,Symbol:win.Symbol,HTMLElement:win.HTMLElement,MutationObserver:class extends win.MutationObserver{constructor(a){super(a)}},IntersectionObserver:class extends win.IntersectionObserver{constructor(a){super(a)}},customElements:proxy};win.HTMLElement.prototype.addEventListener=function(type,listener,options){return win.EventTarget.prototype.addEventListener.call(this,type,listener,options)};const keys=Object.keys(globals);const init=`${keys.map((x=>`var ${x} = globalWindow[${JSON.stringify(x)}]`)).join(";\n")}`;const sourceMappingURL=this.path+"/dist/editable.js.map";const script=`\n "use strict";\n ${init};\n Symbol.dispose ||= Symbol("dispose");\n ;${text.replace("//# sourceMappingURL=editable.js.map","//# sourceMappingURL="+sourceMappingURL)}\n `;const fx=new doc.defaultView.Function("globalWindow",script);fx.call(win,globals);addAttributes(win.HTMLElement,(()=>[{name:"title",type:"string",display:"Tool Tip"},{name:"lang",type:"lang",display:"Language"}]));addAttributes(win.HTMLAnchorElement,(()=>[{name:"href",type:"string",display:"Link"},{name:"target",type:"string",suggest:["_blank"],display:"Target"}]));addAttributes(win.HTMLImageElement,(()=>[{name:"src",type:"image",display:"Image"},{name:"alt",type:"string",display:"Alt"}]));addAttributes(win.HTMLVideoElement,(()=>[{name:"src",type:"video",display:"Video"},{name:"poster",type:"image",display:"Poster"},{name:"autoplay",type:"boolean",display:"Auto Play"},{name:"loop",type:"boolean",display:"Loop"},{name:"muted",type:"boolean",display:"Muted"}]));yield sleep(10);for(const{name,factory}of proxy.elements){doc.defaultView.customElements.define(name,factory)}frame.sandbox.remove("allow-scripts")}))}});WebComponents.path=`//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.160`}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/webComponentsPath");System.register(["@web-atoms/core/dist/style/styled","../../../common/TestMode"],(function(_export,_context){"use strict";var styled,AppLocation,channelViewStyle;return{setters:[function(_webAtomsCoreDistStyleStyled){styled=_webAtomsCoreDistStyleStyled.default},function(_commonTestMode){AppLocation=_commonTestMode.AppLocation}],execute:function(){styled.css`
1396
1396
 
1397
1397
  box-sizing: border-box;
1398
1398
 
@@ -135,7 +135,7 @@ System.register(["tslib", "../../../style/GlobalStyle", "@web-atoms/core/dist/co
135
135
  for (const file of slice) {
136
136
  this.slice.add(file);
137
137
  tasks.push((() => __awaiter(this, void 0, void 0, function* () {
138
- const blob = yield FetchBuilder.get(file.downloadUrl).asBlob();
138
+ const blob = yield FetchBuilder.get(file.url).asBlob();
139
139
  zipFolder.file(file.name, blob);
140
140
  this.slice.remove(file);
141
141
  }))());
@@ -1 +1 @@
1
- {"version":3,"names":["XNode","_webAtomsCoreDistCoreXNode","default","_webAtomsCoreDistStyleStyled","styled","_webAtomsCoreDistWebControlsAtomControl","AtomControl","_modelModel","AppFile","_webAtomsCoreDistPack","Pack","_webAtomsCoreDistCoreInjectProperty","InjectProperty","_servicesEntityService","EntityService","_commonSql","Sql","_webAtomsCoreDistServicesFetchBuilder","FetchBuilder","_webAtomsWebControlsDistBasicAtomRepeater","AtomRepeater","_commonNumberFormats","toKMBString","_webAtomsCoreDistCoreTypes","UMD","execute","css","installGlobal","fileInfo","window","url","URL","location","href","searchParams","forEach","v","k","DownloadZip","constructor","app","e","files","map","Map","slice","element","setAttribute","pushInit","init","renderer","create","JSZip","import","zipFile","loadingFiles","parentID","parent","get","_a","children","push","zipFolder","folder","root","name","items","itemRenderer","x","text","fileSize","downloadFiles","generateAsync","type","file","File","createObjectURL","download","folders","isFolder","splice","tasks","add","__awaiter","blob","downloadUrl","asBlob","remove","Promise","all","length","child","path","start","entityService","query","where","p","like","appFileID","isDeleted","orderBy","toPagedList","size","set","console","warn","__decorate","_export"],"sources":["../../../../src/public/preview/zip/DownloadZip.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;MAEOA,KAAK,GAAAC,0BAAA,CAAAC,OAAA;IAAA,aAAAC,4BAAA;MACLC,MAAM,GAAAD,4BAAA,CAAAD,OAAA;IAAA,aAAAG,uCAAA;MAMJC,WAAW,GAAAD,uCAAA,CAAXC,WAAW;IAAA,aAAAC,WAAA;MAIXC,OAAO,GAAAD,WAAA,CAAPC,OAAO;IAAA,aAAAC,qBAAA;MACTC,IAAI,GAAAD,qBAAA,CAAAP,OAAA;IAA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I,CAACtD,GAAG,CAACe,GAAG,CAACjB,CAAC,CAACe,QAAQ,CAAC;gBAClC,IAAI,CAACyC,CAAC,EAAE;kBACJQ,OAAO,CAACC,IAAI,CAAC,uBAAuBjE,CAAC,CAACwB,IAAI,OAAOxB,CAAC,CAACmD,IAAI,EAAE,CAAC;kBAC1D;;gBAEJ,EAAAjC,EAAA,GAACsC,CAAC,CAACrC,QAAQ,cAAAD,EAAA,cAAAA,EAAA,GAAVsC,CAAC,CAACrC,QAAQ,GAAK,EAAE,EAAEC,IAAI,CAACpB,CAAC,CAAC;;;;;OAM1C;MA1KGkE,UAAA,EAAC/F,cAAc,E,0BACAE,aAAa,E,iDAAC;MAHZwB,WAAW,GAAAqE,UAAA,EAD/BjG,IAAI,E,oDACgB4B,WAAW,CA4K/B;MAAAsE,OAAA,YA5KoBtE,WAAW;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["XNode","_webAtomsCoreDistCoreXNode","default","_webAtomsCoreDistStyleStyled","styled","_webAtomsCoreDistWebControlsAtomControl","AtomControl","_modelModel","AppFile","_webAtomsCoreDistPack","Pack","_webAtomsCoreDistCoreInjectProperty","InjectProperty","_servicesEntityService","EntityService","_commonSql","Sql","_webAtomsCoreDistServicesFetchBuilder","FetchBuilder","_webAtomsWebControlsDistBasicAtomRepeater","AtomRepeater","_commonNumberFormats","toKMBString","_webAtomsCoreDistCoreTypes","UMD","execute","css","installGlobal","fileInfo","window","url","URL","location","href","searchParams","forEach","v","k","DownloadZip","constructor","app","e","files","map","Map","slice","element","setAttribute","pushInit","init","renderer","create","JSZip","import","zipFile","loadingFiles","parentID","parent","get","_a","children","push","zipFolder","folder","root","name","items","itemRenderer","x","text","fileSize","downloadFiles","generateAsync","type","file","File","createObjectURL","download","folders","isFolder","splice","tasks","add","__awaiter","blob","asBlob","remove","Promise","all","length","child","path","start","entityService","query","where","p","like","appFileID","isDeleted","orderBy","toPagedList","size","set","console","warn","__decorate","_export"],"sources":["../../../../src/public/pre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,CAACa,IAAI,CAAC;gBACd,IAAI,CAAC,IAAI,CAACV,IAAI,IAAIU,IAAI,CAACwB,SAAS,KAAKtE,QAAQ,CAACsE,SAAS,EAAE;kBACrD,IAAI,CAAClC,IAAI,GAAGU,IAAI;;gBAEpBkB,KAAK,GAAGlB,IAAI,CAACwB,SAAS;;aAE7B,QAAQ,IAAI;YAGb,KAAI,MAAMzD,CAAC,IAAI+C,GAAG,EAAE;cAChB,IAAI/C,CAAC,CAACe,QAAQ,EAAE;gBACZ,MAAMwC,CAAC,GAAG,IAAI,CAACrD,GAAG,CAACe,GAAG,CAACjB,CAAC,CAACe,QAAQ,CAAC;gBAClC,IAAI,CAACwC,CAAC,EAAE;kBACJQ,OAAO,CAACC,IAAI,CAAC,uBAAuBhE,CAAC,CAACwB,IAAI,OAAOxB,CAAC,CAACkD,IAAI,EAAE,CAAC;kBAC1D;;gBAEJ,EAAAhC,EAAA,GAACqC,CAAC,CAACpC,QAAQ,cAAAD,EAAA,cAAAA,EAAA,GAAVqC,CAAC,CAACpC,QAAQ,GAAK,EAAE,EAAEC,IAAI,CAACpB,CAAC,CAAC;;;;;OAM1C;MA1KGiE,UAAA,EAAC9F,cAAc,E,0BACAE,aAAa,E,iDAAC;MAHZwB,WAAW,GAAAoE,UAAA,EAD/BhG,IAAI,E,oDACgB4B,WAAW,CA4K/B;MAAAqE,OAAA,YA5KoBrE,WAAW;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -21274,7 +21274,7 @@ System.register(["tslib", "../../../style/GlobalStyle", "@web-atoms/core/dist/co
21274
21274
  for (const file of slice) {
21275
21275
  this.slice.add(file);
21276
21276
  tasks.push((() => __awaiter(this, void 0, void 0, function* () {
21277
- const blob = yield FetchBuilder.get(file.downloadUrl).asBlob();
21277
+ const blob = yield FetchBuilder.get(file.url).asBlob();
21278
21278
  zipFolder.file(file.name, blob);
21279
21279
  this.slice.remove(file);
21280
21280
  }))());