芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/reginaeigbe.com/folder/admin/tmp/public/js/frontend/605.js
/*! For license information please see 605.js.LICENSE.txt */ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[605],{79605:(t,e,r)=>{r.r(e),r.d(e,{createSwipeBackGesture:()=>S});var s=r(96587);const i=t=>t&&""!==t.dir?"rtl"===t.dir.toLowerCase():"rtl"===(null===document||void 0===document?void 0:document.dir.toLowerCase());class l{constructor(t,e,r,s,i){this.id=e,this.name=r,this.disableScroll=i,this.priority=1e6*s+e,this.ctrl=t}canStart(){return!!this.ctrl&&this.ctrl.canStart(this.name)}start(){return!!this.ctrl&&this.ctrl.start(this.name,this.id,this.priority)}capture(){if(!this.ctrl)return!1;const t=this.ctrl.capture(this.name,this.id,this.priority);return t&&this.disableScroll&&this.ctrl.disableScroll(this.id),t}release(){this.ctrl&&(this.ctrl.release(this.id),this.disableScroll&&this.ctrl.enableScroll(this.id))}destroy(){this.release(),this.ctrl=void 0}}class n{constructor(t,e,r,s){this.id=e,this.disable=r,this.disableScroll=s,this.ctrl=t}block(){if(this.ctrl){if(this.disable)for(const t of this.disable)this.ctrl.disableGesture(t,this.id);this.disableScroll&&this.ctrl.disableScroll(this.id)}}unblock(){if(this.ctrl){if(this.disable)for(const t of this.disable)this.ctrl.enableGesture(t,this.id);this.disableScroll&&this.ctrl.enableScroll(this.id)}}destroy(){this.unblock(),this.ctrl=void 0}}const a="backdrop-no-scroll",o=new class{constructor(){this.gestureId=0,this.requestedStart=new Map,this.disabledGestures=new Map,this.disabledScroll=new Set}createGesture(t){var e;return new l(this,this.newID(),t.name,null!==(e=t.priority)&&void 0!==e?e:0,!!t.disableScroll)}createBlocker(t={}){return new n(this,this.newID(),t.disable,!!t.disableScroll)}start(t,e,r){return this.canStart(t)?(this.requestedStart.set(e,r),!0):(this.requestedStart.delete(e),!1)}capture(t,e,r){if(!this.start(t,e,r))return!1;const s=this.requestedStart;let i=-1e4;if(s.forEach((t=>{i=Math.max(i,t)})),i===r){this.capturedId=e,s.clear();const r=new CustomEvent("ionGestureCaptured",{detail:{gestureName:t}});return document.dispatchEvent(r),!0}return s.delete(e),!1}release(t){this.requestedStart.delete(t),this.capturedId===t&&(this.capturedId=void 0)}disableGesture(t,e){let r=this.disabledGestures.get(t);void 0===r&&(r=new Set,this.disabledGestures.set(t,r)),r.add(e)}enableGesture(t,e){const r=this.disabledGestures.get(t);void 0!==r&&r.delete(e)}disableScroll(t){this.disabledScroll.add(t),1===this.disabledScroll.size&&document.body.classList.add(a)}enableScroll(t){this.disabledScroll.delete(t),0===this.disabledScroll.size&&document.body.classList.remove(a)}canStart(t){return void 0===this.capturedId&&!this.isDisabled(t)}isCaptured(){return void 0!==this.capturedId}isScrollDisabled(){return this.disabledScroll.size>0}isDisabled(t){const e=this.disabledGestures.get(t);return!!(e&&e.size>0)}newID(){return this.gestureId++,this.gestureId}},c=(t,e,r,s)=>{const i=d(t)?{capture:!!s.capture,passive:!!s.passive}:!!s.capture;let l,n;return t.__zone_symbol__addEventListener?(l="__zone_symbol__addEventListener",n="__zone_symbol__removeEventListener"):(l="addEventListener",n="removeEventListener"),t[l](e,r,i),()=>{t[n](e,r,i)}},d=t=>{if(void 0===u)try{const e=Object.defineProperty({},"passive",{get:()=>{u=!0}});t.addEventListener("optsTest",(()=>{}),e)}catch(t){u=!1}return!!u};let u;const h=t=>t instanceof Document?t:t.ownerDocument,b=t=>{let e=!1,r=!1,s=!0,i=!1;const l=Object.assign({disableScroll:!1,direction:"x",gesturePriority:0,passive:!0,maxAngle:40,threshold:10},t),n=l.canStart,a=l.onWillStart,d=l.onStart,u=l.onEnd,b=l.notCaptured,S=l.onMove,y=l.threshold,f=l.passive,X=l.blurOnStart,g={type:"pan",startX:0,startY:0,startTime:0,currentX:0,currentY:0,velocityX:0,velocityY:0,deltaX:0,deltaY:0,currentTime:0,event:void 0,data:void 0},w=((t,e,r)=>{const s=r*(Math.PI/180),i="x"===t,l=Math.cos(s),n=e*e;let a=0,o=0,c=!1,d=0;return{start(t,e){a=t,o=e,d=0,c=!0},detect(t,e){if(!c)return!1;const r=t-a,s=e-o,u=r*r+s*s;if(u
l?1:b<-l?-1:0,c=!1,!0},isGesture:()=>0!==d,getDirection:()=>d}})(l.direction,l.threshold,l.maxAngle),Y=o.createGesture({name:t.gestureName,priority:t.gesturePriority,disableScroll:t.disableScroll}),G=()=>{e&&(i=!1,S&&S(g))},_=()=>!!Y.capture()&&(e=!0,s=!1,g.startX=g.currentX,g.startY=g.currentY,g.startTime=g.currentTime,a?a(g).then(D):D(),!0),D=()=>{X&&(()=>{if("undefined"!=typeof document){const t=document.activeElement;(null==t?void 0:t.blur)&&t.blur()}})(),d&&d(g),s=!0},E=()=>{e=!1,r=!1,i=!1,s=!0,Y.release()},I=t=>{const r=e,i=s;E(),i&&(v(g,t),r?u&&u(g):b&&b(g))},k=((t,e,r,s,i)=>{let l,n,a,o,d,u,b,v=0;const m=s=>{v=Date.now()+2e3,e(s)&&(!n&&r&&(n=c(t,"touchmove",r,i)),a||(a=c(s.target,"touchend",S,i)),o||(o=c(s.target,"touchcancel",S,i)))},p=s=>{v>Date.now()||e(s)&&(!u&&r&&(u=c(h(t),"mousemove",r,i)),b||(b=c(h(t),"mouseup",y,i)))},S=t=>{f(),s&&s(t)},y=t=>{X(),s&&s(t)},f=()=>{n&&n(),a&&a(),o&&o(),n=a=o=void 0},X=()=>{u&&u(),b&&b(),u=b=void 0},g=()=>{f(),X()},w=(e=!0)=>{e?(l||(l=c(t,"touchstart",m,i)),d||(d=c(t,"mousedown",p,i))):(l&&l(),d&&d(),l=d=void 0,g())};return{enable:w,stop:g,destroy:()=>{w(!1),s=r=e=void 0}}})(l.el,(t=>{const e=p(t);return!(r||!s)&&(m(t,g),g.startX=g.currentX,g.startY=g.currentY,g.startTime=g.currentTime=e,g.velocityX=g.velocityY=g.deltaX=g.deltaY=0,g.event=t,(!n||!1!==n(g))&&(Y.release(),!!Y.start()&&(r=!0,0===y?_():(w.start(g.startX,g.startY),!0))))}),(t=>{e?!i&&s&&(i=!0,v(g,t),requestAnimationFrame(G)):(v(g,t),w.detect(g.currentX,g.currentY)&&(w.isGesture()&&_()||L()))}),I,{capture:!1,passive:f}),L=()=>{E(),k.stop(),b&&b(g)};return{enable(t=!0){t||(e&&I(void 0),E()),k.enable(t)},destroy(){Y.destroy(),k.destroy()}}},v=(t,e)=>{if(!e)return;const r=t.currentX,s=t.currentY,i=t.currentTime;m(e,t);const l=t.currentX,n=t.currentY,a=(t.currentTime=p(e))-i;if(a>0&&a<100){const e=(l-r)/a,i=(n-s)/a;t.velocityX=.7*e+.3*t.velocityX,t.velocityY=.7*i+.3*t.velocityY}t.deltaX=l-t.startX,t.deltaY=n-t.startY,t.event=e},m=(t,e)=>{let r=0,s=0;if(t){const e=t.changedTouches;if(e&&e.length>0){const t=e[0];r=t.clientX,s=t.clientY}else void 0!==t.pageX&&(r=t.pageX,s=t.pageY)}e.currentX=r,e.currentY=s},p=t=>t.timeStamp||Date.now(),S=(t,e,r,l,n)=>{const a=t.ownerDocument.defaultView;let o=i(t);const c=t=>o?-t.deltaX:t.deltaX;return b({el:t,gestureName:"goback-swipe",gesturePriority:40,threshold:10,canStart:r=>(o=i(t),(t=>{const{startX:e}=t;return o?e>=a.innerWidth-50:e<=50})(r)&&e()),onStart:r,onMove:t=>{const e=c(t)/a.innerWidth;l(e)},onEnd:t=>{const e=c(t),r=a.innerWidth,i=e/r,l=(t=>o?-t.velocityX:t.velocityX)(t),d=l>=0&&(l>.2||e>r/2),u=(d?1-i:i)*r;let h=0;if(u>5){const t=u/Math.abs(l);h=Math.min(t,540)}n(d,i<=0?.01:(0,s.m)(0,i,.9999),h)}})}}}]);