mirror of
https://github.com/PlayEdu/h5.git
synced 2026-10-25 22:04:36 +08:00
移除xgplayer && 修复pnpm build 和 dev 报错
This commit is contained in:
1 parent
8a3bbd565b
commit
263a3abccb
4 files changed
+8
-27
No files matched your search
+3
-1
@@ -31,4 +31,6 @@ yarn.lock
|
||||
.env
|
||||
|
||||
deploy-test.sh
|
||||
deploy-demo.sh
|
||||
deploy-demo.sh
|
||||
|
||||
pnpm-lock.yaml
|
||||
+5
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"private": true,
|
||||
"name": "playedu-h5-interface",
|
||||
"private": false,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@@ -10,6 +10,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@reduxjs/toolkit": "^1.9.3",
|
||||
"ahooks": "^3.7.10",
|
||||
"antd-mobile": "^5.31.1",
|
||||
"axios": "^1.3.4",
|
||||
"localforage": "^1.10.0",
|
||||
@@ -26,8 +27,8 @@
|
||||
"web-vitals": "^3.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.0.28",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"@types/react": "^18.2.0",
|
||||
"@types/react-dom": "^18.2.0",
|
||||
"@vitejs/plugin-legacy": "^4.1.1",
|
||||
"@vitejs/plugin-react-swc": "^3.0.0",
|
||||
"rollup-plugin-gzip": "^3.1.0",
|
||||
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
window.HlsJsPlayer=function(e){var t={};function r(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(i,a,function(t){return e[t]}.bind(null,a));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=31)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.enableLogs=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=r(5);function n(){}var o={trace:n,debug:n,log:n,warn:n,info:n,error:n},s=o;function l(e,t){return t="["+e+"] > "+t}var u=(0,a.getSelfScope)();function d(e){var t=u.console[e];return t?function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];i[0]&&(i[0]=l(e,i[0])),t.apply(u.console,i)}:n}t.enableLogs=function(e){if(!0===e||"object"===(void 0===e?"undefined":i(e))){!function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];r.forEach((function(t){s[t]=e[t]?e[t].bind(e):d(t)}))}(e,"debug","log","info","warn","error");try{s.log()}catch(e){s=o}}else s=o},t.logger=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"},e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",KEY_SYSTEM_ERROR:"keySystemError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},t.ErrorDetails={KEY_SYSTEM_NO_KEYS:"keySystemNoKeys",KEY_SYSTEM_NO_ACCESS:"keySystemNoAccess",KEY_SYSTEM_NO_SESSION:"keySystemNoSession",KEY_SYSTEM_LICENSE_REQUEST_FAILED:"keySystemLicenseRequestFailed",MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferLine truncated
|
||||
@@ -1,21 +0,0 @@
|
||||
window.Player=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=f(n(10)),i=f(n(3)),o=f(n(30)),l=f(n(6)),s=f(n(4)),u=f(n(31)),c=n(36),d=f(n(37)),p=n(5);function f(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));if(n.config=i.default.deepCopy({width:600,height:337.5,ignores:[],whitelist:[],lang:(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase(),inactive:3e3,volume:.6,controls:!0,controlsList:["nodownload"]},e),n.version=p.version,n.userTimer=null,n.waitTimer=null,n.database=new o.default,n.history=[],n.isProgressMoving=!1,n.root=i.default.findDom(document,"#"+n.config.id),n.controls=i.default.createDom("xg-controls","",{unselectable:"on",onselectstart:"return false"},"xgplayer-controls"),n.config.isShowControl&&(n.controls.style.display="none"),!n.root){var r=n.config.el;if(!r||1!==r.nodeType)return n.emit("error",new s.default({type:"use",errd:{line:45,handle:"Constructor",msg:"container id can't be empty"},vid:n.config.vid})),console.error("container id can't be empty"),!1,g(n,!1);n.root=r}if(i.default.addClass(n.root,"xgplayer xgplayer-"+l.default.device+" xgplayer-nostart "+(n.config.controls?"":"no-controls")),n.root.appendChild(n.controls),n.config.fluid?(n.root.style["max-width"]="100%",n.root.style.width="100%",n.root.style.height="0",n.root.style["padding-top"]=100*n.config.height/n.config.width+"%",n.video.style.position="absolute",n.video.style.top="0",n.video.style.left="0"):(n.config.width&&("number"!=typeof n.config.width?n.root.style.width=n.config.width:n.root.style.width=n.config.width+"px"),n.config.height&&("number"!=typeof n.config.height?n.root.style.height=n.config.height:n.root.style.height=n.config.height+"px")),n.config.execBeforePluginsCall&&n.config.execBeforePluginsCall.forEach(function(e){e.call(n,n)}),n.config.controlStyle&&"String"===i.default.typeOf(n.config.controlStyle)){var a=n;fetch(a.config.controlStyle,{method:"GET",headers:{Accept:"application/json"}}).then(function(e){e.ok&&e.json().then(function(e){for(var t in e)e.hasOwnProperty(t)&&(a.config[t]=e[t]);a.pluginsCall()})}).catch(function(e){console.log("Fetch错误:"+e)})}else n.pluginsCall();n.ev.forEach(function(e){var t=Object.keys(e)[0],r=n[e[t]];r&&n.on(t,r)}),["focus","blur"].forEach(function(e){n.on(e,n["on"+e.charAt(0).toUpperCase()+e.slice(1)])});var u=n;return n.mousemoveFunc=function(){u.emit("focus"),u.config.closeFocusVideoFocus||u.video.focus()},n.root.addEventListener("mousemove",n.mousemoveFunc),n.playFunc=function(){u.emit("focus"),u.config.closePlayVideoFocus||u.video.focus()},u.once("play",n.playFunc),n.getVideoSize=function(){if(this.video.videoWidth&&this.video.videoHeight){var e=u.root.getBoundingClientRect();"auto"===u.config.fitVideoSize?e.width/e.height>this.video.videoWidth/this.video.videoHeight?u.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":u.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px":"fixWidth"===u.config.fitVideoSize?u.root.style.height=this.video.videoHeight/this.video.videoWidth*e.width+"px":"fixHeight"===u.config.fitVideoSize&&(u.root.style.width=this.video.videoWidth/this.video.videoHeight*e.height+"px")}},u.once("loadeddata",n.getVideoSize),setTimeout(function(){n.emit("ready"),n.isReady=!0},0),n.config.keyShortcut&&"on"!==n.config.keyShortcut||["video","controls"].forEach(function(e){u[e].addEventListener("keydown",function(e){u.onKeydown(e,u)})}),n.conLine truncated
|
||||
/*!
|
||||
* Draggabilly v2.2.0
|
||||
* Make that shiz draggable
|
||||
* https://draggabilly.desandro.com
|
||||
* MIT license
|
||||
*/
|
||||
!function(i,o){r=[n(32),n(33)],void 0===(a=function(e,t){return function(e,t,n){function r(e,t){for(var n in t)e[n]=t[n];return e}var a=e.jQuery;function i(e,t){this.element="string"==typeof e?document.querySelector(e):e,a&&(this.$element=a(this.element)),this.options=r({},this.constructor.defaults),this.option(t),this._create()}var o=i.prototype=Object.create(n.prototype);i.defaults={},o.option=function(e){r(this.options,e)};var l={relative:!0,absolute:!0,fixed:!0};function s(e,t,n){return n=n||"round",t?Math[n](e/t)*t:e}o._create=function(){this.position={},this._getPosition(),this.startPoint={x:0,y:0},this.dragPoint={x:0,y:0},this.startPosition=r({},this.position);var e=getComputedStyle(this.element);l[e.position]||(this.element.style.position="relative"),this.on("pointerDown",this.onPointerDown),this.on("pointerMove",this.onPointerMove),this.on("pointerUp",this.onPointerUp),this.enable(),this.setHandles()},o.setHandles=function(){this.handles=this.options.handle?this.element.querySelectorAll(this.options.handle):[this.element],this.bindHandles()},o.dispatchEvent=function(e,t,n){var r=[t].concat(n);this.emitEvent(e,r),this.dispatchJQueryEvent(e,t,n)},o.dispatchJQueryEvent=function(t,n,r){var a=e.jQuery;if(a&&this.$element){var i=a.Event(n);i.type=t,this.$element.trigger(i,r)}},o._getPosition=function(){var e=getComputedStyle(this.element),t=this._getPositionCoord(e.left,"width"),n=this._getPositionCoord(e.top,"height");this.position.x=isNaN(t)?0:t,this.position.y=isNaN(n)?0:n,this._addTransformPosition(e)},o._getPositionCoord=function(e,n){if(-1!=e.indexOf("%")){var r=t(this.element.parentNode);return r?parseFloat(e)/100*r[n]:0}return parseInt(e,10)},o._addTransformPosition=function(e){var t=e.transform;if(0===t.indexOf("matrix")){var n=t.split(","),r=0===t.indexOf("matrix3d")?12:4,a=parseInt(n[r],10),i=parseInt(n[r+1],10);this.position.x+=a,this.position.y+=i}},o.onPointerDown=function(e,t){this.element.classList.add("is-pointer-down"),this.dispatchJQueryEvent("pointerDown",e,[t])},o.dragStart=function(e,t){this.isEnabled&&(this._getPosition(),this.measureContainment(),this.startPosition.x=this.position.x,this.startPosition.y=this.position.y,this.setLeftTop(),this.dragPoint.x=0,this.dragPoint.y=0,this.element.classList.add("is-dragging"),this.dispatchEvent("dragStart",e,[t]),this.animate())},o.measureContainment=function(){var e=this.getContainer();if(e){var n=t(this.element),r=t(e),a=this.element.getBoundingClientRect(),i=e.getBoundingClientRect(),o=r.borderLeftWidth+r.borderRightWidth,l=r.borderTopWidth+r.borderBottomWidth,s=this.relativeStartPosition={x:a.left-(i.left+r.borderLeftWidth),y:a.top-(i.top+r.borderTopWidth)};this.containSize={width:r.width-o-s.x-n.width,height:r.height-l-s.y-n.height}}},o.getContainer=function(){var e=this.options.containment;if(e)return e instanceof HTMLElement?e:"string"==typeof e?document.querySelector(e):this.element.parentNode},o.onPointerMove=function(e,t,n){this.dispatchJQueryEvent("pointerMove",e,[t,n])},o.dragMove=function(e,t,n){if(this.isEnabled){var r=n.x,a=n.y,i=this.options.grid,o=i&&i[0],l=i&&i[1];r=s(r,o),a=s(a,l),r=this.containDrag("x",r,o),a=this.containDrag("y",a,l),r="y"==this.options.axis?0:r,a="x"==this.options.axis?0:a,this.position.x=this.startPosition.x+r,this.position.y=this.startPosition.y+a,this.dragPoint.x=r,this.dragPoint.y=a,this.dispatchEvent("dragMove",e,[t,n])}},o.containDrag=function(e,t,n){if(!this.options.containment)return t;var r="x"==e?"width":"height",a=s(-this.relativeStartPosition[e],n,"ceil"),i=this.containSize[r];return i=s(i,n,"floor"),Math.max(a,Math.min(i,t))},o.onPointerUp=function(e,t){this.element.classList.remove("is-pointer-down"),this.dispatchJQueryEvent("pointerUp",e,[t])},o.dragEnd=function(e,t){this.isEnabled&&(this.element.style.transform="",this.setLeftTop(),this.element.classList.remove("is-dragging"),this.dispatchEvent("dragEnd",e,[t]))},o.animate=function(){if(this.isDragging){this.positionDrag();var e=this;requestAnimationFrame(function(){e.animate()})}},o.setLeftTop=function(){this.element.style.left=this.position.x+"px",this.element.style.top=this.position.y+"px"},o.positionDrag=function(){this.element.style.transform="translate3d( "+this.dragPoint.x+"px, "+this.dragPoint.y+"px, 0)"},o.staticClick=function(e,t){this.dispatchEvent("staticClick",e,[t])},o.setPosition=function(e,t){this.position.x=e,this.position.y=t,this.setLeftTop()},o.enable=function(){this.isEnabled=!0},o.disable=function(){this.isEnabled=!1,this.isDragging&&this.dragEnd()},o.destroy=function(){this.disable(),this.element.style.transform="",this.element.style.left="",this.element.style.top="",this.element.style.position="",this.unbindHandles(),this.$element&&this.$element.removeData("draggabilly")},o._init=function(){},a&&a.bridget&&a.bridget("draggabilly",i);return i}(i,e,t)}.apply(t,r))||(e.exports=a)}(window)},function(e,t,n){"use strict";var r,a,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:Line truncated
|
||||
/*!
|
||||
* Unidragger v2.3.0
|
||||
* Draggable base class
|
||||
* MIT license
|
||||
*/
|
||||
!function(i,o){r=[n(34)],void 0===(a=function(e){return function(e,t){function n(){}var r=n.prototype=Object.create(t.prototype);r.bindHandles=function(){this._bindHandles(!0)},r.unbindHandles=function(){this._bindHandles(!1)},r._bindHandles=function(t){for(var n=(t=void 0===t||t)?"addEventListener":"removeEventListener",r=t?this._touchActionValue:"",a=0;a<this.handles.length;a++){var i=this.handles[a];this._bindStartEvent(i,t),i[n]("click",this),e.PointerEvent&&(i.style.touchAction=r)}},r._touchActionValue="none",r.pointerDown=function(e,t){var n=this.okayPointerDown(e);n&&(this.pointerDownPointer=t,e.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(e),this.emitEvent("pointerDown",[e,t]))};var a={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},i={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};return r.okayPointerDown=function(e){var t=a[e.target.nodeName],n=i[e.target.type],r=!t||n;return r||this._pointerReset(),r},r.pointerDownBlur=function(){var e=document.activeElement;e&&e.blur&&e!=document.body&&e.blur()},r.pointerMove=function(e,t){var n=this._dragPointerMove(e,t);this.emitEvent("pointerMove",[e,t,n]),this._dragMove(e,t,n)},r._dragPointerMove=function(e,t){var n={x:t.pageX-this.pointerDownPointer.pageX,y:t.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(n)&&this._dragStart(e,t),n},r.hasDragStarted=function(e){return Math.abs(e.x)>3||Math.abs(e.y)>3},r.pointerUp=function(e,t){this.emitEvent("pointerUp",[e,t]),this._dragPointerUp(e,t)},r._dragPointerUp=function(e,t){this.isDragging?this._dragEnd(e,t):this._staticClick(e,t)},r._dragStart=function(e,t){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(e,t)},r.dragStart=function(e,t){this.emitEvent("dragStart",[e,t])},r._dragMove=function(e,t,n){this.isDragging&&this.dragMove(e,t,n)},r.dragMove=function(e,t,n){e.preventDefault(),this.emitEvent("dragMove",[e,t,n])},r._dragEnd=function(e,t){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(e,t)},r.dragEnd=function(e,t){this.emitEvent("dragEnd",[e,t])},r.onclick=function(e){this.isPreventingClicks&&e.preventDefault()},r._staticClick=function(e,t){this.isIgnoringMouseUp&&"mouseup"==e.type||(this.staticClick(e,t),"mouseup"!=e.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},r.staticClick=function(e,t){this.emitEvent("staticClick",[e,t])},n.getPointerPoint=t.getPointerPoint,n}(i,e)}.apply(t,r))||(e.exports=a)}(window)},function(e,t,n){"use strict";var r,a;"function"==typeof Symbol&&Symbol.iterator;
|
||||
/*!
|
||||
* Unipointer v2.3.0
|
||||
* base class for doing one thing with pointer event
|
||||
* MIT license
|
||||
*/
|
||||
!function(i,o){r=[n(35)],void 0===(a=function(e){return function(e,t){function n(){}var r=n.prototype=Object.create(t.prototype);r.bindStartEvent=function(e){this._bindStartEvent(e,!0)},r.unbindStartEvent=function(e){this._bindStartEvent(e,!1)},r._bindStartEvent=function(t,n){var r=(n=void 0===n||n)?"addEventListener":"removeEventListener",a="mousedown";e.PointerEvent?a="pointerdown":"ontouchstart"in e&&(a="touchstart"),t[r](a,this)},r.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.getTouch=function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.identifier==this.pointerIdentifier)return n}},r.onmousedown=function(e){var t=e.button;t&&0!==t&&1!==t||this._pointerDown(e,e)},r.ontouchstart=function(e){this._pointerDown(e,e.changedTouches[0])},r.onpointerdown=function(e){this._pointerDown(e,e)},r._pointerDown=function(e,t){e.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==t.pointerId?t.pointerId:t.identifier,this.pointerDown(e,t))},r.pointerDown=function(e,t){this._bindPostStartEvents(e),this.emitEvent("pointerDown",[e,t])};var a={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};return r._bindPostStartEvents=function(t){if(t){var n=a[t.type];n.forEach(function(t){e.addEventListener(t,this)},this),this._boundPointerEvents=n}},r._unbindPostStartEvents=function(){this._boundPointerEvents&&(this._boundPointerEvents.forEach(function(t){e.removeEventListener(t,this)},this),delete this._boundPointerEvents)},r.onmousemove=function(e){this._pointerMove(e,e)},r.onpointermove=function(e){e.pointerId==this.pointerIdentifier&&this._pointerMove(e,e)},r.ontouchmove=function(e){var t=this.getTouch(e.changedTouches);t&&this._pointerMove(e,t)},r._pointerMove=function(e,t){this.pointerMove(e,t)},r.pointerMove=function(e,t){this.emitEvent("pointerMove",[e,t])},r.onmouseup=function(e){this._pointerUp(e,e)},r.onpointerup=function(e){e.pointerId==this.pointerIdentifier&&this._pointerUp(e,e)},r.ontouchend=function(e){var t=this.getTouch(e.changedTouches);t&&this._pointerUp(e,t)},r._pointerUp=function(e,t){this._pointerDone(),this.pointerUp(e,t)},r.pointerUp=function(e,t){this.emitEvent("pointerUp",[e,t])},r._pointerDone=function(){this._pointerReset(),this._unbindPostStartEvents(),this.pointerDone()},r._pointerReset=function(){this.isPointerDown=!1,delete this.pointerIdentifier},r.pointerDone=function(){},r.onpointercancel=function(e){e.pointerId==this.pointerIdentifier&&this._pointerCancel(e,e)},r.ontouchcancel=function(e){var t=this.getTouch(e.changedTouches);t&&this._pointerCancel(e,t)},r._pointerCancel=function(e,t){this._pointerDone(),this.pointerCancel(e,t)},r.pointerCancel=function(e,t){this.emitEvent("pointerCancel",[e,t])},n.getPointerPoint=function(e){return{x:e.pageX,y:e.pageY}},n}(i,e)}.apply(t,r))||(e.exports=a)}(window)},function(e,t,n){"use strict";var r,a;"function"==typeof Symbol&&Symbol.iterator;"undefined"!=typeof window&&window,void 0===(a="function"==typeof(r=function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},r=n[e]=n[e]||[];return-1==r.indexOf(t)&&r.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=n.indexOf(t);return-1!=r&&n.splice(r,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var r=this._onceEvents&&this._onceEvents[e],a=0;a<n.length;a++){var i=n[a];r&&r[i]&&(this.off(e,i),delete r[i]),i.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e})?r.call(t,n,t,e):r)||(e.exports=a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getAbsoluteURL=function(e){if(!e.match(/^https?:\/\//)){var t=document.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e}},function(e,t,n){"use strict";var r,a,i;"function"==typeof Symbol&&Symbol.iterator;a=[],void 0===(i="function"==typeof(r=function(){return function e(t,n,r){var a,i,o=window,l="application/octet-stream",s=r||l,u=t,c=!n&&!r&&u,d=document.createElement("a"),p=function(e){return String(e)},f=o.Blob||o.MozBlob||o.WebKitBlob||p,g=n||"download";if(f=f.call?f.bind(o):Blob,"true"===String(this)&&(s=(u=[u,s])[0],u=u[1]),c&&c.length<2048&&(g=c.split("/").pop().split("?")[0],d.href=c,-1!==d.href.indexOf(c))){var h=new XMLHttpRequest;return h.open("GET",c,!0),h.responseType="blob",h.onload=function(t){e(t.target.response,g,l)},setTimeout(function(){h.send()},0),h}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u)){if(!(u.length>2096103.424&&f!==p))return navigator.msSaveBlob?navigator.msSaveBlob(v(u),g):b(u);u=v(u),s=u.type||l}else if(/([\x80-\xff])/.test(u)){for(var y=0,x=new Uint8Array(u.length),m=x.length;y<m;++y)x[y]=u.charCodeAt(y);u=new f([x],{Line truncated
|
||||
//# sourceMappingURL=index.js.map
|
||||
Reference in new issue
Block a user