cty-mui-core 1.0.21 → 1.0.22
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/components/cty-camera-photo.js +4 -2
- package/components/cty-share-sheet.js +3 -2
- package/components/cty-video.js +3 -2
- package/components/status-bar.js +14 -0
- package/dist/cjs/cty-camera-photo.cjs.entry.js +2 -2
- package/dist/cjs/cty-media-capture.cjs.entry.js +1 -1
- package/dist/cjs/cty-mui.cjs.js +1 -1
- package/dist/cjs/cty-share-sheet.cjs.entry.js +2 -2
- package/dist/cjs/cty-video.cjs.entry.js +4 -3
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{status-bar-BJrl_sQk.js → status-bar-BEYjerhw.js} +14 -0
- package/dist/collection/components/camera-photo/camera-photo.css +2 -0
- package/dist/collection/components/camera-photo/camera-photo.js +4 -2
- package/dist/collection/components/share-sheet/share-sheet.css +4 -0
- package/dist/collection/components/share-sheet/share-sheet.js +3 -2
- package/dist/collection/components/video/video.js +3 -2
- package/dist/collection/utils/date.js +14 -0
- package/dist/cty-mui/cty-mui.esm.js +1 -1
- package/dist/cty-mui/index.esm.js +1 -1
- package/dist/cty-mui/p-061ea659.system.entry.js +1 -0
- package/dist/cty-mui/{p-fd2da714.entry.js → p-3bbb54df.entry.js} +1 -1
- package/dist/cty-mui/{p-9997121c.system.entry.js → p-3e7d39b3.system.entry.js} +1 -1
- package/dist/cty-mui/p-4c1ed416.system.entry.js +1 -0
- package/dist/cty-mui/p-7b5349e9.entry.js +1 -0
- package/dist/cty-mui/{p-vRZWRoQ8.js → p-BDuVecoa.js} +1 -1
- package/dist/cty-mui/{p-CWfyjvMz.system.js → p-C6ID7w1G.system.js} +1 -1
- package/dist/cty-mui/{p-BLI96Ug8.system.js → p-CX64wjp2.system.js} +1 -1
- package/dist/cty-mui/p-Cegbc1c7.system.js +1 -1
- package/dist/cty-mui/{p-78fcf340.entry.js → p-d8e7bff7.entry.js} +1 -1
- package/dist/cty-mui/{p-a78aa31c.entry.js → p-e26e053d.entry.js} +1 -1
- package/dist/cty-mui/{p-bb83aa1b.system.entry.js → p-e29c7c8d.system.entry.js} +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/cty-camera-photo.entry.js +2 -2
- package/dist/esm/cty-media-capture.entry.js +1 -1
- package/dist/esm/cty-mui.js +1 -1
- package/dist/esm/cty-share-sheet.entry.js +2 -2
- package/dist/esm/cty-video.entry.js +4 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{status-bar-DhaoWhCJ.js → status-bar-DOl3d3um.js} +14 -0
- package/dist/esm-es5/cty-camera-photo.entry.js +1 -1
- package/dist/esm-es5/cty-media-capture.entry.js +1 -1
- package/dist/esm-es5/cty-mui.js +1 -1
- package/dist/esm-es5/cty-share-sheet.entry.js +1 -1
- package/dist/esm-es5/cty-video.entry.js +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{status-bar-DhaoWhCJ.js → status-bar-DOl3d3um.js} +1 -1
- package/dist/types/components/camera-photo/camera-photo.d.ts +2 -2
- package/dist/types/components/share-sheet/share-sheet.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cty-mui/p-3e33b40b.system.entry.js +0 -1
- package/dist/cty-mui/p-6fc16b0f.entry.js +0 -1
- package/dist/cty-mui/p-8a8f89d4.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,i,o){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,a){function n(t){try{c(o.next(t))}catch(t){a(t)}}function s(t){try{c(o["throw"](t))}catch(t){a(t)}}function c(t){t.done?i(t.value):r(t.value).then(n,s)}c((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,r,a,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(t){return function(e){return c([t,e])}}function c(s){if(o)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(i=0)),i)try{if(o=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(s[0]===6&&i.label<a[1]){i.label=a[1];a=s;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(s);break}if(a[2])i.ops.pop();i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t];r=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-BpC3ubr-.system.js","./p-BqniUMS5.system.js","./p-CWfyjvMz.system.js","./p-ChvDscoj.system.js","./p-B6ewx4qT.system.js","./p-DSgG8qVn.system.js","./p-DvPCY95C.system.js","./p-DA6jN8Vz.system.js","./p-NPOR6IxC.system.js","./p-D36DysLX.system.js"],(function(t){"use strict";var e,i,o,r,a,n,s,c,d,l,h,f,v,u,y,p,g,b,_,m,x,w;return{setters:[function(t){e=t.r;i=t.c;o=t.h;r=t.a;a=t.g},function(t){n=t.g;s=t.b;c=t.a},function(t){d=t.s;l=t.r},function(t){h=t.s;f=t.v},function(t){v=t.n},function(t){u=t.d},function(t){y=t.c},function(t){p=t.v;g=t.a;b=t.b;_=t.c;m=t.d;x=t.e},function(t){w=t.i},null],execute:function(){var k='*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}.flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.cty-ellipsis[class]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:normal}.cty-ellipsis2[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;word-break:break-all;word-wrap:break-word}.cty-ellipsis3[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;word-break:break-all;word-wrap:break-word}.cty-ellipsis4[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;word-break:break-all;word-wrap:break-word}ion-button{--background-activated:transparent;--background-focused:transparent;--background-hover:transparent;--box-shadow:none}ion-grid{padding:0}ion-row{padding:0}ion-col{padding:0}ion-item{--padding-bottom:0;--padding-end:0;--padding-start:0;--padding-top:0;--inner-padding-top:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-bottom:0;--inner-border-width:0;--border-width:0;--min-height:0;--background:none;overflow:initial}ion-toast{--width:84%;--height:36px;--color:var(--cty-color-white);--background:rgba(0, 0, 0, 0.7);--border-radius:100px;line-height:1.2;font-size:var(--cty-font-size-base);text-align:center}.plt-hybrid .safe-area-bottom-border{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid var(--cty-color-white)}.plt-hybrid .safe-area-bottom-border-color{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid currentColor}.plt-hybrid .safe-area-bottom-padding{padding-bottom:var(--ion-safe-area-bottom, 0)}:host{--cty-video-width:100vw;--cty-video-height:100vh;--cty-video-half-width:calc(var(--cty-video-width) / 2);--cty-video-fit:fill;--cty-video-header-height:50px;--cty-video-header-background:var(--cty-overlay-color-lighter);--cty-video-header-unfullscreen-background:transparent;--cty-video-header-unfullscreen-height:30px;--cty-video-header-padding-top:0px;--cty-video-header-padding-bottom:0px;--cty-video-header-padding-start:0px;--cty-video-header-padding-end:0px;--cty-video-header-back-display:flex;--cty-video-header-back-background:transparent;--cty-video-header-back-height:36px;--cty-video-header-back-width:36px;--cty-video-header-back-radius:var(--cty-border-radius-circle);--cty-video-header-back-offset-start:2px;--cty-video-header-back-offset-end:0px;--cty-video-header-back-size:25px;--cty-video-header-back-color:var(--cty-color-white);--cty-video-header-title-size:var(--cty-font-size-medium);--cty-video-header-title-color:var(--cty-color-white);--cty-video-header-title-display:flex;--cty-video-footer-height:50px;--cty-video-footer-background:var(--cty-overlay-color-lighter);--cty-video-footer-unfullscreen-background:transparent;--cty-video-footer-unfullscreen-height:35px;--cty-video-footer-progress-height:0px;--cty-video-footer-padding-start:0px;--cty-video-footer-padding-end:0px;--cty-video-footer-progress-size:var(--cty-font-size-medium);--cty-video-footer-icon-size:24px;--cty-video-footer-fullscreen-icon-size:20px;--cty-video-play-size:80px;--cty-video-play-border:5px solid rgb(238 238 238 / 80%);--cty-video-play-icon-size:40px;--cty-video-unfullscreen-play-size:40px;--cty-video-unfullscreen-play-border:4px solid rgb(238 238 238 / 80%);--cty-video-unfullscreen-play-icon-size:26px;--cty-video-range-bar-height:2px;--cty-video-bar-size:12px;--cty-video-bar-color:var(--cty-color-white);--cty-video-range-knob-background:var(--cty-color-white);--cty-video-range-background:rgb(255 255 255 / 50%);--cty-video-range-background-active:var(--cty-color-primary);--cty-video-loading-background-color:rgb(0 0 0 / 90%);--cty-video-loading-img-width:100px;--cty-video-half-screen-height:56vw;--cty-video-dot-size:7px;--cty-video-dot-padding:9px;--cty-video-dot-active-color:var(--cty-color-primary);--cty-video-progress-vertical-padding:0 15px;--cty-video-progress-horizongtal-padding:0px;--cty-video-rate-active-color:var(--cty-color-primary);--cty-video-toast-width:calc(var(--cty-video-width) * 0.4);--cty-video-toast-height:40px;--cty-video-opn-toast-icon-size:20px;position:relative;display:block;width:var(--cty-video-width);height:var(--cty-video-height);background:var(--cty-color-black)}ion-row{height:100%}ion-col{overflow:hidden}ion-button{min-height:auto;margin:0}.cty-video__wrapper{position:relative;width:100%;height:100%}.cty-video__player{position:absolute;top:0;left:0;display:none;width:var(--cty-video-height);height:var(--cty-video-width);margin:0;-o-object-fit:var(--cty-video-fit);object-fit:var(--cty-video-fit);-webkit-transform:rotate(90deg) translate(0, -100%);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__controls{position:absolute;top:0;left:0;width:100%;height:100%}.cty-video__header{position:absolute;top:0;left:0;z-index:6;-webkit-box-sizing:content-box;box-sizing:content-box;width:calc(var(--cty-video-height) - var(--cty-video-header-padding-start) - var(--cty-video-header-padding-end));height:var(--cty-video-header-height);padding:var(--cty-video-header-padding-top) var(--cty-video-header-padding-end) var(--cty-video-header-padding-bottom) var(--cty-video-header-padding-start);background:var(--cty-video-header-background);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__header-back{display:var(--cty-video-header-back-display);-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__header-back ion-button{width:var(--cty-video-header-back-width);height:var(--cty-video-header-back-height);margin-right:var(--cty-video-header-back-offset-end);margin-left:var(--cty-video-header-back-offset-start);border-radius:var(--cty-video-header-back-radius);--background:var(--cty-video-header-back-background);--padding-start:5px;--padding-end:5px;--padding-top:0;--padding-bottom:0}.cty-video__header-back cty-icon{font-size:var(--cty-video-header-back-size);color:var(--cty-video-header-back-color)}.cty-video__title[class]{display:var(--cty-video-header-title-display);font-size:var(--cty-video-header-title-size);line-height:var(--cty-video-header-height);color:var(--cty-video-header-title-color)}.cty-video__footer{position:absolute;top:0;left:0;z-index:6;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--cty-video-height);height:var(--cty-video-footer-height);padding-right:var(--cty-video-footer-padding-end);padding-left:var(--cty-video-footer-padding-start);background:var(--cty-video-footer-background);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:calc(var(--cty-video-footer-height) / 2) calc(var(--cty-video-footer-height) / 2);transform-origin:calc(var(--cty-video-footer-height) / 2) calc(var(--cty-video-footer-height) / 2)}.cty-video__footer ion-button{height:100%;--background:transparent;--padding-start:12px;--padding-end:12px;--padding-top:0;--padding-bottom:0;--color:var(--cty-color-white)}.cty-video__footer ion-row{height:calc(var(--cty-video-footer-height) - var(--cty-video-footer-progress-height))}.cty-video__footer .cty-video__footer-progress__top{height:var(--cty-video-footer-progress-height);-webkit-transform:translateY(calc(var(--cty-video-footer-progress-height) / 2));transform:translateY(calc(var(--cty-video-footer-progress-height) / 2))}.cty-video__footer-controls{background:transparent}.cty-video__footer-controls ion-col:not(.cty-video__footer-progress){opacity:0}.cty-video__footer-controls .cty-video__time{opacity:0}.cty-video__footer-toggle-play{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-toggle-play cty-icon{font-size:var(--cty-video-footer-icon-size)}.cty-video__footer-flex{-ms-flex:1;flex:1}.cty-video__footer-time-label{margin-left:8px;font-size:var(--cty-video-footer-progress-size);color:var(--cty-color-white);letter-spacing:0.2px}.cty-video__footer-time-label span{margin:0 1px;-webkit-transform:translateY(-1px);transform:translateY(-1px)}.cty-video__footer-progress{-ms-flex:1;flex:1;overflow:auto}.cty-video__time{font-size:var(--cty-video-footer-progress-size);color:var(--cty-color-white)}.cty-video__time:nth-child(1){margin-right:12px}.cty-video__time:nth-child(2),.cty-video__time:last-child{margin-left:12px}.cty-video__footer-range{--height:100%;--knob-size:var(--cty-video-bar-size);--bar-height:var(--cty-video-range-bar-height);padding:0;font-size:var(--cty-font-size-medium);color:var(--cty-video-bar-color);opacity:1;--knob-background:var(--cty-video-range-knob-background);--bar-background:var(--cty-video-range-background);--bar-background-active:var(--cty-video-range-background-active)}.cty-video__footer-bar{position:relative;-ms-flex:1;flex:1;height:80%;cursor:pointer}.cty-video__footer-progress__top{position:relative;z-index:2;padding:var(--cty-video-progress-horizongtal-padding)}.cty-video__footer-progress__top .cty-video__footer-bar{height:100%}.cty-video__footer-dot{position:absolute;top:50%;padding:var(--cty-video-dot-padding);-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cty-video__footer-dot::after{display:block;width:var(--cty-video-dot-size);height:var(--cty-video-dot-size);content:"";background:var(--cty-video-dot-active-color);border-radius:var(--cty-border-radius-circle)}.cty-video__footer-rate{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-rate ion-button{--padding-start:5px;--padding-end:5px;--padding-top:4px;--padding-bottom:4px;width:36px;height:auto;margin-left:12px;font-size:var(--cty-font-size-extra-small);font-weight:bold;white-space:nowrap;border:1px solid var(--cty-color-white);border-radius:var(--cty-border-radius-base)}.cty-video__footer-volume{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-volume cty-icon{font-size:var(--cty-video-footer-icon-size)}.cty-video__footer-fullscreen{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-fullscreen ion-button{--padding-start:0px}.cty-video__footer-fullscreen cty-icon{font-size:var(--cty-video-footer-fullscreen-icon-size)}.cty-video__toggle-play{position:absolute;top:50%;left:50%;z-index:8;width:var(--cty-video-play-size);height:var(--cty-video-play-size);margin:calc(var(--cty-video-play-size) / -2) 0 0 calc(var(--cty-video-play-size) / -2);font-weight:bold;text-align:center;border:var(--cty-video-play-border);border-radius:var(--cty-border-radius-circle);--background:transparent;--padding-top:0;--padding-end:0;--padding-start:0;--padding-bottom:0}.cty-video__toggle-play cty-icon{font-size:var(--cty-video-play-icon-size);color:rgba(238, 238, 238, 0.9);text-align:center;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.cty-video__opn-toast{position:absolute;top:50%;left:50%;z-index:4;width:var(--cty-video-toast-width);max-width:150px;height:var(--cty-video-toast-height);font-size:var(--cty-font-size-medium);font-weight:bold;color:var(--cty-color-white);background:var(--cty-overlay-color-light);border-radius:var(--cty-border-radius-round);-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.cty-video__opn-toast cty-icon{margin-right:10px;font-size:var(--cty-video-opn-toast-icon-size)}.cty-video__opn-panel{position:absolute;top:50%;left:50%;z-index:5;width:var(--cty-video-height);height:calc(var(--cty-video-width) - var(--cty-video-header-height) - var(--cty-video-footer-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom));margin:0 0 0 calc((var(--cty-video-footer-height) - var(--cty-video-header-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom)) / 2);-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.cty-video__dot-panel{position:absolute;z-index:6;padding:5px 11px 5px 8px;margin-left:calc(var(--cty-video-footer-height) + 13px + 46px);background:var(--cty-overlay-color);border-radius:var(--cty-border-radius-base);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:left top;transform-origin:left top}.cty-video__dot-panel .cty-video__dot-label{position:relative;max-width:160px;padding-right:17px;font-size:var(--cty-font-size-small);line-height:1.38;color:var(--cty-color-white)}.cty-video__dot-panel .cty-video__dot-label::after{position:absolute;top:0;right:7px;width:1px;height:100%;content:"";background-color:rgba(255, 255, 255, 0.3);-webkit-transform:scaleX(1.5);transform:scaleX(1.5)}.cty-video__dot-panel ion-button{height:36px;font-size:var(--cty-font-size-small);font-weight:bold;--padding-start:0;--padding-end:0;--background:transparent;--border-radius:0;--color:var(--cty-video-dot-active-color)}.cty-video__dot-panel cty-icon{margin-right:4px;font-size:var(--cty-font-size-medium)}.cty-video__dot-panel .cty-video__dot-triangle{position:absolute;bottom:-18px;left:20px;border-color:transparent;border-style:solid;border-width:9px 8px;border-top-color:var(--cty-overlay-color)}.cty-video__dot-panel-ex{margin-left:calc(var(--cty-video-footer-height) + 46px)}.cty-video__toast[class]{position:absolute;top:50%;z-index:7;min-width:300px;max-width:96vw;padding:0 15px;margin:0 0 0 -60px;font-size:var(--cty-font-size-extra-small);font-weight:bold;line-height:30px;color:rgba(238, 238, 238, 0.9);text-align:center;pointer-events:none;background:var(--cty-overlay-color);border-radius:var(--cty-border-radius-large);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.cty-video__rate{position:absolute;top:0;left:0;z-index:9;width:var(--cty-video-height);height:var(--cty-video-width);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__rate-mask{position:absolute;top:0;right:0;width:40%;height:100%;background-image:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.9)), color-stop(rgba(0, 0, 0, 0.8)), color-stop(rgba(0, 0, 0, 0.5)), to(transparent));background-image:linear-gradient(to left, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5), transparent)}.cty-video__rate-list-item{display:block;width:112px;min-height:50px;font-size:var(--cty-font-size-base);color:var(--cty-color-white);text-align:center;outline:none;background-color:transparent;border:none}.cty-video__rate-list-item.active{color:var(--cty-video-rate-active-color)}.cty-video__interactive{z-index:101;display:none;background-color:transparent;background-repeat:no-repeat;background-size:100% 100%}:host(.cty-video__vertical) cty-loading{--cty-loading-transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__player{top:50%;width:var(--cty-video-width);height:auto;max-height:100%;-webkit-transform:rotate(0deg) translateY(-50%);transform:rotate(0deg) translateY(-50%)}:host(.cty-video__vertical) .cty-video__toggle-play cty-icon{-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__toast{top:80%;left:50%;margin:0;-webkit-transform:rotate(0deg) translateX(-50%);transform:rotate(0deg) translateX(-50%)}:host(.cty-video__vertical) .cty-video__header{width:calc(var(--cty-video-width) - var(--cty-video-header-padding-start) - var(--cty-video-header-padding-end));-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__opn-panel{width:var(--cty-video-width);height:calc(var(--cty-video-height) - var(--cty-video-header-height) - var(--cty-video-footer-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom));margin:calc((var(--cty-video-footer-height) - var(--cty-video-header-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom)) / -2) 0 0;-webkit-transform:translate(-50%, -50%) rotate(0);transform:translate(-50%, -50%) rotate(0)}:host(.cty-video__vertical) .cty-video__opn-toast{top:50%;-webkit-transform:translate(-50%, 0) rotate(0deg);transform:translate(-50%, 0) rotate(0deg)}:host(.cty-video__vertical) .cty-video__footer{top:auto;bottom:0;width:var(--cty-video-width);-webkit-transform:rotate(0);transform:rotate(0)}:host(.cty-video__vertical) .cty-video__footer-progress__top{padding:var(--cty-video-progress-vertical-padding)}:host(.cty-video__vertical) .cty-video__time{font-size:var(--cty-font-size-small)}:host(.cty-video__vertical) .cty-video__footer-time-label{margin-left:0}:host(.cty-video__vertical) .cty-video__rate{width:var(--cty-video-width);height:var(--cty-video-height);-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__dot-panel{bottom:calc(var(--cty-video-footer-height) + 13px);margin-left:0;-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__dot-panel-ex{bottom:var(--cty-video-footer-height)}:host(.cty-video__unfullscreen){height:var(--cty-video-half-screen-height)}:host(.cty-video__unfullscreen) .cty-video__wrapper{background-color:var(--cty-color-black)}:host(.cty-video__unfullscreen) .cty-video__player{top:0;height:var(--cty-video-half-screen-height);max-height:initial;-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__unfullscreen) .cty-video__toggle-play{width:var(--cty-video-unfullscreen-play-size);height:var(--cty-video-unfullscreen-play-size);margin:calc(var(--cty-video-unfullscreen-play-size) / -2) 0 0 calc(var(--cty-video-unfullscreen-play-size) / -2);border:var(--cty-video-unfullscreen-play-border)}:host(.cty-video__unfullscreen) .cty-video__toggle-play cty-icon{font-size:var(--cty-video-unfullscreen-play-icon-size)}:host(.cty-video__unfullscreen) .cty-video__header{height:var(--cty-video-header-unfullscreen-height);background:var(--cty-video-header-unfullscreen-background)}:host(.cty-video__unfullscreen) .cty-video__title{line-height:var(--cty-video-header-unfullscreen-height)}:host(.cty-video__unfullscreen) .cty-video__header-back ion-button{width:30px;height:100%}:host(.cty-video__unfullscreen) .cty-video__footer{height:var(--cty-video-footer-unfullscreen-height);background:var(--cty-video-footer-unfullscreen-background)}:host(.cty-video__unfullscreen) .cty-video__footer ion-row{height:calc(var(--cty-video-footer-unfullscreen-height) - var(--cty-video-footer-progress-height))}:host(.cty-video__unfullscreen) .cty-video__footer .cty-video__footer-progress__top{height:var(--cty-video-footer-progress-height)}:host(.cty-video__unfullscreen) .cty-video__footer ion-button{--padding-start:8px;--padding-end:8px}:host(.cty-video__unfullscreen) .cty-video__footer-fullscreen ion-button{--padding-start:0px}:host(.cty-video__unfullscreen) .cty-video__opn-panel{height:calc(var(--cty-video-half-screen-height) - var(--cty-video-header-unfullscreen-height) - var(--cty-video-footer-unfullscreen-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom))}:host(.cty-video__unfullscreen) .cty-video__opn-toast{top:40%;height:30px}:host(.cty-video__unfullscreen) .cty-video__toast{top:70%}:host(.cty-video__unfullscreen) cty-loading{--cty-loading-overlay-height:var(--cty-video-half-screen-height)}:host(.cty-video__large-screen) .cty-video__player{top:0;left:50%;width:auto;max-width:100%;height:100%;-webkit-transform:rotate(0deg) translateX(-50%);transform:rotate(0deg) translateX(-50%)}.cty-video__audio-player{display:block}.cty-video__player-audio{position:absolute;display:none;visibility:hidden}';var z=t("cty_video",function(){function t(t){var o=this;e(this,t);this.ctyDismiss=i(this,"ctyDismiss",7);this.ctyVideoCanplay=i(this,"ctyVideoCanplay",7);this.ctyVideoTimeupdate=i(this,"ctyVideoTimeupdate",7);this.ctyVideoPlaying=i(this,"ctyVideoPlaying",7);this.ctyVideoPlay=i(this,"ctyVideoPlay",7);this.ctyVideoPause=i(this,"ctyVideoPause",7);this.ctyVideoStalled=i(this,"ctyVideoStalled",7);this.ctyVideoWaiting=i(this,"ctyVideoWaiting",7);this.ctyVideoEnded=i(this,"ctyVideoEnded",7);this.ctyVideoError=i(this,"ctyVideoError",7);this.ctyVideoChangeVolume=i(this,"ctyVideoChangeVolume",7);this.ctyVideoProgress=i(this,"ctyVideoProgress",7);this.ctyVideoScreenChange=i(this,"ctyVideoScreenChange",7);this.ctyVideoIAEnter=i(this,"ctyVideoIAEnter",7);this.ctyVideoIAAction=i(this,"ctyVideoIAAction",7);this.ctyVideoCtrlChange=i(this,"ctyVideoCtrlChange",7);this.ctyVideoRateChange=i(this,"ctyVideoRateChange",7);this.url="";this.poster="";this.startTime=0;this.preload="metadata";this.allowForward=true;this.allowBackward=true;this.unAllowForwardMsg="首次学习不允许快进哦~";this.unAllowRateMsg="首次学习不允许设置播放倍速";this.trafficMsg="当前是非WIFI网络, 可能消耗流量, 点击继续~";this.errorMsg="视频播放异常或网络故障, 请稍后重试。";this.orientation=true;this.autoplay=true;this.trafficAutoplay=false;this.fullscreenOnly=true;this.defaultFullscreen=true;this.fullscreenIcon="cty-fullscreen";this.exitFullscreenIcon="cty-exit-fullscreen";this.direction="L";this.controls=true;this.headerCtrl=true;this.footerCtrl=true;this.title="";this.rates=[.7,1,1.25,1.5];this.rate=1;this.directRate=false;this.loading=false;this.loadingImg="";this.updateNow=true;this.markers=[];this.landscapeEnterTimer=20;this.landscapeLeaveTimer=420;this.togglePlayTimer=150;this.progressPosition="center";this.player="video";this.largeScreenIsPortrait=true;this.allowBackgroundForward=false;this.interactiveActions=[];this.playProgress=0;this.maxPlayProgress=0;this.currentTimeLabel="00:00:00";this.durationLabel="00:00:00";this.isPlaying=false;this.isMute=false;this.showCtrl=true;this.showPlayRate=false;this.showVideoError=true;this.warningMsg="";this.isLoading=true;this.showTogglePlay=false;this.playVolume=100;this.playBrightness=100;this.controlIcon="";this.controlLabel="";this.controlType="";this.lastControlType="";this.touchState={isTouching:false,right:0,height:0,top:0,bottom:0,currentY:0};this.isMoving=false;this.opnStartTime=0;this.opnMoveTime=0;this.opnLx=0;this.opnLy=0;this.opnNx=0;this.opnNy=0;this.isMouseMove=false;this.isMicroMessager=u.isMicroMessager;this.isPC=u.isPC;this.isIOS=u.isIos;this.isIpad=u.isIpad;this.isWifi=v.isWifi;this.isHybrid=u.isHybrid;this.lastTapScreenTime=Date.now();this.footerPrgtime=0;this._curIsFullscreen=true;this.showInteractiveLayer=false;this.hasInteractive=false;this.interactiving_action=null;this.ctrlTimer=0;this.warningMsgTimer=0;this.touchMoveTimer=0;this._rates=[];this.markerList=[];this.currentMarker={describe:"",breakpoint:0,position:0};this.showDotPanel=false;this.dotDotPanelTop="auto";this.dotDotPanelLeft="auto";this.triangleMargin=0;this.reallyShowDot=false;this.isRealWaiting=true;this.isSeeking=false;this.deviceIsPORTRAIT=false;this.canScreenOrientation=false;this.visibilityChangeHandler=function(){};this.iosAppPauseHandler=function(){};this.iosAResumeHandler=function(){};this._doCanplay=function(){setTimeout((function(){o.showTogglePlay=true}),o.togglePlayTimer);if(o.isLoading){o.videoEl.style.display="block"}if((!o.isWifi||o.isMicroMessager||!o.autoplay||!o.loading)&&o.isLoading){o.isLoading=false}o.durationLabel=d(o.videoEl.duration);o.ctyVideoCanplay.emit();o.markerList=o.markers.map((function(t){return Object.assign(Object.assign({},t),{position:+(t.breakpoint/o.videoEl.duration*100).toFixed(3)})}))};this._doTimeupdate=function(){var t=o.videoEl.currentTime;if(!o.isPlaying&&t>0){if(o.isLoading){o.isLoading=false}if(!o.videoEl.paused){o.isPlaying=true}}if(!o.touchState.isTouching){o._updateVideoProgress();o.interactiveCheck(t)}o.ctyVideoTimeupdate.emit(t)};this._doPlay=function(){o.ctyVideoPlay.emit()};this._doPause=function(){o.isPlaying=false;o.ctyVideoPause.emit()};this._doEnded=function(){o.isPlaying=false;o._updateVideoProgress();o.interactiveReset();o.ctyVideoEnded.emit()};this._doPlaying=function(){if(!w("android")){if(o.isLoading){o.isLoading=false}o.isPlaying=true}o.ctyVideoPlaying.emit()};this._doChangeVolume=function(){o.playVolume=Math.round(o.videoEl.volume*100);o.ctyVideoChangeVolume.emit()};this._doError=function(){if(!o.isLoading&&o.showVideoError){o.warningMsg=o.errorMsg;o.clearWarningMsg();o.ctyVideoError.emit(true);return}if(o.isLoading){o.isLoading=false;o.showTogglePlay=true}o.ctyVideoError.emit(false)};this._doStalled=function(){o.ctyVideoStalled.emit()};this._doWaiting=function(){if(o.isRealWaiting&&!o.isSeeking){o.ctyVideoWaiting.emit(o.videoEl.currentTime)}};this._doSeeked=function(){if(o.isSeeking=false){o.isRealWaiting=true}};this._dismiss=function(){if(!o.fullscreenOnly&&o.curIsFullscreen){o.curIsFullscreen=false;if(o.isHybrid){l.toggleStatusBar(true)}if(o.canScreenOrientation){h.lock("portrait").catch((function(){}))}o.ctyDismiss.emit(false);return}if(!o.videoEl.paused){o.pause();o.ctyDismiss.emit(false);return}if(o.isHybrid){l.toggleStatusBar(true)}if(o.canScreenOrientation){if(o.landscapeLeaveTimer>0){setTimeout((function(){h.lock("portrait").catch((function(){}))}),o.landscapeLeaveTimer)}else{h.lock("portrait").catch((function(){}))}}o.ctyDismiss.emit(true)};this._doSetRate=function(){if(!o.allowForward){o.warningMsg=o.unAllowRateMsg;o.clearWarningMsg();return}if(o.direction!="L"||o.directRate){var t=o.rates.findIndex((function(t){return t==o.rate}))+1;if(t==o.rates.length){t=0}o.setPlayRate(o.rates[t]);return}o.showCtrl=false;o.showPlayRate=true;o._resetDot();o.ctyVideoCtrlChange.emit(o.showCtrl)};this._toggleFullScreen=function(t){o.curIsFullscreen=t;if(o.isHybrid){l.toggleStatusBar(!t)}if(o.canScreenOrientation){h.lock(t?"landscape":"portrait").catch((function(){}))}o.ctyVideoScreenChange.emit(t)};this._doPrgTouchstart=function(t){var e;if(t.type=="mousedown"){o.isMouseMove=true}o.isRealWaiting=false;if(!o.allowForward&&!o.allowBackward||((e=t.touches)===null||e===void 0?void 0:e.length)>1){return true}o.isSeeking=true;var i=n(t.currentTarget);o.touchState.top=i.top;o.touchState.height=i.bottom-o.touchState.top;o.touchState.right=i.right;o.touchState.bottom=i.bottom;o.touchState.isTouching=true;if(o.deviceIsPORTRAIT){o.touchState.top=i.left;o.touchState.height=i.right-o.touchState.top;o.touchState.right=i.bottom;o.touchState.bottom=i.right}o.touchState.currentY=o._getPoint(t).x;o.maxPlayProgress=Math.max(o.playProgress,o.maxPlayProgress);o._changeProgressByTouch();o.clearCtrlTimeout();return true};this._doPrgTouchmove=function(t){var e;if(!o.isMouseMove&&t.type=="mousemove"){return}if(((e=t.touches)===null||e===void 0?void 0:e.length)>1){return true}var i=Date.now();if(o.footerPrgtime+50>i){return true}o.footerPrgtime=i;var r=o._getPoint(t).x;var a=Math.abs(r-o.touchState.currentY)*100/o.touchState.height;o.touchState.currentY=r;if(a>1||t.type=="mousemove"){o._changeProgressByTouch(o.updateNow)}return true};this._doPrgTouchend=function(t){if(t.type=="mouseleave"&&!o.isMouseMove){return}if(t.type=="mouseup"||t.type=="mouseleave"){o.isMouseMove=false}if(o.touchState.isTouching){o._changeProgressByTouch()}o.touchState.isTouching=false;o.isSeeking=false;return true};this._doOpnStart=function(t){if(t.type=="mousedown"){o.isMouseMove=true}o.isSeeking=true;o.isRealWaiting=false;var e=n(t.currentTarget);o.touchState.top=e.top;o.touchState.height=e.bottom-o.touchState.top;o.touchState.right=e.right;o.touchState.bottom=e.bottom;o.touchState.isTouching=true;if(o.deviceIsPORTRAIT){o.touchState.top=e.left;o.touchState.height=e.right-o.touchState.top;o.touchState.right=e.bottom;o.touchState.bottom=e.right}var i=o._getPoint(t),r=i.x,a=i.y;o.opnLx=r;o.opnLy=a;o.maxPlayProgress=Math.max(o.playProgress,o.maxPlayProgress);o.opnStartTime=(new Date).getTime();return true};this._doOpnMove=function(t){if(!o.isMouseMove&&t.type=="mousemove"){return}if(o.opnMoveTime===0){o.opnMoveTime=(new Date).getTime()}if(o.opnMoveTime-o.opnStartTime<1500){o.showCtrl=true;o.clearCtrlTimeout();o.isMoving=true;var e=o._getPoint(t),i=e.x,r=e.y;o.opnNx=i;o.opnNy=r;if(!o.controlType){if(Math.abs(o.opnNx-o.opnLx)>=Math.abs(o.opnNy-o.opnLy)){o.controlType="P";o.controlLabel=o.currentTimeLabel}else{if(!o.isIOS){if(o.opnLx>o.touchState.height*.5){o.controlType="V";o.controlIcon="cty-volume-high";o.controlLabel=o.playVolume+"%"}else{o.controlType="B";o.controlIcon="cty-brightness";o.controlLabel=o.playBrightness+"%"}}else{o.controlType="B";o.controlIcon="cty-brightness";o.controlLabel=o.playBrightness+"%"}}}if(o.controlType=="P"){o.controlIcon=o.opnNx-o.opnLx>0?"cty-forward":"cty-backward"}switch(o.controlType){case"B":if(o.opnNy-o.opnLy<0&&!o.deviceIsPORTRAIT||o.opnNy-o.opnLy>0&&o.deviceIsPORTRAIT){o.playBrightness-=2;o.playBrightness=Math.max(o.playBrightness,0);if(o.updateNow){o._updateBrightness()}}else if(o.opnNy-o.opnLy>0&&!o.deviceIsPORTRAIT||o.opnNy-o.opnLy<0&&o.deviceIsPORTRAIT){o.playBrightness+=2;o.playBrightness=Math.min(o.playBrightness,100);if(o.updateNow){o._updateBrightness()}}o.controlLabel=o.playBrightness+"%";break;case"V":if(o.opnNy-o.opnLy<0&&!o.deviceIsPORTRAIT||o.opnNy-o.opnLy>0&&o.deviceIsPORTRAIT){o.playVolume-=2;o.playVolume=Math.max(o.playVolume,0);if(o.updateNow){o._updateVolume()}}else if(o.opnNy-o.opnLy>0&&!o.deviceIsPORTRAIT||o.opnNy-o.opnLy<0&&o.deviceIsPORTRAIT){o.playVolume+=2;o.playVolume=Math.min(o.playVolume,100);if(o.updateNow){o._updateVolume()}}o.controlLabel=o.playVolume+"%";break;case"P":if(o.opnNx-o.opnLx>0){if(!o.allowForward&&o.playProgress>=o.maxPlayProgress){o.isMoving=false;o.unAllowForward();return}o.playProgress+=1;o.playProgress=Math.min(o.playProgress,1e3);if(o.updateNow){o.videoEl.currentTime=o.playProgress/1e3*o.videoEl.duration;o._updateVideoProgress()}o.controlLabel=d(o.playProgress/1e3*o.videoEl.duration)}else if(o.opnNx-o.opnLx<0){o.playProgress-=1;o.playProgress=Math.max(0,o.playProgress);if(o.updateNow){o.videoEl.currentTime=o.playProgress/1e3*o.videoEl.duration;o._updateVideoProgress()}o.controlLabel=d(o.playProgress/1e3*o.videoEl.duration)}else{o.interactiveReset()}break}o.lastControlType=o.controlType;o.opnLx=o.opnNx;o.opnLy=o.opnNy}};this._doOpnEnd=function(t){if(t.type=="mouseleave"&&!o.isMouseMove){return}if(t.type=="mouseup"||t.type=="mouseleave"){o.isMouseMove=false}if(!o.isMoving){o.showCtrl=!o.showCtrl;o.ctyVideoCtrlChange.emit(o.showCtrl);o._resetDot();var e=Date.now();if(e-o.lastTapScreenTime<400){o.lastTapScreenTime=o.lastTapScreenTime-1e3;o.toggleVideo(null)}else{o.lastTapScreenTime=e}}if(!o.updateNow){switch(o.controlType){case"B":o._updateBrightness();break;case"V":o._updateVolume();break;case"P":o.videoEl.currentTime=o.playProgress/1e3*o.videoEl.duration;o._updateVideoProgress();break}}o.controlType="";o.clearCtrlTimeout();o.touchState.isTouching=false;o.opnMoveTime=0;o._clearTouchMoveToast();o.isSeeking=false};this._doDot=function(t,e){t.stopPropagation();o.clearCtrlTimeout();if(o.currentMarker.breakpoint>0&&e.breakpoint==o.currentMarker.breakpoint){o.setVideoCurrentTime(o.currentMarker.breakpoint,(function(){o._resetDot();o.play()}));return}o.showDotPanel=true;o.currentMarker=e;var i=n(t.target);var r=i.top+i.height/2;var a=i.left+i.width/2;o.reallyShowDot=false;window.setTimeout((function(){var t=o.dotPanelEl;var e=t.parentNode.offsetHeight;var i=t.parentNode.offsetWidth;var n=t.offsetWidth;var s=t.children[t.children.length-1];var c=r-s.offsetLeft-s.offsetWidth/2+o.triangleMargin;var d=a-s.offsetLeft-s.offsetWidth/2+o.triangleMargin;o.dotDotPanelTop=c+"px";o.dotDotPanelLeft=d+"px";var l=e-n-20;var h=i-n-20;if(o.canScreenOrientation){if(d>h){o.triangleMargin=d-h;o.dotDotPanelLeft=h+"px"}else if(d<5){o.triangleMargin=d-5;o.dotDotPanelLeft="5px"}else{o.triangleMargin=0}o.dotDotPanelTop="auto"}else{if(c>l){o.triangleMargin=c-l;o.dotDotPanelTop=l+"px"}else if(c<5){o.triangleMargin=c-5;o.dotDotPanelTop="5px"}else{o.triangleMargin=0}o.dotDotPanelLeft="auto"}window.setTimeout((function(){o.reallyShowDot=true}),10)}),100)};this._toPoint=function(){o.clearCtrlTimeout();o.setVideoCurrentTime(o.currentMarker.breakpoint,(function(){o._resetDot();o.play()}))}}Object.defineProperty(t.prototype,"curIsFullscreen",{get:function(){return this._curIsFullscreen},set:function(t){this._curIsFullscreen=t;this.deviceIsPORTRAIT=this.direction=="P"||!t||this.largeScreenIsPortrait&&(this.isPC||this.isIpad)||this.canScreenOrientation&&t},enumerable:false,configurable:true});t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,o;return __generator(this,(function(r){switch(r.label){case 0:if(!(!this.isIOS&&!this.isMicroMessager&&f.isAvailable))return[3,5];r.label=1;case 1:r.trys.push([1,4,,5]);t=this;return[4,f.getVolume()];case 2:t.playVolume=r.sent();e=this;return[4,f.isMuted()];case 3:e.isMute=r.sent();return[3,5];case 4:i=r.sent();return[3,5];case 5:if(!this.defaultFullscreen&&!this.fullscreenOnly){this.curIsFullscreen=false}o=this.rates.map((function(t){return t}));this._rates=o;this.hasInteractive=Array.isArray(this.interactiveActions)&&this.interactiveActions.length>0;this.interactiveReset();this.showTogglePlay=!this.autoplay;return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.canScreenOrientation=this.orientation&&this.direction=="L"&&this.isHybrid&&w("mobile")&&!this.isIpad;this.deviceIsPORTRAIT=this.direction=="P"||!this.curIsFullscreen||this.largeScreenIsPortrait&&(this.isPC||this.isIpad)||this.canScreenOrientation;if(this.canScreenOrientation&&this.curIsFullscreen){if(this.landscapeEnterTimer>0){setTimeout((function(){h.lock("landscape").catch((function(){}))}),this.landscapeEnterTimer)}else{h.lock("landscape").catch((function(){}))}}else if(this.isHybrid&&w("mobile")){h.lock("portrait").catch((function(){}))}if(+this.startTime>0){this.videoEl.currentTime=Number(this.startTime)}this.videoEl.controls=false;this.videoEl.playbackRate=this.rate;if(this.isMicroMessager){window.setTimeout((function(){t.isLoading=false;t.showTogglePlay=true;t.videoEl.style.display="block"}),2500)}else if(!this.isWifi){window.setTimeout((function(){t.isLoading=false;t.showTogglePlay=true;t.videoEl.style.display="block"}),1500)}else if(+this.startTime>0){this.videoEl.style.display="block"}if(!this.allowBackgroundForward&&this.isIOS){var e=1;var i="";var o=0;if(this.isMicroMessager){this.visibilityChangeHandler=function(){if(!t.allowForward&&t.videoEl){if(e%2==1){t.showVideoError=false;i=t.videoEl.src;o=t.videoEl.currentTime;t.videoEl.src="data:video/mp4;base64,YQ=="}else{t.videoEl.src=i;window.setTimeout((function(){t.videoEl.currentTime=o;t.showVideoError=true}),1500)}e++}};document.addEventListener("visibilitychange",this.visibilityChangeHandler)}else{this.iosAppPauseHandler=function(){if(t.videoEl&&!t.allowForward){t.showVideoError=false;i=t.videoEl.src;o=t.videoEl.currentTime;t.videoEl.src="data:video/mp4;base64,YQ=="}};this.iosAResumeHandler=function(){if(t.videoEl&&!t.allowForward){t.videoEl.src=i;window.setTimeout((function(){t.showVideoError=false;t.videoEl.currentTime=o}),1500)}};document.addEventListener("pause",this.iosAppPauseHandler);document.addEventListener("resume",this.iosAResumeHandler)}}};t.prototype.disconnectedCallback=function(){clearTimeout(this.ctrlTimer);clearTimeout(this.warningMsgTimer);clearTimeout(this.touchMoveTimer);if(!this.allowBackgroundForward&&this.isIOS){if(this.isMicroMessager){document.removeEventListener("visibilitychange",this.visibilityChangeHandler)}else{document.removeEventListener("pause",this.iosAppPauseHandler);document.removeEventListener("resume",this.iosAResumeHandler)}}};t.prototype._getVolumeIconName=function(){if(this.isMute){return p}if(this.playVolume==0){return g}else if(this.playVolume<30){return b}else if(this.playVolume<70){return _}else{return m}};t.prototype.unAllowForward=function(){this.warningMsg=this.unAllowForwardMsg;this.clearWarningMsg()};t.prototype.play=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.videoEl.paused){this.videoEl.play()}this.isPlaying=true;return[2]}))}))};t.prototype.setCtrlShow=function(){return __awaiter(this,arguments,void 0,(function(t){if(t===void 0){t=false}return __generator(this,(function(e){this.showCtrl=t;this._resetDot();this.ctyVideoCtrlChange.emit(t);return[2]}))}))};t.prototype.pause=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.videoEl.paused){this.videoEl.pause()}this.isPlaying=false;return[2]}))}))};t.prototype.setVideoCurrentTime=function(t,e){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(o){this.maxPlayProgress=Math.max(this.maxPlayProgress,this.playProgress);i=this.videoEl.duration*this.maxPlayProgress/1e3;if(t>i&&!this.allowForward){this.unAllowForward();return[2]}this.videoEl.currentTime=t;e&&e();return[2]}))}))};t.prototype._clearTouchMoveToast=function(){var t=this;clearTimeout(this.touchMoveTimer);this.touchMoveTimer=window.setTimeout((function(){t.isMoving=false}),2e3)};t.prototype.clearCtrlTimeout=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){if(this.showCtrl){clearTimeout(this.ctrlTimer);this.ctrlTimer=window.setTimeout((function(){t.showCtrl=false;t.touchState.isTouching=false;t._resetDot();t.ctyVideoCtrlChange.emit(false)}),4e3)}return[2]}))}))};t.prototype.setWarningMsg=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.warningMsg=t;this.clearWarningMsg();return[2]}))}))};t.prototype.clearWarningMsg=function(){var t=this;if(this.warningMsg!=""){clearTimeout(this.warningMsgTimer);this.warningMsgTimer=window.setTimeout((function(){t.warningMsg=""}),2e3)}};t.prototype.toggleVideo=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.isLoading){return[2]}if(this.videoEl.paused){this.play()}else{this.pause()}if(t){this.clearCtrlTimeout();t.stopPropagation()}return[2]}))}))};t.prototype.toggleVolume=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:if(!(!this.isIOS&&!this.isMicroMessager&&f.isAvailable))return[3,6];i.label=1;case 1:i.trys.push([1,4,,5]);return[4,f.toggleMute()];case 2:i.sent();t=this;return[4,f.isMuted()];case 3:t.isMute=i.sent();return[3,5];case 4:e=i.sent();if(this.isMute){f.setVolume(this.playVolume)}else{f.setVolume(0)}this.isMute=!this.isMute;return[3,5];case 5:return[3,7];case 6:this.videoEl.muted=!this.videoEl.muted;this.isMute=this.videoEl.muted;i.label=7;case 7:this.clearCtrlTimeout();return[2]}}))}))};t.prototype.setPlayRate=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rate=t;this.videoEl.playbackRate=this.rate;this.showPlayRate=false;this.ctyVideoRateChange.emit(t);return[2]}))}))};t.prototype._getPoint=function(t){var e=s(t),i=e.x,o=e.y;try{if(this.deviceIsPORTRAIT){return{x:i,y:o}}return{x:o,y:i}}catch(t){return{x:0,y:0}}};t.prototype._changeProgressByTouch=function(t){if(t===void 0){t=true}if(!this.allowForward&&!this.allowBackward){return}var e=Math.round((this.touchState.currentY-this.touchState.top)/this.touchState.height*1e3);if(!this.allowBackward&&e<this.playProgress){return}if(!this.allowForward&&e>this.maxPlayProgress){this.unAllowForward();return}this.lastControlType="P";this.isMoving=true;if(this.playProgress>e){this.controlIcon="cty-backward"}else if(this.playProgress<e){this.controlIcon="cty-forward"}this.playProgress=e;if(e==0){this.interactiveReset();this.isMoving=false}if(t){this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration;this._updateVideoProgress()}else{this.controlLabel=d(this.playProgress/1e3*this.videoEl.duration)}this._clearTouchMoveToast()};t.prototype._updateVideoProgress=function(){var t=this.videoEl.currentTime;var e=this.videoEl.duration;this.playProgress=e>0?Math.round(t/e*1e3):0;this.ctyVideoProgress.emit(this.playProgress/10);this.currentTimeLabel=d(t);this.durationLabel=d(e);if(this.lastControlType=="P"){this.controlLabel=this.currentTimeLabel}};t.prototype._updateBrightness=function(){var t="rgba(0,0,0, "+(100-this.playBrightness)/1.6/100+")";this.videoCtrlEl.style.backgroundColor=t};t.prototype._updateVolume=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:if(!(!this.isIOS&&!this.isMicroMessager&&f.isAvailable))return[3,6];i.label=1;case 1:i.trys.push([1,4,,5]);return[4,f.setVolume(this.playVolume)];case 2:i.sent();t=this;return[4,f.isMuted()];case 3:t.isMute=i.sent();return[3,5];case 4:e=i.sent();return[3,5];case 5:return[3,7];case 6:this.videoEl.volume=this.playVolume/100;i.label=7;case 7:this.videoEl.volume=this.playVolume/100;if(this.playVolume>0&&this.isMute){this.toggleVolume()}return[2]}}))}))};t.prototype._resetDot=function(){this.showDotPanel=false;this.currentMarker={describe:"",breakpoint:0,position:0}};t.prototype.getVideoElement=function(){var t=this;return Promise.resolve().then((function(){return t.videoEl}))};t.prototype.getVideoState=function(){var t=this;return Promise.resolve().then((function(){var e=t,i=e.maxPlayProgress,o=e.isWifi,r=e.isLoading,a=e.playProgress,n=e.isPlaying;return{maxPlayProgress:i,isWifi:o,isLoading:r,playProgress:a,isPlaying:n}}))};t.prototype.interactiveCheck=function(t){var e;if(!this.hasInteractive||this.showInteractiveLayer){return}for(var i=0,o=this.interactiveActions;i<o.length;i++){var r=o[i];if(this.checkActionTriggerCond(r,t,"play")){this.showInteractiveLayer=true;this.interactiving_action=r;r.status.entercount++;for(var a=0,n=r.buttons;a<n.length;a++){var s=n[a];if(s.type=="optbtn"){s.val=s.defaultval}}var c=false;if(((e=r.autoactions)===null||e===void 0?void 0:e.length)>0){for(var d=0,l=r.autoactions;d<l.length;d++){var h=l[d];if(this.calcTriggerCond(this.interactiving_action,h.condtrigger)){this.pause();this.doInteractiveAction(h);c=true;break}}}if(!c&&r.buttons.length>0){this.pause();this.showInteractiveActionUI(r)}break}}};t.prototype.changeInteractiveAction=function(t){if(!this.hasInteractive&&!this.showInteractiveLayer){return}this.clearInteractiveActionUI();this.interactiving_action=t;t.status.entercount++;for(var e=0,i=t.buttons;e<i.length;e++){var o=i[e];if(o.type=="optbtn"){o.val=o.defaultval}}this.showInteractiveActionUI(t)};t.prototype.checkActionTriggerCond=function(t,e,i){var o=t.playtrigger;if(i=="play"&&(e<o.min||e>=o.max)){return false}if(this.calcTriggerCond(t,t.condtrigger)){return true}return false};t.prototype.calcTriggerCond=function(t,e){var i=true;for(var o=0,r=e;o<r.length;o++){var a=r[o];var n=true;var s=null;switch(a.type){case"entercount":s=this.findInteractiveAction(a.actionid,t);if(s!=null){var c=s.status.entercount;n=c>=a.min&&(c<a.max||a.max=="")}break;case"optbtn":s=this.findInteractiveAction(a.actionid,t);if(s!=null){for(var d=0,l=s.buttons;d<l.length;d++){var h=l[d];if(h.type=="optbtn"&&h.id==a.btnid){n=h.val==a.val;break}}}break;case"group":n=this.calcTriggerCond(t,a.subs);break}if(a.op=="or"){i=i||n}else{i=i&&n}}return i};t.prototype.findInteractiveAction=function(t,e){if(t.trim()==""){return e}for(var i=0,o=this.interactiveActions;i<o.length;i++){var r=o[i];if(r.id==t){return r}}return null};t.prototype.interactiveAction=function(t){t.stopPropagation();if(this.interactiving_action==null){return}var e=this.interactiving_action.imgW;var i=this.interactiving_action.imgH;for(var o=0,r=this.interactiving_action.buttons;o<r.length;o++){var a=r[o];var n={x:a.x,y:a.y,width:a.w,height:a.h};if(this.interactiveClickHitCheck(t,n,e,i)){switch(a.type){case"optbtn":a.val=a.val==1?"0":"1";this.refreshInteractiveActionBtnStatus(this.interactiving_action);break;case"link":case"input":this.doInteractiveAction(a);break;case"action":default:for(var s=0,c=a.actions;s<c.length;s++){var d=c[s];if(this.calcTriggerCond(this.interactiving_action,d.condtrigger)){this.doInteractiveAction(d);break}}break}break}}};t.prototype.doInteractiveAction=function(t){var e=this;if(t.type=="action"){this.changeInteractiveAction(this.findInteractiveAction(t.actionid,this.interactiving_action))}else if(t.type=="play"){this.videoEl.currentTime=t.startTime;this.play();this.clearInteractiveActionUI();window.setTimeout((function(){e.interactiving_action=null;e.hideInteractiveActionUI()}),100)}else if(t.type=="link"){if(!t.link){this.play();this.clearInteractiveActionUI();window.setTimeout((function(){e.interactiving_action=null;e.hideInteractiveActionUI()}),100);return}this.ctyVideoIAAction.emit(t)}};t.prototype.interactiveClickHitCheck=function(t,e,i,o){var r=o;var a=i;var n=this.interactiveEl;var s=e.y*r/o;var d=e.x*a/i;var l=e.width*a/i;var h=e.height*r/o;var f=c(t),v=f.x,u=f.y;var y=(v-n.offsetLeft)*a/n.clientWidth;var p=(u-n.offsetTop)*r/n.clientHeight;if(y>=d&&y<=d+l&&p>=s&&p<=s+h){return true}return false};t.prototype.showInteractiveActionUI=function(t){this.interactiveEl.style.display="block";if(t.img!=""){this.interactiveEl.style.backgroundImage="url("+t.img+")"}this.refreshInteractiveActionBtnStatus(t);this.ctyVideoIAEnter.emit()};t.prototype.hideInteractiveActionUI=function(){this.showInteractiveLayer=false;this.clearInteractiveActionUI();this.interactiveEl.style.display="none"};t.prototype.refreshInteractiveActionBtnStatus=function(t){var e=this.interactiveEl;var i="";for(var o=0,r=t.buttons;o<r.length;o++){var a=r[o];if(a.type=="optbtn"){i+=a.htmls[a.val]||""}}e.innerHTML=i};t.prototype.clearInteractiveActionUI=function(){this.interactiveEl.innerHTML=""};t.prototype.interactiveReset=function(){if(!this.hasInteractive){return}this.showInteractiveLayer=false;for(var t=0,e=this.interactiveActions;t<e.length;t++){var i=e[t];i.status.entercount=0;for(var o=0,r=i.buttons;o<r.length;o++){var a=r[o];if(a.type=="optbtn"){a.val=a.defaultval}}}};t.prototype.renderPlayer=function(){var t=this;var e=this.poster||"".concat(y.get("resUrlPrefix",""),"assets/cty_res/img/poster.jpg");return o("div",{class:"cty-video__wrapper","data-tap-disable":"true"},this.player==="video"&&o("video",{ref:function(e){return t.videoEl=e},class:"cty-video__player",poster:e,preload:this.preload,"x5-video-player-type":"h5","x5-video-player-fullscreen":"true",playsinline:true,"webkit-playsinline":true,autoplay:(this.isWifi||this.isMicroMessager||this.trafficAutoplay)&&this.autoplay,onCanPlay:this._doCanplay,onTimeUpdate:this._doTimeupdate,onPlay:this._doPlay,onPause:this._doPause,onEnded:this._doEnded,onPlaying:this._doPlaying,onVolumeChange:this._doChangeVolume,onError:this._doError,onStalled:this._doStalled,onWaiting:this._doWaiting,onSeeked:this._doSeeked,src:this.url,typeof:"video/mp4"}),this.player==="audio"&&o("div",{class:"cty-video__player cty-video__audio-player"},o("audio",{ref:function(e){return t.videoEl=e},class:"cty-video__player-audio",preload:this.preload,autoplay:(this.isWifi||this.isMicroMessager||this.trafficAutoplay)&&this.autoplay,onCanPlay:this._doCanplay,onTimeUpdate:this._doTimeupdate,onEnded:this._doEnded,onPlaying:this._doPlaying,onPlay:this._doPlay,onPause:this._doPause,onVolumeChange:this._doChangeVolume,onError:this._doError,onStalled:this._doStalled},o("source",{src:this.url,type:"audio/mp3"}),o("source",{src:this.url,type:"audio/ogg"})),o("slot",{name:"audio-content"})))};t.prototype.renderControls=function(){var t=this;return o("div",{class:"cty-video__controls",ref:function(e){return t.videoCtrlEl=e}},o("slot",{name:"header"}),this.showCtrl&&this.headerCtrl&&o("ion-grid",{class:"cty-video__header"},o("ion-row",null,o("ion-col",{class:"flex-align-center cty-video__header-back"},o("ion-button",{onClick:this._dismiss},o("cty-icon",{name:x}))),o("ion-col",{size:"6",class:"cty-video__title flex-align-center cty-ellipsis"},this.title),o("ion-col",null,o("slot",{name:"headerCol"})))),o("slot",{name:"footer"}),this.showCtrl&&this.footerCtrl&&o("ion-grid",{class:{"cty-video__footer":true,"safe-area-bottom-border-color":this.direction=="P"&&this.curIsFullscreen}},this.progressPosition=="top"&&o("ion-row",{class:"cty-video__footer-progress__top"},o("ion-range",{mode:"ios",class:"cty-video__footer-range",debounce:300,max:1e3,value:this.playProgress,disabled:true,ticks:false})),o("ion-row",null,o("ion-col",{class:{"flex-align-center cty-video__footer-toggle-play":true,"cty-video__footer-flex":this.progressPosition=="top"}},o("ion-button",{onClick:function(e){t.toggleVideo(e)}},o("cty-icon",{name:this.isPlaying?"cty-pause":"cty-play"})),this.progressPosition=="top"&&o("div",{class:"flex-align-center cty-video__footer-time-label"},this.currentTimeLabel,o("span",null,"/"),this.durationLabel)),this.progressPosition=="center"&&o("ion-col",{class:"cty-video__footer-progress flex-center"},o("ion-range",{mode:"ios",class:"cty-video__footer-range",debounce:300,max:1e3,value:this.playProgress,disabled:true,ticks:false},o("span",{class:"cty-video__time",slot:"start"},this.currentTimeLabel),o("span",{class:"cty-video__time",slot:"end"},this.durationLabel))),this.curIsFullscreen&&o("ion-col",{class:"cty-video__footer-rate flex-align-center"},o("ion-button",{onClick:this._doSetRate},this.rate==1?"倍速":this.rate+"X")),o("ion-col",{class:"cty-video__footer-volume flex-align-center"},o("ion-button",{onClick:function(){return t.toggleVolume()}},o("cty-icon",{name:this._getVolumeIconName()}))),!this.fullscreenOnly&&!this.curIsFullscreen&&this.fullscreenIcon&&o("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},o("ion-button",{onClick:function(){return t._toggleFullScreen(true)}},o("cty-icon",{name:this.fullscreenIcon}))),!this.fullscreenOnly&&this.curIsFullscreen&&this.exitFullscreenIcon&&o("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},o("ion-button",{onClick:function(){return t._toggleFullScreen(false)}},o("cty-icon",{name:this.exitFullscreenIcon}))),o("slot",{name:"footerCol"}))),(this.allowForward||this.allowBackward)&&this.showCtrl&&this.footerCtrl&&o("ion-grid",{class:{"cty-video__footer cty-video__footer-controls":true,"safe-area-bottom-border-color":this.direction=="P"&&this.curIsFullscreen}},this.progressPosition=="top"&&o("ion-row",{class:"cty-video__footer-progress__top",onClick:function(t){return t.stopPropagation()}},!this.isPC&&o("div",{class:"cty-video__footer-bar",onTouchStart:this._doPrgTouchstart,onTouchMove:this._doPrgTouchmove,onTouchEnd:this._doPrgTouchend},this.direction=="L"&&this.curIsFullscreen&&this.markerList.map((function(e){return o("span",{onTouchStart:function(i){return t._doDot(i,e)},class:"cty-video__footer-dot",style:{left:e.position+"%"}})}))),this.isPC&&o("div",{class:"cty-video__footer-bar",onMouseDown:this._doPrgTouchstart,onMouseMove:this._doPrgTouchmove,onMouseUp:this._doPrgTouchend,onMouseLeave:this._doPrgTouchend},this.direction=="L"&&this.curIsFullscreen&&this.markerList.map((function(e){return o("span",{onTouchStart:function(i){return t._doDot(i,e)},class:"cty-video__footer-dot",style:{left:e.position+"%"}})})))),o("ion-row",null,o("ion-col",{class:{"flex-align-center cty-video__footer-toggle-play":true,"cty-video__footer-flex":this.progressPosition=="top"}},o("ion-button",{onClick:function(e){t.toggleVideo(e)}},o("cty-icon",{name:this.isPlaying?"cty-pause":"cty-play"})),this.progressPosition=="top"&&o("div",{class:"flex-align-center cty-video__footer-time-label"},this.currentTimeLabel,o("span",null,"/"),this.durationLabel)),this.progressPosition=="center"&&o("ion-col",{class:"cty-video__footer-progress flex-center"},o("span",{class:"cty-video__time"},this.currentTimeLabel),!this.isPC&&o("div",{class:"cty-video__footer-bar",onTouchStart:this._doPrgTouchstart,onTouchMove:this._doPrgTouchmove,onTouchEnd:this._doPrgTouchend},this.direction=="L"&&this.curIsFullscreen&&this.markerList.map((function(e){return o("span",{onTouchStart:function(i){return t._doDot(i,e)},class:"cty-video__footer-dot",style:{left:e.position+"%"}})}))),this.isPC&&o("div",{class:"cty-video__footer-bar",onMouseDown:this._doPrgTouchstart,onMouseMove:this._doPrgTouchmove,onMouseUp:this._doPrgTouchend,onMouseLeave:this._doPrgTouchend},this.direction=="L"&&this.curIsFullscreen&&this.markerList.map((function(e){return o("span",{onTouchStart:function(i){return t._doDot(i,e)},class:"cty-video__footer-dot",style:{left:e.position+"%"}})}))),o("span",{class:"cty-video__time"},this.durationLabel)),this.curIsFullscreen&&o("ion-col",{class:"cty-video__footer-rate flex-align-center"},o("ion-button",{onClick:this._doSetRate},this.rate==1?"倍速":this.rate+"X")),o("ion-col",{class:"cty-video__footer-volume flex-align-center"},o("ion-button",{onClick:function(){return t.toggleVolume()}},o("cty-icon",{name:this._getVolumeIconName()}))),!this.fullscreenOnly&&!this.curIsFullscreen&&this.fullscreenIcon&&o("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},o("ion-button",{onClick:function(){return t._toggleFullScreen(true)}},o("cty-icon",{name:this.fullscreenIcon}))),!this.fullscreenOnly&&this.curIsFullscreen&&this.exitFullscreenIcon&&o("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},o("ion-button",{onClick:function(){return t._toggleFullScreen(false)}},o("cty-icon",{name:this.exitFullscreenIcon}))),o("slot",{name:"footerCol"}))),this.isMoving&&o("div",{class:"cty-video__opn-toast flex-center"},o("cty-icon",{name:this.controlIcon}),o("span",null,this.controlLabel)),o("slot",{name:"controls"}),!this.isPC&&this.controls&&o("div",{class:"cty-video__opn-panel",onTouchStart:this._doOpnStart,onTouchMove:this._doOpnMove,onTouchEnd:this._doOpnEnd,onClick:function(t){return t.stopPropagation()}}),this.isPC&&this.controls&&o("div",{class:"cty-video__opn-panel",onMouseDown:this._doOpnStart,onMouseMove:this._doOpnMove,onMouseUp:this._doOpnEnd,onMouseLeave:this._doOpnEnd,onClick:function(t){return t.stopPropagation()}}),this.showCtrl&&this.showDotPanel&&o("div",{ref:function(e){t.dotPanelEl=e},class:{"cty-video__dot-panel flex-center":true,"cty-video__dot-panel-ex":this.progressPosition=="top"},onClick:function(t){return t.stopPropagation()},style:{top:this.dotDotPanelTop,left:this.dotDotPanelLeft,opacity:this.reallyShowDot?"1":"0"}},o("span",{class:"cty-video__dot-label cty-ellipsis2"},this.currentMarker.describe),o("ion-button",{onClick:this._toPoint},o("cty-icon",{name:"cty-play-ex"}),"知识点"),o("span",{class:"cty-video__dot-triangle",style:{"margin-left":this.triangleMargin+"px"}})),o("slot",{name:"ctrl"}))};t.prototype.render=function(){var t=this;return o(r,{key:"6adfc085d212a7f444cbfdebcaa8db55c16c28ad",class:{"cty-video":true,"cty-video__vertical":this.deviceIsPORTRAIT,"cty-video__unfullscreen":!this.curIsFullscreen,"cty-video__large-screen":this.direction=="P"&&this.curIsFullscreen&&(this.isPC||this.isIpad)}},this.renderPlayer(),this.renderControls(),(!this.isLoading||this.isMicroMessager)&&!this.isPlaying&&!this.showInteractiveLayer&&this.showTogglePlay&&o("ion-button",{key:"5fc0a3de547d15aacfaf97d5d88386d01f42cc36",part:"toggle-play",class:"cty-video__toggle-play flex-center",onClick:function(e){t.toggleVideo(e)}},o("cty-icon",{key:"bdaf69d81dc56cab662dad85fade4a96211092a8",name:"cty-play"})),!this.isWifi&&!this.isPlaying&&!this.isLoading&&!this.isMicroMessager&&this.trafficMsg&&o("div",{key:"88706702c3db5d24dfdcc705166acb7d87588baf",class:"cty-video__toast cty-ellipsis",part:"toast"},this.trafficMsg),this.warningMsg!=""&&o("div",{key:"d0fc2227043e207f86006b31a101db5cff24aaa8",class:"cty-video__toast cty-ellipsis",part:"toast"},this.warningMsg),this.showPlayRate&&o("div",{key:"4f9fd7d4f4d1553cce4ff1b6b11c0f189a3ebe25",class:"cty-video__rate",onClick:function(){return t.showPlayRate=false}},o("div",{key:"b6f4d58a9dd2491cb8df589e3cbde6116a5930ab",class:"cty-video__rate-mask flex-center-justify-end"},o("div",{key:"9d9fa14f992b76a7c3068992c2a5ba2bf6d90f84",class:"cty-video__rate-list"},this._rates.map((function(e){return o("button",{onClick:function(){return t.setPlayRate(e)},class:{active:t.rate==e,"cty-video__rate-list-item":true}},o("span",null,e,"X"))}))))),this.hasInteractive&&this.curIsFullscreen&&o("div",{key:"dfa51bb93aecc26bfca408f3670f1ca839fa942f",class:"cty-video__player cty-video__interactive",onClick:function(){},ref:function(e){return t.interactiveEl=e}}))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());z.style=k}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,i,o){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,n){function a(t){try{c(o.next(t))}catch(t){n(t)}}function s(t){try{c(o["throw"](t))}catch(t){n(t)}}function c(t){t.done?i(t.value):r(t.value).then(a,s)}c((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,r,n,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return c([t,e])}}function c(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(i=0)),i)try{if(o=1,r&&(n=s[0]&2?r["return"]:s[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;if(r=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){i.label=s[1];break}if(s[0]===6&&i.label<n[1]){i.label=n[1];n=s;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(s);break}if(n[2])i.ops.pop();i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t];r=0}finally{o=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-BpC3ubr-.system.js","./p-BqniUMS5.system.js","./p-C6ID7w1G.system.js","./p-ChvDscoj.system.js","./p-B6ewx4qT.system.js","./p-DSgG8qVn.system.js","./p-DvPCY95C.system.js","./p-DA6jN8Vz.system.js","./p-NPOR6IxC.system.js","./p-D36DysLX.system.js"],(function(t){"use strict";var e,i,o,r,n,a,s,c,d,l,h,f,v,u,y,p,g,_,b,m,x,w;return{setters:[function(t){e=t.r;i=t.c;o=t.h;r=t.a;n=t.g},function(t){a=t.g;s=t.b;c=t.a},function(t){d=t.s;l=t.r},function(t){h=t.s;f=t.v},function(t){v=t.n},function(t){u=t.d},function(t){y=t.c},function(t){p=t.v;g=t.a;_=t.b;b=t.c;m=t.d;x=t.e},function(t){w=t.i},null],execute:function(){var k='*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}.flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.cty-ellipsis[class]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:normal}.cty-ellipsis2[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;word-break:break-all;word-wrap:break-word}.cty-ellipsis3[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;word-break:break-all;word-wrap:break-word}.cty-ellipsis4[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;word-break:break-all;word-wrap:break-word}ion-button{--background-activated:transparent;--background-focused:transparent;--background-hover:transparent;--box-shadow:none}ion-grid{padding:0}ion-row{padding:0}ion-col{padding:0}ion-item{--padding-bottom:0;--padding-end:0;--padding-start:0;--padding-top:0;--inner-padding-top:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-bottom:0;--inner-border-width:0;--border-width:0;--min-height:0;--background:none;overflow:initial}ion-toast{--width:84%;--height:36px;--color:var(--cty-color-white);--background:rgba(0, 0, 0, 0.7);--border-radius:100px;line-height:1.2;font-size:var(--cty-font-size-base);text-align:center}.plt-hybrid .safe-area-bottom-border{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid var(--cty-color-white)}.plt-hybrid .safe-area-bottom-border-color{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid currentColor}.plt-hybrid .safe-area-bottom-padding{padding-bottom:var(--ion-safe-area-bottom, 0)}:host{--cty-video-width:100vw;--cty-video-height:100vh;--cty-video-half-width:calc(var(--cty-video-width) / 2);--cty-video-fit:fill;--cty-video-header-height:50px;--cty-video-header-background:var(--cty-overlay-color-lighter);--cty-video-header-unfullscreen-background:transparent;--cty-video-header-unfullscreen-height:30px;--cty-video-header-padding-top:0px;--cty-video-header-padding-bottom:0px;--cty-video-header-padding-start:0px;--cty-video-header-padding-end:0px;--cty-video-header-back-display:flex;--cty-video-header-back-background:transparent;--cty-video-header-back-height:36px;--cty-video-header-back-width:36px;--cty-video-header-back-radius:var(--cty-border-radius-circle);--cty-video-header-back-offset-start:2px;--cty-video-header-back-offset-end:0px;--cty-video-header-back-size:25px;--cty-video-header-back-color:var(--cty-color-white);--cty-video-header-title-size:var(--cty-font-size-medium);--cty-video-header-title-color:var(--cty-color-white);--cty-video-header-title-display:flex;--cty-video-footer-height:50px;--cty-video-footer-background:var(--cty-overlay-color-lighter);--cty-video-footer-unfullscreen-background:transparent;--cty-video-footer-unfullscreen-height:35px;--cty-video-footer-progress-height:0px;--cty-video-footer-padding-start:0px;--cty-video-footer-padding-end:0px;--cty-video-footer-progress-size:var(--cty-font-size-medium);--cty-video-footer-icon-size:24px;--cty-video-footer-fullscreen-icon-size:20px;--cty-video-play-size:80px;--cty-video-play-border:5px solid rgb(238 238 238 / 80%);--cty-video-play-icon-size:40px;--cty-video-unfullscreen-play-size:40px;--cty-video-unfullscreen-play-border:4px solid rgb(238 238 238 / 80%);--cty-video-unfullscreen-play-icon-size:26px;--cty-video-range-bar-height:2px;--cty-video-bar-size:12px;--cty-video-bar-color:var(--cty-color-white);--cty-video-range-knob-background:var(--cty-color-white);--cty-video-range-background:rgb(255 255 255 / 50%);--cty-video-range-background-active:var(--cty-color-primary);--cty-video-loading-background-color:rgb(0 0 0 / 90%);--cty-video-loading-img-width:100px;--cty-video-half-screen-height:56vw;--cty-video-dot-size:7px;--cty-video-dot-padding:9px;--cty-video-dot-active-color:var(--cty-color-primary);--cty-video-progress-vertical-padding:0 15px;--cty-video-progress-horizongtal-padding:0px;--cty-video-rate-active-color:var(--cty-color-primary);--cty-video-toast-width:calc(var(--cty-video-width) * 0.4);--cty-video-toast-height:40px;--cty-video-opn-toast-icon-size:20px;position:relative;display:block;width:var(--cty-video-width);height:var(--cty-video-height);background:var(--cty-color-black)}ion-row{height:100%}ion-col{overflow:hidden}ion-button{min-height:auto;margin:0}.cty-video__wrapper{position:relative;width:100%;height:100%}.cty-video__player{position:absolute;top:0;left:0;display:none;width:var(--cty-video-height);height:var(--cty-video-width);margin:0;-o-object-fit:var(--cty-video-fit);object-fit:var(--cty-video-fit);-webkit-transform:rotate(90deg) translate(0, -100%);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__controls{position:absolute;top:0;left:0;width:100%;height:100%}.cty-video__header{position:absolute;top:0;left:0;z-index:6;-webkit-box-sizing:content-box;box-sizing:content-box;width:calc(var(--cty-video-height) - var(--cty-video-header-padding-start) - var(--cty-video-header-padding-end));height:var(--cty-video-header-height);padding:var(--cty-video-header-padding-top) var(--cty-video-header-padding-end) var(--cty-video-header-padding-bottom) var(--cty-video-header-padding-start);background:var(--cty-video-header-background);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__header-back{display:var(--cty-video-header-back-display);-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__header-back ion-button{width:var(--cty-video-header-back-width);height:var(--cty-video-header-back-height);margin-right:var(--cty-video-header-back-offset-end);margin-left:var(--cty-video-header-back-offset-start);border-radius:var(--cty-video-header-back-radius);--background:var(--cty-video-header-back-background);--padding-start:5px;--padding-end:5px;--padding-top:0;--padding-bottom:0}.cty-video__header-back cty-icon{font-size:var(--cty-video-header-back-size);color:var(--cty-video-header-back-color)}.cty-video__title[class]{display:var(--cty-video-header-title-display);font-size:var(--cty-video-header-title-size);line-height:var(--cty-video-header-height);color:var(--cty-video-header-title-color)}.cty-video__footer{position:absolute;top:0;left:0;z-index:6;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--cty-video-height);height:var(--cty-video-footer-height);padding-right:var(--cty-video-footer-padding-end);padding-left:var(--cty-video-footer-padding-start);background:var(--cty-video-footer-background);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:calc(var(--cty-video-footer-height) / 2) calc(var(--cty-video-footer-height) / 2);transform-origin:calc(var(--cty-video-footer-height) / 2) calc(var(--cty-video-footer-height) / 2)}.cty-video__footer ion-button{height:100%;--background:transparent;--padding-start:12px;--padding-end:12px;--padding-top:0;--padding-bottom:0;--color:var(--cty-color-white)}.cty-video__footer ion-row{height:calc(var(--cty-video-footer-height) - var(--cty-video-footer-progress-height))}.cty-video__footer .cty-video__footer-progress__top{height:var(--cty-video-footer-progress-height);-webkit-transform:translateY(calc(var(--cty-video-footer-progress-height) / 2));transform:translateY(calc(var(--cty-video-footer-progress-height) / 2))}.cty-video__footer-controls{background:transparent}.cty-video__footer-controls ion-col:not(.cty-video__footer-progress){opacity:0}.cty-video__footer-controls .cty-video__time{opacity:0}.cty-video__footer-toggle-play{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-toggle-play cty-icon{font-size:var(--cty-video-footer-icon-size)}.cty-video__footer-flex{-ms-flex:1;flex:1}.cty-video__footer-time-label{margin-left:8px;font-size:var(--cty-video-footer-progress-size);color:var(--cty-color-white);letter-spacing:0.2px}.cty-video__footer-time-label span{margin:0 1px;-webkit-transform:translateY(-1px);transform:translateY(-1px)}.cty-video__footer-progress{-ms-flex:1;flex:1;overflow:auto}.cty-video__time{font-size:var(--cty-video-footer-progress-size);color:var(--cty-color-white)}.cty-video__time:nth-child(1){margin-right:12px}.cty-video__time:nth-child(2),.cty-video__time:last-child{margin-left:12px}.cty-video__footer-range{--height:100%;--knob-size:var(--cty-video-bar-size);--bar-height:var(--cty-video-range-bar-height);padding:0;font-size:var(--cty-font-size-medium);color:var(--cty-video-bar-color);opacity:1;--knob-background:var(--cty-video-range-knob-background);--bar-background:var(--cty-video-range-background);--bar-background-active:var(--cty-video-range-background-active)}.cty-video__footer-bar{position:relative;-ms-flex:1;flex:1;height:80%;cursor:pointer}.cty-video__footer-progress__top{position:relative;z-index:2;padding:var(--cty-video-progress-horizongtal-padding)}.cty-video__footer-progress__top .cty-video__footer-bar{height:100%}.cty-video__footer-dot{position:absolute;top:50%;padding:var(--cty-video-dot-padding);-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cty-video__footer-dot::after{display:block;width:var(--cty-video-dot-size);height:var(--cty-video-dot-size);content:"";background:var(--cty-video-dot-active-color);border-radius:var(--cty-border-radius-circle)}.cty-video__footer-rate{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-rate ion-button{--padding-start:5px;--padding-end:5px;--padding-top:4px;--padding-bottom:4px;width:36px;height:auto;margin-left:12px;font-size:var(--cty-font-size-extra-small);font-weight:bold;white-space:nowrap;border:1px solid var(--cty-color-white);border-radius:var(--cty-border-radius-base)}.cty-video__footer-volume{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-volume cty-icon{font-size:var(--cty-video-footer-icon-size)}.cty-video__footer-fullscreen{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-fullscreen ion-button{--padding-start:0px}.cty-video__footer-fullscreen cty-icon{font-size:var(--cty-video-footer-fullscreen-icon-size)}.cty-video__toggle-play{position:absolute;top:50%;left:50%;z-index:8;width:var(--cty-video-play-size);height:var(--cty-video-play-size);margin:calc(var(--cty-video-play-size) / -2) 0 0 calc(var(--cty-video-play-size) / -2);font-weight:bold;text-align:center;border:var(--cty-video-play-border);border-radius:var(--cty-border-radius-circle);--background:transparent;--padding-top:0;--padding-end:0;--padding-start:0;--padding-bottom:0}.cty-video__toggle-play cty-icon{font-size:var(--cty-video-play-icon-size);color:rgba(238, 238, 238, 0.9);text-align:center;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.cty-video__opn-toast{position:absolute;top:50%;left:50%;z-index:4;width:var(--cty-video-toast-width);max-width:150px;height:var(--cty-video-toast-height);font-size:var(--cty-font-size-medium);font-weight:bold;color:var(--cty-color-white);background:var(--cty-overlay-color-light);border-radius:var(--cty-border-radius-round);-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.cty-video__opn-toast cty-icon{margin-right:10px;font-size:var(--cty-video-opn-toast-icon-size)}.cty-video__opn-panel{position:absolute;top:50%;left:50%;z-index:5;width:var(--cty-video-height);height:calc(var(--cty-video-width) - var(--cty-video-header-height) - var(--cty-video-footer-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom));margin:0 0 0 calc((var(--cty-video-footer-height) - var(--cty-video-header-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom)) / 2);-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.cty-video__dot-panel{position:absolute;z-index:6;padding:5px 11px 5px 8px;margin-left:calc(var(--cty-video-footer-height) + 13px + 46px);background:var(--cty-overlay-color);border-radius:var(--cty-border-radius-base);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:left top;transform-origin:left top}.cty-video__dot-panel .cty-video__dot-label{position:relative;max-width:160px;padding-right:17px;font-size:var(--cty-font-size-small);line-height:1.38;color:var(--cty-color-white)}.cty-video__dot-panel .cty-video__dot-label::after{position:absolute;top:0;right:7px;width:1px;height:100%;content:"";background-color:rgba(255, 255, 255, 0.3);-webkit-transform:scaleX(1.5);transform:scaleX(1.5)}.cty-video__dot-panel ion-button{height:36px;font-size:var(--cty-font-size-small);font-weight:bold;--padding-start:0;--padding-end:0;--background:transparent;--border-radius:0;--color:var(--cty-video-dot-active-color)}.cty-video__dot-panel cty-icon{margin-right:4px;font-size:var(--cty-font-size-medium)}.cty-video__dot-panel .cty-video__dot-triangle{position:absolute;bottom:-18px;left:20px;border-color:transparent;border-style:solid;border-width:9px 8px;border-top-color:var(--cty-overlay-color)}.cty-video__dot-panel-ex{margin-left:calc(var(--cty-video-footer-height) + 46px)}.cty-video__toast[class]{position:absolute;top:50%;z-index:7;min-width:300px;max-width:96vw;padding:0 15px;margin:0 0 0 -60px;font-size:var(--cty-font-size-extra-small);font-weight:bold;line-height:30px;color:rgba(238, 238, 238, 0.9);text-align:center;pointer-events:none;background:var(--cty-overlay-color);border-radius:var(--cty-border-radius-large);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.cty-video__rate{position:absolute;top:0;left:0;z-index:9;width:var(--cty-video-height);height:var(--cty-video-width);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__rate-mask{position:absolute;top:0;right:0;width:40%;height:100%;background-image:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.9)), color-stop(rgba(0, 0, 0, 0.8)), color-stop(rgba(0, 0, 0, 0.5)), to(transparent));background-image:linear-gradient(to left, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5), transparent)}.cty-video__rate-list-item{display:block;width:112px;min-height:50px;font-size:var(--cty-font-size-base);color:var(--cty-color-white);text-align:center;outline:none;background-color:transparent;border:none}.cty-video__rate-list-item.active{color:var(--cty-video-rate-active-color)}.cty-video__interactive{z-index:101;display:none;background-color:transparent;background-repeat:no-repeat;background-size:100% 100%}:host(.cty-video__vertical) cty-loading{--cty-loading-transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__player{top:50%;width:var(--cty-video-width);height:auto;max-height:100%;-webkit-transform:rotate(0deg) translateY(-50%);transform:rotate(0deg) translateY(-50%)}:host(.cty-video__vertical) .cty-video__toggle-play cty-icon{-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__toast{top:80%;left:50%;margin:0;-webkit-transform:rotate(0deg) translateX(-50%);transform:rotate(0deg) translateX(-50%)}:host(.cty-video__vertical) .cty-video__header{width:calc(var(--cty-video-width) - var(--cty-video-header-padding-start) - var(--cty-video-header-padding-end));-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__opn-panel{width:var(--cty-video-width);height:calc(var(--cty-video-height) - var(--cty-video-header-height) - var(--cty-video-footer-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom));margin:calc((var(--cty-video-footer-height) - var(--cty-video-header-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom)) / -2) 0 0;-webkit-transform:translate(-50%, -50%) rotate(0);transform:translate(-50%, -50%) rotate(0)}:host(.cty-video__vertical) .cty-video__opn-toast{top:50%;-webkit-transform:translate(-50%, 0) rotate(0deg);transform:translate(-50%, 0) rotate(0deg)}:host(.cty-video__vertical) .cty-video__footer{top:auto;bottom:0;width:var(--cty-video-width);-webkit-transform:rotate(0);transform:rotate(0)}:host(.cty-video__vertical) .cty-video__footer-progress__top{padding:var(--cty-video-progress-vertical-padding)}:host(.cty-video__vertical) .cty-video__time{font-size:var(--cty-font-size-small)}:host(.cty-video__vertical) .cty-video__footer-time-label{margin-left:0}:host(.cty-video__vertical) .cty-video__rate{width:var(--cty-video-width);height:var(--cty-video-height);-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__dot-panel{bottom:calc(var(--cty-video-footer-height) + 13px);margin-left:0;-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__dot-panel-ex{bottom:var(--cty-video-footer-height)}:host(.cty-video__unfullscreen){height:var(--cty-video-half-screen-height)}:host(.cty-video__unfullscreen) .cty-video__wrapper{background-color:var(--cty-color-black)}:host(.cty-video__unfullscreen) .cty-video__player{top:0;height:var(--cty-video-half-screen-height);max-height:initial;-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__unfullscreen) .cty-video__toggle-play{width:var(--cty-video-unfullscreen-play-size);height:var(--cty-video-unfullscreen-play-size);margin:calc(var(--cty-video-unfullscreen-play-size) / -2) 0 0 calc(var(--cty-video-unfullscreen-play-size) / -2);border:var(--cty-video-unfullscreen-play-border)}:host(.cty-video__unfullscreen) .cty-video__toggle-play cty-icon{font-size:var(--cty-video-unfullscreen-play-icon-size)}:host(.cty-video__unfullscreen) .cty-video__header{height:var(--cty-video-header-unfullscreen-height);background:var(--cty-video-header-unfullscreen-background)}:host(.cty-video__unfullscreen) .cty-video__title{line-height:var(--cty-video-header-unfullscreen-height)}:host(.cty-video__unfullscreen) .cty-video__header-back ion-button{width:30px;height:100%}:host(.cty-video__unfullscreen) .cty-video__footer{height:var(--cty-video-footer-unfullscreen-height);background:var(--cty-video-footer-unfullscreen-background)}:host(.cty-video__unfullscreen) .cty-video__footer ion-row{height:calc(var(--cty-video-footer-unfullscreen-height) - var(--cty-video-footer-progress-height))}:host(.cty-video__unfullscreen) .cty-video__footer .cty-video__footer-progress__top{height:var(--cty-video-footer-progress-height)}:host(.cty-video__unfullscreen) .cty-video__footer ion-button{--padding-start:8px;--padding-end:8px}:host(.cty-video__unfullscreen) .cty-video__footer-fullscreen ion-button{--padding-start:0px}:host(.cty-video__unfullscreen) .cty-video__opn-panel{height:calc(var(--cty-video-half-screen-height) - var(--cty-video-header-unfullscreen-height) - var(--cty-video-footer-unfullscreen-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom))}:host(.cty-video__unfullscreen) .cty-video__opn-toast{top:40%;height:30px}:host(.cty-video__unfullscreen) .cty-video__toast{top:70%}:host(.cty-video__unfullscreen) cty-loading{--cty-loading-overlay-height:var(--cty-video-half-screen-height)}:host(.cty-video__large-screen) .cty-video__player{top:0;left:50%;width:auto;max-width:100%;height:100%;-webkit-transform:rotate(0deg) translateX(-50%);transform:rotate(0deg) translateX(-50%)}.cty-video__audio-player{display:block}.cty-video__player-audio{position:absolute;display:none;visibility:hidden}';var z=t("cty_video",function(){function t(t){var o=this;e(this,t);this.ctyDismiss=i(this,"ctyDismiss",7);this.ctyVideoCanplay=i(this,"ctyVideoCanplay",7);this.ctyVideoTimeupdate=i(this,"ctyVideoTimeupdate",7);this.ctyVideoPlaying=i(this,"ctyVideoPlaying",7);this.ctyVideoPlay=i(this,"ctyVideoPlay",7);this.ctyVideoPause=i(this,"ctyVideoPause",7);this.ctyVideoStalled=i(this,"ctyVideoStalled",7);this.ctyVideoWaiting=i(this,"ctyVideoWaiting",7);this.ctyVideoEnded=i(this,"ctyVideoEnded",7);this.ctyVideoError=i(this,"ctyVideoError",7);this.ctyVideoChangeVolume=i(this,"ctyVideoChangeVolume",7);this.ctyVideoProgress=i(this,"ctyVideoProgress",7);this.ctyVideoScreenChange=i(this,"ctyVideoScreenChange",7);this.ctyVideoIAEnter=i(this,"ctyVideoIAEnter",7);this.ctyVideoIAAction=i(this,"ctyVideoIAAction",7);this.ctyVideoCtrlChange=i(this,"ctyVideoCtrlChange",7);this.ctyVideoRateChange=i(this,"ctyVideoRateChange",7);this.url="";this.poster="";this.startTime=0;this.preload="metadata";this.allowForward=true;this.allowBackward=true;this.unAllowForwardMsg="首次学习不允许快进哦~";this.unAllowRateMsg="首次学习不允许设置播放倍速";this.trafficMsg="当前是非WIFI网络, 可能消耗流量, 点击继续~";this.errorMsg="视频播放异常或网络故障, 请稍后重试。";this.orientation=true;this.autoplay=true;this.trafficAutoplay=false;this.fullscreenOnly=true;this.defaultFullscreen=true;this.fullscreenIcon="cty-fullscreen";this.exitFullscreenIcon="cty-exit-fullscreen";this.direction="L";this.controls=true;this.headerCtrl=true;this.footerCtrl=true;this.title="";this.rates=[.7,1,1.25,1.5];this.rate=1;this.directRate=false;this.loading=false;this.loadingImg="";this.updateNow=true;this.markers=[];this.landscapeEnterTimer=20;this.landscapeLeaveTimer=420;this.togglePlayTimer=150;this.progressPosition="center";this.player="video";this.largeScreenIsPortrait=true;this.allowBackgroundForward=false;this.interactiveActions=[];this.playProgress=0;this.maxPlayProgress=0;this.currentTimeLabel="00:00:00";this.durationLabel="00:00:00";this.isPlaying=false;this.isMute=false;this.showCtrl=true;this.showPlayRate=false;this.showVideoError=true;this.warningMsg="";this.isLoading=true;this.showTogglePlay=false;this.playVolume=100;this.playBrightness=100;this.controlIcon="";this.controlLabel="";this.controlType="";this.lastControlType="";this.touchState={isTouching:false,right:0,height:0,top:0,bottom:0,currentY:0};this.isMoving=false;this.opnStartTime=0;this.opnMoveTime=0;this.opnLx=0;this.opnLy=0;this.opnNx=0;this.opnNy=0;this.isMouseMove=false;this.isMicroMessager=u.isMicroMessager;this.isPC=u.isPC;this.isIOS=u.isIos;this.isIpad=u.isIpad;this.isWifi=v.isWifi;this.isHybrid=u.isHybrid;this.lastTapScreenTime=Date.now();this.footerPrgtime=0;this._curIsFullscreen=true;this.showInteractiveLayer=false;this.hasInteractive=false;this.interactiving_action=null;this.ctrlTimer=0;this.warningMsgTimer=0;this.touchMoveTimer=0;this._rates=[];this.markerList=[];this.currentMarker={describe:"",breakpoint:0,position:0};this.showDotPanel=false;this.dotDotPanelTop="auto";this.dotDotPanelLeft="auto";this.triangleMargin=0;this.reallyShowDot=false;this.isRealWaiting=true;this.isSeeking=false;this.deviceIsPORTRAIT=false;this.canScreenOrientation=false;this.visibilityChangeHandler=function(){};this.iosAppPauseHandler=function(){};this.iosAResumeHandler=function(){};this._doCanplay=function(){setTimeout((function(){o.showTogglePlay=true}),o.togglePlayTimer);if(o.isLoading){o.videoEl.style.display="block"}if((!o.isWifi||o.isMicroMessager||!o.autoplay||!o.loading)&&o.isLoading){o.isLoading=false}o.durationLabel=d(o.videoEl.duration);o.ctyVideoCanplay.emit();o.markerList=o.markers.map((function(t){return Object.assign(Object.assign({},t),{position:+(t.breakpoint/o.videoEl.duration*100).toFixed(3)})}))};this._doTimeupdate=function(){var t=o.videoEl.currentTime;if(!o.isPlaying&&t>0){if(o.isLoading){o.isLoading=false}if(!o.videoEl.paused){o.isPlaying=true}}if(!o.touchState.isTouching){o._updateVideoProgress();o.interactiveCheck(t)}o.ctyVideoTimeupdate.emit(t)};this._doPlay=function(){o.ctyVideoPlay.emit()};this._doPause=function(){o.isPlaying=false;o.ctyVideoPause.emit()};this._doEnded=function(){o.isPlaying=false;o._updateVideoProgress();o.interactiveReset();o.ctyVideoEnded.emit()};this._doPlaying=function(){if(!w("android")){if(o.isLoading){o.isLoading=false}o.isPlaying=true}o.ctyVideoPlaying.emit()};this._doChangeVolume=function(){o.playVolume=Math.round(o.videoEl.volume*100);o.ctyVideoChangeVolume.emit()};this._doError=function(){if(!o.isLoading&&o.showVideoError){o.warningMsg=o.errorMsg;o.clearWarningMsg();o.ctyVideoError.emit(true);return}if(o.isLoading){o.isLoading=false;o.showTogglePlay=true}o.ctyVideoError.emit(false)};this._doStalled=function(){o.ctyVideoStalled.emit()};this._doWaiting=function(){if(o.isRealWaiting&&!o.isSeeking){o.ctyVideoWaiting.emit(o.videoEl.currentTime)}};this._doSeeked=function(){if(o.isSeeking=false){o.isRealWaiting=true}};this._dismiss=function(){if(!o.fullscreenOnly&&o.curIsFullscreen){o.curIsFullscreen=false;if(o.isHybrid){l.toggleStatusBar(true)}if(o.canScreenOrientation){h.lock("portrait").catch((function(){}))}o.ctyDismiss.emit(false);return}if(!o.videoEl.paused){o.pause();o.ctyDismiss.emit(false);return}if(o.isHybrid){l.toggleStatusBar(true)}if(o.canScreenOrientation){if(o.landscapeLeaveTimer>0){setTimeout((function(){h.lock("portrait").catch((function(){}))}),o.landscapeLeaveTimer)}else{h.lock("portrait").catch((function(){}))}}o.ctyDismiss.emit(true)};this._doSetRate=function(){if(!o.allowForward){o.warningMsg=o.unAllowRateMsg;o.clearWarningMsg();return}if(o.direction!="L"||o.directRate){var t=o.rates.findIndex((function(t){return t==o.rate}))+1;if(t==o.rates.length){t=0}o.setPlayRate(o.rates[t]);return}o.showCtrl=false;o.showPlayRate=true;o._resetDot();o.ctyVideoCtrlChange.emit(o.showCtrl)};this._toggleFullScreen=function(t){o.curIsFullscreen=t;if(o.isHybrid){l.toggleStatusBar(!t)}if(o.canScreenOrientation){h.lock(t?"landscape":"portrait").catch((function(){}))}o.ctyVideoScreenChange.emit(t)};this._doPrgTouchstart=function(t){var e;if(t.type=="mousedown"){o.isMouseMove=true}o.isRealWaiting=false;if(!o.allowForward&&!o.allowBackward||((e=t.touches)===null||e===void 0?void 0:e.length)>1){return true}o.isSeeking=true;var i=a(t.currentTarget);o.touchState.top=i.top;o.touchState.height=i.bottom-o.touchState.top;o.touchState.right=i.right;o.touchState.bottom=i.bottom;o.touchState.isTouching=true;if(o.deviceIsPORTRAIT){o.touchState.top=i.left;o.touchState.height=i.right-o.touchState.top;o.touchState.right=i.bottom;o.touchState.bottom=i.right}o.touchState.currentY=o._getPoint(t).x;o.maxPlayProgress=Math.max(o.playProgress,o.maxPlayProgress);o._changeProgressByTouch();o.clearCtrlTimeout();return true};this._doPrgTouchmove=function(t){var e;if(!o.isMouseMove&&t.type=="mousemove"){return}if(((e=t.touches)===null||e===void 0?void 0:e.length)>1){return true}var i=Date.now();if(o.footerPrgtime+50>i){return true}o.footerPrgtime=i;var r=o._getPoint(t).x;var n=Math.abs(r-o.touchState.currentY)*100/o.touchState.height;o.touchState.currentY=r;if(n>1||t.type=="mousemove"){o._changeProgressByTouch(o.updateNow)}return true};this._doPrgTouchend=function(t){if(t.type=="mouseleave"&&!o.isMouseMove){return}if(t.type=="mouseup"||t.type=="mouseleave"){o.isMouseMove=false}if(o.touchState.isTouching){o._changeProgressByTouch()}o.touchState.isTouching=false;o.isSeeking=false;return true};this._doOpnStart=function(t){if(t.type=="mousedown"){o.isMouseMove=true}o.isSeeking=true;o.isRealWaiting=false;var e=a(t.currentTarget);o.touchState.top=e.top;o.touchState.height=e.bottom-o.touchState.top;o.touchState.right=e.right;o.touchState.bottom=e.bottom;o.touchState.isTouching=true;if(o.deviceIsPORTRAIT){o.touchState.top=e.left;o.touchState.height=e.right-o.touchState.top;o.touchState.right=e.bottom;o.touchState.bottom=e.right}var i=o._getPoint(t),r=i.x,n=i.y;o.opnLx=r;o.opnLy=n;o.maxPlayProgress=Math.max(o.playProgress,o.maxPlayProgress);o.opnStartTime=(new Date).getTime();return true};this._doOpnMove=function(t){if(!o.isMouseMove&&t.type=="mousemove"){return}if(o.opnMoveTime===0){o.opnMoveTime=(new Date).getTime()}if(o.opnMoveTime-o.opnStartTime<1500){o.showCtrl=true;o.clearCtrlTimeout();o.isMoving=true;var e=o._getPoint(t),i=e.x,r=e.y;o.opnNx=i;o.opnNy=r;if(!o.controlType){if(Math.abs(o.opnNx-o.opnLx)>=Math.abs(o.opnNy-o.opnLy)){o.controlType="P";o.controlLabel=o.currentTimeLabel}else{if(!o.isIOS){if(o.opnLx>o.touchState.height*.5){o.controlType="V";o.controlIcon="cty-volume-high";o.controlLabel=o.playVolume+"%"}else{o.controlType="B";o.controlIcon="cty-brightness";o.controlLabel=o.playBrightness+"%"}}else{o.controlType="B";o.controlIcon="cty-brightness";o.controlLabel=o.playBrightness+"%"}}}if(o.controlType=="P"){o.controlIcon=o.opnNx-o.opnLx>0?"cty-forward":"cty-backward"}switch(o.controlType){case"B":if(o.opnNy-o.opnLy<0&&!o.deviceIsPORTRAIT||o.opnNy-o.opnLy>0&&o.deviceIsPORTRAIT){o.playBrightness-=2;o.playBrightness=Math.max(o.playBrightness,0);if(o.updateNow){o._updateBrightness()}}else if(o.opnNy-o.opnLy>0&&!o.deviceIsPORTRAIT||o.opnNy-o.opnLy<0&&o.deviceIsPORTRAIT){o.playBrightness+=2;o.playBrightness=Math.min(o.playBrightness,100);if(o.updateNow){o._updateBrightness()}}o.controlLabel=o.playBrightness+"%";break;case"V":if(o.opnNy-o.opnLy<0&&!o.deviceIsPORTRAIT||o.opnNy-o.opnLy>0&&o.deviceIsPORTRAIT){o.playVolume-=2;o.playVolume=Math.max(o.playVolume,0);if(o.updateNow){o._updateVolume()}}else if(o.opnNy-o.opnLy>0&&!o.deviceIsPORTRAIT||o.opnNy-o.opnLy<0&&o.deviceIsPORTRAIT){o.playVolume+=2;o.playVolume=Math.min(o.playVolume,100);if(o.updateNow){o._updateVolume()}}o.controlLabel=o.playVolume+"%";break;case"P":if(o.opnNx-o.opnLx>0){if(!o.allowForward&&o.playProgress>=o.maxPlayProgress){o.isMoving=false;o.unAllowForward();return}o.playProgress+=1;o.playProgress=Math.min(o.playProgress,1e3);if(o.updateNow){o.videoEl.currentTime=o.playProgress/1e3*o.videoEl.duration;o._updateVideoProgress()}o.controlLabel=d(o.playProgress/1e3*o.videoEl.duration)}else if(o.opnNx-o.opnLx<0){o.playProgress-=1;o.playProgress=Math.max(0,o.playProgress);if(o.updateNow){o.videoEl.currentTime=o.playProgress/1e3*o.videoEl.duration;o._updateVideoProgress()}o.controlLabel=d(o.playProgress/1e3*o.videoEl.duration)}else{o.interactiveReset()}break}o.lastControlType=o.controlType;o.opnLx=o.opnNx;o.opnLy=o.opnNy}};this._doOpnEnd=function(t){if(t.type=="mouseleave"&&!o.isMouseMove){return}if(t.type=="mouseup"||t.type=="mouseleave"){o.isMouseMove=false}if(!o.isMoving){o.showCtrl=!o.showCtrl;o.ctyVideoCtrlChange.emit(o.showCtrl);o._resetDot();var e=Date.now();if(e-o.lastTapScreenTime<400){o.lastTapScreenTime=o.lastTapScreenTime-1e3;o.toggleVideo(null)}else{o.lastTapScreenTime=e}}if(!o.updateNow){switch(o.controlType){case"B":o._updateBrightness();break;case"V":o._updateVolume();break;case"P":o.videoEl.currentTime=o.playProgress/1e3*o.videoEl.duration;o._updateVideoProgress();break}}o.controlType="";o.clearCtrlTimeout();o.touchState.isTouching=false;o.opnMoveTime=0;o._clearTouchMoveToast();o.isSeeking=false};this._doDot=function(t,e){t.stopPropagation();o.clearCtrlTimeout();if(o.currentMarker.breakpoint>0&&e.breakpoint==o.currentMarker.breakpoint){o.setVideoCurrentTime(o.currentMarker.breakpoint,(function(){o._resetDot();o.play()}));return}o.showDotPanel=true;o.currentMarker=e;var i=a(t.target);var r=i.top+i.height/2;var n=i.left+i.width/2;o.reallyShowDot=false;window.setTimeout((function(){var t=o.dotPanelEl;var e=t.parentNode.offsetHeight;var i=t.parentNode.offsetWidth;var a=t.offsetWidth;var s=t.children[t.children.length-1];var c=r-s.offsetLeft-s.offsetWidth/2+o.triangleMargin;var d=n-s.offsetLeft-s.offsetWidth/2+o.triangleMargin;o.dotDotPanelTop=c+"px";o.dotDotPanelLeft=d+"px";var l=e-a-20;var h=i-a-20;if(o.canScreenOrientation){if(d>h){o.triangleMargin=d-h;o.dotDotPanelLeft=h+"px"}else if(d<5){o.triangleMargin=d-5;o.dotDotPanelLeft="5px"}else{o.triangleMargin=0}o.dotDotPanelTop="auto"}else{if(c>l){o.triangleMargin=c-l;o.dotDotPanelTop=l+"px"}else if(c<5){o.triangleMargin=c-5;o.dotDotPanelTop="5px"}else{o.triangleMargin=0}o.dotDotPanelLeft="auto"}window.setTimeout((function(){o.reallyShowDot=true}),10)}),100)};this._toPoint=function(){o.clearCtrlTimeout();o.setVideoCurrentTime(o.currentMarker.breakpoint,(function(){o._resetDot();o.play()}))}}Object.defineProperty(t.prototype,"curIsFullscreen",{get:function(){return this._curIsFullscreen},set:function(t){this._curIsFullscreen=t;this.deviceIsPORTRAIT=this.direction=="P"||!t||this.largeScreenIsPortrait&&(this.isPC||this.isIpad)||this.canScreenOrientation&&t},enumerable:false,configurable:true});t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,o;return __generator(this,(function(r){switch(r.label){case 0:if(!(!this.isIOS&&!this.isMicroMessager&&f.isAvailable))return[3,5];r.label=1;case 1:r.trys.push([1,4,,5]);t=this;return[4,f.getVolume()];case 2:t.playVolume=r.sent();e=this;return[4,f.isMuted()];case 3:e.isMute=r.sent();return[3,5];case 4:i=r.sent();return[3,5];case 5:if(!this.defaultFullscreen&&!this.fullscreenOnly){this.curIsFullscreen=false}o=this.rates.map((function(t){return t}));this._rates=o;this.hasInteractive=Array.isArray(this.interactiveActions)&&this.interactiveActions.length>0;this.interactiveReset();this.showTogglePlay=!this.autoplay;return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.canScreenOrientation=this.orientation&&this.direction=="L"&&this.isHybrid&&w("mobile")&&!this.isIpad;this.deviceIsPORTRAIT=this.direction=="P"||!this.curIsFullscreen||this.largeScreenIsPortrait&&(this.isPC||this.isIpad)||this.canScreenOrientation;if(this.canScreenOrientation&&this.curIsFullscreen){if(this.landscapeEnterTimer>0){setTimeout((function(){h.lock("landscape").catch((function(){}))}),this.landscapeEnterTimer)}else{h.lock("landscape").catch((function(){}))}}else if(this.isHybrid&&w("mobile")){h.lock("portrait").catch((function(){}))}if(+this.startTime>0){this.videoEl.currentTime=Number(this.startTime)}this.videoEl.controls=false;this.videoEl.playbackRate=this.rate;if(this.isMicroMessager){window.setTimeout((function(){t.isLoading=false;t.showTogglePlay=true;t.videoEl.style.display="block"}),2500)}else if(!this.isWifi){window.setTimeout((function(){t.isLoading=false;t.showTogglePlay=true;t.videoEl.style.display="block"}),1500)}else if(+this.startTime>0){this.videoEl.style.display="block"}if(!this.allowBackgroundForward&&this.isIOS){var e=1;var i="";var o=0;if(this.isMicroMessager){this.visibilityChangeHandler=function(){if(!t.allowForward&&t.videoEl){if(e%2==1){t.showVideoError=false;i=t.videoEl.src;o=t.videoEl.currentTime;t.videoEl.src="data:video/mp4;base64,YQ=="}else{t.videoEl.src=i;window.setTimeout((function(){t.videoEl.currentTime=o;t.showVideoError=true}),1500)}e++}};document.addEventListener("visibilitychange",this.visibilityChangeHandler)}else{this.iosAppPauseHandler=function(){if(t.videoEl&&!t.allowForward){t.showVideoError=false;i=t.videoEl.src;o=t.videoEl.currentTime;t.videoEl.src="data:video/mp4;base64,YQ=="}};this.iosAResumeHandler=function(){if(t.videoEl&&!t.allowForward){t.videoEl.src=i;window.setTimeout((function(){t.showVideoError=false;t.videoEl.currentTime=o}),1500)}};document.addEventListener("pause",this.iosAppPauseHandler);document.addEventListener("resume",this.iosAResumeHandler)}}};t.prototype.disconnectedCallback=function(){clearTimeout(this.ctrlTimer);clearTimeout(this.warningMsgTimer);clearTimeout(this.touchMoveTimer);if(!this.allowBackgroundForward&&this.isIOS){if(this.isMicroMessager){document.removeEventListener("visibilitychange",this.visibilityChangeHandler)}else{document.removeEventListener("pause",this.iosAppPauseHandler);document.removeEventListener("resume",this.iosAResumeHandler)}}this.videoEl&&(this.videoEl.src="")};t.prototype._getVolumeIconName=function(){if(this.isMute){return p}if(this.playVolume==0){return g}else if(this.playVolume<30){return _}else if(this.playVolume<70){return b}else{return m}};t.prototype.unAllowForward=function(){this.warningMsg=this.unAllowForwardMsg;this.clearWarningMsg()};t.prototype.play=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.videoEl.paused){this.videoEl.play()}this.isPlaying=true;return[2]}))}))};t.prototype.setCtrlShow=function(){return __awaiter(this,arguments,void 0,(function(t){if(t===void 0){t=false}return __generator(this,(function(e){this.showCtrl=t;this._resetDot();this.ctyVideoCtrlChange.emit(t);return[2]}))}))};t.prototype.pause=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.videoEl.paused){this.videoEl.pause()}this.isPlaying=false;return[2]}))}))};t.prototype.setVideoCurrentTime=function(t,e){return __awaiter(this,void 0,void 0,(function(){var i;return __generator(this,(function(o){this.maxPlayProgress=Math.max(this.maxPlayProgress,this.playProgress);i=this.videoEl.duration*this.maxPlayProgress/1e3;if(t>i&&!this.allowForward){this.unAllowForward();return[2]}this.videoEl.currentTime=t;e&&e();return[2]}))}))};t.prototype._clearTouchMoveToast=function(){var t=this;clearTimeout(this.touchMoveTimer);this.touchMoveTimer=window.setTimeout((function(){t.isMoving=false}),2e3)};t.prototype.clearCtrlTimeout=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){if(this.showCtrl){clearTimeout(this.ctrlTimer);this.ctrlTimer=window.setTimeout((function(){t.showCtrl=false;t.touchState.isTouching=false;t._resetDot();t.ctyVideoCtrlChange.emit(false)}),4e3)}return[2]}))}))};t.prototype.setWarningMsg=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.warningMsg=t;this.clearWarningMsg();return[2]}))}))};t.prototype.clearWarningMsg=function(){var t=this;if(this.warningMsg!=""){clearTimeout(this.warningMsgTimer);this.warningMsgTimer=window.setTimeout((function(){t.warningMsg=""}),2e3)}};t.prototype.toggleVideo=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.isLoading){return[2]}if(this.videoEl.paused){this.play()}else{this.pause()}if(t){this.clearCtrlTimeout();t.stopPropagation()}return[2]}))}))};t.prototype.toggleVolume=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:if(!(!this.isIOS&&!this.isMicroMessager&&f.isAvailable))return[3,6];i.label=1;case 1:i.trys.push([1,4,,5]);return[4,f.toggleMute()];case 2:i.sent();t=this;return[4,f.isMuted()];case 3:t.isMute=i.sent();return[3,5];case 4:e=i.sent();if(this.isMute){f.setVolume(this.playVolume)}else{f.setVolume(0)}this.isMute=!this.isMute;return[3,5];case 5:return[3,7];case 6:this.videoEl.muted=!this.videoEl.muted;this.isMute=this.videoEl.muted;i.label=7;case 7:this.clearCtrlTimeout();return[2]}}))}))};t.prototype.setPlayRate=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.rate=t;this.videoEl.playbackRate=this.rate;this.showPlayRate=false;this.ctyVideoRateChange.emit(t);return[2]}))}))};t.prototype._getPoint=function(t){var e=s(t),i=e.x,o=e.y;try{if(this.deviceIsPORTRAIT){return{x:i,y:o}}return{x:o,y:i}}catch(t){return{x:0,y:0}}};t.prototype._changeProgressByTouch=function(t){if(t===void 0){t=true}if(!this.allowForward&&!this.allowBackward){return}var e=Math.round((this.touchState.currentY-this.touchState.top)/this.touchState.height*1e3);if(!this.allowBackward&&e<this.playProgress){return}if(!this.allowForward&&e>this.maxPlayProgress){this.unAllowForward();return}this.lastControlType="P";this.isMoving=true;if(this.playProgress>e){this.controlIcon="cty-backward"}else if(this.playProgress<e){this.controlIcon="cty-forward"}this.playProgress=e;if(e==0){this.interactiveReset();this.isMoving=false}if(t){this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration;this._updateVideoProgress()}else{this.controlLabel=d(this.playProgress/1e3*this.videoEl.duration)}this._clearTouchMoveToast()};t.prototype._updateVideoProgress=function(){var t=this.videoEl.currentTime;var e=this.videoEl.duration;this.playProgress=e>0?Math.round(t/e*1e3):0;this.ctyVideoProgress.emit(this.playProgress/10);this.currentTimeLabel=d(t);this.durationLabel=d(e);if(this.lastControlType=="P"){this.controlLabel=this.currentTimeLabel}};t.prototype._updateBrightness=function(){var t="rgba(0,0,0, "+(100-this.playBrightness)/1.6/100+")";this.videoCtrlEl.style.backgroundColor=t};t.prototype._updateVolume=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:if(!(!this.isIOS&&!this.isMicroMessager&&f.isAvailable))return[3,6];i.label=1;case 1:i.trys.push([1,4,,5]);return[4,f.setVolume(this.playVolume)];case 2:i.sent();t=this;return[4,f.isMuted()];case 3:t.isMute=i.sent();return[3,5];case 4:e=i.sent();return[3,5];case 5:return[3,7];case 6:this.videoEl.volume=this.playVolume/100;i.label=7;case 7:this.videoEl.volume=this.playVolume/100;if(this.playVolume>0&&this.isMute){this.toggleVolume()}return[2]}}))}))};t.prototype._resetDot=function(){this.showDotPanel=false;this.currentMarker={describe:"",breakpoint:0,position:0}};t.prototype.getVideoElement=function(){var t=this;return Promise.resolve().then((function(){return t.videoEl}))};t.prototype.getVideoState=function(){var t=this;return Promise.resolve().then((function(){var e=t,i=e.maxPlayProgress,o=e.isWifi,r=e.isLoading,n=e.playProgress,a=e.isPlaying;return{maxPlayProgress:i,isWifi:o,isLoading:r,playProgress:n,isPlaying:a}}))};t.prototype.interactiveCheck=function(t){var e;if(!this.hasInteractive||this.showInteractiveLayer){return}for(var i=0,o=this.interactiveActions;i<o.length;i++){var r=o[i];if(this.checkActionTriggerCond(r,t,"play")){this.showInteractiveLayer=true;this.interactiving_action=r;r.status.entercount++;for(var n=0,a=r.buttons;n<a.length;n++){var s=a[n];if(s.type=="optbtn"){s.val=s.defaultval}}var c=false;if(((e=r.autoactions)===null||e===void 0?void 0:e.length)>0){for(var d=0,l=r.autoactions;d<l.length;d++){var h=l[d];if(this.calcTriggerCond(this.interactiving_action,h.condtrigger)){this.pause();this.doInteractiveAction(h);c=true;break}}}if(!c&&r.buttons.length>0){this.pause();this.showInteractiveActionUI(r)}break}}};t.prototype.changeInteractiveAction=function(t){if(!this.hasInteractive&&!this.showInteractiveLayer){return}this.clearInteractiveActionUI();this.interactiving_action=t;t.status.entercount++;for(var e=0,i=t.buttons;e<i.length;e++){var o=i[e];if(o.type=="optbtn"){o.val=o.defaultval}}this.showInteractiveActionUI(t)};t.prototype.checkActionTriggerCond=function(t,e,i){var o=t.playtrigger;if(i=="play"&&(e<o.min||e>=o.max)){return false}if(this.calcTriggerCond(t,t.condtrigger)){return true}return false};t.prototype.calcTriggerCond=function(t,e){var i=true;for(var o=0,r=e;o<r.length;o++){var n=r[o];var a=true;var s=null;switch(n.type){case"entercount":s=this.findInteractiveAction(n.actionid,t);if(s!=null){var c=s.status.entercount;a=c>=n.min&&(c<n.max||n.max=="")}break;case"optbtn":s=this.findInteractiveAction(n.actionid,t);if(s!=null){for(var d=0,l=s.buttons;d<l.length;d++){var h=l[d];if(h.type=="optbtn"&&h.id==n.btnid){a=h.val==n.val;break}}}break;case"group":a=this.calcTriggerCond(t,n.subs);break}if(n.op=="or"){i=i||a}else{i=i&&a}}return i};t.prototype.findInteractiveAction=function(t,e){if(t.trim()==""){return e}for(var i=0,o=this.interactiveActions;i<o.length;i++){var r=o[i];if(r.id==t){return r}}return null};t.prototype.interactiveAction=function(t){t.stopPropagation();if(this.interactiving_action==null){return}var e=this.interactiving_action.imgW;var i=this.interactiving_action.imgH;for(var o=0,r=this.interactiving_action.buttons;o<r.length;o++){var n=r[o];var a={x:n.x,y:n.y,width:n.w,height:n.h};if(this.interactiveClickHitCheck(t,a,e,i)){switch(n.type){case"optbtn":n.val=n.val==1?"0":"1";this.refreshInteractiveActionBtnStatus(this.interactiving_action);break;case"link":case"input":this.doInteractiveAction(n);break;case"action":default:for(var s=0,c=n.actions;s<c.length;s++){var d=c[s];if(this.calcTriggerCond(this.interactiving_action,d.condtrigger)){this.doInteractiveAction(d);break}}break}break}}};t.prototype.doInteractiveAction=function(t){var e=this;if(t.type=="action"){this.changeInteractiveAction(this.findInteractiveAction(t.actionid,this.interactiving_action))}else if(t.type=="play"){this.videoEl.currentTime=t.startTime;this.play();this.clearInteractiveActionUI();window.setTimeout((function(){e.interactiving_action=null;e.hideInteractiveActionUI()}),100)}else if(t.type=="link"){if(!t.link){this.play();this.clearInteractiveActionUI();window.setTimeout((function(){e.interactiving_action=null;e.hideInteractiveActionUI()}),100);return}this.ctyVideoIAAction.emit(t)}};t.prototype.interactiveClickHitCheck=function(t,e,i,o){var r=o;var n=i;var a=this.interactiveEl;var s=e.y*r/o;var d=e.x*n/i;var l=e.width*n/i;var h=e.height*r/o;var f=c(t),v=f.x,u=f.y;var y=(v-a.offsetLeft)*n/a.clientWidth;var p=(u-a.offsetTop)*r/a.clientHeight;if(y>=d&&y<=d+l&&p>=s&&p<=s+h){return true}return false};t.prototype.showInteractiveActionUI=function(t){this.interactiveEl.style.display="block";if(t.img!=""){this.interactiveEl.style.backgroundImage="url("+t.img+")"}this.refreshInteractiveActionBtnStatus(t);this.ctyVideoIAEnter.emit()};t.prototype.hideInteractiveActionUI=function(){this.showInteractiveLayer=false;this.clearInteractiveActionUI();this.interactiveEl.style.display="none"};t.prototype.refreshInteractiveActionBtnStatus=function(t){var e=this.interactiveEl;var i="";for(var o=0,r=t.buttons;o<r.length;o++){var n=r[o];if(n.type=="optbtn"){i+=n.htmls[n.val]||""}}e.innerHTML=i};t.prototype.clearInteractiveActionUI=function(){this.interactiveEl.innerHTML=""};t.prototype.interactiveReset=function(){if(!this.hasInteractive){return}this.showInteractiveLayer=false;for(var t=0,e=this.interactiveActions;t<e.length;t++){var i=e[t];i.status.entercount=0;for(var o=0,r=i.buttons;o<r.length;o++){var n=r[o];if(n.type=="optbtn"){n.val=n.defaultval}}}};t.prototype.renderPlayer=function(){var t=this;var e=this.poster||"".concat(y.get("resUrlPrefix",""),"assets/cty_res/img/poster.jpg");return o("div",{class:"cty-video__wrapper","data-tap-disable":"true"},this.player==="video"&&o("video",{ref:function(e){return t.videoEl=e},class:"cty-video__player",poster:e,preload:this.preload,"x5-video-player-type":"h5","x5-video-player-fullscreen":"true",playsinline:true,"webkit-playsinline":true,autoplay:(this.isWifi||this.isMicroMessager||this.trafficAutoplay)&&this.autoplay,onCanPlay:this._doCanplay,onTimeUpdate:this._doTimeupdate,onPlay:this._doPlay,onPause:this._doPause,onEnded:this._doEnded,onPlaying:this._doPlaying,onVolumeChange:this._doChangeVolume,onError:this._doError,onStalled:this._doStalled,onWaiting:this._doWaiting,onSeeked:this._doSeeked,src:this.url,typeof:"video/mp4"}),this.player==="audio"&&o("div",{class:"cty-video__player cty-video__audio-player"},o("audio",{ref:function(e){return t.videoEl=e},class:"cty-video__player-audio",preload:this.preload,autoplay:(this.isWifi||this.isMicroMessager||this.trafficAutoplay)&&this.autoplay,onCanPlay:this._doCanplay,onTimeUpdate:this._doTimeupdate,onEnded:this._doEnded,onPlaying:this._doPlaying,onPlay:this._doPlay,onPause:this._doPause,onVolumeChange:this._doChangeVolume,onError:this._doError,onStalled:this._doStalled},o("source",{src:this.url,type:"audio/mp3"}),o("source",{src:this.url,type:"audio/ogg"})),o("slot",{name:"audio-content"})))};t.prototype.renderControls=function(){var t=this;return o("div",{class:"cty-video__controls",ref:function(e){return t.videoCtrlEl=e}},o("slot",{name:"header"}),this.showCtrl&&this.headerCtrl&&o("ion-grid",{class:"cty-video__header"},o("ion-row",null,o("ion-col",{class:"flex-align-center cty-video__header-back"},o("ion-button",{onClick:this._dismiss},o("cty-icon",{name:x}))),o("ion-col",{size:"6",class:"cty-video__title flex-align-center cty-ellipsis"},this.title),o("ion-col",null,o("slot",{name:"headerCol"})))),o("slot",{name:"footer"}),this.showCtrl&&this.footerCtrl&&o("ion-grid",{class:{"cty-video__footer":true,"safe-area-bottom-border-color":this.direction=="P"&&this.curIsFullscreen}},this.progressPosition=="top"&&o("ion-row",{class:"cty-video__footer-progress__top"},o("ion-range",{mode:"ios",class:"cty-video__footer-range",debounce:300,max:1e3,value:this.playProgress,disabled:true,ticks:false})),o("ion-row",null,o("ion-col",{class:{"flex-align-center cty-video__footer-toggle-play":true,"cty-video__footer-flex":this.progressPosition=="top"}},o("ion-button",{onClick:function(e){t.toggleVideo(e)}},o("cty-icon",{name:this.isPlaying?"cty-pause":"cty-play"})),this.progressPosition=="top"&&o("div",{class:"flex-align-center cty-video__footer-time-label"},this.currentTimeLabel,o("span",null,"/"),this.durationLabel)),this.progressPosition=="center"&&o("ion-col",{class:"cty-video__footer-progress flex-center"},o("ion-range",{mode:"ios",class:"cty-video__footer-range",debounce:300,max:1e3,value:this.playProgress,disabled:true,ticks:false},o("span",{class:"cty-video__time",slot:"start"},this.currentTimeLabel),o("span",{class:"cty-video__time",slot:"end"},this.durationLabel))),this.curIsFullscreen&&o("ion-col",{class:"cty-video__footer-rate flex-align-center"},o("ion-button",{onClick:this._doSetRate},this.rate==1?"倍速":this.rate+"X")),o("ion-col",{class:"cty-video__footer-volume flex-align-center"},o("ion-button",{onClick:function(){return t.toggleVolume()}},o("cty-icon",{name:this._getVolumeIconName()}))),!this.fullscreenOnly&&!this.curIsFullscreen&&this.fullscreenIcon&&o("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},o("ion-button",{onClick:function(){return t._toggleFullScreen(true)}},o("cty-icon",{name:this.fullscreenIcon}))),!this.fullscreenOnly&&this.curIsFullscreen&&this.exitFullscreenIcon&&o("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},o("ion-button",{onClick:function(){return t._toggleFullScreen(false)}},o("cty-icon",{name:this.exitFullscreenIcon}))),o("slot",{name:"footerCol"}))),(this.allowForward||this.allowBackward)&&this.showCtrl&&this.footerCtrl&&o("ion-grid",{class:{"cty-video__footer cty-video__footer-controls":true,"safe-area-bottom-border-color":this.direction=="P"&&this.curIsFullscreen}},this.progressPosition=="top"&&o("ion-row",{class:"cty-video__footer-progress__top",onClick:function(t){return t.stopPropagation()}},!this.isPC&&o("div",{class:"cty-video__footer-bar",onTouchStart:this._doPrgTouchstart,onTouchMove:this._doPrgTouchmove,onTouchEnd:this._doPrgTouchend},this.direction=="L"&&this.curIsFullscreen&&this.markerList.map((function(e){return o("span",{onTouchStart:function(i){return t._doDot(i,e)},class:"cty-video__footer-dot",style:{left:e.position+"%"}})}))),this.isPC&&o("div",{class:"cty-video__footer-bar",onMouseDown:this._doPrgTouchstart,onMouseMove:this._doPrgTouchmove,onMouseUp:this._doPrgTouchend,onMouseLeave:this._doPrgTouchend},this.direction=="L"&&this.curIsFullscreen&&this.markerList.map((function(e){return o("span",{onTouchStart:function(i){return t._doDot(i,e)},class:"cty-video__footer-dot",style:{left:e.position+"%"}})})))),o("ion-row",null,o("ion-col",{class:{"flex-align-center cty-video__footer-toggle-play":true,"cty-video__footer-flex":this.progressPosition=="top"}},o("ion-button",{onClick:function(e){t.toggleVideo(e)}},o("cty-icon",{name:this.isPlaying?"cty-pause":"cty-play"})),this.progressPosition=="top"&&o("div",{class:"flex-align-center cty-video__footer-time-label"},this.currentTimeLabel,o("span",null,"/"),this.durationLabel)),this.progressPosition=="center"&&o("ion-col",{class:"cty-video__footer-progress flex-center"},o("span",{class:"cty-video__time"},this.currentTimeLabel),!this.isPC&&o("div",{class:"cty-video__footer-bar",onTouchStart:this._doPrgTouchstart,onTouchMove:this._doPrgTouchmove,onTouchEnd:this._doPrgTouchend},this.direction=="L"&&this.curIsFullscreen&&this.markerList.map((function(e){return o("span",{onTouchStart:function(i){return t._doDot(i,e)},class:"cty-video__footer-dot",style:{left:e.position+"%"}})}))),this.isPC&&o("div",{class:"cty-video__footer-bar",onMouseDown:this._doPrgTouchstart,onMouseMove:this._doPrgTouchmove,onMouseUp:this._doPrgTouchend,onMouseLeave:this._doPrgTouchend},this.direction=="L"&&this.curIsFullscreen&&this.markerList.map((function(e){return o("span",{onTouchStart:function(i){return t._doDot(i,e)},class:"cty-video__footer-dot",style:{left:e.position+"%"}})}))),o("span",{class:"cty-video__time"},this.durationLabel)),this.curIsFullscreen&&o("ion-col",{class:"cty-video__footer-rate flex-align-center"},o("ion-button",{onClick:this._doSetRate},this.rate==1?"倍速":this.rate+"X")),o("ion-col",{class:"cty-video__footer-volume flex-align-center"},o("ion-button",{onClick:function(){return t.toggleVolume()}},o("cty-icon",{name:this._getVolumeIconName()}))),!this.fullscreenOnly&&!this.curIsFullscreen&&this.fullscreenIcon&&o("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},o("ion-button",{onClick:function(){return t._toggleFullScreen(true)}},o("cty-icon",{name:this.fullscreenIcon}))),!this.fullscreenOnly&&this.curIsFullscreen&&this.exitFullscreenIcon&&o("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},o("ion-button",{onClick:function(){return t._toggleFullScreen(false)}},o("cty-icon",{name:this.exitFullscreenIcon}))),o("slot",{name:"footerCol"}))),this.isMoving&&o("div",{class:"cty-video__opn-toast flex-center"},o("cty-icon",{name:this.controlIcon}),o("span",null,this.controlLabel)),o("slot",{name:"controls"}),!this.isPC&&this.controls&&o("div",{class:"cty-video__opn-panel",onTouchStart:this._doOpnStart,onTouchMove:this._doOpnMove,onTouchEnd:this._doOpnEnd,onClick:function(t){return t.stopPropagation()}}),this.isPC&&this.controls&&o("div",{class:"cty-video__opn-panel",onMouseDown:this._doOpnStart,onMouseMove:this._doOpnMove,onMouseUp:this._doOpnEnd,onMouseLeave:this._doOpnEnd,onClick:function(t){return t.stopPropagation()}}),this.showCtrl&&this.showDotPanel&&o("div",{ref:function(e){t.dotPanelEl=e},class:{"cty-video__dot-panel flex-center":true,"cty-video__dot-panel-ex":this.progressPosition=="top"},onClick:function(t){return t.stopPropagation()},style:{top:this.dotDotPanelTop,left:this.dotDotPanelLeft,opacity:this.reallyShowDot?"1":"0"}},o("span",{class:"cty-video__dot-label cty-ellipsis2"},this.currentMarker.describe),o("ion-button",{onClick:this._toPoint},o("cty-icon",{name:"cty-play-ex"}),"知识点"),o("span",{class:"cty-video__dot-triangle",style:{"margin-left":this.triangleMargin+"px"}})),o("slot",{name:"ctrl"}))};t.prototype.render=function(){var t=this;return o(r,{key:"bcce9c119dd9742d0c69dd9b5ed45b2ee39e4f91",class:{"cty-video":true,"cty-video__vertical":this.deviceIsPORTRAIT,"cty-video__unfullscreen":!this.curIsFullscreen,"cty-video__large-screen":this.direction=="P"&&this.curIsFullscreen&&(this.isPC||this.isIpad)}},this.renderPlayer(),this.renderControls(),(!this.isLoading||this.isMicroMessager)&&!this.isPlaying&&!this.showInteractiveLayer&&this.showTogglePlay&&o("ion-button",{key:"f55a081110cdc0db15c903ec34b2258e953fafc7",part:"toggle-play",class:"cty-video__toggle-play flex-center",onClick:function(e){t.toggleVideo(e)}},o("cty-icon",{key:"f1ea8cecf7415ea732e59d475256f8033a242d74",name:"cty-play"})),!this.isWifi&&!this.isPlaying&&!this.isLoading&&!this.isMicroMessager&&this.trafficMsg&&o("div",{key:"9167c66f7410c98493227e4dca379bf65740242b",class:"cty-video__toast cty-ellipsis",part:"toast"},this.trafficMsg),this.warningMsg!=""&&o("div",{key:"536ff573d8c9670a531e5af490cbd8bb1ab74be1",class:"cty-video__toast cty-ellipsis",part:"toast"},this.warningMsg),this.showPlayRate&&o("div",{key:"cdf67ac451fd70983f4fee4741d5fe9330161407",class:"cty-video__rate",onClick:function(){return t.showPlayRate=false}},o("div",{key:"cbef52f68b8d3028908da0b69c6c8983564821be",class:"cty-video__rate-mask flex-center-justify-end"},o("div",{key:"8ddaff687d8231d9c8448ef4d5758a64e2751f7d",class:"cty-video__rate-list"},this._rates.map((function(e){return o("button",{onClick:function(){return t.setPlayRate(e)},class:{active:t.rate==e,"cty-video__rate-list-item":true}},o("span",null,e,"X"))}))))),this.hasInteractive&&this.curIsFullscreen&&o("div",{key:"b82904799d30e33e762b352739d67d9a38cdbff0",class:"cty-video__player cty-video__interactive",onClick:function(){},ref:function(e){return t.interactiveEl=e}}))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());z.style=k}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,s){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function a(e){try{o(s.next(e))}catch(e){r(e)}}function c(e){try{o(s["throw"](e))}catch(e){r(e)}}function o(e){e.done?i(e.value):n(e.value).then(a,c)}o((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(e){return function(t){return o([e,t])}}function o(c){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(i=0)),i)try{if(s=1,n&&(r=c[0]&2?n["return"]:c[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;if(n=0,r)c=[c[0]&2,r.value];switch(c[0]){case 0:case 1:r=c;break;case 4:i.label++;return{value:c[1],done:false};case 5:i.label++;n=c[1];c=[0];continue;case 7:c=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(c[0]===6&&i.label<r[1]){i.label=r[1];r=c;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(c);break}if(r[2])i.ops.pop();i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e];n=0}finally{s=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var s=0,n=t.length,r;s<n;s++){if(r||!(s in t)){if(!r)r=Array.prototype.slice.call(t,0,s);r[s]=t[s]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-BpC3ubr-.system.js","./p-DvPCY95C.system.js","./p-DSgG8qVn.system.js","./p-D2G0Jsfd.system.js","./p-DW5MHISD.system.js","./p-DJ6AO4zz.system.js","./p-CMMoObqS.system.js","./p-cQwGvN5a.system.js","./p-FsCPkocx.system.js","./p-NPOR6IxC.system.js","./p-B6ewx4qT.system.js","./p-D5YThY9F.system.js","./p-Ck01D6Xe.system.js","./p-CKjUa3W_.system.js"],(function(e){"use strict";var t,i,s,n,r,a,c,o,h,l,f,d,y,p,u,b,x,m,g,v,w,j,k,_,O,z;return{setters:[function(e){t=e.r;i=e.c;s=e.h;n=e.a;r=e.g},function(e){a=e.c},function(e){c=e.d;o=e.c;h=e.r},function(e){l=e.w;f=e.s;d=e.a;y=e.S},function(e){p=e.a},function(e){u=e.e;b=e.f;x=e.p;m=e.g;g=e.h;v=e.j;w=e.k},function(e){j=e.c},function(e){k=e.r},function(e){_=e.g;O=e.e;z=e.l},null,null,null,null,null],execute:function(){var D=".flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}ion-button{--background-activated:transparent;--background-focused:transparent;--background-hover:transparent;--box-shadow:none}ion-grid{padding:0}ion-row{padding:0}ion-col{padding:0}ion-item{--padding-bottom:0;--padding-end:0;--padding-start:0;--padding-top:0;--inner-padding-top:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-bottom:0;--inner-border-width:0;--border-width:0;--min-height:0;--background:none;overflow:initial}ion-toast{--width:84%;--height:36px;--color:var(--cty-color-white);--background:rgba(0, 0, 0, 0.7);--border-radius:100px;line-height:1.2;font-size:var(--cty-font-size-base);text-align:center}.plt-hybrid .safe-area-bottom-border{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid var(--cty-color-white)}.plt-hybrid .safe-area-bottom-border-color{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid currentColor}.plt-hybrid .safe-area-bottom-padding{padding-bottom:var(--ion-safe-area-bottom, 0)}.cty-button-native{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;line-height:1;border:0;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}:host{--cty-share-sheet-overlay-position:fixed;--cty-share-sheet-overlay-z-index:10;--cty-share-sheet-overlay-background:var(--cty-overlay-color);--cty-share-sheet-overlay-width:100vw;--cty-share-sheet-overlay-height:100vh;--cty-share-sheet-background:var(--cty-color-white);--cty-share-sheet-border-radius:10px 10px 0 0;--cty-share-sheet-guide-width:50vw;--cty-share-sheet-guide-top:10px;--cty-share-sheet-guide-right:0;--cty-share-sheet-header-padding:12px 15px 4px;--cty-share-sheet-title-offset:8px 0 0;--cty-share-sheet-title-size:var(--cty-font-size-base);--cty-share-sheet-title-color:var(--cty-text-color-primary);--cty-share-sheet-title-line-height:1px;--cty-share-sheet-title-line-background-color:var(--cty-border-color-extra-light);--cty-share-sheet-title-line-offset:20px;--cty-share-sheet-title-line-scale:1;--cty-share-sheet-description-offset-top:8px;--cty-share-sheet-description-size:var(--cty-font-size-extra-small);--cty-share-sheet-description-color:var(--cty-text-color-secondary);--cty-share-sheet-description-text-align:center;--cty-share-sheet-description-line-height:1;--cty-share-sheet-options-overflow-x:auto;--cty-share-sheet-options-wrap:nowrap;--cty-share-sheet-option-num:4;--cty-share-sheet-options-padding:16px 0 0;--cty-share-sheet-option-offset-bottom:16px;--cty-share-sheet-option-icon-width:40px;--cty-share-sheet-option-title-offset:8px 0 0;--cty-share-sheet-option-title-padding:0;--cty-share-sheet-option-title-size:var(--cty-font-size-extra-small);--cty-share-sheet-option-title-color:var(--cty-text-color-primary);--cty-share-sheet-option-description-padding:0;--cty-share-sheet-option-description-size:var(--cty-font-size-extra-small);--cty-share-sheet-option-description-color:var(--cty-text-color-secondary);--cty-share-sheet-cancel-height:48px;--cty-share-sheet-cancel-background:var(--cty-color-white);--cty-share-sheet-cancel-border-color:var(--cty-border-color-extra-light);--cty-share-sheet-cancel-border-width:8px;--cty-share-sheet-cancel-size:var(--cty-font-size-medium);--cty-share-sheet-cancel-color:var(--cty-text-color-primary)}:host(.overlay-hidden){display:none}cty-backdrop{position:var(--cty-share-sheet-overlay-position);z-index:var(--cty-share-sheet-overlay-z-index);background:var(--cty-share-sheet-overlay-background);width:var(--cty-share-sheet-overlay-width);height:var(--cty-share-sheet-overlay-height)}.cty-share-guide{position:absolute;right:var(--cty-share-sheet-guide-right);top:var(--cty-share-sheet-guide-top);width:var(--cty-share-sheet-guide-width)}.cty-share-guide img{display:block;width:100%}.cty-share-sheet{width:100%;background:var(--cty-share-sheet-background);border-radius:var(--cty-share-sheet-border-radius)}.cty-share-sheet__header{padding:var(--cty-share-sheet-header-padding)}cty-divider{--cty-divider-width:var(--cty-share-sheet-title-line-height);--cty-divider-content-offset:var(--cty-share-sheet-title-line-offset);--cty-divider-scale:var(--cty-share-sheet-title-line-scale);margin:var(--cty-share-sheet-title-offset);color:var(--cty-share-sheet-title-color);font-size:var(--cty-share-sheet-title-size);border-color:var(--cty-share-sheet-title-line-background-color)}.cty-share-sheet__description{margin-top:var(--cty-share-sheet-description-offset-top);font-size:var(--cty-share-sheet-description-size);color:var(--cty-share-sheet-description-color);text-align:var(--cty-share-sheet-description-text-align);line-height:var(--cty-share-sheet-description-line-height)}.cty-share-sheet__options{overflow-x:var(--cty-share-sheet-options-overflow-x);-ms-flex-wrap:var(--cty-share-sheet-options-wrap);flex-wrap:var(--cty-share-sheet-options-wrap);width:100%;padding:var(--cty-share-sheet-options-padding)}.cty-share-sheet__options::-webkit-scrollbar{width:0;height:0}.cty-share-sheet__option{max-width:calc(100% / var(--cty-share-sheet-option-num));-ms-flex:0 0 calc(100% / var(--cty-share-sheet-option-num));flex:0 0 calc(100% / var(--cty-share-sheet-option-num));-ms-flex-direction:column;flex-direction:column;margin-bottom:var(--cty-share-sheet-option-offset-bottom)}.cty-share-sheet__img{display:block;width:var(--cty-share-sheet-option-icon-width)}.cty-share-sheet__icon{display:block;width:auto;font-size:var(--cty-share-sheet-option-icon-width)}.cty-share-sheet__option-title{margin:var(--cty-share-sheet-option-title-offset);padding:var(--cty-share-sheet-option-title-padding);font-size:var(--cty-share-sheet-option-title-size);color:var(--cty-share-sheet-option-title-color);white-space:nowrap}.cty-share-sheet__option-description{padding:var(--cty-share-sheet-option-description-padding);font-size:var(--cty-share-sheet-option-description-size);color:var(--cty-share-sheet-option-description-color)}.cty-share-sheet__cancel{width:100%;background:var(--cty-share-sheet-cancel-background-color);border:0;border-top:var(--cty-share-sheet-cancel-border-width) solid var(--cty-share-sheet-cancel-border-color);line-height:var(--cty-share-sheet-cancel-height);font-size:var(--cty-share-sheet-cancel-size);color:var(--cty-share-sheet-cancel-color)}cty-permission-purpose{--cty-permission-purpose-overlay-height:auto}";var P=e("cty_share_sheet",function(){function e(e){t(this,e);this.ctyDismiss=i(this,"ctyDismiss",7);this.ctyTap=i(this,"ctyTap",7);this.ctyShareSuccess=i(this,"ctyShareSuccess",7);this.ctyShareFail=i(this,"ctyShareFail",7);this.ctyGuide=i(this,"ctyGuide",7);this.didPresent=i(this,"ctyDidPresent",7);this.willPresent=i(this,"ctyWillPresent",7);this.willDismiss=i(this,"ctyWillDismiss",7);this.didDismiss=i(this,"ctyDidDismiss",7);this.delegateController=u(this);this.lockController=j();this.triggerController=b();this.presented=false;this.hasController=false;this.hiddenSheet=false;this.guide=true;this.guideImg=a.get("resUrlPrefix","")+"assets/cty_res/img/spell-share-guide.png";this.backdropDismiss=true;this.title="分享至";this.description="";this.cancelText="取消";this.options=[{role:"wechat"},{role:"wechat-moments"},{role:"social-agent"},{role:"sina-weibo"}];this.shareOption={};this.permissionPurpose=true;this.permissionDescription="存储空间权限使用说明:<br/>用于访问图片、视频、音频文件";this.legacyCopy=false;this.root="default";this.animated=false;this.isToastOpen=false;this.toastContent="";this._options=[];this.isMicroMessager=c.isMicroMessager;this.isIos=c.isIos;this.showPermissionPurpose=false}e.prototype.triggerChanged=function(){var e=this,t=e.trigger,i=e.el,s=e.triggerController;if(t){s.addClickListener(i,t)}};e.prototype.connectedCallback=function(){x(this.el);this.triggerChanged()};e.prototype.disconnectedCallback=function(){this.triggerController.removeClickListener();this.presented&&m()};e.prototype.componentWillLoad=function(){var e=this;!this.hasController&&k((function(){return e.present()}));if(this.options.length>0){var t=__spreadArray([],this.options,true);var i={wechat:{title:"微信",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/wechat.png"},"wechat-moments":{title:"朋友圈",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/wechat-moments.png"},"wechat-agent":{title:"企业微信",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/wechat-agent.png"},"sina-weibo":{title:"新浪微博",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/sina-weibo.png"},social:{title:"更多分享",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/social.png"},"social-agent":{title:"企业微信",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/wechat-agent.png"},"copy-url":{title:"复制链接",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/copy-url.png"}};t.forEach((function(e){var t=e.role||"";var s=i[t];if(s){e.title=e.title||s.title;e.icon=e.icon||s.icon}}));this._options=t}};e.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,this.lockController.lock()];case 1:e=t.sent();return[4,this.delegateController.attachViewToDom(this.root)];case 2:t.sent();return[4,g(this,"shareSheetEnter",(function(e){return O(e,".cty-share-sheet")}))];case 3:t.sent();e();return[2]}}))}))};e.prototype.dismiss=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:this.showPermissionPurpose=false;return[4,this.lockController.lock()];case 1:e=i.sent();return[4,v(this,"shareSheetLeave",(function(e){return z(e,".cty-share-sheet")}))];case 2:t=i.sent();if(t){this.delegateController.removeViewFromDom()}e();return[2,t]}}))}))};e.prototype.onDidDismiss=function(){return w(this.el,"ctyDidDismiss")};e.prototype.onWillDismiss=function(){return w(this.el,"ctyWillDismiss")};e.prototype.checkPermission=function(){var e=this;return Promise.resolve().then((function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:if(!this.permissionPurpose||!this.permissionDescription){return[2]}return[4,o("READ_MEDIA_IMAGES")];case 1:e=i.sent();return[4,o("READ_EXTERNAL_STORAGE")];case 2:t=i.sent();if(e===false&&t===false){this.showPermissionPurpose=true}return[2]}}))}))})).catch((function(){return}))};e.prototype._wxShare=function(e,t){return __awaiter(this,arguments,void 0,(function(e,t,i){var s,n,r,a,c,o,p,u,b,x,m;var g=this;if(i===void 0){i=false}return __generator(this,(function(v){switch(v.label){case 0:v.trys.push([0,2,,3]);return[4,l.isInstallWechat()];case 1:s=v.sent();if(!s){this.isToastOpen=true;this.toastContent="请安装微信APP"}return[3,3];case 2:n=v.sent();this.isToastOpen=true;this.toastContent=n||"请安装微信APP";this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:n}));return[2];case 3:try{r=l.Scene[i?"TIMELINE":"SESSION"];a=this.shareOption.wxMedia||{image:null,webpageLink:null,type:null};c=this.shareOption.wxText;o=this.shareOption.title||"";p=this.shareOption.description||"";u=this.shareOption.thumb||"";b=a.image||this.shareOption.defaultImg||"";x=a.webpageLink||this.shareOption.defaultUrl||"";m=c?d.TEXT:a.type||(b?d.IMAGE:d.WEBPAGE);if(b){h().then((function(){f.share({appType:y.WECHAT,type:m,link:x,title:o,description:p,thumb:u,image:b,scene:r}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));g.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){g.isToastOpen=true;g.toastContent=t;g.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}))}else{f.share({appType:y.WECHAT,type:m,link:x,title:o,description:p,thumb:u,image:b,scene:r}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));g.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){g.isToastOpen=true;g.toastContent=t;g.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}}catch(e){}return[2]}}))}))};e.prototype._sinaShare=function(e,t){var i=this;try{f.isInstallWeibo().then((function(){var s=i.shareOption.weiboLink||i.shareOption.defaultUrl||"";var n=i.shareOption.weiboImg||i.shareOption.defaultImg||"";var r=i.shareOption.title||"";var a=i.shareOption.description||"";f.share({appType:y.SINA_WEIBO,type:d[!s&&n?"IMAGE":"WEBPAGE"],image:n,link:s,title:r,description:a,thumb:n}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));i.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){i.isToastOpen=true;i.toastContent=t;i.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))})).catch((function(e){i.isToastOpen=true;i.toastContent=e||"Weibo uninstalled"}))}catch(e){this.isToastOpen=true;this.toastContent="分享失败 "+(e||"")}};e.prototype._socialShare=function(e,t){var i=this;var s=this.shareOption.title||"";var n=this.shareOption.description||"";var r=this.shareOption.socialFile||this.shareOption.defaultImg||"";var a=this.shareOption.socialLink||this.shareOption.defaultUrl||"";f.share({appType:y.SOCIAL,type:d.WEBPAGE,description:n,title:s,image:r,link:a}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));i.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){i.isToastOpen=true;i.toastContent=t;i.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))};e.prototype._socialAgentShare=function(e,t){var i=this;try{var s=this.shareOption.title||"";var n=this.shareOption.packageName||"com.tencent.wework";var r=this.shareOption.uiPage||"com.tencent.wework.launch.AppSchemeLaunchActivity";var a=this.shareOption.wxText;var c=this.shareOption.socialAgentLink||this.shareOption.defaultUrl||"";var o=this.shareOption.socialAgentImg||this.shareOption.defaultImg||"";f.share({appType:y.SYSTEM,type:d[a?"TEXT":o?"IMAGE":"WEBPAGE"],title:s,link:c,text:a,image:o,packageName:n,uiPage:r}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));i.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){i.isToastOpen=true;i.toastContent=t;i.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}catch(e){}};e.prototype._agentShare=function(e,t){var i=this;try{var s=this.shareOption.agentImg||this.shareOption.defaultImg||"";var n=this.shareOption.agentImgType||"jpg";var r=this.shareOption.agentFileName||"".concat((new Date).getTime(),".jpg");var a=this.shareOption.agentLink||this.shareOption.defaultUrl||"";var c=this.shareOption.title||"";var o=this.shareOption.description||"";var h=this.shareOption.thumb||"";f.share({appType:y.WECOM,type:d[s?"IMAGE":"WEBPAGE"],image:s,fileName:r,thumb:h,link:a,title:c,description:o,imageType:n}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));i.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){i.isToastOpen=true;i.toastContent=t;i.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}catch(e){this.isToastOpen=true;this.toastContent="分享失败 "+(e||"")}};e.prototype._copyUrl=function(e,t){p(this.shareOption.copyText||"",this.legacyCopy).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}))}))};e.prototype._buttonClick=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!!this.isMicroMessager)return[3,7];if(!(e.role==="wechat"))return[3,3];if(!!this.isIos)return[3,2];return[4,this.checkPermission()];case 1:i.sent();i.label=2;case 2:this._wxShare(e,t);i.label=3;case 3:if(!(e.role==="wechat-moments"))return[3,6];if(!!this.isIos)return[3,5];return[4,this.checkPermission()];case 4:i.sent();i.label=5;case 5:this._wxShare(e,t,true);i.label=6;case 6:if(e.role==="wechat-agent"){this._agentShare(e,t)}if(e.role==="sina-weibo"){this._sinaShare(e,t)}if(e.role==="social"){this._socialShare(e,t)}if(e.role==="social-agent"){this._socialAgentShare(e,t)}if(e.role==="copy-url"){this._copyUrl(e,t)}i.label=7;case 7:e.handler&&e.handler(e);this.ctyTap.emit(Object.assign(Object.assign({},e),{index:t}));return[2]}}))}))};e.prototype._doGuid=function(e){e.stopPropagation();this.ctyGuide.emit()};e.prototype.render=function(){var e=this;return s(n,{key:"8757d4a8b07d87efd53f7b155faa0b39a727fed0",class:Object.assign(Object.assign({},_(this.cssClass)),{"overlay-hidden":true}),style:{zIndex:"".concat(2e4+this.overlayIndex)}},s("cty-backdrop",{key:"c8368ab2f9684ededf86d26cbae4643b716d5eb3",backdropDismiss:this.backdropDismiss,position:"bottom",onCtyDismiss:function(){return e.dismiss()}},this.guide&&this.isMicroMessager&&s("div",{key:"cfa74ed0b3f0dd63dc8da305b09dbf032bdc479a",class:"cty-share-guide",onClick:function(t){return e._doGuid(t)}},s("img",{key:"996b6724a08c47cd5a216b1c5af7e2d4a6deb358",src:this.guideImg})),s("slot",{key:"15511304eec04e38fc4fede8500cfe86ba491c4f",name:"share-sheet"}),!this.hiddenSheet&&s("div",{key:"56149976aa96c7108e88372f53e6deec3dab26d7",class:"cty-share-sheet safe-area-bottom-padding",onClick:function(e){return e.stopPropagation()}},s("slot",{key:"58c3ee47966bcc13fd5d853685fd14e9bb10dc0a",name:"header"}),(this.title||this.description)&&s("div",{key:"4edbfe76289997aadaf436bd6f5a212aa5074029",class:"cty-share-sheet__header",part:"header"},this.title&&s("cty-divider",{key:"95f441f50c315eebcd771442c5c3b1698b16acdb"},this.title),this.description&&s("p",{key:"c11cae0d8d2e64dcf5f6829b4c70a51f5ef52d97",class:"cty-share-sheet__description"},this.description)),s("slot",{key:"9736ea1a93c1fed84cabbb971645ec16751d0c42",name:"options"}),s("div",{key:"52dfb70f5eab7271b85dba92626f83bc01208810",class:"cty-share-sheet__options flex",part:"options"},this._options.map((function(t,i){return s("div",{part:"option",class:"cty-share-sheet__option flex-align-center",onClick:function(){return e._buttonClick(t,i)}},t.icon&&t.icon.indexOf("/")>=0&&!t.icon.endsWith(".svg")&&s("img",{class:"cty-share-sheet__img",src:t.icon}),t.icon&&(t.icon.indexOf("/")<0||t.icon.endsWith(".svg"))&&s("cty-icon",{name:t.icon,class:"cty-share-sheet__icon"}),t.title&&s("span",{class:"cty-share-sheet__option-title"},t.title),t.description&&s("span",{class:"cty-share-sheet__option-description"},t.description))}))),s("slot",{key:"8528c74d8ed0f75457447e23421a67fb21a506ea",name:"cancel"}),this.cancelText&&s("button",{key:"7b000a6f94fc494c3d7a411656d075bd7f0d9a0c",part:"cancel",class:"cty-button-native cty-share-sheet__cancel",onClick:function(){return e.dismiss()}},this.cancelText))),this.showPermissionPurpose&&s("cty-permission-purpose",{key:"e43ebf8435a8fdaf49c3426eb0030842e918c6c3",description:this.permissionDescription}),s("ion-toast",{key:"2e00a1c8756907613e61eb1221a4866680fa46fb","is-open":this.isToastOpen,message:this.toastContent,duration:2e3}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{trigger:["triggerChanged"]}},enumerable:false,configurable:true});return e}());P.style=D}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,a as o,g as s}from"./p-DBsZD0Dk.js";import{g as a,b as r,a as h}from"./p-CHhKFKFA.js";import{s as n,r as c}from"./p-BDuVecoa.js";import{s as d,v as l}from"./p-COhU5RVg.js";import{n as v}from"./p-BqPNWsXF.js";import{d as y}from"./p-CXtPwfcM.js";import{c as f}from"./p-iD8sj4Mi.js";import{v as p,a as g,b as u,c as b,d as m,e as _}from"./p-CvHW-guK.js";import{i as x}from"./p-BqPoMbNS.js";import"./p-cERsY8tm.js";const w=class{constructor(e){t(this,e),this.ctyDismiss=i(this,"ctyDismiss",7),this.ctyVideoCanplay=i(this,"ctyVideoCanplay",7),this.ctyVideoTimeupdate=i(this,"ctyVideoTimeupdate",7),this.ctyVideoPlaying=i(this,"ctyVideoPlaying",7),this.ctyVideoPlay=i(this,"ctyVideoPlay",7),this.ctyVideoPause=i(this,"ctyVideoPause",7),this.ctyVideoStalled=i(this,"ctyVideoStalled",7),this.ctyVideoWaiting=i(this,"ctyVideoWaiting",7),this.ctyVideoEnded=i(this,"ctyVideoEnded",7),this.ctyVideoError=i(this,"ctyVideoError",7),this.ctyVideoChangeVolume=i(this,"ctyVideoChangeVolume",7),this.ctyVideoProgress=i(this,"ctyVideoProgress",7),this.ctyVideoScreenChange=i(this,"ctyVideoScreenChange",7),this.ctyVideoIAEnter=i(this,"ctyVideoIAEnter",7),this.ctyVideoIAAction=i(this,"ctyVideoIAAction",7),this.ctyVideoCtrlChange=i(this,"ctyVideoCtrlChange",7),this.ctyVideoRateChange=i(this,"ctyVideoRateChange",7),this.url="",this.poster="",this.startTime=0,this.preload="metadata",this.allowForward=!0,this.allowBackward=!0,this.unAllowForwardMsg="首次学习不允许快进哦~",this.unAllowRateMsg="首次学习不允许设置播放倍速",this.trafficMsg="当前是非WIFI网络, 可能消耗流量, 点击继续~",this.errorMsg="视频播放异常或网络故障, 请稍后重试。",this.orientation=!0,this.autoplay=!0,this.trafficAutoplay=!1,this.fullscreenOnly=!0,this.defaultFullscreen=!0,this.fullscreenIcon="cty-fullscreen",this.exitFullscreenIcon="cty-exit-fullscreen",this.direction="L",this.controls=!0,this.headerCtrl=!0,this.footerCtrl=!0,this.title="",this.rates=[.7,1,1.25,1.5],this.rate=1,this.directRate=!1,this.loading=!1,this.loadingImg="",this.updateNow=!0,this.markers=[],this.landscapeEnterTimer=20,this.landscapeLeaveTimer=420,this.togglePlayTimer=150,this.progressPosition="center",this.player="video",this.largeScreenIsPortrait=!0,this.allowBackgroundForward=!1,this.interactiveActions=[],this.playProgress=0,this.maxPlayProgress=0,this.currentTimeLabel="00:00:00",this.durationLabel="00:00:00",this.isPlaying=!1,this.isMute=!1,this.showCtrl=!0,this.showPlayRate=!1,this.showVideoError=!0,this.warningMsg="",this.isLoading=!0,this.showTogglePlay=!1,this.playVolume=100,this.playBrightness=100,this.controlIcon="",this.controlLabel="",this.controlType="",this.lastControlType="",this.touchState={isTouching:!1,right:0,height:0,top:0,bottom:0,currentY:0},this.isMoving=!1,this.opnStartTime=0,this.opnMoveTime=0,this.opnLx=0,this.opnLy=0,this.opnNx=0,this.opnNy=0,this.isMouseMove=!1,this.isMicroMessager=y.isMicroMessager,this.isPC=y.isPC,this.isIOS=y.isIos,this.isIpad=y.isIpad,this.isWifi=v.isWifi,this.isHybrid=y.isHybrid,this.lastTapScreenTime=Date.now(),this.footerPrgtime=0,this._curIsFullscreen=!0,this.showInteractiveLayer=!1,this.hasInteractive=!1,this.interactiving_action=null,this.ctrlTimer=0,this.warningMsgTimer=0,this.touchMoveTimer=0,this._rates=[],this.markerList=[],this.currentMarker={describe:"",breakpoint:0,position:0},this.showDotPanel=!1,this.dotDotPanelTop="auto",this.dotDotPanelLeft="auto",this.triangleMargin=0,this.reallyShowDot=!1,this.isRealWaiting=!0,this.isSeeking=!1,this.deviceIsPORTRAIT=!1,this.canScreenOrientation=!1,this.visibilityChangeHandler=()=>{},this.iosAppPauseHandler=()=>{},this.iosAResumeHandler=()=>{},this._doCanplay=()=>{setTimeout((()=>{this.showTogglePlay=!0}),this.togglePlayTimer),this.isLoading&&(this.videoEl.style.display="block"),this.isWifi&&!this.isMicroMessager&&this.autoplay&&this.loading||!this.isLoading||(this.isLoading=!1),this.durationLabel=n(this.videoEl.duration),this.ctyVideoCanplay.emit(),this.markerList=this.markers.map((t=>Object.assign(Object.assign({},t),{position:+(t.breakpoint/this.videoEl.duration*100).toFixed(3)})))},this._doTimeupdate=()=>{const t=this.videoEl.currentTime;!this.isPlaying&&t>0&&(this.isLoading&&(this.isLoading=!1),this.videoEl.paused||(this.isPlaying=!0)),this.touchState.isTouching||(this._updateVideoProgress(),this.interactiveCheck(t)),this.ctyVideoTimeupdate.emit(t)},this._doPlay=()=>{this.ctyVideoPlay.emit()},this._doPause=()=>{this.isPlaying=!1,this.ctyVideoPause.emit()},this._doEnded=()=>{this.isPlaying=!1,this._updateVideoProgress(),this.interactiveReset(),this.ctyVideoEnded.emit()},this._doPlaying=()=>{x("android")||(this.isLoading&&(this.isLoading=!1),this.isPlaying=!0),this.ctyVideoPlaying.emit()},this._doChangeVolume=()=>{this.playVolume=Math.round(100*this.videoEl.volume),this.ctyVideoChangeVolume.emit()},this._doError=()=>{if(!this.isLoading&&this.showVideoError)return this.warningMsg=this.errorMsg,this.clearWarningMsg(),void this.ctyVideoError.emit(!0);this.isLoading&&(this.isLoading=!1,this.showTogglePlay=!0),this.ctyVideoError.emit(!1)},this._doStalled=()=>{this.ctyVideoStalled.emit()},this._doWaiting=()=>{this.isRealWaiting&&!this.isSeeking&&this.ctyVideoWaiting.emit(this.videoEl.currentTime)},this._doSeeked=()=>{(this.isSeeking=!1)&&(this.isRealWaiting=!0)},this._dismiss=()=>!this.fullscreenOnly&&this.curIsFullscreen?(this.curIsFullscreen=!1,this.isHybrid&&c.toggleStatusBar(!0),this.canScreenOrientation&&d.lock("portrait").catch((()=>{})),void this.ctyDismiss.emit(!1)):this.videoEl.paused?(this.isHybrid&&c.toggleStatusBar(!0),this.canScreenOrientation&&(this.landscapeLeaveTimer>0?setTimeout((()=>{d.lock("portrait").catch((()=>{}))}),this.landscapeLeaveTimer):d.lock("portrait").catch((()=>{}))),void this.ctyDismiss.emit(!0)):(this.pause(),void this.ctyDismiss.emit(!1)),this._doSetRate=()=>{if(!this.allowForward)return this.warningMsg=this.unAllowRateMsg,void this.clearWarningMsg();if("L"!=this.direction||this.directRate){let t=this.rates.findIndex((t=>t==this.rate))+1;return t==this.rates.length&&(t=0),void this.setPlayRate(this.rates[t])}this.showCtrl=!1,this.showPlayRate=!0,this._resetDot(),this.ctyVideoCtrlChange.emit(this.showCtrl)},this._toggleFullScreen=t=>{this.curIsFullscreen=t,this.isHybrid&&c.toggleStatusBar(!t),this.canScreenOrientation&&d.lock(t?"landscape":"portrait").catch((()=>{})),this.ctyVideoScreenChange.emit(t)},this._doPrgTouchstart=t=>{var i;if("mousedown"==t.type&&(this.isMouseMove=!0),this.isRealWaiting=!1,!this.allowForward&&!this.allowBackward||(null===(i=t.touches)||void 0===i?void 0:i.length)>1)return!0;this.isSeeking=!0;const e=a(t.currentTarget);return this.touchState.top=e.top,this.touchState.height=e.bottom-this.touchState.top,this.touchState.right=e.right,this.touchState.bottom=e.bottom,this.touchState.isTouching=!0,this.deviceIsPORTRAIT&&(this.touchState.top=e.left,this.touchState.height=e.right-this.touchState.top,this.touchState.right=e.bottom,this.touchState.bottom=e.right),this.touchState.currentY=this._getPoint(t).x,this.maxPlayProgress=Math.max(this.playProgress,this.maxPlayProgress),this._changeProgressByTouch(),this.clearCtrlTimeout(),!0},this._doPrgTouchmove=t=>{var i;if(!this.isMouseMove&&"mousemove"==t.type)return;if((null===(i=t.touches)||void 0===i?void 0:i.length)>1)return!0;const e=Date.now();if(this.footerPrgtime+50>e)return!0;this.footerPrgtime=e;const o=this._getPoint(t).x,s=100*Math.abs(o-this.touchState.currentY)/this.touchState.height;return this.touchState.currentY=o,(s>1||"mousemove"==t.type)&&this._changeProgressByTouch(this.updateNow),!0},this._doPrgTouchend=t=>{if("mouseleave"!=t.type||this.isMouseMove)return"mouseup"!=t.type&&"mouseleave"!=t.type||(this.isMouseMove=!1),this.touchState.isTouching&&this._changeProgressByTouch(),this.touchState.isTouching=!1,this.isSeeking=!1,!0},this._doOpnStart=t=>{"mousedown"==t.type&&(this.isMouseMove=!0),this.isSeeking=!0,this.isRealWaiting=!1;const i=a(t.currentTarget);this.touchState.top=i.top,this.touchState.height=i.bottom-this.touchState.top,this.touchState.right=i.right,this.touchState.bottom=i.bottom,this.touchState.isTouching=!0,this.deviceIsPORTRAIT&&(this.touchState.top=i.left,this.touchState.height=i.right-this.touchState.top,this.touchState.right=i.bottom,this.touchState.bottom=i.right);const{x:e,y:o}=this._getPoint(t);return this.opnLx=e,this.opnLy=o,this.maxPlayProgress=Math.max(this.playProgress,this.maxPlayProgress),this.opnStartTime=(new Date).getTime(),!0},this._doOpnMove=t=>{if((this.isMouseMove||"mousemove"!=t.type)&&(0===this.opnMoveTime&&(this.opnMoveTime=(new Date).getTime()),this.opnMoveTime-this.opnStartTime<1500)){this.showCtrl=!0,this.clearCtrlTimeout(),this.isMoving=!0;const{x:i,y:e}=this._getPoint(t);switch(this.opnNx=i,this.opnNy=e,this.controlType||(Math.abs(this.opnNx-this.opnLx)>=Math.abs(this.opnNy-this.opnLy)?(this.controlType="P",this.controlLabel=this.currentTimeLabel):this.isIOS?(this.controlType="B",this.controlIcon="cty-brightness",this.controlLabel=this.playBrightness+"%"):this.opnLx>.5*this.touchState.height?(this.controlType="V",this.controlIcon="cty-volume-high",this.controlLabel=this.playVolume+"%"):(this.controlType="B",this.controlIcon="cty-brightness",this.controlLabel=this.playBrightness+"%")),"P"==this.controlType&&(this.controlIcon=this.opnNx-this.opnLx>0?"cty-forward":"cty-backward"),this.controlType){case"B":this.opnNy-this.opnLy<0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy>0&&this.deviceIsPORTRAIT?(this.playBrightness-=2,this.playBrightness=Math.max(this.playBrightness,0),this.updateNow&&this._updateBrightness()):(this.opnNy-this.opnLy>0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy<0&&this.deviceIsPORTRAIT)&&(this.playBrightness+=2,this.playBrightness=Math.min(this.playBrightness,100),this.updateNow&&this._updateBrightness()),this.controlLabel=this.playBrightness+"%";break;case"V":this.opnNy-this.opnLy<0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy>0&&this.deviceIsPORTRAIT?(this.playVolume-=2,this.playVolume=Math.max(this.playVolume,0),this.updateNow&&this._updateVolume()):(this.opnNy-this.opnLy>0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy<0&&this.deviceIsPORTRAIT)&&(this.playVolume+=2,this.playVolume=Math.min(this.playVolume,100),this.updateNow&&this._updateVolume()),this.controlLabel=this.playVolume+"%";break;case"P":if(this.opnNx-this.opnLx>0){if(!this.allowForward&&this.playProgress>=this.maxPlayProgress)return this.isMoving=!1,void this.unAllowForward();this.playProgress+=1,this.playProgress=Math.min(this.playProgress,1e3),this.updateNow&&(this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()),this.controlLabel=n(this.playProgress/1e3*this.videoEl.duration)}else this.opnNx-this.opnLx<0?(this.playProgress-=1,this.playProgress=Math.max(0,this.playProgress),this.updateNow&&(this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()),this.controlLabel=n(this.playProgress/1e3*this.videoEl.duration)):this.interactiveReset()}this.lastControlType=this.controlType,this.opnLx=this.opnNx,this.opnLy=this.opnNy}},this._doOpnEnd=t=>{if("mouseleave"!=t.type||this.isMouseMove){if("mouseup"!=t.type&&"mouseleave"!=t.type||(this.isMouseMove=!1),!this.isMoving){this.showCtrl=!this.showCtrl,this.ctyVideoCtrlChange.emit(this.showCtrl),this._resetDot();const t=Date.now();t-this.lastTapScreenTime<400?(this.lastTapScreenTime=this.lastTapScreenTime-1e3,this.toggleVideo(null)):this.lastTapScreenTime=t}if(!this.updateNow)switch(this.controlType){case"B":this._updateBrightness();break;case"V":this._updateVolume();break;case"P":this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()}this.controlType="",this.clearCtrlTimeout(),this.touchState.isTouching=!1,this.opnMoveTime=0,this._clearTouchMoveToast(),this.isSeeking=!1}},this._doDot=(t,i)=>{if(t.stopPropagation(),this.clearCtrlTimeout(),this.currentMarker.breakpoint>0&&i.breakpoint==this.currentMarker.breakpoint)return void this.setVideoCurrentTime(this.currentMarker.breakpoint,(()=>{this._resetDot(),this.play()}));this.showDotPanel=!0,this.currentMarker=i;const e=a(t.target),o=e.top+e.height/2,s=e.left+e.width/2;this.reallyShowDot=!1,window.setTimeout((()=>{const t=this.dotPanelEl,i=t.parentNode.offsetHeight,e=t.parentNode.offsetWidth,a=t.offsetWidth,r=t.children[t.children.length-1],h=o-r.offsetLeft-r.offsetWidth/2+this.triangleMargin,n=s-r.offsetLeft-r.offsetWidth/2+this.triangleMargin;this.dotDotPanelTop=h+"px",this.dotDotPanelLeft=n+"px";const c=i-a-20,d=e-a-20;this.canScreenOrientation?(n>d?(this.triangleMargin=n-d,this.dotDotPanelLeft=d+"px"):n<5?(this.triangleMargin=n-5,this.dotDotPanelLeft="5px"):this.triangleMargin=0,this.dotDotPanelTop="auto"):(h>c?(this.triangleMargin=h-c,this.dotDotPanelTop=c+"px"):h<5?(this.triangleMargin=h-5,this.dotDotPanelTop="5px"):this.triangleMargin=0,this.dotDotPanelLeft="auto"),window.setTimeout((()=>{this.reallyShowDot=!0}),10)}),100)},this._toPoint=()=>{this.clearCtrlTimeout(),this.setVideoCurrentTime(this.currentMarker.breakpoint,(()=>{this._resetDot(),this.play()}))}}get curIsFullscreen(){return this._curIsFullscreen}set curIsFullscreen(t){this._curIsFullscreen=t,this.deviceIsPORTRAIT="P"==this.direction||!t||this.largeScreenIsPortrait&&(this.isPC||this.isIpad)||this.canScreenOrientation&&t}async componentWillLoad(){if(!this.isIOS&&!this.isMicroMessager&&l.isAvailable)try{this.playVolume=await l.getVolume(),this.isMute=await l.isMuted()}catch(t){}this.defaultFullscreen||this.fullscreenOnly||(this.curIsFullscreen=!1);let t=this.rates.map((t=>t));this._rates=t,this.hasInteractive=Array.isArray(this.interactiveActions)&&this.interactiveActions.length>0,this.interactiveReset(),this.showTogglePlay=!this.autoplay}componentDidLoad(){if(this.canScreenOrientation=this.orientation&&"L"==this.direction&&this.isHybrid&&x("mobile")&&!this.isIpad,this.deviceIsPORTRAIT="P"==this.direction||!this.curIsFullscreen||this.largeScreenIsPortrait&&(this.isPC||this.isIpad)||this.canScreenOrientation,this.canScreenOrientation&&this.curIsFullscreen?this.landscapeEnterTimer>0?setTimeout((()=>{d.lock("landscape").catch((()=>{}))}),this.landscapeEnterTimer):d.lock("landscape").catch((()=>{})):this.isHybrid&&x("mobile")&&d.lock("portrait").catch((()=>{})),+this.startTime>0&&(this.videoEl.currentTime=Number(this.startTime)),this.videoEl.controls=!1,this.videoEl.playbackRate=this.rate,this.isMicroMessager?window.setTimeout((()=>{this.isLoading=!1,this.showTogglePlay=!0,this.videoEl.style.display="block"}),2500):this.isWifi?+this.startTime>0&&(this.videoEl.style.display="block"):window.setTimeout((()=>{this.isLoading=!1,this.showTogglePlay=!0,this.videoEl.style.display="block"}),1500),!this.allowBackgroundForward&&this.isIOS){let t=1,i="",e=0;this.isMicroMessager?(this.visibilityChangeHandler=()=>{!this.allowForward&&this.videoEl&&(t%2==1?(this.showVideoError=!1,i=this.videoEl.src,e=this.videoEl.currentTime,this.videoEl.src="data:video/mp4;base64,YQ=="):(this.videoEl.src=i,window.setTimeout((()=>{this.videoEl.currentTime=e,this.showVideoError=!0}),1500)),t++)},document.addEventListener("visibilitychange",this.visibilityChangeHandler)):(this.iosAppPauseHandler=()=>{this.videoEl&&!this.allowForward&&(this.showVideoError=!1,i=this.videoEl.src,e=this.videoEl.currentTime,this.videoEl.src="data:video/mp4;base64,YQ==")},this.iosAResumeHandler=()=>{this.videoEl&&!this.allowForward&&(this.videoEl.src=i,window.setTimeout((()=>{this.showVideoError=!1,this.videoEl.currentTime=e}),1500))},document.addEventListener("pause",this.iosAppPauseHandler),document.addEventListener("resume",this.iosAResumeHandler))}}disconnectedCallback(){clearTimeout(this.ctrlTimer),clearTimeout(this.warningMsgTimer),clearTimeout(this.touchMoveTimer),!this.allowBackgroundForward&&this.isIOS&&(this.isMicroMessager?document.removeEventListener("visibilitychange",this.visibilityChangeHandler):(document.removeEventListener("pause",this.iosAppPauseHandler),document.removeEventListener("resume",this.iosAResumeHandler))),this.videoEl&&(this.videoEl.src="")}_getVolumeIconName(){return this.isMute?p:0==this.playVolume?g:this.playVolume<30?u:this.playVolume<70?b:m}unAllowForward(){this.warningMsg=this.unAllowForwardMsg,this.clearWarningMsg()}async play(){this.videoEl.paused&&this.videoEl.play(),this.isPlaying=!0}async setCtrlShow(t=!1){this.showCtrl=t,this._resetDot(),this.ctyVideoCtrlChange.emit(t)}async pause(){this.videoEl.paused||this.videoEl.pause(),this.isPlaying=!1}async setVideoCurrentTime(t,i){this.maxPlayProgress=Math.max(this.maxPlayProgress,this.playProgress),t>this.videoEl.duration*this.maxPlayProgress/1e3&&!this.allowForward?this.unAllowForward():(this.videoEl.currentTime=t,i&&i())}_clearTouchMoveToast(){clearTimeout(this.touchMoveTimer),this.touchMoveTimer=window.setTimeout((()=>{this.isMoving=!1}),2e3)}async clearCtrlTimeout(){this.showCtrl&&(clearTimeout(this.ctrlTimer),this.ctrlTimer=window.setTimeout((()=>{this.showCtrl=!1,this.touchState.isTouching=!1,this._resetDot(),this.ctyVideoCtrlChange.emit(!1)}),4e3))}async setWarningMsg(t){this.warningMsg=t,this.clearWarningMsg()}clearWarningMsg(){""!=this.warningMsg&&(clearTimeout(this.warningMsgTimer),this.warningMsgTimer=window.setTimeout((()=>{this.warningMsg=""}),2e3))}async toggleVideo(t){this.isLoading||(this.videoEl.paused?this.play():this.pause(),t&&(this.clearCtrlTimeout(),t.stopPropagation()))}async toggleVolume(){if(this.isIOS||this.isMicroMessager||!l.isAvailable)this.videoEl.muted=!this.videoEl.muted,this.isMute=this.videoEl.muted;else try{await l.toggleMute(),this.isMute=await l.isMuted()}catch(t){l.setVolume(this.isMute?this.playVolume:0),this.isMute=!this.isMute}this.clearCtrlTimeout()}async setPlayRate(t){this.rate=t,this.videoEl.playbackRate=this.rate,this.showPlayRate=!1,this.ctyVideoRateChange.emit(t)}_getPoint(t){const{x:i,y:e}=r(t);try{return this.deviceIsPORTRAIT?{x:i,y:e}:{x:e,y:i}}catch(t){return{x:0,y:0}}}_changeProgressByTouch(t=!0){if(!this.allowForward&&!this.allowBackward)return;const i=Math.round((this.touchState.currentY-this.touchState.top)/this.touchState.height*1e3);!this.allowBackward&&i<this.playProgress||(!this.allowForward&&i>this.maxPlayProgress?this.unAllowForward():(this.lastControlType="P",this.isMoving=!0,this.playProgress>i?this.controlIcon="cty-backward":this.playProgress<i&&(this.controlIcon="cty-forward"),this.playProgress=i,0==i&&(this.interactiveReset(),this.isMoving=!1),t?(this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()):this.controlLabel=n(this.playProgress/1e3*this.videoEl.duration),this._clearTouchMoveToast()))}_updateVideoProgress(){const t=this.videoEl.currentTime,i=this.videoEl.duration;this.playProgress=i>0?Math.round(t/i*1e3):0,this.ctyVideoProgress.emit(this.playProgress/10),this.currentTimeLabel=n(t),this.durationLabel=n(i),"P"==this.lastControlType&&(this.controlLabel=this.currentTimeLabel)}_updateBrightness(){this.videoCtrlEl.style.backgroundColor="rgba(0,0,0, "+(100-this.playBrightness)/1.6/100+")"}async _updateVolume(){if(this.isIOS||this.isMicroMessager||!l.isAvailable)this.videoEl.volume=this.playVolume/100;else try{await l.setVolume(this.playVolume),this.isMute=await l.isMuted()}catch(t){}this.videoEl.volume=this.playVolume/100,this.playVolume>0&&this.isMute&&this.toggleVolume()}_resetDot(){this.showDotPanel=!1,this.currentMarker={describe:"",breakpoint:0,position:0}}getVideoElement(){return Promise.resolve().then((()=>this.videoEl))}getVideoState(){return Promise.resolve().then((()=>{const{maxPlayProgress:t,isWifi:i,isLoading:e,playProgress:o,isPlaying:s}=this;return{maxPlayProgress:t,isWifi:i,isLoading:e,playProgress:o,isPlaying:s}}))}interactiveCheck(t){var i;if(this.hasInteractive&&!this.showInteractiveLayer)for(const e of this.interactiveActions)if(this.checkActionTriggerCond(e,t,"play")){this.showInteractiveLayer=!0,this.interactiving_action=e,e.status.entercount++;for(const t of e.buttons)"optbtn"==t.type&&(t.val=t.defaultval);let t=!1;if((null===(i=e.autoactions)||void 0===i?void 0:i.length)>0)for(const i of e.autoactions)if(this.calcTriggerCond(this.interactiving_action,i.condtrigger)){this.pause(),this.doInteractiveAction(i),t=!0;break}!t&&e.buttons.length>0&&(this.pause(),this.showInteractiveActionUI(e));break}}changeInteractiveAction(t){if(this.hasInteractive||this.showInteractiveLayer){this.clearInteractiveActionUI(),this.interactiving_action=t,t.status.entercount++;for(let i of t.buttons)"optbtn"==i.type&&(i.val=i.defaultval);this.showInteractiveActionUI(t)}}checkActionTriggerCond(t,i,e){let o=t.playtrigger;return!("play"==e&&(i<o.min||i>=o.max)||!this.calcTriggerCond(t,t.condtrigger))}calcTriggerCond(t,i){let e=!0;for(let o of i){let i=!0,s=null;switch(o.type){case"entercount":if(s=this.findInteractiveAction(o.actionid,t),null!=s){let t=s.status.entercount;i=t>=o.min&&(t<o.max||""==o.max)}break;case"optbtn":if(s=this.findInteractiveAction(o.actionid,t),null!=s)for(let t of s.buttons)if("optbtn"==t.type&&t.id==o.btnid){i=t.val==o.val;break}break;case"group":i=this.calcTriggerCond(t,o.subs)}e="or"==o.op?e||i:e&&i}return e}findInteractiveAction(t,i){if(""==t.trim())return i;for(let i of this.interactiveActions)if(i.id==t)return i;return null}interactiveAction(t){if(t.stopPropagation(),null==this.interactiving_action)return;let i=this.interactiving_action.imgW,e=this.interactiving_action.imgH;for(let o of this.interactiving_action.buttons)if(this.interactiveClickHitCheck(t,{x:o.x,y:o.y,width:o.w,height:o.h},i,e)){switch(o.type){case"optbtn":o.val=1==o.val?"0":"1",this.refreshInteractiveActionBtnStatus(this.interactiving_action);break;case"link":case"input":this.doInteractiveAction(o);break;default:for(let t of o.actions)if(this.calcTriggerCond(this.interactiving_action,t.condtrigger)){this.doInteractiveAction(t);break}}break}}doInteractiveAction(t){if("action"==t.type)this.changeInteractiveAction(this.findInteractiveAction(t.actionid,this.interactiving_action));else if("play"==t.type)this.videoEl.currentTime=t.startTime,this.play(),this.clearInteractiveActionUI(),window.setTimeout((()=>{this.interactiving_action=null,this.hideInteractiveActionUI()}),100);else if("link"==t.type){if(!t.link)return this.play(),this.clearInteractiveActionUI(),void window.setTimeout((()=>{this.interactiving_action=null,this.hideInteractiveActionUI()}),100);this.ctyVideoIAAction.emit(t)}}interactiveClickHitCheck(t,i,e,o){let s=o,a=e,r=this.interactiveEl,n=i.y*s/o,c=i.x*a/e,d=i.width*a/e,l=i.height*s/o;const{x:v,y}=h(t);let f=(v-r.offsetLeft)*a/r.clientWidth,p=(y-r.offsetTop)*s/r.clientHeight;return f>=c&&f<=c+d&&p>=n&&p<=n+l}showInteractiveActionUI(t){this.interactiveEl.style.display="block",""!=t.img&&(this.interactiveEl.style.backgroundImage="url("+t.img+")"),this.refreshInteractiveActionBtnStatus(t),this.ctyVideoIAEnter.emit()}hideInteractiveActionUI(){this.showInteractiveLayer=!1,this.clearInteractiveActionUI(),this.interactiveEl.style.display="none"}refreshInteractiveActionBtnStatus(t){let i=this.interactiveEl,e="";for(let i of t.buttons)"optbtn"==i.type&&(e+=i.htmls[i.val]||"");i.innerHTML=e}clearInteractiveActionUI(){this.interactiveEl.innerHTML=""}interactiveReset(){if(this.hasInteractive){this.showInteractiveLayer=!1;for(let t of this.interactiveActions){t.status.entercount=0;for(let i of t.buttons)"optbtn"==i.type&&(i.val=i.defaultval)}}}renderPlayer(){const t=this.poster||`${f.get("resUrlPrefix","")}assets/cty_res/img/poster.jpg`;return e("div",{class:"cty-video__wrapper","data-tap-disable":"true"},"video"===this.player&&e("video",{ref:t=>this.videoEl=t,class:"cty-video__player",poster:t,preload:this.preload,"x5-video-player-type":"h5","x5-video-player-fullscreen":"true",playsinline:!0,"webkit-playsinline":!0,autoplay:(this.isWifi||this.isMicroMessager||this.trafficAutoplay)&&this.autoplay,onCanPlay:this._doCanplay,onTimeUpdate:this._doTimeupdate,onPlay:this._doPlay,onPause:this._doPause,onEnded:this._doEnded,onPlaying:this._doPlaying,onVolumeChange:this._doChangeVolume,onError:this._doError,onStalled:this._doStalled,onWaiting:this._doWaiting,onSeeked:this._doSeeked,src:this.url,typeof:"video/mp4"}),"audio"===this.player&&e("div",{class:"cty-video__player cty-video__audio-player"},e("audio",{ref:t=>this.videoEl=t,class:"cty-video__player-audio",preload:this.preload,autoplay:(this.isWifi||this.isMicroMessager||this.trafficAutoplay)&&this.autoplay,onCanPlay:this._doCanplay,onTimeUpdate:this._doTimeupdate,onEnded:this._doEnded,onPlaying:this._doPlaying,onPlay:this._doPlay,onPause:this._doPause,onVolumeChange:this._doChangeVolume,onError:this._doError,onStalled:this._doStalled},e("source",{src:this.url,type:"audio/mp3"}),e("source",{src:this.url,type:"audio/ogg"})),e("slot",{name:"audio-content"})))}renderControls(){return e("div",{class:"cty-video__controls",ref:t=>this.videoCtrlEl=t},e("slot",{name:"header"}),this.showCtrl&&this.headerCtrl&&e("ion-grid",{class:"cty-video__header"},e("ion-row",null,e("ion-col",{class:"flex-align-center cty-video__header-back"},e("ion-button",{onClick:this._dismiss},e("cty-icon",{name:_}))),e("ion-col",{size:"6",class:"cty-video__title flex-align-center cty-ellipsis"},this.title),e("ion-col",null,e("slot",{name:"headerCol"})))),e("slot",{name:"footer"}),this.showCtrl&&this.footerCtrl&&e("ion-grid",{class:{"cty-video__footer":!0,"safe-area-bottom-border-color":"P"==this.direction&&this.curIsFullscreen}},"top"==this.progressPosition&&e("ion-row",{class:"cty-video__footer-progress__top"},e("ion-range",{mode:"ios",class:"cty-video__footer-range",debounce:300,max:1e3,value:this.playProgress,disabled:!0,ticks:!1})),e("ion-row",null,e("ion-col",{class:{"flex-align-center cty-video__footer-toggle-play":!0,"cty-video__footer-flex":"top"==this.progressPosition}},e("ion-button",{onClick:t=>{this.toggleVideo(t)}},e("cty-icon",{name:this.isPlaying?"cty-pause":"cty-play"})),"top"==this.progressPosition&&e("div",{class:"flex-align-center cty-video__footer-time-label"},this.currentTimeLabel,e("span",null,"/"),this.durationLabel)),"center"==this.progressPosition&&e("ion-col",{class:"cty-video__footer-progress flex-center"},e("ion-range",{mode:"ios",class:"cty-video__footer-range",debounce:300,max:1e3,value:this.playProgress,disabled:!0,ticks:!1},e("span",{class:"cty-video__time",slot:"start"},this.currentTimeLabel),e("span",{class:"cty-video__time",slot:"end"},this.durationLabel))),this.curIsFullscreen&&e("ion-col",{class:"cty-video__footer-rate flex-align-center"},e("ion-button",{onClick:this._doSetRate},1==this.rate?"倍速":this.rate+"X")),e("ion-col",{class:"cty-video__footer-volume flex-align-center"},e("ion-button",{onClick:()=>this.toggleVolume()},e("cty-icon",{name:this._getVolumeIconName()}))),!this.fullscreenOnly&&!this.curIsFullscreen&&this.fullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!0)},e("cty-icon",{name:this.fullscreenIcon}))),!this.fullscreenOnly&&this.curIsFullscreen&&this.exitFullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!1)},e("cty-icon",{name:this.exitFullscreenIcon}))),e("slot",{name:"footerCol"}))),(this.allowForward||this.allowBackward)&&this.showCtrl&&this.footerCtrl&&e("ion-grid",{class:{"cty-video__footer cty-video__footer-controls":!0,"safe-area-bottom-border-color":"P"==this.direction&&this.curIsFullscreen}},"top"==this.progressPosition&&e("ion-row",{class:"cty-video__footer-progress__top",onClick:t=>t.stopPropagation()},!this.isPC&&e("div",{class:"cty-video__footer-bar",onTouchStart:this._doPrgTouchstart,onTouchMove:this._doPrgTouchmove,onTouchEnd:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}})))),this.isPC&&e("div",{class:"cty-video__footer-bar",onMouseDown:this._doPrgTouchstart,onMouseMove:this._doPrgTouchmove,onMouseUp:this._doPrgTouchend,onMouseLeave:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}}))))),e("ion-row",null,e("ion-col",{class:{"flex-align-center cty-video__footer-toggle-play":!0,"cty-video__footer-flex":"top"==this.progressPosition}},e("ion-button",{onClick:t=>{this.toggleVideo(t)}},e("cty-icon",{name:this.isPlaying?"cty-pause":"cty-play"})),"top"==this.progressPosition&&e("div",{class:"flex-align-center cty-video__footer-time-label"},this.currentTimeLabel,e("span",null,"/"),this.durationLabel)),"center"==this.progressPosition&&e("ion-col",{class:"cty-video__footer-progress flex-center"},e("span",{class:"cty-video__time"},this.currentTimeLabel),!this.isPC&&e("div",{class:"cty-video__footer-bar",onTouchStart:this._doPrgTouchstart,onTouchMove:this._doPrgTouchmove,onTouchEnd:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}})))),this.isPC&&e("div",{class:"cty-video__footer-bar",onMouseDown:this._doPrgTouchstart,onMouseMove:this._doPrgTouchmove,onMouseUp:this._doPrgTouchend,onMouseLeave:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}})))),e("span",{class:"cty-video__time"},this.durationLabel)),this.curIsFullscreen&&e("ion-col",{class:"cty-video__footer-rate flex-align-center"},e("ion-button",{onClick:this._doSetRate},1==this.rate?"倍速":this.rate+"X")),e("ion-col",{class:"cty-video__footer-volume flex-align-center"},e("ion-button",{onClick:()=>this.toggleVolume()},e("cty-icon",{name:this._getVolumeIconName()}))),!this.fullscreenOnly&&!this.curIsFullscreen&&this.fullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!0)},e("cty-icon",{name:this.fullscreenIcon}))),!this.fullscreenOnly&&this.curIsFullscreen&&this.exitFullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!1)},e("cty-icon",{name:this.exitFullscreenIcon}))),e("slot",{name:"footerCol"}))),this.isMoving&&e("div",{class:"cty-video__opn-toast flex-center"},e("cty-icon",{name:this.controlIcon}),e("span",null,this.controlLabel)),e("slot",{name:"controls"}),!this.isPC&&this.controls&&e("div",{class:"cty-video__opn-panel",onTouchStart:this._doOpnStart,onTouchMove:this._doOpnMove,onTouchEnd:this._doOpnEnd,onClick:t=>t.stopPropagation()}),this.isPC&&this.controls&&e("div",{class:"cty-video__opn-panel",onMouseDown:this._doOpnStart,onMouseMove:this._doOpnMove,onMouseUp:this._doOpnEnd,onMouseLeave:this._doOpnEnd,onClick:t=>t.stopPropagation()}),this.showCtrl&&this.showDotPanel&&e("div",{ref:t=>{this.dotPanelEl=t},class:{"cty-video__dot-panel flex-center":!0,"cty-video__dot-panel-ex":"top"==this.progressPosition},onClick:t=>t.stopPropagation(),style:{top:this.dotDotPanelTop,left:this.dotDotPanelLeft,opacity:this.reallyShowDot?"1":"0"}},e("span",{class:"cty-video__dot-label cty-ellipsis2"},this.currentMarker.describe),e("ion-button",{onClick:this._toPoint},e("cty-icon",{name:"cty-play-ex"}),"知识点"),e("span",{class:"cty-video__dot-triangle",style:{"margin-left":this.triangleMargin+"px"}})),e("slot",{name:"ctrl"}))}render(){return e(o,{key:"bcce9c119dd9742d0c69dd9b5ed45b2ee39e4f91",class:{"cty-video":!0,"cty-video__vertical":this.deviceIsPORTRAIT,"cty-video__unfullscreen":!this.curIsFullscreen,"cty-video__large-screen":"P"==this.direction&&this.curIsFullscreen&&(this.isPC||this.isIpad)}},this.renderPlayer(),this.renderControls(),(!this.isLoading||this.isMicroMessager)&&!this.isPlaying&&!this.showInteractiveLayer&&this.showTogglePlay&&e("ion-button",{key:"f55a081110cdc0db15c903ec34b2258e953fafc7",part:"toggle-play",class:"cty-video__toggle-play flex-center",onClick:t=>{this.toggleVideo(t)}},e("cty-icon",{key:"f1ea8cecf7415ea732e59d475256f8033a242d74",name:"cty-play"})),!this.isWifi&&!this.isPlaying&&!this.isLoading&&!this.isMicroMessager&&this.trafficMsg&&e("div",{key:"9167c66f7410c98493227e4dca379bf65740242b",class:"cty-video__toast cty-ellipsis",part:"toast"},this.trafficMsg),""!=this.warningMsg&&e("div",{key:"536ff573d8c9670a531e5af490cbd8bb1ab74be1",class:"cty-video__toast cty-ellipsis",part:"toast"},this.warningMsg),this.showPlayRate&&e("div",{key:"cdf67ac451fd70983f4fee4741d5fe9330161407",class:"cty-video__rate",onClick:()=>this.showPlayRate=!1},e("div",{key:"cbef52f68b8d3028908da0b69c6c8983564821be",class:"cty-video__rate-mask flex-center-justify-end"},e("div",{key:"8ddaff687d8231d9c8448ef4d5758a64e2751f7d",class:"cty-video__rate-list"},this._rates.map((t=>e("button",{onClick:()=>this.setPlayRate(t),class:{active:this.rate==t,"cty-video__rate-list-item":!0}},e("span",null,t,"X"))))))),this.hasInteractive&&this.curIsFullscreen&&e("div",{key:"b82904799d30e33e762b352739d67d9a38cdbff0",class:"cty-video__player cty-video__interactive",onClick:()=>{},ref:t=>this.interactiveEl=t}))}static get assetsDirs(){return["assets"]}get el(){return s(this)}};w.style='*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}.flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.cty-ellipsis[class]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:normal}.cty-ellipsis2[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;word-break:break-all;word-wrap:break-word}.cty-ellipsis3[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;word-break:break-all;word-wrap:break-word}.cty-ellipsis4[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;word-break:break-all;word-wrap:break-word}ion-button{--background-activated:transparent;--background-focused:transparent;--background-hover:transparent;--box-shadow:none}ion-grid{padding:0}ion-row{padding:0}ion-col{padding:0}ion-item{--padding-bottom:0;--padding-end:0;--padding-start:0;--padding-top:0;--inner-padding-top:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-bottom:0;--inner-border-width:0;--border-width:0;--min-height:0;--background:none;overflow:initial}ion-toast{--width:84%;--height:36px;--color:var(--cty-color-white);--background:rgba(0, 0, 0, 0.7);--border-radius:100px;line-height:1.2;font-size:var(--cty-font-size-base);text-align:center}.plt-hybrid .safe-area-bottom-border{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid var(--cty-color-white)}.plt-hybrid .safe-area-bottom-border-color{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid currentColor}.plt-hybrid .safe-area-bottom-padding{padding-bottom:var(--ion-safe-area-bottom, 0)}:host{--cty-video-width:100vw;--cty-video-height:100vh;--cty-video-half-width:calc(var(--cty-video-width) / 2);--cty-video-fit:fill;--cty-video-header-height:50px;--cty-video-header-background:var(--cty-overlay-color-lighter);--cty-video-header-unfullscreen-background:transparent;--cty-video-header-unfullscreen-height:30px;--cty-video-header-padding-top:0px;--cty-video-header-padding-bottom:0px;--cty-video-header-padding-start:0px;--cty-video-header-padding-end:0px;--cty-video-header-back-display:flex;--cty-video-header-back-background:transparent;--cty-video-header-back-height:36px;--cty-video-header-back-width:36px;--cty-video-header-back-radius:var(--cty-border-radius-circle);--cty-video-header-back-offset-start:2px;--cty-video-header-back-offset-end:0px;--cty-video-header-back-size:25px;--cty-video-header-back-color:var(--cty-color-white);--cty-video-header-title-size:var(--cty-font-size-medium);--cty-video-header-title-color:var(--cty-color-white);--cty-video-header-title-display:flex;--cty-video-footer-height:50px;--cty-video-footer-background:var(--cty-overlay-color-lighter);--cty-video-footer-unfullscreen-background:transparent;--cty-video-footer-unfullscreen-height:35px;--cty-video-footer-progress-height:0px;--cty-video-footer-padding-start:0px;--cty-video-footer-padding-end:0px;--cty-video-footer-progress-size:var(--cty-font-size-medium);--cty-video-footer-icon-size:24px;--cty-video-footer-fullscreen-icon-size:20px;--cty-video-play-size:80px;--cty-video-play-border:5px solid rgb(238 238 238 / 80%);--cty-video-play-icon-size:40px;--cty-video-unfullscreen-play-size:40px;--cty-video-unfullscreen-play-border:4px solid rgb(238 238 238 / 80%);--cty-video-unfullscreen-play-icon-size:26px;--cty-video-range-bar-height:2px;--cty-video-bar-size:12px;--cty-video-bar-color:var(--cty-color-white);--cty-video-range-knob-background:var(--cty-color-white);--cty-video-range-background:rgb(255 255 255 / 50%);--cty-video-range-background-active:var(--cty-color-primary);--cty-video-loading-background-color:rgb(0 0 0 / 90%);--cty-video-loading-img-width:100px;--cty-video-half-screen-height:56vw;--cty-video-dot-size:7px;--cty-video-dot-padding:9px;--cty-video-dot-active-color:var(--cty-color-primary);--cty-video-progress-vertical-padding:0 15px;--cty-video-progress-horizongtal-padding:0px;--cty-video-rate-active-color:var(--cty-color-primary);--cty-video-toast-width:calc(var(--cty-video-width) * 0.4);--cty-video-toast-height:40px;--cty-video-opn-toast-icon-size:20px;position:relative;display:block;width:var(--cty-video-width);height:var(--cty-video-height);background:var(--cty-color-black)}ion-row{height:100%}ion-col{overflow:hidden}ion-button{min-height:auto;margin:0}.cty-video__wrapper{position:relative;width:100%;height:100%}.cty-video__player{position:absolute;top:0;left:0;display:none;width:var(--cty-video-height);height:var(--cty-video-width);margin:0;-o-object-fit:var(--cty-video-fit);object-fit:var(--cty-video-fit);-webkit-transform:rotate(90deg) translate(0, -100%);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__controls{position:absolute;top:0;left:0;width:100%;height:100%}.cty-video__header{position:absolute;top:0;left:0;z-index:6;-webkit-box-sizing:content-box;box-sizing:content-box;width:calc(var(--cty-video-height) - var(--cty-video-header-padding-start) - var(--cty-video-header-padding-end));height:var(--cty-video-header-height);padding:var(--cty-video-header-padding-top) var(--cty-video-header-padding-end) var(--cty-video-header-padding-bottom) var(--cty-video-header-padding-start);background:var(--cty-video-header-background);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__header-back{display:var(--cty-video-header-back-display);-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__header-back ion-button{width:var(--cty-video-header-back-width);height:var(--cty-video-header-back-height);margin-right:var(--cty-video-header-back-offset-end);margin-left:var(--cty-video-header-back-offset-start);border-radius:var(--cty-video-header-back-radius);--background:var(--cty-video-header-back-background);--padding-start:5px;--padding-end:5px;--padding-top:0;--padding-bottom:0}.cty-video__header-back cty-icon{font-size:var(--cty-video-header-back-size);color:var(--cty-video-header-back-color)}.cty-video__title[class]{display:var(--cty-video-header-title-display);font-size:var(--cty-video-header-title-size);line-height:var(--cty-video-header-height);color:var(--cty-video-header-title-color)}.cty-video__footer{position:absolute;top:0;left:0;z-index:6;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--cty-video-height);height:var(--cty-video-footer-height);padding-right:var(--cty-video-footer-padding-end);padding-left:var(--cty-video-footer-padding-start);background:var(--cty-video-footer-background);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:calc(var(--cty-video-footer-height) / 2) calc(var(--cty-video-footer-height) / 2);transform-origin:calc(var(--cty-video-footer-height) / 2) calc(var(--cty-video-footer-height) / 2)}.cty-video__footer ion-button{height:100%;--background:transparent;--padding-start:12px;--padding-end:12px;--padding-top:0;--padding-bottom:0;--color:var(--cty-color-white)}.cty-video__footer ion-row{height:calc(var(--cty-video-footer-height) - var(--cty-video-footer-progress-height))}.cty-video__footer .cty-video__footer-progress__top{height:var(--cty-video-footer-progress-height);-webkit-transform:translateY(calc(var(--cty-video-footer-progress-height) / 2));transform:translateY(calc(var(--cty-video-footer-progress-height) / 2))}.cty-video__footer-controls{background:transparent}.cty-video__footer-controls ion-col:not(.cty-video__footer-progress){opacity:0}.cty-video__footer-controls .cty-video__time{opacity:0}.cty-video__footer-toggle-play{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-toggle-play cty-icon{font-size:var(--cty-video-footer-icon-size)}.cty-video__footer-flex{-ms-flex:1;flex:1}.cty-video__footer-time-label{margin-left:8px;font-size:var(--cty-video-footer-progress-size);color:var(--cty-color-white);letter-spacing:0.2px}.cty-video__footer-time-label span{margin:0 1px;-webkit-transform:translateY(-1px);transform:translateY(-1px)}.cty-video__footer-progress{-ms-flex:1;flex:1;overflow:auto}.cty-video__time{font-size:var(--cty-video-footer-progress-size);color:var(--cty-color-white)}.cty-video__time:nth-child(1){margin-right:12px}.cty-video__time:nth-child(2),.cty-video__time:last-child{margin-left:12px}.cty-video__footer-range{--height:100%;--knob-size:var(--cty-video-bar-size);--bar-height:var(--cty-video-range-bar-height);padding:0;font-size:var(--cty-font-size-medium);color:var(--cty-video-bar-color);opacity:1;--knob-background:var(--cty-video-range-knob-background);--bar-background:var(--cty-video-range-background);--bar-background-active:var(--cty-video-range-background-active)}.cty-video__footer-bar{position:relative;-ms-flex:1;flex:1;height:80%;cursor:pointer}.cty-video__footer-progress__top{position:relative;z-index:2;padding:var(--cty-video-progress-horizongtal-padding)}.cty-video__footer-progress__top .cty-video__footer-bar{height:100%}.cty-video__footer-dot{position:absolute;top:50%;padding:var(--cty-video-dot-padding);-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cty-video__footer-dot::after{display:block;width:var(--cty-video-dot-size);height:var(--cty-video-dot-size);content:"";background:var(--cty-video-dot-active-color);border-radius:var(--cty-border-radius-circle)}.cty-video__footer-rate{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-rate ion-button{--padding-start:5px;--padding-end:5px;--padding-top:4px;--padding-bottom:4px;width:36px;height:auto;margin-left:12px;font-size:var(--cty-font-size-extra-small);font-weight:bold;white-space:nowrap;border:1px solid var(--cty-color-white);border-radius:var(--cty-border-radius-base)}.cty-video__footer-volume{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-volume cty-icon{font-size:var(--cty-video-footer-icon-size)}.cty-video__footer-fullscreen{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-fullscreen ion-button{--padding-start:0px}.cty-video__footer-fullscreen cty-icon{font-size:var(--cty-video-footer-fullscreen-icon-size)}.cty-video__toggle-play{position:absolute;top:50%;left:50%;z-index:8;width:var(--cty-video-play-size);height:var(--cty-video-play-size);margin:calc(var(--cty-video-play-size) / -2) 0 0 calc(var(--cty-video-play-size) / -2);font-weight:bold;text-align:center;border:var(--cty-video-play-border);border-radius:var(--cty-border-radius-circle);--background:transparent;--padding-top:0;--padding-end:0;--padding-start:0;--padding-bottom:0}.cty-video__toggle-play cty-icon{font-size:var(--cty-video-play-icon-size);color:rgba(238, 238, 238, 0.9);text-align:center;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.cty-video__opn-toast{position:absolute;top:50%;left:50%;z-index:4;width:var(--cty-video-toast-width);max-width:150px;height:var(--cty-video-toast-height);font-size:var(--cty-font-size-medium);font-weight:bold;color:var(--cty-color-white);background:var(--cty-overlay-color-light);border-radius:var(--cty-border-radius-round);-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.cty-video__opn-toast cty-icon{margin-right:10px;font-size:var(--cty-video-opn-toast-icon-size)}.cty-video__opn-panel{position:absolute;top:50%;left:50%;z-index:5;width:var(--cty-video-height);height:calc(var(--cty-video-width) - var(--cty-video-header-height) - var(--cty-video-footer-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom));margin:0 0 0 calc((var(--cty-video-footer-height) - var(--cty-video-header-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom)) / 2);-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.cty-video__dot-panel{position:absolute;z-index:6;padding:5px 11px 5px 8px;margin-left:calc(var(--cty-video-footer-height) + 13px + 46px);background:var(--cty-overlay-color);border-radius:var(--cty-border-radius-base);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:left top;transform-origin:left top}.cty-video__dot-panel .cty-video__dot-label{position:relative;max-width:160px;padding-right:17px;font-size:var(--cty-font-size-small);line-height:1.38;color:var(--cty-color-white)}.cty-video__dot-panel .cty-video__dot-label::after{position:absolute;top:0;right:7px;width:1px;height:100%;content:"";background-color:rgba(255, 255, 255, 0.3);-webkit-transform:scaleX(1.5);transform:scaleX(1.5)}.cty-video__dot-panel ion-button{height:36px;font-size:var(--cty-font-size-small);font-weight:bold;--padding-start:0;--padding-end:0;--background:transparent;--border-radius:0;--color:var(--cty-video-dot-active-color)}.cty-video__dot-panel cty-icon{margin-right:4px;font-size:var(--cty-font-size-medium)}.cty-video__dot-panel .cty-video__dot-triangle{position:absolute;bottom:-18px;left:20px;border-color:transparent;border-style:solid;border-width:9px 8px;border-top-color:var(--cty-overlay-color)}.cty-video__dot-panel-ex{margin-left:calc(var(--cty-video-footer-height) + 46px)}.cty-video__toast[class]{position:absolute;top:50%;z-index:7;min-width:300px;max-width:96vw;padding:0 15px;margin:0 0 0 -60px;font-size:var(--cty-font-size-extra-small);font-weight:bold;line-height:30px;color:rgba(238, 238, 238, 0.9);text-align:center;pointer-events:none;background:var(--cty-overlay-color);border-radius:var(--cty-border-radius-large);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.cty-video__rate{position:absolute;top:0;left:0;z-index:9;width:var(--cty-video-height);height:var(--cty-video-width);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__rate-mask{position:absolute;top:0;right:0;width:40%;height:100%;background-image:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.9)), color-stop(rgba(0, 0, 0, 0.8)), color-stop(rgba(0, 0, 0, 0.5)), to(transparent));background-image:linear-gradient(to left, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5), transparent)}.cty-video__rate-list-item{display:block;width:112px;min-height:50px;font-size:var(--cty-font-size-base);color:var(--cty-color-white);text-align:center;outline:none;background-color:transparent;border:none}.cty-video__rate-list-item.active{color:var(--cty-video-rate-active-color)}.cty-video__interactive{z-index:101;display:none;background-color:transparent;background-repeat:no-repeat;background-size:100% 100%}:host(.cty-video__vertical) cty-loading{--cty-loading-transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__player{top:50%;width:var(--cty-video-width);height:auto;max-height:100%;-webkit-transform:rotate(0deg) translateY(-50%);transform:rotate(0deg) translateY(-50%)}:host(.cty-video__vertical) .cty-video__toggle-play cty-icon{-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__toast{top:80%;left:50%;margin:0;-webkit-transform:rotate(0deg) translateX(-50%);transform:rotate(0deg) translateX(-50%)}:host(.cty-video__vertical) .cty-video__header{width:calc(var(--cty-video-width) - var(--cty-video-header-padding-start) - var(--cty-video-header-padding-end));-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__opn-panel{width:var(--cty-video-width);height:calc(var(--cty-video-height) - var(--cty-video-header-height) - var(--cty-video-footer-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom));margin:calc((var(--cty-video-footer-height) - var(--cty-video-header-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom)) / -2) 0 0;-webkit-transform:translate(-50%, -50%) rotate(0);transform:translate(-50%, -50%) rotate(0)}:host(.cty-video__vertical) .cty-video__opn-toast{top:50%;-webkit-transform:translate(-50%, 0) rotate(0deg);transform:translate(-50%, 0) rotate(0deg)}:host(.cty-video__vertical) .cty-video__footer{top:auto;bottom:0;width:var(--cty-video-width);-webkit-transform:rotate(0);transform:rotate(0)}:host(.cty-video__vertical) .cty-video__footer-progress__top{padding:var(--cty-video-progress-vertical-padding)}:host(.cty-video__vertical) .cty-video__time{font-size:var(--cty-font-size-small)}:host(.cty-video__vertical) .cty-video__footer-time-label{margin-left:0}:host(.cty-video__vertical) .cty-video__rate{width:var(--cty-video-width);height:var(--cty-video-height);-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__dot-panel{bottom:calc(var(--cty-video-footer-height) + 13px);margin-left:0;-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__dot-panel-ex{bottom:var(--cty-video-footer-height)}:host(.cty-video__unfullscreen){height:var(--cty-video-half-screen-height)}:host(.cty-video__unfullscreen) .cty-video__wrapper{background-color:var(--cty-color-black)}:host(.cty-video__unfullscreen) .cty-video__player{top:0;height:var(--cty-video-half-screen-height);max-height:initial;-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__unfullscreen) .cty-video__toggle-play{width:var(--cty-video-unfullscreen-play-size);height:var(--cty-video-unfullscreen-play-size);margin:calc(var(--cty-video-unfullscreen-play-size) / -2) 0 0 calc(var(--cty-video-unfullscreen-play-size) / -2);border:var(--cty-video-unfullscreen-play-border)}:host(.cty-video__unfullscreen) .cty-video__toggle-play cty-icon{font-size:var(--cty-video-unfullscreen-play-icon-size)}:host(.cty-video__unfullscreen) .cty-video__header{height:var(--cty-video-header-unfullscreen-height);background:var(--cty-video-header-unfullscreen-background)}:host(.cty-video__unfullscreen) .cty-video__title{line-height:var(--cty-video-header-unfullscreen-height)}:host(.cty-video__unfullscreen) .cty-video__header-back ion-button{width:30px;height:100%}:host(.cty-video__unfullscreen) .cty-video__footer{height:var(--cty-video-footer-unfullscreen-height);background:var(--cty-video-footer-unfullscreen-background)}:host(.cty-video__unfullscreen) .cty-video__footer ion-row{height:calc(var(--cty-video-footer-unfullscreen-height) - var(--cty-video-footer-progress-height))}:host(.cty-video__unfullscreen) .cty-video__footer .cty-video__footer-progress__top{height:var(--cty-video-footer-progress-height)}:host(.cty-video__unfullscreen) .cty-video__footer ion-button{--padding-start:8px;--padding-end:8px}:host(.cty-video__unfullscreen) .cty-video__footer-fullscreen ion-button{--padding-start:0px}:host(.cty-video__unfullscreen) .cty-video__opn-panel{height:calc(var(--cty-video-half-screen-height) - var(--cty-video-header-unfullscreen-height) - var(--cty-video-footer-unfullscreen-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom))}:host(.cty-video__unfullscreen) .cty-video__opn-toast{top:40%;height:30px}:host(.cty-video__unfullscreen) .cty-video__toast{top:70%}:host(.cty-video__unfullscreen) cty-loading{--cty-loading-overlay-height:var(--cty-video-half-screen-height)}:host(.cty-video__large-screen) .cty-video__player{top:0;left:50%;width:auto;max-width:100%;height:100%;-webkit-transform:rotate(0deg) translateX(-50%);transform:rotate(0deg) translateX(-50%)}.cty-video__audio-player{display:block}.cty-video__player-audio{position:absolute;display:none;visibility:hidden}';export{w as cty_video}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./p-iD8sj4Mi.js";import{p as e}from"./p-cERsY8tm.js";const n=()=>t.get("langCode","zh-CN").substring(t.get("langCode","zh-CN").length-2).toLocaleLowerCase(),a={en:{defaultDateFormat:"MM/dd/yyyy",defaultDateTimeFormat:"MM/dd/yyyy HH:mm:ss",AM:"AM",PM:"PM"},cn:{defaultDateFormat:"yyyy-MM-dd",defaultDateTimeFormat:"yyyy-MM-dd HH:mm:ss",AM:"上午",PM:"下午"}},r=()=>t.get("defaultDateFormat","")||a[n()].defaultDateFormat,o=()=>t.get("defaultDateTimeFormat","")||a[n()].defaultDateTimeFormat,s=()=>t.get("defaultTimeZone","");function i(t,e=""){try{let n=t instanceof Date?t:b(t);e&&(n=f(n,"",e));const a={"M+":n.getUTCMonth()+1,"d+":n.getUTCDate(),"H+":n.getUTCHours(),"h+":n.getUTCHours(),"m+":n.getUTCMinutes(),"s+":n.getUTCSeconds(),"f+":n.getUTCMilliseconds()};let r="yyyy-MM-ddTHH:mm:ssZ";return r=r.replace(/y+/g,(t=>(n.getUTCFullYear()+"").substring(4-t.length))),r=r.replace(/M+/g,(()=>("00"+a["M+"]).substring((""+a["M+"]).length))),r=r.replace(/d+/g,(()=>("00"+a["d+"]).substring((""+a["d+"]).length))),r=r.replace(/h+/g,(()=>("00"+a["h+"]).substring((""+a["h+"]).length))),r=r.replace(/H+/g,(()=>("00"+a["H+"]).substring((""+a["H+"]).length))),r=r.replace(/m+/g,(()=>("00"+a["m+"]).substring((""+a["m+"]).length))),r=r.replace(/s+/g,(()=>("00"+a["s+"]).substring((""+a["s+"]).length))),r=r.replace(/f+/g,(()=>("00"+a["f+"]).substring((""+a["f+"]).length))),r}catch(e){return(t||"").toString()}}function c(t){return(i(t)||"").split("T")[0]}function u(t,e="short",a=""){a||(a=s());try{return a?t.toLocaleString(n(),{year:"numeric",timeZone:a,timeZoneName:e}).split(" ")[1]:t.toLocaleString(n().substring(0,2),{year:"numeric",timeZoneName:e}).split(" ")[1]}catch(t){}return""}function f(t,e="",n=""){let a=t instanceof Date?t:b(t);try{if(e!=n){if(n){const t=l(a,f(a,n));a=new Date(a.getTime()+t.totalMilliseconds)}if(e)return new Date(a.toLocaleString("en",{timeZone:e}))}}catch(t){}return a}function g(t,e="",r=""){if(e||(e=o()),""===t||void 0===t)return t;try{const o=n();let i=t instanceof Date?t:b(t);r||(r=s()),r&&(i=f(i,r));const c=i.getHours(),g={"M+":i.getMonth()+1,"d+":i.getDate(),"H+":c,"h+":c>12?c%12:c,"m+":i.getMinutes(),"s+":i.getSeconds(),"q+":Math.floor((i.getMonth()+3)/3),"f+":i.getMilliseconds(),"t+":a[n()][c>=12?"AM":"PM"]};let y=[];return e=d(e,y,/y+/g,(t=>(i.getFullYear()+"").substring(4-t.length))),e=d(e,y,/MMMM/g,(()=>i.toLocaleString(o,{month:"long"}))),e=d(e,y,/MMM/g,(()=>i.toLocaleString(o,{month:"short"}))),e=d(e,y,/www/g,(()=>i.toLocaleString(o,{weekday:"long"}))),e=d(e,y,/ww/g,(()=>i.toLocaleString(o,{weekday:"short"}))),e=d(e,y,/w/g,(()=>i.toLocaleString(o,{weekday:"narrow"}))),e=d(e,y,/M+/g,(()=>("00"+g["M+"]).substring((""+g["M+"]).length))),e=d(e,y,/d+/g,(()=>("00"+g["d+"]).substring((""+g["d+"]).length))),e=d(e,y,/h+/g,(()=>("00"+g["h+"]).substring((""+g["h+"]).length))),e=d(e,y,/H+/g,(()=>("00"+g["H+"]).substring((""+g["H+"]).length))),e=d(e,y,/m+/g,(()=>("00"+g["m+"]).substring((""+g["m+"]).length))),e=d(e,y,/s+/g,(()=>("00"+g["s+"]).substring((""+g["s+"]).length))),e=d(e,y,/q+/g,(()=>("00"+g["q+"]).substring((""+g["q+"]).length))),e=d(e,y,/f+/g,(()=>("000"+g["f+"]).substring((""+g["f+"]).length))),e=d(e,y,/t+/g,(t=>g["t+"].substring(1==t.length?1:0))),e=d(e,y,/z+/g,(()=>u(i,"short",r))),y.forEach(((t,n)=>{e=e.replace(new RegExp("\\{\\{"+n+"\\}\\}","g"),t)})),e}catch(e){return(t||"").toString()}}function d(t,e,n,a){return t.replace(n,(t=>(e.push(a&&a(t)),"{{"+(e.length-1)+"}}")))}function y(t,e="",n=""){return g(t,e||r(),n)}function m(){let t=r();return t=t.replace(/y/g,"Y"),t=t.replace(/d/g,"D"),t=t.replace(/w/g,"d"),t=t.replace(/(d+)/g,"d$1"),t=t.replace(/q+/g,"Q"),t=t.replace(/z+/g,""),t}function h(){let t=o();return t=t.replace(/y/g,"Y"),t=t.replace(/t+/g,"A"),t=t.replace(/d/g,"D"),t=t.replace(/w/g,"d"),t=t.replace(/(d+)/g,"d$1"),t=t.replace(/q+/g,"Q"),t=t.replace(/f/g,"S"),t=t.replace(/z+/g,""),t}function l(t,e){const n={milliseconds:0,seconds:0,minutes:0,hours:0,days:0,totalMilliseconds:0,totalSeconds:0,totalMinutes:0,totalHours:0,totalDays:0};try{const a=t instanceof Date?t:b(t),r=e instanceof Date?e:b(e);n.totalMilliseconds=a.getTime()-r.getTime(),n.totalSeconds=n.totalMilliseconds/1e3,n.totalMinutes=n.totalSeconds/60,n.totalHours=n.totalMinutes/60,n.totalDays=n.totalHours/24,n.milliseconds=n.totalMilliseconds%1e3,n.seconds=Math.floor(n.totalSeconds)%60,n.minutes=Math.floor(n.totalMinutes)%60,n.days=Math.floor(n.totalDays),n.hours=Math.floor(n.totalHours-24*n.days)}catch(t){}return n}function M(t,e){const n=t instanceof Date?new Date(t):b(t);return n.setDate(n.getDate()+e),n}function w(t,e){const n=t instanceof Date?new Date(t):b(t);return n.setHours(n.getHours()+e),n}function D(t,e){const n=t instanceof Date?new Date(t):b(t);return n.setMinutes(n.getMinutes()+e),n}function p(t,e){const n=t instanceof Date?new Date(t):b(t);return n.setSeconds(n.getSeconds()+e),n}function H(t,e){const n=t instanceof Date?new Date(t):b(t);return n.setMonth(n.getMonth()+e),n}function
|
|
1
|
+
import{c as t}from"./p-iD8sj4Mi.js";import{p as e}from"./p-cERsY8tm.js";const n=()=>t.get("langCode","zh-CN").substring(t.get("langCode","zh-CN").length-2).toLocaleLowerCase(),a={en:{defaultDateFormat:"MM/dd/yyyy",defaultDateTimeFormat:"MM/dd/yyyy HH:mm:ss",AM:"AM",PM:"PM"},cn:{defaultDateFormat:"yyyy-MM-dd",defaultDateTimeFormat:"yyyy-MM-dd HH:mm:ss",AM:"上午",PM:"下午"}},r=()=>t.get("defaultDateFormat","")||a[n()].defaultDateFormat,o=()=>t.get("defaultDateTimeFormat","")||a[n()].defaultDateTimeFormat,s=()=>t.get("defaultTimeZone","");function i(t,e=""){try{let n=t instanceof Date?t:b(t);e&&(n=f(n,"",e));const a={"M+":n.getUTCMonth()+1,"d+":n.getUTCDate(),"H+":n.getUTCHours(),"h+":n.getUTCHours(),"m+":n.getUTCMinutes(),"s+":n.getUTCSeconds(),"f+":n.getUTCMilliseconds()};let r="yyyy-MM-ddTHH:mm:ssZ";return r=r.replace(/y+/g,(t=>(n.getUTCFullYear()+"").substring(4-t.length))),r=r.replace(/M+/g,(()=>("00"+a["M+"]).substring((""+a["M+"]).length))),r=r.replace(/d+/g,(()=>("00"+a["d+"]).substring((""+a["d+"]).length))),r=r.replace(/h+/g,(()=>("00"+a["h+"]).substring((""+a["h+"]).length))),r=r.replace(/H+/g,(()=>("00"+a["H+"]).substring((""+a["H+"]).length))),r=r.replace(/m+/g,(()=>("00"+a["m+"]).substring((""+a["m+"]).length))),r=r.replace(/s+/g,(()=>("00"+a["s+"]).substring((""+a["s+"]).length))),r=r.replace(/f+/g,(()=>("00"+a["f+"]).substring((""+a["f+"]).length))),r}catch(e){return(t||"").toString()}}function c(t){return(i(t)||"").split("T")[0]}function u(t,e="short",a=""){a||(a=s());try{return a?t.toLocaleString(n(),{year:"numeric",timeZone:a,timeZoneName:e}).split(" ")[1]:t.toLocaleString(n().substring(0,2),{year:"numeric",timeZoneName:e}).split(" ")[1]}catch(t){}return""}function f(t,e="",n=""){let a=t instanceof Date?t:b(t);try{if(e!=n){if(n){const t=l(a,f(a,n));a=new Date(a.getTime()+t.totalMilliseconds)}if(e)return new Date(a.toLocaleString("en",{timeZone:e}))}}catch(t){}return a}function g(t,e="",r=""){if(e||(e=o()),""===t||void 0===t)return t;try{const o=n();let i=t instanceof Date?t:b(t);r||(r=s()),r&&(i=f(i,r));const c=i.getHours(),g={"M+":i.getMonth()+1,"d+":i.getDate(),"H+":c,"h+":c>12?c%12:c,"m+":i.getMinutes(),"s+":i.getSeconds(),"q+":Math.floor((i.getMonth()+3)/3),"f+":i.getMilliseconds(),"t+":a[n()][c>=12?"AM":"PM"]};let y=[];return e=d(e,y,/y+/g,(t=>(i.getFullYear()+"").substring(4-t.length))),e=d(e,y,/MMMM/g,(()=>i.toLocaleString(o,{month:"long"}))),e=d(e,y,/MMM/g,(()=>i.toLocaleString(o,{month:"short"}))),e=d(e,y,/www/g,(()=>i.toLocaleString(o,{weekday:"long"}))),e=d(e,y,/ww/g,(()=>i.toLocaleString(o,{weekday:"short"}))),e=d(e,y,/w/g,(()=>i.toLocaleString(o,{weekday:"narrow"}))),e=d(e,y,/M+/g,(()=>("00"+g["M+"]).substring((""+g["M+"]).length))),e=d(e,y,/d+/g,(()=>("00"+g["d+"]).substring((""+g["d+"]).length))),e=d(e,y,/h+/g,(()=>("00"+g["h+"]).substring((""+g["h+"]).length))),e=d(e,y,/H+/g,(()=>("00"+g["H+"]).substring((""+g["H+"]).length))),e=d(e,y,/m+/g,(()=>("00"+g["m+"]).substring((""+g["m+"]).length))),e=d(e,y,/s+/g,(()=>("00"+g["s+"]).substring((""+g["s+"]).length))),e=d(e,y,/q+/g,(()=>("00"+g["q+"]).substring((""+g["q+"]).length))),e=d(e,y,/f+/g,(()=>("000"+g["f+"]).substring((""+g["f+"]).length))),e=d(e,y,/t+/g,(t=>g["t+"].substring(1==t.length?1:0))),e=d(e,y,/z+/g,(()=>u(i,"short",r))),y.forEach(((t,n)=>{e=e.replace(new RegExp("\\{\\{"+n+"\\}\\}","g"),t)})),e}catch(e){return(t||"").toString()}}function d(t,e,n,a){return t.replace(n,(t=>(e.push(a&&a(t)),"{{"+(e.length-1)+"}}")))}function y(t,e="",n=""){return g(t,e||r(),n)}function m(){let t=r();return t=t.replace(/y/g,"Y"),t=t.replace(/d/g,"D"),t=t.replace(/w/g,"d"),t=t.replace(/(d+)/g,"d$1"),t=t.replace(/q+/g,"Q"),t=t.replace(/z+/g,""),t}function h(){let t=o();return t=t.replace(/y/g,"Y"),t=t.replace(/t+/g,"A"),t=t.replace(/d/g,"D"),t=t.replace(/w/g,"d"),t=t.replace(/(d+)/g,"d$1"),t=t.replace(/q+/g,"Q"),t=t.replace(/f/g,"S"),t=t.replace(/z+/g,""),t}function l(t,e){const n={milliseconds:0,seconds:0,minutes:0,hours:0,days:0,totalMilliseconds:0,totalSeconds:0,totalMinutes:0,totalHours:0,totalDays:0};try{const a=t instanceof Date?t:b(t),r=e instanceof Date?e:b(e);n.totalMilliseconds=a.getTime()-r.getTime(),n.totalSeconds=n.totalMilliseconds/1e3,n.totalMinutes=n.totalSeconds/60,n.totalHours=n.totalMinutes/60,n.totalDays=n.totalHours/24,n.milliseconds=n.totalMilliseconds%1e3,n.seconds=Math.floor(n.totalSeconds)%60,n.minutes=Math.floor(n.totalMinutes)%60,n.days=Math.floor(n.totalDays),n.hours=Math.floor(n.totalHours-24*n.days)}catch(t){}return n}function M(t,e){const n=t instanceof Date?new Date(t):b(t);return n.setDate(n.getDate()+e),n}function w(t,e){const n=t instanceof Date?new Date(t):b(t);return n.setHours(n.getHours()+e),n}function D(t,e){const n=t instanceof Date?new Date(t):b(t);return n.setMinutes(n.getMinutes()+e),n}function p(t,e){const n=t instanceof Date?new Date(t):b(t);return n.setSeconds(n.getSeconds()+e),n}function H(t,e){const n=t instanceof Date?new Date(t):b(t);return n.setMonth(n.getMonth()+e),n}function Z(t,e){const n=t instanceof Date?new Date(t):b(t);return n.setFullYear(n.getFullYear()+e),n}function T(t,n=!0){const a=+t||0,r=Math.floor(a/3600),o=Math.floor(a%3600/60),s=Math.floor(a%60),i=e(r,2),c=e(o,2)+":"+e(s,2);return n?i+":"+c:c}function N(t){return t instanceof Date&&!isNaN(t.getTime())}function b(t){if("string"==typeof t){t=t.trim();const{browserName:e,browserVersion:n}=function(){const t=navigator.userAgent.toLowerCase();let e="",n="";return t.indexOf("chrome")>-1&&t.indexOf("safari")>-1?(e="chrome",n=t.match(/chrome\/([\d.]+)/)[1]):t.indexOf("firefox")>-1?(e="firefox",n=t.match(/firefox\/([\d.]+)/)[1]):t.indexOf("opera")>-1?(e="opera",n=t.match(/opera\/([\d.]+)/)[1]):t.indexOf("safari")>-1&&-1==t.indexOf("chrome")&&(e="safari",n=t.match(/version\/([\d.]+)/)[1]),{browserName:e,browserVersion:n}}();return"safari"===e&&n<"16.3"&&t.includes(" ")&&(t=t.replace(/\//g,"-").replace(" ","T")),t.includes("T")||t.includes(" ")||!t.endsWith("Z")||(t=t.replace(/Z/g,"").replace(/\//g,"-")),function(t){const e=t.replace("T","-").replace(" ","-").replace(/:/g,"-").replace(".","-").replace("Z","").split("-"),n=new Date;return n.setFullYear(+e[0],+e[1]-1,+e[2]),n[t.endsWith("Z")?"setUTCHours":"setHours"](+e[3]||0,+e[4]||0,+e[5]||0,+e[6]||0),n}(t)}return new Date(t)}class v{get _statusBarPlugin(){return null===window||void 0===window?void 0:window.StatusBar}toggleStatusBar(t){try{t?this._statusBarPlugin.show(!0):this._statusBarPlugin.hide()}catch(t){}}overlaysWebView(t){try{this._statusBarPlugin.overlaysWebView(t)}catch(t){}}styleDefault(){try{this._statusBarPlugin.styleDefault()}catch(t){}}styleLightContent(){try{this._statusBarPlugin.styleLightContent()}catch(t){}}get isVisible(){try{return this._statusBarPlugin.isVisible}catch(t){}return!1}}const C=new v;export{v as C,c as a,u as b,f as c,y as d,m as e,g as f,i as g,h,l as i,M as j,w as k,D as l,p as m,H as n,Z as o,N as p,b as q,C as r,T as s}
|